@payloadcms/richtext-lexical 4.0.0-internal.7e57eed → 4.0.0-internal.8001944

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 (300) hide show
  1. package/dist/exports/client/Field-2HOFHTFX.js +2 -0
  2. package/dist/exports/client/Field-2HOFHTFX.js.map +7 -0
  3. package/dist/exports/client/bundled.css +1 -1
  4. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  5. package/dist/exports/client/{chunk-SSMQFWCQ.js.map → chunk-3LRZDIIG.js.map} +4 -4
  6. package/dist/exports/client/chunk-ATPSL6IX.js +2 -0
  7. package/dist/exports/client/chunk-ATPSL6IX.js.map +7 -0
  8. package/dist/exports/client/componentInline-ZEP5JPTC.js +2 -0
  9. package/dist/exports/client/index.js +26 -26
  10. package/dist/exports/client/index.js.map +4 -4
  11. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  12. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  13. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  14. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  15. package/dist/features/blocks/client/component/index.d.ts +0 -6
  16. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  17. package/dist/features/blocks/client/component/index.js +168 -101
  18. package/dist/features/blocks/client/component/index.js.map +1 -1
  19. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  20. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  21. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  22. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  23. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  24. package/dist/features/blocks/client/componentInline/index.js +30 -22
  25. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  26. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  27. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  28. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  29. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  30. package/dist/features/blocks/server/index.js +2 -2
  31. package/dist/features/blocks/server/index.js.map +1 -1
  32. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  33. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  34. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  35. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  36. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  37. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  38. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  39. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  40. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  41. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  42. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  43. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  44. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  45. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  46. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  47. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  48. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  49. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  50. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  51. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  52. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  53. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  54. package/dist/features/heading/constants.d.ts +2 -0
  55. package/dist/features/heading/constants.d.ts.map +1 -0
  56. package/dist/features/heading/constants.js +2 -0
  57. package/dist/features/heading/constants.js.map +1 -0
  58. package/dist/features/heading/server/index.d.ts.map +1 -1
  59. package/dist/features/heading/server/index.js +5 -1
  60. package/dist/features/heading/server/index.js.map +1 -1
  61. package/dist/features/heading/server/validate.d.ts +6 -0
  62. package/dist/features/heading/server/validate.d.ts.map +1 -0
  63. package/dist/features/heading/server/validate.js +15 -0
  64. package/dist/features/heading/server/validate.js.map +1 -0
  65. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  66. package/dist/features/indent/client/IndentPlugin.js +122 -1
  67. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  68. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  69. package/dist/features/indent/server/i18n.js +74 -37
  70. package/dist/features/indent/server/i18n.js.map +1 -1
  71. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  72. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +8 -5
  73. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  74. package/dist/features/link/server/index.js +2 -2
  75. package/dist/features/link/server/index.js.map +1 -1
  76. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  77. package/dist/features/lists/checklist/server/index.js +5 -2
  78. package/dist/features/lists/checklist/server/index.js.map +1 -1
  79. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  80. package/dist/features/lists/orderedList/server/index.js +5 -2
  81. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  82. package/dist/features/lists/shared/constants.d.ts +2 -0
  83. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  84. package/dist/features/lists/shared/constants.js +2 -0
  85. package/dist/features/lists/shared/constants.js.map +1 -0
  86. package/dist/features/lists/shared/validate.d.ts +5 -0
  87. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  88. package/dist/features/lists/shared/validate.js +15 -0
  89. package/dist/features/lists/shared/validate.js.map +1 -0
  90. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  91. package/dist/features/lists/unorderedList/server/index.js +5 -2
  92. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  93. package/dist/features/relationship/client/index.d.ts +2 -2
  94. package/dist/features/relationship/client/index.d.ts.map +1 -1
  95. package/dist/features/relationship/client/index.js.map +1 -1
  96. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  97. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  98. package/dist/features/relationship/client/plugins/index.js +27 -31
  99. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  100. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  101. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  102. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  103. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  104. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  105. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  106. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  107. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  108. package/dist/features/relationship/server/index.d.ts +8 -1
  109. package/dist/features/relationship/server/index.d.ts.map +1 -1
  110. package/dist/features/relationship/server/index.js +28 -11
  111. package/dist/features/relationship/server/index.js.map +1 -1
  112. package/dist/features/relationship/server/schema.d.ts +2 -2
  113. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  114. package/dist/features/relationship/server/schema.js +5 -10
  115. package/dist/features/relationship/server/schema.js.map +1 -1
  116. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  117. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  118. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  119. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  120. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  121. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  122. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  123. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  124. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  125. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js +17 -44
  126. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  127. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  128. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js +41 -18
  129. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  130. package/dist/features/table/server/index.js +2 -2
  131. package/dist/features/table/server/index.js.map +1 -1
  132. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  133. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  134. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  135. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  136. package/dist/features/toolbars/fixed/client/Toolbar/index.css +77 -3
  137. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  138. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  139. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  140. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  141. package/dist/features/toolbars/inline/client/Toolbar/index.js +2 -2
  142. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  143. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  144. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  145. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  146. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  147. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  148. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  149. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -11
  150. package/dist/features/typesServer.d.ts +14 -9
  151. package/dist/features/typesServer.d.ts.map +1 -1
  152. package/dist/features/typesServer.js.map +1 -1
  153. package/dist/features/upload/client/index.d.ts +3 -2
  154. package/dist/features/upload/client/index.d.ts.map +1 -1
  155. package/dist/features/upload/client/index.js.map +1 -1
  156. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  157. package/dist/features/upload/client/plugin/index.js +50 -53
  158. package/dist/features/upload/client/plugin/index.js.map +1 -1
  159. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  160. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  161. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  162. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  163. package/dist/features/upload/server/index.d.ts +6 -2
  164. package/dist/features/upload/server/index.d.ts.map +1 -1
  165. package/dist/features/upload/server/index.js +20 -16
  166. package/dist/features/upload/server/index.js.map +1 -1
  167. package/dist/features/upload/server/schema.d.ts +2 -2
  168. package/dist/features/upload/server/schema.d.ts.map +1 -1
  169. package/dist/features/upload/server/schema.js +4 -8
  170. package/dist/features/upload/server/schema.js.map +1 -1
  171. package/dist/features/upload/server/validate.d.ts +2 -2
  172. package/dist/features/upload/server/validate.d.ts.map +1 -1
  173. package/dist/features/upload/server/validate.js +3 -0
  174. package/dist/features/upload/server/validate.js.map +1 -1
  175. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  176. package/dist/field/Diff/converters/listitem/index.js +2 -1
  177. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  178. package/dist/field/Diff/index.d.ts +3 -2
  179. package/dist/field/Diff/index.d.ts.map +1 -1
  180. package/dist/field/Diff/index.js +1 -0
  181. package/dist/field/Diff/index.js.map +1 -1
  182. package/dist/field/Field.d.ts.map +1 -1
  183. package/dist/field/Field.js +8 -1
  184. package/dist/field/Field.js.map +1 -1
  185. package/dist/field/RenderLexical/index.d.ts +3 -1
  186. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  187. package/dist/field/RenderLexical/index.js +23 -23
  188. package/dist/field/RenderLexical/index.js.map +1 -1
  189. package/dist/field/ViewSelector.d.ts.map +1 -1
  190. package/dist/field/ViewSelector.js +1 -0
  191. package/dist/field/ViewSelector.js.map +1 -1
  192. package/dist/field/bundled.css +1 -1
  193. package/dist/field/index.css +10 -10
  194. package/dist/i18n.d.ts.map +1 -1
  195. package/dist/i18n.js +68 -0
  196. package/dist/i18n.js.map +1 -1
  197. package/dist/index.d.ts +1 -1
  198. package/dist/index.js +4 -4
  199. package/dist/index.js.map +1 -1
  200. package/dist/lexical/LexicalEditor.css +20 -9
  201. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  202. package/dist/lexical/LexicalEditor.js +61 -64
  203. package/dist/lexical/LexicalEditor.js.map +1 -1
  204. package/dist/lexical/config/server/loader.d.ts +1 -1
  205. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  206. package/dist/lexical/config/server/loader.js +2 -2
  207. package/dist/lexical/config/server/loader.js.map +1 -1
  208. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  209. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  210. package/dist/lexical/config/server/sanitize.js +2 -2
  211. package/dist/lexical/config/server/sanitize.js.map +1 -1
  212. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  213. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  214. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  215. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -24
  216. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  217. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  218. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  219. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -1
  220. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  221. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  222. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  223. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  224. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +1 -0
  225. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  226. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -2
  227. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  228. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  229. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  230. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  231. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  232. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  233. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  234. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  235. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  236. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  237. package/dist/lexical/ui/ContentEditable.js +21 -7
  238. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  239. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  240. package/dist/lexical/ui/icons/H3/index.js +13 -6
  241. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  242. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  243. package/dist/lexical/ui/icons/H4/index.js +13 -6
  244. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  245. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  246. package/dist/lexical/ui/icons/H5/index.js +13 -6
  247. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  248. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  249. package/dist/lexical/ui/icons/H6/index.js +13 -6
  250. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  251. package/dist/types/index.d.ts +1 -1
  252. package/dist/types/index.d.ts.map +1 -1
  253. package/dist/types/index.js.map +1 -1
  254. package/dist/utilities/buildInitialState.d.ts +1 -0
  255. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  256. package/dist/utilities/buildInitialState.js +1 -0
  257. package/dist/utilities/buildInitialState.js.map +1 -1
  258. package/dist/utilities/createServerFeature.d.ts +1 -1
  259. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  260. package/dist/utilities/createServerFeature.js +2 -2
  261. package/dist/utilities/createServerFeature.js.map +1 -1
  262. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  263. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  264. package/dist/utilities/editorConfigFactory.js +9 -9
  265. package/dist/utilities/editorConfigFactory.js.map +1 -1
  266. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  267. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  268. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  269. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  270. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  271. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  272. package/dist/validate/hasText.d.ts +2 -2
  273. package/dist/validate/hasText.d.ts.map +1 -1
  274. package/dist/validate/hasText.js.map +1 -1
  275. package/dist/validate/index.d.ts +1 -1
  276. package/dist/validate/index.d.ts.map +1 -1
  277. package/package.json +23 -23
  278. package/dist/dependencyChecker.spec.js +0 -16
  279. package/dist/dependencyChecker.spec.js.map +0 -1
  280. package/dist/exports/client/Field-IZKDIUJY.js +0 -2
  281. package/dist/exports/client/Field-IZKDIUJY.js.map +0 -7
  282. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  283. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  284. package/dist/exports/client/chunk-SSMQFWCQ.js +0 -2
  285. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  286. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  287. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  288. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  289. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  290. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  291. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  292. package/dist/features/link/markdownTransformer.spec.js +0 -195
  293. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  294. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  295. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  296. package/dist/lexical/utils/url.spec.js +0 -114
  297. package/dist/lexical/utils/url.spec.js.map +0 -1
  298. package/dist/utilities/jsx/jsx.spec.js +0 -178
  299. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  300. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-ZEP5JPTC.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/blocks/client/componentInline/index.tsx", "../../../src/features/blocks/client/getCachedFormStateIfDataMatches.ts", "../../../src/features/blocks/client/nodes/InlineBlocksNode.tsx", "../../../src/features/blocks/server/nodes/InlineBlocksNode.tsx"],
4
+ "sourcesContent": ["'use client'\n\nimport type { BlocksFieldClient, ClientBlock, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Drawer,\n EditDepthProvider,\n Form,\n formatDrawerSlug,\n RenderFields,\n ShimmerEffect,\n useConfig,\n useDocumentForm,\n useDocumentInfo,\n useEditDepth,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { $getNodeByKey, SKIP_DOM_SELECTION_TAG } from 'lexical'\n\nimport './index.css'\nimport '../../../../utilities/fieldsDrawer/index.css'\n\nimport { deepCopyObjectSimpleWithoutReactComponents } from 'payload/shared'\nimport React, { createContext, useCallback, useEffect, useMemo, useRef } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { ViewMapInlineBlockComponentProps } from '../../../../types/index.js'\nimport type { InlineBlockFields } from '../../server/schema.js'\nimport type { BlockComponentProps } from '../component/index.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport {\n RegisterFormSubmit,\n useDrawerSubmit,\n} from '../../../../utilities/fieldsDrawer/useDrawerSubmit.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport {\n getCachedFormStateIfDataMatches,\n reduceFormStateToBlockData,\n} from '../getCachedFormStateIfDataMatches.js'\nimport { $isInlineBlockNode } from '../nodes/InlineBlocksNode.js'\n\nexport type InlineBlockComponentProps<\n TFormData extends Record<string, unknown> = InlineBlockFields,\n> = {\n readonly CustomBlock?: React.FC<ViewMapInlineBlockComponentProps>\n readonly CustomLabel?: React.FC<ViewMapInlineBlockComponentProps>\n} & Pick<BlockComponentProps<TFormData>, 'cacheBuster' | 'className' | 'formData' | 'nodeKey'>\n\nexport type InlineBlockComponentContextType = {\n EditButton?: React.FC\n initialState: false | FormState | undefined\n InlineBlockContainer?: React.FC<{ children: React.ReactNode }>\n Label?: React.FC\n nodeKey?: string\n RemoveButton?: React.FC\n}\n\nconst InlineBlockComponentContext = createContext<InlineBlockComponentContextType>({\n initialState: false,\n})\n\nexport const useInlineBlockComponentContext = () => React.use(InlineBlockComponentContext)\n\nexport const InlineBlockComponent: React.FC<InlineBlockComponentProps<InlineBlockFields>> = (\n props,\n) => {\n const {\n cacheBuster,\n className: baseClass,\n CustomBlock: CustomBlockFromProps,\n CustomLabel: CustomLabelFromProps,\n formData,\n nodeKey,\n } = props\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation<object, string>()\n const {\n createdInlineBlock,\n fieldProps: { featureClientSchemaMap, initialLexicalFormState, schemaPath },\n setCreatedInlineBlock,\n uuid: uuidFromContext,\n } = useEditorConfigContext()\n const { fields: parentDocumentFields } = useDocumentForm()\n\n const { getFormState } = useServerFunctions()\n const editDepth = useEditDepth()\n const firstTimeDrawer = useRef(false)\n const blockType = formData.blockType\n const formDataRef = useRef(formData)\n formDataRef.current = formData\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.${blockType}.fields`\n\n const [initialState, setInitialState] = React.useState<false | FormState | undefined>(() => {\n // Initial form state that was calculated server-side. May have stale values\n const cachedState = initialLexicalFormState?.[formData.id]\n const cachedFormState = cachedState?.formState\n if (!cachedFormState) {\n return false\n }\n\n return getCachedFormStateIfDataMatches({\n cachedFormState,\n cachedSchemaPath: cachedState.schemaPath,\n currentSchemaPath: schemaFieldsPath,\n formData,\n })\n })\n\n const hasMounted = useRef(false)\n const prevCacheBuster = useRef(cacheBuster)\n useEffect(() => {\n if (hasMounted.current) {\n if (prevCacheBuster.current !== cacheBuster) {\n setInitialState(false)\n }\n prevCacheBuster.current = cacheBuster\n } else {\n hasMounted.current = true\n }\n }, [cacheBuster])\n\n const [formUuid] = React.useState(() => uuid())\n\n // Server-rendered custom components (from admin.components, NOT viewMap).\n // When viewMap components exist, we render them directly with formData instead.\n const [CustomLabel, setCustomLabel] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomLabelFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.BlockLabel ?? undefined\n })\n\n const [CustomBlock, setCustomBlock] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomBlockFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.Block ?? undefined\n })\n\n const resolvedCustomBlock = useMemo(() => {\n if (CustomBlockFromProps) {\n return (\n <CustomBlockFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useInlineBlockComponentContext={useInlineBlockComponentContext}\n />\n )\n }\n return CustomBlock\n }, [CustomBlockFromProps, baseClass, formData, nodeKey, CustomBlock])\n\n const resolvedCustomLabel = useMemo(() => {\n if (CustomLabelFromProps) {\n return (\n <CustomLabelFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useInlineBlockComponentContext={useInlineBlockComponentContext}\n />\n )\n }\n return CustomLabel\n }, [CustomLabelFromProps, baseClass, formData, nodeKey, CustomLabel])\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-inlineBlocks-create-${uuidFromContext}-${formData.id}`,\n depth: editDepth,\n })\n const { toggleDrawer } = useLexicalDrawer(drawerSlug, true)\n\n const inlineBlockElemElemRef = useRef<HTMLDivElement | null>(null)\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { config } = useConfig()\n\n const componentMapRenderedBlockPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.${blockType}`\n\n const clientSchemaMap = featureClientSchemaMap['blocks']\n\n const blocksField: BlocksFieldClient | undefined = clientSchemaMap?.[\n componentMapRenderedBlockPath\n ]?.[0] as BlocksFieldClient | undefined\n\n const blockOrSlug = blocksField?.blocks?.[0]\n const clientBlock: ClientBlock | undefined =\n typeof blockOrSlug === 'string' ? config.blocksMap[blockOrSlug] : blockOrSlug\n\n const clientBlockFields = clientBlock?.fields ?? []\n\n // Open drawer on \"mount\"\n useEffect(() => {\n if (!firstTimeDrawer.current && createdInlineBlock?.getKey() === nodeKey) {\n // > 2 because they always have \"id\" and \"blockName\" fields\n if (clientBlockFields.length > 2) {\n toggleDrawer()\n }\n setCreatedInlineBlock?.(undefined)\n firstTimeDrawer.current = true\n }\n }, [clientBlockFields.length, createdInlineBlock, nodeKey, setCreatedInlineBlock, toggleDrawer])\n\n const removeInlineBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const blockDisplayName = clientBlock?.labels?.singular\n ? getTranslation(clientBlock?.labels.singular, i18n)\n : clientBlock?.slug\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n\n // Initial state for newly created blocks\n useEffect(() => {\n const abortController = new AbortController()\n\n const awaitInitialState = async () => {\n /*\n * This will only run if a new block is created. For all existing blocks that are loaded when the document is loaded, or when the form is saved,\n * this is not run, as the lexical field RSC will fetch the state server-side and pass it to the client. That way, we avoid unnecessary client-side\n * requests. Though for newly created blocks, we need to fetch the state client-side, as the server doesn't know about the block yet.\n */\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: formData,\n docPermissions: { fields: true },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n globalSlug,\n initialBlockData: formData,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: abortController.signal,\n })\n\n if (state) {\n const newFormStateData = reduceFormStateToBlockData(\n deepCopyObjectSimpleWithoutReactComponents(state, { excludeFiles: true }),\n ) as InlineBlockFields\n\n // Things like default values may come back from the server => update the node with the new data\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isInlineBlockNode(node)) {\n const newData = newFormStateData\n newData.blockType = formData.blockType\n\n node.setFields(newData, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n\n setInitialState(state)\n if (!CustomLabelFromProps) {\n setCustomLabel(state['_components']?.customComponents?.BlockLabel)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(state['_components']?.customComponents?.Block)\n }\n }\n }\n\n if (clientBlock && formData && !initialState) {\n void awaitInitialState()\n }\n\n return () => {\n abortAndIgnore(abortController)\n }\n }, [\n getFormState,\n editor,\n nodeKey,\n isEditable,\n CustomLabelFromProps,\n CustomBlockFromProps,\n schemaFieldsPath,\n id,\n formData,\n initialState,\n collectionSlug,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n clientBlock,\n ])\n\n /**\n * HANDLE ONCHANGE\n */\n const onChange = useCallback(\n async ({ formState: prevFormState, submit }: { formState: FormState; submit?: boolean }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n const blockData = reduceFormStateToBlockData(\n deepCopyObjectSimpleWithoutReactComponents(prevFormState, { excludeFiles: true }),\n formDataRef.current,\n )\n\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: blockData,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n formState: prevFormState,\n globalSlug,\n initialBlockData: blockData,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: submit ? true : false,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n if (submit) {\n if (!CustomLabelFromProps) {\n setCustomLabel(state['_components']?.customComponents?.BlockLabel)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(state['_components']?.customComponents?.Block)\n }\n }\n\n return state\n },\n [\n getFormState,\n id,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n isEditable,\n schemaFieldsPath,\n CustomBlockFromProps,\n CustomLabelFromProps,\n ],\n )\n // cleanup effect\n useEffect(() => {\n const isStateOutOfSync = (formData: InlineBlockFields, initialState: FormState) => {\n return Object.keys(initialState).some(\n (key) => initialState[key] && formData[key] !== initialState[key].value,\n )\n }\n\n return () => {\n // If the component is unmounted (either via removeInlineBlock or via lexical itself) and the form state got changed before,\n // we need to reset the initial state to force a re-fetch of the initial state when it gets mounted again (e.g. via lexical history undo).\n // Otherwise it would use an outdated initial state.\n if (initialState && isStateOutOfSync(formData, initialState)) {\n setInitialState(false)\n }\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [formData, initialState])\n\n /**\n * HANDLE FORM SUBMIT\n */\n const onFormSubmit = useCallback(\n (formState: FormState) => {\n const newData = reduceFormStateToBlockData(formState, formDataRef.current)\n newData.blockType = blockType\n\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isInlineBlockNode(node)) {\n node.setFields(newData as InlineBlockFields, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n },\n [blockType, editor, nodeKey],\n )\n\n const { headerActions, submitRef } = useDrawerSubmit()\n\n const RemoveButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n e.stopPropagation()\n removeInlineBlock()\n }}\n round\n size=\"medium\"\n tooltip={t('lexical:blocks:inlineBlocks:remove', { label: blockDisplayName })}\n />\n ),\n [baseClass, blockDisplayName, isEditable, removeInlineBlock, t],\n )\n\n const EditButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__editButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={() => {\n toggleDrawer()\n }}\n round\n size=\"medium\"\n tooltip={t('lexical:blocks:inlineBlocks:edit', { label: blockDisplayName })}\n />\n ),\n [baseClass, blockDisplayName, isEditable, t, toggleDrawer],\n )\n\n const InlineBlockContainer = useMemo(\n () =>\n ({ children, className }: { children: React.ReactNode; className?: string }) => (\n <div\n className={[`${baseClass}__container`, baseClass + '-' + formData.blockType, className]\n .filter(Boolean)\n .join(' ')}\n {...(isEditable\n ? {\n onClick: () => toggleDrawer(),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n toggleDrawer()\n }\n },\n role: 'button',\n tabIndex: 0,\n }\n : {})}\n ref={inlineBlockElemElemRef}\n >\n {children}\n </div>\n ),\n [baseClass, formData.blockType, isEditable, toggleDrawer],\n )\n\n const Label = useMemo(() => {\n if (resolvedCustomLabel) {\n return () => resolvedCustomLabel\n } else {\n return () => (\n <div>{clientBlock?.labels ? getTranslation(clientBlock?.labels.singular, i18n) : ''}</div>\n )\n }\n }, [resolvedCustomLabel, clientBlock?.labels, i18n])\n\n if (!clientBlock) {\n return (\n <InlineBlockContainer className={`${baseClass}-not-found`}>\n <span>Error: Block '{formData.blockType}' not found</span>\n {isEditable ? (\n <div className={`${baseClass}__actions`}>\n <RemoveButton />\n </div>\n ) : null}\n </InlineBlockContainer>\n )\n }\n\n return (\n <Form\n beforeSubmit={[\n async ({ formState }) => {\n // This is only called when form is submitted from drawer\n return await onChange({ formState, submit: true })\n },\n ]}\n disableValidationOnSubmit\n el=\"div\"\n fields={clientBlock?.fields}\n initialState={initialState || {}}\n onChange={[onChange]}\n onSubmit={(formState) => {\n onFormSubmit(formState)\n toggleDrawer()\n }}\n uuid={formUuid}\n >\n <EditDepthProvider>\n <Drawer\n className={''}\n headerActions={headerActions}\n slug={drawerSlug}\n title={t(`lexical:blocks:inlineBlocks:${formData?.id ? 'edit' : 'create'}`, {\n label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label'),\n })}\n >\n {initialState ? (\n <div className=\"fields-drawer\">\n <RenderFields\n fields={clientBlock?.fields}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <RegisterFormSubmit submitRef={submitRef} />\n </div>\n ) : null}\n </Drawer>\n </EditDepthProvider>\n {resolvedCustomBlock ? (\n <InlineBlockComponentContext\n value={{\n EditButton,\n initialState,\n InlineBlockContainer,\n Label,\n nodeKey,\n RemoveButton,\n }}\n >\n {resolvedCustomBlock}\n </InlineBlockComponentContext>\n ) : (\n <InlineBlockContainer>\n {initialState ? <Label /> : <ShimmerEffect height=\"15px\" width=\"40px\" />}\n {isEditable ? (\n <div className={`${baseClass}__actions`}>\n <RemoveButton />\n </div>\n ) : null}\n </InlineBlockContainer>\n )}\n </Form>\n )\n}\n", "import type { Data, FormState } from 'payload'\n\nimport { dequal } from 'dequal/lite'\nimport { reduceFieldsToValues } from 'payload/shared'\n\nexport const getCachedFormStateIfDataMatches = ({\n cachedFormState,\n cachedSchemaPath,\n currentSchemaPath,\n formData,\n}: {\n cachedFormState: FormState\n cachedSchemaPath?: string\n currentSchemaPath?: string\n formData: Data\n}): false | FormState => {\n if (cachedSchemaPath !== currentSchemaPath) {\n return false\n }\n\n const cachedData = reduceFormStateToBlockData(cachedFormState)\n const currentData = normalizeData({\n data: formData,\n rowFieldPaths: getRowFieldPaths(cachedFormState),\n })\n\n return dequal(withoutSystemBlockFields(cachedData), withoutSystemBlockFields(currentData))\n ? cachedFormState\n : false\n}\n\nexport const reduceFormStateToBlockData = (formState: FormState, currentData?: Data): Data => {\n const formStateWithoutRowCounts = Object.fromEntries(\n Object.entries(formState).map(([path, fieldState]) => {\n if (!fieldState || !Array.isArray(fieldState.rows)) {\n return [path, fieldState]\n }\n\n if (\n fieldState.value === undefined ||\n (fieldState.disableFormData !== false &&\n fieldState.isModified !== true &&\n fieldState.rows.length === 0 &&\n getValueAtPath(currentData, path) === null)\n ) {\n return [path, { ...fieldState, value: null }]\n }\n\n return [\n path,\n fieldState.value === null ? fieldState : { ...fieldState, disableFormData: true },\n ]\n }),\n ) as FormState\n\n return normalizeData({\n data: reduceFieldsToValues(formStateWithoutRowCounts, true),\n rowFieldPaths: new Set(),\n })\n}\n\nconst getValueAtPath = (data: Data | undefined, path: string): unknown =>\n path.split('.').reduce<unknown>((value, pathSegment) => {\n if (!value || typeof value !== 'object') {\n return undefined\n }\n\n return (value as Record<string, unknown>)[pathSegment]\n }, data)\n\nconst getRowFieldPaths = (formState: FormState): Set<string> =>\n new Set(\n Object.entries(formState)\n .filter(\n ([, fieldState]) =>\n Array.isArray(fieldState?.rows) &&\n fieldState.value !== null &&\n fieldState.value !== undefined,\n )\n .map(([path]) => path),\n )\n\nconst normalizeData = ({\n data,\n parentPath = '',\n rowFieldPaths,\n}: {\n data: Data\n parentPath?: string\n rowFieldPaths: Set<string>\n}): Data => {\n const normalizedData: Data = {}\n\n for (const [key, value] of Object.entries(data)) {\n const path = parentPath ? `${parentPath}.${key}` : key\n const normalizedValue = normalizeValue({ parentPath: path, rowFieldPaths, value })\n\n if (normalizedValue !== undefined) {\n normalizedData[key] = normalizedValue\n }\n }\n\n return normalizedData\n}\n\nconst normalizeValue = ({\n parentPath,\n rowFieldPaths,\n value,\n}: {\n parentPath: string\n rowFieldPaths: Set<string>\n value: unknown\n}): unknown => {\n if (\n value === undefined ||\n (Array.isArray(value) && value.length === 0 && rowFieldPaths.has(parentPath))\n ) {\n return undefined\n }\n\n if (Array.isArray(value)) {\n return value.map((item, index) =>\n item && typeof item === 'object' && !Array.isArray(item)\n ? normalizeData({\n data: item as Data,\n parentPath: `${parentPath}.${index}`,\n rowFieldPaths,\n })\n : item,\n )\n }\n\n if (value && typeof value === 'object' && Object.getPrototypeOf(value) === Object.prototype) {\n return normalizeData({ data: value as Data, parentPath, rowFieldPaths })\n }\n\n return value\n}\n\nconst withoutSystemBlockFields = ({\n blockName: _blockName,\n blockType: _blockType,\n ...data\n}: Data): Data => data\n", "'use client'\nimport ObjectID from 'bson-objectid'\nimport {\n $applyNodeReplacement,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n} from 'lexical'\nimport React, { type JSX } from 'react'\n\nimport type { ViewMapInlineBlockComponentProps } from '../../../../types/index.js'\nimport type { InlineBlockFields, SerializedInlineBlockNode } from '../../server/schema.js'\n\nimport { ServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js'\n\nconst InlineBlockComponent = React.lazy(() =>\n import('../componentInline/index.js').then((module) => ({\n default: module.InlineBlockComponent,\n })),\n)\n\nexport type InlineBlockDecorateFunction = (\n editor: LexicalEditor,\n config: EditorConfig,\n CustomBlock?: React.FC<ViewMapInlineBlockComponentProps>,\n CustomLabel?: React.FC<ViewMapInlineBlockComponentProps>,\n) => JSX.Element\n\nexport class InlineBlockNode extends ServerInlineBlockNode {\n static override clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return super.clone(node)\n }\n\n static override getType(): string {\n return super.getType()\n }\n\n static override importJSON(serializedNode: SerializedInlineBlockNode): InlineBlockNode {\n const node = $createInlineBlockNode(serializedNode.fields)\n return node\n }\n\n override decorate(\n ...[_editor, config, CustomBlock, CustomLabel]: Parameters<InlineBlockDecorateFunction>\n ): ReturnType<InlineBlockDecorateFunction> {\n return (\n <InlineBlockComponent\n cacheBuster={this.getCacheBuster()}\n className={config.theme.inlineBlock ?? 'LexicalEditorTheme__inlineBlock'}\n CustomBlock={CustomBlock}\n CustomLabel={CustomLabel}\n formData={this.getFields()}\n nodeKey={this.getKey()}\n />\n )\n }\n\n override exportJSON(): SerializedInlineBlockNode {\n return super.exportJSON()\n }\n}\n\nexport function $createInlineBlockNode(fields: Exclude<InlineBlockFields, 'id'>): InlineBlockNode {\n return $applyNodeReplacement(\n new InlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n }),\n )\n}\n\nexport function $isInlineBlockNode(\n node: InlineBlockNode | LexicalNode | null | undefined,\n): node is InlineBlockNode {\n return node instanceof InlineBlockNode\n}\n", "import type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n} from 'lexical'\nimport type React from 'react'\nimport type { JSX } from 'react'\n\nimport { addClassNamesToElement } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport { $applyNodeReplacement, DecoratorNode } from 'lexical'\n\nimport type { InlineBlockFields, SerializedInlineBlockNode } from '../schema.js'\n\nexport class ServerInlineBlockNode extends DecoratorNode<null | React.ReactElement> {\n __cacheBuster: number\n __fields: InlineBlockFields\n\n constructor({\n cacheBuster,\n fields,\n key,\n }: {\n cacheBuster?: number\n fields: InlineBlockFields\n key?: NodeKey\n }) {\n super(key)\n this.__fields = fields\n this.__cacheBuster = cacheBuster || 0\n }\n\n static override clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return new this({\n cacheBuster: node.__cacheBuster,\n fields: node.__fields,\n key: node.__key,\n })\n }\n\n static override getType(): string {\n return 'inlineBlock'\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static override importJSON(serializedNode: SerializedInlineBlockNode): ServerInlineBlockNode {\n const node = $createServerInlineBlockNode(serializedNode.fields)\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n canIndent() {\n return true\n }\n\n override createDOM(config?: EditorConfig): HTMLElement {\n const element = document.createElement('span')\n addClassNamesToElement(element, config?.theme?.inlineBlock)\n return element\n }\n\n override decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element | null {\n return null\n }\n\n override exportDOM(): DOMExportOutput {\n const element = document.createElement('span')\n element.classList.add('inline-block-container')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n override exportJSON(): SerializedInlineBlockNode {\n return {\n type: 'inlineBlock',\n fields: this.getFields(),\n version: 1,\n }\n }\n\n getCacheBuster(): number {\n return this.getLatest().__cacheBuster\n }\n\n getFields(): InlineBlockFields {\n return this.getLatest().__fields\n }\n\n override getTextContent(): string {\n return `Block Field`\n }\n\n override isInline() {\n return true\n }\n\n setFields(fields: InlineBlockFields, preventFormStateUpdate?: boolean): void {\n const writable = this.getWritable()\n writable.__fields = fields\n if (!preventFormStateUpdate) {\n writable.__cacheBuster++\n }\n }\n\n override updateDOM(): boolean {\n return false\n }\n}\n\nexport function $createServerInlineBlockNode(\n fields: Exclude<InlineBlockFields, 'id'>,\n): ServerInlineBlockNode {\n return $applyNodeReplacement(\n new ServerInlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n }),\n )\n}\n\nexport function $isServerInlineBlockNode(\n node: LexicalNode | null | ServerInlineBlockNode | undefined,\n): node is ServerInlineBlockNode {\n return node instanceof ServerInlineBlockNode\n}\n"],
5
+ "mappings": "oJAIA,OAASA,6BAAAA,OAAiC,wCAC1C,OAASC,sBAAAA,OAA0B,oCACnC,OAASC,kBAAAA,OAAsB,2BAC/B,OACEC,UAAAA,GACAC,UAAAA,GACAC,qBAAAA,GACAC,QAAAA,GACAC,oBAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,aAAAA,GACAC,mBAAAA,GACAC,mBAAAA,GACAC,gBAAAA,GACAC,sBAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,kBAAAA,MAAsB,wBAC/B,OAASC,iBAAAA,EAAeC,0BAAAA,OAA8B,UAEtD,OAAO,8CAAAC,MAAA,iBACP,OAAOC,GAAA,iBAAAC,GAAA,eAAAC,EAAA,aAAAC,EAAA,WAAAC,EAAA,UAAAC,MAAA,QAEP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AE1C,UAACA,GAAarE,CAAA,aAChB,SAAA,CACG8H,EAAAA,OAAAA,CAAqB5H,SAAW,CAAA,iBAAGG,EAAqB,UAAA,aAAA,MACtDsH,EAAA,MAAA,WAAK,GAAA3H,CAAA,qBACL2H,EACCA,EAAC,CAAA,CAAA,IAAIzH,IAAAA",
6
+ "names": ["useLexicalComposerContext", "useLexicalEditable", "getTranslation", "Button", "Drawer", "EditDepthProvider", "Form", "formatDrawerSlug", "RenderFields", "ShimmerEffect", "useConfig", "useDocumentForm", "useDocumentInfo", "useEditDepth", "useServerFunctions", "useTranslation", "abortAndIgnore", "$getNodeByKey", "SKIP_DOM_SELECTION_TAG", "deepCopyObjectSimpleWithoutReactComponents", "React", "createContext", "useCallback", "useEffect", "useMemo", "useRef", "dequal", "reduceFieldsToValues", "getCachedFormStateIfDataMatches", "cachedFormState", "cachedSchemaPath", "currentSchemaPath", "formData", "cachedData", "reduceFormStateToBlockData", "currentData", "normalizeData", "data", "rowFieldPaths", "getRowFieldPaths", "withoutSystemBlockFields", "formState", "formStateWithoutRowCounts", "Object", "fromEntries", "entries", "map", "path", "fieldState", "Array", "isArray", "rows", "value", "undefined", "disableFormData", "isModified", "length", "getValueAtPath", "Set", "split", "reduce", "pathSegment", "filter", "parentPath", "normalizedData", "key", "normalizedValue", "normalizeValue", "has", "item", "index", "getPrototypeOf", "prototype", "blockName", "_blockName", "blockType", "_blockType", "ObjectID", "$applyNodeReplacement", "React", "addClassNamesToElement", "ObjectID", "$applyNodeReplacement", "DecoratorNode", "ServerInlineBlockNode", "__cacheBuster", "__fields", "constructor", "cacheBuster", "fields", "key", "clone", "node", "__key", "getType", "importDOM", "importJSON", "serializedNode", "$createServerInlineBlockNode", "isInline", "canIndent", "createDOM", "config", "element", "document", "createElement", "theme", "inlineBlock", "decorate", "editor", "exportDOM", "classList", "add", "text", "createTextNode", "getTextContent", "append", "exportJSON", "type", "getFields", "version", "getCacheBuster", "getLatest", "setFields", "preventFormStateUpdate", "writable", "getWritable", "updateDOM", "id", "default", "toHexString", "InlineBlockComponent", "React", "lazy", "then", "module", "default", "InlineBlockNode", "ServerInlineBlockNode", "clone", "node", "getType", "importJSON", "serializedNode", "$createInlineBlockNode", "fields", "decorate", "_editor", "config", "CustomBlock", "CustomLabel", "_jsx", "cacheBuster", "getCacheBuster", "className", "theme", "inlineBlock", "formData", "getFields", "nodeKey", "getKey", "exportJSON", "$applyNodeReplacement", "id", "ObjectID", "toHexString", "$isInlineBlockNode", "InlineBlockComponentContext", "reduceFormStateToBlockData", "$isInlineBlockNode", "initialState", "React", "InlineBlockComponent", "props", "cacheBuster", "baseClass", "CustomBlockFromProps", "className", "CustomBlock", "CustomLabel", "formData", "nodeKey", "useLexicalEditable", "i18n", "t", "createdInlineBlock", "fieldProps", "featureClientSchemaMap", "uuidFromContext", "setCreatedInlineBlock", "useEditorConfigContext", "useDocumentForm", "fields", "getFormState", "useServerFunctions", "useRef", "editDepth", "useEditDepth", "firstTimeDrawer", "formDataRef", "blockType", "setInitialState", "useState", "cachedFormState", "cachedState", "getCachedFormStateIfDataMatches", "schemaFieldsPath", "cachedSchemaPath", "hasMounted", "prevCacheBuster", "useEffect", "current", "formUuid", "uuid", "setCustomLabel", "CustomLabelFromProps", "customComponents", "BlockLabel", "resolvedCustomBlock", "useMemo", "isEditor", "useInlineBlockComponentContext", "resolvedCustomLabel", "drawerSlug", "depth", "toggleDrawer", "useLexicalDrawer", "id", "collectionSlug", "getDocPreferences", "globalSlug", "config", "useConfig", "clientSchemaMap", "componentMapRenderedBlockPath", "blocksField", "blockOrSlug", "clientBlockFields", "removeInlineBlock", "useCallback", "editor", "length", "$getNodeByKey", "blockDisplayName", "clientBlock", "getTranslation", "onChangeAbortControllerRef", "abortController", "state", "data", "docPermissions", "deepCopyObjectSimpleWithoutReactComponents", "parentDocumentFields", "docPreferences", "documentFormState", "initialBlockData", "operation", "readOnly", "isEditable", "renderAllFields", "signal", "newFormStateData", "node", "newData", "SKIP_DOM_SELECTION_TAG", "setCustomBlock", "awaitInitialState", "abortAndIgnore", "submit", "formState", "controller", "prevFormState", "excludeFiles", "blockData", "state_0", "isStateOutOfSync", "formData_0", "initialState_0", "key", "Object", "newData_0", "onFormSubmit", "node_0", "tag", "headerActions", "submitRef", "useDrawerSubmit", "RemoveButton", "buttonStyle", "disabled", "e", "icon", "onClick", "round", "size", "tooltip", "label", "EditButton", "_jsx", "Button", "el", "InlineBlockContainer", "e_0", "onKeyDown", "role", "tabIndex", "children", "ref", "inlineBlockElemElemRef", "formState_0", "beforeSubmit", "onChange", "disableValidationOnSubmit", "onSubmit", "EditDepthProvider", "Drawer", "slug", "title", "_jsxs", "RenderFields", "forceRender", "parentIndexPath", "parentPath", "parentSchemaPath", "RegisterFormSubmit", "value", "Label", "height", "width"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";import{c as a,d as b}from"./chunk-ATPSL6IX.js";import"./chunk-5VIL27GI.js";import"./chunk-RJ5MAOKZ.js";export{b as InlineBlockComponent,a as useInlineBlockComponentContext};
2
+ //# sourceMappingURL=componentInline-ZEP5JPTC.js.map