@payloadcms/richtext-lexical 3.84.1 → 4.0.0-internal.38b7f1d

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 (619) hide show
  1. package/dist/exports/client/Field-PJW7KUJG.js +2 -0
  2. package/dist/exports/client/Field-PJW7KUJG.js.map +7 -0
  3. package/dist/exports/client/RelationshipComponent-5RONAYJM.js +2 -0
  4. package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +7 -0
  5. package/dist/exports/client/bundled.css +1 -1
  6. package/dist/exports/client/chunk-44G3K3W7.js +2 -0
  7. package/dist/exports/client/chunk-44G3K3W7.js.map +7 -0
  8. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  9. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  10. package/dist/exports/client/component-53Y3RYR5.js +2 -0
  11. package/dist/exports/client/component-53Y3RYR5.js.map +7 -0
  12. package/dist/exports/client/componentInline-PM4PLNUK.js +2 -0
  13. package/dist/exports/client/index.d.ts +0 -2
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +30 -30
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  18. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  19. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  20. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  21. package/dist/features/blockquote/server/index.js +0 -39
  22. package/dist/features/blockquote/server/index.js.map +1 -1
  23. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  24. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  25. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  26. package/dist/features/blocks/client/component/index.css +178 -0
  27. package/dist/features/blocks/client/component/index.d.ts +1 -1
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +88 -16
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/componentInline/index.css +85 -0
  32. package/dist/features/blocks/client/componentInline/index.d.ts +1 -1
  33. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  34. package/dist/features/blocks/client/componentInline/index.js +29 -6
  35. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  36. package/dist/features/blocks/client/index.d.ts.map +1 -1
  37. package/dist/features/blocks/client/index.js +0 -2
  38. package/dist/features/blocks/client/index.js.map +1 -1
  39. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  40. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  41. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  42. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  43. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  44. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  46. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  47. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  48. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  49. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  50. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  51. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  52. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  53. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  54. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  55. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  56. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  57. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  58. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  59. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  60. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  61. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  62. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  63. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  64. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  65. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  66. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  67. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  68. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  69. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  70. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  71. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  72. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  73. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  74. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  75. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  76. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  77. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  78. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  79. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  80. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  81. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  82. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  83. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  84. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  85. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  86. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  87. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  88. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  89. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  90. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  91. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  92. package/dist/features/experimental_table/server/index.js +0 -102
  93. package/dist/features/experimental_table/server/index.js.map +1 -1
  94. package/dist/features/heading/server/index.d.ts.map +1 -1
  95. package/dist/features/heading/server/index.js +0 -39
  96. package/dist/features/heading/server/index.js.map +1 -1
  97. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  98. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  99. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  100. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  101. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  102. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  103. package/dist/features/horizontalRule/server/index.js +0 -8
  104. package/dist/features/horizontalRule/server/index.js.map +1 -1
  105. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  106. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  107. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  108. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  109. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  110. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  111. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  112. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  113. package/dist/features/link/server/index.d.ts.map +1 -1
  114. package/dist/features/link/server/index.js +0 -71
  115. package/dist/features/link/server/index.js.map +1 -1
  116. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  117. package/dist/features/lists/checklist/server/index.js +0 -7
  118. package/dist/features/lists/checklist/server/index.js.map +1 -1
  119. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  120. package/dist/features/lists/orderedList/server/index.js +0 -7
  121. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  122. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  123. package/dist/features/lists/unorderedList/server/index.js +0 -7
  124. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  125. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  126. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  127. package/dist/features/relationship/client/components/RelationshipComponent.js +27 -2
  128. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  129. package/dist/features/relationship/client/components/index.css +112 -0
  130. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  131. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  132. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  133. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  134. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  135. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  136. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  137. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  138. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  139. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  140. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  141. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  142. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  143. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  144. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  145. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  146. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +4 -0
  147. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  148. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  149. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  150. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  151. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  152. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  153. package/dist/features/toolbars/types.d.ts +4 -0
  154. package/dist/features/toolbars/types.d.ts.map +1 -1
  155. package/dist/features/toolbars/types.js.map +1 -1
  156. package/dist/features/typesServer.d.ts +0 -17
  157. package/dist/features/typesServer.d.ts.map +1 -1
  158. package/dist/features/typesServer.js.map +1 -1
  159. package/dist/features/upload/client/component/index.css +218 -0
  160. package/dist/features/upload/client/component/index.d.ts +1 -1
  161. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  162. package/dist/features/upload/client/component/index.js +86 -63
  163. package/dist/features/upload/client/component/index.js.map +1 -1
  164. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  165. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  166. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  167. package/dist/features/upload/server/index.d.ts.map +1 -1
  168. package/dist/features/upload/server/index.js +0 -78
  169. package/dist/features/upload/server/index.js.map +1 -1
  170. package/dist/field/Diff/converters/listitem/index.css +44 -0
  171. package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
  172. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  173. package/dist/field/Diff/converters/listitem/index.js +1 -0
  174. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  175. package/dist/field/Diff/converters/relationship/index.css +68 -0
  176. package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
  177. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  178. package/dist/field/Diff/converters/relationship/index.js +1 -0
  179. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  180. package/dist/field/Diff/converters/unknown/index.css +37 -0
  181. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  182. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  183. package/dist/field/Diff/converters/unknown/index.js +1 -0
  184. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  185. package/dist/field/Diff/converters/upload/index.css +112 -0
  186. package/dist/field/Diff/converters/upload/index.d.ts +1 -1
  187. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  188. package/dist/field/Diff/converters/upload/index.js +1 -0
  189. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  190. package/dist/field/Diff/index.css +101 -0
  191. package/dist/field/Diff/index.d.ts +1 -1
  192. package/dist/field/Diff/index.d.ts.map +1 -1
  193. package/dist/field/Diff/index.js +1 -0
  194. package/dist/field/Diff/index.js.map +1 -1
  195. package/dist/field/Field.d.ts +2 -2
  196. package/dist/field/Field.d.ts.map +1 -1
  197. package/dist/field/Field.js +11 -9
  198. package/dist/field/Field.js.map +1 -1
  199. package/dist/field/ViewSelector.css +32 -0
  200. package/dist/field/ViewSelector.d.ts +1 -1
  201. package/dist/field/ViewSelector.d.ts.map +1 -1
  202. package/dist/field/ViewSelector.js +1 -0
  203. package/dist/field/ViewSelector.js.map +1 -1
  204. package/dist/field/bundled.css +1 -1
  205. package/dist/field/index.css +60 -0
  206. package/dist/index.d.ts +0 -10
  207. package/dist/index.d.ts.map +1 -1
  208. package/dist/index.js +11 -10
  209. package/dist/index.js.map +1 -1
  210. package/dist/lexical/LexicalEditor.css +50 -0
  211. package/dist/lexical/LexicalEditor.d.ts +1 -1
  212. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  213. package/dist/lexical/LexicalEditor.js +1 -0
  214. package/dist/lexical/LexicalEditor.js.map +1 -1
  215. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  216. package/dist/lexical/config/server/loader.js +12 -9
  217. package/dist/lexical/config/server/loader.js.map +1 -1
  218. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  219. package/dist/lexical/config/server/sanitize.js +0 -6
  220. package/dist/lexical/config/server/sanitize.js.map +1 -1
  221. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  222. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  223. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  224. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  225. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  226. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  227. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  228. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  229. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  230. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  231. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  232. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  233. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  234. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  235. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  236. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  237. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  238. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  239. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  240. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  241. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  242. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  243. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  244. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  245. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  246. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  247. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  248. package/dist/lexical/theme/EditorTheme.css +359 -0
  249. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  250. package/dist/lexical/theme/EditorTheme.js +1 -0
  251. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  252. package/dist/lexical/ui/ContentEditable.css +95 -0
  253. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  254. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  255. package/dist/lexical/ui/ContentEditable.js +1 -0
  256. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  257. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  258. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  259. package/dist/lexical/ui/icons/Add/index.js +19 -12
  260. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  261. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  262. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  263. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  264. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  265. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  266. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  267. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  268. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  269. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  270. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  271. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  272. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  273. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  274. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  275. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  276. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  277. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  278. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  279. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  280. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  281. package/dist/lexical/ui/icons/Block/index.js +13 -28
  282. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  283. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  284. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  285. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  286. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  287. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  288. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  289. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  290. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  291. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  292. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  293. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  294. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  295. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  296. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  297. package/dist/lexical/ui/icons/Code/index.js +15 -13
  298. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  299. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  300. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  301. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  302. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  303. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  304. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  305. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  306. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  307. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  308. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  309. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  310. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  311. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  312. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  313. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  314. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  315. package/dist/lexical/ui/icons/H1/index.js +9 -6
  316. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  317. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  318. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  319. package/dist/lexical/ui/icons/H2/index.js +9 -6
  320. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  321. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  322. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  323. package/dist/lexical/ui/icons/H3/index.js +9 -6
  324. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  325. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  326. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  327. package/dist/lexical/ui/icons/H4/index.js +9 -6
  328. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  329. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  330. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  331. package/dist/lexical/ui/icons/H5/index.js +9 -6
  332. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  333. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  334. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  335. package/dist/lexical/ui/icons/H6/index.js +9 -6
  336. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  337. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  338. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  339. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  340. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  341. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  342. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  343. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  344. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  345. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  346. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  347. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  348. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  349. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  350. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  351. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  352. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  353. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  354. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  355. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  356. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  357. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  358. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  359. package/dist/lexical/ui/icons/Link/index.js +14 -9
  360. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  361. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  362. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  363. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  364. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  365. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  366. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  367. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  368. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  369. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  370. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  371. package/dist/lexical/ui/icons/Page/index.js +21 -0
  372. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  373. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  374. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  375. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  376. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  377. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  378. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  379. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  380. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  381. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  382. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  383. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  384. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  385. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  386. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  387. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  388. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  389. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  390. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  391. package/dist/lexical/ui/icons/Table/index.js +20 -15
  392. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  393. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  394. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  395. package/dist/lexical/ui/icons/Text/index.js +17 -8
  396. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  397. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  398. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  399. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  400. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  401. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  402. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  403. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  404. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  405. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  406. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  407. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  408. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  409. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  410. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  411. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  412. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  413. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  414. package/dist/utilities/buildEditorState.js +13 -0
  415. package/dist/utilities/buildEditorState.js.map +1 -1
  416. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  417. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  418. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  419. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  420. package/package.json +10 -15
  421. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  422. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  423. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  424. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  425. package/dist/exports/client/Field-4UEGQMIN.js +0 -2
  426. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  427. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  428. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  429. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  430. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  431. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  432. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  433. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  434. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  435. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  436. package/dist/exports/server/migrate.d.ts +0 -16
  437. package/dist/exports/server/migrate.d.ts.map +0 -1
  438. package/dist/exports/server/migrate.js +0 -16
  439. package/dist/exports/server/migrate.js.map +0 -1
  440. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  441. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  442. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  443. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  444. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  445. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  446. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  447. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  448. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  449. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  450. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  451. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  452. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  453. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  454. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  455. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  456. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  457. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  458. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  459. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  460. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  461. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  462. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  463. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  464. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  465. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  466. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  467. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  468. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  469. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  470. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  471. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  472. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  473. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  474. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  475. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  476. package/dist/features/lists/htmlConverter.d.ts +0 -5
  477. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  478. package/dist/features/lists/htmlConverter.js +0 -81
  479. package/dist/features/lists/htmlConverter.js.map +0 -1
  480. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  481. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  482. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  483. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  484. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  485. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  486. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  487. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  488. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  489. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  490. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  491. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  492. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  493. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  494. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  495. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  496. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  497. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  498. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  499. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  500. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  501. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  502. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  503. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  504. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  505. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  506. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  507. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  508. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  509. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  510. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  511. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  512. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  513. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  514. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  515. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  516. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  517. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  518. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  519. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  520. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  521. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  522. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  523. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  524. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  525. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  526. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  527. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  528. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  529. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  530. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  531. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  532. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  533. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  534. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  535. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  536. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  537. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  538. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  539. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  540. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  541. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  542. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  543. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  544. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  545. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  546. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  547. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  548. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  549. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  550. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  551. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  552. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  553. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  554. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  555. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  556. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  557. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  558. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  559. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  560. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  561. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  562. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  563. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  564. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  565. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  566. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  567. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  568. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  569. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  570. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  571. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  572. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  573. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  574. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  575. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  576. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  577. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  578. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  579. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  580. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  581. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  582. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  583. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  584. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  585. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  586. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  587. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  588. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  589. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  590. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  591. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  592. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  593. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  594. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  595. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  596. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  597. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  598. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  599. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  600. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  601. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  602. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  603. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  604. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  605. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  606. package/dist/lexical/ui/icons/AI/index.js +0 -34
  607. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  608. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  609. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  610. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  611. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  612. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  613. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  614. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  615. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  616. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  617. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  618. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  619. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-PM4PLNUK.js.map} +0 -0
@@ -1,49 +1,22 @@
1
1
  'use client';
2
2
 
3
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import React from 'react';
5
- export const UnorderedListIcon = () => /*#__PURE__*/_jsxs("svg", {
5
+ const path = 'M7 16C7.55228 16 8 16.4477 8 17C8 17.5523 7.55228 18 7 18C6.44772 18 6 17.5523 6 17C6 16.4477 6.44772 16 7 16ZM17.5 16.5C17.7761 16.5 18 16.7239 18 17C18 17.2761 17.7761 17.5 17.5 17.5H10.5C10.2239 17.5 10 17.2761 10 17C10 16.7239 10.2239 16.5 10.5 16.5H17.5ZM7 11C7.55228 11 8 11.4477 8 12C8 12.5523 7.55228 13 7 13C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11ZM17.5 11.5C17.7761 11.5 18 11.7239 18 12C18 12.2761 17.7761 12.5 17.5 12.5H10.5C10.2239 12.5 10 12.2761 10 12C10 11.7239 10.2239 11.5 10.5 11.5H17.5ZM7 6C7.55228 6 8 6.44772 8 7C8 7.55228 7.55228 8 7 8C6.44772 8 6 7.55228 6 7C6 6.44772 6.44772 6 7 6ZM17.5 6.5C17.7761 6.5 18 6.72386 18 7C18 7.27614 17.7761 7.5 17.5 7.5H10.5C10.2239 7.5 10 7.27614 10 7C10 6.72386 10.2239 6.5 10.5 6.5H17.5Z';
6
+ export const UnorderedListIcon = ({
7
+ className
8
+ }) => /*#__PURE__*/_jsx("svg", {
6
9
  "aria-hidden": "true",
7
- className: "icon",
10
+ className: ['icon', className].filter(Boolean).join(' '),
8
11
  fill: "none",
9
12
  focusable: "false",
10
- height: "20",
11
- viewBox: "0 0 20 20",
12
- width: "20",
13
+ height: 24,
14
+ viewBox: "0 0 24 24",
15
+ width: 24,
13
16
  xmlns: "http://www.w3.org/2000/svg",
14
- children: [/*#__PURE__*/_jsx("circle", {
15
- cx: "4",
16
- cy: "5",
17
- fill: "currentColor",
18
- r: "1.15",
19
- stroke: "currentColor",
20
- strokeWidth: "0.3"
21
- }), /*#__PURE__*/_jsx("circle", {
22
- cx: "4",
23
- cy: "10",
24
- fill: "currentColor",
25
- r: "1.15",
26
- stroke: "currentColor",
27
- strokeWidth: "0.3"
28
- }), /*#__PURE__*/_jsx("circle", {
29
- cx: "4",
30
- cy: "15",
31
- fill: "currentColor",
32
- r: "1.15",
33
- stroke: "currentColor",
34
- strokeWidth: "0.3"
35
- }), /*#__PURE__*/_jsx("path", {
36
- d: "M17 5H7",
37
- stroke: "currentColor",
38
- strokeWidth: "1.5"
39
- }), /*#__PURE__*/_jsx("path", {
40
- d: "M17 10H7",
41
- stroke: "currentColor",
42
- strokeWidth: "1.5"
43
- }), /*#__PURE__*/_jsx("path", {
44
- d: "M17 15H7",
45
- stroke: "currentColor",
46
- strokeWidth: "1.5"
47
- })]
17
+ children: /*#__PURE__*/_jsx("path", {
18
+ d: path,
19
+ fill: "currentColor"
20
+ })
48
21
  });
49
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","UnorderedListIcon","_jsxs","className","fill","focusable","height","viewBox","width","xmlns","_jsx","cx","cy","r","stroke","strokeWidth","d"],"sources":["../../../../../src/lexical/ui/icons/UnorderedList/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UnorderedListIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"4\" cy=\"5\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"10\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <circle cx=\"4\" cy=\"15\" fill=\"currentColor\" r=\"1.15\" stroke=\"currentColor\" strokeWidth=\"0.3\" />\n <path d=\"M17 5H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 10H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n <path d=\"M17 15H7\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n </svg>\n)\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAElB,OAAO,MAAMC,iBAAA,GAA8BA,CAAA,kBACzCC,KAAA,CAAC;EACC,eAAY;EACZC,SAAA,EAAU;EACVC,IAAA,EAAK;EACLC,SAAA,EAAU;EACVC,MAAA,EAAO;EACPC,OAAA,EAAQ;EACRC,KAAA,EAAM;EACNC,KAAA,EAAM;0BAENC,IAAA,CAAC;IAAOC,EAAA,EAAG;IAAIC,EAAA,EAAG;IAAIR,IAAA,EAAK;IAAeS,CAAA,EAAE;IAAOC,MAAA,EAAO;IAAeC,WAAA,EAAY;mBACrFL,IAAA,CAAC;IAAOC,EAAA,EAAG;IAAIC,EAAA,EAAG;IAAKR,IAAA,EAAK;IAAeS,CAAA,EAAE;IAAOC,MAAA,EAAO;IAAeC,WAAA,EAAY;mBACtFL,IAAA,CAAC;IAAOC,EAAA,EAAG;IAAIC,EAAA,EAAG;IAAKR,IAAA,EAAK;IAAeS,CAAA,EAAE;IAAOC,MAAA,EAAO;IAAeC,WAAA,EAAY;mBACtFL,IAAA,CAAC;IAAKM,CAAA,EAAE;IAAUF,MAAA,EAAO;IAAeC,WAAA,EAAY;mBACpDL,IAAA,CAAC;IAAKM,CAAA,EAAE;IAAWF,MAAA,EAAO;IAAeC,WAAA,EAAY;mBACrDL,IAAA,CAAC;IAAKM,CAAA,EAAE;IAAWF,MAAA,EAAO;IAAeC,WAAA,EAAY","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","path","UnorderedListIcon","className","_jsx","filter","Boolean","join","fill","focusable","height","viewBox","width","xmlns","d"],"sources":["../../../../../src/lexical/ui/icons/UnorderedList/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nconst path =\n 'M7 16C7.55228 16 8 16.4477 8 17C8 17.5523 7.55228 18 7 18C6.44772 18 6 17.5523 6 17C6 16.4477 6.44772 16 7 16ZM17.5 16.5C17.7761 16.5 18 16.7239 18 17C18 17.2761 17.7761 17.5 17.5 17.5H10.5C10.2239 17.5 10 17.2761 10 17C10 16.7239 10.2239 16.5 10.5 16.5H17.5ZM7 11C7.55228 11 8 11.4477 8 12C8 12.5523 7.55228 13 7 13C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11ZM17.5 11.5C17.7761 11.5 18 11.7239 18 12C18 12.2761 17.7761 12.5 17.5 12.5H10.5C10.2239 12.5 10 12.2761 10 12C10 11.7239 10.2239 11.5 10.5 11.5H17.5ZM7 6C7.55228 6 8 6.44772 8 7C8 7.55228 7.55228 8 7 8C6.44772 8 6 7.55228 6 7C6 6.44772 6.44772 6 7 6ZM17.5 6.5C17.7761 6.5 18 6.72386 18 7C18 7.27614 17.7761 7.5 17.5 7.5H10.5C10.2239 7.5 10 7.27614 10 7C10 6.72386 10.2239 6.5 10.5 6.5H17.5Z'\n\nexport const UnorderedListIcon: React.FC<{\n readonly className?: string\n}> = ({ className }) => (\n <svg\n aria-hidden=\"true\"\n className={['icon', className].filter(Boolean).join(' ')}\n fill=\"none\"\n focusable=\"false\"\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d={path} fill=\"currentColor\" />\n </svg>\n)\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAElB,MAAMC,IAAA,GACJ;AAEF,OAAO,MAAMC,iBAAA,GAERA,CAAC;EAAEC;AAAS,CAAE,kBACjBC,IAAA,CAAC;EACC,eAAY;EACZD,SAAA,EAAW,CAAC,QAAQA,SAAA,CAAU,CAACE,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;EACpDC,IAAA,EAAK;EACLC,SAAA,EAAU;EACVC,MAAA,EAAQ;EACRC,OAAA,EAAQ;EACRC,KAAA,EAAO;EACPC,KAAA,EAAM;YAEN,aAAAT,IAAA,CAAC;IAAKU,CAAA,EAAGb,IAAA;IAAMO,IAAA,EAAK","ignoreList":[]}
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- export declare const UploadIcon: React.FC;
2
+ export declare const UploadIcon: React.FC<{
3
+ readonly className?: string;
4
+ }>;
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EA8B9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,CAaA,CAAA"}
@@ -1,31 +1,24 @@
1
1
  'use client';
2
2
 
3
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import React from 'react';
5
- export const UploadIcon = () => /*#__PURE__*/_jsxs("svg", {
5
+ const path = 'M16.2041 6.01074C17.2128 6.113 18 6.96435 18 8V16L17.9893 16.2041C17.8938 17.1457 17.1457 17.8938 16.2041 17.9893L16 18H8C6.96435 18 6.113 17.2128 6.01074 16.2041L6 16V8C6 6.89543 6.89543 6 8 6H16L16.2041 6.01074ZM8 7C7.44772 7 7 7.44772 7 8V16C7 16.5523 7.44772 17 8 17H16C16.5523 17 17 16.5523 17 16V8C17 7.44772 16.5523 7 16 7H8ZM9.72461 11.582C9.91869 11.4539 10.1827 11.4756 10.3535 11.6465L13.8535 15.1465C14.0488 15.3417 14.0488 15.6583 13.8535 15.8535C13.6583 16.0488 13.3417 16.0488 13.1465 15.8535L10 12.707L8.85352 13.8535C8.65825 14.0488 8.34175 14.0488 8.14648 13.8535C7.95122 13.6583 7.95122 13.3417 8.14648 13.1465L9.64648 11.6465L9.72461 11.582ZM14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8ZM14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9Z';
6
+ export const UploadIcon = ({
7
+ className
8
+ }) => /*#__PURE__*/_jsx("svg", {
6
9
  "aria-hidden": "true",
7
- className: "icon",
10
+ className: ['icon', className].filter(Boolean).join(' '),
8
11
  fill: "none",
9
12
  focusable: "false",
10
- height: "20",
11
- viewBox: "0 0 20 20",
12
- width: "20",
13
+ height: 24,
14
+ viewBox: "0 0 24 24",
15
+ width: 24,
13
16
  xmlns: "http://www.w3.org/2000/svg",
14
- children: [/*#__PURE__*/_jsx("path", {
15
- d: "M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z",
16
- stroke: "currentColor",
17
- strokeLinecap: "round",
18
- strokeLinejoin: "round"
19
- }), /*#__PURE__*/_jsx("path", {
20
- d: "M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z",
21
- stroke: "currentColor",
22
- strokeLinecap: "round",
23
- strokeLinejoin: "round"
24
- }), /*#__PURE__*/_jsx("path", {
25
- d: "M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995",
26
- stroke: "currentColor",
27
- strokeLinecap: "round",
28
- strokeLinejoin: "round"
29
- })]
17
+ children: /*#__PURE__*/_jsx("path", {
18
+ clipRule: "evenodd",
19
+ d: path,
20
+ fill: "currentColor",
21
+ fillRule: "evenodd"
22
+ })
30
23
  });
31
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","UploadIcon","_jsxs","className","fill","focusable","height","viewBox","width","xmlns","_jsx","d","stroke","strokeLinecap","strokeLinejoin"],"sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UploadIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAElB,OAAO,MAAMC,UAAA,GAAuBA,CAAA,kBAClCC,KAAA,CAAC;EACC,eAAY;EACZC,SAAA,EAAU;EACVC,IAAA,EAAK;EACLC,SAAA,EAAU;EACVC,MAAA,EAAO;EACPC,OAAA,EAAQ;EACRC,KAAA,EAAM;EACNC,KAAA,EAAM;0BAENC,IAAA,CAAC;IACCC,CAAA,EAAE;IACFC,MAAA,EAAO;IACPC,aAAA,EAAc;IACdC,cAAA,EAAe;mBAEjBJ,IAAA,CAAC;IACCC,CAAA,EAAE;IACFC,MAAA,EAAO;IACPC,aAAA,EAAc;IACdC,cAAA,EAAe;mBAEjBJ,IAAA,CAAC;IACCC,CAAA,EAAE;IACFC,MAAA,EAAO;IACPC,aAAA,EAAc;IACdC,cAAA,EAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","path","UploadIcon","className","_jsx","filter","Boolean","join","fill","focusable","height","viewBox","width","xmlns","clipRule","d","fillRule"],"sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nconst path =\n 'M16.2041 6.01074C17.2128 6.113 18 6.96435 18 8V16L17.9893 16.2041C17.8938 17.1457 17.1457 17.8938 16.2041 17.9893L16 18H8C6.96435 18 6.113 17.2128 6.01074 16.2041L6 16V8C6 6.89543 6.89543 6 8 6H16L16.2041 6.01074ZM8 7C7.44772 7 7 7.44772 7 8V16C7 16.5523 7.44772 17 8 17H16C16.5523 17 17 16.5523 17 16V8C17 7.44772 16.5523 7 16 7H8ZM9.72461 11.582C9.91869 11.4539 10.1827 11.4756 10.3535 11.6465L13.8535 15.1465C14.0488 15.3417 14.0488 15.6583 13.8535 15.8535C13.6583 16.0488 13.3417 16.0488 13.1465 15.8535L10 12.707L8.85352 13.8535C8.65825 14.0488 8.34175 14.0488 8.14648 13.8535C7.95122 13.6583 7.95122 13.3417 8.14648 13.1465L9.64648 11.6465L9.72461 11.582ZM14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8ZM14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9Z'\n\nexport const UploadIcon: React.FC<{\n readonly className?: string\n}> = ({ className }) => (\n <svg\n aria-hidden=\"true\"\n className={['icon', className].filter(Boolean).join(' ')}\n fill=\"none\"\n focusable=\"false\"\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path clipRule=\"evenodd\" d={path} fill=\"currentColor\" fillRule=\"evenodd\" />\n </svg>\n)\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAElB,MAAMC,IAAA,GACJ;AAEF,OAAO,MAAMC,UAAA,GAERA,CAAC;EAAEC;AAAS,CAAE,kBACjBC,IAAA,CAAC;EACC,eAAY;EACZD,SAAA,EAAW,CAAC,QAAQA,SAAA,CAAU,CAACE,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;EACpDC,IAAA,EAAK;EACLC,SAAA,EAAU;EACVC,MAAA,EAAQ;EACRC,OAAA,EAAQ;EACRC,KAAA,EAAO;EACPC,KAAA,EAAM;YAEN,aAAAT,IAAA,CAAC;IAAKU,QAAA,EAAS;IAAUC,CAAA,EAAGd,IAAA;IAAMO,IAAA,EAAK;IAAeQ,QAAA,EAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"buildEditorState.d.ts","sourceRoot":"","sources":["../../src/utilities/buildEditorState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAA2B,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAChE,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAyCtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAC1C,CAAA"}
1
+ {"version":3,"file":"buildEditorState.d.ts","sourceRoot":"","sources":["../../src/utilities/buildEditorState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAA2B,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAChE,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAuDtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAC1C,CAAA"}
@@ -72,6 +72,19 @@
72
72
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
73
  editorJSON.root.children.push(...nodes);
74
74
  }
75
+ if (editorJSON.root.children.length === 0) {
76
+ // An error will be thrown if the root node has no children
77
+ editorJSON.root.children.push({
78
+ type: 'paragraph',
79
+ children: [],
80
+ direction: 'ltr',
81
+ format: '',
82
+ indent: 0,
83
+ textFormat: 0,
84
+ textStyle: '',
85
+ version: 1
86
+ });
87
+ }
75
88
  return editorJSON;
76
89
  }
77
90
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"buildEditorState.js","names":["buildEditorState","nodes","text","editorJSON","root","type","children","direction","format","indent","version","push","detail","mode","style","textFormat","textStyle","length","buildDefaultEditorState"],"sources":["../../src/utilities/buildEditorState.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { DefaultNodeTypes, DefaultTypedEditorState, TypedEditorState } from '../nodeTypes.js'\n\n/**\n * Helper to build lexical editor state JSON from text and/or nodes.\n *\n * @param nodes - The nodes to include in the editor state. If you pass the `text` argument, this will append your nodes after the first paragraph node.\n * @param text - The text content to include in the editor state. This will create a paragraph node with a text node for you and set that as the first node.\n * @returns The constructed editor state JSON.\n *\n * @example\n *\n * just passing text:\n *\n * ```ts\n * const editorState = buildEditorState<DefaultNodeTypes>({ text: 'Hello world' }) // result typed as DefaultTypedEditorState\n * ```\n *\n * @example\n *\n * passing nodes:\n *\n * ```ts\n * const editorState = // result typed as TypedEditorState<DefaultNodeTypes | SerializedBlockNode> (or TypedEditorState<SerializedBlockNode>)\n * buildEditorState<DefaultNodeTypes | SerializedBlockNode>({ // or just buildEditorState<SerializedBlockNode> if you *only* want to allow block nodes\n * nodes: [\n * {\n * type: 'block',\n * fields: {\n * id: 'id',\n * blockName: 'Cool block',\n * blockType: 'myBlock',\n * },\n * format: 'left',\n * version: 1,\n * }\n * ],\n * })\n * ```\n */\nexport function buildEditorState<T extends SerializedLexicalNode>({\n nodes,\n text,\n}: {\n nodes?: TypedEditorState<T>['root']['children']\n text?: string\n}): TypedEditorState<T> {\n const editorJSON: DefaultTypedEditorState = {\n root: {\n type: 'root',\n children: [],\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n\n if (text) {\n editorJSON.root.children.push({\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n },\n ],\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n textStyle: '',\n version: 1,\n })\n }\n\n if (nodes?.length) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n editorJSON.root.children.push(...(nodes as any))\n }\n\n return editorJSON as TypedEditorState<T>\n}\n\n/**\n *\n * Alias for `buildEditorState<DefaultNodeTypes>`\n *\n * @experimental this API may change or be removed in a minor release\n * @internal\n */\nexport const buildDefaultEditorState: typeof buildEditorState<DefaultNodeTypes> =\n buildEditorState<DefaultNodeTypes>\n"],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCA,OAAO,SAASA,iBAAkD;EAChEC,KAAK;EACLC;AAAI,CAIL;EACC,MAAMC,UAAA,GAAsC;IAC1CC,IAAA,EAAM;MACJC,IAAA,EAAM;MACNC,QAAA,EAAU,EAAE;MACZC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRC,OAAA,EAAS;IACX;EACF;EAEA,IAAIR,IAAA,EAAM;IACRC,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,CAAC;MAC5BN,IAAA,EAAM;MACNC,QAAA,EAAU,CACR;QACED,IAAA,EAAM;QACNO,MAAA,EAAQ;QACRJ,MAAA,EAAQ;QACRK,IAAA,EAAM;QACNC,KAAA,EAAO;QACPZ,IAAA;QACAQ,OAAA,EAAS;MACX,EACD;MACDH,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRM,UAAA,EAAY;MACZC,SAAA,EAAW;MACXN,OAAA,EAAS;IACX;EACF;EAEA,IAAIT,KAAA,EAAOgB,MAAA,EAAQ;IACjB;IACAd,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,IAAKV,KAAA;EACpC;EAEA,OAAOE,UAAA;AACT;AAEA;;;;;;;AAOA,OAAO,MAAMe,uBAAA,GACXlB,gBAAA","ignoreList":[]}
1
+ {"version":3,"file":"buildEditorState.js","names":["buildEditorState","nodes","text","editorJSON","root","type","children","direction","format","indent","version","push","detail","mode","style","textFormat","textStyle","length","buildDefaultEditorState"],"sources":["../../src/utilities/buildEditorState.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { DefaultNodeTypes, DefaultTypedEditorState, TypedEditorState } from '../nodeTypes.js'\n\n/**\n * Helper to build lexical editor state JSON from text and/or nodes.\n *\n * @param nodes - The nodes to include in the editor state. If you pass the `text` argument, this will append your nodes after the first paragraph node.\n * @param text - The text content to include in the editor state. This will create a paragraph node with a text node for you and set that as the first node.\n * @returns The constructed editor state JSON.\n *\n * @example\n *\n * just passing text:\n *\n * ```ts\n * const editorState = buildEditorState<DefaultNodeTypes>({ text: 'Hello world' }) // result typed as DefaultTypedEditorState\n * ```\n *\n * @example\n *\n * passing nodes:\n *\n * ```ts\n * const editorState = // result typed as TypedEditorState<DefaultNodeTypes | SerializedBlockNode> (or TypedEditorState<SerializedBlockNode>)\n * buildEditorState<DefaultNodeTypes | SerializedBlockNode>({ // or just buildEditorState<SerializedBlockNode> if you *only* want to allow block nodes\n * nodes: [\n * {\n * type: 'block',\n * fields: {\n * id: 'id',\n * blockName: 'Cool block',\n * blockType: 'myBlock',\n * },\n * format: 'left',\n * version: 1,\n * }\n * ],\n * })\n * ```\n */\nexport function buildEditorState<T extends SerializedLexicalNode>({\n nodes,\n text,\n}: {\n nodes?: TypedEditorState<T>['root']['children']\n text?: string\n}): TypedEditorState<T> {\n const editorJSON: DefaultTypedEditorState = {\n root: {\n type: 'root',\n children: [],\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n\n if (text) {\n editorJSON.root.children.push({\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n },\n ],\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n textStyle: '',\n version: 1,\n })\n }\n\n if (nodes?.length) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n editorJSON.root.children.push(...(nodes as any))\n }\n\n if (editorJSON.root.children.length === 0) {\n // An error will be thrown if the root node has no children\n editorJSON.root.children.push({\n type: 'paragraph',\n children: [],\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n textStyle: '',\n version: 1,\n })\n }\n\n return editorJSON as TypedEditorState<T>\n}\n\n/**\n *\n * Alias for `buildEditorState<DefaultNodeTypes>`\n *\n * @experimental this API may change or be removed in a minor release\n * @internal\n */\nexport const buildDefaultEditorState: typeof buildEditorState<DefaultNodeTypes> =\n buildEditorState<DefaultNodeTypes>\n"],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCA,OAAO,SAASA,iBAAkD;EAChEC,KAAK;EACLC;AAAI,CAIL;EACC,MAAMC,UAAA,GAAsC;IAC1CC,IAAA,EAAM;MACJC,IAAA,EAAM;MACNC,QAAA,EAAU,EAAE;MACZC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRC,OAAA,EAAS;IACX;EACF;EAEA,IAAIR,IAAA,EAAM;IACRC,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,CAAC;MAC5BN,IAAA,EAAM;MACNC,QAAA,EAAU,CACR;QACED,IAAA,EAAM;QACNO,MAAA,EAAQ;QACRJ,MAAA,EAAQ;QACRK,IAAA,EAAM;QACNC,KAAA,EAAO;QACPZ,IAAA;QACAQ,OAAA,EAAS;MACX,EACD;MACDH,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRM,UAAA,EAAY;MACZC,SAAA,EAAW;MACXN,OAAA,EAAS;IACX;EACF;EAEA,IAAIT,KAAA,EAAOgB,MAAA,EAAQ;IACjB;IACAd,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,IAAKV,KAAA;EACpC;EAEA,IAAIE,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACW,MAAM,KAAK,GAAG;IACzC;IACAd,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,CAAC;MAC5BN,IAAA,EAAM;MACNC,QAAA,EAAU,EAAE;MACZC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRM,UAAA,EAAY;MACZC,SAAA,EAAW;MACXN,OAAA,EAAS;IACX;EACF;EAEA,OAAOP,UAAA;AACT;AAEA;;;;;;;AAOA,OAAO,MAAMe,uBAAA,GACXlB,gBAAA","ignoreList":[]}
@@ -9,5 +9,6 @@ export declare const useLexicalDocumentDrawer: (args: Parameters<UseDocumentDraw
9
9
  DocumentDrawer: ReturnType<UseDocumentDrawer>[0];
10
10
  documentDrawerSlug: string;
11
11
  DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1];
12
+ openDocumentDrawer: () => void;
12
13
  };
13
14
  //# sourceMappingURL=useLexicalDocumentDrawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalDocumentDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAQvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC;IACD,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;CA4DxD,CAAA"}
1
+ {"version":3,"file":"useLexicalDocumentDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAQvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC;IACD,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAkE/B,CAAA"}
@@ -12,14 +12,15 @@ import { useCallback, useEffect, useState } from 'react';
12
12
  * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.
13
13
  */
14
14
  export const useLexicalDocumentDrawer = args => {
15
- const $ = _c(21);
15
+ const $ = _c(25);
16
16
  const [editor] = useLexicalComposerContext();
17
17
  const [selectionState, setSelectionState] = useState(null);
18
18
  const [wasOpen, setWasOpen] = useState(false);
19
19
  const [DocumentDrawer, DocumentDrawerToggler, t0] = useDocumentDrawer(args);
20
20
  const {
21
21
  closeDrawer,
22
- drawerSlug: documentDrawerSlug
22
+ drawerSlug: documentDrawerSlug,
23
+ openDrawer
23
24
  } = t0;
24
25
  const {
25
26
  modalState
@@ -97,33 +98,48 @@ export const useLexicalDocumentDrawer = args => {
97
98
  }
98
99
  useEffect(t4, t5);
99
100
  let t6;
100
- if ($[13] !== DocumentDrawerToggler || $[14] !== storeSelection) {
101
- t6 = props => _jsx(DocumentDrawerToggler, {
102
- ...props,
103
- onClick: storeSelection
104
- });
105
- $[13] = DocumentDrawerToggler;
101
+ if ($[13] !== openDrawer || $[14] !== storeSelection) {
102
+ t6 = () => {
103
+ storeSelection();
104
+ openDrawer();
105
+ };
106
+ $[13] = openDrawer;
106
107
  $[14] = storeSelection;
107
108
  $[15] = t6;
108
109
  } else {
109
110
  t6 = $[15];
110
111
  }
112
+ const openDocumentDrawer = t6;
111
113
  let t7;
112
- if ($[16] !== DocumentDrawer || $[17] !== closeDocumentDrawer || $[18] !== documentDrawerSlug || $[19] !== t6) {
113
- t7 = {
114
+ if ($[16] !== DocumentDrawerToggler || $[17] !== storeSelection) {
115
+ t7 = props => _jsx(DocumentDrawerToggler, {
116
+ ...props,
117
+ onClick: storeSelection
118
+ });
119
+ $[16] = DocumentDrawerToggler;
120
+ $[17] = storeSelection;
121
+ $[18] = t7;
122
+ } else {
123
+ t7 = $[18];
124
+ }
125
+ let t8;
126
+ if ($[19] !== DocumentDrawer || $[20] !== closeDocumentDrawer || $[21] !== documentDrawerSlug || $[22] !== openDocumentDrawer || $[23] !== t7) {
127
+ t8 = {
114
128
  closeDocumentDrawer,
115
129
  DocumentDrawer,
116
130
  documentDrawerSlug,
117
- DocumentDrawerToggler: t6
131
+ DocumentDrawerToggler: t7,
132
+ openDocumentDrawer
118
133
  };
119
- $[16] = DocumentDrawer;
120
- $[17] = closeDocumentDrawer;
121
- $[18] = documentDrawerSlug;
122
- $[19] = t6;
123
- $[20] = t7;
134
+ $[19] = DocumentDrawer;
135
+ $[20] = closeDocumentDrawer;
136
+ $[21] = documentDrawerSlug;
137
+ $[22] = openDocumentDrawer;
138
+ $[23] = t7;
139
+ $[24] = t8;
124
140
  } else {
125
- t7 = $[20];
141
+ t8 = $[24];
126
142
  }
127
- return t7;
143
+ return t8;
128
144
  };
129
145
  //# sourceMappingURL=useLexicalDocumentDrawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalDocumentDrawer.js","names":["c","_c","useLexicalComposerContext","useDocumentDrawer","useModal","$getPreviousSelection","$getSelection","$setSelection","useCallback","useEffect","useState","useLexicalDocumentDrawer","args","$","editor","selectionState","setSelectionState","wasOpen","setWasOpen","DocumentDrawer","DocumentDrawerToggler","t0","closeDrawer","drawerSlug","documentDrawerSlug","modalState","t1","read","selection","storeSelection","t2","update","clone","discrete","skipTransforms","restoreSelection","t3","closeDocumentDrawer","t4","t5","thisModalState","isOpen","setTimeout","t6","props","_jsx","onClick","t7"],"sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"sourcesContent":["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n }\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"useLexicalDocumentDrawer.js","names":["c","_c","useLexicalComposerContext","useDocumentDrawer","useModal","$getPreviousSelection","$getSelection","$setSelection","useCallback","useEffect","useState","useLexicalDocumentDrawer","args","$","editor","selectionState","setSelectionState","wasOpen","setWasOpen","DocumentDrawer","DocumentDrawerToggler","t0","closeDrawer","drawerSlug","documentDrawerSlug","openDrawer","modalState","t1","read","selection","storeSelection","t2","update","clone","discrete","skipTransforms","restoreSelection","t3","closeDocumentDrawer","t4","t5","thisModalState","isOpen","setTimeout","t6","openDocumentDrawer","t7","props","_jsx","onClick","t8"],"sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"sourcesContent":["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n openDocumentDrawer: () => void\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug, openDrawer },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n const openDocumentDrawer = useCallback(() => {\n storeSelection()\n openDrawer()\n }, [storeSelection, openDrawer])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n openDocumentDrawer,\n }\n}\n"],"mappings":"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","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "3.84.1",
3
+ "version": "4.0.0-internal.38b7f1d",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -63,11 +63,6 @@
63
63
  "types": "./dist/exports/server/rsc.d.ts",
64
64
  "default": "./dist/exports/server/rsc.js"
65
65
  },
66
- "./migrate": {
67
- "import": "./dist/exports/server/migrate.js",
68
- "types": "./dist/exports/server/migrate.d.ts",
69
- "default": "./dist/exports/server/migrate.js"
70
- },
71
66
  "./lexical": {
72
67
  "import": "./dist/lexical-proxy/lexical.js",
73
68
  "types": "./dist/lexical-proxy/lexical.d.ts",
@@ -377,9 +372,9 @@
377
372
  "qs-esm": "8.0.1",
378
373
  "react-error-boundary": "4.1.2",
379
374
  "ts-essentials": "10.0.3",
380
- "uuid": "11.1.0",
381
- "@payloadcms/translations": "3.84.1",
382
- "@payloadcms/ui": "3.84.1"
375
+ "uuid": "14.0.0",
376
+ "@payloadcms/translations": "4.0.0-internal.38b7f1d",
377
+ "@payloadcms/ui": "4.0.0-internal.38b7f1d"
383
378
  },
384
379
  "devDependencies": {
385
380
  "@babel/cli": "7.27.2",
@@ -390,8 +385,8 @@
390
385
  "@lexical/eslint-plugin": "0.41.0",
391
386
  "@types/escape-html": "1.0.4",
392
387
  "@types/json-schema": "7.0.15",
393
- "@types/node": "22.15.30",
394
- "@types/react": "19.2.9",
388
+ "@types/node": "24.12.3",
389
+ "@types/react": "19.2.14",
395
390
  "@types/react-dom": "19.2.3",
396
391
  "babel-plugin-react-compiler": "19.1.0-rc.3",
397
392
  "babel-plugin-transform-remove-imports": "^1.8.0",
@@ -399,18 +394,18 @@
399
394
  "esbuild-sass-plugin": "3.3.1",
400
395
  "swc-plugin-transform-remove-imports": "8.3.0",
401
396
  "@payloadcms/eslint-config": "3.28.0",
402
- "payload": "3.84.1"
397
+ "payload": "4.0.0-internal.38b7f1d"
403
398
  },
404
399
  "peerDependencies": {
405
400
  "@faceless-ui/modal": "3.0.0",
406
401
  "@faceless-ui/scroll-info": "2.0.0",
407
402
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
408
403
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
409
- "@payloadcms/next": "3.84.1",
410
- "payload": "3.84.1"
404
+ "@payloadcms/next": "4.0.0-internal.38b7f1d",
405
+ "payload": "4.0.0-internal.38b7f1d"
411
406
  },
412
407
  "engines": {
413
- "node": "^18.20.2 || >=20.9.0"
408
+ "node": ">=24.15.0"
414
409
  },
415
410
  "publishConfig": {
416
411
  "registry": "https://registry.npmjs.org/"
@@ -1,2 +0,0 @@
1
- "use client";import{jsx as o,jsxs as t}from"react/jsx-runtime";import"react";var c=n=>{let{data:e}=n;return t("div",{children:["Unknown converted Slate node: ",o("strong",{children:e?.nodeType})]})};export{c as UnknownConvertedNodeComponent};
2
- //# sourceMappingURL=Component-DOSSWC76.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\nimport './index.scss'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted Slate node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
5
- "mappings": "+DACA,MAAkB,QAUX,IAAMA,EAAkDC,GAAA,CAC7D,GAAM,CAAEC,KAAAA,CAAI,EAAKD,EAEjB,OACEE,EAAC,MAAA,WAAI,iCAC2BC,EAAC,SAAA,UAAQF,GAAMG,aAGnD",
6
- "names": ["UnknownConvertedNodeComponent", "props", "data", "_jsxs", "_jsx", "nodeType"]
7
- }
@@ -1,2 +0,0 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";var a=n=>{let{data:o}=n;return t("div",{children:["Unknown converted payload-plugin-lexical node: ",e("strong",{children:o?.nodeType})]})};export{a as UnknownConvertedNodeComponent};
2
- //# sourceMappingURL=Component-MBLHTKDK.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\nimport './index.scss'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted payload-plugin-lexical node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
5
- "mappings": "+DACA,MAAkB,QAUX,IAAMA,EAAkDC,GAAA,CAC7D,GAAM,CAAEC,KAAAA,CAAI,EAAKD,EAEjB,OACEE,EAAC,MAAA,WAAI,kDAC4CC,EAAC,SAAA,UAAQF,GAAMG,aAGpE",
6
- "names": ["UnknownConvertedNodeComponent", "props", "data", "_jsxs", "_jsx", "nodeType"]
7
- }
@@ -1,2 +0,0 @@
1
- "use client";import{a as Ae,e as Be,g as O,h as I,j as Oe,k as Ie,l as Fe,m as $e,n as Ee,o as Ne,p as Ke}from"./chunk-FTT5KJ6W.js";import{a as Me,b as w}from"./chunk-BZZVLW4U.js";import{jsx as L,jsxs as le}from"react/jsx-runtime";import{BulkUploadProvider as er,FieldDescription as tr,FieldError as or,FieldLabel as nr,isFieldRTL as rr,RenderCustomComponent as Mt,useConfig as ir,useEditDepth as sr,useEffectEvent as lr,useField as ar,useLocale as cr}from"@payloadcms/ui";import{mergeFieldStyles as ur}from"@payloadcms/ui/shared";import{dequal as dr}from"dequal/lite";import At,{useCallback as Bt,useEffect as Ot,useMemo as fr,useState as It}from"react";import{ErrorBoundary as mr}from"react-error-boundary";import"./bundled.css";import{jsx as F}from"react/jsx-runtime";import{LexicalComposer as Wn}from"@lexical/react/LexicalComposer.js";import{useEditDepth as Yn}from"@payloadcms/ui";import*as _t from"react";import{useMemo as Gn}from"react";import{c as kn}from"react/compiler-runtime";import{jsx as b,jsxs as ie}from"react/jsx-runtime";import{useLexicalComposerContext as vn}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as Ln}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as Dn}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Mn}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as An}from"@lexical/react/LexicalRichTextPlugin.js";import{useLexicalEditable as Bn}from"@lexical/react/useLexicalEditable";import{BLUR_COMMAND as On,COMMAND_PRIORITY_LOW as Rt,FOCUS_COMMAND as In}from"lexical";import*as X from"react";import{useEffect as Fn,useState as $n}from"react";import{jsx as je}from"react/jsx-runtime";import"react";var K=({anchorElem:e,clientProps:t,plugin:o})=>o.position==="floatingAnchorElem"&&e?o.Component&&je(o.Component,{anchorElem:e,clientProps:t}):o.Component&&je(o.Component,{clientProps:t});import{c as zt}from"react/compiler-runtime";import{copyToClipboard as ze}from"@lexical/clipboard";import{useLexicalComposerContext as Ht}from"@lexical/react/LexicalComposerContext.js";import{objectKlassEquals as Vt}from"@lexical/utils";import He from"bson-objectid";import{$getSelection as Wt,$isNodeSelection as Yt,COMMAND_PRIORITY_LOW as Gt,COPY_COMMAND as Ut}from"lexical";import{useEffect as Jt}from"react";var we=e=>{if("fields"in e&&typeof e.fields=="object"&&e.fields!==null&&"id"in e.fields?e.fields.id=new He.default().toHexString():"id"in e&&(e.id=new He.default().toHexString()),e.children)for(let t of e.children)we(t)};function Ve(){let e=zt(3),[t]=Ht(),o,n;return e[0]!==t?(o=()=>t.registerCommand(Ut,r=>{let c=Wt();if(Yt(c)){let s=c.getNodes()[0]?.exportJSON(),a=JSON.parse(JSON.stringify(s));we(a);let f={namespace:t._config.namespace,nodes:[a]},p=JSON.stringify(f);return ze(t,null,{"application/x-lexical-editor":p,"text/plain":""}).catch(qt),!0}return ze(t,Vt(r,ClipboardEvent)?r:null).then(()=>{if(!(r instanceof ClipboardEvent)||!r.clipboardData)throw new Error("No clipboard event");let l=r.clipboardData.getData("application/x-lexical-editor");if(!l)return!0;let s=JSON.parse(l);for(let f of s.nodes)we(f);let a=JSON.stringify(s);r.clipboardData.setData("application/x-lexical-editor",a)}).catch(l=>{throw r instanceof ClipboardEvent&&r.clipboardData?.setData("application/x-lexical-editor",""),l}),!0},Gt),n=[t],e[0]=t,e[1]=o,e[2]=n):(o=e[1],n=e[2]),Jt(o,n),null}function qt(e){throw e}import{c as Qt}from"react/compiler-runtime";import{useLexicalComposerContext as Xt}from"@lexical/react/LexicalComposerContext";import{$findMatchingParent as ae,mergeRegister as Zt}from"@lexical/utils";import{$createNodeSelection as eo,$getEditor as oe,$getNearestNodeFromDOMNode as to,$getSelection as ce,$isDecoratorNode as j,$isElementNode as Se,$isLineBreakNode as oo,$isNodeSelection as ue,$isRangeSelection as We,$isRootOrShadowRoot as no,$isTextNode as ro,$setSelection as Ye,CLICK_COMMAND as io,COMMAND_PRIORITY_LOW as G,KEY_ARROW_DOWN_COMMAND as so,KEY_ARROW_UP_COMMAND as lo,KEY_BACKSPACE_COMMAND as ao,KEY_DELETE_COMMAND as co,SELECTION_CHANGE_COMMAND as uo}from"lexical";import{useEffect as fo}from"react";function Ge(){let e=Qt(3),[t]=Xt(),o=Co,n,r;return e[0]!==t?(n=()=>Zt(t.registerCommand(io,xo,G),t.registerCommand(co,o,G),t.registerCommand(ao,o,G),t.registerCommand(uo,yo,G),t.registerCommand(lo,go,G),t.registerCommand(so,mo,G)),r=[t],e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]),fo(n,r),null}function mo(e){let t=ce();if(ue(t)){e.preventDefault();let l=t.getNodes()[0]?.getNextSibling();if(j(l)){let f=oe().getElementByKey(l.getKey());return f&&ne({element:f,node:l}),!0}if(!Se(l))return!0;let s=l.getFirstDescendant()??l;return s&&(ae(s,de)?.selectEnd(),e.preventDefault()),!0}if(!We(t))return!1;let n=(t.isBackward()?t.anchor:t.focus).getNode(),r=ae(n,po),c=r?.getNextSibling();if(!r||c!==Ue(r))return!1;if(j(c)){let l=oe().getElementByKey(c.getKey());if(l)return ne({element:l,node:c}),e.preventDefault(),!0}return!1}function po(e){return Ue(e)!==null}function go(e){let t=ce();if(ue(t)){let l=t.getNodes()[0]?.getPreviousSibling();if(j(l)){let f=oe().getElementByKey(l.getKey());return f?(ne({element:f,node:l}),e.preventDefault(),!0):!1}if(!Se(l))return!1;let s=l.getLastDescendant()??l;return s?(ae(s,de)?.selectStart(),e.preventDefault(),!0):!1}if(!We(t))return!1;let n=(t.isBackward()?t.anchor:t.focus).getNode(),r=ae(n,ho),c=r?.getPreviousSibling();if(!r||c!==Je(r))return!1;if(j(c)){let l=oe().getElementByKey(c.getKey());if(l)return ne({element:l,node:c}),e.preventDefault(),!0}return!1}function ho(e){return Je(e)!==null}function yo(){let e=No();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),e?(e.element?.classList.add("decorator-selected"),!0):!1}function xo(e){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let t=Eo(e);if(!t)return!0;let{target:o}=e;return!(o instanceof HTMLElement)||o.isContentEditable||o.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?Ye(null):ne(t),!0}function Co(e){let t=ce();return ue(t)?(e.preventDefault(),t.getNodes().forEach(bo),!0):!1}function bo(e){e.remove()}function Eo(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let o=to(t);return j(o)?{element:t,node:o}:void 0}function No(){let e=ce();if(!ue(e))return;let t=e.getNodes();if(t.length!==1)return;let o=t[0];return j(o)?{decorator:o,element:oe().getElementByKey(o.getKey())}:void 0}function ne({element:e,node:t}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let o=eo();o.add(t.getKey()),Ye(o),e.scrollIntoView({behavior:"smooth",block:"nearest"}),e.classList.add("decorator-selected")}function de(e){if(j(e)&&!e.isInline())return!0;if(!Se(e)||no(e))return!1;let t=e.getFirstChild(),o=t===null||oo(t)||ro(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&o}function Ue(e){let t=e.getNextSibling();for(;t!==null;){if(de(t))return t;t=t.getNextSibling()}return null}function Je(e){let t=e.getPreviousSibling();for(;t!==null;){if(de(t))return t;t=t.getPreviousSibling()}return null}import{jsx as Pe}from"react/jsx-runtime";import{useLexicalComposerContext as _o}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as ko,isHTMLElement as vo}from"lexical";import*as Ze from"react";import{useCallback as Lo,useEffect as Xe,useRef as Do,useState as Mo}from"react";import{createPortal as Ao}from"react-dom";var U=(e,t,o,n,r=50,c=25)=>{let l=0;if(e&&!e.contains(n)){let{bottom:s,left:a,right:f,top:p}=e.getBoundingClientRect(),u=p+window.scrollY,i=s+window.scrollY;if(o<u-c||o>i+c||t<a-r||t>f+r)return-1;(t<a||t>f)&&(l=t<a?t-a:t-f)}return l};import{$getNodeByKey as me}from"lexical";function J(e){let t=e.getBoundingClientRect(),o=getComputedStyle(e).getPropertyValue("transform");if(!o||o==="none")return t;let n=o.split(",").pop();return t.y=t.y-Number(n?.replace(")","")),t}function fe(e){let t=(a,f)=>a?parseFloat(window.getComputedStyle(a)[f]):0,{marginBottom:o,marginTop:n}=window.getComputedStyle(e),r=t(e.previousElementSibling,"marginBottom"),c=t(e.nextElementSibling,"marginTop"),l=Math.max(parseFloat(n),r);return{marginBottom:Math.max(parseFloat(o),c),marginTop:l}}import{$getRoot as wo}from"lexical";function z(e){return e.getEditorState().read(()=>wo().getChildrenKeys())}var So=1,Po=-1,qe=0,A={props:null,result:null};function Ro(e,t,o=20){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r<=o*o}function q(e){let{anchorElem:t,cache_threshold:o=20,editor:n,fuzzy:r=!1,horizontalOffset:c=0,point:{x:l,y:s},startIndex:a=0,useEdgeAsDefault:f=!1}=e;if(o>0&&A.props&&A.result&&A.props.fuzzy===e.fuzzy&&A.props.horizontalOffset===e.horizontalOffset&&A.props.useEdgeAsDefault===e.useEdgeAsDefault&&Ro(A.props.point,e.point,o))return A.result;let p=t.getBoundingClientRect(),u=z(n),i={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return n.getEditorState().read(()=>{if(f){let h=n.getElementByKey(u[0]),m=n.getElementByKey(u[u.length-1]);if(h&&m){let[d,g]=[J(h),J(m)];if(s<d.top?(i.blockElem=h,i.distance=d.top-s,i.blockNode=me(u[0]),i.foundAtIndex=0):s>g.bottom&&(i.distance=s-g.bottom,i.blockNode=me(u[u.length-1]),i.blockElem=m,i.foundAtIndex=u.length-1),i?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let y=a,x=qe;for(;y>=0&&y<u.length;){let h=u[y],m=n.getElementByKey(h);if(m===null)break;let d=new I(l+c,s),g=$e.fromDOMRect(J(m)),{marginBottom:C,marginTop:P}=fe(m),R=g.generateNewRect({bottom:g.bottom+C,left:p.left,right:p.right,top:g.top-P}),{distance:S,isOnBottomSide:_,isOnTopSide:N}=R.distanceFromPoint(d);if(S===0){i.blockElem=m,i.blockNode=me(h),i.foundAtIndex=y,i.distance=S,i.blockNode&&i.blockNode.getType()==="paragraph"&&i.blockNode.getTextContent()===""&&(!r&&!e.returnEmptyParagraphs&&(i.blockElem=null,i.blockNode=null),i.isFoundNodeEmptyParagraph=!0);break}else r&&S<i.distance&&(i.blockElem=m,i.blockNode=me(h),i.distance=S,i.foundAtIndex=y);x===qe&&(N?x=Po:_?x=So:x=1/0),y+=x}}),A.props=e,A.result={blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph},{blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph}}function pe(e,t){return!!e.closest(`.${t}`)}var To=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Qe(e){if(!e||To.includes(e.tagName)||e.offsetHeight===0||e.offsetWidth===0)return!1;let t=window.getComputedStyle(e);return!(t.display==="table-cell"||t.position==="absolute"||t.visibility==="hidden"||t.opacity==="0")}function ge(e,t,o,n=0){if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let r=e.getBoundingClientRect(),c=window.getComputedStyle(e),l=t.getBoundingClientRect(),s=o.getBoundingClientRect(),a;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(u=>e.classList.contains(u)||e.firstElementChild?.classList.contains(u)))a=r.top+8-s.top;else{let u=Qe(e)?parseInt(c.lineHeight,10):0;a=r.top+(u-l.height)/2-s.top}let p=n;t.style.opacity="1",t.style.transform=`translate(${p}px, ${a}px)`}var Bo="add-block-menu",he=1/0;function Oo(e){return e===0?1/0:he>=0&&he<e?he:Math.floor(e/2)}function Io(e,t,o){let n=t.parentElement,{editorConfig:r}=w(),c=r?.admin?.hideGutter?-24:12,l=Do(null),[s,a]=Mo(null);Xe(()=>{function p(u){let i=u.target;if(!vo(i))return;let y=U(n,u.pageX,u.pageY,i);if(y===-1){a(null);return}if(pe(i,Bo))return;let x=z(e),{blockElem:h,blockNode:m,foundAtIndex:d}=q({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-y,point:new I(u.x,u.y),returnEmptyParagraphs:!0,startIndex:Oo(x.length),useEdgeAsDefault:!1});he=d,h&&m&&(s?.node!==m||s?.elem!==h)&&a({elem:h,node:m})}return document?.addEventListener("mousemove",p),()=>{document?.removeEventListener("mousemove",p)}},[n,t,e,s]),Xe(()=>{l.current&&s?.node&&ge(s?.elem,l.current,t,c)},[t,s,c]);let f=Lo(p=>{let u=s;u?.node&&(e.update(()=>{let i=!0;if((u?.node.getType()!=="paragraph"||u.node.getTextContent()!=="")&&(i=!1),!i){let y=ko();u?.node.insertAfter(y),setTimeout(()=>{u={elem:e.getElementByKey(y.getKey()),node:y},a(u)},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),u?.node&&"select"in u.node&&typeof u.node.select=="function"&&u.node.select()})},1),setTimeout(()=>{e.dispatchCommand(Ie,{node:u?.node})},2),p.stopPropagation(),p.preventDefault())},[e,s]);return Ao(Pe(Ze.Fragment,{children:Pe("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:p=>{f(p)},ref:l,type:"button",children:Pe("div",{className:o?"icon":""})})}),t)}function et(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[n]=_o();return Io(n,o,n._editable)}import{jsx as ye,jsxs as $o}from"react/jsx-runtime";import{useLexicalComposerContext as Ko}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as nt}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as rt,$getNodeByKey as jo,isHTMLElement as Re}from"lexical";import*as ct from"react";import{useEffect as Te,useRef as xe,useState as it}from"react";import{createPortal as zo}from"react-dom";var tt=0,Fo=-24;var H=0;function ot(e,t,o,n,r,c,l,s,a,f=!1){let{height:p,top:u}=n.getBoundingClientRect(),{top:i,width:y}=l.getBoundingClientRect(),{marginBottom:x,marginTop:h}=fe(n),m=u,d=c>=u+p/2+window.scrollY,g=!1;if(r?.elem)if(n!==r?.elem)(d&&r?.elem&&r?.elem===n.nextElementSibling||!d&&r?.elem&&r?.elem===n.previousElementSibling)&&(H++,H<200&&(g=!0));else{H++;let S=r?.boundingBox?.y,_=n.getBoundingClientRect().y;(d===r?.isBelow&&S===_||H<200)&&(g=!1)}if(g)return{isBelow:d,willStayInSamePosition:g};f?m+=p/2:d?m+=p+x/2:m-=h/2;let C=0;f||(d?C=-tt:C=tt);let P=m-i+C,R=Fo-t;return o.style.width=`calc(${y}px - ${e})`,o.style.opacity=".8",o.style.transform=`translate(${R}px, calc(${P}px - 2px))`,r?.elem&&(r.elem.style.opacity="",r?.elem===n?d?r.elem.style.marginTop="":r.elem.style.marginBottom="":(r.elem.style.marginBottom="",r.elem.style.marginTop="")),H=0,{isBelow:d,willStayInSamePosition:g}}var Ho="draggable-block-menu",st="application/x-lexical-drag-block",re=1/0;function lt(e){return e===0?1/0:re>=0&&re<e?re:Math.floor(e/2)}function Vo(e,t){let{transform:o}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=o})}function at(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function Wo(e,t,o){let n=t.parentElement,r=xe(null),c=xe(null),l=xe(null),s=xe(!1),[a,f]=it(null),[p,u]=it(null),{editorConfig:i}=w(),y=i?.admin?.hideGutter?-44:-8;Te(()=>{function m(d){let g=d.target;if(!Re(g))return;let C=U(n,d.pageX,d.pageY,g);if(C===-1){f(null);return}if(pe(g,Ho))return;let P=z(e),{blockElem:R,foundAtIndex:S,isFoundNodeEmptyParagraph:_}=q({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-C,point:new I(d.x,d.y),startIndex:lt(P.length),useEdgeAsDefault:!1,verbose:!1});re=S,!(!R&&!_)&&a!==R&&f(R)}return document?.addEventListener("mousemove",m),()=>{document?.removeEventListener("mousemove",m)}},[n,t,e,a]),Te(()=>{r.current&&ge(a,r.current,t,y)},[t,a,y]),Te(()=>{function m(g){if(!s.current)return!1;let[C]=nt(g);if(C)return!1;let{pageY:P,target:R}=g;if(!Re(R))return!1;let S=U(n,g.pageX,g.pageY,R,100,50),_=z(e),{blockElem:N,foundAtIndex:ee,isFoundNodeEmptyParagraph:v}=q({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-S,point:new I(g.x,g.y),startIndex:lt(_.length),useEdgeAsDefault:!0,verbose:!0});re=ee;let T=c.current;if(N===null||T===null)return!1;if(a!==N){let{isBelow:k,willStayInSamePosition:V}=ot(i?.admin?.hideGutter?"0px":"3rem",y+(i?.admin?.hideGutter?r?.current?.getBoundingClientRect()?.width??0:-(r?.current?.getBoundingClientRect()?.width??0)),T,N,p,P,t,g,l,v);g.preventDefault(),V||u({boundingBox:N.getBoundingClientRect(),elem:N,isBelow:k})}else p?.elem&&(at(T,p.elem),u({boundingBox:N.getBoundingClientRect(),elem:N,isBelow:!1}));return!0}function d(g){if(!s.current)return!1;let[C]=nt(g);if(C)return!1;let{dataTransfer:P,pageY:R,target:S}=g,_=P?.getData(st)||"";return e.update(()=>{let N=jo(_);if(!N||!Re(S))return!1;let ee=U(n,g.pageX,g.pageY,S,100,50),{blockElem:v,isFoundNodeEmptyParagraph:T}=q({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-ee,point:new I(g.x,g.y),useEdgeAsDefault:!0});if(!v)return!1;let k=rt(v);if(!k)return!1;if(k===N)return!0;let{height:V,top:$}=J(v),W=R>=$+V/2+window.scrollY;T?(k.insertBefore(N),k.remove()):W?k.insertAfter(N):k.insertBefore(N),a!==null&&f(null),document.querySelectorAll(".lexical-block-highlighter").forEach(D=>{D.remove()});let be=e.getElementByKey(N.getKey());setTimeout(()=>{let D=be?.getBoundingClientRect();if(!D)return;let E=document.createElement("div");E.className="lexical-block-highlighter",E.style.backgroundColor="var(--theme-elevation-1000",E.style.transition="opacity 0.5s ease-in-out",E.style.zIndex="1",E.style.pointerEvents="none",E.style.boxSizing="border-box",E.style.borderRadius="4px",E.style.position="absolute",document.body.appendChild(E),E.style.opacity="0.1",E.style.height=`${D.height+8}px`,E.style.width=`${D.width+8}px`,E.style.top=`${D.top+window.scrollY-4}px`,E.style.left=`${D.left-4}px`,setTimeout(()=>{E.style.opacity="0",setTimeout(()=>{E.remove()},500)},1e3)},120)}),!0}return document.addEventListener("dragover",m),document.addEventListener("drop",d),()=>{document.removeEventListener("dragover",m),document.removeEventListener("drop",d)}},[n,y,t,e,p,a,i?.admin?.hideGutter]);function x(m){let d=m.dataTransfer;if(!d||!a)return;Vo(d,a);let g="";e.update(()=>{let C=rt(a);C&&(g=C.getKey())}),s.current=!0,d.setData(st,g)}function h(){s.current=!1,p?.elem&&at(c.current,p?.elem)}return zo($o(ct.Fragment,{children:[ye("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:h,onDragStart:x,ref:r,type:"button",children:ye("div",{className:o?"icon":""})}),ye("div",{className:"draggable-block-target-line",ref:c}),ye("div",{className:"debug-highlight",ref:l})]}),t)}function ut(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[n]=Ko();return Wo(n,o,n._editable)}import{c as Yo}from"react/compiler-runtime";import{jsx as _e}from"react/jsx-runtime";import{useLexicalComposerContext as Go}from"@lexical/react/LexicalComposerContext";import{$createParagraphNode as Uo,$getRoot as Jo}from"lexical";import"react";var dt="insert-paragraph-at-end",ft=()=>{let e=Yo(2),[t]=Go(),{editorConfig:o}=w();if(o?.admin?.hideInsertParagraphAtEnd)return null;let n;return e[0]!==t?(n=_e("div",{"aria-label":"Insert Paragraph",className:dt,onClick:()=>{t.update(qo)},role:"button",tabIndex:0,children:_e("div",{className:`${dt}-inside`,children:_e("span",{children:"+"})})}),e[0]=t,e[1]=n):n=e[1],n};function qo(){let e=Uo();Jo().append(e),e.select()}import{c as Qo}from"react/compiler-runtime";import{useLexicalComposerContext as Xo}from"@lexical/react/LexicalComposerContext";import*as mt from"react";var pt=()=>{let e=Qo(4),{editorConfig:t}=w(),[o]=Xo(),n,r;return e[0]!==o||e[1]!==t.features.markdownTransformers?(n=()=>Ae(o,t.features.markdownTransformers??[]),r=[o,t.features.markdownTransformers],e[0]=o,e[1]=t.features.markdownTransformers,e[2]=n,e[3]=r):(n=e[2],r=e[3]),mt.useEffect(n,r),null};import{c as Zo}from"react/compiler-runtime";import{useLexicalComposerContext as en}from"@lexical/react/LexicalComposerContext.js";import{useEffect as tn}from"react";function gt(){let e=Zo(5),[t]=en(),{currentView:o,views:n}=O(),r,c;return e[0]!==o||e[1]!==t||e[2]!==n?(r=()=>{n&&(o==="default"?n.default?Ee(t,n.default?.nodes):Ne(t):n[o]&&(Ne(t),Ee(t,n[o]?.nodes)))},c=[t,n,o],e[0]=o,e[1]=t,e[2]=n,e[3]=r,e[4]=c):(r=e[3],c=e[4]),tn(r,c),null}import{useLexicalComposerContext as on}from"@lexical/react/LexicalComposerContext";import{$getSelection as nn,$isRangeSelection as rn,RootNode as sn}from"lexical";import{useEffect as ln}from"react";function ht(){let[e]=on();return ln(()=>e.registerNodeTransform(sn,t=>{let o=nn();if(rn(o)){let n=o.anchor.getNode(),r=o.focus.getNode();(!n.isAttached()||!r.isAttached())&&(t.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[e]),null}import{useLexicalComposerContext as an}from"@lexical/react/LexicalComposerContext";import{$getSelection as cn,COMMAND_PRIORITY_LOW as un,SELECT_ALL_COMMAND as dn}from"lexical";import{useEffect as fn}from"react";function yt(){let[e]=an();return fn(()=>e.registerCommand(dn,()=>{if(cn())return!1;let o=document.activeElement;return o instanceof HTMLInputElement&&o.select(),!0},un),[e]),null}import{jsx as Q,jsxs as Ct}from"react/jsx-runtime";import{useLexicalComposerContext as pn}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as bt}from"@payloadcms/ui";import{useCallback as gn,useMemo as hn,useState as yn}from"react";import"react";import*as Et from"react-dom";import{c as mn}from"react/compiler-runtime";import"react";function xt(e,t){let o=mn(4),{maxLength:n,minLength:r}=t,c=n===void 0?75:n,l=r===void 0?1:r,s;return o[0]!==c||o[1]!==l||o[2]!==e?(s=a=>{let{query:f}=a,p="[^"+e+Oe+"\\s]",i=new RegExp("(^|\\s|\\()(["+e+"]((?:"+p+"){0,"+c+"}))$").exec(f);if(i!==null){let y=i[1],x=i[3];if(x.length>=l)return{leadOffset:i.index+y.length,matchingString:x,replaceableString:i[2]}}return null},o[0]=c,o[1]=l,o[2]=e,o[3]=s):s=o[3],s}var B="slash-menu-popup";function xn({isSelected:e,item:t,onClick:o,onMouseEnter:n,ref:r}){let{fieldProps:{featureClientSchemaMap:c,schemaPath:l}}=w(),{i18n:s}=bt(),a=`${B}__item ${B}__item-${t.key}`;e&&(a+=` ${B}__item--selected`);let f=t.key;return t.label&&(f=typeof t.label=="function"?t.label({featureClientSchemaMap:c,i18n:s,schemaPath:l}):t.label),f.length>25&&(f=f.substring(0,25)+"..."),Ct("button",{"aria-selected":e,className:a,id:B+"__item-"+t.key,onClick:o,onMouseEnter:n,ref:r,role:"option",tabIndex:-1,type:"button",children:[t?.Icon&&Q(t.Icon,{}),Q("span",{className:`${B}__item-text`,children:f})]},t.key)}function Nt({anchorElem:e=document.body}){let[t]=pn(),[o,n]=yn(null),{editorConfig:r}=w(),{i18n:c}=bt(),{fieldProps:{featureClientSchemaMap:l,schemaPath:s}}=w(),a=xt("/",{minLength:0}),f=gn(()=>{let u=[];for(let i of r.features.slashMenu.dynamicGroups)if(o){let y=i({editor:t,queryString:o});u=u.concat(y)}return u},[t,o,r?.features]),p=hn(()=>{let u=[];for(let i of r?.features.slashMenu.groups??[])u.push(i);if(o){let i=o.toLowerCase().replace(/[\s\-_]/g,"");u=u.map(x=>{let h=x.items.filter(m=>{let d=m.key;return m.label&&(d=typeof m.label=="function"?m.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):m.label),new RegExp(o,"gi").exec(d)||d.toLowerCase().replace(/[\s\-_]/g,"").includes(i)?!0:m.keywords!=null?m.keywords.some(C=>new RegExp(o,"gi").exec(C)?!0:C.toLowerCase().replace(/[\s\-_]/g,"").includes(i)):!1});return h.length?{...x,items:h}:null}),u=u.filter(x=>x!=null);let y=f();for(let x of y){let h=u.find(m=>m.key===x.key);h?u=u.filter(m=>m.key!==x.key):h={...x,items:[]},h?.items?.length&&(h.items=h.items.concat(h.items)),u.push(h)}}return u},[o,r?.features.slashMenu.groups,f,l,c,s]);return Q(Fe,{anchorElem:e,groups:p,menuRenderFn:(u,{selectedItemKey:i,selectItemAndCleanUp:y,setSelectedItemKey:x})=>u.current&&p.length?Et.createPortal(Q("div",{className:B,children:p.map(h=>{let m=h.key;return h.label&&l&&(m=typeof h.label=="function"?h.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):h.label),Ct("div",{className:`${B}__group ${B}__group-${h.key}`,children:[Q("div",{className:`${B}__group-title`,children:m}),h.items.map((d,g)=>Q(xn,{index:g,isSelected:i===d.key,item:d,onClick:()=>{x(d.key),y(d)},onMouseEnter:()=>{x(d.key)},ref:C=>{d.ref={current:C}}},d.key))]},h.key)})}),u.current):null,onQueryChange:n,triggerFn:a})}import{c as Cn}from"react/compiler-runtime";import{useLexicalComposerContext as bn}from"@lexical/react/LexicalComposerContext";import{TEXT_TYPE_TO_FORMAT as En,TextNode as Nn}from"lexical";import{useEffect as wn}from"react";function wt(e){let t=Cn(6),{features:o}=e,[n]=bn(),r;t[0]!==n||t[1]!==o.enabledFormats?(r=()=>{let l=Sn(o.enabledFormats);if(l.length!==0)return n.registerNodeTransform(Nn,s=>{l.forEach(a=>{s.hasFormat(a)&&s.toggleFormat(a)})})},t[0]=n,t[1]=o.enabledFormats,t[2]=r):r=t[2];let c;return t[3]!==n||t[4]!==o?(c=[n,o],t[3]=n,t[4]=o,t[5]=c):c=t[5],wn(r,c),null}function Sn(e){let t=Object.keys(En),o=new Set(e);return t.filter(n=>!o.has(n))}import{c as Pn}from"react/compiler-runtime";import{jsx as St}from"react/jsx-runtime";import{useLexicalComposerContext as Rn}from"@lexical/react/LexicalComposerContext";import{ContentEditable as Tn}from"@lexical/react/LexicalContentEditable.js";import{useTranslation as _n}from"@payloadcms/ui";import"react";function Pt(e){let t=Pn(5),{className:o,editorConfig:n}=e,{t:r}=_n(),[,c]=Rn(),{getTheme:l}=c,s;if(t[0]!==o||t[1]!==n?.admin?.placeholder||t[2]!==l||t[3]!==r){let a=l();s=St(Tn,{"aria-placeholder":r("lexical:general:placeholder"),className:o??"ContentEditable__root",placeholder:St("p",{className:a?.placeholder,children:n?.admin?.placeholder??r("lexical:general:placeholder")})}),t[0]=o,t[1]=n?.admin?.placeholder,t[2]=l,t[3]=r,t[4]=s}else s=t[4];return s}var Tt=e=>{let t=kn(13),{editorConfig:o,editorContainerRef:n,isSmallWidthViewport:r,onChange:c,rtl:l}=e,s=w(),[a]=vn(),f=Bn(),[p,u]=$n(null),i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=d=>{d!==null&&u(d)},t[0]=i):i=t[0];let y=i,x,h;t[1]!==a||t[2]!==s?(x=()=>{if(!s?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}s?.parentEditor?.uuid&&s.parentEditor?.registerChild(s.uuid,s);let d=()=>{s.focusEditor(s)},g=()=>{s.blurEditor(s)},C=a.registerCommand(In,()=>(d(),!0),Rt),P=a.registerCommand(On,()=>(g(),!0),Rt);return()=>{C(),P(),s.parentEditor?.unregisterChild?.(s.uuid)}},h=[a,s],t[1]=a,t[2]=s,t[3]=x,t[4]=h):(x=t[3],h=t[4]),Fn(x,h);let m;return t[5]!==o||t[6]!==n||t[7]!==p||t[8]!==f||t[9]!==r||t[10]!==c||t[11]!==l?(m=ie(X.Fragment,{children:[o.features.plugins?.map(Kn),ie("div",{className:"editor-container",dir:l?"rtl":void 0,ref:n,children:[o.features.plugins?.map(jn),b(An,{contentEditable:b("div",{className:"editor-scroller",children:b("div",{className:"editor",ref:y,children:b(Pt,{editorConfig:o})})}),ErrorBoundary:Ln}),b(ht,{}),f&&b(ft,{}),b(Ge,{}),b(Ve,{}),b(wt,{features:o.features}),b(yt,{}),b(gt,{}),f&&b(Mn,{ignoreSelectionChange:!0,onChange:(d,g,C)=>{(!C.has("focus")||C.size>1)&&c?.(d,g,C)}}),p&&ie(X.Fragment,{children:[!r&&f&&ie(X.Fragment,{children:[o.admin?.hideDraggableBlockElement?null:b(ut,{anchorElem:p}),o.admin?.hideAddBlockButton?null:b(et,{anchorElem:p})]}),o.features.plugins?.map(d=>{if(d.position==="floatingAnchorElem"&&!(d.desktopOnly===!0&&r))return b(K,{anchorElem:p,clientProps:d.clientProps,plugin:d},d.key)}),f&&b(X.Fragment,{children:b(Nt,{anchorElem:p})})]}),f&&ie(X.Fragment,{children:[b(Dn,{}),o?.features?.markdownTransformers?.length>0&&b(pt,{})]}),o.features.plugins?.map(zn),o.features.plugins?.map(Hn)]}),o.features.plugins?.map(Vn)]}),t[5]=o,t[6]=n,t[7]=p,t[8]=f,t[9]=r,t[10]=c,t[11]=l,t[12]=m):m=t[12],m};function Kn(e){if(e.position==="aboveContainer")return b(K,{clientProps:e.clientProps,plugin:e},e.key)}function jn(e){if(e.position==="top")return b(K,{clientProps:e.clientProps,plugin:e},e.key)}function zn(e){if(e.position==="normal")return b(K,{clientProps:e.clientProps,plugin:e},e.key)}function Hn(e){if(e.position==="bottom")return b(K,{clientProps:e.clientProps,plugin:e},e.key)}function Vn(e){if(e.position==="belowContainer")return b(K,{clientProps:e.clientProps,plugin:e},e.key)}var kt=({children:e,providers:t})=>{if(!t?.length)return e;let o=t[0];return t.length>1?F(o,{children:F(kt,{providers:t.slice(1),children:e})}):F(o,{children:e})},vt=e=>{let{composerKey:t,editorConfig:o,fieldProps:n,isSmallWidthViewport:r,onChange:c,readOnly:l,rtl:s,value:a}=e,{currentView:f,views:p}=O(),u=w(),i=Yn(),y=_t.useRef(null),x=Gn(()=>{if(a&&typeof a!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(a));if(a&&Array.isArray(a)&&!("root"in a))throw new Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(a&&"jsonContent"in a)throw new Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");let h=p?.[f]?.nodes;return{editable:l!==!0,editorState:a!=null?JSON.stringify(a):void 0,namespace:o.lexical.namespace,nodes:Ke({editorConfig:o,nodeViews:h}),onError:m=>{throw m},theme:o.lexical.theme}},[o,p,f]);return x?F(Wn,{initialConfig:x,children:F(Me,{editorConfig:o,editorContainerRef:y,fieldProps:n,parentContext:u?.editDepth===i?u:void 0,children:F(kt,{providers:o.features.providers,children:F(Tt,{editorConfig:o,editorContainerRef:y,isSmallWidthViewport:r,onChange:c,rtl:s})})})},t+x.editable+f):F("p",{children:"Loading..."})};import{c as Un}from"react/compiler-runtime";import{jsx as Z,jsxs as Jn}from"react/jsx-runtime";import{ChevronIcon as qn,Popup as Qn,PopupList as Lt}from"@payloadcms/ui";import"react";function Dt(){let e=Un(5),{currentView:t,setCurrentView:o,views:n}=O();if(!n||Object.keys(n).length===0)return null;let r,c;if(e[0]!==t||e[1]!==o||e[2]!==n){c=Symbol.for("react.early_return_sentinel");e:{let l=Object.keys(n);if(!l.some(Zn)){c=null;break e}let a=["default",...l.filter(Xn)],f=t.charAt(0).toUpperCase()+t.slice(1);r=Z("div",{className:"lexical-view-selector",children:Z(Qn,{button:Jn("button",{className:"lexical-view-selector__button",type:"button",children:[Z("span",{className:"lexical-view-selector__label",children:f}),Z(qn,{className:"lexical-view-selector__icon"})]}),buttonType:"custom",horizontalAlign:"left",render:p=>{let{close:u}=p;return Z(Lt.ButtonGroup,{children:a.map(i=>{let y=i.charAt(0).toUpperCase()+i.slice(1);return Z(Lt.Button,{active:i===t,disabled:i===t,onClick:()=>{o?.(i),u()},children:y},i)})})},size:"large"})})}e[0]=t,e[1]=o,e[2]=n,e[3]=r,e[4]=c}else r=e[3],c=e[4];return c!==Symbol.for("react.early_return_sentinel")?c:r}function Xn(e){return e!=="default"}function Zn(e){return e!=="default"}var se="rich-text-lexical",pr=e=>{let{editorConfig:t,field:o,field:{admin:{className:n,description:r,readOnly:c}={},label:l,localized:s,required:a},path:f,readOnly:p,schemaPath:u,validate:i}=e,y=p||c,x=cr(),{config:{localization:h}}=ir(),m=rr({fieldLocalized:s,locale:x,localizationConfig:h||void 0}),d=sr(),{isControlledByParent:g}=O(),C=Bt((M,te)=>typeof i=="function"?i(M,{...te,required:a}):!0,[i,a]),{customComponents:{AfterInput:P,BeforeInput:R,Description:S,Error:_,Label:N}={},disabled:ee,initialValue:v,path:T,setValue:k,showError:V,value:$}=ar({potentiallyStalePath:f,validate:C}),Ce=y||ee,[W,ke]=It(!1),[be,D]=It(),E=At.useRef(v),Y=At.useRef($);Ot(()=>{let M=()=>{let te=window.matchMedia("(max-width: 768px)").matches;te!==W&&ke(te)};return M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)}},[W]);let Ft=["field-type",se,n,V&&"error",Ce&&`${se}--read-only`,t?.admin?.hideGutter!==!0&&!W?`${se}--show-gutter`:null].filter(Boolean).join(" "),ve=`${T}.${d}`,Le=Be(),$t=Bt(M=>{Le(()=>{let De=M.toJSON();Y.current=De,k(De)})},[k,Le]),Kt=fr(()=>ur(o),[o]),jt=lr(M=>{Y.current!==$&&!dr(Y.current!=null?JSON.parse(JSON.stringify(Y.current)):Y.current,$)&&(E.current=M,Y.current=$,D(new Date))});return Ot(()=>{Object.is(v,E.current)||jt(v)},[v]),le("div",{className:Ft,"data-field-path":T,"data-field-schemapath":u,"data-lexical-view":t?.view,style:Kt,children:[L(Mt,{CustomComponent:_,Fallback:L(or,{path:T,showError:V})}),le("div",{className:`${se}__label-row`,children:[N||L(nr,{label:l,localized:s,path:T,required:a}),!g&&L(Dt,{})]}),le("div",{className:`${se}__wrap`,children:[le(mr,{fallbackRender:gr,onReset:()=>{},children:[R,L(er,{drawerSlugPrefix:T,children:L(vt,{composerKey:ve,editorConfig:t,fieldProps:e,isSmallWidthViewport:W,onChange:$t,readOnly:Ce,rtl:m,value:$},JSON.stringify({path:T,rerenderProviderKey:be}))}),P]}),L(Mt,{CustomComponent:S,Fallback:L(tr,{description:r,path:T})})]})]},ve)};function gr({error:e}){return le("div",{className:"errorBoundary",role:"alert",children:[L("p",{children:"Something went wrong:"}),L("pre",{style:{color:"red"},children:e.message})]})}var Pl=pr;export{Pl as RichText};
2
- //# sourceMappingURL=Field-4UEGQMIN.js.map