@plone/volto 18.0.0-alpha.3 → 18.0.0-alpha.5

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 (349) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc +3 -3
  3. package/.prettierignore +8 -0
  4. package/.prettierrc +12 -0
  5. package/{packages/registry/.release-it.json → .release-it.json} +12 -6
  6. package/CHANGELOG.md +50 -4
  7. package/package.json +60 -127
  8. package/razzle.config.js +4 -7
  9. package/src/components/manage/Add/Add.jsx +6 -0
  10. package/src/components/manage/BlockChooser/BlockChooser.jsx +3 -1
  11. package/src/components/manage/BlockChooser/BlockChooserButton.jsx +5 -0
  12. package/src/components/manage/Blocks/Block/BlocksForm.jsx +4 -0
  13. package/src/components/manage/Blocks/Block/DefaultEdit.jsx +3 -1
  14. package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +5 -0
  15. package/src/components/manage/Blocks/Block/Settings.jsx +10 -1
  16. package/src/components/manage/Blocks/Container/Data.jsx +4 -1
  17. package/src/components/manage/Blocks/HeroImageLeft/Data.jsx +3 -1
  18. package/src/components/manage/Blocks/Image/ImageSidebar.jsx +4 -1
  19. package/src/components/manage/Blocks/Listing/ListingData.jsx +4 -1
  20. package/src/components/manage/Blocks/Maps/MapsSidebar.jsx +3 -1
  21. package/src/components/manage/Blocks/Search/SearchBlockEdit.jsx +4 -0
  22. package/src/components/manage/Blocks/Teaser/Data.jsx +4 -1
  23. package/src/components/manage/Blocks/ToC/Edit.jsx +2 -0
  24. package/src/components/manage/Blocks/Video/VideoSidebar.jsx +3 -1
  25. package/src/components/manage/Controlpanels/Users/UserGroupMembershipControlPanel.jsx +2 -2
  26. package/src/components/manage/Edit/Edit.jsx +1 -0
  27. package/src/components/manage/Form/Form.jsx +14 -3
  28. package/src/components/theme/Image/Image.jsx +4 -2
  29. package/src/components/theme/Image/Image.test.jsx +32 -0
  30. package/src/config/index.js +0 -4
  31. package/src/helpers/Blocks/Blocks.js +11 -2
  32. package/src/helpers/Extensions/withBlockSchemaEnhancer.js +20 -9
  33. package/src/helpers/Url/Url.js +5 -4
  34. package/src/helpers/Url/Url.test.js +52 -0
  35. package/src/icons/divide-horizontal.svg +0 -0
  36. package/src/icons/divide-vertical.svg +0 -0
  37. package/src/icons/hero.svg +0 -0
  38. package/src/icons/slider.svg +0 -0
  39. package/src/icons/summary.svg +0 -0
  40. package/src/middleware/api.js +1 -1
  41. package/theme/themes/default/elements/icon.overrides +0 -0
  42. package/theme/themes/default/globals/reset.overrides +0 -0
  43. package/theme/themes/default/globals/site.variables +0 -0
  44. package/theme/themes/default/modules/dropdown.overrides +0 -0
  45. package/theme/themes/default/modules/dropdown.variables +0 -0
  46. package/theme/themes/default/modules/modal.variables +0 -0
  47. package/theme/themes/default/modules/video.overrides +0 -0
  48. package/theme/themes/default/modules/video.variables +0 -0
  49. package/theme/themes/pastanaga/assets/fonts/icons.eot +0 -0
  50. package/theme/themes/pastanaga/assets/fonts/icons.svg +0 -0
  51. package/theme/themes/pastanaga/assets/fonts/icons.ttf +0 -0
  52. package/theme/themes/pastanaga/assets/fonts/icons.woff +0 -0
  53. package/theme/themes/pastanaga/globals/reset.overrides +0 -0
  54. package/theme/themes/pastanaga/globals/site.variables +0 -0
  55. package/theme/themes/pastanaga/modules/dropdown.variables +0 -0
  56. package/theme/themes/pastanaga/modules/modal.variables +0 -0
  57. package/theme/themes/pastanaga/modules/video.overrides +0 -0
  58. package/theme/themes/pastanaga/modules/video.variables +0 -0
  59. package/tsconfig.json +1 -4
  60. package/types/config/RichTextEditor/index.d.ts +5 -8
  61. package/types/helpers/AsyncConnect/index.d.ts +2 -2
  62. package/types/helpers/Extensions/withBlockSchemaEnhancer.d.ts +3 -1
  63. package/types/helpers/Url/Url.d.ts +3 -3
  64. package/types/icons/load-icons.d.ts +1 -1
  65. package/webpack-plugins/webpack-less-plugin.js +1 -0
  66. package/CODE_OF_CONDUCT.md +0 -13
  67. package/CONTRIBUTING.md +0 -7
  68. package/README.md +0 -154
  69. package/RELEASING.md +0 -73
  70. package/ROADMAP.md +0 -30
  71. package/SECURITY.md +0 -14
  72. package/apps/plone/node_modules/.bin/acorn +0 -17
  73. package/apps/plone/node_modules/.bin/addon +0 -17
  74. package/apps/plone/node_modules/.bin/autoprefixer +0 -17
  75. package/apps/plone/node_modules/.bin/browserslist +0 -17
  76. package/apps/plone/node_modules/.bin/build-storybook +0 -17
  77. package/apps/plone/node_modules/.bin/changelogupdater +0 -17
  78. package/apps/plone/node_modules/.bin/eslint +0 -17
  79. package/apps/plone/node_modules/.bin/eslint-config-prettier +0 -17
  80. package/apps/plone/node_modules/.bin/i18n +0 -17
  81. package/apps/plone/node_modules/.bin/jest +0 -17
  82. package/apps/plone/node_modules/.bin/lessc +0 -17
  83. package/apps/plone/node_modules/.bin/missdev +0 -17
  84. package/apps/plone/node_modules/.bin/prettier +0 -17
  85. package/apps/plone/node_modules/.bin/razzle +0 -17
  86. package/apps/plone/node_modules/.bin/server-test +0 -17
  87. package/apps/plone/node_modules/.bin/start-server-and-test +0 -17
  88. package/apps/plone/node_modules/.bin/start-storybook +0 -17
  89. package/apps/plone/node_modules/.bin/start-test +0 -17
  90. package/apps/plone/node_modules/.bin/storybook-server +0 -17
  91. package/apps/plone/node_modules/.bin/stylelint +0 -17
  92. package/apps/plone/node_modules/.bin/tlds +0 -17
  93. package/apps/plone/node_modules/.bin/ts-jest +0 -17
  94. package/apps/plone/node_modules/.bin/tsc +0 -17
  95. package/apps/plone/node_modules/.bin/tsserver +0 -17
  96. package/apps/plone/node_modules/.bin/uuid +0 -17
  97. package/apps/plone/node_modules/.bin/webpack +0 -17
  98. package/apps/plone/node_modules/.bin/webpack-dev-server +0 -17
  99. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/acorn +0 -17
  100. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/addon +0 -17
  101. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/browserslist +0 -17
  102. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/changelogupdater +0 -17
  103. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/eslint +0 -17
  104. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/eslint-config-prettier +0 -17
  105. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/i18n +0 -17
  106. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/prettier +0 -17
  107. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/release-it +0 -17
  108. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/stylelint +0 -17
  109. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/tsc +0 -17
  110. package/apps/plone/src/addons/volto-volto-project/node_modules/.bin/tsserver +0 -17
  111. package/logos/Logo.png +0 -0
  112. package/logos/VoltoLogoEra2-dark-mode.png +0 -0
  113. package/logos/VoltoLogoEra2.png +0 -0
  114. package/logos/volto-colorful.png +0 -0
  115. package/logos/volto-colorful.svg +0 -35
  116. package/logos/volto-guide.png +0 -0
  117. package/logos/volto-h-transparent.svg +0 -6
  118. package/logos/volto-transparent.png +0 -0
  119. package/logos/volto-transparent.svg +0 -19
  120. package/logos/volto-transparent2.svg +0 -5
  121. package/logos/volto-yellow.svg +0 -29
  122. package/logos/volto.sketch +0 -0
  123. package/packages/README.md +0 -7
  124. package/packages/registry/.towncrier/towncrier_template.jinja +0 -10
  125. package/packages/registry/CHANGELOG.md +0 -16
  126. package/packages/registry/README.md +0 -207
  127. package/packages/registry/addon-registry.js +0 -603
  128. package/packages/registry/create-addons-loader.js +0 -116
  129. package/packages/registry/create-theme-addons-loader.js +0 -78
  130. package/packages/registry/news/.gitkeep +0 -0
  131. package/packages/registry/node_modules/.bin/browserslist +0 -17
  132. package/packages/registry/node_modules/.bin/parcel +0 -17
  133. package/packages/registry/node_modules/.bin/release-it +0 -17
  134. package/packages/registry/node_modules/.bin/tsc +0 -17
  135. package/packages/registry/node_modules/.bin/tsserver +0 -17
  136. package/packages/registry/node_modules/.bin/vitest +0 -17
  137. package/packages/registry/package.json +0 -76
  138. package/packages/registry/src/index.ts +0 -174
  139. package/packages/registry/src/registry.test.js +0 -111
  140. package/packages/registry/tsconfig.json +0 -32
  141. package/packages/scripts/CHANGELOG.md +0 -173
  142. package/packages/scripts/README.md +0 -128
  143. package/packages/scripts/addon/consolidate.js +0 -28
  144. package/packages/scripts/addon/generators.js +0 -213
  145. package/packages/scripts/addon/getAddonInfo.js +0 -65
  146. package/packages/scripts/addon/index.js +0 -88
  147. package/packages/scripts/addon/utils.js +0 -44
  148. package/packages/scripts/backportpr.js +0 -75
  149. package/packages/scripts/changelogupdater.cjs +0 -94
  150. package/packages/scripts/corepackagebump.js +0 -20
  151. package/packages/scripts/i18n.cjs +0 -310
  152. package/packages/scripts/package.json +0 -76
  153. package/packages/scripts/templates/towncrier_template.jinja +0 -10
  154. package/packages/types/Blocks/View.ts +0 -11
  155. package/packages/types/actions.ts +0 -15
  156. package/packages/types/breadcrumbs.ts +0 -10
  157. package/packages/types/config/Blocks.ts +0 -153
  158. package/packages/types/config/Content.ts +0 -62
  159. package/packages/types/config/Settings.ts +0 -86
  160. package/packages/types/config/Views.ts +0 -15
  161. package/packages/types/config/Widgets.ts +0 -7
  162. package/packages/types/config/index.ts +0 -21
  163. package/packages/types/content/common.ts +0 -60
  164. package/packages/types/content/get.ts +0 -66
  165. package/packages/types/index.ts +0 -0
  166. package/packages/types/navigation.ts +0 -12
  167. package/packages/types/node_modules/.bin/browserslist +0 -17
  168. package/packages/types/node_modules/.bin/parcel +0 -17
  169. package/packages/types/node_modules/.bin/release-it +0 -17
  170. package/packages/types/node_modules/.bin/tsc +0 -17
  171. package/packages/types/node_modules/.bin/tsserver +0 -17
  172. package/packages/types/package.json +0 -64
  173. package/packages/types/types.ts +0 -61
  174. package/packages/volto-slate/.i18n.babel.config.js +0 -1
  175. package/packages/volto-slate/README.md +0 -4
  176. package/packages/volto-slate/build/messages/src/blocks/Table/TableBlockEdit.json +0 -90
  177. package/packages/volto-slate/build/messages/src/blocks/Text/DefaultTextBlockEditor.json +0 -6
  178. package/packages/volto-slate/build/messages/src/blocks/Text/DetachedTextBlockEditor.json +0 -6
  179. package/packages/volto-slate/build/messages/src/blocks/Text/SlashMenu.json +0 -6
  180. package/packages/volto-slate/build/messages/src/editor/plugins/AdvancedLink/index.json +0 -10
  181. package/packages/volto-slate/build/messages/src/editor/plugins/Link/index.json +0 -10
  182. package/packages/volto-slate/build/messages/src/editor/plugins/Table/index.json +0 -30
  183. package/packages/volto-slate/build/messages/src/elementEditor/messages.json +0 -10
  184. package/packages/volto-slate/build/messages/src/widgets/HtmlSlateWidget.json +0 -6
  185. package/packages/volto-slate/build/messages/src/widgets/RichTextWidgetView.json +0 -6
  186. package/packages/volto-slate/locales/de/LC_MESSAGES/volto.po +0 -148
  187. package/packages/volto-slate/locales/en/LC_MESSAGES/volto.po +0 -148
  188. package/packages/volto-slate/locales/volto.pot +0 -182
  189. package/packages/volto-slate/package.json +0 -43
  190. package/packages/volto-slate/src/actions/content.js +0 -30
  191. package/packages/volto-slate/src/actions/index.js +0 -3
  192. package/packages/volto-slate/src/actions/plugins.js +0 -9
  193. package/packages/volto-slate/src/actions/selection.js +0 -22
  194. package/packages/volto-slate/src/blocks/Table/Cell.jsx +0 -87
  195. package/packages/volto-slate/src/blocks/Table/Cell.test.js +0 -54
  196. package/packages/volto-slate/src/blocks/Table/TableBlockEdit.jsx +0 -694
  197. package/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js +0 -40
  198. package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +0 -150
  199. package/packages/volto-slate/src/blocks/Table/TableBlockView.test.js +0 -49
  200. package/packages/volto-slate/src/blocks/Table/deconstruct.js +0 -113
  201. package/packages/volto-slate/src/blocks/Table/extensions/normalizeTable.js +0 -5
  202. package/packages/volto-slate/src/blocks/Table/index.js +0 -60
  203. package/packages/volto-slate/src/blocks/Table/schema.js +0 -122
  204. package/packages/volto-slate/src/blocks/Text/DefaultTextBlockEditor.jsx +0 -304
  205. package/packages/volto-slate/src/blocks/Text/DetachedTextBlockEditor.jsx +0 -77
  206. package/packages/volto-slate/src/blocks/Text/MarkdownIntroduction.jsx +0 -59
  207. package/packages/volto-slate/src/blocks/Text/PluginSidebar.jsx +0 -18
  208. package/packages/volto-slate/src/blocks/Text/ShortcutListing.jsx +0 -28
  209. package/packages/volto-slate/src/blocks/Text/SlashMenu.jsx +0 -203
  210. package/packages/volto-slate/src/blocks/Text/TextBlockEdit.jsx +0 -38
  211. package/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js +0 -107
  212. package/packages/volto-slate/src/blocks/Text/TextBlockSchema.js +0 -54
  213. package/packages/volto-slate/src/blocks/Text/TextBlockView.jsx +0 -31
  214. package/packages/volto-slate/src/blocks/Text/css/editor.css +0 -18
  215. package/packages/volto-slate/src/blocks/Text/extensions/Readme.md +0 -49
  216. package/packages/volto-slate/src/blocks/Text/extensions/breakList.js +0 -100
  217. package/packages/volto-slate/src/blocks/Text/extensions/index.js +0 -6
  218. package/packages/volto-slate/src/blocks/Text/extensions/insertBreak.js +0 -57
  219. package/packages/volto-slate/src/blocks/Text/extensions/isSelected.js +0 -7
  220. package/packages/volto-slate/src/blocks/Text/extensions/normalizeExternalData.js +0 -7
  221. package/packages/volto-slate/src/blocks/Text/extensions/withDeserializers.js +0 -87
  222. package/packages/volto-slate/src/blocks/Text/extensions/withLists.js +0 -5
  223. package/packages/volto-slate/src/blocks/Text/index.js +0 -171
  224. package/packages/volto-slate/src/blocks/Text/keyboard/backspaceInList.js +0 -58
  225. package/packages/volto-slate/src/blocks/Text/keyboard/breakBlocks.js +0 -3
  226. package/packages/volto-slate/src/blocks/Text/keyboard/cancelEsc.js +0 -7
  227. package/packages/volto-slate/src/blocks/Text/keyboard/indentListItems.js +0 -240
  228. package/packages/volto-slate/src/blocks/Text/keyboard/index.js +0 -52
  229. package/packages/volto-slate/src/blocks/Text/keyboard/joinBlocks.js +0 -180
  230. package/packages/volto-slate/src/blocks/Text/keyboard/moveListItems.js +0 -124
  231. package/packages/volto-slate/src/blocks/Text/keyboard/slashMenu.js +0 -19
  232. package/packages/volto-slate/src/blocks/Text/keyboard/softBreak.js +0 -7
  233. package/packages/volto-slate/src/blocks/Text/keyboard/traverseBlocks.js +0 -81
  234. package/packages/volto-slate/src/blocks/Text/keyboard/unwrapEmptyString.js +0 -26
  235. package/packages/volto-slate/src/blocks/Text/schema.js +0 -39
  236. package/packages/volto-slate/src/constants.js +0 -123
  237. package/packages/volto-slate/src/editor/EditorContext.jsx +0 -5
  238. package/packages/volto-slate/src/editor/EditorReference.jsx +0 -22
  239. package/packages/volto-slate/src/editor/SlateEditor.jsx +0 -375
  240. package/packages/volto-slate/src/editor/config.jsx +0 -344
  241. package/packages/volto-slate/src/editor/decorate.js +0 -68
  242. package/packages/volto-slate/src/editor/deserialize.js +0 -185
  243. package/packages/volto-slate/src/editor/extensions/index.js +0 -6
  244. package/packages/volto-slate/src/editor/extensions/insertBreak.js +0 -15
  245. package/packages/volto-slate/src/editor/extensions/insertData.js +0 -159
  246. package/packages/volto-slate/src/editor/extensions/isInline.js +0 -14
  247. package/packages/volto-slate/src/editor/extensions/normalizeExternalData.js +0 -8
  248. package/packages/volto-slate/src/editor/extensions/normalizeNode.js +0 -48
  249. package/packages/volto-slate/src/editor/extensions/withDeserializers.js +0 -15
  250. package/packages/volto-slate/src/editor/extensions/withTestingFeatures.jsx +0 -84
  251. package/packages/volto-slate/src/editor/index.js +0 -14
  252. package/packages/volto-slate/src/editor/less/editor.less +0 -173
  253. package/packages/volto-slate/src/editor/less/globals.less +0 -18
  254. package/packages/volto-slate/src/editor/less/slate.less +0 -28
  255. package/packages/volto-slate/src/editor/plugins/AdvancedLink/deserialize.js +0 -90
  256. package/packages/volto-slate/src/editor/plugins/AdvancedLink/extensions.js +0 -32
  257. package/packages/volto-slate/src/editor/plugins/AdvancedLink/index.js +0 -50
  258. package/packages/volto-slate/src/editor/plugins/AdvancedLink/render.jsx +0 -37
  259. package/packages/volto-slate/src/editor/plugins/AdvancedLink/schema.js +0 -114
  260. package/packages/volto-slate/src/editor/plugins/AdvancedLink/styles.less +0 -8
  261. package/packages/volto-slate/src/editor/plugins/Blockquote/index.js +0 -30
  262. package/packages/volto-slate/src/editor/plugins/Callout/index.js +0 -34
  263. package/packages/volto-slate/src/editor/plugins/Image/deconstruct.js +0 -30
  264. package/packages/volto-slate/src/editor/plugins/Image/extensions.js +0 -51
  265. package/packages/volto-slate/src/editor/plugins/Image/index.js +0 -11
  266. package/packages/volto-slate/src/editor/plugins/Image/render.jsx +0 -22
  267. package/packages/volto-slate/src/editor/plugins/Link/extensions.js +0 -58
  268. package/packages/volto-slate/src/editor/plugins/Link/index.js +0 -164
  269. package/packages/volto-slate/src/editor/plugins/Link/render.jsx +0 -54
  270. package/packages/volto-slate/src/editor/plugins/Markdown/constants.js +0 -81
  271. package/packages/volto-slate/src/editor/plugins/Markdown/extensions.js +0 -334
  272. package/packages/volto-slate/src/editor/plugins/Markdown/index.js +0 -28
  273. package/packages/volto-slate/src/editor/plugins/Markdown/utils.js +0 -198
  274. package/packages/volto-slate/src/editor/plugins/StyleMenu/StyleMenu.jsx +0 -153
  275. package/packages/volto-slate/src/editor/plugins/StyleMenu/index.js +0 -19
  276. package/packages/volto-slate/src/editor/plugins/StyleMenu/style.less +0 -29
  277. package/packages/volto-slate/src/editor/plugins/StyleMenu/utils.js +0 -168
  278. package/packages/volto-slate/src/editor/plugins/Table/TableButton.jsx +0 -142
  279. package/packages/volto-slate/src/editor/plugins/Table/TableCell.jsx +0 -44
  280. package/packages/volto-slate/src/editor/plugins/Table/TableContainer.jsx +0 -37
  281. package/packages/volto-slate/src/editor/plugins/Table/TableSizePicker.jsx +0 -83
  282. package/packages/volto-slate/src/editor/plugins/Table/extensions.js +0 -87
  283. package/packages/volto-slate/src/editor/plugins/Table/index.js +0 -390
  284. package/packages/volto-slate/src/editor/plugins/Table/less/public.less +0 -29
  285. package/packages/volto-slate/src/editor/plugins/Table/less/table.less +0 -28
  286. package/packages/volto-slate/src/editor/plugins/Table/render.jsx +0 -30
  287. package/packages/volto-slate/src/editor/plugins/index.js +0 -19
  288. package/packages/volto-slate/src/editor/render.jsx +0 -224
  289. package/packages/volto-slate/src/editor/ui/BasicToolbar.jsx +0 -11
  290. package/packages/volto-slate/src/editor/ui/BlockButton.jsx +0 -31
  291. package/packages/volto-slate/src/editor/ui/ClearFormattingButton.jsx +0 -21
  292. package/packages/volto-slate/src/editor/ui/ExpandedToolbar.jsx +0 -18
  293. package/packages/volto-slate/src/editor/ui/Expando.jsx +0 -5
  294. package/packages/volto-slate/src/editor/ui/InlineToolbar.jsx +0 -73
  295. package/packages/volto-slate/src/editor/ui/MarkButton.jsx +0 -23
  296. package/packages/volto-slate/src/editor/ui/MarkElementButton.jsx +0 -30
  297. package/packages/volto-slate/src/editor/ui/Menu.jsx +0 -13
  298. package/packages/volto-slate/src/editor/ui/PositionedToolbar.jsx +0 -32
  299. package/packages/volto-slate/src/editor/ui/Separator.jsx +0 -7
  300. package/packages/volto-slate/src/editor/ui/SlateContextToolbar.jsx +0 -13
  301. package/packages/volto-slate/src/editor/ui/SlateToolbar.jsx +0 -96
  302. package/packages/volto-slate/src/editor/ui/Toolbar.jsx +0 -103
  303. package/packages/volto-slate/src/editor/ui/ToolbarButton.jsx +0 -33
  304. package/packages/volto-slate/src/editor/ui/ToolbarButton.test.js +0 -25
  305. package/packages/volto-slate/src/editor/ui/index.js +0 -15
  306. package/packages/volto-slate/src/editor/utils.js +0 -248
  307. package/packages/volto-slate/src/elementEditor/ContextButtons.jsx +0 -56
  308. package/packages/volto-slate/src/elementEditor/PluginEditor.jsx +0 -124
  309. package/packages/volto-slate/src/elementEditor/Readme.md +0 -6
  310. package/packages/volto-slate/src/elementEditor/SchemaProvider.jsx +0 -3
  311. package/packages/volto-slate/src/elementEditor/SidebarEditor.jsx +0 -46
  312. package/packages/volto-slate/src/elementEditor/ToolbarButton.jsx +0 -44
  313. package/packages/volto-slate/src/elementEditor/index.js +0 -5
  314. package/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js +0 -100
  315. package/packages/volto-slate/src/elementEditor/messages.js +0 -14
  316. package/packages/volto-slate/src/elementEditor/utils.js +0 -226
  317. package/packages/volto-slate/src/hooks/index.js +0 -3
  318. package/packages/volto-slate/src/hooks/useEditorContext.js +0 -6
  319. package/packages/volto-slate/src/hooks/useIsomorphicLayoutEffect.js +0 -7
  320. package/packages/volto-slate/src/hooks/useSelectionPosition.js +0 -25
  321. package/packages/volto-slate/src/i18n.js +0 -180
  322. package/packages/volto-slate/src/icons/hashlink.svg +0 -57
  323. package/packages/volto-slate/src/index.js +0 -61
  324. package/packages/volto-slate/src/reducers/content.js +0 -74
  325. package/packages/volto-slate/src/reducers/index.js +0 -3
  326. package/packages/volto-slate/src/reducers/plugins.js +0 -17
  327. package/packages/volto-slate/src/reducers/selection.js +0 -16
  328. package/packages/volto-slate/src/utils/blocks.js +0 -375
  329. package/packages/volto-slate/src/utils/blocks.test.js +0 -138
  330. package/packages/volto-slate/src/utils/editor.js +0 -31
  331. package/packages/volto-slate/src/utils/image.js +0 -25
  332. package/packages/volto-slate/src/utils/index.js +0 -11
  333. package/packages/volto-slate/src/utils/internals.js +0 -46
  334. package/packages/volto-slate/src/utils/lists.js +0 -92
  335. package/packages/volto-slate/src/utils/marks.js +0 -104
  336. package/packages/volto-slate/src/utils/mime-types.js +0 -24
  337. package/packages/volto-slate/src/utils/nodes.js +0 -4
  338. package/packages/volto-slate/src/utils/ops.js +0 -20
  339. package/packages/volto-slate/src/utils/random.js +0 -17
  340. package/packages/volto-slate/src/utils/selection.js +0 -236
  341. package/packages/volto-slate/src/utils/slate-string-utils.js +0 -408
  342. package/packages/volto-slate/src/utils/volto-blocks.js +0 -314
  343. package/packages/volto-slate/src/widgets/ErrorBoundary.jsx +0 -27
  344. package/packages/volto-slate/src/widgets/HtmlSlateWidget.jsx +0 -139
  345. package/packages/volto-slate/src/widgets/ObjectByTypeWidget.jsx +0 -49
  346. package/packages/volto-slate/src/widgets/RichTextWidget.jsx +0 -72
  347. package/packages/volto-slate/src/widgets/RichTextWidgetView.jsx +0 -37
  348. package/packages/volto-slate/src/widgets/style.css +0 -21
  349. package/types/components/manage/Blocks/Video/Body.test.d.ts +0 -1
@@ -1,61 +0,0 @@
1
- import * as slateReducers from './reducers';
2
-
3
- import installSlate from './editor';
4
- import installTextBlock from './blocks/Text';
5
- import installTableBlock from './blocks/Table';
6
- import RichTextWidget from './widgets/RichTextWidget';
7
- import RichTextWidgetView from './widgets/RichTextWidgetView';
8
- import HtmlSlateWidget from './widgets/HtmlSlateWidget';
9
- import ObjectByTypeWidget from './widgets/ObjectByTypeWidget';
10
-
11
- export default function applyConfig(config) {
12
- config = [installSlate, installTextBlock, installTableBlock].reduce(
13
- (acc, apply) => apply(acc),
14
- config,
15
- );
16
-
17
- config.settings.defaultBlockType = 'slate';
18
-
19
- config.settings.slate.toolbarButtons = [
20
- 'bold',
21
- 'italic',
22
- 'strikethrough',
23
- 'link',
24
- 'separator',
25
- 'heading-two',
26
- 'heading-three',
27
- 'separator',
28
- 'sub',
29
- 'sup',
30
- 'separator',
31
- 'numbered-list',
32
- 'bulleted-list',
33
- 'blockquote',
34
- 'styleMenu',
35
- ];
36
-
37
- config.settings.slate.scrollIntoView = false;
38
-
39
- config.addonReducers = {
40
- ...config.addonReducers,
41
- ...slateReducers,
42
- };
43
-
44
- config.views = {
45
- ...config.views,
46
- };
47
-
48
- config.widgets.widget.slate = RichTextWidget;
49
- config.widgets.widget.slate_richtext = RichTextWidget;
50
- config.widgets.widget.slate_html = HtmlSlateWidget;
51
- config.widgets.widget.richtext = HtmlSlateWidget;
52
- config.widgets.widget.object_by_type = ObjectByTypeWidget;
53
-
54
- // volto-widgets-view
55
- if (config.widgets.views?.widget) {
56
- config.widgets.views.widget.slate = RichTextWidgetView;
57
- config.widgets.views.widget.slate_richtext = RichTextWidgetView;
58
- }
59
-
60
- return config;
61
- }
@@ -1,74 +0,0 @@
1
- /**
2
- * Upload reducer.
3
- * @module reducers/content
4
- *
5
- * Customized copy of Volto's content reducer
6
- */
7
-
8
- import config from '@plone/volto/registry';
9
-
10
- import { UPLOAD_CONTENT } from '@plone/volto-slate/constants';
11
-
12
- const initialState = {};
13
-
14
- /**
15
- * Content reducer.
16
- * @function content
17
- * @param {Object} state Current state.
18
- * @param {Object} action Action to be handled.
19
- * @returns {Object} New state.
20
- */
21
- export default function upload_content(state = initialState, action = {}) {
22
- let { result, origin } = action;
23
- switch (action.type) {
24
- case `${UPLOAD_CONTENT}_PENDING`:
25
- return {
26
- ...state,
27
- [origin]: {
28
- ...state[origin],
29
- upload: {
30
- loading: true,
31
- loaded: false,
32
- error: null,
33
- },
34
- },
35
- };
36
- case `${UPLOAD_CONTENT}_SUCCESS`:
37
- return {
38
- ...state,
39
- [origin]: {
40
- ...state[origin],
41
- data: {
42
- ...result,
43
- items:
44
- action.result &&
45
- action.result.items &&
46
- action.result.items.map((item) => ({
47
- ...item,
48
- url: item['@id'].replace(config.settings.apiPath, ''),
49
- })),
50
- },
51
- upload: {
52
- loading: false,
53
- loaded: true,
54
- error: null,
55
- },
56
- },
57
- };
58
- case `${UPLOAD_CONTENT}_FAIL`:
59
- return {
60
- ...state,
61
- [origin]: {
62
- ...state[origin],
63
- data: null,
64
- upload: {
65
- loading: false,
66
- loaded: false,
67
- error: action.error,
68
- },
69
- },
70
- };
71
- default:
72
- return state;
73
- }
74
- }
@@ -1,3 +0,0 @@
1
- export { default as slate_block_selections } from './selection';
2
- export { default as upload_content } from './content';
3
- export { default as slate_plugins } from './plugins';
@@ -1,17 +0,0 @@
1
- const initialState = {};
2
-
3
- export default function slate_plugins(state = initialState, action = {}) {
4
- const { type, pluginId, ...rest } = action;
5
- switch (type) {
6
- case 'SLATE_PLUGINS':
7
- return {
8
- ...state,
9
- [pluginId]: {
10
- ...state[pluginId],
11
- ...rest,
12
- },
13
- };
14
- default:
15
- return state;
16
- }
17
- }
@@ -1,16 +0,0 @@
1
- const initialState = {};
2
-
3
- export default function slate_block_selections(
4
- state = initialState,
5
- action = {},
6
- ) {
7
- switch (action.type) {
8
- case 'SAVE_SLATE_BLOCK_SELECTION':
9
- return {
10
- ...state,
11
- [action.blockid]: action.selection,
12
- };
13
- default:
14
- return state;
15
- }
16
- }
@@ -1,375 +0,0 @@
1
- /* eslint no-console: ["error", { allow: ["error", "warn"] }] */
2
- import { Editor, Transforms, Text } from 'slate'; // Range, RangeRef
3
- import config from '@plone/volto/registry';
4
- import {
5
- getBlocksFieldname,
6
- getBlocksLayoutFieldname,
7
- } from '@plone/volto/helpers';
8
- import _ from 'lodash';
9
- import { makeEditor } from './editor';
10
-
11
- // case sensitive; first in an inner array is the default and preffered format
12
- // in that array of formats
13
- const formatAliases = [
14
- ['strong', 'b'],
15
- ['em', 'i'],
16
- ['del', 's'],
17
- ];
18
-
19
- /**
20
- * Excerpt from Slate documentation, kept here for posterity:
21
- * See https://docs.slatejs.org/concepts/11-normalizing#built-in-constraints
22
-
23
- ## Built-in Constraints
24
-
25
- Slate editors come with a few built-in constraints out of the box. These
26
- constraints are there to make working with content much more predictable than
27
- standard contenteditable. All of the built-in logic in Slate depends on these
28
- constraints, so unfortunately you cannot omit them. They are...
29
-
30
- - All Element nodes must contain at least one Text descendant. If an element node
31
- does not contain any children, an empty text node will be added as its only
32
- child. This constraint exists to ensure that the selection's anchor and focus
33
- points (which rely on referencing text nodes) can always be placed inside any
34
- node. With this, empty elements (or void elements) wouldn't be selectable.
35
-
36
- - Two adjacent texts with the same custom properties will be merged. If two
37
- adjacent text nodes have the same formatting, they're merged into a single text
38
- node with a combined text string of the two. This exists to prevent the text
39
- nodes from only ever expanding in count in the document, since both adding and
40
- removing formatting results in splitting text nodes.
41
-
42
- - Block nodes can only contain other blocks, or inline and text nodes. For
43
- example, a paragraph block cannot have another paragraph block element and
44
- a link inline element as children at the same time. The type of children
45
- allowed is determined by the first child, and any other non-conforming children
46
- are removed. This ensures that common richtext behaviors like "splitting
47
- a block in two" function consistently.
48
-
49
- - Inline nodes cannot be the first or last child of a parent block, nor can it
50
- be next to another inline node in the children array. If this is the case, an
51
- empty text node will be added to correct this to be in compliance with the
52
- constraint.
53
-
54
- - The top-level editor node can only contain block nodes. If any of the
55
- top-level children are inline or text nodes they will be removed. This ensures
56
- that there are always block nodes in the editor so that behaviors like
57
- "splitting a block in two" work as expected.
58
-
59
- - These default constraints are all mandated because they make working with
60
- Slate documents much more predictable.
61
-
62
- Although these constraints are the best we've come up with now, we're always
63
- looking for ways to have Slate's built-in constraints be less constraining if
64
- possible—as long as it keeps standard behaviors easy to reason about. If you
65
- come up with a way to reduce or remove a built-in constraint with a different
66
- approach, we're all ears!
67
- *
68
- */
69
-
70
- export const normalizeExternalData = (editor, nodes) => {
71
- let fakeEditor = makeEditor({ extensions: editor._installedPlugins });
72
- fakeEditor.children = nodes;
73
- // put all the non-blocks (e.g. images which are inline Elements) inside p-s
74
- Editor.withoutNormalizing(fakeEditor, () => {
75
- //for htmlSlateWidget compatibility
76
- if (nodes && !Editor.isBlock(fakeEditor, nodes[0]))
77
- Transforms.wrapNodes(
78
- fakeEditor,
79
- { type: 'p' },
80
- {
81
- at: [],
82
- match: (node, path) =>
83
- (!Editor.isEditor(node) && !Editor.isBlock(fakeEditor, node)) ||
84
- fakeEditor.isInline(node),
85
- mode: 'highest',
86
- },
87
- );
88
- });
89
-
90
- Editor.normalize(fakeEditor, { force: true });
91
-
92
- return fakeEditor.children;
93
- };
94
-
95
- /**
96
- * Is it text? Is it whitespace (space, newlines, tabs) ?
97
- *
98
- */
99
- export const isWhitespace = (c) => {
100
- return (
101
- typeof c === 'string' &&
102
- c.replace(/\s/g, '').replace(/\t/g, '').replace(/\n/g, '').length === 0
103
- );
104
- };
105
-
106
- export function createDefaultBlock(children) {
107
- return {
108
- type: config.settings.slate.defaultBlockType,
109
- children: children || [{ text: '' }],
110
- };
111
- }
112
-
113
- export function createBlock(type, children) {
114
- return {
115
- type,
116
- children: children || [{ text: '' }],
117
- };
118
- }
119
-
120
- export function createEmptyParagraph() {
121
- // TODO: rename to createEmptyBlock
122
- return {
123
- type: config.settings.slate.defaultBlockType,
124
- children: [{ text: '' }],
125
- };
126
- }
127
-
128
- export function createParagraph(text) {
129
- return {
130
- type: config.settings.slate.defaultBlockType,
131
- children: [{ text }],
132
- };
133
- }
134
-
135
- export const isSingleBlockTypeActive = (editor, format) => {
136
- const [match] = Editor.nodes(editor, {
137
- match: (n) => n.type === format,
138
- });
139
-
140
- return !!match;
141
- };
142
-
143
- export const isBlockActive = (editor, format) => {
144
- const aliasList = _.find(formatAliases, (x) => _.includes(x, format));
145
-
146
- if (aliasList) {
147
- const aliasFound = _.some(aliasList, (y) => {
148
- return isSingleBlockTypeActive(editor, y);
149
- });
150
-
151
- if (aliasFound) {
152
- return true;
153
- }
154
- }
155
-
156
- return isSingleBlockTypeActive(editor, format);
157
- };
158
-
159
- export const getBlockTypeContextData = (editor, format) => {
160
- let isActive, defaultFormat, matcher;
161
-
162
- const aliasList = _.find(formatAliases, (x) => _.includes(x, format));
163
-
164
- if (aliasList) {
165
- const aliasFound = _.some(aliasList, (y) => {
166
- return isSingleBlockTypeActive(editor, y);
167
- });
168
-
169
- if (aliasFound) {
170
- isActive = true;
171
- defaultFormat = _.first(aliasList);
172
- matcher = (n) => _.includes(aliasList, n.type);
173
-
174
- return { isActive, defaultFormat, matcher };
175
- }
176
- }
177
-
178
- isActive = isBlockActive(editor, format);
179
- defaultFormat = format;
180
- matcher = (n) => n.type === format;
181
-
182
- return { isActive, defaultFormat, matcher };
183
- };
184
-
185
- export const toggleInlineFormat = (editor, format) => {
186
- const { isActive, defaultFormat, matcher } = getBlockTypeContextData(
187
- editor,
188
- format,
189
- );
190
-
191
- if (isActive) {
192
- const rangeRef = Editor.rangeRef(editor, editor.selection);
193
-
194
- Transforms.unwrapNodes(editor, {
195
- match: matcher,
196
- split: false,
197
- });
198
-
199
- const newSel = JSON.parse(JSON.stringify(rangeRef.current));
200
-
201
- Transforms.select(editor, newSel);
202
- editor.setSavedSelection(newSel);
203
- // editor.savedSelection = newSel;
204
- return;
205
- }
206
-
207
- const exclusiveElements = config.settings.slate.exclusiveElements;
208
- const matchedElements = exclusiveTags(exclusiveElements, format);
209
- let alreadyOneIsActive =
210
- !!matchedElements &&
211
- (matchedElements.indexOf(format) === 0
212
- ? isBlockActive(editor, matchedElements[1])
213
- : isBlockActive(editor, matchedElements[0]));
214
-
215
- if (alreadyOneIsActive) {
216
- Transforms.unwrapNodes(editor, {
217
- match: (n) => matchedElements.includes(n.type),
218
- split: false,
219
- });
220
-
221
- const block = { type: format, children: [] };
222
- Transforms.wrapNodes(editor, block, { split: true });
223
- return;
224
- }
225
-
226
- // `children` property is added automatically as an empty array then
227
- // normalized
228
- const block = { type: defaultFormat };
229
- Transforms.wrapNodes(editor, block, { split: true });
230
- };
231
-
232
- const exclusiveTags = (exclusiveElements, format) => {
233
- let elements = null;
234
- for (const item of exclusiveElements) {
235
- if (item.includes(format)) {
236
- elements = item;
237
- break;
238
- }
239
- }
240
-
241
- return elements;
242
- };
243
-
244
- export const toggleBlock = (editor, format, allowedChildren) => {
245
- // We have 6 boolean variables which need to be accounted for.
246
- // See https://docs.google.com/spreadsheets/d/1mVeMuqSTMABV2BhoHPrPAFjn7zUksbNgZ9AQK_dcd3U/edit?usp=sharing
247
- const { slate } = config.settings;
248
- const { listTypes } = slate;
249
-
250
- const isListItem = isBlockActive(editor, slate.listItemType);
251
- const isActive = isBlockActive(editor, format);
252
- const wantsList = listTypes.includes(format);
253
-
254
- if (isListItem && !wantsList) {
255
- toggleFormatAsListItem(editor, format);
256
- } else if (isListItem && wantsList && !isActive) {
257
- switchListType(editor, format);
258
- } else if (!isListItem && wantsList) {
259
- changeBlockToList(editor, format);
260
- } else if (!isListItem && !wantsList) {
261
- toggleFormat(editor, format, allowedChildren);
262
- } else if (isListItem && wantsList && isActive) {
263
- clearFormatting(editor);
264
- } else {
265
- console.warn('toggleBlock case not covered, please examine:', {
266
- wantsList,
267
- isActive,
268
- isListItem,
269
- });
270
- }
271
- };
272
-
273
- /*
274
- * Applies a block format to a list item. Will split the list
275
- */
276
- export const toggleFormatAsListItem = (editor, format) => {
277
- Transforms.setNodes(editor, {
278
- type: format,
279
- });
280
-
281
- Editor.normalize(editor);
282
- };
283
-
284
- /*
285
- * Toggles between list types by exploding the block
286
- */
287
- export const switchListType = (editor, format) => {
288
- const { slate } = config.settings;
289
- Transforms.unwrapNodes(editor, {
290
- match: (n) => slate.listTypes.includes(n.type),
291
- split: true,
292
- });
293
- const block = { type: format, children: [] };
294
- Transforms.wrapNodes(editor, block);
295
- };
296
-
297
- export const changeBlockToList = (editor, format) => {
298
- const { slate } = config.settings;
299
- const [match] = Editor.nodes(editor, {
300
- match: (n) => n.type === slate.listItemType,
301
- });
302
-
303
- if (!match) {
304
- Transforms.setNodes(editor, {
305
- type: slate.listItemType,
306
- // id: nanoid(8),
307
- });
308
- }
309
-
310
- // `children` property is added automatically as an empty array then
311
- // normalized
312
- const block = { type: format };
313
- Transforms.wrapNodes(editor, block);
314
- };
315
-
316
- export const toggleFormat = (editor, format, allowedChildren) => {
317
- const { slate } = config.settings;
318
- const isActive = isBlockActive(editor, format);
319
- const type = isActive ? slate.defaultBlockType : format;
320
- Transforms.setNodes(editor, {
321
- type,
322
- });
323
- allowedChildren?.length &&
324
- Transforms.unwrapNodes(editor, {
325
- mode: 'all',
326
- at: [0],
327
- match: (n, path) => {
328
- const isMatch =
329
- path.length > 1 && // we don't deal with the parent nodes
330
- !(Text.isText(n) || allowedChildren.includes(n?.type));
331
- return isMatch;
332
- },
333
- });
334
- };
335
-
336
- /**
337
- * @param {object} properties A prop received by the View component
338
- * which is read by the `getBlocksFieldname` and
339
- * `getBlocksLayoutFieldname` Volto helpers to produce the return value.
340
- * @returns {Array} All the blocks data taken from the Volto form.
341
- */
342
- export const getAllBlocks = (properties, blocks) => {
343
- const blocksFieldName = getBlocksFieldname(properties);
344
- const blocksLayoutFieldname = getBlocksLayoutFieldname(properties);
345
-
346
- for (const n of properties?.[blocksLayoutFieldname]?.items || []) {
347
- const block = properties[blocksFieldName][n];
348
- // TODO Make this configurable via block config getBlocks
349
- if (
350
- block?.data?.[blocksLayoutFieldname] &&
351
- block?.data?.[blocksFieldName]
352
- ) {
353
- getAllBlocks(block.data, blocks);
354
- } else if (block?.[blocksLayoutFieldname] && block?.[blocksFieldName]) {
355
- getAllBlocks(block, blocks);
356
- }
357
- blocks.push({
358
- id: n,
359
- ...block,
360
- });
361
- }
362
- return blocks;
363
- };
364
-
365
- export const clearFormatting = (editor) => {
366
- const { slate } = config.settings;
367
- Transforms.setNodes(editor, {
368
- type: slate.defaultBlockType,
369
- });
370
- Transforms.unwrapNodes(editor, {
371
- match: (n) => n.type && n.type !== slate.defaultBlockType,
372
- mode: 'all',
373
- split: false,
374
- });
375
- };
@@ -1,138 +0,0 @@
1
- import { getAllBlocks } from './blocks';
2
-
3
- describe('Blocks utils', () => {
4
- describe('Get all blocks', () => {
5
- it('Basic empty test', () => {
6
- const metadata = {};
7
- const blocks = getAllBlocks(metadata, []);
8
- expect(blocks).toEqual([]);
9
- });
10
-
11
- it('Empty blocks', () => {
12
- const metadata = {
13
- blocks: {},
14
- blocks_layout: {},
15
- };
16
- const blocks = getAllBlocks(metadata, []);
17
- expect(blocks).toEqual([]);
18
- });
19
-
20
- it('Empty blocks with items', () => {
21
- const metadata = {
22
- blocks: {},
23
- blocks_layout: { items: [] },
24
- };
25
- const blocks = getAllBlocks(metadata, []);
26
- expect(blocks).toEqual([]);
27
- });
28
-
29
- it('One level of blocks', () => {
30
- const metadata = {
31
- blocks: { a: {} },
32
- blocks_layout: { items: ['a'] },
33
- };
34
- const blocks = getAllBlocks(metadata, []);
35
- expect(blocks).toEqual([{ id: 'a' }]);
36
- });
37
-
38
- it('Two level of blocks w/o data', () => {
39
- const metadata = {
40
- blocks: {
41
- a: {
42
- blocks: {
43
- b: { type: 'text' },
44
- },
45
- blocks_layout: {
46
- items: ['b'],
47
- },
48
- },
49
- },
50
- blocks_layout: {
51
- items: ['a'],
52
- },
53
- };
54
- const blocks = getAllBlocks(metadata, []);
55
- expect(blocks).toEqual([
56
- { id: 'b', ...metadata.blocks.a.blocks.b },
57
- { id: 'a', ...metadata.blocks.a },
58
- ]);
59
- });
60
-
61
- it('Two level of blocks w/ data', () => {
62
- const metadata = {
63
- blocks: {
64
- a: {
65
- data: {
66
- blocks: {
67
- b: { type: 'text' },
68
- },
69
- blocks_layout: {
70
- items: ['b'],
71
- },
72
- },
73
- },
74
- },
75
- blocks_layout: {
76
- items: ['a'],
77
- },
78
- };
79
- const blocks = getAllBlocks(metadata, []);
80
- expect(blocks).toEqual([
81
- { id: 'b', ...metadata.blocks.a.data.blocks.b },
82
- { id: 'a', ...metadata.blocks.a },
83
- ]);
84
- });
85
-
86
- it('Three level of blocks', () => {
87
- const metadata = {
88
- blocks: {
89
- a: {
90
- data: {
91
- blocks: {
92
- a1: { type: 'text' },
93
- a2: {
94
- type: 'text',
95
- blocks: {
96
- a21: { type: 'image' },
97
- a22: { type: 'image' },
98
- },
99
- blocks_layout: {
100
- items: ['a21', 'a22'],
101
- },
102
- },
103
- },
104
- blocks_layout: {
105
- items: ['a1', 'a2'],
106
- },
107
- },
108
- },
109
- b: {
110
- data: {
111
- blocks: {
112
- b1: { type: 'text' },
113
- b2: { type: 'text' },
114
- },
115
- blocks_layout: {
116
- items: ['b1', 'b2'],
117
- },
118
- },
119
- },
120
- },
121
- blocks_layout: {
122
- items: ['a', 'b'],
123
- },
124
- };
125
- const blocks = getAllBlocks(metadata, []);
126
- expect(blocks).toEqual([
127
- { id: 'a1', ...metadata.blocks.a.data.blocks.a1 },
128
- { id: 'a21', ...metadata.blocks.a.data.blocks.a2.blocks.a21 },
129
- { id: 'a22', ...metadata.blocks.a.data.blocks.a2.blocks.a22 },
130
- { id: 'a2', ...metadata.blocks.a.data.blocks.a2 },
131
- { id: 'a', ...metadata.blocks.a },
132
- { id: 'b1', ...metadata.blocks.b.data.blocks.b1 },
133
- { id: 'b2', ...metadata.blocks.b.data.blocks.b2 },
134
- { id: 'b', ...metadata.blocks.b },
135
- ]);
136
- });
137
- });
138
- });