block.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 2,
  4. "name": "core/navigation",
  5. "title": "Navigation",
  6. "category": "theme",
  7. "description": "A collection of blocks that allow visitors to get around your site.",
  8. "keywords": [ "menu", "navigation", "links" ],
  9. "textdomain": "default",
  10. "attributes": {
  11. "ref": {
  12. "type": "number"
  13. },
  14. "textColor": {
  15. "type": "string"
  16. },
  17. "customTextColor": {
  18. "type": "string"
  19. },
  20. "rgbTextColor": {
  21. "type": "string"
  22. },
  23. "backgroundColor": {
  24. "type": "string"
  25. },
  26. "customBackgroundColor": {
  27. "type": "string"
  28. },
  29. "rgbBackgroundColor": {
  30. "type": "string"
  31. },
  32. "showSubmenuIcon": {
  33. "type": "boolean",
  34. "default": true
  35. },
  36. "openSubmenusOnClick": {
  37. "type": "boolean",
  38. "default": false
  39. },
  40. "overlayMenu": {
  41. "type": "string",
  42. "default": "mobile"
  43. },
  44. "icon": {
  45. "type": "string",
  46. "default": "handle"
  47. },
  48. "hasIcon": {
  49. "type": "boolean",
  50. "default": true
  51. },
  52. "__unstableLocation": {
  53. "type": "string"
  54. },
  55. "overlayBackgroundColor": {
  56. "type": "string"
  57. },
  58. "customOverlayBackgroundColor": {
  59. "type": "string"
  60. },
  61. "overlayTextColor": {
  62. "type": "string"
  63. },
  64. "customOverlayTextColor": {
  65. "type": "string"
  66. },
  67. "maxNestingLevel": {
  68. "type": "number",
  69. "default": 5
  70. }
  71. },
  72. "providesContext": {
  73. "textColor": "textColor",
  74. "customTextColor": "customTextColor",
  75. "backgroundColor": "backgroundColor",
  76. "customBackgroundColor": "customBackgroundColor",
  77. "overlayTextColor": "overlayTextColor",
  78. "customOverlayTextColor": "customOverlayTextColor",
  79. "overlayBackgroundColor": "overlayBackgroundColor",
  80. "customOverlayBackgroundColor": "customOverlayBackgroundColor",
  81. "fontSize": "fontSize",
  82. "customFontSize": "customFontSize",
  83. "showSubmenuIcon": "showSubmenuIcon",
  84. "openSubmenusOnClick": "openSubmenusOnClick",
  85. "style": "style",
  86. "orientation": "orientation",
  87. "maxNestingLevel": "maxNestingLevel"
  88. },
  89. "supports": {
  90. "align": [ "wide", "full" ],
  91. "html": false,
  92. "inserter": true,
  93. "typography": {
  94. "fontSize": true,
  95. "lineHeight": true,
  96. "__experimentalFontStyle": true,
  97. "__experimentalFontWeight": true,
  98. "__experimentalTextTransform": true,
  99. "__experimentalFontFamily": true,
  100. "__experimentalLetterSpacing": true,
  101. "__experimentalTextDecoration": true,
  102. "__experimentalSkipSerialization": [ "textDecoration" ],
  103. "__experimentalDefaultControls": {
  104. "fontSize": true
  105. }
  106. },
  107. "spacing": {
  108. "blockGap": true,
  109. "units": [ "px", "em", "rem", "vh", "vw" ],
  110. "__experimentalDefaultControls": {
  111. "blockGap": true
  112. }
  113. },
  114. "__experimentalLayout": {
  115. "allowSwitching": false,
  116. "allowInheriting": false,
  117. "allowVerticalAlignment": false,
  118. "default": {
  119. "type": "flex"
  120. }
  121. },
  122. "__experimentalStyle": {
  123. "elements": {
  124. "link": {
  125. "color": {
  126. "text": "inherit"
  127. }
  128. }
  129. }
  130. }
  131. },
  132. "viewScript": [ "file:./view.min.js", "file:./view-modal.min.js" ],
  133. "editorStyle": "wp-block-navigation-editor",
  134. "style": "wp-block-navigation"
  135. }