@payloadcms/richtext-lexical 4.0.0-internal.a0ef1b8 → 4.0.0-internal.a7ca468

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 (571) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-F22V5L4V.js +2 -0
  3. package/dist/exports/client/Field-F22V5L4V.js.map +7 -0
  4. package/dist/exports/client/bundled.css +1 -1
  5. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  6. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  7. package/dist/exports/client/chunk-ESITTE3C.js +2 -0
  8. package/dist/exports/client/chunk-ESITTE3C.js.map +7 -0
  9. package/dist/exports/client/chunk-LN6VX25I.js +2 -0
  10. package/dist/exports/client/chunk-LN6VX25I.js.map +7 -0
  11. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  12. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  13. package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
  14. package/dist/exports/client/index.d.ts +1 -3
  15. package/dist/exports/client/index.d.ts.map +1 -1
  16. package/dist/exports/client/index.js +27 -28
  17. package/dist/exports/client/index.js.map +4 -4
  18. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  19. package/dist/features/blockquote/client/index.js +2 -2
  20. package/dist/features/blockquote/client/index.js.map +1 -1
  21. package/dist/features/blockquote/server/index.js +2 -2
  22. package/dist/features/blockquote/server/index.js.map +1 -1
  23. package/dist/features/blocks/client/component/index.css +2 -2
  24. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  25. package/dist/features/blocks/client/component/index.js +2 -1
  26. package/dist/features/blocks/client/component/index.js.map +1 -1
  27. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  28. package/dist/features/blocks/client/componentInline/index.css +8 -8
  29. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  30. package/dist/features/blocks/client/componentInline/index.js +2 -1
  31. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  32. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  33. package/dist/features/blocks/client/index.d.ts.map +1 -1
  34. package/dist/features/blocks/client/index.js +4 -2
  35. package/dist/features/blocks/client/index.js.map +1 -1
  36. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  37. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  38. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  39. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  40. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  41. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  42. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  43. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  44. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  45. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  46. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  47. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  49. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  50. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  51. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  52. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  53. package/dist/features/blocks/server/index.d.ts.map +1 -1
  54. package/dist/features/blocks/server/index.js +6 -8
  55. package/dist/features/blocks/server/index.js.map +1 -1
  56. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  57. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  58. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  59. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  60. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  62. package/dist/features/blocks/server/schema.js +3 -2
  63. package/dist/features/blocks/server/schema.js.map +1 -1
  64. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  65. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  66. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  67. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  68. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  69. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  70. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  71. package/dist/features/converters/markdownToLexical/index.js +5 -2
  72. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  73. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  74. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  75. package/dist/features/format/bold/feature.client.js +1 -1
  76. package/dist/features/format/bold/feature.client.js.map +1 -1
  77. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  78. package/dist/features/format/bold/feature.server.js +1 -1
  79. package/dist/features/format/bold/feature.server.js.map +1 -1
  80. package/dist/features/format/inlineCode/feature.client.js +1 -1
  81. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  82. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  83. package/dist/features/format/inlineCode/feature.server.js +1 -1
  84. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  85. package/dist/features/format/italic/feature.client.js +1 -1
  86. package/dist/features/format/italic/feature.client.js.map +1 -1
  87. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  88. package/dist/features/format/italic/feature.server.js +1 -1
  89. package/dist/features/format/italic/feature.server.js.map +1 -1
  90. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  91. package/dist/features/format/strikethrough/feature.client.js +1 -1
  92. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  93. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  94. package/dist/features/format/strikethrough/feature.server.js +1 -1
  95. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  96. package/dist/features/heading/client/index.js +2 -2
  97. package/dist/features/heading/client/index.js.map +1 -1
  98. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  99. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  100. package/dist/features/heading/markdownTransformer.js +6 -19
  101. package/dist/features/heading/markdownTransformer.js.map +1 -1
  102. package/dist/features/heading/server/index.js +2 -2
  103. package/dist/features/heading/server/index.js.map +1 -1
  104. package/dist/features/heading/server/schema.d.ts.map +1 -1
  105. package/dist/features/horizontalRule/client/index.js +2 -2
  106. package/dist/features/horizontalRule/client/index.js.map +1 -1
  107. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  108. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  109. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  110. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  111. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  112. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  113. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  114. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  115. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  116. package/dist/features/horizontalRule/server/index.js +2 -2
  117. package/dist/features/horizontalRule/server/index.js.map +1 -1
  118. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  119. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  120. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  121. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  122. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  123. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  124. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  125. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  126. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  127. package/dist/features/link/client/index.js +2 -2
  128. package/dist/features/link/client/index.js.map +1 -1
  129. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  130. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  131. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  132. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  133. package/dist/features/link/markdownTransformer.d.ts +4 -4
  134. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  135. package/dist/features/link/markdownTransformer.js +2 -2
  136. package/dist/features/link/markdownTransformer.js.map +1 -1
  137. package/dist/features/link/markdownTransformer.spec.js +10 -10
  138. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  139. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  140. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  141. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  142. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  143. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  144. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  145. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  146. package/dist/features/link/server/baseFields.js.map +1 -1
  147. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  148. package/dist/features/link/server/index.js +4 -4
  149. package/dist/features/link/server/index.js.map +1 -1
  150. package/dist/features/link/server/schema.d.ts.map +1 -1
  151. package/dist/features/link/server/schema.js +4 -2
  152. package/dist/features/link/server/schema.js.map +1 -1
  153. package/dist/features/link/server/validate.d.ts.map +1 -1
  154. package/dist/features/lists/checklist/client/index.js +1 -1
  155. package/dist/features/lists/checklist/client/index.js.map +1 -1
  156. package/dist/features/lists/checklist/server/index.js +1 -1
  157. package/dist/features/lists/checklist/server/index.js.map +1 -1
  158. package/dist/features/lists/orderedList/client/index.js +1 -1
  159. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  160. package/dist/features/lists/orderedList/server/index.js +1 -1
  161. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  162. package/dist/features/lists/unorderedList/client/index.js +1 -1
  163. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  164. package/dist/features/lists/unorderedList/server/index.js +1 -1
  165. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  166. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  167. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  168. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  169. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  170. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  171. package/dist/features/relationship/server/schema.d.ts +3 -3
  172. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  173. package/dist/features/relationship/server/schema.js +22 -5
  174. package/dist/features/relationship/server/schema.js.map +1 -1
  175. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  176. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  177. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  178. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  179. package/dist/features/table/client/index.d.ts.map +1 -0
  180. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  181. package/dist/features/table/client/index.js.map +1 -0
  182. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  183. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  184. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  185. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  186. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  187. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  188. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  189. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  190. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  191. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  192. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  193. package/dist/features/table/client/utils/debounce.js.map +1 -0
  194. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  195. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  196. package/dist/features/table/markdownTransformer.d.ts +5 -0
  197. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  198. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  199. package/dist/features/table/markdownTransformer.js.map +1 -0
  200. package/dist/features/table/server/index.d.ts +3 -0
  201. package/dist/features/table/server/index.d.ts.map +1 -0
  202. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  203. package/dist/features/table/server/index.js.map +1 -0
  204. package/dist/features/table/server/schema.d.ts.map +1 -0
  205. package/dist/features/table/server/schema.js.map +1 -0
  206. package/dist/features/textState/feature.client.js +1 -1
  207. package/dist/features/textState/feature.client.js.map +1 -1
  208. package/dist/features/toolbars/fixed/client/Toolbar/index.css +4 -6
  209. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  210. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  211. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  212. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  213. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  214. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  215. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  216. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  217. package/dist/features/typesClient.d.ts +1 -1
  218. package/dist/features/typesClient.d.ts.map +1 -1
  219. package/dist/features/typesClient.js.map +1 -1
  220. package/dist/features/typesServer.d.ts +3 -3
  221. package/dist/features/typesServer.d.ts.map +1 -1
  222. package/dist/features/typesServer.js.map +1 -1
  223. package/dist/features/upload/client/component/index.css +9 -9
  224. package/dist/features/upload/client/component/index.js +2 -1
  225. package/dist/features/upload/client/component/index.js.map +1 -1
  226. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  227. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  228. package/dist/features/upload/client/plugin/index.js +5 -5
  229. package/dist/features/upload/client/plugin/index.js.map +1 -1
  230. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  231. package/dist/features/upload/server/index.js +4 -4
  232. package/dist/features/upload/server/index.js.map +1 -1
  233. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  234. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  235. package/dist/features/upload/server/markdownTransformer.js +1 -1
  236. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  237. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  238. package/dist/features/upload/server/schema.d.ts +4 -4
  239. package/dist/features/upload/server/schema.d.ts.map +1 -1
  240. package/dist/features/upload/server/schema.js +26 -6
  241. package/dist/features/upload/server/schema.js.map +1 -1
  242. package/dist/features/upload/server/validate.d.ts.map +1 -1
  243. package/dist/field/Diff/converters/unknown/index.css +1 -1
  244. package/dist/field/Field.d.ts.map +1 -1
  245. package/dist/field/Field.js +18 -15
  246. package/dist/field/Field.js.map +1 -1
  247. package/dist/field/ViewSelector.css +1 -1
  248. package/dist/field/bundled.css +1 -1
  249. package/dist/field/index.css +14 -11
  250. package/dist/i18n.d.ts.map +1 -1
  251. package/dist/i18n.js +68 -0
  252. package/dist/i18n.js.map +1 -1
  253. package/dist/index.d.ts +3 -3
  254. package/dist/index.d.ts.map +1 -1
  255. package/dist/index.js +11 -54
  256. package/dist/index.js.map +1 -1
  257. package/dist/lexical/LexicalEditor.css +18 -18
  258. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  259. package/dist/lexical/LexicalEditor.js +2 -36
  260. package/dist/lexical/LexicalEditor.js.map +1 -1
  261. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  262. package/dist/lexical/LexicalProvider.js +7 -22
  263. package/dist/lexical/LexicalProvider.js.map +1 -1
  264. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  265. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  266. package/dist/lexical/config/server/loader.d.ts +1 -1
  267. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  268. package/dist/lexical/config/server/loader.js +2 -2
  269. package/dist/lexical/config/server/loader.js.map +1 -1
  270. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  271. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  272. package/dist/lexical/config/server/sanitize.js +2 -2
  273. package/dist/lexical/config/server/sanitize.js.map +1 -1
  274. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  275. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  276. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  277. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  278. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  279. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  280. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  281. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  282. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  283. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  284. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  285. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  286. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  287. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  288. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  289. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  290. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  291. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  292. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  293. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  294. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  295. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  296. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  297. package/dist/lexical/theme/EditorTheme.css +18 -19
  298. package/dist/lexical/ui/ContentEditable.css +22 -17
  299. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  300. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  301. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  302. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  303. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  304. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  305. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  306. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  307. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  308. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  309. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  310. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  311. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  312. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  313. package/dist/lexical/utils/point.d.ts.map +1 -1
  314. package/dist/lexical/utils/rect.d.ts.map +1 -1
  315. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  316. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  317. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  318. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  319. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  320. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  321. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  322. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  323. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  324. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  325. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  326. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  327. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  328. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  329. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  330. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  331. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  332. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  333. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  334. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  335. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  336. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  337. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  338. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  339. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  340. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  341. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  342. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  343. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  344. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  345. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  346. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  347. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  348. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  349. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  350. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  351. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  352. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  353. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  354. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  355. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  356. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  357. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  358. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  359. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  360. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  361. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  362. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  363. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  364. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  365. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  366. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  367. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  368. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  369. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  370. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  371. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  372. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  373. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  374. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  375. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  376. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  377. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  378. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  379. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  380. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  381. package/dist/types/index.d.ts +1 -1
  382. package/dist/types/index.d.ts.map +1 -1
  383. package/dist/types/index.js.map +1 -1
  384. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  385. package/dist/types/nodeTypes.d.ts +1 -1
  386. package/dist/types/nodeTypes.d.ts.map +1 -1
  387. package/dist/types/nodeTypes.js.map +1 -1
  388. package/dist/types/schema.d.ts.map +1 -1
  389. package/dist/types/schema.js +12 -5
  390. package/dist/types/schema.js.map +1 -1
  391. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  392. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  393. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  394. package/dist/utilities/createServerFeature.d.ts +1 -1
  395. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  396. package/dist/utilities/createServerFeature.js +2 -2
  397. package/dist/utilities/createServerFeature.js.map +1 -1
  398. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  399. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  400. package/dist/utilities/editorConfigFactory.js +9 -9
  401. package/dist/utilities/editorConfigFactory.js.map +1 -1
  402. package/dist/utilities/fieldsDrawer/index.css +4 -4
  403. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  404. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  405. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  406. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  407. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  408. package/dist/utilities/generateImportMap.d.ts +1 -1
  409. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  410. package/dist/utilities/generateImportMap.js +3 -7
  411. package/dist/utilities/generateImportMap.js.map +1 -1
  412. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  413. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  414. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  415. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  416. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  417. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  418. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  419. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  420. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  421. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  422. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  423. package/dist/validate/index.d.ts.map +1 -1
  424. package/package.json +94 -26
  425. package/dist/@types/assets.d.js +0 -2
  426. package/dist/@types/assets.d.js.map +0 -1
  427. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  428. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  429. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  430. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  431. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  432. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  433. package/dist/exports/client/chunk-ZYXHC5CY.js +0 -2
  434. package/dist/exports/client/chunk-ZYXHC5CY.js.map +0 -7
  435. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  436. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  437. package/dist/exports/client/componentInline-R3EPNYWF.js +0 -2
  438. package/dist/exports/server/rsc.browser.d.ts +0 -11
  439. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  440. package/dist/exports/server/rsc.browser.js +0 -10
  441. package/dist/exports/server/rsc.browser.js.map +0 -1
  442. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  443. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  444. package/dist/features/blockquote/markdownTransformer.js +0 -33
  445. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  446. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  447. package/dist/features/experimental_table/client/index.js.map +0 -1
  448. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  449. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  450. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  451. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  452. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  453. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  454. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  455. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  456. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  457. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  458. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  459. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  460. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  461. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  462. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  463. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  464. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  465. package/dist/features/experimental_table/server/index.d.ts +0 -3
  466. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  467. package/dist/features/experimental_table/server/index.js.map +0 -1
  468. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  469. package/dist/features/experimental_table/server/schema.js.map +0 -1
  470. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  471. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  472. package/dist/features/format/bold/markdownTransformers.js +0 -23
  473. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  474. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  475. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  476. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  477. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  478. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  479. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  480. package/dist/features/format/italic/markdownTransformers.js +0 -12
  481. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  482. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  483. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  484. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  485. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  486. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  487. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  488. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  489. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  490. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  491. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  492. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  493. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  494. package/dist/features/lists/shared/markdown.d.ts +0 -6
  495. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  496. package/dist/features/lists/shared/markdown.js +0 -57
  497. package/dist/features/lists/shared/markdown.js.map +0 -1
  498. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  499. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  500. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  501. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  502. package/dist/field/clientEntry.d.ts +0 -29
  503. package/dist/field/clientEntry.d.ts.map +0 -1
  504. package/dist/field/clientEntry.js +0 -86
  505. package/dist/field/clientEntry.js.map +0 -1
  506. package/dist/lexical/utils/guard.d.ts +0 -5
  507. package/dist/lexical/utils/guard.d.ts.map +0 -1
  508. package/dist/lexical/utils/guard.js +0 -9
  509. package/dist/lexical/utils/guard.js.map +0 -1
  510. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  511. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  512. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  513. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  514. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  515. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  516. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  517. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  518. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  519. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  520. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  521. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  522. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  523. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  524. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  525. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  526. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  527. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  528. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  529. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  530. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  531. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  532. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  533. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  534. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  535. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  536. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  537. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  538. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  539. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  540. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  541. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  542. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  543. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  544. package/dist/packages/@lexical/markdown/index.js +0 -39
  545. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  546. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  547. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  548. package/dist/packages/@lexical/markdown/utils.js +0 -267
  549. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  550. /package/dist/exports/client/{componentInline-R3EPNYWF.js.map → componentInline-H24N7GUG.js.map} +0 -0
  551. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  552. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  553. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  554. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +0 -0
  555. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  556. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  557. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  558. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  559. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  560. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  561. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  562. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  563. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  564. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  565. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  566. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  567. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  568. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  569. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  570. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  571. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["useLexicalComposerContext","TablePlugin","LexicalReactTablePlugin","INSERT_TABLE_COMMAND","TableCellNode","TableNode","TableRowNode","mergeRegister","$getSelection","$isRangeSelection","$setSelection","COMMAND_PRIORITY_EDITOR","createCommand","createContext","use","useCallback","useEffect","useMemo","useRef","useState","React","TableGridPopup","OPEN_TABLE_DRAWER_COMMAND","CellContext","cellEditorConfig","cellEditorPlugins","set","TableContext","children","contextValue","setContextValue","_jsx","value","editor","cellContext","isPopupOpen","setIsPopupOpen","popupPosition","setPopupPosition","selectionRef","anchorElem","setAnchorElem","rootElement","getRootElement","editorWrapper","closest","parentElement","hasNodes","Error","registerCommand","anchor","anchorRect","getBoundingClientRect","pos","getEditorState","read","selection","current","clone","anchorNode","getNode","domElem","getElementByKey","getKey","elemRect","height","left","top","bottom","nativeSelection","window","getSelection","rangeCount","range","getRangeAt","rangeRect","handleClose","handleInsert","cols","rows","focus","update","discrete","skipTransforms","setTimeout","dispatchCommand","columns","String","_jsxs","Fragment","isOpen","onClose","onInsert","position","hasCellBackgroundColor","hasCellMerge","hasHorizontalScroll"],"sources":["../../../../../../src/features/experimental_table/client/plugins/TablePlugin/index.tsx"],"sourcesContent":["'use client'\n\nimport type {\n BaseSelection,\n EditorThemeClasses,\n Klass,\n LexicalCommand,\n LexicalEditor,\n LexicalNode,\n} from 'lexical'\nimport type { JSX } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { TablePlugin as LexicalReactTablePlugin } from '@lexical/react/LexicalTablePlugin'\nimport { INSERT_TABLE_COMMAND, TableCellNode, TableNode, TableRowNode } from '@lexical/table'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isRangeSelection,\n $setSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport { createContext, use, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport { TableGridPopup } from './TableGridPopup/index.js'\nimport './index.css'\n\nexport type CellContextShape = {\n cellEditorConfig: CellEditorConfig | null\n cellEditorPlugins: Array<JSX.Element> | JSX.Element | null\n set: (\n cellEditorConfig: CellEditorConfig | null,\n cellEditorPlugins: Array<JSX.Element> | JSX.Element | null,\n ) => void\n}\n\nexport type CellEditorConfig = Readonly<{\n namespace: string\n nodes?: ReadonlyArray<Klass<LexicalNode>>\n onError: (error: Error, editor: LexicalEditor) => void\n readOnly?: boolean\n theme?: EditorThemeClasses\n}>\n\nexport const OPEN_TABLE_DRAWER_COMMAND: LexicalCommand<{}> = createCommand(\n 'OPEN_EMBED_DRAWER_COMMAND',\n)\n\nexport const CellContext = createContext<CellContextShape>({\n cellEditorConfig: null,\n cellEditorPlugins: null,\n set: () => {\n // Empty\n },\n})\n\nexport function TableContext({ children }: { children: JSX.Element }) {\n const [contextValue, setContextValue] = useState<{\n cellEditorConfig: CellEditorConfig | null\n cellEditorPlugins: Array<JSX.Element> | JSX.Element | null\n }>({\n cellEditorConfig: null,\n cellEditorPlugins: null,\n })\n return (\n <CellContext\n value={useMemo(\n () => ({\n cellEditorConfig: contextValue.cellEditorConfig,\n cellEditorPlugins: contextValue.cellEditorPlugins,\n set: (cellEditorConfig, cellEditorPlugins) => {\n setContextValue({ cellEditorConfig, cellEditorPlugins })\n },\n }),\n [contextValue.cellEditorConfig, contextValue.cellEditorPlugins],\n )}\n >\n {children}\n </CellContext>\n )\n}\n\nexport const TablePlugin: PluginComponent = () => {\n const [editor] = useLexicalComposerContext()\n const cellContext = use(CellContext)\n const [isPopupOpen, setIsPopupOpen] = useState(false)\n const [popupPosition, setPopupPosition] = useState<{ left: number; top: number } | null>(null)\n const selectionRef = useRef<BaseSelection | null>(null)\n const [anchorElem, setAnchorElem] = useState<HTMLElement | null>(null)\n\n useEffect(() => {\n const rootElement = editor.getRootElement()\n if (rootElement) {\n const editorWrapper: HTMLElement | null =\n (rootElement.closest('.editor') as HTMLElement) ?? null\n setAnchorElem(editorWrapper ?? rootElement.parentElement)\n }\n }, [editor])\n\n useEffect(() => {\n if (!editor.hasNodes([TableNode, TableRowNode, TableCellNode])) {\n throw new Error(\n 'TablePlugin: TableNode, TableRowNode, or TableCellNode is not registered on editor',\n )\n }\n\n return mergeRegister(\n editor.registerCommand(\n OPEN_TABLE_DRAWER_COMMAND,\n () => {\n const anchor = anchorElem\n if (!anchor) {\n return true\n }\n\n const anchorRect = anchor.getBoundingClientRect()\n let pos: { left: number; top: number } | null = null\n\n editor.getEditorState().read(() => {\n const selection = $getSelection()\n if ($isRangeSelection(selection)) {\n selectionRef.current = selection.clone()\n\n const anchorNode = selection.anchor.getNode()\n const domElem = editor.getElementByKey(anchorNode.getKey())\n if (domElem) {\n const elemRect = domElem.getBoundingClientRect()\n if (elemRect.height > 0) {\n pos = {\n left: elemRect.left - anchorRect.left,\n top: elemRect.bottom - anchorRect.top + 8,\n }\n }\n }\n }\n })\n\n const nativeSelection = window.getSelection()\n if (nativeSelection && nativeSelection.rangeCount > 0) {\n const range = nativeSelection.getRangeAt(0)\n const rangeRect = range.getBoundingClientRect()\n if (rangeRect.height > 0) {\n pos = {\n left: rangeRect.left - anchorRect.left,\n top: rangeRect.bottom - anchorRect.top + 8,\n }\n }\n }\n\n // Fallback: position at start of editor\n if (!pos) {\n pos = { left: 0, top: 40 }\n }\n\n setPopupPosition(pos)\n setIsPopupOpen(true)\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [cellContext, editor, anchorElem])\n\n const handleClose = useCallback(() => {\n setIsPopupOpen(false)\n }, [])\n\n const handleInsert = useCallback(\n (cols: number, rows: number) => {\n setIsPopupOpen(false)\n editor.focus()\n editor.update(\n () => {\n if (selectionRef.current) {\n $setSelection(selectionRef.current.clone())\n }\n },\n { discrete: true, skipTransforms: true },\n )\n setTimeout(() => {\n editor.dispatchCommand(INSERT_TABLE_COMMAND, {\n columns: String(cols),\n rows: String(rows),\n })\n }, 1)\n },\n [editor],\n )\n\n return (\n <React.Fragment>\n <TableGridPopup\n anchorElem={anchorElem}\n editor={editor}\n isOpen={isPopupOpen}\n onClose={handleClose}\n onInsert={handleInsert}\n position={popupPosition}\n />\n <LexicalReactTablePlugin\n hasCellBackgroundColor={false}\n hasCellMerge\n hasHorizontalScroll={true}\n />\n </React.Fragment>\n )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,aAAA,CAAc6B,YAAA,CAAakB,OAAO,CAACC,KAAK;MAC1C;IACF,GACA;MAAEwB,QAAA,EAAU;MAAMC,cAAA,EAAgB;IAAK;IAEzCC,UAAA,CAAW;MACTnD,MAAA,CAAOoD,eAAe,CAAClF,oBAAA,EAAsB;QAC3CmF,OAAA,EAASC,MAAA,CAAOT,IAAA;QAChBC,IAAA,EAAMQ,MAAA,CAAOR,IAAA;MACf;IACF,GAAG;EACL,GACA,CAAC9C,MAAA,CAAO;EAGV,oBACEuD,KAAA,CAACpE,KAAA,CAAMqE,QAAQ;4BACb1D,IAAA,CAACV,cAAA;MACCmB,UAAA,EAAYA,UAAA;MACZP,MAAA,EAAQA,MAAA;MACRyD,MAAA,EAAQvD,WAAA;MACRwD,OAAA,EAASf,WAAA;MACTgB,QAAA,EAAUf,YAAA;MACVgB,QAAA,EAAUxD;qBAEZN,IAAA,CAAC7B,uBAAA;MACC4F,sBAAA,EAAwB;MACxBC,YAAY;MACZC,mBAAA,EAAqB;;;AAI7B","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../src/features/experimental_table/client/utils/debounce.ts"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,iBAAS,QAAQ,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAA;;;;EA+HpC;AAGD,eAAe,QAAQ,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debounce.js","names":["FUNC_ERROR_TEXT","nativeMax","Math","max","nativeMin","min","debounce","func","wait","options","lastArgs","lastCallTime","lastInvokeTime","lastThis","leading","maxing","maxWait","result","timerID","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","Date","now","trailingEdge","cancel","clearTimeout","flush","debounced","isInvoking","arguments"],"sources":["../../../../../src/features/experimental_table/client/utils/debounce.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck - not worth it migrate jsdoc to tsdoc\n'use client'\n// Copied & modified from https://github.com/lodash/lodash/blob/main/src/debounce.ts\n/*\nThe MIT License\n\nCopyright JS Foundation and other contributors <https://js.foundation/>\n\nBased on Underscore.js, copyright Jeremy Ashkenas,\nDocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>\n\nThis software consists of voluntary contributions made by many\nindividuals. For exact contribution history, see the revision history\navailable at https://github.com/lodash/lodash\n\nThe following license applies to all parts of this software except as\ndocumented below:\n\n====\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n====\n\nCopyright and related rights for sample code are waived via CC0. Sample\ncode is defined as all source code displayed within the prose of the\ndocumentation.\n\nCC0: http://creativecommons.org/publicdomain/zero/1.0/\n\n====\n\nFiles located in the node_modules and vendor directories are externally\nmaintained libraries used by this software which have their own\nlicenses; we recommend you read them, as their terms may differ from the\nterms above.\n */\n\n/** Error message constants. */\nconst FUNC_ERROR_TEXT = 'Expected a function'\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nconst nativeMax = Math.max,\n nativeMin = Math.min\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [sortOnOptions={}] The options object.\n * @param {boolean} [sortOnOptions.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [sortOnOptions.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [sortOnOptions.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n let lastArgs,\n lastCallTime,\n lastInvokeTime = 0,\n lastThis,\n leading = false,\n maxing = false,\n maxWait,\n result,\n timerID,\n trailing = true\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT)\n }\n wait = wait || 0\n if (typeof options === 'object') {\n leading = !!options.leading\n maxing = 'maxWait' in options\n maxWait = maxing ? nativeMax(options.maxWait || 0, wait) : maxWait\n trailing = 'trailing' in options ? !!options.trailing : trailing\n }\n\n function invokeFunc(time) {\n const args = lastArgs,\n thisArg = lastThis\n\n lastArgs = lastThis = undefined\n lastInvokeTime = time\n result = func.apply(thisArg, args)\n return result\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time\n // Start the timer for the trailing edge.\n timerID = setTimeout(timerExpired, wait)\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result\n }\n\n function remainingWait(time) {\n const timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall\n\n return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting\n }\n\n function shouldInvoke(time) {\n const timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (\n lastCallTime === undefined ||\n timeSinceLastCall >= wait ||\n timeSinceLastCall < 0 ||\n (maxing && timeSinceLastInvoke >= maxWait)\n )\n }\n\n function timerExpired() {\n const time = Date.now()\n if (shouldInvoke(time)) {\n return trailingEdge(time)\n }\n // Restart the timer.\n timerID = setTimeout(timerExpired, remainingWait(time))\n }\n\n function trailingEdge(time) {\n timerID = undefined\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time)\n }\n lastArgs = lastThis = undefined\n return result\n }\n\n function cancel() {\n if (timerID !== undefined) {\n clearTimeout(timerID)\n }\n lastInvokeTime = 0\n lastArgs = lastCallTime = lastThis = timerID = undefined\n }\n\n function flush() {\n return timerID === undefined ? result : trailingEdge(Date.now())\n }\n\n function debounced() {\n const time = Date.now(),\n isInvoking = shouldInvoke(time)\n\n // eslint-disable-next-line prefer-rest-params\n lastArgs = arguments\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n lastThis = this\n lastCallTime = time\n\n if (isInvoking) {\n if (timerID === undefined) {\n return leadingEdge(lastCallTime)\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerID)\n timerID = setTimeout(timerExpired, wait)\n return invokeFunc(lastCallTime)\n }\n }\n if (timerID === undefined) {\n timerID = setTimeout(timerExpired, wait)\n }\n return result\n }\n debounced.cancel = cancel\n debounced.flush = flush\n return debounced\n}\n\n// eslint-disable-next-line no-restricted-exports\nexport default debounce\n"],"mappings":"AAAA;AACA;AACA;;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAA,CAoDA;AACA,MAAMA,eAAA,GAAkB;AAExB;AACA,MAAMC,SAAA,GAAYC,IAAA,CAAKC,GAAG;EACxBC,SAAA,GAAYF,IAAA,CAAKG,GAAG;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAASC,SAASC,IAAI,EAAEC,IAAI,EAAEC,OAAO;EACnC,IAAIC,QAAA;IACFC,YAAA;IACAC,cAAA,GAAiB;IACjBC,QAAA;IACAC,OAAA,GAAU;IACVC,MAAA,GAAS;IACTC,OAAA;IACAC,MAAA;IACAC,OAAA;IACAC,QAAA,GAAW;EAEb,IAAI,OAAOZ,IAAA,IAAQ,YAAY;IAC7B,MAAM,IAAIa,SAAA,CAAU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AWV,YAAA;MACpB;IACF;IACA,IAAIO,OAAA,KAAYO,SAAA,EAAW;MACzBP,OAAA,GAAUU,UAAA,CAAWC,YAAA,EAAcrB,IAAA;IACrC;IACA,OAAOS,MAAA;EACT;EACAwB,SAAA,CAAUH,MAAM,GAAGA,MAAA;EACnBG,SAAA,CAAUD,KAAK,GAAGA,KAAA;EAClB,OAAOC,SAAA;AACT;AAEA;AACA,eAAenC,QAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../../../src/features/experimental_table/client/utils/useDebounce.ts"],"names":[],"mappings":"AAWA,wBAAgB,WAAW,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EAC9D,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,MAAM,aAauB,UAAU,CAAC,CAAC,CAAC,UAOrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounce.js","names":["c","_c","useCallback","useEffect","useRef","debounce","useDebounce","fn","ms","maxWait","$","debouncedRef","t0","t1","current","cancel","t2","Symbol","for","t3","args","callback"],"sources":["../../../../../src/features/experimental_table/client/utils/useDebounce.ts"],"sourcesContent":["'use client'\nimport { useCallback, useEffect, useRef } from 'react'\n\nimport debounce from './debounce.js'\n\n// Define the type for debounced function that includes cancel method\ninterface DebouncedFunction<T extends (...args: any[]) => any> {\n (...args: Parameters<T>): ReturnType<T>\n cancel: () => void\n}\n\nexport function useDebounce<T extends (...args: never[]) => void>(\n fn: T,\n ms: number,\n maxWait?: number,\n) {\n // Update the ref type to include cancel method\n const debouncedRef = useRef<DebouncedFunction<T> | null>(null)\n\n useEffect(() => {\n debouncedRef.current = debounce(fn, ms, { maxWait }) as DebouncedFunction<T>\n\n return () => {\n debouncedRef.current?.cancel()\n }\n }, [fn, ms, maxWait])\n\n const callback = useCallback((...args: Parameters<T>) => {\n if (debouncedRef.current) {\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","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- import { type ElementTransformer, type Transformer } from '../../packages/@lexical/markdown/index.js';
2
- export declare const TableMarkdownTransformer: (props: {
3
- allTransformers: Transformer[];
4
- }) => ElementTransformer;
5
- //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/experimental_table/markdownTransformer.ts"],"names":[],"mappings":"AAgBA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EACjB,MAAM,2CAA2C,CAAA;AAOlD,eAAO,MAAM,wBAAwB,EAAE,CAAC,KAAK,EAAE;IAC7C,eAAe,EAAE,WAAW,EAAE,CAAA;CAC/B,KAAK,kBAiIJ,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$createTableCellNode","$createTableNode","$createTableRowNode","$isTableCellNode","$isTableNode","$isTableRowNode","TableCellHeaderStates","TableCellNode","TableNode","TableRowNode","$isParagraphNode","$isTextNode","$convertFromMarkdownString","$convertToMarkdownString","TABLE_ROW_REG_EXP","TABLE_ROW_DIVIDER_REG_EXP","TableMarkdownTransformer","allTransformers","type","dependencies","export","node","output","row","getChildren","rowOutput","isHeaderRow","cell","push","replace","trim","__headerState","ROW","join","map","_","regExp","parentNode","_1","match","match0","test","table","getPreviousSibling","rows","lastRow","length","forEach","setHeaderStyles","remove","matchCells","mapToTableCells","sibling","maxCells","getChildrenSize","firstChild","getFirstChild","cells","getTextContent","Math","max","unshift","previousSibling","tableRow","append","i","$createTableCell","getTableColumnsSize","selectEnd","textContent","NO_STATUS","split","text"],"sources":["../../../src/features/experimental_table/markdownTransformer.ts"],"sourcesContent":["import type { LexicalNode } from 'lexical'\n\nimport {\n $createTableCellNode,\n $createTableNode,\n $createTableRowNode,\n $isTableCellNode,\n $isTableNode,\n $isTableRowNode,\n TableCellHeaderStates,\n TableCellNode,\n TableNode,\n TableRowNode,\n} from '@lexical/table'\nimport { $isParagraphNode, $isTextNode } from 'lexical'\n\nimport {\n $convertFromMarkdownString,\n $convertToMarkdownString,\n type ElementTransformer,\n type Transformer,\n} from '../../packages/@lexical/markdown/index.js'\n\n// Very primitive table setup\nconst TABLE_ROW_REG_EXP = /^\\|(.+)\\|\\s?$/\n// eslint-disable-next-line regexp/no-unused-capturing-group\nconst TABLE_ROW_DIVIDER_REG_EXP = /^(\\| ?:?-*:? ?)+\\|\\s?$/\n\nexport const TableMarkdownTransformer: (props: {\n allTransformers: Transformer[]\n}) => ElementTransformer = ({ allTransformers }) => ({\n type: 'element',\n dependencies: [TableNode, TableRowNode, TableCellNode],\n export: (node: LexicalNode) => {\n if (!$isTableNode(node)) {\n return null\n }\n\n const output: string[] = []\n\n for (const row of node.getChildren()) {\n const rowOutput: string[] = []\n if (!$isTableRowNode(row)) {\n continue\n }\n\n let isHeaderRow = false\n for (const cell of row.getChildren()) {\n // It's TableCellNode, so it's just to make flow happy\n if ($isTableCellNode(cell)) {\n rowOutput.push(\n $convertToMarkdownString(allTransformers, cell).replace(/\\n/g, '\\\\n').trim(),\n )\n\n if (cell.__headerState === TableCellHeaderStates.ROW) {\n isHeaderRow = true\n }\n }\n }\n\n output.push(`| ${rowOutput.join(' | ')} |`)\n if (isHeaderRow) {\n output.push(`| ${rowOutput.map((_) => '---').join(' | ')} |`)\n }\n }\n\n return output.join('\\n')\n },\n regExp: TABLE_ROW_REG_EXP,\n replace: (parentNode, _1, match) => {\n const match0 = match[0]\n if (!match0) {\n return\n }\n // Header row\n if (TABLE_ROW_DIVIDER_REG_EXP.test(match0)) {\n const table = parentNode.getPreviousSibling()\n if (!table || !$isTableNode(table)) {\n return\n }\n\n const rows = table.getChildren()\n const lastRow = rows[rows.length - 1]\n if (!lastRow || !$isTableRowNode(lastRow)) {\n return\n }\n\n // Add header state to row cells\n lastRow.getChildren().forEach((cell) => {\n if (!$isTableCellNode(cell)) {\n return\n }\n cell.setHeaderStyles(TableCellHeaderStates.ROW, TableCellHeaderStates.ROW)\n })\n\n // Remove line\n parentNode.remove()\n return\n }\n\n const matchCells = mapToTableCells(match0, allTransformers)\n\n if (matchCells == null) {\n return\n }\n\n const rows = [matchCells]\n let sibling = parentNode.getPreviousSibling()\n let maxCells = matchCells.length\n\n while (sibling) {\n if (!$isParagraphNode(sibling)) {\n break\n }\n\n if (sibling.getChildrenSize() !== 1) {\n break\n }\n\n const firstChild = sibling.getFirstChild()\n\n if (!$isTextNode(firstChild)) {\n break\n }\n\n const cells = mapToTableCells(firstChild.getTextContent(), allTransformers)\n\n if (cells == null) {\n break\n }\n\n maxCells = Math.max(maxCells, cells.length)\n rows.unshift(cells)\n const previousSibling = sibling.getPreviousSibling()\n sibling.remove()\n sibling = previousSibling\n }\n\n const table = $createTableNode()\n\n for (const cells of rows) {\n const tableRow = $createTableRowNode()\n table.append(tableRow)\n\n for (let i = 0; i < maxCells; i++) {\n tableRow.append(i < cells.length ? cells[i]! : $createTableCell('', allTransformers))\n }\n }\n\n const previousSibling = parentNode.getPreviousSibling()\n if ($isTableNode(previousSibling) && getTableColumnsSize(previousSibling) === maxCells) {\n previousSibling.append(...table.getChildren())\n parentNode.remove()\n } else {\n parentNode.replace(table)\n }\n\n table.selectEnd()\n },\n})\n\nfunction getTableColumnsSize(table: TableNode) {\n const row = table.getFirstChild()\n return $isTableRowNode(row) ? row.getChildrenSize() : 0\n}\n\nconst $createTableCell = (textContent: string, allTransformers: Transformer[]): TableCellNode => {\n textContent = textContent.replace(/\\\\n/g, '\\n')\n const cell = $createTableCellNode(TableCellHeaderStates.NO_STATUS)\n $convertFromMarkdownString(textContent, allTransformers, cell)\n return cell\n}\n\nconst mapToTableCells = (\n textContent: string,\n allTransformers: Transformer[],\n): Array<TableCellNode> | null => {\n const match = textContent.match(TABLE_ROW_REG_EXP)\n if (!match || !match[1]) {\n return null\n }\n return match[1].split('|').map((text) => $createTableCell(text, allTransformers))\n}\n"],"mappings":"AAEA,SACEA,oBAAoB,EACpBC,gBAA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CAAMc,aAAa;EAC/B,OAAOnD,eAAA,CAAgBkB,GAAA,IAAOA,GAAA,CAAI+B,eAAe,KAAK;AACxD;AAEA,MAAMY,gBAAA,GAAmBA,CAACG,WAAA,EAAqBpD,eAAA;EAC7CoD,WAAA,GAAcA,WAAA,CAAYxC,OAAO,CAAC,QAAQ;EAC1C,MAAMF,IAAA,GAAO3B,oBAAA,CAAqBM,qBAAA,CAAsBgE,SAAS;EACjE1D,0BAAA,CAA2ByD,WAAA,EAAapD,eAAA,EAAiBU,IAAA;EACzD,OAAOA,IAAA;AACT;AAEA,MAAMwB,eAAA,GAAkBA,CACtBkB,WAAA,EACApD,eAAA;EAEA,MAAMsB,KAAA,GAAQ8B,WAAA,CAAY9B,KAAK,CAACzB,iBAAA;EAChC,IAAI,CAACyB,KAAA,IAAS,CAACA,KAAK,CAAC,EAAE,EAAE;IACvB,OAAO;EACT;EACA,OAAOA,KAAK,CAAC,EAAE,CAACgC,KAAK,CAAC,KAAKrC,GAAG,CAAEsC,IAAA,IAASN,gBAAA,CAAiBM,IAAA,EAAMvD,eAAA;AAClE","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- export type { SerializedTableCellNode, SerializedTableNode, SerializedTableRowNode, } from './schema.js';
2
- export declare const EXPERIMENTAL_TableFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, undefined>;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/server/index.ts"],"names":[],"mappings":"AAUA,YAAY,EACV,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AAiBpB,eAAO,MAAM,yBAAyB,+FAwCpC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","sanitizeFields","createServerFeature","createNode","TableMarkdownTransformer","tableCellNodeJSONSchema","tableNodeJSONSchema","tableRowNodeJSONSchema","fields","name","type","defaultValue","required","EXPERIMENTAL_TableFeature","feature","config","isRoot","parentIsLocalized","validRelationships","collections","map","c","slug","sanitizedFields","requireFieldLevelRichTextEditor","ClientFeature","generateSchemaMap","schemaMap","Map","set","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../src/features/experimental_table/server/index.ts"],"sourcesContent":["import type { Config, Field, FieldSchemaMap } from 'payload'\n\nimport { TableCellNode, TableNode, TableRowNode } from '@lexical/table'\nimport { sanitizeFields } from 'payload'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { TableMarkdownTransformer } from '../markdownTransformer.js'\nimport { tableCellNodeJSONSchema, tableNodeJSONSchema, tableRowNodeJSONSchema } from './schema.js'\n\nexport type {\n SerializedTableCellNode,\n SerializedTableNode,\n SerializedTableRowNode,\n} from './schema.js'\n\nconst fields: Field[] = [\n {\n name: 'rows',\n type: 'number',\n defaultValue: 5,\n required: true,\n },\n {\n name: 'columns',\n type: 'number',\n defaultValue: 5,\n required: true,\n },\n]\n\nexport const EXPERIMENTAL_TableFeature = createServerFeature({\n feature: async ({ config, isRoot, parentIsLocalized }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n const sanitizedFields = await sanitizeFields({\n config: config as unknown as Config,\n fields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#TableFeatureClient',\n generateSchemaMap: () => {\n const schemaMap: FieldSchemaMap = new Map()\n\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n markdownTransformers: [TableMarkdownTransformer],\n nodes: [\n createNode({\n jsonSchema: tableNodeJSONSchema,\n node: TableNode,\n }),\n createNode({\n jsonSchema: tableCellNodeJSONSchema,\n node: TableCellNode,\n }),\n createNode({\n jsonSchema: tableRowNodeJSONSchema,\n node: TableRowNode,\n }),\n ],\n }\n },\n key: 'experimental_table',\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W;QACT6B,UAAA,EAAYzB,sBAAA;QACZ0B,IAAA,EAAMjC;MACR;IAEJ;EACF;EACAkC,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/experimental_table/server/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,uBAAuB,CACtC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,eAAe,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,WAAW,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB,CAClC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,OAAO,CAAA;CACd;AAED,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,UAAU,CAAA;CACjB;AA2BD,eAAO,MAAM,mBAAmB,EAAE,YAgBjC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,YAuBrC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAWpC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","names":["TABLE_NODES_TS","tableNodeJSONSchema","elementNodeSchema","nodeUnionName","typeStringDefinitions","add","nodeType","properties","colWidths","type","items","frozenColumnCount","frozenRowCount","rowStriping","tsType","tableCellNodeJSONSchema","backgroundColor","oneOf","colSpan","description","headerState","rowSpan","verticalAlign","width","required","tableRowNodeJSONSchema","height"],"sources":["../../../../src/features/experimental_table/server/schema.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\n\nexport interface SerializedTableCellNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n backgroundColor?: null | string\n colSpan?: number\n headerState: number\n rowSpan?: number\n type: 'tablecell'\n verticalAlign?: string\n width?: number\n}\n\nexport interface SerializedTableNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n colWidths?: number[]\n frozenColumnCount?: number\n frozenRowCount?: number\n rowStriping?: boolean\n type: 'table'\n}\n\nexport interface SerializedTableRowNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n height?: number\n type: 'tablerow'\n}\n\n/**\n * MUST stay byte-for-byte in sync with the runtime `SerializedTableNode`,\n * `SerializedTableRowNode`, and `SerializedTableCellNode` declared above.\n */\nconst TABLE_NODES_TS = `export interface SerializedTableNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'table';\n colWidths?: number[];\n frozenColumnCount?: number;\n frozenRowCount?: number;\n rowStriping?: boolean;\n}\nexport interface SerializedTableRowNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'tablerow';\n height?: number;\n}\nexport interface SerializedTableCellNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'tablecell';\n backgroundColor?: string | null;\n colSpan?: number;\n headerState: number;\n rowSpan?: number;\n verticalAlign?: string;\n width?: number;\n}`\n\nexport const tableNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(TABLE_NODES_TS)\n return elementNodeSchema({\n nodeType: 'table',\n properties: {\n colWidths: { type: 'array', items: { type: 'number' } },\n frozenColumnCount: { type: 'integer' },\n frozenRowCount: { type: 'integer' },\n rowStriping: { type: 'boolean' },\n },\n tsType: `SerializedTableNode<${nodeUnionName}>`,\n })\n}\n\nexport const tableCellNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(TABLE_NODES_TS)\n return elementNodeSchema({\n nodeType: 'tablecell',\n properties: {\n backgroundColor: { oneOf: [{ type: 'string' }, { type: 'null' }] },\n colSpan: { type: 'integer', description: 'How many columns this cell spans (default 1).' },\n headerState: {\n type: 'integer',\n description:\n 'Header bitmask: 0 = normal cell, 1 = row header, 2 = column header, 3 = both.',\n },\n rowSpan: { type: 'integer', description: 'How many rows this cell spans (default 1).' },\n verticalAlign: { type: 'string' },\n width: { type: 'integer' },\n },\n required: ['headerState'],\n tsType: `SerializedTableCellNode<${nodeUnionName}>`,\n })\n}\n\nexport const tableRowNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(TABLE_NODES_TS)\n return elementNodeSchema({\n nodeType: 'tablerow',\n properties: { height: { type: 'integer' } },\n tsType: `SerializedTableRowNode<${nodeUnionName}>`,\n })\n}\n"],"mappings":"AAkCA;;;GAIA,MAAMA,cAAA,GAAiB;;;;;;;;;;;;;;;;;;;EAmBrB;A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AA,CAAsBC,GAAG,CAACL,cAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MAAEmB,MAAA,EAAQ;QAAEjB,IAAA,EAAM;MAAU;IAAE;IAC1CK,MAAA,EAAQ,0BAA0BX,aAAA;EACpC;AACF","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const BOLD_ITALIC_STAR: TextFormatTransformer;
3
- export declare const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer;
4
- export declare const BOLD_STAR: TextFormatTransformer;
5
- export declare const BOLD_UNDERSCORE: TextFormatTransformer;
6
- //# sourceMappingURL=markdownTransformers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/markdownTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAA;AAExG,eAAO,MAAM,gBAAgB,EAAE,qBAI9B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,qBAKpC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,qBAIvB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,qBAK7B,CAAA"}
@@ -1,23 +0,0 @@
1
- export const BOLD_ITALIC_STAR = {
2
- type: 'text-format',
3
- format: ['bold', 'italic'],
4
- tag: '***'
5
- };
6
- export const BOLD_ITALIC_UNDERSCORE = {
7
- type: 'text-format',
8
- format: ['bold', 'italic'],
9
- intraword: false,
10
- tag: '___'
11
- };
12
- export const BOLD_STAR = {
13
- type: 'text-format',
14
- format: ['bold'],
15
- tag: '**'
16
- };
17
- export const BOLD_UNDERSCORE = {
18
- type: 'text-format',
19
- format: ['bold'],
20
- intraword: false,
21
- tag: '__'
22
- };
23
- //# sourceMappingURL=markdownTransformers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.js","names":["BOLD_ITALIC_STAR","type","format","tag","BOLD_ITALIC_UNDERSCORE","intraword","BOLD_STAR","BOLD_UNDERSCORE"],"sources":["../../../../src/features/format/bold/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nexport const BOLD_ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n tag: '***',\n}\n\nexport const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n intraword: false,\n tag: '___',\n}\n\nexport const BOLD_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n tag: '**',\n}\n\nexport const BOLD_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n intraword: false,\n tag: '__',\n}\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAA,GAA0C;EACrDC,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,QAAQ,SAAS;EAC1BC,GAAA,EAAK;AACP;AAEA,OAAO,MAAMC,sBAAA,GAAgD;EAC3DH,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,QAAQ,SAAS;EAC1BG,SAAA,EAAW;EACXF,GAAA,EAAK;AACP;AAEA,OAAO,MAAMG,SAAA,GAAmC;EAC9CL,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,OAAO;EAChBC,GAAA,EAAK;AACP;AAEA,OAAO,MAAMI,eAAA,GAAyC;EACpDN,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,OAAO;EAChBG,SAAA,EAAW;EACXF,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const INLINE_CODE: TextFormatTransformer;
3
- //# sourceMappingURL=markdownTransformers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/markdownTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAA;AAExG,eAAO,MAAM,WAAW,EAAE,qBAIzB,CAAA"}
@@ -1,6 +0,0 @@
1
- export const INLINE_CODE = {
2
- type: 'text-format',
3
- format: ['code'],
4
- tag: '`'
5
- };
6
- //# sourceMappingURL=markdownTransformers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.js","names":["INLINE_CODE","type","format","tag"],"sources":["../../../../src/features/format/inlineCode/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nexport const INLINE_CODE: TextFormatTransformer = {\n type: 'text-format',\n format: ['code'],\n tag: '`',\n}\n"],"mappings":"AAEA,OAAO,MAAMA,WAAA,GAAqC;EAChDC,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,OAAO;EAChBC,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const ITALIC_STAR: TextFormatTransformer;
3
- export declare const ITALIC_UNDERSCORE: TextFormatTransformer;
4
- //# sourceMappingURL=markdownTransformers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/markdownTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAA;AAExG,eAAO,MAAM,WAAW,EAAE,qBAIzB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,qBAK/B,CAAA"}
@@ -1,12 +0,0 @@
1
- export const ITALIC_STAR = {
2
- type: 'text-format',
3
- format: ['italic'],
4
- tag: '*'
5
- };
6
- export const ITALIC_UNDERSCORE = {
7
- type: 'text-format',
8
- format: ['italic'],
9
- intraword: false,
10
- tag: '_'
11
- };
12
- //# sourceMappingURL=markdownTransformers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.js","names":["ITALIC_STAR","type","format","tag","ITALIC_UNDERSCORE","intraword"],"sources":["../../../../src/features/format/italic/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nexport const ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n tag: '*',\n}\n\nexport const ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['italic'],\n intraword: false,\n tag: '_',\n}\n"],"mappings":"AAEA,OAAO,MAAMA,WAAA,GAAqC;EAChDC,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,SAAS;EAClBC,GAAA,EAAK;AACP;AAEA,OAAO,MAAMC,iBAAA,GAA2C;EACtDH,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,SAAS;EAClBG,SAAA,EAAW;EACXF,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const STRIKETHROUGH: TextFormatTransformer;
3
- //# sourceMappingURL=markdownTransformers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../src/features/format/strikethrough/markdownTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAA;AAExG,eAAO,MAAM,aAAa,EAAE,qBAI3B,CAAA"}
@@ -1,6 +0,0 @@
1
- export const STRIKETHROUGH = {
2
- type: 'text-format',
3
- format: ['strikethrough'],
4
- tag: '~~'
5
- };
6
- //# sourceMappingURL=markdownTransformers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.js","names":["STRIKETHROUGH","type","format","tag"],"sources":["../../../../src/features/format/strikethrough/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nexport const STRIKETHROUGH: TextFormatTransformer = {\n type: 'text-format',\n format: ['strikethrough'],\n tag: '~~',\n}\n"],"mappings":"AAEA,OAAO,MAAMA,aAAA,GAAuC;EAClDC,IAAA,EAAM;EACNC,MAAA,EAAQ,CAAC,gBAAgB;EACzBC,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const CHECK_LIST: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/checklist/markdownTransformers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAIrG,eAAO,MAAM,UAAU,EAAE,kBAQxB,CAAA"}
@@ -1,12 +0,0 @@
1
- import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
2
- import { listExport, listReplace } from '../shared/markdown.js';
3
- export const CHECK_LIST = {
4
- type: 'element',
5
- dependencies: [ListNode, ListItemNode],
6
- export: (node, exportChildren) => {
7
- return $isListNode(node) ? listExport(node, exportChildren, 0) : null;
8
- },
9
- regExp: /^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,
10
- replace: listReplace('check')
11
- };
12
- //# sourceMappingURL=markdownTransformers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformers.js","names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","CHECK_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"sources":["../../../../src/features/lists/checklist/markdownTransformers.ts"],"sourcesContent":["import { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,\n replace: listReplace('check'),\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAIpD,SAASC,UAAU,EAAEC,WAAW,QAAQ;AAExC,OAAO,MAAMC,UAAA,GAAiC;EAC5CC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACL,QAAA,EAAUD,YAAA,CAAa;EACtCO,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,OAAOV,WAAA,CAAYS,IAAA,IAAQN,UAAA,CAAWM,IAAA,EAAMC,cAAA,EAAgB,KAAK;EACnE;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASR,WAAA,CAAY;AACvB","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const ORDERED_LIST: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/orderedList/markdownTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAIrG,eAAO,MAAM,YAAY,EAAE,kBAQ1B,CAAA"}
@@ -1,12 +0,0 @@
1
- import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
2
- import { listExport, listReplace } from '../shared/markdown.js';
3
- export const ORDERED_LIST = {
4
- type: 'element',
5
- dependencies: [ListNode, ListItemNode],
6
- export: (node, exportChildren) => {
7
- return $isListNode(node) ? listExport(node, exportChildren, 0) : null;
8
- },
9
- regExp: /^(\s*)(\d+)\.\s/,
10
- replace: listReplace('number')
11
- };
12
- //# sourceMappingURL=markdownTransformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","ORDERED_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"sources":["../../../../src/features/lists/orderedList/markdownTransformer.ts"],"sourcesContent":["import { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(\\d+)\\.\\s/,\n replace: listReplace('number'),\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAIpD,SAASC,UAAU,EAAEC,WAAW,QAAQ;AAExC,OAAO,MAAMC,YAAA,GAAmC;EAC9CC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACL,QAAA,EAAUD,YAAA,CAAa;EACtCO,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,OAAOV,WAAA,CAAYS,IAAA,IAAQN,UAAA,CAAWM,IAAA,EAAMC,cAAA,EAAgB,KAAK;EACnE;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASR,WAAA,CAAY;AACvB","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- import type { ListNode, ListType } from '@lexical/list';
2
- import type { ElementNode } from 'lexical';
3
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
4
- export declare const listReplace: (listType: ListType) => ElementTransformer["replace"];
5
- export declare const listExport: (listNode: ListNode, exportChildren: (node: ElementNode) => string, depth: number) => string;
6
- //# sourceMappingURL=markdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAKrG,eAAO,MAAM,WAAW,GAAI,UAAU,QAAQ,KAAG,kBAAkB,CAAC,SAAS,CA6B5E,CAAA;AAED,eAAO,MAAM,UAAU,GACrB,UAAU,QAAQ,EAClB,gBAAgB,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAC7C,OAAO,MAAM,KACZ,MA2BF,CAAA"}
@@ -1,57 +0,0 @@
1
- // Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1
2
- import { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list';
3
- // Amount of spaces that define indentation level
4
- const LIST_INDENT_SIZE = 4;
5
- export const listReplace = listType => {
6
- return (parentNode, children, match) => {
7
- const previousNode = parentNode.getPreviousSibling();
8
- const nextNode = parentNode.getNextSibling();
9
- const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined);
10
- if ($isListNode(nextNode) && nextNode.getListType() === listType) {
11
- const firstChild = nextNode.getFirstChild();
12
- if (firstChild !== null) {
13
- firstChild.insertBefore(listItem);
14
- } else {
15
- // should never happen, but let's handle gracefully, just in case.
16
- nextNode.append(listItem);
17
- }
18
- parentNode.remove();
19
- } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {
20
- previousNode.append(listItem);
21
- parentNode.remove();
22
- } else {
23
- const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined);
24
- list.append(listItem);
25
- parentNode.replace(list);
26
- }
27
- listItem.append(...children);
28
- listItem.select(0, 0);
29
- const indent = Math.floor(match[1].length / LIST_INDENT_SIZE);
30
- if (indent) {
31
- listItem.setIndent(indent);
32
- }
33
- };
34
- };
35
- export const listExport = (listNode, exportChildren, depth) => {
36
- const output = [];
37
- const children = listNode.getChildren();
38
- let index = 0;
39
- for (const listItemNode of children) {
40
- if ($isListItemNode(listItemNode)) {
41
- if (listItemNode.getChildrenSize() === 1) {
42
- const firstChild = listItemNode.getFirstChild();
43
- if ($isListNode(firstChild)) {
44
- output.push(listExport(firstChild, exportChildren, depth + 1));
45
- continue;
46
- }
47
- }
48
- const indent = ' '.repeat(depth * LIST_INDENT_SIZE);
49
- const listType = listNode.getListType();
50
- const prefix = listType === 'number' ? `${listNode.getStart() + index}. ` : listType === 'check' ? `- [${listItemNode.getChecked() ? 'x' : ' '}] ` : '- ';
51
- output.push(indent + prefix + exportChildren(listItemNode));
52
- index++;
53
- }
54
- }
55
- return output.join('\n');
56
- };
57
- //# sourceMappingURL=markdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdown.js","names":["$createListItemNode","$createListNode","$isListItemNode","$isListNode","LIST_INDENT_SIZE","listReplace","listType","parentNode","children","match","previousNode","getPreviousSibling","nextNode","getNextSibling","listItem","undefined","getListType","firstChild","getFirstChild","insertBefore","append","remove","list","Number","replace","select","indent","Math","floor","length","setIndent","listExport","listNode","exportChildren","depth","output","getChildren","index","listItemNode","getChildrenSize","push","repeat","prefix","getStart","getChecked","join"],"sources":["../../../../src/features/lists/shared/markdown.ts"],"sourcesContent":["// Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1\n\nimport type { ListNode, ListType } from '@lexical/list'\nimport type { ElementNode } from 'lexical'\n\nimport { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\n// Amount of spaces that define indentation level\nconst LIST_INDENT_SIZE = 4\n\nexport const listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = Math.floor(match[1]!.length / LIST_INDENT_SIZE)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nexport const listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output: string[] = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n"],"mappings":"AAAA;AAKA,SAASA,mBAAmB,EAAEC,eAAe,EAAEC,eAAe,EAAEC,WAAW,QAAQ;AAInF;AACA,MAAMC,gBAAA,GAAmB;AAEzB,OAAO,MAAMC,WAAA,GAAeC,QAAA;EAC1B,OA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GAAmB,EAAE;EAC3B,MAAM3B,QAAA,GAAWwB,QAAA,CAASI,WAAW;EACrC,IAAIC,KAAA,GAAQ;EACZ,KAAK,MAAMC,YAAA,IAAgB9B,QAAA,EAAU;IACnC,IAAIN,eAAA,CAAgBoC,YAAA,GAAe;MACjC,IAAIA,YAAA,CAAaC,eAAe,OAAO,GAAG;QACxC,MAAMtB,UAAA,GAAaqB,YAAA,CAAapB,aAAa;QAC7C,IAAIf,WAAA,CAAYc,UAAA,GAAa;UAC3BkB,MAAA,CAAOK,IAAI,CAACT,UAAA,CAAWd,UAAA,EAAYgB,cAAA,EAAgBC,KAAA,GAAQ;UAC3D;QACF;MACF;MACA,MAAMR,MAAA,GAAS,IAAIe,MAAM,CAACP,KAAA,GAAQ9B,gBAAA;MAClC,MAAME,QAAA,GAAW0B,QAAA,CAAShB,WAAW;MACrC,MAAM0B,MAAA,GACJpC,QAAA,KAAa,WACT,GAAG0B,QAAA,CAASW,QAAQ,KAAKN,KAAA,IAAS,GAClC/B,QAAA,KAAa,UACX,MAAMgC,YAAA,CAAaM,UAAU,KAAK,MAAM,OAAO,GAC/C;MACRT,MAAA,CAAOK,IAAI,CAACd,MAAA,GAASgB,MAAA,GAAST,cAAA,CAAeK,YAAA;MAC7CD,KAAA;IACF;EACF;EAEA,OAAOF,MAAA,CAAOU,IAAI,CAAC;AACrB","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js';
2
- export declare const UNORDERED_LIST: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/unorderedList/markdownTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAA;AAIrG,eAAO,MAAM,cAAc,EAAE,kBAQ5B,CAAA"}
@@ -1,12 +0,0 @@
1
- import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
2
- import { listExport, listReplace } from '../shared/markdown.js';
3
- export const UNORDERED_LIST = {
4
- type: 'element',
5
- dependencies: [ListNode, ListItemNode],
6
- export: (node, exportChildren) => {
7
- return $isListNode(node) ? listExport(node, exportChildren, 0) : null;
8
- },
9
- regExp: /^(\s*)[-*+]\s/,
10
- replace: listReplace('bullet')
11
- };
12
- //# sourceMappingURL=markdownTransformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","UNORDERED_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"sources":["../../../../src/features/lists/unorderedList/markdownTransformer.ts"],"sourcesContent":["import { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ElementTransformer } from '../../../packages/@lexical/markdown/MarkdownTransformers.js'\n\nimport { listExport, listReplace } from '../shared/markdown.js'\n\nexport const UNORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)[-*+]\\s/,\n replace: listReplace('bullet'),\n}\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAIpD,SAASC,UAAU,EAAEC,WAAW,QAAQ;AAExC,OAAO,MAAMC,cAAA,GAAqC;EAChDC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACL,QAAA,EAAUD,YAAA,CAAa;EACtCO,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,OAAOV,WAAA,CAAYS,IAAA,IAAQN,UAAA,CAAWM,IAAA,EAAMC,cAAA,EAAgB,KAAK;EACnE;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASR,WAAA,CAAY;AACvB","ignoreList":[]}
@@ -1,29 +0,0 @@
1
- import type { ImportMap, RichTextFieldClientProps } from 'payload';
2
- import React from 'react';
3
- import type { FeatureClientSchemaMap } from '../types/index.js';
4
- type SerializedFeatureMetadata = {
5
- ClientFeature?: {
6
- clientProps?: Record<string, any>;
7
- path: string;
8
- } | string;
9
- clientFeatureProps?: Record<string, any>;
10
- componentImports?: Record<string, {
11
- clientProps?: Record<string, any>;
12
- path: string;
13
- } | string>;
14
- key: string;
15
- order: number;
16
- };
17
- export type ClientEntryLexicalFieldProps = {
18
- featureClientSchemaMap?: FeatureClientSchemaMap;
19
- features?: Record<string, SerializedFeatureMetadata>;
20
- importMap: ImportMap;
21
- } & RichTextFieldClientProps;
22
- /**
23
- * Client-only entry point for the Lexical rich text field.
24
- * Resolves feature providers and component imports from the import map on the client,
25
- * bypassing the RSC entry point that requires server-only data.
26
- */
27
- export declare const ClientEntryLexicalField: React.FC<ClientEntryLexicalFieldProps>;
28
- export {};
29
- //# sourceMappingURL=clientEntry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientEntry.d.ts","sourceRoot":"","sources":["../../src/field/clientEntry.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAuB,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAGvF,OAAO,KAAkB,MAAM,OAAO,CAAA;AAMtC,OAAO,KAAK,EAAE,sBAAsB,EAA6B,MAAM,mBAAmB,CAAA;AAI1F,KAAK,yBAAyB,GAAG;IAC/B,aAAa,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAA;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,CAAA;IAC/F,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAA;IACpD,SAAS,EAAE,SAAS,CAAA;CACrB,GAAG,wBAAwB,CAAA;AAE5B;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAqF1E,CAAA"}
@@ -1,86 +0,0 @@
1
- 'use client';
2
-
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { getFromImportMap } from 'payload/shared';
5
- import React, { useMemo } from 'react';
6
- import { RichTextField } from './index.js';
7
- /**
8
- * Client-only entry point for the Lexical rich text field.
9
- * Resolves feature providers and component imports from the import map on the client,
10
- * bypassing the RSC entry point that requires server-only data.
11
- */
12
- export const ClientEntryLexicalField = props => {
13
- const {
14
- featureClientSchemaMap = {},
15
- features = {},
16
- field,
17
- forceRender,
18
- importMap,
19
- path,
20
- permissions,
21
- readOnly,
22
- schemaPath
23
- } = props;
24
- const {
25
- clientFeatures,
26
- featureClientImportMap
27
- } = useMemo(() => {
28
- const resolvedClientFeatures = {};
29
- const resolvedFeatureImportMap = {};
30
- const sortedFeatures = Object.entries(features).sort(([, a], [, b]) => a.order - b.order);
31
- for (const [featureKey, featureMeta] of sortedFeatures) {
32
- resolvedClientFeatures[featureKey] = {};
33
- if (featureMeta.ClientFeature) {
34
- const clientFeatureProvider = getFromImportMap({
35
- importMap,
36
- PayloadComponent: featureMeta.ClientFeature,
37
- schemaPath: 'lexical-clientComponent',
38
- silent: true
39
- });
40
- if (clientFeatureProvider) {
41
- const clientFeatureProps = {
42
- ...(featureMeta.clientFeatureProps ?? {}),
43
- featureKey: featureMeta.key,
44
- order: featureMeta.order
45
- };
46
- if (typeof featureMeta.ClientFeature === 'object' && featureMeta.ClientFeature.clientProps) {
47
- clientFeatureProps.clientProps = featureMeta.ClientFeature.clientProps;
48
- }
49
- resolvedClientFeatures[featureKey] = {
50
- clientFeatureProps,
51
- clientFeatureProvider
52
- };
53
- }
54
- }
55
- if (featureMeta.componentImports && typeof featureMeta.componentImports === 'object') {
56
- for (const [importKey, payloadComponent] of Object.entries(featureMeta.componentImports)) {
57
- const resolvedComponent = getFromImportMap({
58
- importMap,
59
- PayloadComponent: payloadComponent,
60
- schemaPath: 'lexical-clientComponent',
61
- silent: true
62
- });
63
- if (resolvedComponent) {
64
- resolvedFeatureImportMap[`${featureKey}.${importKey}`] = resolvedComponent;
65
- }
66
- }
67
- }
68
- }
69
- return {
70
- clientFeatures: resolvedClientFeatures,
71
- featureClientImportMap: resolvedFeatureImportMap
72
- };
73
- }, [features, importMap]);
74
- return /*#__PURE__*/_jsx(RichTextField, {
75
- clientFeatures: clientFeatures,
76
- featureClientImportMap: featureClientImportMap,
77
- featureClientSchemaMap: featureClientSchemaMap,
78
- field: field,
79
- forceRender: forceRender,
80
- path: path,
81
- permissions: permissions,
82
- readOnly: readOnly,
83
- schemaPath: schemaPath
84
- });
85
- };
86
- //# sourceMappingURL=clientEntry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientEntry.js","names":["getFromImportMap","React","useMemo","RichTextField","ClientEntryLexicalField","props","featureClientSchemaMap","features","field","forceRender","importMap","path","permissions","readOnly","schemaPath","clientFeatures","featureClientImportMap","resolvedClientFeatures","resolvedFeatureImportMap","sortedFeatures","Object","entries","sort","a","b","order","featureKey","featureMeta","ClientFeature","clientFeatureProvider","PayloadComponent","silent","clientFeatureProps","key","clientProps","componentImports","importKey","payloadComponent","resolvedComponent","_jsx"],"sources":["../../src/field/clientEntry.tsx"],"sourcesContent":["'use client'\n\nimport type { ImportMap, RichTextFieldClient, RichTextFieldClientProps } from 'payload'\n\nimport { getFromImportMap } from 'payload/shared'\nimport React, { useMemo } from 'react'\n\nimport type {\n BaseClientFeatureProps,\n FeatureProviderProviderClient,\n} from '../features/typesClient.js'\nimport type { FeatureClientSchemaMap, LexicalRichTextFieldProps } from '../types/index.js'\n\nimport { RichTextField } from './index.js'\n\ntype SerializedFeatureMetadata = {\n ClientFeature?: { clientProps?: Record<string, any>; path: string } | string\n clientFeatureProps?: Record<string, any>\n componentImports?: Record<string, { clientProps?: Record<string, any>; path: string } | string>\n key: string\n order: number\n}\n\nexport type ClientEntryLexicalFieldProps = {\n featureClientSchemaMap?: FeatureClientSchemaMap\n features?: Record<string, SerializedFeatureMetadata>\n importMap: ImportMap\n} & RichTextFieldClientProps\n\n/**\n * Client-only entry point for the Lexical rich text field.\n * Resolves feature providers and component imports from the import map on the client,\n * bypassing the RSC entry point that requires server-only data.\n */\nexport const ClientEntryLexicalField: React.FC<ClientEntryLexicalFieldProps> = (props) => {\n const {\n featureClientSchemaMap = {},\n features = {},\n field,\n forceRender,\n importMap,\n path,\n permissions,\n readOnly,\n schemaPath,\n } = props\n\n const { clientFeatures, featureClientImportMap } = useMemo(() => {\n const resolvedClientFeatures: LexicalRichTextFieldProps['clientFeatures'] = {}\n const resolvedFeatureImportMap: Record<string, any> = {}\n\n const sortedFeatures = Object.entries(features).sort(([, a], [, b]) => a.order - b.order)\n\n for (const [featureKey, featureMeta] of sortedFeatures) {\n resolvedClientFeatures[featureKey] = {}\n\n if (featureMeta.ClientFeature) {\n const clientFeatureProvider = getFromImportMap<FeatureProviderProviderClient | undefined>({\n importMap,\n PayloadComponent: featureMeta.ClientFeature,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n\n if (clientFeatureProvider) {\n const clientFeatureProps: BaseClientFeatureProps<Record<string, any>> = {\n ...(featureMeta.clientFeatureProps ?? {}),\n featureKey: featureMeta.key,\n order: featureMeta.order,\n }\n\n if (\n typeof featureMeta.ClientFeature === 'object' &&\n featureMeta.ClientFeature.clientProps\n ) {\n clientFeatureProps.clientProps = (featureMeta.ClientFeature as any).clientProps\n }\n\n resolvedClientFeatures[featureKey] = {\n clientFeatureProps,\n clientFeatureProvider,\n }\n }\n }\n\n if (featureMeta.componentImports && typeof featureMeta.componentImports === 'object') {\n for (const [importKey, payloadComponent] of Object.entries(featureMeta.componentImports)) {\n const resolvedComponent = getFromImportMap({\n importMap,\n PayloadComponent: payloadComponent,\n schemaPath: 'lexical-clientComponent',\n silent: true,\n })\n if (resolvedComponent) {\n resolvedFeatureImportMap[`${featureKey}.${importKey}`] = resolvedComponent\n }\n }\n }\n }\n\n return {\n clientFeatures: resolvedClientFeatures,\n featureClientImportMap: resolvedFeatureImportMap,\n }\n }, [features, importMap])\n\n return (\n <RichTextField\n clientFeatures={clientFeatures}\n featureClientImportMap={featureClientImportMap}\n featureClientSchemaMap={featureClientSchemaMap}\n field={field as RichTextFieldClient}\n forceRender={forceRender}\n path={path}\n permissions={permissions as LexicalRichTextFieldProps['permissions']}\n readOnly={readOnly}\n schemaPath={schemaPath}\n />\n )\n}\n"],"mappings":"AAAA;;;AAIA,SAASA,gBAAgB,QAAQ;AACjC,OAAOC,KAAA,IAASC,OAAO,QAAQ;AAQ/B,SAASC,aAAa,QAAQ;AAgB9B;;;;;AAKA,OAAO,MAAMC,uBAAA,GAAmEC,KAAA;EAC9E,MAAM;IACJC,sBAAA,GAAyB,CAAC,CAAC;IAC3BC,QAAA,GAAW,CAAC,CAAC;IACbC,KAAK;IACLC,WAAW;IACXC,SAAS;IACTC,IAAI;IACJC,WAAW;IACXC,QAAQ;IACRC;EAAU,CACX,GAAGT,KAAA;EAEJ,MAAM;IAAEU,cAAc;IAAEC;EAAsB,CAAE,GAAGd,OAAA,CAAQ;IACzD,MAAMe,sBAAA,GAAsE,CAAC;IAC7E,MAAMC,wBAAA,GAAgD,CAAC;IAEvD,MAAMC,cAAA,GAAiBC,MAAA,CAAOC,OAAO,CAACd,QAAA,EAAUe,IAAI,CAAC,CAAC,GAAGC,CAAA,CAAE,EAAE,GAAGC,CAAA,CAAE,KAAKD,CAAA,CAAEE,KAAK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cAAA,EAAgBE,sBAAA;MAChBD,sBAAA,EAAwBE;IAC1B;EACF,GAAG,CAACX,QAAA,EAAUG,SAAA,CAAU;EAExB,oBACE6B,IAAA,CAACpC,aAAA;IACCY,cAAA,EAAgBA,cAAA;IAChBC,sBAAA,EAAwBA,sBAAA;IACxBV,sBAAA,EAAwBA,sBAAA;IACxBE,KAAA,EAAOA,KAAA;IACPC,WAAA,EAAaA,WAAA;IACbE,IAAA,EAAMA,IAAA;IACNC,WAAA,EAAaA,WAAA;IACbC,QAAA,EAAUA,QAAA;IACVC,UAAA,EAAYA;;AAGlB","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated - remove in 4.0. lexical already exports an isHTMLElement utility
3
- */
4
- export declare function isHTMLElement(x: unknown): x is HTMLElement;
5
- //# sourceMappingURL=guard.d.ts.map