You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.1 KiB

1 year ago
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 3,
  4. "name": "core/search",
  5. "title": "Search",
  6. "category": "widgets",
  7. "description": "Help visitors find your content.",
  8. "keywords": [ "find" ],
  9. "textdomain": "default",
  10. "attributes": {
  11. "label": {
  12. "type": "string",
  13. "__experimentalRole": "content"
  14. },
  15. "showLabel": {
  16. "type": "boolean",
  17. "default": true
  18. },
  19. "placeholder": {
  20. "type": "string",
  21. "default": "",
  22. "__experimentalRole": "content"
  23. },
  24. "width": {
  25. "type": "number"
  26. },
  27. "widthUnit": {
  28. "type": "string"
  29. },
  30. "buttonText": {
  31. "type": "string",
  32. "__experimentalRole": "content"
  33. },
  34. "buttonPosition": {
  35. "type": "string",
  36. "default": "button-outside"
  37. },
  38. "buttonUseIcon": {
  39. "type": "boolean",
  40. "default": false
  41. },
  42. "query": {
  43. "type": "object",
  44. "default": {}
  45. },
  46. "buttonBehavior": {
  47. "type": "string",
  48. "default": "expand-searchfield"
  49. },
  50. "isSearchFieldHidden": {
  51. "type": "boolean",
  52. "default": false
  53. }
  54. },
  55. "supports": {
  56. "align": [ "left", "center", "right" ],
  57. "color": {
  58. "gradients": true,
  59. "__experimentalSkipSerialization": true,
  60. "__experimentalDefaultControls": {
  61. "background": true,
  62. "text": true
  63. }
  64. },
  65. "interactivity": true,
  66. "typography": {
  67. "__experimentalSkipSerialization": true,
  68. "__experimentalSelector": ".wp-block-search__label, .wp-block-search__input, .wp-block-search__button",
  69. "fontSize": true,
  70. "lineHeight": true,
  71. "__experimentalFontFamily": true,
  72. "__experimentalFontWeight": true,
  73. "__experimentalFontStyle": true,
  74. "__experimentalTextTransform": true,
  75. "__experimentalTextDecoration": true,
  76. "__experimentalLetterSpacing": true,
  77. "__experimentalDefaultControls": {
  78. "fontSize": true
  79. }
  80. },
  81. "__experimentalBorder": {
  82. "color": true,
  83. "radius": true,
  84. "width": true,
  85. "__experimentalSkipSerialization": true,
  86. "__experimentalDefaultControls": {
  87. "color": true,
  88. "radius": true,
  89. "width": true
  90. }
  91. },
  92. "html": false
  93. },
  94. "viewScript": "file:./view.min.js",
  95. "editorStyle": "wp-block-search-editor",
  96. "style": "wp-block-search"
  97. }