@payloadcms/richtext-lexical 4.0.0-internal.bc5cf8c → 4.0.0-internal.c3ac604

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 (451) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-IZKDIUJY.js +2 -0
  3. package/dist/exports/client/Field-IZKDIUJY.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-SSMQFWCQ.js +2 -0
  8. package/dist/exports/client/chunk-SSMQFWCQ.js.map +7 -0
  9. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  10. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  11. package/dist/exports/client/index.d.ts +0 -2
  12. package/dist/exports/client/index.d.ts.map +1 -1
  13. package/dist/exports/client/index.js +23 -24
  14. package/dist/exports/client/index.js.map +4 -4
  15. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  16. package/dist/features/blockquote/client/index.js +2 -2
  17. package/dist/features/blockquote/client/index.js.map +1 -1
  18. package/dist/features/blockquote/server/index.js +2 -2
  19. package/dist/features/blockquote/server/index.js.map +1 -1
  20. package/dist/features/blocks/client/component/index.css +2 -2
  21. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  22. package/dist/features/blocks/client/componentInline/index.css +8 -8
  23. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  24. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  25. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  26. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  27. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  28. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  29. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  30. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  31. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  32. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  33. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  34. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  35. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  36. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  37. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  38. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  39. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  40. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  41. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  42. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  43. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  44. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  45. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  46. package/dist/features/blocks/server/schema.js +3 -2
  47. package/dist/features/blocks/server/schema.js.map +1 -1
  48. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  49. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  50. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  51. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  52. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  53. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  54. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  55. package/dist/features/converters/markdownToLexical/index.js +5 -2
  56. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  57. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  58. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  59. package/dist/features/experimental_table/client/index.js +2 -2
  60. package/dist/features/experimental_table/client/index.js.map +1 -1
  61. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
  62. package/dist/features/experimental_table/markdownTransformer.d.ts +2 -2
  63. package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -1
  64. package/dist/features/experimental_table/markdownTransformer.js +6 -3
  65. package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
  66. package/dist/features/experimental_table/server/index.js +2 -2
  67. package/dist/features/experimental_table/server/index.js.map +1 -1
  68. package/dist/features/format/bold/feature.client.js +1 -1
  69. package/dist/features/format/bold/feature.client.js.map +1 -1
  70. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  71. package/dist/features/format/bold/feature.server.js +1 -1
  72. package/dist/features/format/bold/feature.server.js.map +1 -1
  73. package/dist/features/format/inlineCode/feature.client.js +1 -1
  74. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  75. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  76. package/dist/features/format/inlineCode/feature.server.js +1 -1
  77. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  78. package/dist/features/format/italic/feature.client.js +1 -1
  79. package/dist/features/format/italic/feature.client.js.map +1 -1
  80. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  81. package/dist/features/format/italic/feature.server.js +1 -1
  82. package/dist/features/format/italic/feature.server.js.map +1 -1
  83. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  84. package/dist/features/format/strikethrough/feature.client.js +1 -1
  85. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  86. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  87. package/dist/features/format/strikethrough/feature.server.js +1 -1
  88. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  89. package/dist/features/heading/client/index.js +2 -2
  90. package/dist/features/heading/client/index.js.map +1 -1
  91. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  92. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  93. package/dist/features/heading/markdownTransformer.js +6 -19
  94. package/dist/features/heading/markdownTransformer.js.map +1 -1
  95. package/dist/features/heading/server/index.js +2 -2
  96. package/dist/features/heading/server/index.js.map +1 -1
  97. package/dist/features/heading/server/schema.d.ts.map +1 -1
  98. package/dist/features/horizontalRule/client/index.js +2 -2
  99. package/dist/features/horizontalRule/client/index.js.map +1 -1
  100. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  101. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  102. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  103. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  104. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  105. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  106. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  107. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  108. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  109. package/dist/features/horizontalRule/server/index.js +2 -2
  110. package/dist/features/horizontalRule/server/index.js.map +1 -1
  111. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  112. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  113. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  114. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  115. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  116. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  117. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  118. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  119. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  120. package/dist/features/link/client/index.js +2 -2
  121. package/dist/features/link/client/index.js.map +1 -1
  122. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  123. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  124. package/dist/features/link/markdownTransformer.d.ts +4 -4
  125. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  126. package/dist/features/link/markdownTransformer.js +2 -2
  127. package/dist/features/link/markdownTransformer.js.map +1 -1
  128. package/dist/features/link/markdownTransformer.spec.js +10 -10
  129. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  130. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  131. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  132. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  133. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  134. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  135. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  136. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  137. package/dist/features/link/server/baseFields.js.map +1 -1
  138. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  139. package/dist/features/link/server/index.js +2 -2
  140. package/dist/features/link/server/index.js.map +1 -1
  141. package/dist/features/link/server/schema.d.ts.map +1 -1
  142. package/dist/features/link/server/schema.js +4 -2
  143. package/dist/features/link/server/schema.js.map +1 -1
  144. package/dist/features/link/server/validate.d.ts.map +1 -1
  145. package/dist/features/lists/checklist/client/index.js +1 -1
  146. package/dist/features/lists/checklist/client/index.js.map +1 -1
  147. package/dist/features/lists/checklist/server/index.js +1 -1
  148. package/dist/features/lists/checklist/server/index.js.map +1 -1
  149. package/dist/features/lists/orderedList/client/index.js +1 -1
  150. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  151. package/dist/features/lists/orderedList/server/index.js +1 -1
  152. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  153. package/dist/features/lists/unorderedList/client/index.js +1 -1
  154. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  155. package/dist/features/lists/unorderedList/server/index.js +1 -1
  156. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  157. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  158. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  159. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  160. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  161. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  162. package/dist/features/relationship/server/schema.d.ts +3 -3
  163. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  164. package/dist/features/relationship/server/schema.js +22 -5
  165. package/dist/features/relationship/server/schema.js.map +1 -1
  166. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  167. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  168. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  169. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  170. package/dist/features/textState/feature.client.js +1 -1
  171. package/dist/features/textState/feature.client.js.map +1 -1
  172. package/dist/features/toolbars/fixed/client/Toolbar/index.css +4 -6
  173. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  174. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  175. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  176. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  177. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  178. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  179. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  180. package/dist/features/typesClient.d.ts +1 -1
  181. package/dist/features/typesClient.d.ts.map +1 -1
  182. package/dist/features/typesClient.js.map +1 -1
  183. package/dist/features/typesServer.d.ts +2 -2
  184. package/dist/features/typesServer.d.ts.map +1 -1
  185. package/dist/features/typesServer.js.map +1 -1
  186. package/dist/features/upload/client/component/index.css +9 -9
  187. package/dist/features/upload/client/component/index.js +2 -1
  188. package/dist/features/upload/client/component/index.js.map +1 -1
  189. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  190. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  191. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  192. package/dist/features/upload/server/index.js +2 -2
  193. package/dist/features/upload/server/index.js.map +1 -1
  194. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  195. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  196. package/dist/features/upload/server/markdownTransformer.js +1 -1
  197. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  198. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  199. package/dist/features/upload/server/schema.d.ts +4 -4
  200. package/dist/features/upload/server/schema.d.ts.map +1 -1
  201. package/dist/features/upload/server/schema.js +26 -6
  202. package/dist/features/upload/server/schema.js.map +1 -1
  203. package/dist/features/upload/server/validate.d.ts.map +1 -1
  204. package/dist/field/Diff/converters/unknown/index.css +1 -1
  205. package/dist/field/Field.d.ts.map +1 -1
  206. package/dist/field/Field.js +18 -15
  207. package/dist/field/Field.js.map +1 -1
  208. package/dist/field/ViewSelector.css +1 -1
  209. package/dist/field/bundled.css +1 -1
  210. package/dist/field/index.css +11 -11
  211. package/dist/index.d.ts +2 -2
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +7 -50
  214. package/dist/index.js.map +1 -1
  215. package/dist/lexical/LexicalEditor.css +18 -18
  216. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  217. package/dist/lexical/LexicalEditor.js +2 -36
  218. package/dist/lexical/LexicalEditor.js.map +1 -1
  219. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  220. package/dist/lexical/LexicalProvider.js +7 -22
  221. package/dist/lexical/LexicalProvider.js.map +1 -1
  222. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  223. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  224. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  225. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  226. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +0 -1
  227. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  228. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  229. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  230. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  231. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  232. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  233. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  234. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  235. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  236. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  237. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  238. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  239. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  240. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  241. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  242. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  243. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  244. package/dist/lexical/theme/EditorTheme.css +18 -19
  245. package/dist/lexical/ui/ContentEditable.css +22 -17
  246. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  247. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  248. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  249. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  250. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  251. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  252. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  253. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  254. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  255. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  256. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  257. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  258. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  259. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  260. package/dist/lexical/utils/point.d.ts.map +1 -1
  261. package/dist/lexical/utils/rect.d.ts.map +1 -1
  262. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  263. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  264. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  265. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  266. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  267. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  268. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  269. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  270. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  271. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  272. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  273. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  274. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  275. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  276. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  277. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  278. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  279. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  280. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  281. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  282. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  283. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  284. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  285. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  286. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  287. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  288. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  289. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  290. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  291. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  292. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  293. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  294. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  295. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  296. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  297. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  298. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  299. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  300. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  301. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  302. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  303. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  304. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  305. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  306. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  307. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  308. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  309. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  310. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  311. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  312. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  313. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  314. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  315. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  316. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  317. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  318. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  319. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  320. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  321. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  322. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  323. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  324. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  325. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  326. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  327. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  328. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  329. package/dist/types/schema.d.ts.map +1 -1
  330. package/dist/types/schema.js +12 -5
  331. package/dist/types/schema.js.map +1 -1
  332. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  333. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  334. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  335. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  336. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  337. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  338. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  339. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  340. package/dist/utilities/generateImportMap.d.ts +1 -1
  341. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  342. package/dist/utilities/generateImportMap.js +3 -7
  343. package/dist/utilities/generateImportMap.js.map +1 -1
  344. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  345. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  346. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  347. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  348. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  349. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  350. package/dist/validate/index.d.ts.map +1 -1
  351. package/package.json +94 -26
  352. package/dist/@types/assets.d.js +0 -2
  353. package/dist/@types/assets.d.js.map +0 -1
  354. package/dist/exports/client/Field-JXXWHUE4.js +0 -2
  355. package/dist/exports/client/Field-JXXWHUE4.js.map +0 -7
  356. package/dist/exports/client/chunk-4EIYXZ6H.js +0 -12
  357. package/dist/exports/client/chunk-4EIYXZ6H.js.map +0 -7
  358. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  359. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  360. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  361. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  362. package/dist/exports/server/rsc.browser.d.ts +0 -11
  363. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  364. package/dist/exports/server/rsc.browser.js +0 -10
  365. package/dist/exports/server/rsc.browser.js.map +0 -1
  366. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  367. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  368. package/dist/features/blockquote/markdownTransformer.js +0 -33
  369. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  370. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  371. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  372. package/dist/features/format/bold/markdownTransformers.js +0 -23
  373. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  374. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  375. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  376. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  377. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  378. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  379. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  380. package/dist/features/format/italic/markdownTransformers.js +0 -12
  381. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  382. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  383. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  384. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  385. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  386. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  387. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  388. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  389. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  390. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  391. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  392. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  393. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  394. package/dist/features/lists/shared/markdown.d.ts +0 -6
  395. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  396. package/dist/features/lists/shared/markdown.js +0 -57
  397. package/dist/features/lists/shared/markdown.js.map +0 -1
  398. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  399. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  400. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  401. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  402. package/dist/field/clientEntry.d.ts +0 -29
  403. package/dist/field/clientEntry.d.ts.map +0 -1
  404. package/dist/field/clientEntry.js +0 -86
  405. package/dist/field/clientEntry.js.map +0 -1
  406. package/dist/lexical/utils/guard.d.ts +0 -5
  407. package/dist/lexical/utils/guard.d.ts.map +0 -1
  408. package/dist/lexical/utils/guard.js +0 -9
  409. package/dist/lexical/utils/guard.js.map +0 -1
  410. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  411. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  412. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  413. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  414. package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js +0 -160
  415. package/dist/packages/@lexical/markdown/LexicalMarkdownHardLineBreak.spec.js.map +0 -1
  416. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  417. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  418. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -220
  419. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  420. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  421. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  422. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -199
  423. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  424. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  425. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  426. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  427. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  428. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -173
  429. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  430. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -352
  431. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  432. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  433. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  434. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  435. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  436. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  437. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  438. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  439. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  440. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  441. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  442. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  443. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  444. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  445. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  446. package/dist/packages/@lexical/markdown/index.js +0 -39
  447. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  448. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  449. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  450. package/dist/packages/@lexical/markdown/utils.js +0 -267
  451. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
@@ -1,2 +0,0 @@
1
- "use client";import{a as E,b as U}from"./chunk-UD4DQ4AK.js";import{c as y}from"./chunk-5VIL27GI.js";import{a as L}from"./chunk-WSAPGI3Z.js";import{b as g}from"./chunk-RJ5MAOKZ.js";import{jsx as a,jsxs as f}from"react/jsx-runtime";import{useLexicalComposerContext as ae}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as oe}from"@lexical/react/useLexicalEditable";import{getTranslation as P}from"@payloadcms/translations";import{Button as h,formatDrawerSlug as le,Pill as se,Thumbnail as ie,useConfig as re,useEditDepth as ne,usePayloadAPI as de,useTranslation as ce}from"@payloadcms/ui";import{$getNodeByKey as T,$getSelection as ue,$isNodeSelection as me,$isRangeSelection as pe}from"lexical";import{formatAdminURL as ge,isImage as fe}from"payload/shared";import{useCallback as _,useEffect as F,useId as he,useReducer as _e,useRef as we,useState as I}from"react";var j={depth:0},Te=k=>{let{className:e,data:{fields:z,relationTo:w,value:c},format:A,nodeKey:l}=k;if(typeof c=="object")throw new Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:B},serverURL:K},getEntityConfig:M}=re(),b=we(null),{uuid:O}=g(),W=ne(),[s]=ae(),{editorConfig:H,fieldProps:{schemaPath:q}}=g(),u=oe(),{i18n:D,t:n}=ce(),[S,m]=I(!1),[$,G]=_e(o=>o+1,0),[i]=I(()=>M({collectionSlug:w})),J=he(),x=le({slug:"lexical-upload-drawer-"+O+J,depth:W}),{toggleDrawer:Q}=y(x,!0),{closeDocumentDrawer:C,DocumentDrawer:V,DocumentDrawerToggler:X}=L({id:c,collectionSlug:i.slug}),[{data:t},{setParams:v}]=de(ge({apiRoute:B,path:`/${i.slug}/${c}`,serverURL:K}),{initialParams:j}),N=t?.thumbnailURL||t?.url;F(()=>s.registerUpdateListener(({editorState:o})=>{o.read(()=>{let r=ue();if(me(r))m(r.has(l));else if(pe(r)){let d=r.getNodes();m(d.some(p=>p.getKey()===l))}else m(!1)})}),[s,l]),F(()=>{let o=b.current?.closest(`.${e}`);o&&o.classList.toggle(`${e}--selected`,S)},[S,e]);let Y=_(()=>{s.update(()=>{T(l)?.remove()})},[s,l]),Z=_(o=>{v({...j,cacheBust:$}),G(),C()},[v,$,C]),R=H?.resolvedFeatureMap?.get("upload")?.sanitizedClientFeatureProps.collections?.[i.slug]?.hasExtraFields,ee=_((o,r)=>{s.update(()=>{let d=T(l);if(d){let p={...d.getData(),fields:r};d.setData(p)}})},[s,l]),te=N&&t?.width&&t?.height?t.width>t.height?"landscape":"portrait":"landscape";return f("div",{className:`${e}__contents ${e}__contents--${te}`,"data-align":A||void 0,"data-filename":t?.filename,ref:b,children:[a("div",{className:`${e}__card`,children:f("div",{className:`${e}__media`,children:[a(ie,{collectionSlug:w,fileSrc:fe(t?.mimeType)?N:null,height:t?.height,size:"none",width:t?.width}),u&&f("div",{className:`${e}__floater`,"data-theme":"dark",children:[a(se,{className:`${e}__collectionLabel`,pillStyle:"dark",size:"small",children:P(i.labels.singular,D)}),a(X,{className:`${e}__doc-drawer-toggler`,children:a("span",{className:`${e}__filename`,children:t?.filename||n("general:untitled")})}),R?a(h,{buttonStyle:"ghost",className:`${e}__upload-drawer-toggler`,disabled:!u,el:"button",icon:"write",onClick:Q,round:!0,size:"medium",tooltip:n("fields:editRelationship")}):null,a("div",{className:`${e}__divider`}),a(h,{buttonStyle:"ghost",className:`${e}__swap-drawer-toggler`,disabled:!u,el:"button",icon:"swap",onClick:()=>{s.dispatchCommand(U,{replace:{nodeKey:l}})},round:!0,size:"medium",tooltip:n("fields:swapUpload")}),a(h,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!u,icon:"x",onClick:o=>{o.preventDefault(),Y()},round:!0,size:"medium",tooltip:n("fields:removeUpload")})]})]})}),c?a(V,{onSave:Z}):null,R?a(E,{data:z,drawerSlug:x,drawerTitle:n("general:editLabel",{label:P(i.labels.singular,D)}),featureKey:"upload",handleDrawerSubmit:ee,schemaPath:q,schemaPathSuffix:i.slug}):null]})};export{Te as UploadComponent};
2
- //# sourceMappingURL=component-PHZQBOJE.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/upload/client/component/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport type { ClientCollectionConfig, Data, FormState, JsonObject } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n formatDrawerSlug,\n Pill,\n Thumbnail,\n useConfig,\n useEditDepth,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n $isRangeSelection,\n type ElementFormatType,\n} from 'lexical'\nimport { formatAdminURL, isImage } from 'payload/shared'\nimport React, { useCallback, useEffect, useId, useReducer, useRef, useState } from 'react'\n\nimport type { BaseClientFeatureProps } from '../../../typesClient.js'\nimport type { UploadData } from '../../server/schema.js'\nimport type { UploadFeaturePropsClient } from '../index.js'\nimport type { UploadNode } from '../nodes/UploadNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport './index.css'\n\nconst initialParams = {\n depth: 0,\n}\n\nexport type ElementProps = {\n className: string\n data: UploadData\n format?: ElementFormatType\n nodeKey: string\n}\n\nexport const UploadComponent: React.FC<ElementProps> = (props) => {\n const {\n className: baseClass,\n data: { fields, relationTo, value },\n format,\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.',\n )\n }\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n const uploadRef = useRef<HTMLDivElement | null>(null)\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n const [editor] = useLexicalComposerContext()\n\n const {\n editorConfig,\n fieldProps: { schemaPath },\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation()\n const [isSelected, setIsSelected] = useState(false)\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [relatedCollection] = useState<ClientCollectionConfig>(() =>\n getEntityConfig({ collectionSlug: relationTo }),\n )\n\n const componentID = useId()\n\n const extraFieldsDrawerSlug = formatDrawerSlug({\n slug: `lexical-upload-drawer-` + uuid + componentID, // There can be multiple upload components, each with their own drawer, in one single editor => separate them by componentID\n depth: editDepth,\n })\n\n // Need to use hook to initialize useEffect that restores cursor position\n const { toggleDrawer } = useLexicalDrawer(extraFieldsDrawerSlug, true)\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n // Get the referenced document\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const thumbnailSRC = data?.thumbnailURL || data?.url\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = uploadRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeUpload = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateUpload = useCallback(\n (_data: Data) => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n dispatchCacheBust()\n closeDocumentDrawer()\n },\n [setParams, cacheBust, closeDocumentDrawer],\n )\n\n const hasExtraFields = (\n editorConfig?.resolvedFeatureMap?.get('upload')\n ?.sanitizedClientFeatureProps as BaseClientFeatureProps<UploadFeaturePropsClient>\n ).collections?.[relatedCollection.slug]?.hasExtraFields\n\n const onExtraFieldsDrawerSubmit = useCallback(\n (_: FormState, data: JsonObject) => {\n // Update lexical node (with key nodeKey) with new data\n editor.update(() => {\n const uploadNode: null | UploadNode = $getNodeByKey(nodeKey)\n if (uploadNode) {\n const newData: UploadData = {\n ...uploadNode.getData(),\n fields: data,\n }\n uploadNode.setData(newData)\n }\n })\n },\n [editor, nodeKey],\n )\n\n const aspectRatio =\n thumbnailSRC && data?.width && data?.height\n ? data.width > data.height\n ? 'landscape'\n : 'portrait'\n : 'landscape'\n\n return (\n <div\n className={`${baseClass}__contents ${baseClass}__contents--${aspectRatio}`}\n data-align={format || undefined}\n data-filename={data?.filename}\n ref={uploadRef}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__media`}>\n <Thumbnail\n collectionSlug={relationTo}\n fileSrc={isImage(data?.mimeType) ? thumbnailSRC : null}\n height={data?.height}\n size=\"none\"\n width={data?.width}\n />\n\n {isEditable && (\n <div className={`${baseClass}__floater`} data-theme=\"dark\">\n <Pill className={`${baseClass}__collectionLabel`} pillStyle=\"dark\" size=\"small\">\n {getTranslation(relatedCollection.labels.singular, i18n)}\n </Pill>\n\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <span className={`${baseClass}__filename`}>\n {data?.filename || t('general:untitled')}\n </span>\n </DocumentDrawerToggler>\n\n {hasExtraFields ? (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__upload-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"write\"\n onClick={toggleDrawer}\n round\n size=\"medium\"\n tooltip={t('fields:editRelationship')}\n />\n ) : null}\n\n <div className={`${baseClass}__divider`} />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swap-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }}\n round\n size=\"medium\"\n tooltip={t('fields:swapUpload')}\n />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeUpload()\n }}\n round\n size=\"medium\"\n tooltip={t('fields:removeUpload')}\n />\n </div>\n )}\n </div>\n </div>\n\n {value ? <DocumentDrawer onSave={updateUpload} /> : null}\n {hasExtraFields ? (\n <FieldsDrawer\n data={fields}\n drawerSlug={extraFieldsDrawerSlug}\n drawerTitle={t('general:editLabel', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n featureKey=\"upload\"\n handleDrawerSubmit={onExtraFieldsDrawerSubmit}\n schemaPath={schemaPath}\n schemaPathSuffix={relatedCollection.slug}\n />\n ) : null}\n </div>\n )\n}\n"],
5
- "mappings": "sOAGA,OAASA,6BAAAA,OAAiC,2CAC1C,OAASC,sBAAAA,OAA0B,oCACnC,OAASC,kBAAAA,MAAsB,2BAC/B,OACEC,UAAAA,EACAC,oBAAAA,GACAC,QAAAA,GACAC,aAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,kBAAAA,OACK,iBACP,OACEC,iBAAAA,EACAC,iBAAAA,GACAC,oBAAAA,GACAC,qBAAAA,OAEK,UACP,OAASC,kBAAAA,GAAgBC,WAAAA,OAAe,iBACxC,OAAgBC,eAAAA,EAAaC,aAAAA,EAAWC,SAAAA,GAAOC,cAAAA,GAAYC,UAAAA,GAAQC,YAAAA,MAAgB,QAYnF,IAAAC,EAAO,CAEP,MAAMA,GAENC,GAAAC,GAAA,CASA,GAAO,CACL,UAAMC,EACJC,KAAAA,CACAC,OAAAA,EAAQC,WAAAA,EAAQC,MAAAA,GAAiB,OAAAC,EACjCA,QAAAA,GACAC,EAAO,GACLP,OAAAQ,GAAA,SAEJ,MAAI,IAAOA,MAAA,wHAAoB,EAI/B,GAAA,CAEA,OAAM,CACJC,OAAQ,CACNC,IAAAA,GAAa,UAAAC,GACJ,gBAAAC,GAEXA,GAAAA,EACEC,EAAAC,GAAA,IAAA,EACEC,CACN,KAAAC,GAAQA,EAAAA,EAASC,EAAAA,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umbnail", "useConfig", "useEditDepth", "usePayloadAPI", "useTranslation", "$getNodeByKey", "$getSelection", "$isNodeSelection", "$isRangeSelection", "formatAdminURL", "isImage", "useCallback", "useEffect", "useId", "useReducer", "useRef", "useState", "initialParams", "UploadComponent", "props", "baseClass", "className", "data", "fields", "relationTo", "format", "nodeKey", "value", "config", "routes", "serverURL", "getEntityConfig", "useConfig", "useRef", "uploadRef", "uuid", "useEditorConfigContext", "editDepth", "useLexicalComposerContext", "editorConfig", "fieldProps", "isEditable", "i18n", "t", "useTranslation", "setIsSelected", "useState", "isSelected", "dispatchCacheBust", "state", "cacheBust", "useReducer", "relatedCollection", "collectionSlug", "componentID", "useId", "formatDrawerSlug", "extraFieldsDrawerSlug", "slug", "toggleDrawer", "useLexicalDrawer", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "setParams", "usePayloadAPI", "apiRoute", "api", "path", "thumbnailSRC", "useEffect", "editor", "editorState", "$getSelection", "$isNodeSelection", "selection", "nodes", "$isRangeSelection", "getNodes", "node", "outerEl", "removeUpload", "useCallback", "_data", "updateUpload", "hasExtraFields", "resolvedFeatureMap", "update", "$getNodeByKey", "uploadNode", "newData", "aspectRatio", "ref", "_jsx", "_jsxs", "Thumbnail", "fileSrc", "isImage", "height", "size", "width", "Pill", "pillStyle", "getTranslation", "labels", "buttonStyle", "disabled", "el", "icon", "onClick", "round", "tooltip", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "dispatchCommand", "replace", "Button", "e", "preventDefault", "onSave", "drawerSlug", "drawerTitle", "featureKey", "onExtraFieldsDrawerSubmit", "handleDrawerSubmit", "schemaPath", "schemaPathSuffix"]
7
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Browser-condition stub for `@payloadcms/richtext-lexical/rsc`.
3
- *
4
- * Bundlers serving the client graph load this file via the `"browser"` export
5
- * condition in `package.json`. The real implementations rely on server-only
6
- * APIs and must never be evaluated in a browser context.
7
- */
8
- export declare const RscEntryLexicalCell: () => null;
9
- export declare const LexicalDiffComponent: () => null;
10
- export declare const RscEntryLexicalField: () => null;
11
- //# sourceMappingURL=rsc.browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rsc.browser.d.ts","sourceRoot":"","sources":["../../../src/exports/server/rsc.browser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB,YAAa,CAAA;AAC7C,eAAO,MAAM,oBAAoB,YAAa,CAAA;AAC9C,eAAO,MAAM,oBAAoB,YAAa,CAAA"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Browser-condition stub for `@payloadcms/richtext-lexical/rsc`.
3
- *
4
- * Bundlers serving the client graph load this file via the `"browser"` export
5
- * condition in `package.json`. The real implementations rely on server-only
6
- * APIs and must never be evaluated in a browser context.
7
- */export const RscEntryLexicalCell = () => null;
8
- export const LexicalDiffComponent = () => null;
9
- export const RscEntryLexicalField = () => null;
10
- //# sourceMappingURL=rsc.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rsc.browser.js","names":["RscEntryLexicalCell","LexicalDiffComponent","RscEntryLexicalField"],"sources":["../../../src/exports/server/rsc.browser.ts"],"sourcesContent":["/**\n * Browser-condition stub for `@payloadcms/richtext-lexical/rsc`.\n *\n * Bundlers serving the client graph load this file via the `\"browser\"` export\n * condition in `package.json`. The real implementations rely on server-only\n * APIs and must never be evaluated in a browser context.\n */\n\nexport const RscEntryLexicalCell = () => null\nexport const LexicalDiffComponent = () => null\nexport const RscEntryLexicalField = () => null\n"],"mappings":"AAAA;;;;;;GAQA,OAAO,MAAMA,mBAAA,GAAsBA,CAAA,KAAM;AACzC,OAAO,MAAMC,oBAAA,GAAuBA,CAAA,KAAM;AAC1C,OAAO,MAAMC,oBAAA,GAAuBA,CAAA,KAAM","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ElementTransformer } from '../../packages/@lexical/markdown/index.js';
2
- export declare const MarkdownTransformer: ElementTransformer;
3
- //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../src/features/blockquote/markdownTransformer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAA;AAEnF,eAAO,MAAM,mBAAmB,EAAE,kBAgCjC,CAAA"}
@@ -1,33 +0,0 @@
1
- import { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text';
2
- export const MarkdownTransformer = {
3
- type: 'element',
4
- dependencies: [QuoteNode],
5
- export: (node, exportChildren) => {
6
- if (!$isQuoteNode(node)) {
7
- return null;
8
- }
9
- const lines = exportChildren(node).split('\n');
10
- const output = [];
11
- for (const line of lines) {
12
- output.push('> ' + line);
13
- }
14
- return output.join('\n');
15
- },
16
- regExp: /^>\s/,
17
- replace: (parentNode, children, _match, isImport) => {
18
- if (isImport) {
19
- const previousNode = parentNode.getPreviousSibling();
20
- if ($isQuoteNode(previousNode)) {
21
- previousNode.splice(previousNode.getChildrenSize(), 0, [...children]);
22
- previousNode.select(0, 0);
23
- parentNode.remove();
24
- return;
25
- }
26
- }
27
- const node = $createQuoteNode();
28
- node.append(...children);
29
- parentNode.replace(node);
30
- node.select(0, 0);
31
- }
32
- };
33
- //# sourceMappingURL=markdownTransformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$createQuoteNode","$isQuoteNode","QuoteNode","MarkdownTransformer","type","dependencies","export","node","exportChildren","lines","split","output","line","push","join","regExp","replace","parentNode","children","_match","isImport","previousNode","getPreviousSibling","splice","getChildrenSize","select","remove","append"],"sources":["../../../src/features/blockquote/markdownTransformer.ts"],"sourcesContent":["import { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\n\nimport type { ElementTransformer } from '../../packages/@lexical/markdown/index.js'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output: string[] = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [...children])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ;AAI1D,OAAO,MAAMC,mBAAA,GAA0C;EACrDC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACH,SAAA,CAAU;EACzBI,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,IAAI,CAACP,YAAA,CAAaM,IAAA,GAAO;MACvB,OAAO;IACT;IAEA,MAAME,KAAA,GAAQD,cAAA,CAAeD,IAAA,EAAMG,KAAK,CAAC;IACzC,MAAMC,MAAA,GAAmB,EAAE;IAC3B,KAAK,MAAMC,IAAA,IAAQH,KAAA,EAAO;MACxBE,MAAA,CAAOE,IAAI,CAAC,OAAOD,IAAA;IACrB;IACA,OAAOD,MAAA,CAAOG,IAAI,CAAC;EACrB;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASA,CAACC,UAAA,EAAYC,QAAA,EAAUC,MAAA,EAAQC,QAAA;IACtC,IAAIA,QAAA,EAAU;MACZ,MAAMC,YAAA,GAAeJ,UAAA,CAAWK,kBAAkB;MAClD,IAAIrB,YAAA,CAAaoB,YAAA,GAAe;QAC9BA,YAAA,CAAaE,MAAM,CAACF,YAAA,CAAaG,eAAe,IAAI,GAAG,C,GAAIN,QAAA,CAAS;QACpEG,YAAA,CAAaI,MAAM,CAAC,GAAG;QACvBR,UAAA,CAAWS,MAAM;QACjB;MACF;IACF;IAEA,MAAMnB,IAAA,GAAOP,gBAAA;IACbO,IAAA,CAAKoB,MAAM,IAAIT,QAAA;IACfD,UAAA,CAAWD,OAAO,CAACT,IAAA;IACnBA,IAAA,CAAKkB,MAAM,CAAC,GAAG;EACjB;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,OAAO,CAACC,UAAA,EA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B,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,GAAGD,CAAA,CAA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AA;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
@@ -1 +0,0 @@
1
- {"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../src/lexical/utils/guard.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,WAAW,CAE1D"}
@@ -1,9 +0,0 @@
1
- 'use client';
2
-
3
- /**
4
- * @deprecated - remove in 4.0. lexical already exports an isHTMLElement utility
5
- */
6
- export function isHTMLElement(x) {
7
- return x instanceof HTMLElement;
8
- }
9
- //# sourceMappingURL=guard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"guard.js","names":["isHTMLElement","x","HTMLElement"],"sources":["../../../src/lexical/utils/guard.ts"],"sourcesContent":["'use client'\n\n/**\n * @deprecated - remove in 4.0. lexical already exports an isHTMLElement utility\n */\nexport function isHTMLElement(x: unknown): x is HTMLElement {\n return x instanceof HTMLElement\n}\n"],"mappings":"AAAA;;AAEA;;;AAGA,OAAO,SAASA,cAAcC,CAAU;EACtC,OAAOA,CAAA,YAAaC,WAAA;AACtB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from '@lexical/react/LexicalContextMenuPlugin';
2
- //# sourceMappingURL=LexicalContextMenuPlugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LexicalContextMenuPlugin.d.ts","sourceRoot":"","sources":["../../../src/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.tsx"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAA"}