@payloadcms/richtext-lexical 3.68.0-internal-debug.185cc5f → 3.68.0-internal-debug.591ab42

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 (280) hide show
  1. package/dist/cell/rscEntry.js +13 -5
  2. package/dist/cell/rscEntry.js.map +1 -1
  3. package/dist/features/blocks/client/component/BlockContent.js +29 -9
  4. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  5. package/dist/features/blocks/client/component/components/BlockCollapsible.js +7 -3
  6. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  7. package/dist/features/blocks/client/component/components/BlockEditButton.js +6 -2
  8. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  9. package/dist/features/blocks/client/component/components/BlockRemoveButton.js +6 -2
  10. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  11. package/dist/features/blocks/client/component/index.js +123 -43
  12. package/dist/features/blocks/client/component/index.js.map +1 -1
  13. package/dist/features/blocks/client/component/index.scss +188 -0
  14. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +7 -3
  15. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  16. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +6 -2
  17. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  18. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +6 -2
  19. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  20. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +6 -2
  21. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  22. package/dist/features/blocks/client/componentInline/index.js +117 -37
  23. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  24. package/dist/features/blocks/client/componentInline/index.scss +90 -0
  25. package/dist/features/blocks/client/getBlockImageComponent.js +7 -3
  26. package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
  27. package/dist/features/blocks/client/nodes/BlocksNode.js +7 -3
  28. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  29. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +7 -3
  30. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  31. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +87 -27
  32. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  33. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +7 -3
  34. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  35. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +12 -4
  36. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  37. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.scss +6 -0
  38. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +18 -6
  39. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  40. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.scss +29 -0
  41. package/dist/features/blocks/premade/CodeBlock/Component/index.scss +97 -0
  42. package/dist/features/converters/lexicalToJSX/Component/index.js +9 -5
  43. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  44. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +7 -3
  45. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  46. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +7 -3
  47. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  48. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +6 -2
  49. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  50. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +6 -2
  51. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  52. package/dist/features/converters/lexicalToJSX/converter/converters/link.js +13 -5
  53. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  54. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +38 -14
  55. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  56. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +18 -6
  57. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  58. package/dist/features/converters/lexicalToJSX/converter/converters/table.js +31 -11
  59. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  60. package/dist/features/converters/lexicalToJSX/converter/converters/text.js +43 -15
  61. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  62. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +31 -11
  63. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  64. package/dist/features/converters/lexicalToJSX/converter/index.js +8 -4
  65. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  66. package/dist/features/debug/jsxConverter/client/plugin/index.js +13 -5
  67. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  68. package/dist/features/debug/jsxConverter/client/plugin/style.scss +12 -0
  69. package/dist/features/debug/testRecorder/client/plugin/index.js +61 -21
  70. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  71. package/dist/features/debug/testRecorder/client/plugin/index.scss +53 -0
  72. package/dist/features/debug/treeView/client/plugin/index.js +7 -3
  73. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  74. package/dist/features/debug/treeView/client/plugin/index.scss +80 -0
  75. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +224 -72
  76. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  77. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.scss +87 -0
  78. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +31 -11
  79. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  80. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.scss +11 -0
  81. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +21 -9
  82. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  83. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +25 -9
  84. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  85. package/dist/features/experimental_table/client/plugins/TablePlugin/index.scss +233 -0
  86. package/dist/features/horizontalRule/client/plugin/index.scss +23 -0
  87. package/dist/features/indent/client/IndentPlugin.js +6 -2
  88. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  89. package/dist/features/link/client/plugins/clickableLink/index.js +6 -2
  90. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  91. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +76 -24
  92. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  93. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +7 -3
  94. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  95. package/dist/features/link/client/plugins/floatingLinkEditor/index.scss +92 -0
  96. package/dist/features/lists/checklist/client/plugin/index.js +6 -2
  97. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  98. package/dist/features/lists/plugin/index.js +6 -2
  99. package/dist/features/lists/plugin/index.js.map +1 -1
  100. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +13 -5
  101. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  102. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +7 -3
  103. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  104. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +16 -0
  105. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +13 -5
  106. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  107. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +7 -3
  108. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  109. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +16 -0
  110. package/dist/features/relationship/client/components/RelationshipComponent.js +55 -19
  111. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  112. package/dist/features/relationship/client/components/index.scss +95 -0
  113. package/dist/features/relationship/client/drawer/index.js +18 -6
  114. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  115. package/dist/features/relationship/client/nodes/RelationshipNode.js +7 -3
  116. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  117. package/dist/features/relationship/client/plugins/index.js +7 -3
  118. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  119. package/dist/features/textState/feature.client.js +18 -6
  120. package/dist/features/textState/feature.client.js.map +1 -1
  121. package/dist/features/toolbars/fixed/client/Toolbar/index.js +71 -23
  122. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  123. package/dist/features/toolbars/fixed/client/Toolbar/index.scss +113 -0
  124. package/dist/features/toolbars/inline/client/Toolbar/index.js +71 -23
  125. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  126. package/dist/features/toolbars/inline/client/Toolbar/index.scss +58 -0
  127. package/dist/features/toolbars/shared/ToolbarButton/index.js +7 -3
  128. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  129. package/dist/features/toolbars/shared/ToolbarButton/index.scss +46 -0
  130. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +60 -20
  131. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  132. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +36 -12
  133. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  134. package/dist/features/toolbars/shared/ToolbarDropdown/index.scss +129 -0
  135. package/dist/features/upload/client/component/index.js +91 -31
  136. package/dist/features/upload/client/component/index.js.map +1 -1
  137. package/dist/features/upload/client/component/index.scss +191 -0
  138. package/dist/features/upload/client/component/pending/index.js +13 -5
  139. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  140. package/dist/features/upload/client/drawer/index.js +18 -6
  141. package/dist/features/upload/client/drawer/index.js.map +1 -1
  142. package/dist/features/upload/client/nodes/UploadNode.js +12 -4
  143. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  144. package/dist/features/upload/client/plugin/index.js +7 -3
  145. package/dist/features/upload/client/plugin/index.js.map +1 -1
  146. package/dist/field/Diff/converters/listitem/index.js +36 -12
  147. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  148. package/dist/field/Diff/converters/listitem/index.scss +47 -0
  149. package/dist/field/Diff/converters/relationship/index.js +36 -12
  150. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  151. package/dist/field/Diff/converters/relationship/index.scss +73 -0
  152. package/dist/field/Diff/converters/unknown/index.js +30 -10
  153. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  154. package/dist/field/Diff/converters/unknown/index.scss +40 -0
  155. package/dist/field/Diff/converters/upload/index.js +59 -19
  156. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  157. package/dist/field/Diff/converters/upload/index.scss +115 -0
  158. package/dist/field/Diff/index.js +7 -3
  159. package/dist/field/Diff/index.js.map +1 -1
  160. package/dist/field/Diff/index.scss +102 -0
  161. package/dist/field/Field.js +79 -27
  162. package/dist/field/Field.js.map +1 -1
  163. package/dist/field/RenderLexical/index.js +36 -12
  164. package/dist/field/RenderLexical/index.js.map +1 -1
  165. package/dist/field/index.js +19 -7
  166. package/dist/field/index.js.map +1 -1
  167. package/dist/field/index.scss +41 -0
  168. package/dist/field/rscEntry.js +7 -3
  169. package/dist/field/rscEntry.js.map +1 -1
  170. package/dist/lexical/EditorPlugin.js +13 -5
  171. package/dist/lexical/EditorPlugin.js.map +1 -1
  172. package/dist/lexical/LexicalEditor.js +162 -50
  173. package/dist/lexical/LexicalEditor.js.map +1 -1
  174. package/dist/lexical/LexicalEditor.scss +54 -0
  175. package/dist/lexical/LexicalProvider.js +49 -17
  176. package/dist/lexical/LexicalProvider.js.map +1 -1
  177. package/dist/lexical/config/client/EditorConfigProvider.js +7 -3
  178. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  179. package/dist/lexical/plugins/DecoratorPlugin/index.scss +13 -0
  180. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +19 -7
  181. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  182. package/dist/lexical/plugins/InsertParagraphAtEnd/index.scss +54 -0
  183. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +7 -3
  184. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  185. package/dist/lexical/plugins/SlashMenu/index.js +48 -16
  186. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  187. package/dist/lexical/plugins/SlashMenu/index.scss +68 -0
  188. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +19 -7
  189. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  190. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +35 -0
  191. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +31 -11
  192. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  193. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.scss +80 -0
  194. package/dist/lexical/theme/EditorTheme.scss +357 -0
  195. package/dist/lexical/ui/ContentEditable.js +13 -5
  196. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  197. package/dist/lexical/ui/ContentEditable.scss +105 -0
  198. package/dist/lexical/ui/icons/AI/index.js +37 -13
  199. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  200. package/dist/lexical/ui/icons/Add/index.js +19 -7
  201. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  202. package/dist/lexical/ui/icons/AlignCenter/index.js +25 -9
  203. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  204. package/dist/lexical/ui/icons/AlignJustify/index.js +25 -9
  205. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  206. package/dist/lexical/ui/icons/AlignLeft/index.js +25 -9
  207. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  208. package/dist/lexical/ui/icons/AlignRight/index.js +25 -9
  209. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  210. package/dist/lexical/ui/icons/Block/index.js +25 -9
  211. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  212. package/dist/lexical/ui/icons/Blockquote/index.js +13 -5
  213. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  214. package/dist/lexical/ui/icons/Bold/index.js +13 -5
  215. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  216. package/dist/lexical/ui/icons/Checklist/index.js +19 -7
  217. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  218. package/dist/lexical/ui/icons/Code/index.js +19 -7
  219. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  220. package/dist/lexical/ui/icons/CodeBlock/index.js +13 -5
  221. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  222. package/dist/lexical/ui/icons/Collapse/index.js +13 -5
  223. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  224. package/dist/lexical/ui/icons/H1/index.js +13 -5
  225. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  226. package/dist/lexical/ui/icons/H2/index.js +13 -5
  227. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  228. package/dist/lexical/ui/icons/H3/index.js +13 -5
  229. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  230. package/dist/lexical/ui/icons/H4/index.js +13 -5
  231. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  232. package/dist/lexical/ui/icons/H5/index.js +13 -5
  233. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  234. package/dist/lexical/ui/icons/H6/index.js +13 -5
  235. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  236. package/dist/lexical/ui/icons/HorizontalRule/index.js +13 -5
  237. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  238. package/dist/lexical/ui/icons/IndentDecrease/index.js +31 -11
  239. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  240. package/dist/lexical/ui/icons/IndentIncrease/index.js +31 -11
  241. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  242. package/dist/lexical/ui/icons/InlineBlocks/index.js +13 -5
  243. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  244. package/dist/lexical/ui/icons/Italic/index.js +13 -5
  245. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  246. package/dist/lexical/ui/icons/Link/index.js +13 -5
  247. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  248. package/dist/lexical/ui/icons/Meatballs/index.js +25 -9
  249. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  250. package/dist/lexical/ui/icons/OrderedList/index.js +37 -13
  251. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  252. package/dist/lexical/ui/icons/Relationship/index.js +37 -13
  253. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  254. package/dist/lexical/ui/icons/Strikethrough/index.js +19 -7
  255. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  256. package/dist/lexical/ui/icons/Subscript/index.js +13 -5
  257. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  258. package/dist/lexical/ui/icons/Superscript/index.js +13 -5
  259. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  260. package/dist/lexical/ui/icons/Table/index.js +13 -5
  261. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  262. package/dist/lexical/ui/icons/Text/index.js +13 -5
  263. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  264. package/dist/lexical/ui/icons/TextState/index.js +7 -3
  265. package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
  266. package/dist/lexical/ui/icons/Underline/index.js +19 -7
  267. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  268. package/dist/lexical/ui/icons/UnorderedList/index.js +43 -15
  269. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  270. package/dist/lexical/ui/icons/Upload/index.js +25 -9
  271. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  272. package/dist/utilities/fieldsDrawer/Drawer.js +19 -7
  273. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  274. package/dist/utilities/fieldsDrawer/DrawerContent.js +19 -7
  275. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  276. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +7 -3
  277. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  278. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +7 -3
  279. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  280. package/package.json +9 -8
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
2
2
  import { getTranslation } from '@payloadcms/translations';
3
3
  import { Link } from '@payloadcms/ui';
4
4
  import { formatAdminURL } from 'payload/shared';
@@ -10,13 +10,17 @@ function recurseEditorState(editorState, textContent, i = 0) {
10
10
  textContent.push(node.text);
11
11
  } else {
12
12
  if (!('children' in node)) {
13
- textContent.push(/*#__PURE__*/ _jsxs("code", {
13
+ textContent.push(/*#__PURE__*/ _jsxDEV("code", {
14
14
  children: [
15
15
  " [",
16
16
  node.type,
17
17
  "]"
18
18
  ]
19
- }, i));
19
+ }, i, true, {
20
+ fileName: "src/cell/rscEntry.tsx",
21
+ lineNumber: 21,
22
+ columnNumber: 26
23
+ }, this));
20
24
  }
21
25
  }
22
26
  if ('children' in node && node.children) {
@@ -65,10 +69,14 @@ export const RscEntryLexicalCell = (props)=>{
65
69
  })
66
70
  ];
67
71
  }
68
- return /*#__PURE__*/ _jsx(WrapElement, {
72
+ return /*#__PURE__*/ _jsxDEV(WrapElement, {
69
73
  ...wrapElementProps,
70
74
  children: textContent
71
- });
75
+ }, void 0, false, {
76
+ fileName: "src/cell/rscEntry.tsx",
77
+ lineNumber: 104,
78
+ columnNumber: 10
79
+ }, this);
72
80
  };
73
81
 
74
82
  //# sourceMappingURL=rscEntry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}>&#32;[{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"names":["getTranslation","Link","formatAdminURL","React","recurseEditorState","editorState","textContent","i","node","text","push","code","type","children","RscEntryLexicalCell","props","cellData","className","classNameFromProps","collectionConfig","field","admin","i18n","link","onClick","onClickFromProps","payload","rowData","classNameFromConfigContext","undefined","adminRoute","config","routes","WrapElement","wrapElementProps","prefetch","href","slug","path","id","collectionSlug","root","length","t","label"],"mappings":";AAEA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,SAASC,IAAI,QAAQ,iBAAgB;AACrC,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,WAAW,QAAO;AAIzB,SAASC,mBACPC,WAAoC,EACpCC,WAA8B,EAC9BC,IAAY,CAAC;IAEb,KAAK,MAAMC,QAAQH,YAAa;QAC9BE;QACA,IAAI,UAAUC,QAAQA,KAAKC,IAAI,EAAE;YAC/BH,YAAYI,IAAI,CAACF,KAAKC,IAAI;QAC5B,OAAO;YACL,IAAI,CAAE,CAAA,cAAcD,IAAG,GAAI;gBACzBF,YAAYI,IAAI,eAAC,MAACC;;wBAAa;wBAAOH,KAAKI,IAAI;wBAAC;;mBAApBL;YAC9B;QACF;QACA,IAAI,cAAcC,QAAQA,KAAKK,QAAQ,EAAE;YACvCP,cAAcF,mBAAmBI,KAAKK,QAAQ,EAA6BP,aAAaC;QAC1F;IACF;IACA,OAAOD;AACT;AAEA,OAAO,MAAMQ,sBAA0D,CAACC;IACtE,MAAM,EACJC,QAAQ,EACRC,WAAWC,kBAAkB,EAC7BC,gBAAgB,EAChBC,OAAO,EAAEC,KAAK,EAAE,EAChBD,KAAK,EACLE,IAAI,EACJC,IAAI,EACJC,SAASC,gBAAgB,EACzBC,OAAO,EACPC,OAAO,EACR,GAAGZ;IAEJ,MAAMa,6BAA6BP,SAAS,eAAeA,QAAQA,MAAMJ,SAAS,GAAGY;IAErF,MAAMZ,YACJC,sBACCE,CAAAA,MAAMC,KAAK,IAAI,eAAeD,MAAMC,KAAK,GAAGD,MAAMC,KAAK,CAACJ,SAAS,GAAG,IAAG,KACxEW;IACF,MAAME,aAAaJ,QAAQK,MAAM,CAACC,MAAM,CAACX,KAAK;IAE9C,MAAMG,UAAUC;IAEhB,IAAIQ,cAAiD;IAErD,MAAMC,mBAMF;QACFjB;IACF;IAEA,IAAIM,MAAM;QACRW,iBAAiBC,QAAQ,GAAG;QAC5BF,cAAchC;QACdiC,iBAAiBE,IAAI,GAAGjB,kBAAkBkB,OACtCnC,eAAe;YACb4B;YACAQ,MAAM,CAAC,aAAa,EAAEnB,kBAAkBkB,KAAK,CAAC,EAAEV,QAAQY,EAAE,EAAE;QAC9D,KACA;IACN;IAEA,IAAI,OAAOf,YAAY,YAAY;QACjCS,cAAc;QACdC,iBAAiBtB,IAAI,GAAG;QACxBsB,iBAAiBV,OAAO,GAAG;YACzBA,QAAQ;gBACNR;gBACAwB,gBAAgBrB,kBAAkBkB;gBAClCV;YACF;QACF;IACF;IAEA,IAAIrB,cAAiC,EAAE;IAEvC,IAAIU,UAAUyB,MAAM5B,UAAU;QAC5BP,cAAcF,mBAAmBY,UAAUyB,MAAM5B,UAAUP;IAC7D;IAEA,IAAI,CAACA,aAAaoC,QAAQ;QACxBpC,cAAc;YACZgB,KAAKqB,CAAC,CAAC,mBAAmB;gBACxBC,OAAO5C,eAAe,AAAC,CAAA,WAAWoB,QAAQA,MAAMwB,KAAK,GAAG,IAAG,KAAM,QAAQtB;YAC3E;SACD;IACH;IAEA,qBAAO,KAACW;QAAa,GAAGC,gBAAgB;kBAAG5B;;AAC7C,EAAC"}
1
+ {"version":3,"sources":["../../src/cell/rscEntry.tsx"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { Link } from '@payloadcms/ui'\nimport { formatAdminURL } from 'payload/shared'\nimport React from 'react'\n\nimport type { LexicalRichTextCellProps } from '../types.js'\n\nfunction recurseEditorState(\n editorState: SerializedLexicalNode[],\n textContent: React.ReactNode[],\n i: number = 0,\n): React.ReactNode[] {\n for (const node of editorState) {\n i++\n if ('text' in node && node.text) {\n textContent.push(node.text as string)\n } else {\n if (!('children' in node)) {\n textContent.push(<code key={i}>&#32;[{node.type}]</code>)\n }\n }\n if ('children' in node && node.children) {\n textContent = recurseEditorState(node.children as SerializedLexicalNode[], textContent, i)\n }\n }\n return textContent\n}\n\nexport const RscEntryLexicalCell: React.FC<LexicalRichTextCellProps> = (props) => {\n const {\n cellData,\n className: classNameFromProps,\n collectionConfig,\n field: { admin },\n field,\n i18n,\n link,\n onClick: onClickFromProps,\n payload,\n rowData,\n } = props\n\n const classNameFromConfigContext = admin && 'className' in admin ? admin.className : undefined\n\n const className =\n classNameFromProps ||\n (field.admin && 'className' in field.admin ? field.admin.className : null) ||\n classNameFromConfigContext\n const adminRoute = payload.config.routes.admin\n\n const onClick = onClickFromProps\n\n let WrapElement: React.ComponentType<any> | string = 'span'\n\n const wrapElementProps: {\n className?: string\n href?: string\n onClick?: () => void\n prefetch?: false\n type?: 'button'\n } = {\n className,\n }\n\n if (link) {\n wrapElementProps.prefetch = false\n WrapElement = Link\n wrapElementProps.href = collectionConfig?.slug\n ? formatAdminURL({\n adminRoute,\n path: `/collections/${collectionConfig?.slug}/${rowData.id}`,\n })\n : ''\n }\n\n if (typeof onClick === 'function') {\n WrapElement = 'button'\n wrapElementProps.type = 'button'\n wrapElementProps.onClick = () => {\n onClick({\n cellData,\n collectionSlug: collectionConfig?.slug,\n rowData,\n })\n }\n }\n\n let textContent: React.ReactNode[] = []\n\n if (cellData?.root?.children) {\n textContent = recurseEditorState(cellData?.root?.children, textContent)\n }\n\n if (!textContent?.length) {\n textContent = [\n i18n.t('general:noLabel', {\n label: getTranslation(('label' in field ? field.label : null) || 'data', i18n),\n }),\n ]\n }\n\n return <WrapElement {...wrapElementProps}>{textContent}</WrapElement>\n}\n"],"names":["getTranslation","Link","formatAdminURL","React","recurseEditorState","editorState","textContent","i","node","text","push","code","type","children","RscEntryLexicalCell","props","cellData","className","classNameFromProps","collectionConfig","field","admin","i18n","link","onClick","onClickFromProps","payload","rowData","classNameFromConfigContext","undefined","adminRoute","config","routes","WrapElement","wrapElementProps","prefetch","href","slug","path","id","collectionSlug","root","length","t","label"],"mappings":";AAEA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,SAASC,IAAI,QAAQ,iBAAgB;AACrC,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,WAAW,QAAO;AAIzB,SAASC,mBACPC,WAAoC,EACpCC,WAA8B,EAC9BC,IAAY,CAAC;IAEb,KAAK,MAAMC,QAAQH,YAAa;QAC9BE;QACA,IAAI,UAAUC,QAAQA,KAAKC,IAAI,EAAE;YAC/BH,YAAYI,IAAI,CAACF,KAAKC,IAAI;QAC5B,OAAO;YACL,IAAI,CAAE,CAAA,cAAcD,IAAG,GAAI;gBACzBF,YAAYI,IAAI,eAAC,QAACC;;wBAAa;wBAAOH,KAAKI,IAAI;wBAAC;;mBAApBL;;;;;YAC9B;QACF;QACA,IAAI,cAAcC,QAAQA,KAAKK,QAAQ,EAAE;YACvCP,cAAcF,mBAAmBI,KAAKK,QAAQ,EAA6BP,aAAaC;QAC1F;IACF;IACA,OAAOD;AACT;AAEA,OAAO,MAAMQ,sBAA0D,CAACC;IACtE,MAAM,EACJC,QAAQ,EACRC,WAAWC,kBAAkB,EAC7BC,gBAAgB,EAChBC,OAAO,EAAEC,KAAK,EAAE,EAChBD,KAAK,EACLE,IAAI,EACJC,IAAI,EACJC,SAASC,gBAAgB,EACzBC,OAAO,EACPC,OAAO,EACR,GAAGZ;IAEJ,MAAMa,6BAA6BP,SAAS,eAAeA,QAAQA,MAAMJ,SAAS,GAAGY;IAErF,MAAMZ,YACJC,sBACCE,CAAAA,MAAMC,KAAK,IAAI,eAAeD,MAAMC,KAAK,GAAGD,MAAMC,KAAK,CAACJ,SAAS,GAAG,IAAG,KACxEW;IACF,MAAME,aAAaJ,QAAQK,MAAM,CAACC,MAAM,CAACX,KAAK;IAE9C,MAAMG,UAAUC;IAEhB,IAAIQ,cAAiD;IAErD,MAAMC,mBAMF;QACFjB;IACF;IAEA,IAAIM,MAAM;QACRW,iBAAiBC,QAAQ,GAAG;QAC5BF,cAAchC;QACdiC,iBAAiBE,IAAI,GAAGjB,kBAAkBkB,OACtCnC,eAAe;YACb4B;YACAQ,MAAM,CAAC,aAAa,EAAEnB,kBAAkBkB,KAAK,CAAC,EAAEV,QAAQY,EAAE,EAAE;QAC9D,KACA;IACN;IAEA,IAAI,OAAOf,YAAY,YAAY;QACjCS,cAAc;QACdC,iBAAiBtB,IAAI,GAAG;QACxBsB,iBAAiBV,OAAO,GAAG;YACzBA,QAAQ;gBACNR;gBACAwB,gBAAgBrB,kBAAkBkB;gBAClCV;YACF;QACF;IACF;IAEA,IAAIrB,cAAiC,EAAE;IAEvC,IAAIU,UAAUyB,MAAM5B,UAAU;QAC5BP,cAAcF,mBAAmBY,UAAUyB,MAAM5B,UAAUP;IAC7D;IAEA,IAAI,CAACA,aAAaoC,QAAQ;QACxBpC,cAAc;YACZgB,KAAKqB,CAAC,CAAC,mBAAmB;gBACxBC,OAAO5C,eAAe,AAAC,CAAA,WAAWoB,QAAQA,MAAMwB,KAAK,GAAG,IAAG,KAAM,QAAQtB;YAC3E;SACD;IACH;IAEA,qBAAO,QAACW;QAAa,GAAGC,gBAAgB;kBAAG5B;;;;;;AAC7C,EAAC"}
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
3
3
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
4
4
  import { RenderFields, useFormSubmitted } from '@payloadcms/ui';
5
5
  import React, { createContext, useMemo } from 'react';
@@ -51,28 +51,40 @@ export const useBlockComponentContext = ()=>React.use(BlockComponentContext);
51
51
  const isEditable = useLexicalEditable();
52
52
  const CollapsibleWithErrorProps = useMemo(()=>(props)=>{
53
53
  const { children, ...rest } = props;
54
- return /*#__PURE__*/ _jsx(Collapsible, {
54
+ return /*#__PURE__*/ _jsxDEV(Collapsible, {
55
55
  errorCount: errorCount,
56
56
  fieldHasErrors: fieldHasErrors,
57
57
  ...rest,
58
58
  children: children
59
- });
59
+ }, void 0, false, {
60
+ fileName: "src/features/blocks/client/component/BlockContent.tsx",
61
+ lineNumber: 109,
62
+ columnNumber: 9
63
+ }, this);
60
64
  }, [
61
65
  Collapsible,
62
66
  fieldHasErrors,
63
67
  errorCount
64
68
  ]);
65
- return CustomBlock ? /*#__PURE__*/ _jsxs(BlockComponentContext, {
69
+ return CustomBlock ? /*#__PURE__*/ _jsxDEV(BlockComponentContext, {
66
70
  value: {
67
71
  ...contextProps,
68
72
  BlockCollapsible: CollapsibleWithErrorProps
69
73
  },
70
74
  children: [
71
75
  CustomBlock,
72
- /*#__PURE__*/ _jsx(BlockDrawer, {})
76
+ /*#__PURE__*/ _jsxDEV(BlockDrawer, {}, void 0, false, {
77
+ fileName: "src/features/blocks/client/component/BlockContent.tsx",
78
+ lineNumber: 125,
79
+ columnNumber: 7
80
+ }, this)
73
81
  ]
74
- }) : /*#__PURE__*/ _jsx(CollapsibleWithErrorProps, {
75
- children: /*#__PURE__*/ _jsx(RenderFields, {
82
+ }, void 0, true, {
83
+ fileName: "src/features/blocks/client/component/BlockContent.tsx",
84
+ lineNumber: 118,
85
+ columnNumber: 5
86
+ }, this) : /*#__PURE__*/ _jsxDEV(CollapsibleWithErrorProps, {
87
+ children: /*#__PURE__*/ _jsxDEV(RenderFields, {
76
88
  fields: formSchema,
77
89
  forceRender: true,
78
90
  parentIndexPath: "",
@@ -80,8 +92,16 @@ export const useBlockComponentContext = ()=>React.use(BlockComponentContext);
80
92
  parentSchemaPath: "",
81
93
  permissions: true,
82
94
  readOnly: !isEditable
83
- })
84
- });
95
+ }, void 0, false, {
96
+ fileName: "src/features/blocks/client/component/BlockContent.tsx",
97
+ lineNumber: 129,
98
+ columnNumber: 7
99
+ }, this)
100
+ }, void 0, false, {
101
+ fileName: "src/features/blocks/client/component/BlockContent.tsx",
102
+ lineNumber: 128,
103
+ columnNumber: 5
104
+ }, this);
85
105
  };
86
106
 
87
107
  //# sourceMappingURL=BlockContent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleProps } from '@payloadcms/ui/elements/Collapsible'\nimport type { ClientField, FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\nexport type BlockCollapsibleProps = {\n /**\n * Replace the top-right portion of the header that renders the Edit and Remove buttons with custom content.\n * If this property is provided, the `removeButton` and `editButton` properties are ignored.\n */\n Actions?: React.ReactNode\n children?: React.ReactNode\n /**\n * Additional className to the collapsible wrapper\n */\n className?: string\n /**\n * Props to pass to the underlying Collapsible component. You could use this to override the `Header` entirely, for example.\n */\n collapsibleProps?: Partial<CollapsibleProps>\n /**\n * Whether to disable rendering the block name field in the header Label\n * @default false\n */\n disableBlockName?: boolean\n /**\n * Whether to show the Edit button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n editButton?: boolean\n /**\n * Replace the default Label component with a custom Label\n */\n Label?: React.ReactNode\n /**\n * Replace the default Pill component component that's rendered within the default Label component with a custom Pill.\n * This property has no effect if you provide a custom Label component via the `Label` property.\n */\n Pill?: React.ReactNode\n /**\n * Whether to show the Remove button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n removeButton?: boolean\n}\n\nexport type BlockCollapsibleWithErrorProps = {\n errorCount?: number\n fieldHasErrors?: boolean\n} & BlockCollapsibleProps\n\nexport type BlockContentProps = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<BlockCollapsibleWithErrorProps>\n CustomBlock: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\ntype BlockComponentContextType = {\n BlockCollapsible: React.FC<BlockCollapsibleProps>\n} & Omit<BlockContentProps, 'Collapsible'>\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n baseClass: 'LexicalEditorTheme__block',\n BlockCollapsible: () => null,\n BlockDrawer: () => null,\n CustomBlock: null,\n EditButton: () => null,\n errorCount: 0,\n formSchema: [],\n initialState: false,\n nodeKey: '',\n RemoveButton: () => null,\n})\n\nexport const useBlockComponentContext = () => React.use(BlockComponentContext)\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<BlockContentProps> = (props) => {\n const { Collapsible, ...contextProps } = props\n\n const { BlockDrawer, CustomBlock, errorCount, formSchema } = contextProps\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n const isEditable = useLexicalEditable()\n\n const CollapsibleWithErrorProps = useMemo(\n () => (props: BlockCollapsibleProps) => {\n const { children, ...rest } = props\n return (\n <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>\n {children}\n </Collapsible>\n )\n },\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n return CustomBlock ? (\n <BlockComponentContext\n value={{\n ...contextProps,\n BlockCollapsible: CollapsibleWithErrorProps,\n }}\n >\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"names":["useLexicalEditable","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","baseClass","BlockCollapsible","BlockDrawer","CustomBlock","EditButton","errorCount","formSchema","initialState","nodeKey","RemoveButton","useBlockComponentContext","use","BlockContent","props","Collapsible","contextProps","hasSubmitted","fieldHasErrors","isEditable","CollapsibleWithErrorProps","children","rest","value","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"mappings":"AAAA;;AAIA,SAASA,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,iBAAgB;AAC/D,OAAOC,SAASC,aAAa,EAAEC,OAAO,QAAQ,QAAO;AAGnD;;;GAGC,GAGD;;GAEC,GAED;;GAEC,GAED;;;GAGC,GAED;;;;GAIC,GAED;;GAEC,GAED;;;GAGC,GAED;;;;GAIC,GA2BH,MAAMC,sCAAwBF,cAAyC;IACrEG,WAAW;IACXC,kBAAkB,IAAM;IACxBC,aAAa,IAAM;IACnBC,aAAa;IACbC,YAAY,IAAM;IAClBC,YAAY;IACZC,YAAY,EAAE;IACdC,cAAc;IACdC,SAAS;IACTC,cAAc,IAAM;AACtB;AAEA,OAAO,MAAMC,2BAA2B,IAAMd,MAAMe,GAAG,CAACZ,uBAAsB;AAE9E;;;;CAIC,GACD,OAAO,MAAMa,eAA4C,CAACC;IACxD,MAAM,EAAEC,WAAW,EAAE,GAAGC,cAAc,GAAGF;IAEzC,MAAM,EAAEX,WAAW,EAAEC,WAAW,EAAEE,UAAU,EAAEC,UAAU,EAAE,GAAGS;IAE7D,MAAMC,eAAerB;IAErB,MAAMsB,iBAAiBD,gBAAgBX,aAAa;IACpD,MAAMa,aAAazB;IAEnB,MAAM0B,4BAA4BrB,QAChC,IAAM,CAACe;YACL,MAAM,EAAEO,QAAQ,EAAE,GAAGC,MAAM,GAAGR;YAC9B,qBACE,KAACC;gBAAYT,YAAYA;gBAAYY,gBAAgBA;gBAAiB,GAAGI,IAAI;0BAC1ED;;QAGP,GACA;QAACN;QAAaG;QAAgBZ;KAAW;IAG3C,OAAOF,4BACL,MAACJ;QACCuB,OAAO;YACL,GAAGP,YAAY;YACfd,kBAAkBkB;QACpB;;YAEChB;0BACD,KAACD;;uBAGH,KAACiB;kBACC,cAAA,KAACzB;YACC6B,QAAQjB;YACRkB,aAAa;YACbC,iBAAgB;YAChBC,YAAY;YACZC,kBAAiB;YACjBC,aAAa;YACbC,UAAU,CAACX;;;AAInB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleProps } from '@payloadcms/ui/elements/Collapsible'\nimport type { ClientField, FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\nexport type BlockCollapsibleProps = {\n /**\n * Replace the top-right portion of the header that renders the Edit and Remove buttons with custom content.\n * If this property is provided, the `removeButton` and `editButton` properties are ignored.\n */\n Actions?: React.ReactNode\n children?: React.ReactNode\n /**\n * Additional className to the collapsible wrapper\n */\n className?: string\n /**\n * Props to pass to the underlying Collapsible component. You could use this to override the `Header` entirely, for example.\n */\n collapsibleProps?: Partial<CollapsibleProps>\n /**\n * Whether to disable rendering the block name field in the header Label\n * @default false\n */\n disableBlockName?: boolean\n /**\n * Whether to show the Edit button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n editButton?: boolean\n /**\n * Replace the default Label component with a custom Label\n */\n Label?: React.ReactNode\n /**\n * Replace the default Pill component component that's rendered within the default Label component with a custom Pill.\n * This property has no effect if you provide a custom Label component via the `Label` property.\n */\n Pill?: React.ReactNode\n /**\n * Whether to show the Remove button\n * If `Actions` is provided, this property is ignored.\n * @default true\n */\n removeButton?: boolean\n}\n\nexport type BlockCollapsibleWithErrorProps = {\n errorCount?: number\n fieldHasErrors?: boolean\n} & BlockCollapsibleProps\n\nexport type BlockContentProps = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<BlockCollapsibleWithErrorProps>\n CustomBlock: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\ntype BlockComponentContextType = {\n BlockCollapsible: React.FC<BlockCollapsibleProps>\n} & Omit<BlockContentProps, 'Collapsible'>\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n baseClass: 'LexicalEditorTheme__block',\n BlockCollapsible: () => null,\n BlockDrawer: () => null,\n CustomBlock: null,\n EditButton: () => null,\n errorCount: 0,\n formSchema: [],\n initialState: false,\n nodeKey: '',\n RemoveButton: () => null,\n})\n\nexport const useBlockComponentContext = () => React.use(BlockComponentContext)\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<BlockContentProps> = (props) => {\n const { Collapsible, ...contextProps } = props\n\n const { BlockDrawer, CustomBlock, errorCount, formSchema } = contextProps\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n const isEditable = useLexicalEditable()\n\n const CollapsibleWithErrorProps = useMemo(\n () => (props: BlockCollapsibleProps) => {\n const { children, ...rest } = props\n return (\n <Collapsible errorCount={errorCount} fieldHasErrors={fieldHasErrors} {...rest}>\n {children}\n </Collapsible>\n )\n },\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n return CustomBlock ? (\n <BlockComponentContext\n value={{\n ...contextProps,\n BlockCollapsible: CollapsibleWithErrorProps,\n }}\n >\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"names":["useLexicalEditable","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","baseClass","BlockCollapsible","BlockDrawer","CustomBlock","EditButton","errorCount","formSchema","initialState","nodeKey","RemoveButton","useBlockComponentContext","use","BlockContent","props","Collapsible","contextProps","hasSubmitted","fieldHasErrors","isEditable","CollapsibleWithErrorProps","children","rest","value","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"mappings":"AAAA;;AAIA,SAASA,kBAAkB,QAAQ,oCAAmC;AACtE,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,iBAAgB;AAC/D,OAAOC,SAASC,aAAa,EAAEC,OAAO,QAAQ,QAAO;AAGnD;;;GAGC,GAGD;;GAEC,GAED;;GAEC,GAED;;;GAGC,GAED;;;;GAIC,GAED;;GAEC,GAED;;;GAGC,GAED;;;;GAIC,GA2BH,MAAMC,sCAAwBF,cAAyC;IACrEG,WAAW;IACXC,kBAAkB,IAAM;IACxBC,aAAa,IAAM;IACnBC,aAAa;IACbC,YAAY,IAAM;IAClBC,YAAY;IACZC,YAAY,EAAE;IACdC,cAAc;IACdC,SAAS;IACTC,cAAc,IAAM;AACtB;AAEA,OAAO,MAAMC,2BAA2B,IAAMd,MAAMe,GAAG,CAACZ,uBAAsB;AAE9E;;;;CAIC,GACD,OAAO,MAAMa,eAA4C,CAACC;IACxD,MAAM,EAAEC,WAAW,EAAE,GAAGC,cAAc,GAAGF;IAEzC,MAAM,EAAEX,WAAW,EAAEC,WAAW,EAAEE,UAAU,EAAEC,UAAU,EAAE,GAAGS;IAE7D,MAAMC,eAAerB;IAErB,MAAMsB,iBAAiBD,gBAAgBX,aAAa;IACpD,MAAMa,aAAazB;IAEnB,MAAM0B,4BAA4BrB,QAChC,IAAM,CAACe;YACL,MAAM,EAAEO,QAAQ,EAAE,GAAGC,MAAM,GAAGR;YAC9B,qBACE,QAACC;gBAAYT,YAAYA;gBAAYY,gBAAgBA;gBAAiB,GAAGI,IAAI;0BAC1ED;;;;;;QAGP,GACA;QAACN;QAAaG;QAAgBZ;KAAW;IAG3C,OAAOF,4BACL,QAACJ;QACCuB,OAAO;YACL,GAAGP,YAAY;YACfd,kBAAkBkB;QACpB;;YAEChB;0BACD,QAACD;;;;;;;;;;6BAGH,QAACiB;kBACC,cAAA,QAACzB;YACC6B,QAAQjB;YACRkB,aAAa;YACbC,iBAAgB;YAChBC,YAAY;YACZC,kBAAiB;YACjBC,aAAa;YACbC,UAAU,CAACX;;;;;;;;;;;AAInB,EAAC"}
@@ -1,14 +1,18 @@
1
1
  'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
3
3
  import React from 'react';
4
4
  import { useBlockComponentContext } from '../BlockContent.js';
5
5
  export const BlockCollapsible = (props)=>{
6
6
  const { children, ...rest } = props;
7
7
  const { BlockCollapsible } = useBlockComponentContext();
8
- return BlockCollapsible ? /*#__PURE__*/ _jsx(BlockCollapsible, {
8
+ return BlockCollapsible ? /*#__PURE__*/ _jsxDEV(BlockCollapsible, {
9
9
  ...rest,
10
10
  children: children
11
- }) : null;
11
+ }, void 0, false, {
12
+ fileName: "src/features/blocks/client/component/components/BlockCollapsible.tsx",
13
+ lineNumber: 10,
14
+ columnNumber: 29
15
+ }, this) : null;
12
16
  };
13
17
 
14
18
  //# sourceMappingURL=BlockCollapsible.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockCollapsible.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { type BlockCollapsibleProps, useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockCollapsible: React.FC<BlockCollapsibleProps> = (props) => {\n const { children, ...rest } = props\n const { BlockCollapsible } = useBlockComponentContext()\n\n return BlockCollapsible ? <BlockCollapsible {...rest}>{children}</BlockCollapsible> : null\n}\n"],"names":["React","useBlockComponentContext","BlockCollapsible","props","children","rest"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAAqCC,wBAAwB,QAAQ,qBAAoB;AAEzF,OAAO,MAAMC,mBAAoD,CAACC;IAChE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAC9B,MAAM,EAAED,gBAAgB,EAAE,GAAGD;IAE7B,OAAOC,iCAAmB,KAACA;QAAkB,GAAGG,IAAI;kBAAGD;SAA+B;AACxF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockCollapsible.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { type BlockCollapsibleProps, useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockCollapsible: React.FC<BlockCollapsibleProps> = (props) => {\n const { children, ...rest } = props\n const { BlockCollapsible } = useBlockComponentContext()\n\n return BlockCollapsible ? <BlockCollapsible {...rest}>{children}</BlockCollapsible> : null\n}\n"],"names":["React","useBlockComponentContext","BlockCollapsible","props","children","rest"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAAqCC,wBAAwB,QAAQ,qBAAoB;AAEzF,OAAO,MAAMC,mBAAoD,CAACC;IAChE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAC9B,MAAM,EAAED,gBAAgB,EAAE,GAAGD;IAE7B,OAAOC,iCAAmB,QAACA;QAAkB,GAAGG,IAAI;kBAAGD;;;;;eAA+B;AACxF,EAAC"}
@@ -1,10 +1,14 @@
1
1
  'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
3
3
  import React from 'react';
4
4
  import { useBlockComponentContext } from '../BlockContent.js';
5
5
  export const BlockEditButton = ()=>{
6
6
  const { EditButton } = useBlockComponentContext();
7
- return EditButton ? /*#__PURE__*/ _jsx(EditButton, {}) : null;
7
+ return EditButton ? /*#__PURE__*/ _jsxDEV(EditButton, {}, void 0, false, {
8
+ fileName: "src/features/blocks/client/component/components/BlockEditButton.tsx",
9
+ lineNumber: 9,
10
+ columnNumber: 23
11
+ }, this) : null;
8
12
  };
9
13
 
10
14
  //# sourceMappingURL=BlockEditButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockEditButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockEditButton = () => {\n const { EditButton } = useBlockComponentContext()\n\n return EditButton ? <EditButton /> : null\n}\n"],"names":["React","useBlockComponentContext","BlockEditButton","EditButton"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,wBAAwB,QAAQ,qBAAoB;AAE7D,OAAO,MAAMC,kBAAkB;IAC7B,MAAM,EAAEC,UAAU,EAAE,GAAGF;IAEvB,OAAOE,2BAAa,KAACA,kBAAgB;AACvC,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockEditButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockEditButton = () => {\n const { EditButton } = useBlockComponentContext()\n\n return EditButton ? <EditButton /> : null\n}\n"],"names":["React","useBlockComponentContext","BlockEditButton","EditButton"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,wBAAwB,QAAQ,qBAAoB;AAE7D,OAAO,MAAMC,kBAAkB;IAC7B,MAAM,EAAEC,UAAU,EAAE,GAAGF;IAEvB,OAAOE,2BAAa,QAACA;;;;eAAgB;AACvC,EAAC"}
@@ -1,10 +1,14 @@
1
1
  'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
3
3
  import React from 'react';
4
4
  import { useBlockComponentContext } from '../BlockContent.js';
5
5
  export const BlockRemoveButton = ()=>{
6
6
  const { RemoveButton } = useBlockComponentContext();
7
- return RemoveButton ? /*#__PURE__*/ _jsx(RemoveButton, {}) : null;
7
+ return RemoveButton ? /*#__PURE__*/ _jsxDEV(RemoveButton, {}, void 0, false, {
8
+ fileName: "src/features/blocks/client/component/components/BlockRemoveButton.tsx",
9
+ lineNumber: 9,
10
+ columnNumber: 25
11
+ }, this) : null;
8
12
  };
9
13
 
10
14
  //# sourceMappingURL=BlockRemoveButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockRemoveButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockRemoveButton = () => {\n const { RemoveButton } = useBlockComponentContext()\n\n return RemoveButton ? <RemoveButton /> : null\n}\n"],"names":["React","useBlockComponentContext","BlockRemoveButton","RemoveButton"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,wBAAwB,QAAQ,qBAAoB;AAE7D,OAAO,MAAMC,oBAAoB;IAC/B,MAAM,EAAEC,YAAY,EAAE,GAAGF;IAEzB,OAAOE,6BAAe,KAACA,oBAAkB;AAC3C,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/blocks/client/component/components/BlockRemoveButton.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useBlockComponentContext } from '../BlockContent.js'\n\nexport const BlockRemoveButton = () => {\n const { RemoveButton } = useBlockComponentContext()\n\n return RemoveButton ? <RemoveButton /> : null\n}\n"],"names":["React","useBlockComponentContext","BlockRemoveButton","RemoveButton"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,wBAAwB,QAAQ,qBAAoB;AAE7D,OAAO,MAAMC,oBAAoB;IAC/B,MAAM,EAAEC,YAAY,EAAE,GAAGF;IAEzB,OAAOE,6BAAe,QAACA;;;;eAAkB;AAC3C,EAAC"}
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsxDEV as _jsxDEV, Fragment as _Fragment } from "react/jsx-dev-runtime";
3
3
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
4
4
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
5
5
  import { getTranslation } from '@payloadcms/translations';
@@ -264,7 +264,7 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
264
264
  setDocFieldPreferences,
265
265
  formData.id
266
266
  ]);
267
- const EditButton = useMemo(()=>()=>/*#__PURE__*/ _jsx(Button, {
267
+ const EditButton = useMemo(()=>()=>/*#__PURE__*/ _jsxDEV(Button, {
268
268
  buttonStyle: "icon-label",
269
269
  className: `${baseClass}__editButton`,
270
270
  disabled: !isEditable,
@@ -286,14 +286,18 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
286
286
  tooltip: t('lexical:blocks:inlineBlocks:edit', {
287
287
  label: blockDisplayName
288
288
  })
289
- }), [
289
+ }, void 0, false, {
290
+ fileName: "src/features/blocks/client/component/index.tsx",
291
+ lineNumber: 383,
292
+ columnNumber: 7
293
+ }, this), [
290
294
  baseClass,
291
295
  isEditable,
292
296
  t,
293
297
  blockDisplayName,
294
298
  toggleDrawer
295
299
  ]);
296
- const RemoveButton = useMemo(()=>()=>/*#__PURE__*/ _jsx(Button, {
300
+ const RemoveButton = useMemo(()=>()=>/*#__PURE__*/ _jsxDEV(Button, {
297
301
  buttonStyle: "icon-label",
298
302
  className: `${baseClass}__removeButton`,
299
303
  disabled: !isEditable,
@@ -304,55 +308,91 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
304
308
  },
305
309
  round: true,
306
310
  tooltip: "Remove Block"
307
- }), [
311
+ }, void 0, false, {
312
+ fileName: "src/features/blocks/client/component/index.tsx",
313
+ lineNumber: 410,
314
+ columnNumber: 7
315
+ }, this), [
308
316
  baseClass,
309
317
  isEditable,
310
318
  removeBlock
311
319
  ]);
312
320
  const BlockCollapsible = useMemo(()=>({ Actions, children, className, collapsibleProps, disableBlockName, editButton, errorCount, fieldHasErrors, Label, Pill: CustomPill, removeButton })=>{
313
- return /*#__PURE__*/ _jsx("div", {
321
+ return /*#__PURE__*/ _jsxDEV("div", {
314
322
  className: `${baseClass}__container ${baseClass}-${blockType}`,
315
- children: /*#__PURE__*/ _jsx(Collapsible, {
323
+ children: /*#__PURE__*/ _jsxDEV(Collapsible, {
316
324
  className: [
317
325
  `${baseClass}__row`,
318
326
  fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,
319
327
  className
320
328
  ].filter(Boolean).join(' '),
321
329
  collapsibleStyle: fieldHasErrors ? 'error' : 'default',
322
- header: /*#__PURE__*/ _jsxs("div", {
330
+ header: /*#__PURE__*/ _jsxDEV("div", {
323
331
  className: `${baseClass}__block-header`,
324
332
  children: [
325
- typeof Label !== 'undefined' ? Label : typeof CustomLabel !== 'undefined' ? CustomLabel : /*#__PURE__*/ _jsxs("div", {
333
+ typeof Label !== 'undefined' ? Label : typeof CustomLabel !== 'undefined' ? CustomLabel : /*#__PURE__*/ _jsxDEV("div", {
326
334
  className: `${baseClass}__block-label`,
327
335
  children: [
328
- typeof CustomPill !== 'undefined' ? CustomPill : /*#__PURE__*/ _jsx(Pill, {
336
+ typeof CustomPill !== 'undefined' ? CustomPill : /*#__PURE__*/ _jsxDEV(Pill, {
329
337
  className: `${baseClass}__block-pill ${baseClass}__block-pill-${blockType}`,
330
338
  pillStyle: "white",
331
339
  size: "small",
332
340
  children: blockDisplayName ?? blockType
333
- }),
334
- !disableBlockName && !clientBlock?.admin?.disableBlockName && /*#__PURE__*/ _jsx(SectionTitle, {
341
+ }, void 0, false, {
342
+ fileName: "src/features/blocks/client/component/index.tsx",
343
+ lineNumber: 463,
344
+ columnNumber: 25
345
+ }, void 0),
346
+ !disableBlockName && !clientBlock?.admin?.disableBlockName && /*#__PURE__*/ _jsxDEV(SectionTitle, {
335
347
  path: "blockName",
336
348
  readOnly: !isEditable
337
- }),
338
- fieldHasErrors && /*#__PURE__*/ _jsx(ErrorPill, {
349
+ }, void 0, false, {
350
+ fileName: "src/features/blocks/client/component/index.tsx",
351
+ lineNumber: 472,
352
+ columnNumber: 25
353
+ }, void 0),
354
+ fieldHasErrors && /*#__PURE__*/ _jsxDEV(ErrorPill, {
339
355
  count: errorCount ?? 0,
340
356
  i18n: i18n,
341
357
  withMessage: true
342
- })
358
+ }, void 0, false, {
359
+ fileName: "src/features/blocks/client/component/index.tsx",
360
+ lineNumber: 476,
361
+ columnNumber: 25
362
+ }, void 0)
343
363
  ]
344
- }),
345
- /*#__PURE__*/ _jsx("div", {
364
+ }, void 0, true, {
365
+ fileName: "src/features/blocks/client/component/index.tsx",
366
+ lineNumber: 459,
367
+ columnNumber: 21
368
+ }, void 0),
369
+ /*#__PURE__*/ _jsxDEV("div", {
346
370
  className: `${baseClass}__block-actions`,
347
- children: typeof Actions !== 'undefined' ? Actions : /*#__PURE__*/ _jsxs(_Fragment, {
371
+ children: typeof Actions !== 'undefined' ? Actions : /*#__PURE__*/ _jsxDEV(_Fragment, {
348
372
  children: [
349
- CustomBlock && editButton !== false || !CustomBlock && editButton ? /*#__PURE__*/ _jsx(EditButton, {}) : null,
350
- removeButton !== false && isEditable ? /*#__PURE__*/ _jsx(RemoveButton, {}) : null
373
+ CustomBlock && editButton !== false || !CustomBlock && editButton ? /*#__PURE__*/ _jsxDEV(EditButton, {}, void 0, false, {
374
+ fileName: "src/features/blocks/client/component/index.tsx",
375
+ lineNumber: 487,
376
+ columnNumber: 27
377
+ }, void 0) : null,
378
+ removeButton !== false && isEditable ? /*#__PURE__*/ _jsxDEV(RemoveButton, {}, void 0, false, {
379
+ fileName: "src/features/blocks/client/component/index.tsx",
380
+ lineNumber: 489,
381
+ columnNumber: 65
382
+ }, void 0) : null
351
383
  ]
352
- })
353
- })
384
+ }, void 0, true)
385
+ }, void 0, false, {
386
+ fileName: "src/features/blocks/client/component/index.tsx",
387
+ lineNumber: 481,
388
+ columnNumber: 19
389
+ }, void 0)
354
390
  ]
355
- }),
391
+ }, void 0, true, {
392
+ fileName: "src/features/blocks/client/component/index.tsx",
393
+ lineNumber: 453,
394
+ columnNumber: 17
395
+ }, void 0),
356
396
  isCollapsed: isCollapsed,
357
397
  onToggle: (incomingCollapsedState)=>{
358
398
  onCollapsedChange(incomingCollapsedState);
@@ -360,8 +400,16 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
360
400
  },
361
401
  ...collapsibleProps || {},
362
402
  children: children
363
- }, 0)
364
- });
403
+ }, 0, false, {
404
+ fileName: "src/features/blocks/client/component/index.tsx",
405
+ lineNumber: 443,
406
+ columnNumber: 13
407
+ }, this)
408
+ }, void 0, false, {
409
+ fileName: "src/features/blocks/client/component/index.tsx",
410
+ lineNumber: 442,
411
+ columnNumber: 11
412
+ }, this);
365
413
  }, [
366
414
  CustomBlock,
367
415
  CustomLabel,
@@ -377,16 +425,16 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
377
425
  isEditable
378
426
  ]);
379
427
  const blockID = formData?.id;
380
- const BlockDrawer = useMemo(()=>()=>/*#__PURE__*/ _jsx(EditDepthProvider, {
381
- children: /*#__PURE__*/ _jsx(Drawer, {
428
+ const BlockDrawer = useMemo(()=>()=>/*#__PURE__*/ _jsxDEV(EditDepthProvider, {
429
+ children: /*#__PURE__*/ _jsxDEV(Drawer, {
382
430
  className: '',
383
431
  slug: drawerSlug,
384
432
  title: t(`lexical:blocks:inlineBlocks:${blockID ? 'edit' : 'create'}`, {
385
433
  label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label')
386
434
  }),
387
- children: initialState ? /*#__PURE__*/ _jsxs(_Fragment, {
435
+ children: initialState ? /*#__PURE__*/ _jsxDEV(_Fragment, {
388
436
  children: [
389
- /*#__PURE__*/ _jsx(RenderFields, {
437
+ /*#__PURE__*/ _jsxDEV(RenderFields, {
390
438
  fields: clientBlock?.fields ?? [],
391
439
  forceRender: true,
392
440
  parentIndexPath: "",
@@ -395,15 +443,31 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
395
443
  parentSchemaPath: schemaFieldsPath,
396
444
  permissions: true,
397
445
  readOnly: !isEditable
398
- }),
399
- /*#__PURE__*/ _jsx(FormSubmit, {
446
+ }, void 0, false, {
447
+ fileName: "src/features/blocks/client/component/index.tsx",
448
+ lineNumber: 538,
449
+ columnNumber: 15
450
+ }, this),
451
+ /*#__PURE__*/ _jsxDEV(FormSubmit, {
400
452
  programmaticSubmit: true,
401
453
  children: t('fields:saveChanges')
402
- })
454
+ }, void 0, false, {
455
+ fileName: "src/features/blocks/client/component/index.tsx",
456
+ lineNumber: 547,
457
+ columnNumber: 15
458
+ }, this)
403
459
  ]
404
- }) : null
405
- })
406
- }), [
460
+ }, void 0, true) : null
461
+ }, void 0, false, {
462
+ fileName: "src/features/blocks/client/component/index.tsx",
463
+ lineNumber: 529,
464
+ columnNumber: 9
465
+ }, this)
466
+ }, void 0, false, {
467
+ fileName: "src/features/blocks/client/component/index.tsx",
468
+ lineNumber: 528,
469
+ columnNumber: 7
470
+ }, this), [
407
471
  initialState,
408
472
  drawerSlug,
409
473
  blockID,
@@ -419,7 +483,7 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
419
483
  if (!initialState) {
420
484
  return null;
421
485
  }
422
- return /*#__PURE__*/ _jsx(Form, {
486
+ return /*#__PURE__*/ _jsxDEV(Form, {
423
487
  beforeSubmit: [
424
488
  async ({ formState })=>{
425
489
  // This is only called when form is submitted from drawer - usually only the case if the block has a custom Block component
@@ -448,7 +512,7 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
448
512
  },
449
513
  submitted: submitted,
450
514
  uuid: uuid(),
451
- children: /*#__PURE__*/ _jsx(BlockContent, {
515
+ children: /*#__PURE__*/ _jsxDEV(BlockContent, {
452
516
  baseClass: baseClass,
453
517
  BlockDrawer: BlockDrawer,
454
518
  Collapsible: BlockCollapsible,
@@ -459,8 +523,16 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
459
523
  initialState: initialState,
460
524
  nodeKey: nodeKey,
461
525
  RemoveButton: RemoveButton
462
- })
463
- });
526
+ }, void 0, false, {
527
+ fileName: "src/features/blocks/client/component/index.tsx",
528
+ lineNumber: 597,
529
+ columnNumber: 9
530
+ }, this)
531
+ }, void 0, false, {
532
+ fileName: "src/features/blocks/client/component/index.tsx",
533
+ lineNumber: 572,
534
+ columnNumber: 7
535
+ }, this);
464
536
  }, [
465
537
  BlockCollapsible,
466
538
  BlockDrawer,
@@ -480,18 +552,26 @@ import { removeEmptyArrayValues } from './removeEmptyArrayValues.js';
480
552
  submitted
481
553
  ]);
482
554
  if (!clientBlock) {
483
- return /*#__PURE__*/ _jsx(BlockCollapsible, {
555
+ return /*#__PURE__*/ _jsxDEV(BlockCollapsible, {
484
556
  disableBlockName: true,
485
557
  fieldHasErrors: true,
486
- children: /*#__PURE__*/ _jsxs("div", {
558
+ children: /*#__PURE__*/ _jsxDEV("div", {
487
559
  className: `${baseClass}-not-found`,
488
560
  children: [
489
561
  "Error: Block '",
490
562
  blockType,
491
563
  "' not found in the config but exists in the lexical data"
492
564
  ]
493
- })
494
- });
565
+ }, void 0, true, {
566
+ fileName: "src/features/blocks/client/component/index.tsx",
567
+ lineNumber: 633,
568
+ columnNumber: 9
569
+ }, this)
570
+ }, void 0, false, {
571
+ fileName: "src/features/blocks/client/component/index.tsx",
572
+ lineNumber: 632,
573
+ columnNumber: 7
574
+ }, this);
495
575
  }
496
576
  return Block;
497
577
  };