@payloadcms/richtext-lexical 4.0.0-internal.1f9ae9a → 4.0.0-internal.21320b5

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 (719) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js +5 -5
  4. package/dist/cell/rscEntry.js.map +1 -1
  5. package/dist/exports/client/Field-F22V5L4V.js +2 -0
  6. package/dist/exports/client/Field-F22V5L4V.js.map +7 -0
  7. package/dist/exports/client/{RelationshipComponent-RZL743CS.js → RelationshipComponent-YCPAKOL7.js} +1 -1
  8. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  9. package/dist/exports/client/bundled.css +1 -1
  10. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  11. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  12. package/dist/exports/client/chunk-5VIL27GI.js +2 -0
  13. package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
  14. package/dist/exports/client/chunk-ESITTE3C.js +2 -0
  15. package/dist/exports/client/chunk-ESITTE3C.js.map +7 -0
  16. package/dist/exports/client/chunk-LN6VX25I.js +2 -0
  17. package/dist/exports/client/chunk-LN6VX25I.js.map +7 -0
  18. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  19. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  20. package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
  21. package/dist/exports/client/index.d.ts +1 -2
  22. package/dist/exports/client/index.d.ts.map +1 -1
  23. package/dist/exports/client/index.js +27 -28
  24. package/dist/exports/client/index.js.map +4 -4
  25. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  26. package/dist/features/blockquote/client/index.js +2 -2
  27. package/dist/features/blockquote/client/index.js.map +1 -1
  28. package/dist/features/blockquote/server/index.d.ts +1 -4
  29. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  30. package/dist/features/blockquote/server/index.js +4 -2
  31. package/dist/features/blockquote/server/index.js.map +1 -1
  32. package/dist/features/blockquote/server/schema.d.ts +8 -0
  33. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  34. package/dist/features/blockquote/server/schema.js +15 -0
  35. package/dist/features/blockquote/server/schema.js.map +1 -0
  36. package/dist/features/blocks/client/component/index.css +2 -2
  37. package/dist/features/blocks/client/component/index.d.ts +2 -1
  38. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  39. package/dist/features/blocks/client/component/index.js +16 -8
  40. package/dist/features/blocks/client/component/index.js.map +1 -1
  41. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  42. package/dist/features/blocks/client/componentInline/index.css +8 -8
  43. package/dist/features/blocks/client/componentInline/index.d.ts +2 -1
  44. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  45. package/dist/features/blocks/client/componentInline/index.js +15 -7
  46. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  47. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  48. package/dist/features/blocks/client/index.d.ts.map +1 -1
  49. package/dist/features/blocks/client/index.js +4 -2
  50. package/dist/features/blocks/client/index.js.map +1 -1
  51. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  52. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  53. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  54. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  55. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  56. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  57. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  58. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  59. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  60. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  61. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  62. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  63. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +1 -1
  64. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  65. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  66. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +1 -1
  67. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  68. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  69. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  70. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  71. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  72. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  73. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +1 -0
  74. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  75. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  76. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  77. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  78. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  79. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  80. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  81. package/dist/features/blocks/server/index.d.ts +1 -0
  82. package/dist/features/blocks/server/index.d.ts.map +1 -1
  83. package/dist/features/blocks/server/index.js +26 -74
  84. package/dist/features/blocks/server/index.js.map +1 -1
  85. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  86. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  87. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  88. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  89. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  90. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  91. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  92. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  93. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  94. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  95. package/dist/features/blocks/server/schema.d.ts +45 -0
  96. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  97. package/dist/features/blocks/server/schema.js +140 -0
  98. package/dist/features/blocks/server/schema.js.map +1 -0
  99. package/dist/features/blocks/server/validate.d.ts +1 -2
  100. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  101. package/dist/features/blocks/server/validate.js.map +1 -1
  102. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  103. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  104. package/dist/features/converters/lexicalToHtml/async/types.d.ts +14 -15
  105. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  107. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +14 -15
  110. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  112. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +4 -2
  113. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
  115. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  116. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  117. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +12 -14
  118. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  119. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  120. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  122. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  123. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +12 -14
  124. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  125. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  126. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  127. package/dist/features/converters/markdownToLexical/index.js +5 -2
  128. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  129. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  130. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  131. package/dist/features/format/bold/feature.client.js +1 -1
  132. package/dist/features/format/bold/feature.client.js.map +1 -1
  133. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  134. package/dist/features/format/bold/feature.server.js +1 -1
  135. package/dist/features/format/bold/feature.server.js.map +1 -1
  136. package/dist/features/format/inlineCode/feature.client.js +1 -1
  137. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  138. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  139. package/dist/features/format/inlineCode/feature.server.js +1 -1
  140. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  141. package/dist/features/format/italic/feature.client.js +1 -1
  142. package/dist/features/format/italic/feature.client.js.map +1 -1
  143. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  144. package/dist/features/format/italic/feature.server.js +1 -1
  145. package/dist/features/format/italic/feature.server.js.map +1 -1
  146. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  147. package/dist/features/format/strikethrough/feature.client.js +1 -1
  148. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  149. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  150. package/dist/features/format/strikethrough/feature.server.js +1 -1
  151. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  152. package/dist/features/heading/client/index.js +2 -2
  153. package/dist/features/heading/client/index.js.map +1 -1
  154. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  155. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  156. package/dist/features/heading/markdownTransformer.js +6 -19
  157. package/dist/features/heading/markdownTransformer.js.map +1 -1
  158. package/dist/features/heading/server/index.d.ts +2 -4
  159. package/dist/features/heading/server/index.d.ts.map +1 -1
  160. package/dist/features/heading/server/index.js +4 -2
  161. package/dist/features/heading/server/index.js.map +1 -1
  162. package/dist/features/heading/server/schema.d.ts +10 -0
  163. package/dist/features/heading/server/schema.d.ts.map +1 -0
  164. package/dist/features/heading/server/schema.js +37 -0
  165. package/dist/features/heading/server/schema.js.map +1 -0
  166. package/dist/features/horizontalRule/client/index.js +2 -2
  167. package/dist/features/horizontalRule/client/index.js.map +1 -1
  168. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  169. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  170. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  171. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  172. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +2 -2
  173. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  174. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  175. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  176. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  177. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  178. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  179. package/dist/features/horizontalRule/server/index.js +4 -2
  180. package/dist/features/horizontalRule/server/index.js.map +1 -1
  181. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  182. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  183. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  184. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  185. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -6
  186. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  187. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  188. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  189. package/dist/features/horizontalRule/server/schema.d.ts +7 -0
  190. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  191. package/dist/features/horizontalRule/server/schema.js +25 -0
  192. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  193. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  194. package/dist/features/link/client/index.d.ts.map +1 -1
  195. package/dist/features/link/client/index.js +2 -2
  196. package/dist/features/link/client/index.js.map +1 -1
  197. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  198. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  199. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  200. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  201. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  202. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  203. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  204. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  205. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  206. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  207. package/dist/features/link/markdownTransformer.d.ts +5 -5
  208. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  209. package/dist/features/link/markdownTransformer.js +2 -2
  210. package/dist/features/link/markdownTransformer.js.map +1 -1
  211. package/dist/features/link/markdownTransformer.spec.js +10 -10
  212. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  213. package/dist/features/link/nodes/AutoLinkNode.d.ts +4 -4
  214. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  215. package/dist/features/link/nodes/AutoLinkNode.js +2 -1
  216. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  217. package/dist/features/link/nodes/LinkNode.d.ts +4 -4
  218. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  219. package/dist/features/link/nodes/LinkNode.js +2 -1
  220. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  221. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  222. package/dist/features/link/server/baseFields.js.map +1 -1
  223. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  224. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  225. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  226. package/dist/features/link/server/index.d.ts +2 -1
  227. package/dist/features/link/server/index.d.ts.map +1 -1
  228. package/dist/features/link/server/index.js +7 -4
  229. package/dist/features/link/server/index.js.map +1 -1
  230. package/dist/features/link/server/schema.d.ts +32 -0
  231. package/dist/features/link/server/schema.d.ts.map +1 -0
  232. package/dist/features/link/server/schema.js +171 -0
  233. package/dist/features/link/server/schema.js.map +1 -0
  234. package/dist/features/link/server/validate.d.ts +1 -1
  235. package/dist/features/link/server/validate.d.ts.map +1 -1
  236. package/dist/features/link/server/validate.js.map +1 -1
  237. package/dist/features/lists/checklist/client/index.js +1 -1
  238. package/dist/features/lists/checklist/client/index.js.map +1 -1
  239. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  240. package/dist/features/lists/checklist/server/index.js +4 -1
  241. package/dist/features/lists/checklist/server/index.js.map +1 -1
  242. package/dist/features/lists/orderedList/client/index.js +1 -1
  243. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  244. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  245. package/dist/features/lists/orderedList/server/index.js +4 -1
  246. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  247. package/dist/features/lists/plugin/index.d.ts +0 -9
  248. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  249. package/dist/features/lists/plugin/index.js.map +1 -1
  250. package/dist/features/lists/shared/schema.d.ts +18 -0
  251. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  252. package/dist/features/lists/shared/schema.js +62 -0
  253. package/dist/features/lists/shared/schema.js.map +1 -0
  254. package/dist/features/lists/unorderedList/client/index.js +1 -1
  255. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  256. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  257. package/dist/features/lists/unorderedList/server/index.js +4 -1
  258. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  259. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  260. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  261. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  262. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  263. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  264. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  265. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  266. package/dist/features/relationship/client/plugins/index.d.ts +1 -1
  267. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  268. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  269. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  270. package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
  271. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  272. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
  273. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  274. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  275. package/dist/features/relationship/server/index.d.ts +1 -0
  276. package/dist/features/relationship/server/index.d.ts.map +1 -1
  277. package/dist/features/relationship/server/index.js +2 -0
  278. package/dist/features/relationship/server/index.js.map +1 -1
  279. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  280. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  281. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  282. package/dist/features/relationship/server/schema.d.ts +28 -0
  283. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  284. package/dist/features/relationship/server/schema.js +97 -0
  285. package/dist/features/relationship/server/schema.js.map +1 -0
  286. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
  287. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  288. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
  289. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  290. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  291. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  292. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  293. package/dist/features/table/client/index.d.ts.map +1 -0
  294. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  295. package/dist/features/table/client/index.js.map +1 -0
  296. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  297. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  298. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  299. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  300. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  301. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  302. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  303. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  304. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  305. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  306. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  307. package/dist/features/table/client/utils/debounce.js.map +1 -0
  308. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  309. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  310. package/dist/features/table/markdownTransformer.d.ts +5 -0
  311. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  312. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  313. package/dist/features/table/markdownTransformer.js.map +1 -0
  314. package/dist/features/table/server/index.d.ts +3 -0
  315. package/dist/features/table/server/index.d.ts.map +1 -0
  316. package/dist/features/{experimental_table → table}/server/index.js +10 -6
  317. package/dist/features/table/server/index.js.map +1 -0
  318. package/dist/features/table/server/schema.d.ts +27 -0
  319. package/dist/features/table/server/schema.d.ts.map +1 -0
  320. package/dist/features/table/server/schema.js +107 -0
  321. package/dist/features/table/server/schema.js.map +1 -0
  322. package/dist/features/textState/feature.client.js +1 -1
  323. package/dist/features/textState/feature.client.js.map +1 -1
  324. package/dist/features/toolbars/fixed/client/Toolbar/index.css +4 -6
  325. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  326. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  327. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  328. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  329. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  330. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  331. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  332. package/dist/features/typesClient.d.ts +1 -1
  333. package/dist/features/typesClient.d.ts.map +1 -1
  334. package/dist/features/typesClient.js.map +1 -1
  335. package/dist/features/typesServer.d.ts +19 -42
  336. package/dist/features/typesServer.d.ts.map +1 -1
  337. package/dist/features/typesServer.js.map +1 -1
  338. package/dist/features/upload/client/component/index.css +11 -11
  339. package/dist/features/upload/client/component/index.d.ts +1 -1
  340. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  341. package/dist/features/upload/client/component/index.js +2 -1
  342. package/dist/features/upload/client/component/index.js.map +1 -1
  343. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  344. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  345. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  346. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  347. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  348. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  349. package/dist/features/upload/client/plugin/index.js +5 -5
  350. package/dist/features/upload/client/plugin/index.js.map +1 -1
  351. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
  352. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  353. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  354. package/dist/features/upload/server/index.d.ts +1 -0
  355. package/dist/features/upload/server/index.d.ts.map +1 -1
  356. package/dist/features/upload/server/index.js +7 -6
  357. package/dist/features/upload/server/index.js.map +1 -1
  358. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  359. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  360. package/dist/features/upload/server/markdownTransformer.js +1 -1
  361. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  362. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  363. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  364. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  365. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  366. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  367. package/dist/features/upload/server/schema.d.ts +52 -0
  368. package/dist/features/upload/server/schema.d.ts.map +1 -0
  369. package/dist/features/upload/server/schema.js +149 -0
  370. package/dist/features/upload/server/schema.js.map +1 -0
  371. package/dist/features/upload/server/validate.d.ts +1 -1
  372. package/dist/features/upload/server/validate.d.ts.map +1 -1
  373. package/dist/features/upload/server/validate.js.map +1 -1
  374. package/dist/field/Diff/converters/unknown/index.css +1 -1
  375. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  376. package/dist/field/Field.d.ts.map +1 -1
  377. package/dist/field/Field.js +18 -15
  378. package/dist/field/Field.js.map +1 -1
  379. package/dist/field/ViewSelector.css +1 -1
  380. package/dist/field/bundled.css +1 -1
  381. package/dist/field/index.css +15 -15
  382. package/dist/field/index.js +1 -1
  383. package/dist/field/index.js.map +1 -1
  384. package/dist/field/rscEntry.d.ts.map +1 -1
  385. package/dist/field/rscEntry.js +2 -0
  386. package/dist/field/rscEntry.js.map +1 -1
  387. package/dist/i18n.d.ts.map +1 -1
  388. package/dist/i18n.js +68 -0
  389. package/dist/i18n.js.map +1 -1
  390. package/dist/index.d.ts +11 -8
  391. package/dist/index.d.ts.map +1 -1
  392. package/dist/index.js +7 -7
  393. package/dist/index.js.map +1 -1
  394. package/dist/lexical/LexicalEditor.css +18 -18
  395. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  396. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  397. package/dist/lexical/config/client/loader.js +5 -1
  398. package/dist/lexical/config/client/loader.js.map +1 -1
  399. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  400. package/dist/lexical/config/server/loader.d.ts +1 -1
  401. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  402. package/dist/lexical/config/server/loader.js +2 -2
  403. package/dist/lexical/config/server/loader.js.map +1 -1
  404. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  405. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  406. package/dist/lexical/config/server/sanitize.js +11 -13
  407. package/dist/lexical/config/server/sanitize.js.map +1 -1
  408. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  409. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  410. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  411. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  412. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  413. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  414. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  415. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  416. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  417. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  418. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  419. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  420. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  421. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  422. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  423. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  424. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  425. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  426. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  427. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  428. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  429. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  430. package/dist/lexical/theme/EditorTheme.css +18 -19
  431. package/dist/lexical/ui/ContentEditable.css +22 -17
  432. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  433. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  434. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  435. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  436. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  437. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  438. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  439. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  440. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  441. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  442. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  443. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  444. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  445. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  446. package/dist/lexical/utils/point.d.ts.map +1 -1
  447. package/dist/lexical/utils/rect.d.ts.map +1 -1
  448. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  449. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  450. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  451. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  452. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  453. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  454. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  455. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  456. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  457. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  458. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  459. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  460. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  461. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  462. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  463. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  464. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  465. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  466. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  467. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  468. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  469. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  470. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  471. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  472. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  473. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  474. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  475. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  476. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  477. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  478. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  479. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  480. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  481. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  482. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  483. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  484. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  485. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  486. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  487. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  488. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  489. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  490. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  491. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  492. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  493. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  494. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  495. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  496. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  497. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  498. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  499. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  500. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  501. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  502. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  503. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  504. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  505. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  506. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  507. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  508. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  509. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  510. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  511. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  512. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  513. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  514. package/dist/types/builtInNodes.d.ts +14 -0
  515. package/dist/types/builtInNodes.d.ts.map +1 -0
  516. package/dist/types/builtInNodes.js +203 -0
  517. package/dist/types/builtInNodes.js.map +1 -0
  518. package/dist/types/index.d.ts +17 -18
  519. package/dist/types/index.d.ts.map +1 -1
  520. package/dist/types/index.js.map +1 -1
  521. package/dist/types/jsonSchemaHelpers.d.ts +30 -0
  522. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  523. package/dist/types/jsonSchemaHelpers.js +58 -0
  524. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  525. package/dist/types/nodeTypes.d.ts +115 -61
  526. package/dist/types/nodeTypes.d.ts.map +1 -1
  527. package/dist/types/nodeTypes.js +3 -2
  528. package/dist/types/nodeTypes.js.map +1 -1
  529. package/dist/types/schema.d.ts.map +1 -1
  530. package/dist/types/schema.js +74 -65
  531. package/dist/types/schema.js.map +1 -1
  532. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  533. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  534. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  535. package/dist/utilities/buildEditorState.d.ts +17 -3
  536. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  537. package/dist/utilities/buildEditorState.js +8 -0
  538. package/dist/utilities/buildEditorState.js.map +1 -1
  539. package/dist/utilities/buildInitialState.d.ts +2 -1
  540. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  541. package/dist/utilities/buildInitialState.js.map +1 -1
  542. package/dist/utilities/createServerFeature.d.ts +1 -1
  543. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  544. package/dist/utilities/createServerFeature.js +2 -2
  545. package/dist/utilities/createServerFeature.js.map +1 -1
  546. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  547. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  548. package/dist/utilities/editorConfigFactory.js +9 -9
  549. package/dist/utilities/editorConfigFactory.js.map +1 -1
  550. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  551. package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
  552. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  553. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  554. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  555. package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
  556. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  557. package/dist/utilities/fieldsDrawer/index.css +12 -0
  558. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  559. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  560. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  561. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  562. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  563. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  564. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  565. package/dist/utilities/generateImportMap.d.ts +1 -1
  566. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  567. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  568. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  569. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  570. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  571. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  572. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  573. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  574. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  575. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  576. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  577. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  578. package/dist/validate/index.d.ts.map +1 -1
  579. package/package.json +96 -27
  580. package/dist/exports/client/Field-G5Z2HM5Y.js +0 -2
  581. package/dist/exports/client/Field-G5Z2HM5Y.js.map +0 -7
  582. package/dist/exports/client/RelationshipComponent-RZL743CS.js.map +0 -7
  583. package/dist/exports/client/chunk-6QWQ7JV4.js +0 -2
  584. package/dist/exports/client/chunk-6QWQ7JV4.js.map +0 -7
  585. package/dist/exports/client/chunk-FEJXFRL7.js +0 -2
  586. package/dist/exports/client/chunk-FEJXFRL7.js.map +0 -7
  587. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  588. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  589. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  590. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  591. package/dist/exports/client/component-CVM4OESA.js +0 -2
  592. package/dist/exports/client/component-CVM4OESA.js.map +0 -7
  593. package/dist/exports/client/componentInline-JJZ2NKW2.js +0 -2
  594. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  595. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  596. package/dist/features/blockquote/markdownTransformer.js +0 -33
  597. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  598. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  599. package/dist/features/experimental_table/client/index.js.map +0 -1
  600. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  601. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  602. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  603. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  604. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  605. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  606. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  607. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  608. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  609. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  610. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  611. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  612. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  613. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  614. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  615. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  616. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  617. package/dist/features/experimental_table/server/index.d.ts +0 -8
  618. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  619. package/dist/features/experimental_table/server/index.js.map +0 -1
  620. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  621. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  622. package/dist/features/format/bold/markdownTransformers.js +0 -23
  623. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  624. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  625. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  626. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  627. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  628. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  629. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  630. package/dist/features/format/italic/markdownTransformers.js +0 -12
  631. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  632. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  633. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  634. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  635. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  636. package/dist/features/link/nodes/types.d.ts +0 -27
  637. package/dist/features/link/nodes/types.d.ts.map +0 -1
  638. package/dist/features/link/nodes/types.js +0 -2
  639. package/dist/features/link/nodes/types.js.map +0 -1
  640. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  641. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  642. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  643. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  644. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  645. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  646. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  647. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  648. package/dist/features/lists/shared/markdown.d.ts +0 -6
  649. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  650. package/dist/features/lists/shared/markdown.js +0 -57
  651. package/dist/features/lists/shared/markdown.js.map +0 -1
  652. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  653. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  654. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  655. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  656. package/dist/lexical/utils/guard.d.ts +0 -5
  657. package/dist/lexical/utils/guard.d.ts.map +0 -1
  658. package/dist/lexical/utils/guard.js +0 -9
  659. package/dist/lexical/utils/guard.js.map +0 -1
  660. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  661. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  662. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  663. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  664. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  665. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  666. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  667. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  668. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  669. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  670. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  671. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  672. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  673. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  674. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  675. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  676. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  677. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  678. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  679. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  680. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  681. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  682. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  683. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  684. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  685. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  686. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  687. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  688. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  689. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  690. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  691. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  692. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  693. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  694. package/dist/packages/@lexical/markdown/index.js +0 -39
  695. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  696. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  697. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  698. package/dist/packages/@lexical/markdown/utils.js +0 -267
  699. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  700. /package/dist/exports/client/{componentInline-JJZ2NKW2.js.map → componentInline-H24N7GUG.js.map} +0 -0
  701. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  702. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  703. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  704. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +0 -0
  705. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  706. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  707. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  708. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  709. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  710. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  711. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  712. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  713. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  714. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  715. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  716. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  717. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  718. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  719. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
4
+ import { useForm, useTranslation } from '@payloadcms/ui';
5
+ import { useEffect, useMemo, useRef } from 'react';
6
+ /**
7
+ * Shared logic for drawers that render their submit button in the drawer header.
8
+ *
9
+ * The header's `onClick` is defined outside the `Form` provider, so it cannot call
10
+ * `useForm().submit()` directly. This hook owns a ref to the form's `submit` function,
11
+ * which is populated from inside the form via `<RegisterFormSubmit submitRef={submitRef} />`.
12
+ *
13
+ * Returns the `headerActions` array to spread onto a `Drawer` and the `submitRef`
14
+ * to pass to `RegisterFormSubmit`.
15
+ */
16
+ export const useDrawerSubmit = () => {
17
+ const $ = _c(7);
18
+ const {
19
+ t
20
+ } = useTranslation();
21
+ const submitRef = useRef(null);
22
+ let t0;
23
+ if ($[0] !== t) {
24
+ t0 = t("fields:saveChanges");
25
+ $[0] = t;
26
+ $[1] = t0;
27
+ } else {
28
+ t0 = $[1];
29
+ }
30
+ let t1;
31
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
32
+ t1 = () => submitRef.current?.();
33
+ $[2] = t1;
34
+ } else {
35
+ t1 = $[2];
36
+ }
37
+ let t2;
38
+ if ($[3] !== t0) {
39
+ t2 = [{
40
+ label: t0,
41
+ onClick: t1,
42
+ style: "primary"
43
+ }];
44
+ $[3] = t0;
45
+ $[4] = t2;
46
+ } else {
47
+ t2 = $[4];
48
+ }
49
+ const headerActions = t2;
50
+ let t3;
51
+ if ($[5] !== headerActions) {
52
+ t3 = {
53
+ headerActions,
54
+ submitRef
55
+ };
56
+ $[5] = headerActions;
57
+ $[6] = t3;
58
+ } else {
59
+ t3 = $[6];
60
+ }
61
+ return t3;
62
+ };
63
+ /**
64
+ * Mounts inside a `<Form>` to populate `submitRef` (from `useDrawerSubmit`) with the form's
65
+ * `submit` function, allowing drawer header actions rendered outside the form's React tree
66
+ * to trigger submission.
67
+ */
68
+ export const RegisterFormSubmit = t0 => {
69
+ const $ = _c(4);
70
+ const {
71
+ submitRef
72
+ } = t0;
73
+ const {
74
+ submit
75
+ } = useForm();
76
+ let t1;
77
+ let t2;
78
+ if ($[0] !== submit || $[1] !== submitRef) {
79
+ t1 = () => {
80
+ submitRef.current = () => void submit();
81
+ return () => {
82
+ submitRef.current = null;
83
+ };
84
+ };
85
+ t2 = [submit, submitRef];
86
+ $[0] = submit;
87
+ $[1] = submitRef;
88
+ $[2] = t1;
89
+ $[3] = t2;
90
+ } else {
91
+ t1 = $[2];
92
+ t2 = $[3];
93
+ }
94
+ useEffect(t1, t2);
95
+ return null;
96
+ };
97
+ //# sourceMappingURL=useDrawerSubmit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDrawerSubmit.js","names":["c","_c","useForm","useTranslation","useEffect","useMemo","useRef","useDrawerSubmit","$","t","submitRef","t0","t1","Symbol","for","current","t2","label","onClick","style","headerActions","t3","RegisterFormSubmit","submit"],"sources":["../../../src/utilities/fieldsDrawer/useDrawerSubmit.ts"],"sourcesContent":["'use client'\nimport type { FC } from 'react'\nimport type React from 'react'\n\nimport { useForm, useTranslation } from '@payloadcms/ui'\nimport { useEffect, useMemo, useRef } from 'react'\n\n/**\n * Shared logic for drawers that render their submit button in the drawer header.\n *\n * The header's `onClick` is defined outside the `Form` provider, so it cannot call\n * `useForm().submit()` directly. This hook owns a ref to the form's `submit` function,\n * which is populated from inside the form via `<RegisterFormSubmit submitRef={submitRef} />`.\n *\n * Returns the `headerActions` array to spread onto a `Drawer` and the `submitRef`\n * to pass to `RegisterFormSubmit`.\n */\nexport const useDrawerSubmit = () => {\n const { t } = useTranslation()\n const submitRef = useRef<(() => void) | null>(null)\n\n const headerActions = useMemo(\n () => [\n {\n label: t('fields:saveChanges'),\n onClick: () => submitRef.current?.(),\n style: 'primary' as const,\n },\n ],\n [t],\n )\n\n return { headerActions, submitRef }\n}\n\n/**\n * Mounts inside a `<Form>` to populate `submitRef` (from `useDrawerSubmit`) with the form's\n * `submit` function, allowing drawer header actions rendered outside the form's React tree\n * to trigger submission.\n */\nexport const RegisterFormSubmit: FC<{\n submitRef: React.RefObject<(() => void) | null>\n}> = ({ submitRef }) => {\n const { submit } = useForm()\n\n useEffect(() => {\n submitRef.current = () => void submit()\n return () => {\n submitRef.current = null\n }\n }, [submit, submitRef])\n\n return null\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAIA,SAASC,OAAO,EAAEC,cAAc,QAAQ;AACxC,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ;AAE3C;;;;;;;;;;AAUA,OAAO,MAAMC,eAAA,GAAkBA,CAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EAC7B;IAAAQ;EAAA,IAAcN,cAAA;EACd,MAAAO,SAAA,GAAkBJ,MAAA,KAA4B;EAAA,IAAAK,EAAA;EAAA,IAAAH,CAAA,QAAAC,CAAA;IAKjCE,EAAA,GAAAF,CAAA,CAAE;IAAAD,CAAA,MAAAC,CAAA;IAAAD,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,IAAAI,EAAA;EAAA,IAAAJ,CAAA,QAAAK,MAAA,CAAAC,GAAA;IACAF,EAAA,GAAAA,CAAA,KAAMF,SAAA,CAAAK,OAAA;IAAiBP,CAAA,MAAAI,EAAA;EAAA;IAAAA,EAAA,GAAAJ,CAAA;EAAA;EAAA,IAAAQ,EAAA;EAAA,IAAAR,CAAA,QAAAG,EAAA;IAH9BK,EAAA;MAAAC,KAAA,EAEKN,EAAE;MAAAO,OAAA,EACAN,EAAuB;MAAAO,KAAA,EACzB;IAAA;IAEVX,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EAPH,MAAAY,aAAA,GACQJ,EAML;EACE,IAAAK,EAAA;EAAA,IAAAb,CAAA,QAAAY,aAAA;IAGEC,EAAA;MAAAD,aAAA;MAAAV;IAAA;IAA2BF,CAAA,MAAAY,aAAA;IAAAZ,CAAA,MAAAa,EAAA;EAAA;IAAAA,EAAA,GAAAb,CAAA;EAAA;EAAA,OAA3Ba,EAA2B;AAAA,CACpC;AAEA;;;;;AAKA,OAAO,MAAMC,kBAAA,GAERX,EAAA;EAAA,MAAAH,CAAA,GAAAP,EAAA;EAAC;IAAAS;EAAA,IAAAC,EAAa;EACjB;IAAAY;EAAA,IAAmBrB,OAAA;EAAA,IAAAU,EAAA;EAAA,IAAAI,EAAA;EAAA,IAAAR,CAAA,QAAAe,MAAA,IAAAf,CAAA,QAAAE,SAAA;IAETE,EAAA,GAAAA,CAAA;MACRF,SAAA,CAAAK,OAAA,cAA+BQ,MAAA;MAAA;QAE7Bb,SAAA,CAAAK,OAAA;MAAA;IAAA;IAEDC,EAAA,IAACO,MAAA,EAAQb,SAAA;IAAUF,CAAA,MAAAe,MAAA;IAAAf,CAAA,MAAAE,SAAA;IAAAF,CAAA,MAAAI,EAAA;IAAAJ,CAAA,MAAAQ,EAAA;EAAA;IAAAJ,EAAA,GAAAJ,CAAA;IAAAQ,EAAA,GAAAR,CAAA;EAAA;EALtBJ,SAAA,CAAUQ,EAKV,EAAGI,EAAmB;EAAA;AAAA,CAGxB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalDocumentDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAQvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC;IACD,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAkE/B,CAAA"}
1
+ {"version":3,"file":"useLexicalDocumentDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAQvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,SAC7B,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KACrC;IACD,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,cAAc,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IAChD,kBAAkB,EAAE,MAAM,CAAA;IAC1B,qBAAqB,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;IACvD,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAkE/B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDrawer.tsx"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,cAAc,OAAO;;;CAoEnE,CAAA"}
1
+ {"version":3,"file":"useLexicalDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalDrawer.tsx"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,gBAAgB,OAAO;;;CAoEnE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalListDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalListDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAc5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KACjC;IACD,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,cAAc,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;CAsFpD,CAAA"}
1
+ {"version":3,"file":"useLexicalListDrawer.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useLexicalListDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAc5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,SACzB,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,KACjC;IACD,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,gBAAgB,EAAE,OAAO,CAAA;IACzB,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,cAAc,EAAE,CAAC,SAAS,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;CAsFpD,CAAA"}
@@ -4,5 +4,5 @@ import type { LexicalEditorProps } from '../types/index.js';
4
4
  export declare const getGenerateImportMap: (args: {
5
5
  lexicalEditorArgs?: LexicalEditorProps;
6
6
  resolvedFeatureMap: ResolvedServerFeatureMap;
7
- }) => RichTextAdapter["generateImportMap"];
7
+ }) => RichTextAdapter['generateImportMap'];
8
8
  //# sourceMappingURL=generateImportMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateImportMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateImportMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,eAAO,MAAM,oBAAoB,GAC9B,MAAM;IACL,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;IACtC,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,mBAAmB,CAiDtC,CAAA"}
1
+ {"version":3,"file":"generateImportMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateImportMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,eAAO,MAAM,oBAAoB,SACxB;IACL,iBAAiB,CAAC,EAAE,kBAAkB,CAAA;IACtC,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,mBAAmB,CAiDtC,CAAA"}
@@ -2,5 +2,5 @@ import type { RichTextAdapter } from 'payload';
2
2
  import type { ResolvedServerFeatureMap } from '../features/typesServer.js';
3
3
  export declare const getGenerateSchemaMap: (args: {
4
4
  resolvedFeatureMap: ResolvedServerFeatureMap;
5
- }) => RichTextAdapter["generateSchemaMap"];
5
+ }) => RichTextAdapter['generateSchemaMap'];
6
6
  //# sourceMappingURL=generateSchemaMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAE1E,eAAO,MAAM,oBAAoB,GAC9B,MAAM;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAsC5F,CAAA"}
1
+ {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAE1E,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAsC5F,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import type { SanitizedConfig } from 'payload';
2
2
  import { type SanitizedServerEditorConfig } from '../index.js';
3
- export declare const getDefaultSanitizedEditorConfig: (args: {
3
+ export declare const getDefaultSanitizedEditorConfig: ({ config, parentIsLocalized, }: {
4
4
  config: SanitizedConfig;
5
5
  parentIsLocalized: boolean;
6
- }) => Promise<SanitizedServerEditorConfig>;
6
+ }) => SanitizedServerEditorConfig;
7
7
  //# sourceMappingURL=getDefaultSanitizedEditorConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultSanitizedEditorConfig.d.ts","sourceRoot":"","sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAgB9D,eAAO,MAAM,+BAA+B,GAAU,MAAM;IAC1D,MAAM,EAAE,eAAe,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;CAC3B,KAAG,OAAO,CAAC,2BAA2B,CAoBtC,CAAA"}
1
+ {"version":3,"file":"getDefaultSanitizedEditorConfig.d.ts","sourceRoot":"","sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAQ9D,eAAO,MAAM,+BAA+B,mCAGzC;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;CAC3B,KAAG,2BAGH,CAAA"}
@@ -1,21 +1,10 @@
1
1
  import { defaultEditorConfig } from '../lexical/config/server/default.js';
2
2
  import { sanitizeServerEditorConfig } from '../lexical/config/server/sanitize.js';
3
- let cachedDefaultSanitizedServerEditorConfig = global._payload_lexical_defaultSanitizedServerEditorConfig;
4
- if (!cachedDefaultSanitizedServerEditorConfig) {
5
- cachedDefaultSanitizedServerEditorConfig = global._payload_lexical_defaultSanitizedServerEditorConfig = null;
6
- }
7
- export const getDefaultSanitizedEditorConfig = async args => {
8
- const {
9
- config,
10
- parentIsLocalized
11
- } = args;
12
- if (cachedDefaultSanitizedServerEditorConfig) {
13
- return await cachedDefaultSanitizedServerEditorConfig;
14
- }
15
- cachedDefaultSanitizedServerEditorConfig = sanitizeServerEditorConfig(defaultEditorConfig, config, parentIsLocalized);
16
- global.payload_lexical_defaultSanitizedServerEditorConfig = cachedDefaultSanitizedServerEditorConfig;
17
- cachedDefaultSanitizedServerEditorConfig = await cachedDefaultSanitizedServerEditorConfig;
18
- global.payload_lexical_defaultSanitizedServerEditorConfig = cachedDefaultSanitizedServerEditorConfig;
19
- return cachedDefaultSanitizedServerEditorConfig;
3
+ const lexicalGlobal = globalThis;
4
+ export const getDefaultSanitizedEditorConfig = ({
5
+ config,
6
+ parentIsLocalized
7
+ }) => {
8
+ return lexicalGlobal._payload_lexical_defaultSanitizedServerEditorConfig ??= sanitizeServerEditorConfig(defaultEditorConfig, config, parentIsLocalized);
20
9
  };
21
10
  //# sourceMappingURL=getDefaultSanitizedEditorConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultSanitizedEditorConfig.js","names":["defaultEditorConfig","sanitizeServerEditorConfig","cachedDefaultSanitizedServerEditorConfig","global","_payload_lexical_defaultSanitizedServerEditorConfig","getDefaultSanitizedEditorConfig","args","config","parentIsLocalized","payload_lexical_defaultSanitizedServerEditorConfig"],"sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { type SanitizedServerEditorConfig } from '../index.js'\nimport { defaultEditorConfig } from '../lexical/config/server/default.js'\nimport { sanitizeServerEditorConfig } from '../lexical/config/server/sanitize.js'\n\nlet cachedDefaultSanitizedServerEditorConfig:\n | null\n | Promise<SanitizedServerEditorConfig>\n | SanitizedServerEditorConfig = (global as any)\n ._payload_lexical_defaultSanitizedServerEditorConfig\n\nif (!cachedDefaultSanitizedServerEditorConfig) {\n cachedDefaultSanitizedServerEditorConfig = (\n global as any\n )._payload_lexical_defaultSanitizedServerEditorConfig = null\n}\n\nexport const getDefaultSanitizedEditorConfig = async (args: {\n config: SanitizedConfig\n parentIsLocalized: boolean\n}): Promise<SanitizedServerEditorConfig> => {\n const { config, parentIsLocalized } = args\n\n if (cachedDefaultSanitizedServerEditorConfig) {\n return await cachedDefaultSanitizedServerEditorConfig\n }\n\n cachedDefaultSanitizedServerEditorConfig = sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n parentIsLocalized,\n )\n ;(global as any).payload_lexical_defaultSanitizedServerEditorConfig =\n cachedDefaultSanitizedServerEditorConfig\n\n cachedDefaultSanitizedServerEditorConfig = await cachedDefaultSanitizedServerEditorConfig\n ;(global as any).payload_lexical_defaultSanitizedServerEditorConfig =\n cachedDefaultSanitizedServerEditorConfig\n\n return cachedDefaultSanitizedServerEditorConfig\n}\n"],"mappings":"AAGA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,0BAA0B,QAAQ;AAE3C,IAAIC,wCAAA,GAG8BC,MAAC,CAChCC,mDAAmD;AAEtD,IAAI,CAACF,wCAAA,EAA0C;EAC7CA,wCAAA,GAA2CC,MACzC,CACAC,mDAAmD,GAAG;AAC1D;AAEA,OAAO,MAAMC,+BAAA,GAAkC,MAAOC,IAAA;EAIpD,MAAM;IAAEC,MAAM;IAAEC;EAAiB,CAAE,GAAGF,IAAA;EAEtC,IAAIJ,wCAAA,EAA0C;IAC5C,OAAO,MAAMA,wCAAA;EACf;EAEAA,wCAAA,GAA2CD,0BAAA,CACzCD,mBAAA,EACAO,MAAA,EACAC,iBAAA;EAEAL,MAAA,CAAeM,kDAAkD,GACjEP,wCAAA;EAEFA,wCAAA,GAA2C,MAAMA,wCAAA;EAC/CC,MAAA,CAAeM,kDAAkD,GACjEP,wCAAA;EAEF,OAAOA,wCAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"getDefaultSanitizedEditorConfig.js","names":["defaultEditorConfig","sanitizeServerEditorConfig","lexicalGlobal","globalThis","getDefaultSanitizedEditorConfig","config","parentIsLocalized","_payload_lexical_defaultSanitizedServerEditorConfig"],"sources":["../../src/utilities/getDefaultSanitizedEditorConfig.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { type SanitizedServerEditorConfig } from '../index.js'\nimport { defaultEditorConfig } from '../lexical/config/server/default.js'\nimport { sanitizeServerEditorConfig } from '../lexical/config/server/sanitize.js'\n\nconst lexicalGlobal = globalThis as {\n _payload_lexical_defaultSanitizedServerEditorConfig?: SanitizedServerEditorConfig\n} & typeof globalThis\n\nexport const getDefaultSanitizedEditorConfig = ({\n config,\n parentIsLocalized,\n}: {\n config: SanitizedConfig\n parentIsLocalized: boolean\n}): SanitizedServerEditorConfig => {\n return (lexicalGlobal._payload_lexical_defaultSanitizedServerEditorConfig ??=\n sanitizeServerEditorConfig(defaultEditorConfig, config, parentIsLocalized))\n}\n"],"mappings":"AAGA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,0BAA0B,QAAQ;AAE3C,MAAMC,aAAA,GAAgBC,UAAA;AAItB,OAAO,MAAMC,+BAAA,GAAkCA,CAAC;EAC9CC,MAAM;EACNC;AAAiB,CAIlB;EACC,OAAQJ,aAAA,CAAcK,mDAAmD,KACvEN,0BAAA,CAA2BD,mBAAA,EAAqBK,MAAA,EAAQC,iBAAA;AAC5D","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../../src/utilities/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,GAAI,uCAI7B;IACD,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACrC,CAAA;IACD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,KAAG,IA+BH,CAAA"}
1
+ {"version":3,"file":"recurseNodeTree.d.ts","sourceRoot":"","sources":["../../src/utilities/recurseNodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAGpD,eAAO,MAAM,eAAe,0CAIzB;IACD,cAAc,CAAC,EAAE,qBAAqB,EAAE,CAAA;IACxC,SAAS,CAAC,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAA;KACrC,CAAA;IACD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,KAAG,IA+BH,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAS7D,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,gCAAgC,GAAI,mCAK9C,wBAAwB,KAAG,MAgG7B,CAAA"}
1
+ {"version":3,"file":"upgradeDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,OAAO,EAAE,MAAM,SAAS,CAAA;AAS7D,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAE7B,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,gCAAgC,sCAK1C,wBAAwB,KAAG,MAgG7B,CAAA"}
@@ -37,7 +37,7 @@ export const upgradeDocumentFieldsRecursively = ({
37
37
  if (field.type === 'blocks') {
38
38
  data[field.name].forEach(row => {
39
39
  const blockTypeToMatch = row?.blockType;
40
- const block = payload.blocks[blockTypeToMatch] ?? (field.blockReferences ?? field.blocks).find(block => typeof block !== 'string' && block.slug === blockTypeToMatch);
40
+ const block = payload.blocks[blockTypeToMatch] ?? field.blocks.find(block => typeof block !== 'string' && block.slug === blockTypeToMatch);
41
41
  if (block) {
42
42
  found += upgradeDocumentFieldsRecursively({
43
43
  data: row,
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeDocumentFieldsRecursively.js","names":["createHeadlessEditor","fieldAffectsData","fieldHasSubFields","fieldIsArrayType","tabHasName","getEnabledNodes","upgradeDocumentFieldsRecursively","data","fields","found","payload","field","name","type","tabs","forEach","tab","Array","isArray","row","blockTypeToMatch","blockType","block","blocks","blockReferences","find","slug","editor","features","length","editorState","headlessEditor","nodes","editorConfig","update","setEditorState","parseEditorState","discrete","getEditorState","toJSON"],"sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { Field, FlattenedBlock, Payload } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } from 'payload/shared'\n\nimport type { LexicalRichTextAdapter } from '../../types/index.js'\n\nimport { getEnabledNodes } from '../../lexical/nodes/index.js'\n\ntype NestedRichTextFieldsArgs = {\n data: Record<string, unknown>\n\n fields: Field[]\n found: number\n payload: Payload\n}\n\nexport const upgradeDocumentFieldsRecursively = ({\n data,\n fields,\n found,\n payload,\n}: NestedRichTextFieldsArgs): number => {\n for (const field of fields) {\n if (fieldHasSubFields(field) && !fieldIsArrayType(field)) {\n if (fieldAffectsData(field) && typeof data[field.name] === 'object') {\n found += upgradeDocumentFieldsRecursively({\n data: data[field.name] as Record<string, unknown>,\n fields: field.fields,\n found,\n payload,\n })\n } else {\n found += upgradeDocumentFieldsRecursively({\n data,\n fields: field.fields,\n found,\n payload,\n })\n }\n } else if (field.type === 'tabs') {\n field.tabs.forEach((tab) => {\n found += upgradeDocumentFieldsRecursively({\n data: (tabHasName(tab) ? data[tab.name] : data) as Record<string, unknown>,\n fields: tab.fields,\n found,\n payload,\n })\n })\n } else if (Array.isArray(data[field.name])) {\n if (field.type === 'blocks') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n const blockTypeToMatch: string = row?.blockType as string\n\n const block =\n payload.blocks[blockTypeToMatch] ??\n ((field.blockReferences ?? field.blocks).find(\n (block) => typeof block !== 'string' && block.slug === blockTypeToMatch,\n ) as FlattenedBlock | undefined)\n\n if (block) {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: block.fields,\n found,\n payload,\n })\n }\n })\n }\n\n if (field.type === 'array') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: field.fields,\n found,\n payload,\n })\n })\n }\n }\n\n if (\n field.type === 'richText' &&\n data[field.name] &&\n !Array.isArray(data[field.name]) &&\n 'root' in (data[field.name] as Record<string, unknown>)\n ) {\n // Lexical richText\n const editor: LexicalRichTextAdapter = field.editor as LexicalRichTextAdapter\n if (editor && typeof editor === 'object') {\n if ('features' in editor && editor.features?.length) {\n // Load lexical editor into lexical, then save it immediately\n const editorState = data[field.name] as SerializedEditorState\n\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig: editor.editorConfig,\n }),\n })\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(editorState))\n },\n { discrete: true },\n )\n\n // get editor state\n data[field.name] = headlessEditor.getEditorState().toJSON()\n\n found++\n }\n }\n }\n }\n\n return found\n}\n"],"mappings":"AAGA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ;AAIlF,SAASC,eAAe,QAAQ;AAUhC,OAAO,MAAMC,gCAAA,GAAmCA,CAAC;EAC/CC,IAAI;EACJC,MAAM;EACNC,KAAK;EACLC;AAAO,CACkB;EACzB,KAAK,MAAMC,KAAA,IAASH,MAAA,EAAQ;IAC1B,IAAIN,iBAAA,CAAkBS,KAAA,KAAU,CAACR,gBAAA,CAAiBQ,KAAA,GAAQ;MACxD,IAAIV,gBAAA,CAAiBU,KAAA,KAAU,OAAOJ,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,KAAK,UAAU;QACnEH,KAAA,IAASH,gCAAA,CAAiC;UACxCC,IAAA,EAAMA,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC;UACtBJ,MAAA,EAAQG,KAAA,CAAMH,MAAM;UACpBC,KAAA;UACAC;QACF;MACF,OAAO;QACLD,KAAA,IAASH,gCAAA,CAAiC;UACxCC,IAAA;UACAC,MAAA,EAAQG,KAAA,CAAMH,MAAM;UACpBC,KAAA;UACAC;QACF;MACF;IACF,OAAO,IAAIC,KAAA,CAAME,IAAI,KAAK,QAAQ;MAChCF,KAAA,CAAMG,IAAI,CAACC,OAAO,CAAEC,GAAA;QAClBP,KAAA,IAASH,gCAAA,CAAiC;UACxCC,IAAA,EAAOH,UAAA,CAAWY,GAAA,IAAOT,IAAI,CAACS,GAAA,CAAIJ,IAAI,CAAC,GAAGL,IAAA;UAC1CC,MAAA,EAAQQ,GAAA,CAAIR,MAAM;UAClBC,KAAA;UACAC;QACF;MACF;IACF,OAAO,IAAIO,KAAA,CAAMC,OAAO,CAACX,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,GAAG;MAC1C,IAAID,KAAA,CAAME,IAAI,KAAK,UAAU;QACzBN,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,CAA+BG,OAAO,CAAEI,GAAA;UACxD,MAAMC,gBAAA,GAA2BD,GAAA,EAAKE,SAAA;UAEtC,MAAMC,KAAA,GACJZ,OAAA,CAAQa,MAAM,CAACH,gBAAA,CAAiB,IAC/B,CAACT,KAAA,CAAMa,eAAe,IAAIb,KAAA,CAAMY,MAAM,EAAEE,IAAI,CAC1CH,KAAA,IAAU,OAAOA,KAAA,KAAU,YAAYA,KAAA,CAAMI,IAAI,KAAKN,gBAAA;UAG3D,IAAIE,KAAA,EAAO;YACTb,KAAA,IAASH,gCAAA,CAAiC;cACxCC,IAAA,EAAMY,GAAA;cACNX,MAAA,EAAQc,KAAA,CAAMd,MAAM;cACpBC,KAAA;cACAC;YACF;UACF;QACF;MACF;MAEA,IAAIC,KAAA,CAAME,IAAI,KAAK,SAAS;QACxBN,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,CAA+BG,OAAO,CAAEI,GAAA;UACxDV,KAAA,IAASH,gCAAA,CAAiC;YACxCC,IAAA,EAAMY,GAAA;YACNX,MAAA,EAAQG,KAAA,CAAMH,MAAM;YACpBC,KAAA;YACAC;UACF;QACF;MACF;IACF;IAEA,IACEC,KAAA,CAAME,IAAI,KAAK,cACfN,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,IAChB,CAACK,KAAA,CAAMC,OAAO,CAACX,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,KAC/B,UAAWL,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,EAC3B;MACA;MACA,MAAMe,MAAA,GAAiChB,KAAA,CAAMgB,MAAM;MACnD,IAAIA,MAAA,IAAU,OAAOA,MAAA,KAAW,UAAU;QACxC,IAAI,cAAcA,MAAA,IAAUA,MAAA,CAAOC,QAAQ,EAAEC,MAAA,EAAQ;UACnD;UACA,MAAMC,WAAA,GAAcvB,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC;UAEpC,MAAMmB,cAAA,GAAiB/B,oBAAA,CAAqB;YAC1CgC,KAAA,EAAO3B,eAAA,CAAgB;cACrB4B,YAAA,EAAcN,MAAA,CAAOM;YACvB;UACF;UACAF,cAAA,CAAeG,MAAM,CACnB;YACEH,cAAA,CAAeI,cAAc,CAACJ,cAAA,CAAeK,gBAAgB,CAACN,WAAA;UAChE,GACA;YAAEO,QAAA,EAAU;UAAK;UAGnB;UACA9B,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,GAAGmB,cAAA,CAAeO,cAAc,GAAGC,MAAM;UAEzD9B,KAAA;QACF;MACF;IACF;EACF;EAEA,OAAOA,KAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"upgradeDocumentFieldsRecursively.js","names":["createHeadlessEditor","fieldAffectsData","fieldHasSubFields","fieldIsArrayType","tabHasName","getEnabledNodes","upgradeDocumentFieldsRecursively","data","fields","found","payload","field","name","type","tabs","forEach","tab","Array","isArray","row","blockTypeToMatch","blockType","block","blocks","find","slug","editor","features","length","editorState","headlessEditor","nodes","editorConfig","update","setEditorState","parseEditorState","discrete","getEditorState","toJSON"],"sources":["../../../src/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { Field, FlattenedBlock, Payload } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } from 'payload/shared'\n\nimport type { LexicalRichTextAdapter } from '../../types/index.js'\n\nimport { getEnabledNodes } from '../../lexical/nodes/index.js'\n\ntype NestedRichTextFieldsArgs = {\n data: Record<string, unknown>\n\n fields: Field[]\n found: number\n payload: Payload\n}\n\nexport const upgradeDocumentFieldsRecursively = ({\n data,\n fields,\n found,\n payload,\n}: NestedRichTextFieldsArgs): number => {\n for (const field of fields) {\n if (fieldHasSubFields(field) && !fieldIsArrayType(field)) {\n if (fieldAffectsData(field) && typeof data[field.name] === 'object') {\n found += upgradeDocumentFieldsRecursively({\n data: data[field.name] as Record<string, unknown>,\n fields: field.fields,\n found,\n payload,\n })\n } else {\n found += upgradeDocumentFieldsRecursively({\n data,\n fields: field.fields,\n found,\n payload,\n })\n }\n } else if (field.type === 'tabs') {\n field.tabs.forEach((tab) => {\n found += upgradeDocumentFieldsRecursively({\n data: (tabHasName(tab) ? data[tab.name] : data) as Record<string, unknown>,\n fields: tab.fields,\n found,\n payload,\n })\n })\n } else if (Array.isArray(data[field.name])) {\n if (field.type === 'blocks') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n const blockTypeToMatch: string = row?.blockType as string\n\n const block =\n payload.blocks[blockTypeToMatch] ??\n (field.blocks.find(\n (block) => typeof block !== 'string' && block.slug === blockTypeToMatch,\n ) as FlattenedBlock | undefined)\n\n if (block) {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: block.fields,\n found,\n payload,\n })\n }\n })\n }\n\n if (field.type === 'array') {\n ;(data[field.name] as Record<string, unknown>[]).forEach((row) => {\n found += upgradeDocumentFieldsRecursively({\n data: row,\n fields: field.fields,\n found,\n payload,\n })\n })\n }\n }\n\n if (\n field.type === 'richText' &&\n data[field.name] &&\n !Array.isArray(data[field.name]) &&\n 'root' in (data[field.name] as Record<string, unknown>)\n ) {\n // Lexical richText\n const editor: LexicalRichTextAdapter = field.editor as LexicalRichTextAdapter\n if (editor && typeof editor === 'object') {\n if ('features' in editor && editor.features?.length) {\n // Load lexical editor into lexical, then save it immediately\n const editorState = data[field.name] as SerializedEditorState\n\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig: editor.editorConfig,\n }),\n })\n headlessEditor.update(\n () => {\n headlessEditor.setEditorState(headlessEditor.parseEditorState(editorState))\n },\n { discrete: true },\n )\n\n // get editor state\n data[field.name] = headlessEditor.getEditorState().toJSON()\n\n found++\n }\n }\n }\n }\n\n return found\n}\n"],"mappings":"AAGA,SAASA,oBAAoB,QAAQ;AACrC,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ;AAIlF,SAASC,eAAe,QAAQ;AAUhC,OAAO,MAAMC,gCAAA,GAAmCA,CAAC;EAC/CC,IAAI;EACJC,MAAM;EACNC,KAAK;EACLC;AAAO,CACkB;EACzB,KAAK,MAAMC,KAAA,IAASH,MAAA,EAAQ;IAC1B,IAAIN,iBAAA,CAAkBS,KAAA,KAAU,CAACR,gBAAA,CAAiBQ,KAAA,GAAQ;MACxD,IAAIV,gBAAA,CAAiBU,KAAA,KAAU,OAAOJ,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,KAAK,UAAU;QACnEH,KAAA,IAASH,gCAAA,CAAiC;UACxCC,IAAA,EAAMA,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC;UACtBJ,MAAA,EAAQG,KAAA,CAAMH,MAAM;UACpBC,KAAA;UACAC;QACF;MACF,OAAO;QACLD,KAAA,IAASH,gCAAA,CAAiC;UACxCC,IAAA;UACAC,MAAA,EAAQG,KAAA,CAAMH,MAAM;UACpBC,KAAA;UACAC;QACF;MACF;IACF,OAAO,IAAIC,KAAA,CAAME,IAAI,KAAK,QAAQ;MAChCF,KAAA,CAAMG,IAAI,CAACC,OAAO,CAAEC,GAAA;QAClBP,KAAA,IAASH,gCAAA,CAAiC;UACxCC,IAAA,EAAOH,UAAA,CAAWY,GAAA,IAAOT,IAAI,CAACS,GAAA,CAAIJ,IAAI,CAAC,GAAGL,IAAA;UAC1CC,MAAA,EAAQQ,GAAA,CAAIR,MAAM;UAClBC,KAAA;UACAC;QACF;MACF;IACF,OAAO,IAAIO,KAAA,CAAMC,OAAO,CAACX,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,GAAG;MAC1C,IAAID,KAAA,CAAME,IAAI,KAAK,UAAU;QACzBN,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,CAA+BG,OAAO,CAAEI,GAAA;UACxD,MAAMC,gBAAA,GAA2BD,GAAA,EAAKE,SAAA;UAEtC,MAAMC,KAAA,GACJZ,OAAA,CAAQa,MAAM,CAACH,gBAAA,CAAiB,IAC/BT,KAAA,CAAMY,MAAM,CAACC,IAAI,CACfF,KAAA,IAAU,OAAOA,KAAA,KAAU,YAAYA,KAAA,CAAMG,IAAI,KAAKL,gBAAA;UAG3D,IAAIE,KAAA,EAAO;YACTb,KAAA,IAASH,gCAAA,CAAiC;cACxCC,IAAA,EAAMY,GAAA;cACNX,MAAA,EAAQc,KAAA,CAAMd,MAAM;cACpBC,KAAA;cACAC;YACF;UACF;QACF;MACF;MAEA,IAAIC,KAAA,CAAME,IAAI,KAAK,SAAS;QACxBN,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,CAA+BG,OAAO,CAAEI,GAAA;UACxDV,KAAA,IAASH,gCAAA,CAAiC;YACxCC,IAAA,EAAMY,GAAA;YACNX,MAAA,EAAQG,KAAA,CAAMH,MAAM;YACpBC,KAAA;YACAC;UACF;QACF;MACF;IACF;IAEA,IACEC,KAAA,CAAME,IAAI,KAAK,cACfN,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,IAChB,CAACK,KAAA,CAAMC,OAAO,CAACX,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,KAC/B,UAAWL,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,EAC3B;MACA;MACA,MAAMc,MAAA,GAAiCf,KAAA,CAAMe,MAAM;MACnD,IAAIA,MAAA,IAAU,OAAOA,MAAA,KAAW,UAAU;QACxC,IAAI,cAAcA,MAAA,IAAUA,MAAA,CAAOC,QAAQ,EAAEC,MAAA,EAAQ;UACnD;UACA,MAAMC,WAAA,GAActB,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC;UAEpC,MAAMkB,cAAA,GAAiB9B,oBAAA,CAAqB;YAC1C+B,KAAA,EAAO1B,eAAA,CAAgB;cACrB2B,YAAA,EAAcN,MAAA,CAAOM;YACvB;UACF;UACAF,cAAA,CAAeG,MAAM,CACnB;YACEH,cAAA,CAAeI,cAAc,CAACJ,cAAA,CAAeK,gBAAgB,CAACN,WAAA;UAChE,GACA;YAAEO,QAAA,EAAU;UAAK;UAGnB;UACA7B,IAAI,CAACI,KAAA,CAAMC,IAAI,CAAC,GAAGkB,cAAA,CAAeO,cAAc,GAAGC,MAAM;UAEzD7B,KAAA;QACF;MACF;IACF;EACF;EAEA,OAAOA,KAAA;AACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,EAClD,YAAY,MAAM,EAClB,SAAS,qBAAqB,CAAC,kBAAkB,CAAC,SAenD,CAAA"}
1
+ {"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,cACtC,MAAM,WACT,qBAAqB,CAAC,kBAAkB,CAAC,SAenD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,GAAI,mBAEjC;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAiCA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEtD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAK7E,eAAO,MAAM,mBAAmB,sBAE7B;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,8GAiCA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "4.0.0-internal.1f9ae9a",
3
+ "version": "4.0.0-internal.21320b5",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -18,7 +18,6 @@
18
18
  }
19
19
  ],
20
20
  "sideEffects": [
21
- "*.scss",
22
21
  "*.css"
23
22
  ],
24
23
  "type": "module",
@@ -59,8 +58,8 @@
59
58
  "default": "./dist/exports/plaintext/index.js"
60
59
  },
61
60
  "./rsc": {
62
- "import": "./dist/exports/server/rsc.js",
63
61
  "types": "./dist/exports/server/rsc.d.ts",
62
+ "import": "./dist/exports/server/rsc.js",
64
63
  "default": "./dist/exports/server/rsc.js"
65
64
  },
66
65
  "./lexical": {
@@ -113,6 +112,11 @@
113
112
  "types": "./dist/lexical-proxy/@lexical-utils.d.ts",
114
113
  "default": "./dist/lexical-proxy/@lexical-utils.js"
115
114
  },
115
+ "./lexical/react/ExtensionComponent": {
116
+ "import": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js",
117
+ "types": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts",
118
+ "default": "./dist/lexical-proxy/@lexical-react/ExtensionComponent.js"
119
+ },
116
120
  "./lexical/react/LexicalAutoEmbedPlugin": {
117
121
  "import": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js",
118
122
  "types": "./dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts",
@@ -178,10 +182,15 @@
178
182
  "types": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts",
179
183
  "default": "./dist/lexical-proxy/@lexical-react/LexicalContentEditable.js"
180
184
  },
181
- "./lexical/react/LexicalContextMenuPlugin": {
182
- "import": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js",
183
- "types": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts",
184
- "default": "./dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js"
185
+ "./lexical/react/LexicalExtensionComposer": {
186
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js",
187
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts",
188
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js"
189
+ },
190
+ "./lexical/react/LexicalExtensionEditorComposer": {
191
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js",
192
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts",
193
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js"
185
194
  },
186
195
  "./lexical/react/LexicalNodeContextMenuPlugin": {
187
196
  "import": "./dist/lexical-proxy/@lexical-react/LexicalNodeContextMenuPlugin.js",
@@ -273,6 +282,11 @@
273
282
  "types": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts",
274
283
  "default": "./dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js"
275
284
  },
285
+ "./lexical/react/LexicalSelectionAlwaysOnDisplay": {
286
+ "import": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js",
287
+ "types": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts",
288
+ "default": "./dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js"
289
+ },
276
290
  "./lexical/react/LexicalTabIndentationPlugin": {
277
291
  "import": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js",
278
292
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts",
@@ -298,11 +312,56 @@
298
312
  "types": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts",
299
313
  "default": "./dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js"
300
314
  },
315
+ "./lexical/react/ReactExtension": {
316
+ "import": "./dist/lexical-proxy/@lexical-react/ReactExtension.js",
317
+ "types": "./dist/lexical-proxy/@lexical-react/ReactExtension.d.ts",
318
+ "default": "./dist/lexical-proxy/@lexical-react/ReactExtension.js"
319
+ },
320
+ "./lexical/react/ReactPluginHostExtension": {
321
+ "import": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js",
322
+ "types": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts",
323
+ "default": "./dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js"
324
+ },
325
+ "./lexical/react/ReactProviderExtension": {
326
+ "import": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js",
327
+ "types": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts",
328
+ "default": "./dist/lexical-proxy/@lexical-react/ReactProviderExtension.js"
329
+ },
330
+ "./lexical/react/TreeViewExtension": {
331
+ "import": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js",
332
+ "types": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts",
333
+ "default": "./dist/lexical-proxy/@lexical-react/TreeViewExtension.js"
334
+ },
335
+ "./lexical/react/useExtensionComponent": {
336
+ "import": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js",
337
+ "types": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts",
338
+ "default": "./dist/lexical-proxy/@lexical-react/useExtensionComponent.js"
339
+ },
340
+ "./lexical/react/useExtensionSignalValue": {
341
+ "import": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js",
342
+ "types": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts",
343
+ "default": "./dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js"
344
+ },
345
+ "./lexical/react/useLexicalAriaLiveRegion": {
346
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js",
347
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts",
348
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js"
349
+ },
301
350
  "./lexical/react/useLexicalEditable": {
302
351
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js",
303
352
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts",
304
353
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalEditable.js"
305
354
  },
355
+ "./lexical/react/useLexicalFocusManagerRef": {
356
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js",
357
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts",
358
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js"
359
+ },
360
+ "./lexical/react/useLexicalFocusTrapRef": {
361
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js",
362
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts",
363
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js"
364
+ },
306
365
  "./lexical/react/useLexicalIsTextContentEmpty": {
307
366
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js",
308
367
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts",
@@ -313,6 +372,16 @@
313
372
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts",
314
373
  "default": "./dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js"
315
374
  },
375
+ "./lexical/react/useLexicalRovingTabIndexRef": {
376
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js",
377
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts",
378
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js"
379
+ },
380
+ "./lexical/react/useLexicalSlotRef": {
381
+ "import": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js",
382
+ "types": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts",
383
+ "default": "./dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js"
384
+ },
316
385
  "./lexical/react/useLexicalSubscription": {
317
386
  "import": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.js",
318
387
  "types": "./dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts",
@@ -348,24 +417,25 @@
348
417
  ]
349
418
  },
350
419
  "dependencies": {
351
- "@lexical/clipboard": "0.41.0",
352
- "@lexical/headless": "0.41.0",
353
- "@lexical/html": "0.41.0",
354
- "@lexical/link": "0.41.0",
355
- "@lexical/list": "0.41.0",
356
- "@lexical/mark": "0.41.0",
357
- "@lexical/react": "0.41.0",
358
- "@lexical/rich-text": "0.41.0",
359
- "@lexical/selection": "0.41.0",
360
- "@lexical/table": "0.41.0",
361
- "@lexical/utils": "0.41.0",
420
+ "@lexical/clipboard": "0.48.0",
421
+ "@lexical/headless": "0.48.0",
422
+ "@lexical/html": "0.48.0",
423
+ "@lexical/link": "0.48.0",
424
+ "@lexical/list": "0.48.0",
425
+ "@lexical/mark": "0.48.0",
426
+ "@lexical/markdown": "0.48.0",
427
+ "@lexical/react": "0.48.0",
428
+ "@lexical/rich-text": "0.48.0",
429
+ "@lexical/selection": "0.48.0",
430
+ "@lexical/table": "0.48.0",
431
+ "@lexical/utils": "0.48.0",
362
432
  "acorn": "8.16.0",
363
433
  "bson-objectid": "2.0.4",
364
434
  "csstype": "3.2.3",
365
435
  "dequal": "2.0.3",
366
436
  "escape-html": "1.0.3",
367
437
  "jsox": "1.2.125",
368
- "lexical": "0.41.0",
438
+ "lexical": "0.48.0",
369
439
  "mdast-util-from-markdown": "2.0.3",
370
440
  "mdast-util-mdx-jsx": "3.2.0",
371
441
  "micromark-extension-mdx-jsx": "3.0.2",
@@ -373,8 +443,8 @@
373
443
  "react-error-boundary": "6.1.1",
374
444
  "ts-essentials": "10.0.3",
375
445
  "uuid": "14.0.0",
376
- "@payloadcms/translations": "4.0.0-internal.1f9ae9a",
377
- "@payloadcms/ui": "4.0.0-internal.1f9ae9a"
446
+ "@payloadcms/ui": "4.0.0-internal.21320b5",
447
+ "@payloadcms/translations": "4.0.0-internal.21320b5"
378
448
  },
379
449
  "devDependencies": {
380
450
  "@babel/cli": "7.27.2",
@@ -382,7 +452,7 @@
382
452
  "@babel/preset-env": "7.27.2",
383
453
  "@babel/preset-react": "7.27.1",
384
454
  "@babel/preset-typescript": "7.27.1",
385
- "@lexical/eslint-plugin": "0.41.0",
455
+ "@lexical/eslint-plugin": "0.48.0",
386
456
  "@types/escape-html": "1.0.4",
387
457
  "@types/json-schema": "7.0.15",
388
458
  "@types/node": "24.12.3",
@@ -393,16 +463,15 @@
393
463
  "esbuild": "0.27.1",
394
464
  "esbuild-sass-plugin": "3.3.1",
395
465
  "swc-plugin-transform-remove-imports": "8.3.0",
396
- "@payloadcms/eslint-config": "3.28.0",
397
- "payload": "4.0.0-internal.1f9ae9a"
466
+ "payload": "4.0.0-internal.21320b5",
467
+ "@payloadcms/eslint-config": "3.28.0"
398
468
  },
399
469
  "peerDependencies": {
400
- "@faceless-ui/modal": "3.0.0",
470
+ "@faceless-ui/modal": "3.0.1",
401
471
  "@faceless-ui/scroll-info": "2.0.0",
402
472
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
403
473
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
404
- "@payloadcms/next": "4.0.0-internal.1f9ae9a",
405
- "payload": "4.0.0-internal.1f9ae9a"
474
+ "payload": "4.0.0-internal.21320b5"
406
475
  },
407
476
  "engines": {
408
477
  "node": ">=24.15.0"
@@ -1,2 +0,0 @@
1
- "use client";import{a as Be,e as Oe,g as $,h as K,j as Ie,k as Fe,l as $e,m as Ke,n as Se,o as Pe,p as je}from"./chunk-LH634DPU.js";import{a as Ae,b as P}from"./chunk-RJ5MAOKZ.js";import{jsx as L,jsxs as le}from"react/jsx-runtime";import{BulkUploadProvider as Zr,FieldDescription as en,FieldError as tn,FieldLabel as on,isFieldRTL as rn,RenderCustomComponent as At,useConfig as nn,useEditDepth as sn,useEffectEvent as ln,useField as an,useLocale as cn}from"@payloadcms/ui";import{mergeFieldStyles as un}from"@payloadcms/ui/shared";import{dequal as dn}from"dequal/lite";import Bt,{useCallback as Ot,useEffect as It,useMemo as fn,useState as Ft}from"react";import{ErrorBoundary as mn}from"react-error-boundary";import"./bundled.css";import{jsx as j}from"react/jsx-runtime";import{LexicalComposer as Vr}from"@lexical/react/LexicalComposer.js";import{useEditDepth as Wr}from"@payloadcms/ui";import*as _t from"react";import{useMemo as Yr}from"react";import{c as vr}from"react/compiler-runtime";import{jsx as C,jsxs as ie}from"react/jsx-runtime";import{useLexicalComposerContext as _r}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as kr}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as Lr}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Dr}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Mr}from"@lexical/react/LexicalRichTextPlugin.js";import{useLexicalEditable as Ar}from"@lexical/react/useLexicalEditable";import{BLUR_COMMAND as Br,COMMAND_PRIORITY_LOW as Rt,FOCUS_COMMAND as Or}from"lexical";import*as Q from"react";import{useEffect as Ir,useState as Fr}from"react";import{jsx as ze}from"react/jsx-runtime";import"react";var z=({anchorElem:e,clientProps:t,plugin:o})=>o.position==="floatingAnchorElem"&&e?o.Component&&ze(o.Component,{anchorElem:e,clientProps:t}):o.Component&&ze(o.Component,{clientProps:t});import{c as zt}from"react/compiler-runtime";import{copyToClipboard as He}from"@lexical/clipboard";import{useLexicalComposerContext as Ht}from"@lexical/react/LexicalComposerContext.js";import{objectKlassEquals as Vt}from"@lexical/utils";import Ve from"bson-objectid";import{$getSelection as Wt,$isNodeSelection as Yt,COMMAND_PRIORITY_LOW as Gt,COPY_COMMAND as Ut}from"lexical";import{useEffect as Jt}from"react";var Te=e=>{if("fields"in e&&typeof e.fields=="object"&&e.fields!==null&&"id"in e.fields?e.fields.id=new Ve.default().toHexString():"id"in e&&(e.id=new Ve.default().toHexString()),e.children)for(let t of e.children)Te(t)};function We(){let e=zt(3),[t]=Ht(),o,r;return e[0]!==t?(o=()=>t.registerCommand(Ut,n=>{let c=Wt();if(Yt(c)){let s=c.getNodes()[0]?.exportJSON(),u=JSON.parse(JSON.stringify(s));Te(u);let d={namespace:t._config.namespace,nodes:[u]},m=JSON.stringify(d);return He(t,null,{"application/x-lexical-editor":m,"text/plain":""}).catch(qt),!0}return He(t,Vt(n,ClipboardEvent)?n:null).then(()=>{if(!(n instanceof ClipboardEvent)||!n.clipboardData)throw new Error("No clipboard event");let l=n.clipboardData.getData("application/x-lexical-editor");if(!l)return!0;let s=JSON.parse(l);for(let d of s.nodes)Te(d);let u=JSON.stringify(s);n.clipboardData.setData("application/x-lexical-editor",u)}).catch(l=>{throw n instanceof ClipboardEvent&&n.clipboardData?.setData("application/x-lexical-editor",""),l}),!0},Gt),r=[t],e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]),Jt(o,r),null}function qt(e){throw e}import{c as Qt}from"react/compiler-runtime";import{useLexicalComposerContext as Xt}from"@lexical/react/LexicalComposerContext";import{$findMatchingParent as fe,mergeRegister as Zt}from"@lexical/utils";import{$createNodeSelection as eo,$getEditor as te,$getNearestNodeFromDOMNode as to,$getSelection as me,$isDecoratorNode as H,$isElementNode as Re,$isLineBreakNode as oo,$isNodeSelection as pe,$isRangeSelection as Ye,$isRootOrShadowRoot as ro,$isTextNode as no,$setSelection as Ge,CLICK_COMMAND as io,COMMAND_PRIORITY_LOW as Y,KEY_ARROW_DOWN_COMMAND as so,KEY_ARROW_UP_COMMAND as lo,KEY_BACKSPACE_COMMAND as ao,KEY_DELETE_COMMAND as co,SELECTION_CHANGE_COMMAND as uo}from"lexical";import{useEffect as fo}from"react";function Ue(){let e=Qt(3),[t]=Xt(),o=Eo,r,n;return e[0]!==t?(r=()=>Zt(t.registerCommand(io,xo,Y),t.registerCommand(co,o,Y),t.registerCommand(ao,o,Y),t.registerCommand(uo,yo,Y),t.registerCommand(lo,go,Y),t.registerCommand(so,mo,Y)),n=[t],e[0]=t,e[1]=r,e[2]=n):(r=e[1],n=e[2]),fo(r,n),null}function mo(e){let t=me();if(pe(t)){e.preventDefault();let l=t.getNodes()[0]?.getNextSibling();if(H(l)){let d=te().getElementByKey(l.getKey());return d&&oe({element:d,node:l}),!0}if(!Re(l))return!0;let s=l.getFirstDescendant()??l;return s&&(fe(s,ge)?.selectEnd(),e.preventDefault()),!0}if(!Ye(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=fe(r,po),c=n?.getNextSibling();if(!n||c!==Je(n))return!1;if(H(c)){let l=te().getElementByKey(c.getKey());if(l)return oe({element:l,node:c}),e.preventDefault(),!0}return!1}function po(e){return Je(e)!==null}function go(e){let t=me();if(pe(t)){let l=t.getNodes()[0]?.getPreviousSibling();if(H(l)){let d=te().getElementByKey(l.getKey());return d?(oe({element:d,node:l}),e.preventDefault(),!0):!1}if(!Re(l))return!1;let s=l.getLastDescendant()??l;return s?(fe(s,ge)?.selectStart(),e.preventDefault(),!0):!1}if(!Ye(t))return!1;let r=(t.isBackward()?t.anchor:t.focus).getNode(),n=fe(r,ho),c=n?.getPreviousSibling();if(!n||c!==qe(n))return!1;if(H(c)){let l=te().getElementByKey(c.getKey());if(l)return oe({element:l,node:c}),e.preventDefault(),!0}return!1}function ho(e){return qe(e)!==null}function yo(){let e=No();return document.querySelector(".decorator-selected")?.classList.remove("decorator-selected"),e?(e.element?.classList.add("decorator-selected"),!0):!1}function xo(e){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let t=bo(e);if(!t)return!0;let{target:o}=e;return!(o instanceof HTMLElement)||o.isContentEditable||o.closest('button, textarea, input, .react-select, .code-editor, .no-select-decorator, [role="button"]')?Ge(null):oe(t),!0}function Eo(e){let t=me();return pe(t)?(e.preventDefault(),t.getNodes().forEach(Co),!0):!1}function Co(e){e.remove()}function bo(e){if(!(e.target instanceof HTMLElement))return;let t=e.target.closest('[data-lexical-decorator="true"]');if(!(t instanceof HTMLElement))return;let o=to(t);return H(o)?{element:t,node:o}:void 0}function No(){let e=me();if(!pe(e))return;let t=e.getNodes();if(t.length!==1)return;let o=t[0];return H(o)?{decorator:o,element:te().getElementByKey(o.getKey())}:void 0}function oe({element:e,node:t}){document.querySelector(".decorator-selected")?.classList.remove("decorator-selected");let o=eo();o.add(t.getKey()),Ge(o),e.scrollIntoView({behavior:"smooth",block:"nearest"}),e.classList.add("decorator-selected")}function ge(e){if(H(e)&&!e.isInline())return!0;if(!Re(e)||ro(e))return!1;let t=e.getFirstChild(),o=t===null||oo(t)||no(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&o}function Je(e){let t=e.getNextSibling();for(;t!==null;){if(ge(t))return t;t=t.getNextSibling()}return null}function qe(e){let t=e.getPreviousSibling();for(;t!==null;){if(ge(t))return t;t=t.getPreviousSibling()}return null}import{jsx as ve}from"react/jsx-runtime";import{useLexicalComposerContext as vo}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as _o,isHTMLElement as ko}from"lexical";import*as et from"react";import{useCallback as Lo,useEffect as Ze,useRef as Do,useState as Mo}from"react";import{createPortal as Ao}from"react-dom";var G=(e,t,o,r,n=50,c=25)=>{let l=0;if(e&&!e.contains(r)){let{bottom:s,left:u,right:d,top:m}=e.getBoundingClientRect(),a=m+window.scrollY,i=s+window.scrollY;if(o<a-c||o>i+c||t<u-n||t>d+n)return-1;(t<u||t>d)&&(l=t<u?t-u:t-d)}return l};import{$getNodeByKey as ye}from"lexical";function U(e){let t=e.getBoundingClientRect(),o=getComputedStyle(e).getPropertyValue("transform");if(!o||o==="none")return t;let r=o.split(",").pop();return t.y=t.y-Number(r?.replace(")","")),t}function he(e){let t=(u,d)=>u?parseFloat(window.getComputedStyle(u)[d]):0,{marginBottom:o,marginTop:r}=window.getComputedStyle(e),n=t(e.previousElementSibling,"marginBottom"),c=t(e.nextElementSibling,"marginTop"),l=Math.max(parseFloat(r),n);return{marginBottom:Math.max(parseFloat(o),c),marginTop:l}}import{$getRoot as wo}from"lexical";function V(e){return e.getEditorState().read(()=>wo().getChildrenKeys())}var So=1,Po=-1,Qe=0,B={props:null,result:null};function To(e,t,o=20){let r=e.x-t.x,n=e.y-t.y;return r*r+n*n<=o*o}function J(e){let{anchorElem:t,cache_threshold:o=20,editor:r,fuzzy:n=!1,horizontalOffset:c=0,point:{x:l,y:s},startIndex:u=0,useEdgeAsDefault:d=!1}=e;if(o>0&&B.props&&B.result&&B.props.fuzzy===e.fuzzy&&B.props.horizontalOffset===e.horizontalOffset&&B.props.useEdgeAsDefault===e.useEdgeAsDefault&&To(B.props.point,e.point,o))return B.result;let m=t.getBoundingClientRect(),a=V(r),i={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return r.getEditorState().read(()=>{if(d){let p=r.getElementByKey(a[0]),g=r.getElementByKey(a[a.length-1]);if(p&&g){let[f,E]=[U(p),U(g)];if(s<f.top?(i.blockElem=p,i.distance=f.top-s,i.blockNode=ye(a[0]),i.foundAtIndex=0):s>E.bottom&&(i.distance=s-E.bottom,i.blockNode=ye(a[a.length-1]),i.blockElem=g,i.foundAtIndex=a.length-1),i?.blockElem)return{blockElem:null,isFoundNodeEmptyParagraph:!1}}}let x=u,y=Qe;for(;x>=0&&x<a.length;){let p=a[x],g=r.getElementByKey(p);if(g===null)break;let f=new K(l+c,s),E=Ke.fromDOMRect(U(g)),{marginBottom:h,marginTop:b}=he(g),_=E.generateNewRect({bottom:E.bottom+h,left:m.left,right:m.right,top:E.top-b}),{distance:w,isOnBottomSide:v,isOnTopSide:D}=_.distanceFromPoint(f);if(w===0){i.blockElem=g,i.blockNode=ye(p),i.foundAtIndex=x,i.distance=w,i.blockNode&&i.blockNode.getType()==="paragraph"&&i.blockNode.getTextContent()===""&&(!n&&!e.returnEmptyParagraphs&&(i.blockElem=null,i.blockNode=null),i.isFoundNodeEmptyParagraph=!0);break}else n&&w<i.distance&&(i.blockElem=g,i.blockNode=ye(p),i.distance=w,i.foundAtIndex=x);y===Qe&&(D?y=Po:v?y=So:y=1/0),x+=y}}),B.props=e,B.result={blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph},{blockElem:i.blockElem,blockNode:i.blockNode,foundAtIndex:i.foundAtIndex,isFoundNodeEmptyParagraph:i.isFoundNodeEmptyParagraph}}function xe(e,t){return!!e.closest(`.${t}`)}var Ro=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Xe(e){if(!e||Ro.includes(e.tagName)||e.offsetHeight===0||e.offsetWidth===0)return!1;let t=window.getComputedStyle(e);return!(t.display==="table-cell"||t.position==="absolute"||t.visibility==="hidden"||t.opacity==="0")}function Ee(e,t,o,r=0){if(!e){t.style.opacity="0",t.style.transform="translate(-10000px, -10000px)";return}let n=e.getBoundingClientRect(),c=window.getComputedStyle(e),l=t.getBoundingClientRect(),s=o.getBoundingClientRect(),u;if(["LexicalEditorTheme__block","LexicalEditorTheme__upload","LexicalEditorTheme__relationship"].some(a=>e.classList.contains(a)||e.firstElementChild?.classList.contains(a)))u=n.top+8-s.top;else{let a=Xe(e)?parseInt(c.lineHeight,10):0;u=n.top+(a-l.height)/2-s.top}let m=r;t.style.opacity="1",t.style.transform=`translate(${m}px, ${u}px)`}var Bo="add-block-menu",Ce=1/0;function Oo(e){return e===0?1/0:Ce>=0&&Ce<e?Ce:Math.floor(e/2)}function Io(e,t,o){let r=t.parentElement,{editorConfig:n}=P(),c=n?.admin?.hideGutter?-24:12,l=Do(null),[s,u]=Mo(null);Ze(()=>{function m(a){let i=a.target;if(!ko(i))return;let x=G(r,a.pageX,a.pageY,i);if(x===-1){u(null);return}if(xe(i,Bo))return;let y=V(e),{blockElem:p,blockNode:g,foundAtIndex:f}=J({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-x,point:new K(a.x,a.y),returnEmptyParagraphs:!0,startIndex:Oo(y.length),useEdgeAsDefault:!1});Ce=f,p&&g&&(s?.node!==g||s?.elem!==p)&&u({elem:p,node:g})}return document?.addEventListener("mousemove",m),()=>{document?.removeEventListener("mousemove",m)}},[r,t,e,s]),Ze(()=>{l.current&&s?.node&&Ee(s?.elem,l.current,t,c)},[t,s,c]);let d=Lo(m=>{let a=s;a?.node&&(e.update(()=>{let i=!0;if((a?.node.getType()!=="paragraph"||a.node.getTextContent()!=="")&&(i=!1),!i){let x=_o();a?.node.insertAfter(x),setTimeout(()=>{a={elem:e.getElementByKey(x.getKey()),node:x},u(a)},0)}}),setTimeout(()=>{e.update(()=>{e.focus(),a?.node&&"select"in a.node&&typeof a.node.select=="function"&&a.node.select()})},1),setTimeout(()=>{e.dispatchCommand(Fe,{node:a?.node})},2),m.stopPropagation(),m.preventDefault())},[e,s]);return Ao(ve(et.Fragment,{children:ve("button",{"aria-label":"Add block",className:"icon add-block-menu",onClick:m=>{d(m)},ref:l,type:"button",children:ve("div",{className:o?"icon":""})})}),t)}function tt(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[r]=vo();return Io(r,o,r._editable)}import{jsx as be,jsxs as $o}from"react/jsx-runtime";import{useLexicalComposerContext as Ko}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as nt}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as it,$getNodeByKey as jo,isHTMLElement as _e}from"lexical";import*as ut from"react";import{useEffect as ke,useRef as re,useState as st}from"react";import{createPortal as zo}from"react-dom";var ot=0,Fo=-24;var W=0;function rt(e,t,o,r,n,c,l,s,u,d=!1){let{height:m,top:a}=r.getBoundingClientRect(),{top:i,width:x}=l.getBoundingClientRect(),{marginBottom:y,marginTop:p}=he(r),g=a,f=c>=a+m/2+window.scrollY,E=!1;if(n?.elem)if(r!==n?.elem)(f&&n?.elem&&n?.elem===r.nextElementSibling||!f&&n?.elem&&n?.elem===r.previousElementSibling)&&(W++,W<200&&(E=!0));else{W++;let w=n?.boundingBox?.y,v=r.getBoundingClientRect().y;(f===n?.isBelow&&w===v||W<200)&&(E=!1)}if(E)return{isBelow:f,willStayInSamePosition:E};d?g+=m/2:f?g+=m+y/2:g-=p/2;let h=0;d||(f?h=-ot:h=ot);let b=g-i+h,_=Fo-t;return o.style.width=`calc(${x}px - ${e} - var(--spacer-5))`,o.style.opacity=".8",o.style.transform=`translate(${_}px, calc(${b}px - 2px))`,n?.elem&&(n.elem.style.opacity="",n?.elem===r?f?n.elem.style.marginTop="":n.elem.style.marginBottom="":(n.elem.style.marginBottom="",n.elem.style.marginTop="")),W=0,{isBelow:f,willStayInSamePosition:E}}var Ho="draggable-block-menu",lt="application/x-lexical-drag-block",ne=1/0;function at(e){return e===0?1/0:ne>=0&&ne<e?ne:Math.floor(e/2)}function Vo(e,t){let{transform:o}=t.style;e.setDragImage(t,0,0),setTimeout(()=>{t.style.transform=o})}function ct(e,t){e&&(e.style.opacity="0"),t&&(t.style.opacity="",t.style.marginBottom="",t.style.marginTop="")}function Wo(e,t,o){let r=t.parentElement,n=re(null),c=re(null),l=re(null),s=re(!1),u=re([]),[d,m]=st(null),[a,i]=st(null),{editorConfig:x}=P(),y=x?.admin?.hideGutter?-44:-8;ke(()=>{function f(E){let h=E.target;if(!_e(h))return;let b=G(r,E.pageX,E.pageY,h);if(b===-1){m(null);return}if(xe(h,Ho))return;let _=V(e),{blockElem:w,foundAtIndex:v,isFoundNodeEmptyParagraph:D}=J({anchorElem:t,cache_threshold:0,editor:e,horizontalOffset:-b,point:new K(E.x,E.y),startIndex:at(_.length),useEdgeAsDefault:!1,verbose:!1});ne=v,!(!w&&!D)&&d!==w&&m(w)}return document?.addEventListener("mousemove",f),()=>{document?.removeEventListener("mousemove",f)}},[r,t,e,d]),ke(()=>{n.current&&Ee(d,n.current,t,y)},[t,d,y]),ke(()=>{function f(h){if(!s.current)return!1;let[b]=nt(h);if(b)return!1;let{pageY:_,target:w}=h;if(!_e(w))return!1;let v=G(r,h.pageX,h.pageY,w,100,50),D=V(e),{blockElem:S,foundAtIndex:I,isFoundNodeEmptyParagraph:R}=J({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-v,point:new K(h.x,h.y),startIndex:at(D.length),useEdgeAsDefault:!0,verbose:!0});ne=I;let F=c.current;if(S===null||F===null)return!1;if(h.preventDefault(),h.dataTransfer.dropEffect="move",d!==S){let{isBelow:k,willStayInSamePosition:M}=rt(x?.admin?.hideGutter?"0px":"var(--spacer-5)",y+(x?.admin?.hideGutter?n?.current?.getBoundingClientRect()?.width??0:-(n?.current?.getBoundingClientRect()?.width??0)),F,S,a,_,t,h,l,R);M||i({boundingBox:S.getBoundingClientRect(),elem:S,isBelow:k})}else a?.elem&&(ct(F,a.elem),i({boundingBox:S.getBoundingClientRect(),elem:S,isBelow:!1}));return!0}function E(h){if(!s.current)return!1;let[b]=nt(h);if(b)return!1;let{dataTransfer:_,pageY:w,target:v}=h,D=_?.getData(lt)||"";return e.update(()=>{let S=jo(D);if(!S||!_e(v))return!1;let I=G(r,h.pageX,h.pageY,v,100,50),{blockElem:R,isFoundNodeEmptyParagraph:F}=J({anchorElem:t,editor:e,fuzzy:!0,horizontalOffset:-I,point:new K(h.x,h.y),useEdgeAsDefault:!0});if(!R)return!1;let k=it(R);if(!k)return!1;if(k===S)return!0;let{height:M,top:ae}=U(R),Ne=w>=ae+M/2+window.scrollY;F?(k.insertBefore(S),k.remove()):Ne?k.insertAfter(S):k.insertBefore(S),d!==null&&m(null),document.querySelectorAll(".lexical-block-highlighter").forEach(T=>{T.remove()});let we=e.getElementByKey(S.getKey()),ce=setTimeout(()=>{let T=we?.getBoundingClientRect();if(!T)return;let N=document.createElement("div");N.className="lexical-block-highlighter",N.style.backgroundColor="var(--theme-elevation-1000",N.style.transition="opacity 0.5s ease-in-out",N.style.zIndex="1",N.style.pointerEvents="none",N.style.boxSizing="border-box",N.style.borderRadius="4px",N.style.position="absolute",document.body.appendChild(N),N.style.opacity="0.1",N.style.height=`${T.height+8}px`,N.style.width=`${T.width+8}px`,N.style.top=`${T.top+window.scrollY-4}px`,N.style.left=`${T.left-4}px`;let ue=setTimeout(()=>{N.style.opacity="0";let de=setTimeout(()=>{N.remove()},500);u.current.push(de)},1e3);u.current.push(ue)},120);u.current.push(ce)}),!0}return document.addEventListener("dragover",f),document.addEventListener("drop",E),()=>{document.removeEventListener("dragover",f),document.removeEventListener("drop",E),u.current.forEach(clearTimeout),u.current=[]}},[r,y,t,e,a,d,x?.admin?.hideGutter]);function p(f){let E=f.dataTransfer;if(!E||!d)return;Vo(E,d),E.effectAllowed="move";let h="";e.update(()=>{let b=it(d);b&&(h=b.getKey())}),s.current=!0,E.setData(lt,h)}function g(){s.current=!1,a?.elem&&ct(c.current,a?.elem)}return zo($o(ut.Fragment,{children:[be("button",{"aria-label":"Drag to move",className:"icon draggable-block-menu",draggable:!0,onDragEnd:g,onDragStart:p,ref:n,type:"button",children:be("div",{className:o?"icon":""})}),be("div",{className:"draggable-block-target-line",ref:c}),be("div",{className:"debug-highlight",ref:l})]}),t)}function dt(e){let{anchorElem:t}=e,o=t===void 0?document.body:t,[r]=Ko();return Wo(r,o,r._editable)}import{c as Yo}from"react/compiler-runtime";import{jsx as Le}from"react/jsx-runtime";import{useLexicalComposerContext as Go}from"@lexical/react/LexicalComposerContext";import{$createParagraphNode as Uo,$getRoot as Jo}from"lexical";import"react";var ft="insert-paragraph-at-end",mt=()=>{let e=Yo(2),[t]=Go(),{editorConfig:o}=P();if(o?.admin?.hideInsertParagraphAtEnd)return null;let r;return e[0]!==t?(r=Le("div",{"aria-label":"Insert Paragraph",className:ft,onClick:()=>{t.update(qo)},role:"button",tabIndex:0,children:Le("div",{className:`${ft}-inside`,children:Le("span",{children:"+"})})}),e[0]=t,e[1]=r):r=e[1],r};function qo(){let e=Uo();Jo().append(e),e.select()}import{c as Qo}from"react/compiler-runtime";import{useLexicalComposerContext as Xo}from"@lexical/react/LexicalComposerContext";import*as pt from"react";var gt=()=>{let e=Qo(4),{editorConfig:t}=P(),[o]=Xo(),r,n;return e[0]!==o||e[1]!==t.features.markdownTransformers?(r=()=>Be(o,t.features.markdownTransformers??[]),n=[o,t.features.markdownTransformers],e[0]=o,e[1]=t.features.markdownTransformers,e[2]=r,e[3]=n):(r=e[2],n=e[3]),pt.useEffect(r,n),null};import{c as Zo}from"react/compiler-runtime";import{useLexicalComposerContext as er}from"@lexical/react/LexicalComposerContext.js";import{useEffect as tr}from"react";function ht(){let e=Zo(5),[t]=er(),{currentView:o,views:r}=$(),n,c;return e[0]!==o||e[1]!==t||e[2]!==r?(n=()=>{r&&(o==="default"?r.default?Se(t,r.default?.nodes):Pe(t):r[o]&&(Pe(t),Se(t,r[o]?.nodes)))},c=[t,r,o],e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=c):(n=e[3],c=e[4]),tr(n,c),null}import{useLexicalComposerContext as or}from"@lexical/react/LexicalComposerContext";import{$getSelection as rr,$isRangeSelection as nr,RootNode as ir}from"lexical";import{useEffect as sr}from"react";function yt(){let[e]=or();return sr(()=>e.registerNodeTransform(ir,t=>{let o=rr();if(nr(o)){let r=o.anchor.getNode(),n=o.focus.getNode();(!r.isAttached()||!n.isAttached())&&(t.selectEnd(),console.warn("updateEditor: selection has been moved to the end of the editor because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node."))}return!1}),[e]),null}import{useLexicalComposerContext as lr}from"@lexical/react/LexicalComposerContext";import{$getSelection as ar,COMMAND_PRIORITY_LOW as cr,SELECT_ALL_COMMAND as ur}from"lexical";import{useEffect as dr}from"react";function xt(){let[e]=lr();return dr(()=>e.registerCommand(ur,()=>{if(ar())return!1;let o=document.activeElement;return o instanceof HTMLInputElement&&o.select(),!0},cr),[e]),null}import{jsx as q,jsxs as Ct}from"react/jsx-runtime";import{useLexicalComposerContext as mr}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as bt}from"@payloadcms/ui";import{useCallback as pr,useMemo as gr,useState as hr}from"react";import"react";import*as Nt from"react-dom";import{c as fr}from"react/compiler-runtime";import"react";function Et(e,t){let o=fr(4),{maxLength:r,minLength:n}=t,c=r===void 0?75:r,l=n===void 0?1:n,s;return o[0]!==c||o[1]!==l||o[2]!==e?(s=u=>{let{query:d}=u,m="[^"+e+Ie+"\\s]",i=new RegExp("(^|\\s|\\()(["+e+"]((?:"+m+"){0,"+c+"}))$").exec(d);if(i!==null){let x=i[1],y=i[3];if(y.length>=l)return{leadOffset:i.index+x.length,matchingString:y,replaceableString:i[2]}}return null},o[0]=c,o[1]=l,o[2]=e,o[3]=s):s=o[3],s}var O="slash-menu-popup";function yr({isSelected:e,item:t,onClick:o,onMouseEnter:r,ref:n}){let{fieldProps:{featureClientSchemaMap:c,schemaPath:l}}=P(),{i18n:s}=bt(),u=`${O}__item ${O}__item-${t.key}`;e&&(u+=` ${O}__item--selected`);let d=t.key;return t.label&&(d=typeof t.label=="function"?t.label({featureClientSchemaMap:c,i18n:s,schemaPath:l}):t.label),d.length>25&&(d=d.substring(0,25)+"..."),Ct("button",{"aria-selected":e,className:u,id:O+"__item-"+t.key,onClick:o,onMouseEnter:r,ref:n,role:"option",tabIndex:-1,type:"button",children:[t?.Icon&&q(t.Icon,{}),q("span",{className:`${O}__item-text`,children:d})]},t.key)}function wt({anchorElem:e=document.body}){let[t]=mr(),[o,r]=hr(null),{editorConfig:n}=P(),{i18n:c}=bt(),{fieldProps:{featureClientSchemaMap:l,schemaPath:s}}=P(),u=Et("/",{minLength:0}),d=pr(()=>{let a=[];for(let i of n.features.slashMenu.dynamicGroups)if(o){let x=i({editor:t,queryString:o});a=a.concat(x)}return a},[t,o,n?.features]),m=gr(()=>{let a=[];for(let i of n?.features.slashMenu.groups??[])a.push(i);if(o){let i=o.toLowerCase().replace(/[\s\-_]/g,"");a=a.map(y=>{let p=y.items.filter(g=>{let f=g.key;return g.label&&(f=typeof g.label=="function"?g.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):g.label),new RegExp(o,"gi").exec(f)||f.toLowerCase().replace(/[\s\-_]/g,"").includes(i)?!0:g.keywords!=null?g.keywords.some(h=>new RegExp(o,"gi").exec(h)?!0:h.toLowerCase().replace(/[\s\-_]/g,"").includes(i)):!1});return p.length?{...y,items:p}:null}),a=a.filter(y=>y!=null);let x=d();for(let y of x){let p=a.find(g=>g.key===y.key);p?a=a.filter(g=>g.key!==y.key):p={...y,items:[]},p?.items?.length&&(p.items=p.items.concat(p.items)),a.push(p)}}return a},[o,n?.features.slashMenu.groups,d,l,c,s]);return q($e,{anchorElem:e,groups:m,menuRenderFn:(a,{selectedItemKey:i,selectItemAndCleanUp:x,setSelectedItemKey:y})=>a.current&&m.length?Nt.createPortal(q("div",{className:O,"data-theme":"dark",children:m.map(p=>{let g=p.key;return p.label&&l&&(g=typeof p.label=="function"?p.label({featureClientSchemaMap:l,i18n:c,schemaPath:s}):p.label),Ct("div",{className:`${O}__group ${O}__group-${p.key}`,children:[q("div",{className:`${O}__group-title`,children:g}),p.items.map((f,E)=>q(yr,{index:E,isSelected:i===f.key,item:f,onClick:()=>{y(f.key),x(f)},onMouseEnter:()=>{y(f.key)},ref:h=>{f.ref={current:h}}},f.key))]},p.key)})}),a.current):null,onQueryChange:r,triggerFn:u})}import{c as xr}from"react/compiler-runtime";import{useLexicalComposerContext as Er}from"@lexical/react/LexicalComposerContext";import{TEXT_TYPE_TO_FORMAT as Cr,TextNode as br}from"lexical";import{useEffect as Nr}from"react";function St(e){let t=xr(6),{features:o}=e,[r]=Er(),n;t[0]!==r||t[1]!==o.enabledFormats?(n=()=>{let l=wr(o.enabledFormats);if(l.length!==0)return r.registerNodeTransform(br,s=>{l.forEach(u=>{s.hasFormat(u)&&s.toggleFormat(u)})})},t[0]=r,t[1]=o.enabledFormats,t[2]=n):n=t[2];let c;return t[3]!==r||t[4]!==o?(c=[r,o],t[3]=r,t[4]=o,t[5]=c):c=t[5],Nr(n,c),null}function wr(e){let t=Object.keys(Cr),o=new Set(e);return t.filter(r=>!o.has(r))}import{c as Sr}from"react/compiler-runtime";import{jsx as Pt}from"react/jsx-runtime";import{useLexicalComposerContext as Pr}from"@lexical/react/LexicalComposerContext";import{ContentEditable as Tr}from"@lexical/react/LexicalContentEditable.js";import{useTranslation as Rr}from"@payloadcms/ui";import"react";function Tt(e){let t=Sr(5),{className:o,editorConfig:r}=e,{t:n}=Rr(),[,c]=Pr(),{getTheme:l}=c,s;if(t[0]!==o||t[1]!==r?.admin?.placeholder||t[2]!==l||t[3]!==n){let u=l();s=Pt(Tr,{"aria-placeholder":n("lexical:general:placeholder"),className:o??"ContentEditable__root",placeholder:Pt("p",{className:u?.placeholder,children:r?.admin?.placeholder??n("lexical:general:placeholder")})}),t[0]=o,t[1]=r?.admin?.placeholder,t[2]=l,t[3]=n,t[4]=s}else s=t[4];return s}var vt=e=>{let t=vr(13),{editorConfig:o,editorContainerRef:r,isSmallWidthViewport:n,onChange:c,rtl:l}=e,s=P(),[u]=_r(),d=Ar(),[m,a]=Fr(null),i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>{f!==null&&a(f)},t[0]=i):i=t[0];let x=i,y,p;t[1]!==u||t[2]!==s?(y=()=>{if(!s?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}s?.parentEditor?.uuid&&s.parentEditor?.registerChild(s.uuid,s);let f=()=>{s.focusEditor(s)},E=()=>{s.blurEditor(s)},h=u.registerCommand(Or,()=>(f(),!0),Rt),b=u.registerCommand(Br,()=>(E(),!0),Rt);return()=>{h(),b(),s.parentEditor?.unregisterChild?.(s.uuid)}},p=[u,s],t[1]=u,t[2]=s,t[3]=y,t[4]=p):(y=t[3],p=t[4]),Ir(y,p);let g;return t[5]!==o||t[6]!==r||t[7]!==m||t[8]!==d||t[9]!==n||t[10]!==c||t[11]!==l?(g=ie(Q.Fragment,{children:[o.features.plugins?.map($r),ie("div",{className:"editor-container",dir:l?"rtl":void 0,ref:r,children:[o.features.plugins?.map(Kr),C(Mr,{contentEditable:C("div",{className:"editor-scroller",children:C("div",{className:"editor",ref:x,children:C(Tt,{editorConfig:o})})}),ErrorBoundary:kr}),C(yt,{}),d&&C(mt,{}),C(Ue,{}),C(We,{}),C(St,{features:o.features}),C(xt,{}),C(ht,{}),d&&C(Dr,{ignoreSelectionChange:!0,onChange:(f,E,h)=>{(!h.has("focus")||h.size>1)&&c?.(f,E,h)}}),m&&ie(Q.Fragment,{children:[!n&&d&&ie(Q.Fragment,{children:[o.admin?.hideDraggableBlockElement?null:C(dt,{anchorElem:m}),o.admin?.hideAddBlockButton?null:C(tt,{anchorElem:m})]}),o.features.plugins?.map(f=>{if(f.position==="floatingAnchorElem"&&!(f.desktopOnly===!0&&n))return C(z,{anchorElem:m,clientProps:f.clientProps,plugin:f},f.key)}),d&&C(Q.Fragment,{children:C(wt,{anchorElem:m})})]}),d&&ie(Q.Fragment,{children:[C(Lr,{}),o?.features?.markdownTransformers?.length>0&&C(gt,{})]}),o.features.plugins?.map(jr),o.features.plugins?.map(zr)]}),o.features.plugins?.map(Hr)]}),t[5]=o,t[6]=r,t[7]=m,t[8]=d,t[9]=n,t[10]=c,t[11]=l,t[12]=g):g=t[12],g};function $r(e){if(e.position==="aboveContainer")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function Kr(e){if(e.position==="top")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function jr(e){if(e.position==="normal")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function zr(e){if(e.position==="bottom")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}function Hr(e){if(e.position==="belowContainer")return C(z,{clientProps:e.clientProps,plugin:e},e.key)}var kt=({children:e,providers:t})=>{if(!t?.length)return e;let o=t[0];return t.length>1?j(o,{children:j(kt,{providers:t.slice(1),children:e})}):j(o,{children:e})},Lt=e=>{let{composerKey:t,editorConfig:o,fieldProps:r,isSmallWidthViewport:n,onChange:c,readOnly:l,rtl:s,value:u}=e,{currentView:d,views:m}=$(),a=P(),i=Wr(),x=_t.useRef(null),y=Yr(()=>{if(u&&typeof u!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(u));if(u&&Array.isArray(u)&&!("root"in u))throw new Error("You have tried to pass in data from the old Slate editor to the new Lexical editor. The data structure is different, thus you will have to migrate your data. We offer a one-line migration script which migrates all your rich text fields: https://payloadcms.com/docs/lexical/migration#migration-via-migration-script-recommended");if(u&&"jsonContent"in u)throw new Error("You have tried to pass in data from payload-plugin-lexical. The data structure is different, thus you will have to migrate your data. Migration guide: https://payloadcms.com/docs/lexical/migration#migrating-from-payload-plugin-lexical");let p=m?.[d]?.nodes;return{editable:l!==!0,editorState:u!=null?JSON.stringify(u):void 0,namespace:o.lexical.namespace,nodes:je({editorConfig:o,nodeViews:p}),onError:g=>{throw g},theme:o.lexical.theme}},[o,m,d]);return y?j(Vr,{initialConfig:y,children:j(Ae,{editorConfig:o,editorContainerRef:x,fieldProps:r,parentContext:a?.editDepth===i?a:void 0,children:j(kt,{providers:o.features.providers,children:j(vt,{editorConfig:o,editorContainerRef:x,isSmallWidthViewport:n,onChange:c,rtl:s})})})},t+y.editable+d):j("p",{children:"Loading..."})};import{c as Gr}from"react/compiler-runtime";import{jsx as X,jsxs as Ur}from"react/jsx-runtime";import{ChevronIcon as Jr,Popup as qr,PopupList as Dt}from"@payloadcms/ui";import"react";function Mt(){let e=Gr(5),{currentView:t,setCurrentView:o,views:r}=$();if(!r||Object.keys(r).length===0)return null;let n,c;if(e[0]!==t||e[1]!==o||e[2]!==r){c=Symbol.for("react.early_return_sentinel");e:{let l=Object.keys(r);if(!l.some(Xr)){c=null;break e}let u=["default",...l.filter(Qr)],d=t.charAt(0).toUpperCase()+t.slice(1);n=X("div",{className:"lexical-view-selector",children:X(qr,{button:Ur("button",{className:"lexical-view-selector__button",type:"button",children:[X("span",{className:"lexical-view-selector__label",children:d}),X(Jr,{className:"lexical-view-selector__icon"})]}),buttonType:"custom",horizontalAlign:"left",render:m=>{let{close:a}=m;return X(Dt.ButtonGroup,{children:u.map(i=>{let x=i.charAt(0).toUpperCase()+i.slice(1);return X(Dt.Button,{active:i===t,disabled:i===t,onClick:()=>{o?.(i),a()},children:x},i)})})},size:"large"})})}e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=c}else n=e[3],c=e[4];return c!==Symbol.for("react.early_return_sentinel")?c:n}function Qr(e){return e!=="default"}function Xr(e){return e!=="default"}var se="rich-text-lexical",pn=e=>{let{editorConfig:t,field:o,field:{admin:{className:r,description:n,readOnly:c}={},label:l,localized:s,required:u},path:d,readOnly:m,schemaPath:a,validate:i}=e,x=m||c,y=cn(),{config:{localization:p}}=nn(),g=rn({fieldLocalized:s,locale:y,localizationConfig:p||void 0}),f=sn(),{isControlledByParent:E}=$(),h=Ot((A,ee)=>typeof i=="function"?i(A,{...ee,required:u}):!0,[i,u]),{customComponents:{AfterInput:b,BeforeInput:_,Description:w,Error:v,Label:D}={},disabled:S,initialValue:I,path:R,setValue:F,showError:k,value:M}=an({potentiallyStalePath:d,validate:h}),ae=x||S,[Z,Ne]=Ft(!1),[De,we]=Ft(),ce=Bt.useRef(I),T=Bt.useRef(M);It(()=>{let A=()=>{let ee=window.matchMedia("(max-width: 768px)").matches;ee!==Z&&Ne(ee)};return A(),window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[Z]);let N=["field-type",se,r,k&&"error",ae&&`${se}--read-only`,t?.admin?.hideGutter!==!0&&!Z?`${se}--show-gutter`:null].filter(Boolean).join(" "),ue=`${R}.${f}`,de=Oe(),$t=Ot(A=>{de(()=>{let Me=A.toJSON();T.current=Me,F(Me)})},[F,de]),Kt=fn(()=>un(o),[o]),jt=ln(A=>{T.current!==M&&!dn(T.current!=null?JSON.parse(JSON.stringify(T.current)):T.current,M)&&(ce.current=A,T.current=M,we(new Date))});return It(()=>{Object.is(I,ce.current)||jt(I)},[I]),le("div",{className:N,"data-field-path":R,"data-field-schemapath":a,"data-lexical-view":t?.view,style:Kt,children:[le("div",{className:`${se}__label-row`,children:[D||L(on,{label:l,localized:s,path:R,required:u}),!E&&L(Mt,{})]}),le("div",{className:`${se}__wrap`,children:[L(At,{CustomComponent:v,Fallback:L(tn,{path:R,showError:k})}),le(mn,{fallbackRender:gn,onReset:()=>{},children:[_,L(Zr,{drawerSlugPrefix:`lexical-${R}`,children:L(Lt,{composerKey:ue,editorConfig:t,fieldProps:e,isSmallWidthViewport:Z,onChange:$t,readOnly:ae,rtl:g,value:M},JSON.stringify({path:R,rerenderProviderKey:De}))}),b]}),L(At,{CustomComponent:w,Fallback:L(en,{description:n,path:R})})]})]},ue)};function gn({error:e}){return le("div",{className:"errorBoundary",role:"alert",children:[L("p",{children:"Something went wrong:"}),L("pre",{style:{color:"red"},children:e instanceof Error?e.message:String(e)})]})}var Pl=pn;export{Pl as RichText};
2
- //# sourceMappingURL=Field-G5Z2HM5Y.js.map