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.

141 lines
3.1 KiB

1 year ago
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 3,
  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. "templateLock": {
  72. "type": [ "string", "boolean" ],
  73. "enum": [ "all", "insert", "contentOnly", false ]
  74. }
  75. },
  76. "providesContext": {
  77. "textColor": "textColor",
  78. "customTextColor": "customTextColor",
  79. "backgroundColor": "backgroundColor",
  80. "customBackgroundColor": "customBackgroundColor",
  81. "overlayTextColor": "overlayTextColor",
  82. "customOverlayTextColor": "customOverlayTextColor",
  83. "overlayBackgroundColor": "overlayBackgroundColor",
  84. "customOverlayBackgroundColor": "customOverlayBackgroundColor",
  85. "fontSize": "fontSize",
  86. "customFontSize": "customFontSize",
  87. "showSubmenuIcon": "showSubmenuIcon",
  88. "openSubmenusOnClick": "openSubmenusOnClick",
  89. "style": "style",
  90. "maxNestingLevel": "maxNestingLevel"
  91. },
  92. "supports": {
  93. "align": [ "wide", "full" ],
  94. "ariaLabel": true,
  95. "html": false,
  96. "inserter": true,
  97. "typography": {
  98. "fontSize": true,
  99. "lineHeight": true,
  100. "__experimentalFontStyle": true,
  101. "__experimentalFontWeight": true,
  102. "__experimentalTextTransform": true,
  103. "__experimentalFontFamily": true,
  104. "__experimentalLetterSpacing": true,
  105. "__experimentalTextDecoration": true,
  106. "__experimentalSkipSerialization": [ "textDecoration" ],
  107. "__experimentalDefaultControls": {
  108. "fontSize": true
  109. }
  110. },
  111. "spacing": {
  112. "blockGap": true,
  113. "units": [ "px", "em", "rem", "vh", "vw" ],
  114. "__experimentalDefaultControls": {
  115. "blockGap": true
  116. }
  117. },
  118. "layout": {
  119. "allowSwitching": false,
  120. "allowInheriting": false,
  121. "allowVerticalAlignment": false,
  122. "allowSizingOnChildren": true,
  123. "default": {
  124. "type": "flex"
  125. }
  126. },
  127. "__experimentalStyle": {
  128. "elements": {
  129. "link": {
  130. "color": {
  131. "text": "inherit"
  132. }
  133. }
  134. }
  135. },
  136. "interactivity": true
  137. },
  138. "viewScript": "file:./view.min.js",
  139. "editorStyle": "wp-block-navigation-editor",
  140. "style": "wp-block-navigation"
  141. }