@wordpress/block-library 8.8.0 → 8.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/comment-author-name/edit.js +1 -1
  3. package/build/comment-author-name/edit.js.map +1 -1
  4. package/build/comment-edit-link/edit.js +1 -1
  5. package/build/comment-edit-link/edit.js.map +1 -1
  6. package/build/cover/edit/inspector-controls.js +1 -1
  7. package/build/cover/edit/inspector-controls.js.map +1 -1
  8. package/build/cover/index.js +1 -1
  9. package/build/cover/transforms.js +10 -7
  10. package/build/cover/transforms.js.map +1 -1
  11. package/build/cover/variations.js +1 -1
  12. package/build/cover/variations.js.map +1 -1
  13. package/build/details/edit.js +19 -5
  14. package/build/details/edit.js.map +1 -1
  15. package/build/details/index.js +14 -10
  16. package/build/details/index.js.map +1 -1
  17. package/build/details/save.js +4 -1
  18. package/build/details/save.js.map +1 -1
  19. package/build/embed/variations.js +2 -2
  20. package/build/embed/variations.js.map +1 -1
  21. package/build/file/view.js +1 -1
  22. package/build/file/view.js.map +1 -1
  23. package/build/gallery/edit.js +2 -8
  24. package/build/gallery/edit.js.map +1 -1
  25. package/build/group/edit.js +3 -1
  26. package/build/group/edit.js.map +1 -1
  27. package/build/group/index.js +3 -0
  28. package/build/group/index.js.map +1 -1
  29. package/build/image/edit.js +16 -13
  30. package/build/image/edit.js.map +1 -1
  31. package/build/image/index.js +1 -1
  32. package/build/index.js +0 -6
  33. package/build/index.js.map +1 -1
  34. package/build/index.native.js +10 -6
  35. package/build/index.native.js.map +1 -1
  36. package/build/list-item/utils.js +5 -1
  37. package/build/list-item/utils.js.map +1 -1
  38. package/build/loginout/index.js +11 -1
  39. package/build/loginout/index.js.map +1 -1
  40. package/build/media-text/edit.js +4 -2
  41. package/build/media-text/edit.js.map +1 -1
  42. package/build/media-text/index.js +3 -0
  43. package/build/media-text/index.js.map +1 -1
  44. package/build/navigation/constants.js +13 -0
  45. package/build/navigation/constants.js.map +1 -0
  46. package/build/navigation/edit/index.js +26 -68
  47. package/build/navigation/edit/index.js.map +1 -1
  48. package/build/navigation/edit/inner-blocks.js +4 -7
  49. package/build/navigation/edit/inner-blocks.js.map +1 -1
  50. package/build/navigation/edit/unsaved-inner-blocks.js +4 -6
  51. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  52. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
  53. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  54. package/build/navigation/interactivity.js +139 -0
  55. package/build/navigation/interactivity.js.map +1 -0
  56. package/build/navigation-link/edit.js +1 -1
  57. package/build/navigation-link/edit.js.map +1 -1
  58. package/build/navigation-submenu/edit.js +1 -1
  59. package/build/navigation-submenu/edit.js.map +1 -1
  60. package/build/paragraph/index.js +5 -1
  61. package/build/paragraph/index.js.map +1 -1
  62. package/build/paragraph/transforms.js +5 -1
  63. package/build/paragraph/transforms.js.map +1 -1
  64. package/build/post-author-name/edit.js +1 -1
  65. package/build/post-author-name/edit.js.map +1 -1
  66. package/build/post-date/edit.js +4 -2
  67. package/build/post-date/edit.js.map +1 -1
  68. package/build/post-excerpt/edit.js +2 -2
  69. package/build/post-excerpt/edit.js.map +1 -1
  70. package/build/post-featured-image/edit.js +6 -4
  71. package/build/post-featured-image/edit.js.map +1 -1
  72. package/build/post-featured-image/overlay.js +5 -0
  73. package/build/post-featured-image/overlay.js.map +1 -1
  74. package/build/post-title/edit.js +14 -4
  75. package/build/post-title/edit.js.map +1 -1
  76. package/build/preformatted/edit.native.js +3 -2
  77. package/build/preformatted/edit.native.js.map +1 -1
  78. package/build/query/deprecated.js +8 -6
  79. package/build/query/deprecated.js.map +1 -1
  80. package/build/query/edit/inspector-controls/create-new-post-link.js +41 -0
  81. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -0
  82. package/build/query/edit/inspector-controls/index.js +14 -6
  83. package/build/query/edit/inspector-controls/index.js.map +1 -1
  84. package/build/query/edit/pattern-selection-modal.js +2 -1
  85. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  86. package/build/query/index.js +5 -12
  87. package/build/query/index.js.map +1 -1
  88. package/build/quote/transforms.js +16 -27
  89. package/build/quote/transforms.js.map +1 -1
  90. package/build/read-more/edit.js +1 -1
  91. package/build/read-more/edit.js.map +1 -1
  92. package/build/search/edit.js +9 -1
  93. package/build/search/edit.js.map +1 -1
  94. package/build/site-logo/edit.js +114 -16
  95. package/build/site-logo/edit.js.map +1 -1
  96. package/build/site-logo/index.js +1 -1
  97. package/build/site-title/edit/index.js +1 -1
  98. package/build/site-title/edit/index.js.map +1 -1
  99. package/build/social-link/icons/chain.js +1 -1
  100. package/build/social-link/icons/chain.js.map +1 -1
  101. package/build/social-link/icons/mail.js +1 -1
  102. package/build/social-link/icons/mail.js.map +1 -1
  103. package/build/social-links/edit.js +2 -2
  104. package/build/social-links/edit.js.map +1 -1
  105. package/build/spacer/edit.js +117 -11
  106. package/build/spacer/edit.js.map +1 -1
  107. package/build/template-part/edit/index.js +2 -1
  108. package/build/template-part/edit/index.js.map +1 -1
  109. package/build/template-part/edit/utils/hooks.js +2 -2
  110. package/build/template-part/edit/utils/hooks.js.map +1 -1
  111. package/build/utils/interactivity/constants.js +9 -0
  112. package/build/utils/interactivity/constants.js.map +1 -0
  113. package/build/utils/interactivity/directives.js +208 -0
  114. package/build/utils/interactivity/directives.js.map +1 -0
  115. package/build/utils/interactivity/hooks.js +112 -0
  116. package/build/utils/interactivity/hooks.js.map +1 -0
  117. package/build/utils/interactivity/hydration.js +34 -0
  118. package/build/utils/interactivity/hydration.js.map +1 -0
  119. package/build/utils/interactivity/index.js +34 -0
  120. package/build/utils/interactivity/index.js.map +1 -0
  121. package/build/utils/interactivity/store.js +67 -0
  122. package/build/utils/interactivity/store.js.map +1 -0
  123. package/build/utils/interactivity/utils.js +87 -0
  124. package/build/utils/interactivity/utils.js.map +1 -0
  125. package/build/utils/interactivity/vdom.js +109 -0
  126. package/build/utils/interactivity/vdom.js.map +1 -0
  127. package/build/utils/migrate-font-family.js +12 -5
  128. package/build/utils/migrate-font-family.js.map +1 -1
  129. package/build/video/edit.native.js +4 -3
  130. package/build/video/edit.native.js.map +1 -1
  131. package/build-module/comment-author-name/edit.js +1 -1
  132. package/build-module/comment-author-name/edit.js.map +1 -1
  133. package/build-module/comment-edit-link/edit.js +1 -1
  134. package/build-module/comment-edit-link/edit.js.map +1 -1
  135. package/build-module/cover/edit/inspector-controls.js +1 -1
  136. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  137. package/build-module/cover/index.js +1 -1
  138. package/build-module/cover/transforms.js +5 -1
  139. package/build-module/cover/transforms.js.map +1 -1
  140. package/build-module/cover/variations.js +1 -1
  141. package/build-module/cover/variations.js.map +1 -1
  142. package/build-module/details/edit.js +20 -6
  143. package/build-module/details/edit.js.map +1 -1
  144. package/build-module/details/index.js +14 -10
  145. package/build-module/details/index.js.map +1 -1
  146. package/build-module/details/save.js +5 -2
  147. package/build-module/details/save.js.map +1 -1
  148. package/build-module/embed/variations.js +2 -2
  149. package/build-module/embed/variations.js.map +1 -1
  150. package/build-module/file/view.js +1 -1
  151. package/build-module/file/view.js.map +1 -1
  152. package/build-module/gallery/edit.js +2 -8
  153. package/build-module/gallery/edit.js.map +1 -1
  154. package/build-module/group/edit.js +3 -1
  155. package/build-module/group/edit.js.map +1 -1
  156. package/build-module/group/index.js +3 -0
  157. package/build-module/group/index.js.map +1 -1
  158. package/build-module/image/edit.js +16 -13
  159. package/build-module/image/edit.js.map +1 -1
  160. package/build-module/image/index.js +1 -1
  161. package/build-module/index.js +0 -4
  162. package/build-module/index.js.map +1 -1
  163. package/build-module/index.native.js +10 -6
  164. package/build-module/index.native.js.map +1 -1
  165. package/build-module/list-item/utils.js +5 -1
  166. package/build-module/list-item/utils.js.map +1 -1
  167. package/build-module/loginout/index.js +11 -1
  168. package/build-module/loginout/index.js.map +1 -1
  169. package/build-module/media-text/edit.js +4 -2
  170. package/build-module/media-text/edit.js.map +1 -1
  171. package/build-module/media-text/index.js +3 -0
  172. package/build-module/media-text/index.js.map +1 -1
  173. package/build-module/navigation/constants.js +5 -0
  174. package/build-module/navigation/constants.js.map +1 -0
  175. package/build-module/navigation/edit/index.js +28 -69
  176. package/build-module/navigation/edit/index.js.map +1 -1
  177. package/build-module/navigation/edit/inner-blocks.js +1 -4
  178. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  179. package/build-module/navigation/edit/unsaved-inner-blocks.js +1 -4
  180. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  181. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
  182. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  183. package/build-module/navigation/interactivity.js +136 -0
  184. package/build-module/navigation/interactivity.js.map +1 -0
  185. package/build-module/navigation-link/edit.js +1 -1
  186. package/build-module/navigation-link/edit.js.map +1 -1
  187. package/build-module/navigation-submenu/edit.js +1 -1
  188. package/build-module/navigation-submenu/edit.js.map +1 -1
  189. package/build-module/paragraph/index.js +5 -1
  190. package/build-module/paragraph/index.js.map +1 -1
  191. package/build-module/paragraph/transforms.js +5 -1
  192. package/build-module/paragraph/transforms.js.map +1 -1
  193. package/build-module/post-author-name/edit.js +1 -1
  194. package/build-module/post-author-name/edit.js.map +1 -1
  195. package/build-module/post-date/edit.js +4 -2
  196. package/build-module/post-date/edit.js.map +1 -1
  197. package/build-module/post-excerpt/edit.js +2 -2
  198. package/build-module/post-excerpt/edit.js.map +1 -1
  199. package/build-module/post-featured-image/edit.js +6 -4
  200. package/build-module/post-featured-image/edit.js.map +1 -1
  201. package/build-module/post-featured-image/overlay.js +5 -0
  202. package/build-module/post-featured-image/overlay.js.map +1 -1
  203. package/build-module/post-title/edit.js +13 -4
  204. package/build-module/post-title/edit.js.map +1 -1
  205. package/build-module/preformatted/edit.native.js +3 -2
  206. package/build-module/preformatted/edit.native.js.map +1 -1
  207. package/build-module/query/deprecated.js +5 -2
  208. package/build-module/query/deprecated.js.map +1 -1
  209. package/build-module/query/edit/inspector-controls/create-new-post-link.js +33 -0
  210. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -0
  211. package/build-module/query/edit/inspector-controls/index.js +12 -7
  212. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  213. package/build-module/query/edit/pattern-selection-modal.js +2 -1
  214. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  215. package/build-module/query/index.js +5 -10
  216. package/build-module/query/index.js.map +1 -1
  217. package/build-module/quote/transforms.js +16 -27
  218. package/build-module/quote/transforms.js.map +1 -1
  219. package/build-module/read-more/edit.js +1 -1
  220. package/build-module/read-more/edit.js.map +1 -1
  221. package/build-module/search/edit.js +9 -1
  222. package/build-module/search/edit.js.map +1 -1
  223. package/build-module/site-logo/edit.js +115 -18
  224. package/build-module/site-logo/edit.js.map +1 -1
  225. package/build-module/site-logo/index.js +1 -1
  226. package/build-module/site-title/edit/index.js +1 -1
  227. package/build-module/site-title/edit/index.js.map +1 -1
  228. package/build-module/social-link/icons/chain.js +1 -1
  229. package/build-module/social-link/icons/chain.js.map +1 -1
  230. package/build-module/social-link/icons/mail.js +1 -1
  231. package/build-module/social-link/icons/mail.js.map +1 -1
  232. package/build-module/social-links/edit.js +2 -2
  233. package/build-module/social-links/edit.js.map +1 -1
  234. package/build-module/spacer/edit.js +118 -12
  235. package/build-module/spacer/edit.js.map +1 -1
  236. package/build-module/template-part/edit/index.js +2 -1
  237. package/build-module/template-part/edit/index.js.map +1 -1
  238. package/build-module/template-part/edit/utils/hooks.js +2 -2
  239. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  240. package/build-module/utils/interactivity/constants.js +2 -0
  241. package/build-module/utils/interactivity/constants.js.map +1 -0
  242. package/build-module/utils/interactivity/directives.js +193 -0
  243. package/build-module/utils/interactivity/directives.js.map +1 -0
  244. package/build-module/utils/interactivity/hooks.js +98 -0
  245. package/build-module/utils/interactivity/hooks.js.map +1 -0
  246. package/build-module/utils/interactivity/hydration.js +21 -0
  247. package/build-module/utils/interactivity/hydration.js.map +1 -0
  248. package/build-module/utils/interactivity/index.js +17 -0
  249. package/build-module/utils/interactivity/index.js.map +1 -0
  250. package/build-module/utils/interactivity/store.js +56 -0
  251. package/build-module/utils/interactivity/store.js.map +1 -0
  252. package/build-module/utils/interactivity/utils.js +75 -0
  253. package/build-module/utils/interactivity/utils.js.map +1 -0
  254. package/build-module/utils/interactivity/vdom.js +97 -0
  255. package/build-module/utils/interactivity/vdom.js.map +1 -0
  256. package/build-module/utils/migrate-font-family.js +9 -1
  257. package/build-module/utils/migrate-font-family.js.map +1 -1
  258. package/build-module/video/edit.native.js +4 -3
  259. package/build-module/video/edit.native.js.map +1 -1
  260. package/build-style/cover/editor-rtl.css +3 -3
  261. package/build-style/cover/editor.css +3 -3
  262. package/build-style/cover/style-rtl.css +2 -1
  263. package/build-style/cover/style.css +2 -1
  264. package/build-style/{details-summary → details}/editor-rtl.css +1 -1
  265. package/build-style/{details-summary → details}/editor.css +1 -1
  266. package/build-style/details/style-rtl.css +14 -0
  267. package/build-style/details/style.css +14 -0
  268. package/build-style/editor-rtl.css +74 -39
  269. package/build-style/editor.css +74 -39
  270. package/build-style/gallery/editor-rtl.css +0 -4
  271. package/build-style/gallery/editor.css +0 -4
  272. package/build-style/html/editor-rtl.css +2 -2
  273. package/build-style/html/editor.css +2 -2
  274. package/build-style/image/editor-rtl.css +1 -1
  275. package/build-style/image/editor.css +1 -1
  276. package/build-style/query/editor-rtl.css +8 -12
  277. package/build-style/query/editor.css +8 -12
  278. package/build-style/search/editor-rtl.css +1 -0
  279. package/build-style/search/editor.css +1 -0
  280. package/build-style/search/style-rtl.css +2 -0
  281. package/build-style/search/style.css +2 -0
  282. package/build-style/shortcode/editor-rtl.css +3 -4
  283. package/build-style/shortcode/editor.css +3 -4
  284. package/build-style/site-logo/editor-rtl.css +47 -0
  285. package/build-style/site-logo/editor.css +47 -0
  286. package/build-style/style-rtl.css +15 -2
  287. package/build-style/style.css +15 -2
  288. package/build-style/template-part/editor-rtl.css +8 -12
  289. package/build-style/template-part/editor.css +8 -12
  290. package/package.json +36 -32
  291. package/src/buttons/test/__snapshots__/edit.native.js.snap +18 -0
  292. package/src/buttons/test/edit.native.js +123 -2
  293. package/src/comment-author-name/edit.js +1 -1
  294. package/src/comment-edit-link/edit.js +1 -1
  295. package/src/comment-template/index.php +8 -7
  296. package/src/cover/block.json +1 -1
  297. package/src/cover/edit/inspector-controls.js +56 -54
  298. package/src/cover/editor.scss +1 -1
  299. package/src/cover/style.scss +4 -0
  300. package/src/cover/test/edit.js +56 -2
  301. package/src/cover/transforms.js +4 -1
  302. package/src/cover/variations.js +1 -3
  303. package/src/details/block.json +8 -6
  304. package/src/details/edit.js +27 -5
  305. package/src/details/editor.scss +3 -0
  306. package/src/details/index.js +10 -5
  307. package/src/details/save.js +5 -1
  308. package/src/details/style.scss +16 -0
  309. package/src/editor.scss +1 -1
  310. package/src/embed/variations.js +2 -2
  311. package/src/file/view.js +4 -1
  312. package/src/gallery/edit.js +5 -8
  313. package/src/gallery/editor.scss +0 -6
  314. package/src/gallery/test/index.native.js +52 -7
  315. package/src/group/block.json +3 -0
  316. package/src/group/edit.js +8 -2
  317. package/src/heading/test/__snapshots__/index.native.js.snap +12 -0
  318. package/src/heading/test/index.native.js +71 -0
  319. package/src/html/editor.scss +2 -21
  320. package/src/image/block.json +1 -1
  321. package/src/image/edit.js +21 -17
  322. package/src/image/editor.scss +1 -1
  323. package/src/image/test/edit.native.js +38 -16
  324. package/src/index.js +0 -4
  325. package/src/index.native.js +10 -5
  326. package/src/list/test/edit.native.js +7 -7
  327. package/src/loginout/block.json +11 -1
  328. package/src/media-text/block.json +3 -0
  329. package/src/media-text/edit.js +2 -1
  330. package/src/navigation/constants.js +16 -0
  331. package/src/navigation/edit/index.js +77 -163
  332. package/src/navigation/edit/inner-blocks.js +1 -16
  333. package/src/navigation/edit/unsaved-inner-blocks.js +1 -16
  334. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
  335. package/src/navigation/index.php +210 -197
  336. package/src/navigation/interactivity.js +144 -0
  337. package/src/navigation-link/edit.js +1 -1
  338. package/src/navigation-submenu/edit.js +1 -1
  339. package/src/paragraph/block.json +5 -1
  340. package/src/paragraph/test/edit.native.js +288 -28
  341. package/src/post-author-name/edit.js +1 -1
  342. package/src/post-date/edit.js +4 -0
  343. package/src/post-date/index.php +17 -8
  344. package/src/post-excerpt/edit.js +1 -1
  345. package/src/post-featured-image/edit.js +5 -4
  346. package/src/post-featured-image/overlay.js +4 -0
  347. package/src/post-terms/index.php +2 -2
  348. package/src/post-title/edit.js +8 -1
  349. package/src/preformatted/edit.native.js +1 -3
  350. package/src/preformatted/test/edit.native.js +6 -9
  351. package/src/pullquote/test/edit.native.js +7 -12
  352. package/src/query/deprecated.js +4 -1
  353. package/src/query/edit/inspector-controls/create-new-post-link.js +26 -0
  354. package/src/query/edit/inspector-controls/index.js +13 -6
  355. package/src/query/edit/pattern-selection-modal.js +1 -0
  356. package/src/query/editor.scss +8 -11
  357. package/src/query/index.js +1 -7
  358. package/src/quote/test/edit.native.js +6 -10
  359. package/src/quote/transforms.js +0 -6
  360. package/src/read-more/edit.js +1 -1
  361. package/src/search/edit.js +9 -4
  362. package/src/search/editor.scss +1 -0
  363. package/src/search/style.scss +3 -0
  364. package/src/shortcode/editor.scss +1 -21
  365. package/src/site-logo/block.json +1 -1
  366. package/src/site-logo/edit.js +123 -9
  367. package/src/site-logo/editor.scss +58 -0
  368. package/src/site-title/edit/index.js +1 -1
  369. package/src/social-link/icons/chain.js +1 -1
  370. package/src/social-link/icons/mail.js +1 -1
  371. package/src/social-link/index.php +2 -2
  372. package/src/social-links/edit.js +33 -31
  373. package/src/spacer/edit.js +157 -18
  374. package/src/style.scss +0 -1
  375. package/src/template-part/edit/index.js +1 -0
  376. package/src/template-part/edit/utils/hooks.js +2 -2
  377. package/src/template-part/editor.scss +9 -11
  378. package/src/template-part/index.php +20 -5
  379. package/src/utils/interactivity/constants.js +1 -0
  380. package/src/utils/interactivity/directives.js +179 -0
  381. package/src/utils/interactivity/hooks.js +76 -0
  382. package/src/utils/interactivity/hydration.js +22 -0
  383. package/src/utils/interactivity/index.js +17 -0
  384. package/src/utils/interactivity/store.js +45 -0
  385. package/src/utils/interactivity/utils.js +66 -0
  386. package/src/utils/interactivity/vdom.js +94 -0
  387. package/src/utils/migrate-font-family.js +8 -1
  388. package/src/verse/test/edit.native.js +4 -9
  389. package/src/video/edit.native.js +2 -2
  390. package/tsconfig.json +2 -0
  391. package/tsconfig.tsbuildinfo +1 -1
  392. package/build/details-content/edit.js +0 -34
  393. package/build/details-content/edit.js.map +0 -1
  394. package/build/details-content/index.js +0 -94
  395. package/build/details-content/index.js.map +0 -1
  396. package/build/details-content/save.js +0 -20
  397. package/build/details-content/save.js.map +0 -1
  398. package/build/details-summary/edit.js +0 -42
  399. package/build/details-summary/edit.js.map +0 -1
  400. package/build/details-summary/index.js +0 -97
  401. package/build/details-summary/index.js.map +0 -1
  402. package/build/details-summary/save.js +0 -24
  403. package/build/details-summary/save.js.map +0 -1
  404. package/build/query/hooks.js +0 -72
  405. package/build/query/hooks.js.map +0 -1
  406. package/build/utils/clean-empty-object.js +0 -37
  407. package/build/utils/clean-empty-object.js.map +0 -1
  408. package/build-module/details-content/edit.js +0 -23
  409. package/build-module/details-content/edit.js.map +0 -1
  410. package/build-module/details-content/index.js +0 -76
  411. package/build-module/details-content/index.js.map +0 -1
  412. package/build-module/details-content/save.js +0 -11
  413. package/build-module/details-content/save.js.map +0 -1
  414. package/build-module/details-summary/edit.js +0 -30
  415. package/build-module/details-summary/edit.js.map +0 -1
  416. package/build-module/details-summary/index.js +0 -79
  417. package/build-module/details-summary/index.js.map +0 -1
  418. package/build-module/details-summary/save.js +0 -16
  419. package/build-module/details-summary/save.js.map +0 -1
  420. package/build-module/query/hooks.js +0 -59
  421. package/build-module/query/hooks.js.map +0 -1
  422. package/build-module/utils/clean-empty-object.js +0 -28
  423. package/build-module/utils/clean-empty-object.js.map +0 -1
  424. package/build-style/details-summary/style-rtl.css +0 -91
  425. package/build-style/details-summary/style.css +0 -91
  426. package/src/details-content/block.json +0 -50
  427. package/src/details-content/edit.js +0 -29
  428. package/src/details-content/index.js +0 -23
  429. package/src/details-content/save.js +0 -12
  430. package/src/details-summary/block.json +0 -53
  431. package/src/details-summary/edit.js +0 -27
  432. package/src/details-summary/editor.scss +0 -3
  433. package/src/details-summary/index.js +0 -23
  434. package/src/details-summary/save.js +0 -13
  435. package/src/details-summary/style.scss +0 -3
  436. package/src/query/hooks.js +0 -53
  437. package/src/utils/clean-empty-object.js +0 -28
@@ -0,0 +1,22 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { hydrate } from 'preact';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import { toVdom, hydratedIslands } from './vdom';
9
+ import { createRootFragment } from './utils';
10
+ import { directivePrefix } from './constants';
11
+
12
+ export const init = async () => {
13
+ document
14
+ .querySelectorAll( `[${ directivePrefix }island]` )
15
+ .forEach( ( node ) => {
16
+ if ( ! hydratedIslands.has( node ) ) {
17
+ const fragment = createRootFragment( node.parentNode, node );
18
+ const vdom = toVdom( node );
19
+ hydrate( vdom, fragment );
20
+ }
21
+ } );
22
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import registerDirectives from './directives';
5
+ import { init } from './hydration';
6
+ export { store } from './store';
7
+
8
+ /**
9
+ * Initialize the Interactivity API.
10
+ */
11
+ registerDirectives();
12
+
13
+ document.addEventListener( 'DOMContentLoaded', async () => {
14
+ await init();
15
+ // eslint-disable-next-line no-console
16
+ console.log( 'Interactivity API started' );
17
+ } );
@@ -0,0 +1,45 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { deepSignal } from 'deepsignal';
5
+
6
+ const isObject = ( item ) =>
7
+ item && typeof item === 'object' && ! Array.isArray( item );
8
+
9
+ const deepMerge = ( target, source ) => {
10
+ if ( isObject( target ) && isObject( source ) ) {
11
+ for ( const key in source ) {
12
+ if ( isObject( source[ key ] ) ) {
13
+ if ( ! target[ key ] ) Object.assign( target, { [ key ]: {} } );
14
+ deepMerge( target[ key ], source[ key ] );
15
+ } else {
16
+ Object.assign( target, { [ key ]: source[ key ] } );
17
+ }
18
+ }
19
+ }
20
+ };
21
+
22
+ const getSerializedState = () => {
23
+ // TODO: change the store tag ID for a better one.
24
+ const storeTag = document.querySelector(
25
+ `script[type="application/json"]#store`
26
+ );
27
+ if ( ! storeTag ) return {};
28
+ try {
29
+ const { state } = JSON.parse( storeTag.textContent );
30
+ if ( isObject( state ) ) return state;
31
+ throw Error( 'Parsed state is not an object' );
32
+ } catch ( e ) {
33
+ // eslint-disable-next-line no-console
34
+ console.log( e );
35
+ }
36
+ return {};
37
+ };
38
+
39
+ const rawState = getSerializedState();
40
+ export const rawStore = { state: deepSignal( rawState ) };
41
+
42
+ export const store = ( { state, ...block } ) => {
43
+ deepMerge( rawStore, block );
44
+ deepMerge( rawState, state );
45
+ };
@@ -0,0 +1,66 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { useRef, useEffect } from 'preact/hooks';
5
+ import { effect } from '@preact/signals';
6
+
7
+ function afterNextFrame( callback ) {
8
+ const done = () => {
9
+ window.cancelAnimationFrame( raf );
10
+ setTimeout( callback );
11
+ };
12
+ const raf = window.requestAnimationFrame( done );
13
+ }
14
+
15
+ // Using the mangled properties:
16
+ // this.c: this._callback
17
+ // this.x: this._compute
18
+ // https://github.com/preactjs/signals/blob/main/mangle.json
19
+ function createFlusher( compute, notify ) {
20
+ let flush;
21
+ const dispose = effect( function () {
22
+ flush = this.c.bind( this );
23
+ this.x = compute;
24
+ this.c = notify;
25
+ return compute();
26
+ } );
27
+ return { flush, dispose };
28
+ }
29
+
30
+ // Version of `useSignalEffect` with a `useEffect`-like execution. This hook
31
+ // implementation comes from this PR:
32
+ // https://github.com/preactjs/signals/pull/290.
33
+ //
34
+ // We need to include it here in this repo until the mentioned PR is merged.
35
+ export function useSignalEffect( cb ) {
36
+ const callback = useRef( cb );
37
+ callback.current = cb;
38
+
39
+ useEffect( () => {
40
+ const execute = () => callback.current();
41
+ const notify = () => afterNextFrame( eff.flush );
42
+ const eff = createFlusher( execute, notify );
43
+ return eff.dispose;
44
+ }, [] );
45
+ }
46
+
47
+ // For wrapperless hydration.
48
+ // See https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c
49
+ export const createRootFragment = ( parent, replaceNode ) => {
50
+ replaceNode = [].concat( replaceNode );
51
+ const s = replaceNode[ replaceNode.length - 1 ].nextSibling;
52
+ function insert( c, r ) {
53
+ parent.insertBefore( c, r || s );
54
+ }
55
+ return ( parent.__k = {
56
+ nodeType: 1,
57
+ parentNode: parent,
58
+ firstChild: replaceNode[ 0 ],
59
+ childNodes: replaceNode,
60
+ insertBefore: insert,
61
+ appendChild: insert,
62
+ removeChild( c ) {
63
+ parent.removeChild( c );
64
+ },
65
+ } );
66
+ };
@@ -0,0 +1,94 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { h } from 'preact';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import { directivePrefix as p } from './constants';
9
+
10
+ const ignoreAttr = `${ p }ignore`;
11
+ const islandAttr = `${ p }island`;
12
+ const directiveParser = new RegExp( `${ p }([^.]+)\.?(.*)$` );
13
+
14
+ export const hydratedIslands = new WeakSet();
15
+
16
+ // Recursive function that transforms a DOM tree into vDOM.
17
+ export function toVdom( root ) {
18
+ const treeWalker = document.createTreeWalker(
19
+ root,
20
+ 205 // ELEMENT + TEXT + COMMENT + CDATA_SECTION + PROCESSING_INSTRUCTION
21
+ );
22
+
23
+ function walk( node ) {
24
+ const { attributes, nodeType } = node;
25
+
26
+ if ( nodeType === 3 ) return [ node.data ];
27
+ if ( nodeType === 4 ) {
28
+ const next = treeWalker.nextSibling();
29
+ node.replaceWith( new window.Text( node.nodeValue ) );
30
+ return [ node.nodeValue, next ];
31
+ }
32
+ if ( nodeType === 8 || nodeType === 7 ) {
33
+ const next = treeWalker.nextSibling();
34
+ node.remove();
35
+ return [ null, next ];
36
+ }
37
+
38
+ const props = {};
39
+ const children = [];
40
+ const directives = {};
41
+ let hasDirectives = false;
42
+ let ignore = false;
43
+ let island = false;
44
+
45
+ for ( let i = 0; i < attributes.length; i++ ) {
46
+ const n = attributes[ i ].name;
47
+ if ( n[ p.length ] && n.slice( 0, p.length ) === p ) {
48
+ if ( n === ignoreAttr ) {
49
+ ignore = true;
50
+ } else if ( n === islandAttr ) {
51
+ island = true;
52
+ } else {
53
+ hasDirectives = true;
54
+ let val = attributes[ i ].value;
55
+ try {
56
+ val = JSON.parse( val );
57
+ } catch ( e ) {}
58
+ const [ , prefix, suffix ] = directiveParser.exec( n );
59
+ directives[ prefix ] = directives[ prefix ] || {};
60
+ directives[ prefix ][ suffix || 'default' ] = val;
61
+ }
62
+ } else if ( n === 'ref' ) {
63
+ continue;
64
+ }
65
+ props[ n ] = attributes[ i ].value;
66
+ }
67
+
68
+ if ( ignore && ! island )
69
+ return [
70
+ h( node.localName, {
71
+ ...props,
72
+ innerHTML: node.innerHTML,
73
+ __directives: { ignore: true },
74
+ } ),
75
+ ];
76
+ if ( island ) hydratedIslands.add( node );
77
+
78
+ if ( hasDirectives ) props.__directives = directives;
79
+
80
+ let child = treeWalker.firstChild();
81
+ if ( child ) {
82
+ while ( child ) {
83
+ const [ vnode, nextChild ] = walk( child );
84
+ if ( vnode ) children.push( vnode );
85
+ child = nextChild || treeWalker.nextSibling();
86
+ }
87
+ treeWalker.parentNode();
88
+ }
89
+
90
+ return [ h( node.localName, props, children ) ];
91
+ }
92
+
93
+ return walk( treeWalker.currentNode );
94
+ }
@@ -1,7 +1,14 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
5
+
1
6
  /**
2
7
  * Internal dependencies
3
8
  */
4
- import cleanEmptyObject from './clean-empty-object';
9
+ import { unlock } from '../private-apis';
10
+
11
+ const { cleanEmptyObject } = unlock( blockEditorPrivateApis );
5
12
 
6
13
  /**
7
14
  * Migrates the current style.typography.fontFamily attribute,
@@ -6,7 +6,7 @@ import {
6
6
  getEditorHtml,
7
7
  initializeEditor,
8
8
  getBlock,
9
- changeAndSelectTextOfRichText,
9
+ typeInRichText,
10
10
  fireEvent,
11
11
  } from 'test/helpers';
12
12
 
@@ -64,23 +64,18 @@ describe( 'Verse block', () => {
64
64
  const verseTextInput = await screen.findByPlaceholderText(
65
65
  'Write verse…'
66
66
  );
67
- const string = 'A great statement.';
68
- changeAndSelectTextOfRichText( verseTextInput, string, {
69
- selectionStart: string.length,
70
- selectionEnd: string.length,
71
- } );
67
+ typeInRichText( verseTextInput, 'A great statement.' );
72
68
  fireEvent( verseTextInput, 'onKeyDown', {
73
69
  nativeEvent: {},
74
70
  preventDefault() {},
75
71
  keyCode: ENTER,
76
72
  } );
77
-
78
- // TODO: Determine a way to type after pressing ENTER within the block.
73
+ typeInRichText( verseTextInput, 'Again' );
79
74
 
80
75
  // Assert
81
76
  expect( getEditorHtml() ).toMatchInlineSnapshot( `
82
77
  "<!-- wp:verse -->
83
- <pre class="wp-block-verse">A great statement.<br></pre>
78
+ <pre class="wp-block-verse">A great statement.<br>Again</pre>
84
79
  <!-- /wp:verse -->"
85
80
  ` );
86
81
  } );
@@ -172,7 +172,7 @@ class VideoEdit extends Component {
172
172
  return;
173
173
  }
174
174
 
175
- setAttributes( { id: url, src: url } );
175
+ setAttributes( { src: url, id: undefined, poster: undefined } );
176
176
  } else {
177
177
  createErrorNotice( __( 'Invalid URL.' ) );
178
178
  }
@@ -235,7 +235,7 @@ class VideoEdit extends Component {
235
235
  ></MediaUpload>
236
236
  );
237
237
 
238
- if ( ! id ) {
238
+ if ( ! src ) {
239
239
  return (
240
240
  <View style={ { flex: 1 } }>
241
241
  <MediaPlaceholder
package/tsconfig.json CHANGED
@@ -26,8 +26,10 @@
26
26
  { "path": "../html-entities" },
27
27
  { "path": "../i18n" },
28
28
  { "path": "../icons" },
29
+ { "path": "../notices" },
29
30
  { "path": "../keycodes" },
30
31
  { "path": "../primitives" },
32
+ { "path": "../rich-text" },
31
33
  { "path": "../url" },
32
34
  { "path": "../wordcount" }
33
35
  ],
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/table-of-contents/utils.ts","../element/node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/table-of-contents/list.tsx","../../typings/gutenberg-env/index.d.ts","../../node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"c19a5ece4a6877a6afa5e1a9608c3051f9da73e73bcc164386812ef6d5e5f227","signature":"e7b4b5c0a59ac1a764508530d412e75eb0c2867b35a7bc40aac5553b66db508c"},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"6fb72c65c5af8c4ed7d41afecd1ebb463d1e074291ae5e8a187d0922fd40f59b","ab6f9c23c44e0b20c2be80af46ffc9d0e6681efa05ee1704bb4c9fcef8e61497",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","c4b39848e2fb237507a7acae0b83a34271c9d72714faae6a6b9075527205111b","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff",{"version":"6a32e965fda149787817aefc75730a8d028cac8c8f15af547214e009c2c55172","signature":"d83c7f4886a9400a0f94be86990a33283bcb4ae54d7289f548c40a6842623dc7"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"strictNullChecks":true,"target":99},"fileIdsList":[[61],[58,59,60,75],[56,72],[62],[62,63,67,68,69,70,71],[65,66],[61,62],[57,58,59,60]],"referencedMap":[[66,1],[65,1],[64,2],[73,3],[63,4],[72,5],[71,1],[67,6],[62,1],[70,7],[61,8]],"exportedModulesMap":[[66,1],[65,1],[64,2],[73,3],[63,4],[72,5],[71,1],[67,6],[62,1],[70,7],[61,8]],"semanticDiagnosticsPerFile":[59,66,65,64,60,58,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,73,56,63,72,69,71,67,62,70,68,57,61,74],"latestChangedDtsFile":"./build-types/table-of-contents/list.d.ts"},"version":"4.9.5"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","./src/table-of-contents/utils.ts","../element/node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","./src/table-of-contents/list.tsx","../../typings/gutenberg-env/index.d.ts","../../node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},{"version":"c19a5ece4a6877a6afa5e1a9608c3051f9da73e73bcc164386812ef6d5e5f227","signature":"e7b4b5c0a59ac1a764508530d412e75eb0c2867b35a7bc40aac5553b66db508c"},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"14ed49cb68f29e36dfb562b7c382ce70d467b7310e8e27cc587772d029f372b7","ab6f9c23c44e0b20c2be80af46ffc9d0e6681efa05ee1704bb4c9fcef8e61497",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","c4b39848e2fb237507a7acae0b83a34271c9d72714faae6a6b9075527205111b","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff",{"version":"6a32e965fda149787817aefc75730a8d028cac8c8f15af547214e009c2c55172","signature":"d83c7f4886a9400a0f94be86990a33283bcb4ae54d7289f548c40a6842623dc7"},{"version":"084d8b571b1e8b984824263889aabc2c37d29b49f7cbab3e4ebd05e4c02891eb","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"rootDir":"./src","strict":true,"strictNullChecks":true,"target":99},"fileIdsList":[[61],[58,59,60,75],[56,72],[62],[62,63,67,68,69,70,71],[65,66],[61,62],[57,58,59,60]],"referencedMap":[[66,1],[65,1],[64,2],[73,3],[63,4],[72,5],[71,1],[67,6],[62,1],[70,7],[61,8]],"exportedModulesMap":[[66,1],[65,1],[64,2],[73,3],[63,4],[72,5],[71,1],[67,6],[62,1],[70,7],[61,8]],"semanticDiagnosticsPerFile":[59,66,65,64,60,58,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,73,56,63,72,69,71,67,62,70,68,57,61,74],"latestChangedDtsFile":"./build-types/table-of-contents/list.d.ts"},"version":"4.9.5"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _element = require("@wordpress/element");
9
-
10
- var _blockEditor = require("@wordpress/block-editor");
11
-
12
- var _i18n = require("@wordpress/i18n");
13
-
14
- var _primitives = require("@wordpress/primitives");
15
-
16
- /**
17
- * WordPress dependencies
18
- */
19
- const TEMPLATE = [['core/paragraph', {
20
- placeholder: (0, _i18n.__)('Add text or blocks that will display when the details block is opened.')
21
- }]];
22
-
23
- function DetailsContentEdit() {
24
- const blockProps = (0, _blockEditor.useBlockProps)();
25
- const innerBlocksProps = (0, _blockEditor.useInnerBlocksProps)(blockProps, {
26
- template: TEMPLATE,
27
- templateLock: false
28
- });
29
- return (0, _element.createElement)(_primitives.View, innerBlocksProps);
30
- }
31
-
32
- var _default = DetailsContentEdit;
33
- exports.default = _default;
34
- //# sourceMappingURL=edit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/details-content/edit.js"],"names":["TEMPLATE","placeholder","DetailsContentEdit","blockProps","innerBlocksProps","template","templateLock"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKA,MAAMA,QAAQ,GAAG,CAChB,CACC,gBADD,EAEC;AACCC,EAAAA,WAAW,EAAE,cACZ,wEADY;AADd,CAFD,CADgB,CAAjB;;AAWA,SAASC,kBAAT,GAA8B;AAC7B,QAAMC,UAAU,GAAG,iCAAnB;AACA,QAAMC,gBAAgB,GAAG,sCAAqBD,UAArB,EAAiC;AACzDE,IAAAA,QAAQ,EAAEL,QAD+C;AAEzDM,IAAAA,YAAY,EAAE;AAF2C,GAAjC,CAAzB;AAKA,SAAO,4BAAC,gBAAD,EAAWF,gBAAX,CAAP;AACA;;eAEcF,kB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { View } from '@wordpress/primitives';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/paragraph',\n\t\t{\n\t\t\tplaceholder: __(\n\t\t\t\t'Add text or blocks that will display when the details block is opened.'\n\t\t\t),\n\t\t},\n\t],\n];\n\nfunction DetailsContentEdit() {\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\ttemplateLock: false,\n\t} );\n\n\treturn <View { ...innerBlocksProps }></View>;\n}\n\nexport default DetailsContentEdit;\n"]}
@@ -1,94 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.settings = exports.name = exports.metadata = exports.init = void 0;
9
-
10
- var _icons = require("@wordpress/icons");
11
-
12
- var _initBlock = _interopRequireDefault(require("../utils/init-block"));
13
-
14
- var _edit = _interopRequireDefault(require("./edit"));
15
-
16
- var _save = _interopRequireDefault(require("./save"));
17
-
18
- /**
19
- * WordPress dependencies
20
- */
21
-
22
- /**
23
- * Internal dependencies
24
- */
25
- const metadata = {
26
- $schema: "https://schemas.wp.org/trunk/block.json",
27
- apiVersion: 2,
28
- __experimental: true,
29
- name: "core/details-content",
30
- title: "Details Content",
31
- category: "text",
32
- parent: ["core/details"],
33
- description: "Add content that may be shown or hidden via a Details block.",
34
- textdomain: "default",
35
- supports: {
36
- align: false,
37
- color: {
38
- gradients: true,
39
- link: true,
40
- __experimentalDefaultControls: {
41
- background: true,
42
- text: true,
43
- link: true
44
- }
45
- },
46
- __experimentalBorder: {
47
- radius: true,
48
- color: true,
49
- width: true,
50
- style: true
51
- },
52
- html: false,
53
- lock: false,
54
- multiple: false,
55
- reusable: false,
56
- spacing: {
57
- margin: true,
58
- padding: true
59
- },
60
- typography: {
61
- fontSize: true,
62
- lineHeight: true,
63
- __experimentalFontFamily: true,
64
- __experimentalFontWeight: true,
65
- __experimentalFontStyle: true,
66
- __experimentalTextTransform: true,
67
- __experimentalTextDecoration: true,
68
- __experimentalLetterSpacing: true,
69
- __experimentalDefaultControls: {
70
- fontSize: true
71
- }
72
- }
73
- }
74
- };
75
- exports.metadata = metadata;
76
- const {
77
- name
78
- } = metadata;
79
- exports.name = name;
80
- const settings = {
81
- icon: _icons.postContent,
82
- save: _save.default,
83
- edit: _edit.default
84
- };
85
- exports.settings = settings;
86
-
87
- const init = () => (0, _initBlock.default)({
88
- name,
89
- metadata,
90
- settings
91
- });
92
-
93
- exports.init = init;
94
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/details-content/index.js"],"names":["name","metadata","settings","icon","save","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,kBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB;;;AAMA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEN,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tsave,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = save;
7
-
8
- var _element = require("@wordpress/element");
9
-
10
- var _blockEditor = require("@wordpress/block-editor");
11
-
12
- /**
13
- * WordPress dependencies
14
- */
15
- function save() {
16
- const blockProps = _blockEditor.useBlockProps.save();
17
-
18
- return (0, _element.createElement)("div", blockProps, (0, _element.createElement)(_blockEditor.InnerBlocks.Content, null));
19
- }
20
- //# sourceMappingURL=save.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/details-content/save.js"],"names":["save","blockProps","useBlockProps"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAEe,SAASA,IAAT,GAAgB;AAC9B,QAAMC,UAAU,GAAGC,2BAAcF,IAAd,EAAnB;;AACA,SACC,mCAAUC,UAAV,EACC,4BAAC,wBAAD,CAAa,OAAb,OADD,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, InnerBlocks } from '@wordpress/block-editor';\nexport default function save() {\n\tconst blockProps = useBlockProps.save();\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<InnerBlocks.Content />\n\t\t</div>\n\t);\n}\n"]}
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _element = require("@wordpress/element");
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _blockEditor = require("@wordpress/block-editor");
15
-
16
- var _i18n = require("@wordpress/i18n");
17
-
18
- /**
19
- * WordPress dependencies
20
- */
21
- function DetailsSummaryEdit(_ref) {
22
- let {
23
- attributes,
24
- setAttributes
25
- } = _ref;
26
- const summary = attributes.summary ? attributes.summary : (0, _i18n.__)('Details');
27
- return (0, _element.createElement)("summary", (0, _extends2.default)({}, (0, _blockEditor.useBlockProps)(), {
28
- onClick: event => event.preventDefault()
29
- }), (0, _element.createElement)(_blockEditor.RichText, {
30
- "aria-label": (0, _i18n.__)('Add summary'),
31
- allowedFormats: [],
32
- withoutInteractiveFormatting: true,
33
- value: summary,
34
- onChange: newSummary => setAttributes({
35
- summary: newSummary
36
- })
37
- }));
38
- }
39
-
40
- var _default = DetailsSummaryEdit;
41
- exports.default = _default;
42
- //# sourceMappingURL=edit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/details-summary/edit.js"],"names":["DetailsSummaryEdit","attributes","setAttributes","summary","event","preventDefault","newSummary"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,SAASA,kBAAT,OAA6D;AAAA,MAAhC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GAAgC;AAC5D,QAAMC,OAAO,GAAGF,UAAU,CAACE,OAAX,GAAqBF,UAAU,CAACE,OAAhC,GAA0C,cAAI,SAAJ,CAA1D;AACA,SACC,kEACM,iCADN;AAEC,IAAA,OAAO,EAAKC,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,MAIC,4BAAC,qBAAD;AACC,kBAAa,cAAI,aAAJ,CADd;AAEC,IAAA,cAAc,EAAG,EAFlB;AAGC,IAAA,4BAA4B,MAH7B;AAIC,IAAA,KAAK,EAAGF,OAJT;AAKC,IAAA,QAAQ,EAAKG,UAAF,IACVJ,aAAa,CAAE;AAAEC,MAAAA,OAAO,EAAEG;AAAX,KAAF;AANf,IAJD,CADD;AAgBA;;eAEcN,kB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\nfunction DetailsSummaryEdit( { attributes, setAttributes } ) {\n\tconst summary = attributes.summary ? attributes.summary : __( 'Details' );\n\treturn (\n\t\t<summary\n\t\t\t{ ...useBlockProps() }\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t<RichText\n\t\t\t\taria-label={ __( 'Add summary' ) }\n\t\t\t\tallowedFormats={ [] }\n\t\t\t\twithoutInteractiveFormatting\n\t\t\t\tvalue={ summary }\n\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</summary>\n\t);\n}\n\nexport default DetailsSummaryEdit;\n"]}