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

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 (870) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-334JNLRF.js +2 -0
  3. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  4. package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
  5. package/dist/exports/client/chunk-BEKGION5.js +2 -0
  6. package/dist/exports/client/chunk-BEKGION5.js.map +7 -0
  7. package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
  8. package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
  9. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  10. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  11. package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
  12. package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
  13. package/dist/exports/client/chunk-SE5IITBK.js +2 -0
  14. package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
  15. package/dist/exports/client/component-QENB4QTS.js +2 -0
  16. package/dist/exports/client/component-QENB4QTS.js.map +7 -0
  17. package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
  18. package/dist/exports/client/index.d.ts +1 -3
  19. package/dist/exports/client/index.d.ts.map +1 -1
  20. package/dist/exports/client/index.js +23 -24
  21. package/dist/exports/client/index.js.map +4 -4
  22. package/dist/features/align/client/index.js.map +1 -1
  23. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  24. package/dist/features/blockquote/client/index.js +2 -2
  25. package/dist/features/blockquote/client/index.js.map +1 -1
  26. package/dist/features/blockquote/server/index.js +2 -2
  27. package/dist/features/blockquote/server/index.js.map +1 -1
  28. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  29. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  30. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  31. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  32. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  33. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  34. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  35. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  36. package/dist/features/blocks/client/component/index.css +2 -2
  37. package/dist/features/blocks/client/component/index.d.ts +0 -6
  38. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  39. package/dist/features/blocks/client/component/index.js +199 -108
  40. package/dist/features/blocks/client/component/index.js.map +1 -1
  41. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  42. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  43. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  44. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  45. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  46. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  47. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  48. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  49. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  50. package/dist/features/blocks/client/componentInline/index.css +8 -9
  51. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  52. package/dist/features/blocks/client/componentInline/index.js +34 -31
  53. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  54. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  55. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  56. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  57. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  58. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  59. package/dist/features/blocks/client/index.d.ts.map +1 -1
  60. package/dist/features/blocks/client/index.js +4 -2
  61. package/dist/features/blocks/client/index.js.map +1 -1
  62. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  63. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  64. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  65. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  66. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  67. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  68. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  69. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  70. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  71. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  72. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  73. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  74. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  75. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  76. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  77. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  78. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
  79. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  80. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  81. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  82. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  83. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  84. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  85. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  86. package/dist/features/blocks/server/index.d.ts.map +1 -1
  87. package/dist/features/blocks/server/index.js +6 -8
  88. package/dist/features/blocks/server/index.js.map +1 -1
  89. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  90. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  91. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  92. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  93. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  94. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  95. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  96. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  97. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  98. package/dist/features/blocks/server/schema.d.ts +2 -0
  99. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  100. package/dist/features/blocks/server/schema.js +10 -11
  101. package/dist/features/blocks/server/schema.js.map +1 -1
  102. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  103. package/dist/features/blocks/server/validate.js +1 -1
  104. package/dist/features/blocks/server/validate.js.map +1 -1
  105. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  107. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  110. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  112. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  113. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  115. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  116. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  117. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  118. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  120. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  121. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  123. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  126. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  128. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  129. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  130. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  131. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  132. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  133. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  134. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  135. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  136. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  137. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  138. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  139. package/dist/features/converters/markdownToLexical/index.js +5 -2
  140. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  141. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  142. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  143. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  144. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  145. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  146. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  147. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  148. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  149. package/dist/features/format/bold/feature.client.js +1 -1
  150. package/dist/features/format/bold/feature.client.js.map +1 -1
  151. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  152. package/dist/features/format/bold/feature.server.js +1 -1
  153. package/dist/features/format/bold/feature.server.js.map +1 -1
  154. package/dist/features/format/inlineCode/feature.client.js +1 -1
  155. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  156. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  157. package/dist/features/format/inlineCode/feature.server.js +1 -1
  158. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  159. package/dist/features/format/italic/feature.client.js +1 -1
  160. package/dist/features/format/italic/feature.client.js.map +1 -1
  161. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  162. package/dist/features/format/italic/feature.server.js +1 -1
  163. package/dist/features/format/italic/feature.server.js.map +1 -1
  164. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  165. package/dist/features/format/strikethrough/feature.client.js +1 -1
  166. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  167. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  168. package/dist/features/format/strikethrough/feature.server.js +1 -1
  169. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  170. package/dist/features/heading/client/index.js +2 -2
  171. package/dist/features/heading/client/index.js.map +1 -1
  172. package/dist/features/heading/constants.d.ts +2 -0
  173. package/dist/features/heading/constants.d.ts.map +1 -0
  174. package/dist/features/heading/constants.js +2 -0
  175. package/dist/features/heading/constants.js.map +1 -0
  176. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  177. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  178. package/dist/features/heading/markdownTransformer.js +6 -19
  179. package/dist/features/heading/markdownTransformer.js.map +1 -1
  180. package/dist/features/heading/server/index.d.ts.map +1 -1
  181. package/dist/features/heading/server/index.js +7 -3
  182. package/dist/features/heading/server/index.js.map +1 -1
  183. package/dist/features/heading/server/schema.d.ts.map +1 -1
  184. package/dist/features/heading/server/validate.d.ts +6 -0
  185. package/dist/features/heading/server/validate.d.ts.map +1 -0
  186. package/dist/features/heading/server/validate.js +15 -0
  187. package/dist/features/heading/server/validate.js.map +1 -0
  188. package/dist/features/horizontalRule/client/index.js +2 -2
  189. package/dist/features/horizontalRule/client/index.js.map +1 -1
  190. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  191. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  192. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  193. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  194. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
  195. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  196. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  197. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  198. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  199. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  200. package/dist/features/horizontalRule/server/index.js +2 -2
  201. package/dist/features/horizontalRule/server/index.js.map +1 -1
  202. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  203. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  204. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  205. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  206. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  207. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  208. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  209. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  210. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  211. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  212. package/dist/features/horizontalRule/server/schema.js +6 -5
  213. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  214. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  215. package/dist/features/indent/client/IndentPlugin.js +122 -1
  216. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  217. package/dist/features/indent/client/index.d.ts.map +1 -1
  218. package/dist/features/indent/client/index.js +0 -2
  219. package/dist/features/indent/client/index.js.map +1 -1
  220. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  221. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  222. package/dist/features/indent/server/i18n.js +74 -37
  223. package/dist/features/indent/server/i18n.js.map +1 -1
  224. package/dist/features/link/client/index.js +2 -2
  225. package/dist/features/link/client/index.js.map +1 -1
  226. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  227. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  228. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  229. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +20 -9
  230. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  231. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -13
  232. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  233. package/dist/features/link/markdownTransformer.d.ts +4 -4
  234. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  235. package/dist/features/link/markdownTransformer.js +4 -4
  236. package/dist/features/link/markdownTransformer.js.map +1 -1
  237. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  238. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  239. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  240. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  241. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  242. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  243. package/dist/features/link/nodes/LinkNode.js +2 -15
  244. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  245. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  246. package/dist/features/link/server/baseFields.js.map +1 -1
  247. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  248. package/dist/features/link/server/index.js +4 -4
  249. package/dist/features/link/server/index.js.map +1 -1
  250. package/dist/features/link/server/schema.d.ts.map +1 -1
  251. package/dist/features/link/server/schema.js +4 -2
  252. package/dist/features/link/server/schema.js.map +1 -1
  253. package/dist/features/link/server/validate.d.ts.map +1 -1
  254. package/dist/features/link/server/validate.js +1 -1
  255. package/dist/features/link/server/validate.js.map +1 -1
  256. package/dist/features/lists/checklist/client/index.js +1 -1
  257. package/dist/features/lists/checklist/client/index.js.map +1 -1
  258. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  259. package/dist/features/lists/checklist/server/index.js +6 -3
  260. package/dist/features/lists/checklist/server/index.js.map +1 -1
  261. package/dist/features/lists/orderedList/client/index.js +1 -1
  262. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  263. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  264. package/dist/features/lists/orderedList/server/index.js +6 -3
  265. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  266. package/dist/features/lists/shared/constants.d.ts +2 -0
  267. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  268. package/dist/features/lists/shared/constants.js +2 -0
  269. package/dist/features/lists/shared/constants.js.map +1 -0
  270. package/dist/features/lists/shared/schema.d.ts.map +1 -1
  271. package/dist/features/lists/shared/schema.js.map +1 -1
  272. package/dist/features/lists/shared/validate.d.ts +5 -0
  273. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  274. package/dist/features/lists/shared/validate.js +15 -0
  275. package/dist/features/lists/shared/validate.js.map +1 -0
  276. package/dist/features/lists/unorderedList/client/index.js +1 -1
  277. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  278. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  279. package/dist/features/lists/unorderedList/server/index.js +6 -3
  280. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  281. package/dist/features/relationship/client/components/index.css +3 -6
  282. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  283. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  284. package/dist/features/relationship/client/index.d.ts +2 -2
  285. package/dist/features/relationship/client/index.d.ts.map +1 -1
  286. package/dist/features/relationship/client/index.js.map +1 -1
  287. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  288. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  289. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  290. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  291. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  292. package/dist/features/relationship/client/plugins/index.js +27 -31
  293. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  294. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  295. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  296. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  297. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  298. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  299. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  300. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  301. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  302. package/dist/features/relationship/server/index.d.ts +8 -1
  303. package/dist/features/relationship/server/index.d.ts.map +1 -1
  304. package/dist/features/relationship/server/index.js +28 -11
  305. package/dist/features/relationship/server/index.js.map +1 -1
  306. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  307. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  308. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  309. package/dist/features/relationship/server/schema.d.ts +6 -5
  310. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  311. package/dist/features/relationship/server/schema.js +31 -17
  312. package/dist/features/relationship/server/schema.js.map +1 -1
  313. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  314. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  315. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  316. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  317. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  318. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  319. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  320. package/dist/features/table/client/index.d.ts.map +1 -0
  321. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  322. package/dist/features/table/client/index.js.map +1 -0
  323. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  324. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  325. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  326. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  327. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +1 -2
  328. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  329. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  330. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  331. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  332. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +47 -24
  333. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  334. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  335. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  336. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  337. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  338. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  339. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  340. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +54 -18
  341. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  342. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  343. package/dist/features/table/client/utils/debounce.js.map +1 -0
  344. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  345. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  346. package/dist/features/table/markdownTransformer.d.ts +5 -0
  347. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  348. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  349. package/dist/features/table/markdownTransformer.js.map +1 -0
  350. package/dist/features/table/server/index.d.ts +3 -0
  351. package/dist/features/table/server/index.d.ts.map +1 -0
  352. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  353. package/dist/features/table/server/index.js.map +1 -0
  354. package/dist/features/table/server/schema.d.ts.map +1 -0
  355. package/dist/features/table/server/schema.js.map +1 -0
  356. package/dist/features/textState/defaultColors.js +1 -1
  357. package/dist/features/textState/defaultColors.js.map +1 -1
  358. package/dist/features/textState/feature.client.js +1 -1
  359. package/dist/features/textState/feature.client.js.map +1 -1
  360. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  361. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  362. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  363. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  364. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  365. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  366. package/dist/features/toolbars/fixed/client/Toolbar/index.js +145 -71
  367. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  368. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  369. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  370. package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
  371. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  372. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  373. package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
  374. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  375. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  376. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
  377. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  378. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +23 -25
  379. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  380. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
  381. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  382. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  383. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  384. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  385. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  386. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  387. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  388. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  389. package/dist/features/typesClient.d.ts +1 -1
  390. package/dist/features/typesClient.d.ts.map +1 -1
  391. package/dist/features/typesClient.js.map +1 -1
  392. package/dist/features/typesServer.d.ts +19 -14
  393. package/dist/features/typesServer.d.ts.map +1 -1
  394. package/dist/features/typesServer.js.map +1 -1
  395. package/dist/features/upload/client/component/index.css +9 -11
  396. package/dist/features/upload/client/component/index.js +2 -1
  397. package/dist/features/upload/client/component/index.js.map +1 -1
  398. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  399. package/dist/features/upload/client/drawer/index.js.map +1 -1
  400. package/dist/features/upload/client/index.d.ts +3 -2
  401. package/dist/features/upload/client/index.d.ts.map +1 -1
  402. package/dist/features/upload/client/index.js.map +1 -1
  403. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  404. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  405. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  406. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  407. package/dist/features/upload/client/plugin/index.js +53 -56
  408. package/dist/features/upload/client/plugin/index.js.map +1 -1
  409. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  410. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  411. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  412. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  413. package/dist/features/upload/server/index.d.ts +7 -3
  414. package/dist/features/upload/server/index.d.ts.map +1 -1
  415. package/dist/features/upload/server/index.js +22 -18
  416. package/dist/features/upload/server/index.js.map +1 -1
  417. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  418. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  419. package/dist/features/upload/server/markdownTransformer.js +1 -1
  420. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  421. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  422. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  423. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  424. package/dist/features/upload/server/schema.d.ts +6 -18
  425. package/dist/features/upload/server/schema.d.ts.map +1 -1
  426. package/dist/features/upload/server/schema.js +34 -16
  427. package/dist/features/upload/server/schema.js.map +1 -1
  428. package/dist/features/upload/server/validate.d.ts +2 -2
  429. package/dist/features/upload/server/validate.d.ts.map +1 -1
  430. package/dist/features/upload/server/validate.js +4 -1
  431. package/dist/features/upload/server/validate.js.map +1 -1
  432. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  433. package/dist/field/Diff/converters/listitem/index.js +2 -1
  434. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  435. package/dist/field/Diff/converters/relationship/index.css +0 -1
  436. package/dist/field/Diff/converters/unknown/index.css +1 -2
  437. package/dist/field/Diff/converters/upload/index.css +0 -1
  438. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  439. package/dist/field/Diff/index.css +0 -2
  440. package/dist/field/Diff/index.d.ts +3 -2
  441. package/dist/field/Diff/index.d.ts.map +1 -1
  442. package/dist/field/Diff/index.js +3 -2
  443. package/dist/field/Diff/index.js.map +1 -1
  444. package/dist/field/Field.d.ts.map +1 -1
  445. package/dist/field/Field.js +26 -16
  446. package/dist/field/Field.js.map +1 -1
  447. package/dist/field/RenderLexical/index.d.ts +3 -1
  448. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  449. package/dist/field/RenderLexical/index.js +23 -23
  450. package/dist/field/RenderLexical/index.js.map +1 -1
  451. package/dist/field/ViewSelector.css +1 -1
  452. package/dist/field/ViewSelector.d.ts.map +1 -1
  453. package/dist/field/ViewSelector.js +13 -4
  454. package/dist/field/ViewSelector.js.map +1 -1
  455. package/dist/field/bundled.css +1 -1
  456. package/dist/field/index.css +7 -5
  457. package/dist/field/index.js.map +1 -1
  458. package/dist/field/rscEntry.d.ts +2 -2
  459. package/dist/field/rscEntry.d.ts.map +1 -1
  460. package/dist/field/rscEntry.js.map +1 -1
  461. package/dist/i18n.d.ts.map +1 -1
  462. package/dist/i18n.js +112 -0
  463. package/dist/i18n.js.map +1 -1
  464. package/dist/index.d.ts +6 -6
  465. package/dist/index.d.ts.map +1 -1
  466. package/dist/index.js +33 -54
  467. package/dist/index.js.map +1 -1
  468. package/dist/lexical/LexicalEditor.css +30 -19
  469. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  470. package/dist/lexical/LexicalEditor.js +62 -99
  471. package/dist/lexical/LexicalEditor.js.map +1 -1
  472. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  473. package/dist/lexical/LexicalProvider.js +7 -22
  474. package/dist/lexical/LexicalProvider.js.map +1 -1
  475. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  476. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  477. package/dist/lexical/config/server/loader.d.ts +1 -1
  478. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  479. package/dist/lexical/config/server/loader.js +2 -2
  480. package/dist/lexical/config/server/loader.js.map +1 -1
  481. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  482. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  483. package/dist/lexical/config/server/sanitize.js +2 -2
  484. package/dist/lexical/config/server/sanitize.js.map +1 -1
  485. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  486. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  487. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  488. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  489. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  490. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  491. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  492. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  493. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  494. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  495. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  496. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  497. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  498. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  499. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  500. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  501. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  502. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +236 -108
  503. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  504. package/dist/lexical/plugins/SlashMenu/index.css +1 -7
  505. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  506. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  507. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +2 -1
  508. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  509. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  510. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  511. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +21 -3
  512. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  513. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +140 -38
  514. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  515. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  516. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  517. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  518. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  519. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  520. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  521. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  522. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  523. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  524. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  525. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  526. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  527. package/dist/lexical/theme/EditorTheme.css +18 -21
  528. package/dist/lexical/ui/ContentEditable.css +22 -17
  529. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  530. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  531. package/dist/lexical/ui/ContentEditable.js +32 -11
  532. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  533. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  534. package/dist/lexical/ui/icons/H3/index.js +13 -6
  535. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  536. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  537. package/dist/lexical/ui/icons/H4/index.js +13 -6
  538. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  539. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  540. package/dist/lexical/ui/icons/H5/index.js +13 -6
  541. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  542. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  543. package/dist/lexical/ui/icons/H6/index.js +13 -6
  544. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  545. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  546. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  547. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  548. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  549. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  550. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  551. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  552. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  553. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  554. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  555. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  556. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  557. package/dist/lexical/utils/nodeFormat.js +0 -2
  558. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  559. package/dist/lexical/utils/point.d.ts.map +1 -1
  560. package/dist/lexical/utils/rect.d.ts.map +1 -1
  561. package/dist/lexical/utils/url.d.ts.map +1 -1
  562. package/dist/lexical/utils/url.js +1 -1
  563. package/dist/lexical/utils/url.js.map +1 -1
  564. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  565. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  566. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  567. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  568. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  569. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  570. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  571. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  572. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  573. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  574. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  575. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  576. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  577. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  578. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  579. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  580. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  581. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  582. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  583. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  584. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  585. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  586. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  587. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  588. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  589. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  590. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  591. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  592. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  593. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  594. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  595. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  596. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  597. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  598. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  599. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  600. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  601. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  602. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  603. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  604. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  605. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  606. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  607. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  608. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  609. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  610. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  611. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  612. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  613. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  614. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  615. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  616. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  617. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  618. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  619. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  620. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  621. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  622. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  623. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  624. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  625. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  626. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  627. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  628. package/dist/populateGraphQL/populate.js.map +1 -1
  629. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  630. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  631. package/dist/presets/llmInstructions.d.ts +2 -0
  632. package/dist/presets/llmInstructions.d.ts.map +1 -0
  633. package/dist/presets/llmInstructions.js +13 -0
  634. package/dist/presets/llmInstructions.js.map +1 -0
  635. package/dist/types/builtInNodes.d.ts +1 -1
  636. package/dist/types/builtInNodes.d.ts.map +1 -1
  637. package/dist/types/builtInNodes.js +8 -3
  638. package/dist/types/builtInNodes.js.map +1 -1
  639. package/dist/types/index.d.ts +4 -7
  640. package/dist/types/index.d.ts.map +1 -1
  641. package/dist/types/index.js.map +1 -1
  642. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  643. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  644. package/dist/types/jsonSchemaHelpers.js +7 -2
  645. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  646. package/dist/types/nodeTypes.d.ts +6 -1
  647. package/dist/types/nodeTypes.d.ts.map +1 -1
  648. package/dist/types/nodeTypes.js.map +1 -1
  649. package/dist/types/schema.d.ts.map +1 -1
  650. package/dist/types/schema.js +12 -5
  651. package/dist/types/schema.js.map +1 -1
  652. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  653. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  654. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  655. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  656. package/dist/utilities/buildEditorState.js.map +1 -1
  657. package/dist/utilities/buildInitialState.d.ts +3 -2
  658. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  659. package/dist/utilities/buildInitialState.js +1 -0
  660. package/dist/utilities/buildInitialState.js.map +1 -1
  661. package/dist/utilities/createServerFeature.d.ts +1 -1
  662. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  663. package/dist/utilities/createServerFeature.js +2 -2
  664. package/dist/utilities/createServerFeature.js.map +1 -1
  665. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  666. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  667. package/dist/utilities/editorConfigFactory.js +9 -9
  668. package/dist/utilities/editorConfigFactory.js.map +1 -1
  669. package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
  670. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  671. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  672. package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -9
  673. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  674. package/dist/utilities/fieldsDrawer/index.css +4 -4
  675. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  676. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  677. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
  678. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  679. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  680. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  681. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  682. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  683. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  684. package/dist/utilities/generateImportMap.d.ts +3 -3
  685. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  686. package/dist/utilities/generateImportMap.js +3 -7
  687. package/dist/utilities/generateImportMap.js.map +1 -1
  688. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  689. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  690. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  691. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  692. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  693. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  694. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  695. package/dist/utilities/initLexicalFeatures.js +38 -4
  696. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  697. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  698. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  699. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  700. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  701. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  702. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  703. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  704. package/dist/utilities/useLexicalFeature.js +15 -6
  705. package/dist/utilities/useLexicalFeature.js.map +1 -1
  706. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  707. package/dist/validate/hasText.d.ts +2 -2
  708. package/dist/validate/hasText.d.ts.map +1 -1
  709. package/dist/validate/hasText.js.map +1 -1
  710. package/dist/validate/index.d.ts +1 -1
  711. package/dist/validate/index.d.ts.map +1 -1
  712. package/package.json +124 -59
  713. package/dist/@types/assets.d.js +0 -2
  714. package/dist/@types/assets.d.js.map +0 -1
  715. package/dist/dependencyChecker.spec.js +0 -16
  716. package/dist/dependencyChecker.spec.js.map +0 -1
  717. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  718. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  719. package/dist/exports/client/bundled.css +0 -1
  720. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  721. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  722. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  723. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  724. package/dist/exports/client/chunk-ZYXHC5CY.js +0 -2
  725. package/dist/exports/client/chunk-ZYXHC5CY.js.map +0 -7
  726. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  727. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  728. package/dist/exports/client/componentInline-R3EPNYWF.js +0 -2
  729. package/dist/exports/server/rsc.browser.d.ts +0 -11
  730. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  731. package/dist/exports/server/rsc.browser.js +0 -10
  732. package/dist/exports/server/rsc.browser.js.map +0 -1
  733. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  734. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  735. package/dist/features/blockquote/markdownTransformer.js +0 -33
  736. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  737. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  738. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  739. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  740. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  741. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  742. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  743. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  744. package/dist/features/experimental_table/client/index.js.map +0 -1
  745. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  746. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  747. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  748. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  749. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  750. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  751. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  752. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  753. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  754. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  755. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  756. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  757. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  758. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  759. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  760. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  761. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  762. package/dist/features/experimental_table/server/index.d.ts +0 -3
  763. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  764. package/dist/features/experimental_table/server/index.js.map +0 -1
  765. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  766. package/dist/features/experimental_table/server/schema.js.map +0 -1
  767. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  768. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  769. package/dist/features/format/bold/markdownTransformers.js +0 -23
  770. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  771. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  772. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  773. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  774. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  775. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  776. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  777. package/dist/features/format/italic/markdownTransformers.js +0 -12
  778. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  779. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  780. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  781. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  782. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  783. package/dist/features/link/markdownTransformer.spec.js +0 -195
  784. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  785. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  786. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  787. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  788. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  789. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  790. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  791. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  792. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  793. package/dist/features/lists/shared/markdown.d.ts +0 -6
  794. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  795. package/dist/features/lists/shared/markdown.js +0 -57
  796. package/dist/features/lists/shared/markdown.js.map +0 -1
  797. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  798. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  799. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  800. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  801. package/dist/field/clientEntry.d.ts +0 -29
  802. package/dist/field/clientEntry.d.ts.map +0 -1
  803. package/dist/field/clientEntry.js +0 -86
  804. package/dist/field/clientEntry.js.map +0 -1
  805. package/dist/lexical/utils/guard.d.ts +0 -5
  806. package/dist/lexical/utils/guard.d.ts.map +0 -1
  807. package/dist/lexical/utils/guard.js +0 -9
  808. package/dist/lexical/utils/guard.js.map +0 -1
  809. package/dist/lexical/utils/url.spec.js +0 -114
  810. package/dist/lexical/utils/url.spec.js.map +0 -1
  811. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  812. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  813. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  814. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  815. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  816. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  817. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  818. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  819. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  820. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  821. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  822. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  823. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  824. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  825. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  826. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  827. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  828. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  829. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  830. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  831. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  832. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  833. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  834. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  835. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  836. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  837. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  838. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  839. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  840. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  841. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  842. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  843. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  844. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  845. package/dist/packages/@lexical/markdown/index.js +0 -39
  846. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  847. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  848. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  849. package/dist/packages/@lexical/markdown/utils.js +0 -267
  850. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  851. package/dist/utilities/jsx/jsx.spec.js +0 -178
  852. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  853. /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
  854. /package/dist/exports/client/{componentInline-R3EPNYWF.js.map → componentInline-AU7IBNY7.js.map} +0 -0
  855. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  856. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  857. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  858. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  859. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  860. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  861. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  862. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  863. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  864. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  865. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  866. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  867. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  868. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  869. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  870. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"buildInitialState.js","names":["fieldSchemasToFormState","buildInitialState","context","initialState","initialStateFromArgs","nodeData","node","children","type","blockNode","id","fields","schemaFieldsPath","lexicalFieldSchemaPath","blockType","formStateResult","clientFieldSchemaMap","collectionSlug","data","documentData","fieldSchemaMap","get","initialBlockData","operation","permissions","preferences","readOnly","disabled","renderAllFields","renderFieldFn","req","schemaPath","formState","currentFieldPreferences","field","name","collapsedArray","collapsed","Array","isArray","includes"],"sources":["../../src/utilities/buildInitialState.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\nimport type {\n ClientFieldSchemaMap,\n ComponentRenderer,\n DocumentPreferences,\n FieldSchemaMap,\n FormState,\n Operation,\n PayloadRequest,\n RichTextField,\n SanitizedFieldPermissions,\n} from 'payload'\n\nimport { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\n\nimport type { SerializedBlockNode } from '../types/nodeTypes.js'\n\nexport type InitialLexicalFormState = {\n [nodeID: string]: {\n [key: string]: any\n formState?: FormState\n }\n}\n\ntype Props = {\n context: {\n clientFieldSchemaMap: ClientFieldSchemaMap\n collectionSlug: string\n disabled?: boolean\n documentData?: any\n field: RichTextField\n fieldSchemaMap: FieldSchemaMap\n id?: number | string\n lexicalFieldSchemaPath: string\n operation: Operation\n permissions?: SanitizedFieldPermissions\n preferences: DocumentPreferences\n renderComponent: ComponentRenderer\n renderFieldFn: any\n req: PayloadRequest\n }\n initialState?: InitialLexicalFormState\n nodeData: SerializedLexicalNode[]\n}\n\nexport async function buildInitialState({\n context,\n initialState: initialStateFromArgs,\n nodeData,\n}: Props): Promise<InitialLexicalFormState> {\n let initialState: InitialLexicalFormState = initialStateFromArgs ?? {}\n for (const node of nodeData) {\n if ('children' in node) {\n initialState = await buildInitialState({\n context,\n initialState,\n nodeData: node.children as SerializedLexicalNode[],\n })\n }\n\n if (node.type === 'block' || node.type === 'inlineBlock') {\n const blockNode = node as SerializedBlockNode\n const id = blockNode?.fields?.id\n if (!id) {\n continue\n }\n\n const schemaFieldsPath =\n node.type === 'block'\n ? `${context.lexicalFieldSchemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockNode.fields.blockType}.fields`\n : `${context.lexicalFieldSchemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.${blockNode.fields.blockType}.fields`\n\n // Build form state for the block\n\n const formStateResult = await fieldSchemasToFormState({\n id: context.id,\n clientFieldSchemaMap: context.clientFieldSchemaMap,\n collectionSlug: context.collectionSlug,\n data: blockNode.fields,\n documentData: context.documentData,\n fields: (context.fieldSchemaMap.get(schemaFieldsPath) as any)?.fields,\n fieldSchemaMap: context.fieldSchemaMap,\n initialBlockData: blockNode.fields,\n operation: context.operation as any, // TODO: Type\n permissions: true,\n preferences: context.preferences,\n readOnly: context.disabled,\n renderAllFields: true, // If this function runs, the parent lexical field is being re-rendered => thus we can assume all its sub-fields need to be re-rendered\n renderFieldFn: context.renderFieldFn,\n req: context.req,\n schemaPath: schemaFieldsPath,\n })\n\n if (!initialState[id]) {\n initialState[id] = {}\n }\n\n initialState[id].formState = formStateResult\n\n if (node.type === 'block') {\n const currentFieldPreferences = context.preferences?.fields?.[context.field.name]\n const collapsedArray = currentFieldPreferences?.collapsed\n if (Array.isArray(collapsedArray) && collapsedArray.includes(id)) {\n initialState[id].collapsed = true\n }\n }\n }\n }\n return initialState\n}\n"],"mappings":"AAaA,SAASA,uBAAuB,QAAQ;AAgCxC,OAAO,eAAeC,kBAAkB;EACtCC,OAAO;EACPC,YAAA,EAAcC,oBAAoB;EAClCC;AAAQ,CACF;EACN,IAAIF,YAAA,GAAwCC,oBAAA,IAAwB,CAAC;EACrE,KAAK,MAAME,IAAA,IAAQD,QAAA,EAAU;IAC3B,IAAI,cAAcC,IAAA,EAAM;MACtBH,YAAA,GAAe,MAAMF,iBAAA,CAAkB;QACrCC,OAAA;QACAC,YAAA;QACAE,QAAA,EAAUC,IAAA,CAAKC;MACjB;IACF;IAEA,IAAID,IAAA,CAAKE,IAAI,KAAK,WAAWF,IAAA,CAAKE,IAAI,KAAK,eAAe;MACxD,MAAMC,SAAA,GAAYH,IAAA;MAClB,MAAMI,EAAA,GAAKD,SAAA,EAAW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QuB,WAAW,EAAEd,MAAA,GAAST,OAAA,CAAQgC,KAAK,CAACC,IAAI,CAAC;QACjF,MAAMC,cAAA,GAAiBH,uBAAA,EAAyBI,SAAA;QAChD,IAAIC,KAAA,CAAMC,OAAO,CAACH,cAAA,KAAmBA,cAAA,CAAeI,QAAQ,CAAC9B,EAAA,GAAK;UAChEP,YAAY,CAACO,EAAA,CAAG,CAAC2B,SAAS,GAAG;QAC/B;MACF;IACF;EACF;EACA,OAAOlC,YAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"buildInitialState.js","names":["fieldSchemasToFormState","buildInitialState","context","initialState","initialStateFromArgs","nodeData","node","children","type","blockNode","id","fields","schemaFieldsPath","lexicalFieldSchemaPath","blockType","formStateResult","clientFieldSchemaMap","collectionSlug","data","documentData","fieldSchemaMap","get","initialBlockData","operation","permissions","preferences","readOnly","disabled","renderAllFields","renderFieldFn","req","schemaPath","formState","currentFieldPreferences","field","name","collapsedArray","collapsed","Array","isArray","includes"],"sources":["../../src/utilities/buildInitialState.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\nimport type {\n ClientFieldSchemaMap,\n ComponentRenderer,\n DocumentPreferences,\n FieldOperation,\n FieldSchemaMap,\n FormState,\n PayloadRequest,\n RichTextField,\n SanitizedFieldPermissions,\n} from 'payload'\n\nimport { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\n\nimport type { SerializedBlockNode } from '../types/nodeTypes.js'\n\nexport type InitialLexicalFormState = {\n [nodeID: string]: {\n [key: string]: any\n formState?: FormState\n schemaPath?: string\n }\n}\n\ntype Props = {\n context: {\n clientFieldSchemaMap: ClientFieldSchemaMap\n collectionSlug: string\n disabled?: boolean\n documentData?: any\n field: RichTextField\n fieldSchemaMap: FieldSchemaMap\n id?: number | string\n lexicalFieldSchemaPath: string\n operation: FieldOperation\n permissions?: SanitizedFieldPermissions\n preferences: DocumentPreferences\n renderComponent: ComponentRenderer\n renderFieldFn: any\n req: PayloadRequest\n }\n initialState?: InitialLexicalFormState\n nodeData: SerializedLexicalNode[]\n}\n\nexport async function buildInitialState({\n context,\n initialState: initialStateFromArgs,\n nodeData,\n}: Props): Promise<InitialLexicalFormState> {\n let initialState: InitialLexicalFormState = initialStateFromArgs ?? {}\n for (const node of nodeData) {\n if ('children' in node) {\n initialState = await buildInitialState({\n context,\n initialState,\n nodeData: node.children as SerializedLexicalNode[],\n })\n }\n\n if (node.type === 'block' || node.type === 'inlineBlock') {\n const blockNode = node as SerializedBlockNode\n const id = blockNode?.fields?.id\n if (!id) {\n continue\n }\n\n const schemaFieldsPath =\n node.type === 'block'\n ? `${context.lexicalFieldSchemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockNode.fields.blockType}.fields`\n : `${context.lexicalFieldSchemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.${blockNode.fields.blockType}.fields`\n\n // Build form state for the block\n\n const formStateResult = await fieldSchemasToFormState({\n id: context.id,\n clientFieldSchemaMap: context.clientFieldSchemaMap,\n collectionSlug: context.collectionSlug,\n data: blockNode.fields,\n documentData: context.documentData,\n fields: (context.fieldSchemaMap.get(schemaFieldsPath) as any)?.fields,\n fieldSchemaMap: context.fieldSchemaMap,\n initialBlockData: blockNode.fields,\n operation: context.operation,\n permissions: true,\n preferences: context.preferences,\n readOnly: context.disabled,\n renderAllFields: true, // If this function runs, the parent lexical field is being re-rendered => thus we can assume all its sub-fields need to be re-rendered\n renderFieldFn: context.renderFieldFn,\n req: context.req,\n schemaPath: schemaFieldsPath,\n })\n\n if (!initialState[id]) {\n initialState[id] = {}\n }\n\n initialState[id].formState = formStateResult\n initialState[id].schemaPath = schemaFieldsPath\n\n if (node.type === 'block') {\n const currentFieldPreferences = context.preferences?.fields?.[context.field.name]\n const collapsedArray = currentFieldPreferences?.collapsed\n if (Array.isArray(collapsedArray) && collapsedArray.includes(id)) {\n initialState[id].collapsed = true\n }\n }\n }\n }\n return initialState\n}\n"],"mappings":"AAaA,SAASA,uBAAuB,QA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WAAA,EAAa;QACbC,WAAA,EAAavB,OAAA,CAAQuB,WAAW;QAChCC,QAAA,EAAUxB,OAAA,CAAQyB,QAAQ;QAC1BC,eAAA,EAAiB;QACjBC,aAAA,EAAe3B,OAAA,CAAQ2B,aAAa;QACpCC,GAAA,EAAK5B,OAAA,CAAQ4B,GAAG;QAChBC,UAAA,EAAYnB;MACd;MAEA,IAAI,CAACT,YAAY,CAACO,EAAA,CAAG,EAAE;QACrBP,YAAY,CAACO,EAAA,CAAG,GAAG,CAAC;MACtB;MAEAP,YAAY,CAACO,EAAA,CAAG,CAACsB,SAAS,GAAGjB,eAAA;MAC7BZ,YAAY,CAACO,EAAA,CAAG,CAACqB,UAAU,GAAGnB,gBAAA;MAE9B,IAAIN,IAAA,CAAKE,IAAI,KAAK,SAAS;QACzB,MAAMyB,uBAAA,GAA0B/B,OAAA,CAAQuB,WAAW,EAAEd,MAAA,GAAST,OAAA,CAAQgC,KAAK,CAACC,IAAI,CAAC;QACjF,MAAMC,cAAA,GAAiBH,uBAAA,EAAyBI,SAAA;QAChD,IAAIC,KAAA,CAAMC,OAAO,CAACH,cAAA,KAAmBA,cAAA,CAAeI,QAAQ,CAAC9B,EAAA,GAAK;UAChEP,YAAY,CAACO,EAAA,CAAG,CAAC2B,SAAS,GAAG;QAC/B;MACF;IACF;EACF;EACA,OAAOlC,YAAA;AACT","ignoreList":[]}
@@ -11,7 +11,7 @@ export type CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProp
11
11
  props: UnSanitizedProps;
12
12
  resolvedFeatures: ResolvedServerFeatureMap;
13
13
  unSanitizedEditorConfig: ServerEditorConfig;
14
- }) => Promise<ServerFeature<SanitizedProps, ClientProps>> | ServerFeature<SanitizedProps, ClientProps>) | Omit<ServerFeature<SanitizedProps, ClientProps>, 'sanitizedServerFeatureProps'>;
14
+ }) => ServerFeature<SanitizedProps, ClientProps>) | Omit<ServerFeature<SanitizedProps, ClientProps>, 'sanitizedServerFeatureProps'>;
15
15
  } & Pick<FeatureProviderServer<UnSanitizedProps, ClientProps>, 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'>;
16
16
  export declare const createServerFeature: <UnSanitizedProps = undefined, SanitizedProps = UnSanitizedProps, ClientProps = undefined>(args: CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps>) => FeatureProviderProviderServer<UnSanitizedProps, SanitizedProps, ClientProps>;
17
17
  //# sourceMappingURL=createServerFeature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createServerFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/createServerFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,wBAAwB,EACzB,MAAM,4BAA4B,CAAA;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,MAAM,MAAM,uBAAuB,CAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,IAAI;IACnF,OAAO,EACH,CAAC,CAAC,KAAK,EAAE;QACP,MAAM,EAAE,eAAe,CAAA;QACvB,mDAAmD;QACnD,kBAAkB,EAAE,wBAAwB,CAAA;QAC5C,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,iBAAiB,EAAE,OAAO,CAAA;QAC1B,KAAK,EAAE,gBAAgB,CAAA;QAEvB,gBAAgB,EAAE,wBAAwB,CAAA;QAE1C,uBAAuB,EAAE,kBAAkB,CAAA;KAC5C,KACG,OAAO,CAAC,aAAa,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,GACnD,aAAa,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,GAC/C,IAAI,CAAC,aAAa,CAAC,cAAc,EAAE,WAAW,CAAC,EAAE,6BAA6B,CAAC,CAAA;CACpF,GAAG,IAAI,CACN,qBAAqB,CAAC,gBAAgB,EAAE,WA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AG,kBAAkB,GAAG,KAAK,CACrE,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,CAChC,gBAAgB,GAAG,SAAS,EAC5B,cAAc,GAAG,gBAAgB,EACjC,WAAW,GAAG,SAAS,EAEvB,IAAI,EAAE,uBAAuB,CAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,CAAC,KACzE,6BAA6B,CAAC,gBAAgB,EAAE,cAAc,EAAE,WAAW,CAmD/E,CAAA"}
@@ -14,7 +14,7 @@ export const createServerFeature = ({
14
14
  serverFeatureProps: props
15
15
  };
16
16
  if (typeof feature === 'function') {
17
- featureProviderServer.feature = async ({
17
+ featureProviderServer.feature = ({
18
18
  config,
19
19
  featureProviderMap,
20
20
  isRoot,
@@ -22,7 +22,7 @@ export const createServerFeature = ({
22
22
  resolvedFeatures,
23
23
  unSanitizedEditorConfig
24
24
  }) => {
25
- const toReturn = await feature({
25
+ const toReturn = feature({
26
26
  config,
27
27
  featureProviderMap,
28
28
  isRoot,
@@ -1 +1 @@
1
- {"version":3,"file":"createServerFeature.js","names":["createServerFeature","dependencies","dependenciesPriority","dependenciesSoft","feature","key","featureProviderProviderServer","props","featureProviderServer","serverFeatureProps","config","featureProviderMap","isRoot","parentIsLocalized","resolvedFeatures","unSanitizedEditorConfig","toReturn","sanitizedServerFeatureProps","newFeature"],"sources":["../../src/utilities/createServerFeature.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n FeatureProviderProviderServer,\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n ServerFeature,\n ServerFeatureProviderMap,\n} from '../features/typesServer.js'\nimport type { ServerEditorConfig } from '../lexical/config/types.js'\n\nexport type CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps> = {\n feature:\n | ((props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n parentIsLocalized: boolean\n props: UnSanitizedProps\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<SanitizedProps, ClientProps>>\n | ServerFeature<SanitizedProps, ClientProps>)\n | Omit<ServerFeature<SanitizedProps, ClientProps>, 'sanitizedServerFeatureProps'>\n} & Pick<\n FeatureProviderServer<UnSanitizedProps, ClientProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n>\n\nexport const createServerFeature: <\n UnSanitizedProps = undefined,\n SanitizedProps = UnSanitizedProps,\n ClientProps = undefined,\n>(\n args: CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps>,\n) => FeatureProviderProviderServer<UnSanitizedProps, SanitizedProps, ClientProps> = ({\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n feature,\n key,\n}) => {\n const featureProviderProviderServer: FeatureProviderProviderServer<any, any, any> = (props) => {\n const featureProviderServer: Partial<FeatureProviderServer<any, any, any>> = {\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n key,\n serverFeatureProps: props,\n }\n\n if (typeof feature === 'function') {\n featureProviderServer.feature = async ({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n resolvedFeatures,\n unSanitizedEditorConfig,\n }) => {\n const toReturn = await feature({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n props,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n\n if (toReturn.sanitizedServerFeatureProps === null) {\n toReturn.sanitizedServerFeatureProps = props\n }\n return toReturn\n }\n } else {\n // For explanation why we have to spread feature, see createClientFeature.ts\n const newFeature: ServerFeature<any, any> = { ...feature }\n\n newFeature.sanitizedServerFeatureProps = props\n featureProviderServer.feature = newFeature\n }\n return featureProviderServer as FeatureProviderServer<any, any, any>\n }\n\n return featureProviderProviderServer\n}\n"],"mappings":"AAiCA,OAAO,MAAMA,mBAAA,GAMuEA,CAAC;EACnFC,YAAY;EACZC,oBAAoB;EACpBC,gBAAgB;EAChBC,OAAO;EACPC;AAAG,CACJ;EACC,MAAMC,6BAAA,GAA+EC,KAAA;IACnF,MAAMC,qBAAA,GAAuE;MAC3EP,YAAA;MACAC,oBAAA;MACAC,gBAAA;MACAE,GAAA;MACAI,kBAAA,EAAoBF;IACtB;IAEA,IAAI,OAAOH,OAAA,KAAY,YAAY;MACjCI,qBAAA,CAAsBJ,OAAO,GAAG,OAAO;QACrCM,MAAM;QACNC,kBAAkB;QAClBC,MAAM;QACNC,iBAAiB;QACjBC,gBAAgB;QAChBC;MAAuB,CACxB;QACC,MAAMC,QAAA,GAAW,MAAMZ,OAAA,CAAQ;UAC7BM,MAAA;UACAC,kBAAA;UACAC,MAAA;UACAC,iBAAA;UACAN,KAAA;UACAO,gBAAA;UACAC;QACF;QAEA,IAAIC,QAAA,CAASC,2BAA2B,KAAK,MAAM;UACjDD,QAAA,CAASC,2BAA2B,GAAGV,KAAA;QACzC;QACA,OAAOS,QAAA;MACT;IACF,OAAO;MACL;MACA,MAAME,UAAA,GAAsC;QAAE,GAAGd;MAAQ;MAEzDc,UAAA,CAAWD,2BAA2B,GAAGV,KAAA;MACzCC,qBAAA,CAAsBJ,OAAO,GAAGc,UAAA;IAClC;IACA,OAAOV,qBAAA;EACT;EAEA,OAAOF,6BAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"createServerFeature.js","names":["createServerFeature","dependencies","dependenciesPriority","dependenciesSoft","feature","key","featureProviderProviderServer","props","featureProviderServer","serverFeatureProps","config","featureProviderMap","isRoot","parentIsLocalized","resolvedFeatures","unSanitizedEditorConfig","toReturn","sanitizedServerFeatureProps","newFeature"],"sources":["../../src/utilities/createServerFeature.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport type {\n FeatureProviderProviderServer,\n FeatureProviderServer,\n ResolvedServerFeatureMap,\n ServerFeature,\n ServerFeatureProviderMap,\n} from '../features/typesServer.js'\nimport type { ServerEditorConfig } from '../lexical/config/types.js'\n\nexport type CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps> = {\n feature:\n | ((props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n parentIsLocalized: boolean\n props: UnSanitizedProps\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) => ServerFeature<SanitizedProps, ClientProps>)\n | Omit<ServerFeature<SanitizedProps, ClientProps>, 'sanitizedServerFeatureProps'>\n} & Pick<\n FeatureProviderServer<UnSanitizedProps, ClientProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n>\n\nexport const createServerFeature: <\n UnSanitizedProps = undefined,\n SanitizedProps = UnSanitizedProps,\n ClientProps = undefined,\n>(\n args: CreateServerFeatureArgs<UnSanitizedProps, SanitizedProps, ClientProps>,\n) => FeatureProviderProviderServer<UnSanitizedProps, SanitizedProps, ClientProps> = ({\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n feature,\n key,\n}) => {\n const featureProviderProviderServer: FeatureProviderProviderServer<any, any, any> = (props) => {\n const featureProviderServer: Partial<FeatureProviderServer<any, any, any>> = {\n dependencies,\n dependenciesPriority,\n dependenciesSoft,\n key,\n serverFeatureProps: props,\n }\n\n if (typeof feature === 'function') {\n featureProviderServer.feature = ({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n resolvedFeatures,\n unSanitizedEditorConfig,\n }) => {\n const toReturn = feature({\n config,\n featureProviderMap,\n isRoot,\n parentIsLocalized,\n props,\n resolvedFeatures,\n unSanitizedEditorConfig,\n })\n\n if (toReturn.sanitizedServerFeatureProps === null) {\n toReturn.sanitizedServerFeatureProps = props\n }\n return toReturn\n }\n } else {\n // For explanation why we have to spread feature, see createClientFeature.ts\n const newFeature: ServerFeature<any, any> = { ...feature }\n\n newFeature.sanitizedServerFeatureProps = props\n featureProviderServer.feature = newFeature\n }\n return featureProviderServer as FeatureProviderServer<any, any, any>\n }\n\n return featureProviderProviderServer\n}\n"],"mappings":"AA+BA,OAAO,MAAMA,mBAAA,GAMuEA,CAAC;EACnFC,YAAY;EACZC,oBAAoB;EACpBC,gBAAgB;EAChBC,OAAO;EACPC;AAAG,CACJ;EACC,MAAMC,6BAAA,GAA+EC,KAAA;IACnF,MAAMC,qBAAA,GAAuE;MAC3EP,YAAA;MACAC,oBAAA;MACAC,gBAAA;MACAE,GAAA;MACAI,kBAAA,EAAoBF;IACtB;IAEA,IAAI,OAAOH,OAAA,KAAY,YAAY;MACjCI,qBAAA,CAAsBJ,OAAO,GAAG,CAAC;QAC/BM,MAAM;QACNC,kBAAkB;QAClBC,MAAM;QACNC,iBAAiB;QACjBC,gBAAgB;QAChBC;MAAuB,CACxB;QACC,MAAMC,QAAA,GAAWZ,OAAA,CAAQ;UACvBM,MAAA;UACAC,kBAAA;UACAC,MAAA;UACAC,iBAAA;UACAN,KAAA;UACAO,gBAAA;UACAC;QACF;QAEA,IAAIC,QAAA,CAASC,2BAA2B,KAAK,MAAM;UACjDD,QAAA,CAASC,2BAA2B,GAAGV,KAAA;QACzC;QACA,OAAOS,QAAA;MACT;IACF,OAAO;MACL;MACA,MAAME,UAAA,GAAsC;QAAE,GAAGd;MAAQ;MAEzDc,UAAA,CAAWD,2BAA2B,GAAGV,KAAA;MACzCC,qBAAA,CAAsBJ,OAAO,GAAGc,UAAA;IAClC;IACA,OAAOV,qBAAA;EACT;EAEA,OAAOF,6BAAA;AACT","ignoreList":[]}
@@ -7,7 +7,7 @@ export declare const editorConfigFactory: {
7
7
  default: (args: {
8
8
  config: SanitizedConfig;
9
9
  parentIsLocalized?: boolean;
10
- }) => Promise<SanitizedServerEditorConfig>;
10
+ }) => SanitizedServerEditorConfig;
11
11
  /**
12
12
  * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),
13
13
  * you can extract the editor config from it.
@@ -22,7 +22,7 @@ export declare const editorConfigFactory: {
22
22
  isRoot?: boolean;
23
23
  lexical?: LexicalEditorConfig;
24
24
  parentIsLocalized?: boolean;
25
- }) => Promise<SanitizedServerEditorConfig>;
25
+ }) => SanitizedServerEditorConfig;
26
26
  /**
27
27
  * Create a new editor config - behaves just like instantiating a new `lexicalEditor`
28
28
  */
@@ -32,7 +32,7 @@ export declare const editorConfigFactory: {
32
32
  isRoot?: boolean;
33
33
  lexical?: LexicalEditorConfig;
34
34
  parentIsLocalized?: boolean;
35
- }) => Promise<SanitizedServerEditorConfig>;
35
+ }) => SanitizedServerEditorConfig;
36
36
  fromField: (args: {
37
37
  field: RichTextField;
38
38
  }) => SanitizedServerEditorConfig;
@@ -41,7 +41,7 @@ export declare const editorConfigFactory: {
41
41
  field: RichTextField;
42
42
  isRoot?: boolean;
43
43
  parentIsLocalized?: boolean;
44
- }) => Promise<SanitizedServerEditorConfig>;
44
+ }) => SanitizedServerEditorConfig;
45
45
  };
46
46
  export declare const featuresInputToEditorConfig: (args: {
47
47
  config: SanitizedConfig;
@@ -49,9 +49,9 @@ export declare const featuresInputToEditorConfig: (args: {
49
49
  isRoot?: boolean;
50
50
  lexical?: LexicalEditorConfig;
51
51
  parentIsLocalized?: boolean;
52
- }) => Promise<{
52
+ }) => {
53
53
  features: FeatureProviderServer<unknown, unknown, unknown>[];
54
54
  resolvedFeatureMap: ResolvedServerFeatureMap;
55
55
  sanitizedConfig: SanitizedServerEditorConfig;
56
- }>;
56
+ };
57
57
  //# sourceMappingURL=editorConfigFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editorConfigFactory.d.ts","sourceRoot":"","sources":["../../src/utilities/editorConfigFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,KAAK,EAA2B,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEtF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AmB,CAAA;QAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,2BAA2B;IAG/B,SAAS,SAAS;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,KAAG,2BAA2B;IAMxE,oBAAoB,SAAS;QAC3B,MAAM,EAAE,eAAe,CAAA;QACvB,KAAK,EAAE,aAAa,CAAA;QACpB,MAAM,CAAC,EAAE,OAAO,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC5B,KAAG,2BAA2B;CAahC,CAAA;AAED,eAAO,MAAM,2BAA2B,SAAU;IAChD,MAAM,EAAE,eAAe,CAAA;IACvB,QAAQ,CAAC,EAAE,aAAa,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,KAAG;IACF,QAAQ,EAAE,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,CAAA;IAC5D,kBAAkB,EAAE,wBAAwB,CAAA;IAC5C,eAAe,EAAE,2BAA2B,CAAA;CA0C7C,CAAA"}
@@ -3,7 +3,7 @@ import { loadFeatures } from '../lexical/config/server/loader.js';
3
3
  import { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js';
4
4
  import { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js';
5
5
  export const editorConfigFactory = {
6
- default: async args => {
6
+ default: args => {
7
7
  return getDefaultSanitizedEditorConfig({
8
8
  config: args.config,
9
9
  parentIsLocalized: args.parentIsLocalized ?? false
@@ -17,8 +17,8 @@ export const editorConfigFactory = {
17
17
  * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg
18
18
  * into a separate variable and use `fromFeatures` instead.
19
19
  */
20
- fromEditor: async args => {
21
- const lexicalAdapter = await args.editor({
20
+ fromEditor: args => {
21
+ const lexicalAdapter = args.editor({
22
22
  config: args.config,
23
23
  isRoot: args.isRoot ?? false,
24
24
  parentIsLocalized: args.parentIsLocalized ?? false
@@ -29,17 +29,17 @@ export const editorConfigFactory = {
29
29
  /**
30
30
  * Create a new editor config - behaves just like instantiating a new `lexicalEditor`
31
31
  */
32
- fromFeatures: async args => {
33
- return (await featuresInputToEditorConfig(args)).sanitizedConfig;
32
+ fromFeatures: args => {
33
+ return featuresInputToEditorConfig(args).sanitizedConfig;
34
34
  },
35
35
  fromField: args => {
36
36
  const lexicalAdapter = args.field.editor;
37
37
  const sanitizedServerEditorConfig = lexicalAdapter.editorConfig;
38
38
  return sanitizedServerEditorConfig;
39
39
  },
40
- fromUnsanitizedField: async args => {
40
+ fromUnsanitizedField: args => {
41
41
  const lexicalAdapterProvider = args.field.editor;
42
- const lexicalAdapter = await lexicalAdapterProvider({
42
+ const lexicalAdapter = lexicalAdapterProvider({
43
43
  config: args.config,
44
44
  isRoot: args.isRoot ?? false,
45
45
  parentIsLocalized: args.parentIsLocalized ?? false
@@ -48,7 +48,7 @@ export const editorConfigFactory = {
48
48
  return sanitizedServerEditorConfig;
49
49
  }
50
50
  };
51
- export const featuresInputToEditorConfig = async args => {
51
+ export const featuresInputToEditorConfig = args => {
52
52
  let features = [];
53
53
  if (args.features && typeof args.features === 'function') {
54
54
  const rootEditor = args.config.editor;
@@ -67,7 +67,7 @@ export const featuresInputToEditorConfig = async args => {
67
67
  features = defaultEditorFeatures;
68
68
  }
69
69
  const lexical = args.lexical ?? defaultEditorConfig.lexical;
70
- const resolvedFeatureMap = await loadFeatures({
70
+ const resolvedFeatureMap = loadFeatures({
71
71
  config: args.config,
72
72
  isRoot: args.isRoot ?? false,
73
73
  parentIsLocalized: args.parentIsLocalized ?? false,
@@ -1 +1 @@
1
- {"version":3,"file":"editorConfigFactory.js","names":["defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerFeatures","getDefaultSanitizedEditorConfig","editorConfigFactory","default","args","config","parentIsLocalized","fromEditor","lexicalAdapter","editor","isRoot","sanitizedServerEditorConfig","editorConfig","fromFeatures","featuresInputToEditorConfig","sanitizedConfig","fromField","field","fromUnsanitizedField","lexicalAdapterProvider","features","rootEditor","rootEditorFeatures","defaultFeatures","rootFeatures","lexical","resolvedFeatureMap","unSanitizedEditorConfig"],"sources":["../../src/utilities/editorConfigFactory.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { RichTextAdapterProvider, RichTextField, SanitizedConfig } from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type {\n FeaturesInput,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from '../types/index.js'\n\nimport { defaultEditorConfig, defaultEditorFeatures } from '../lexical/config/server/default.js'\nimport { loadFeatures } from '../lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js'\nimport { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js'\n\nexport const editorConfigFactory = {\n default: async (args: {\n config: SanitizedConfig\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n return getDefaultSanitizedEditorConfig({\n config: args.config,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n },\n /**\n * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),\n * you can extract the editor config from it.\n * This is common if you define the editor in a re-usable module scope variable and pass it to the richText field.\n *\n * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg\n * into a separate variable and use `fromFeatures` instead.\n */\n fromEditor: async (args: {\n config: SanitizedConfig\n editor: LexicalRichTextAdapterProvider\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n const lexicalAdapter: LexicalRichTextAdapter = await args.editor({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n /**\n * Create a new editor config - behaves just like instantiating a new `lexicalEditor`\n */\n fromFeatures: async (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n return (await featuresInputToEditorConfig(args)).sanitizedConfig\n },\n fromField: (args: { field: RichTextField }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.field.editor as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n fromUnsanitizedField: async (args: {\n config: SanitizedConfig\n field: RichTextField\n isRoot?: boolean\n parentIsLocalized?: boolean\n }): Promise<SanitizedServerEditorConfig> => {\n const lexicalAdapterProvider: RichTextAdapterProvider = args.field\n .editor as RichTextAdapterProvider\n\n const lexicalAdapter: LexicalRichTextAdapter = (await lexicalAdapterProvider({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })) as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n}\n\nexport const featuresInputToEditorConfig = async (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n}): Promise<{\n features: FeatureProviderServer<unknown, unknown, unknown>[]\n resolvedFeatureMap: ResolvedServerFeatureMap\n sanitizedConfig: SanitizedServerEditorConfig\n}> => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (args.features && typeof args.features === 'function') {\n const rootEditor = args.config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n features = args.features({\n defaultFeatures: defaultEditorFeatures,\n rootFeatures: rootEditorFeatures,\n })\n } else {\n features = args.features as FeatureProviderServer<unknown, unknown, unknown>[]\n }\n\n if (!features) {\n features = defaultEditorFeatures\n }\n\n const lexical = args.lexical ?? defaultEditorConfig.lexical\n\n const resolvedFeatureMap = await loadFeatures({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n return {\n features,\n resolvedFeatureMap,\n sanitizedConfig: {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: args.lexical,\n resolvedFeatureMap,\n },\n }\n}\n"],"mappings":"AAWA,SAASA,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAsB;EACjCC,OAAA,EAAS,MAAOC,IAAA;IAId,OAAOH,+BAAA,CAAgC;MACrCI,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBC,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;EACF;EACA;;;;;;;;EAQAC,UAAA,EAAY,MAAOH,IAAA;IAOjB,MAAMI,cAAA,GAAyC,MAAMJ,IAAA,CAAKK,MAAM,CAAC;MAC/DJ,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;MACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC/C;IAEA,MAAMK,2BAAA,GAA2DH,cAAA,CAAeI,YAAY;IAC5F,OAAOD,2BAAA;EACT;EACA;;;EAGAE,YAAA,EAAc,MAAOT,IAAA;IAOnB,OAAO,CAAC,MAAMU,2BAAA,CAA4BV,IAAA,CAAI,EAAGW,eAAe;EAClE;EACAC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AAM3B,YAAA,CAAa;IAC5CM,MAAA,EAAQD,IAAA,CAAKC,MAAM;IACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;IACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC7CqB,uBAAA,EAAyB;MACvBP,QAAA;MACAK;IACF;EACF;EAEA,OAAO;IACLL,QAAA;IACAM,kBAAA;IACAX,eAAA,EAAiB;MACfK,QAAA,EAAUpB,sBAAA,CAAuB0B,kBAAA;MACjCD,OAAA,EAASrB,IAAA,CAAKqB,OAAO;MACrBC;IACF;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"editorConfigFactory.js","names":["defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerFeatures","getDefaultSanitizedEditorConfig","editorConfigFactory","default","args","config","parentIsLocalized","fromEditor","lexicalAdapter","editor","isRoot","sanitizedServerEditorConfig","editorConfig","fromFeatures","featuresInputToEditorConfig","sanitizedConfig","fromField","field","fromUnsanitizedField","lexicalAdapterProvider","features","rootEditor","rootEditorFeatures","defaultFeatures","rootFeatures","lexical","resolvedFeatureMap","unSanitizedEditorConfig"],"sources":["../../src/utilities/editorConfigFactory.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { RichTextAdapterProvider, RichTextField, SanitizedConfig } from 'payload'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\nimport type {\n FeaturesInput,\n LexicalRichTextAdapter,\n LexicalRichTextAdapterProvider,\n} from '../types/index.js'\n\nimport { defaultEditorConfig, defaultEditorFeatures } from '../lexical/config/server/default.js'\nimport { loadFeatures } from '../lexical/config/server/loader.js'\nimport { sanitizeServerFeatures } from '../lexical/config/server/sanitize.js'\nimport { getDefaultSanitizedEditorConfig } from './getDefaultSanitizedEditorConfig.js'\n\nexport const editorConfigFactory = {\n default: (args: {\n config: SanitizedConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n return getDefaultSanitizedEditorConfig({\n config: args.config,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n },\n /**\n * If you have instantiated a lexical editor and are accessing it outside a field (=> this is the unsanitized editor),\n * you can extract the editor config from it.\n * This is common if you define the editor in a re-usable module scope variable and pass it to the richText field.\n *\n * This is the least efficient way to get the editor config, and not recommended. It is recommended to extract the `features` arg\n * into a separate variable and use `fromFeatures` instead.\n */\n fromEditor: (args: {\n config: SanitizedConfig\n editor: LexicalRichTextAdapterProvider\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.editor({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n })\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n /**\n * Create a new editor config - behaves just like instantiating a new `lexicalEditor`\n */\n fromFeatures: (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n return featuresInputToEditorConfig(args).sanitizedConfig\n },\n fromField: (args: { field: RichTextField }): SanitizedServerEditorConfig => {\n const lexicalAdapter: LexicalRichTextAdapter = args.field.editor as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n fromUnsanitizedField: (args: {\n config: SanitizedConfig\n field: RichTextField\n isRoot?: boolean\n parentIsLocalized?: boolean\n }): SanitizedServerEditorConfig => {\n const lexicalAdapterProvider: RichTextAdapterProvider = args.field\n .editor as RichTextAdapterProvider\n\n const lexicalAdapter: LexicalRichTextAdapter = lexicalAdapterProvider({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n }) as LexicalRichTextAdapter\n\n const sanitizedServerEditorConfig: SanitizedServerEditorConfig = lexicalAdapter.editorConfig\n return sanitizedServerEditorConfig\n },\n}\n\nexport const featuresInputToEditorConfig = (args: {\n config: SanitizedConfig\n features?: FeaturesInput\n isRoot?: boolean\n lexical?: LexicalEditorConfig\n parentIsLocalized?: boolean\n}): {\n features: FeatureProviderServer<unknown, unknown, unknown>[]\n resolvedFeatureMap: ResolvedServerFeatureMap\n sanitizedConfig: SanitizedServerEditorConfig\n} => {\n let features: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (args.features && typeof args.features === 'function') {\n const rootEditor = args.config.editor\n let rootEditorFeatures: FeatureProviderServer<unknown, unknown, unknown>[] = []\n if (typeof rootEditor === 'object' && 'features' in rootEditor) {\n rootEditorFeatures = (rootEditor as LexicalRichTextAdapter).features\n }\n features = args.features({\n defaultFeatures: defaultEditorFeatures,\n rootFeatures: rootEditorFeatures,\n })\n } else {\n features = args.features as FeatureProviderServer<unknown, unknown, unknown>[]\n }\n\n if (!features) {\n features = defaultEditorFeatures\n }\n\n const lexical = args.lexical ?? defaultEditorConfig.lexical\n\n const resolvedFeatureMap = loadFeatures({\n config: args.config,\n isRoot: args.isRoot ?? false,\n parentIsLocalized: args.parentIsLocalized ?? false,\n unSanitizedEditorConfig: {\n features,\n lexical,\n },\n })\n\n return {\n features,\n resolvedFeatureMap,\n sanitizedConfig: {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: args.lexical,\n resolvedFeatureMap,\n },\n }\n}\n"],"mappings":"AAWA,SAASA,mBAAmB,EAAEC,qBAAqB,QAAQ;AAC3D,SAASC,YAAY,QAAQ;AAC7B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,+BAA+B,QAAQ;AAEhD,OAAO,MAAMC,mBAAA,GAAsB;EACjCC,OAAA,EAAUC,IAAA;IAIR,OAAOH,+BAAA,CAAgC;MACrCI,MAAA,EAAQD,IAAA,CAAKC,MAAM;MACnBC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E,IAAI,OAAOD,UAAA,KAAe,YAAY,cAAcA,UAAA,EAAY;MAC9DC,kBAAA,GAAqBD,UAAC,CAAsCD,QAAQ;IACtE;IACAA,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ,CAAC;MACvBG,eAAA,EAAiBzB,qBAAA;MACjB0B,YAAA,EAAcF;IAChB;EACF,OAAO;IACLF,QAAA,GAAWhB,IAAA,CAAKgB,QAAQ;EAC1B;EAEA,IAAI,CAACA,QAAA,EAAU;IACbA,QAAA,GAAWtB,qBAAA;EACb;EAEA,MAAM2B,OAAA,GAAUrB,IAAA,CAAKqB,OAAO,IAAI5B,mBAAA,CAAoB4B,OAAO;EAE3D,MAAMC,kBAAA,GAAqB3B,YAAA,CAAa;IACtCM,MAAA,EAAQD,IAAA,CAAKC,MAAM;IACnBK,MAAA,EAAQN,IAAA,CAAKM,MAAM,IAAI;IACvBJ,iBAAA,EAAmBF,IAAA,CAAKE,iBAAiB,IAAI;IAC7CqB,uBAAA,EAAyB;MACvBP,QAAA;MACAK;IACF;EACF;EAEA,OAAO;IACLL,QAAA;IACAM,kBAAA;IACAX,eAAA,EAAiB;MACfK,QAAA,EAAUpB,sBAAA,CAAuB0B,kBAAA;MACjCD,OAAA,EAASrB,IAAA,CAAKqB,OAAO;MACrBC;IACF;EACF;AACF","ignoreList":[]}
@@ -12,7 +12,7 @@ import { useDrawerSubmit } from './useDrawerSubmit.js';
12
12
  * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.
13
13
  */
14
14
  export const FieldsDrawer = t0 => {
15
- const $ = _c(17);
15
+ const $ = _c(18);
16
16
  const {
17
17
  className,
18
18
  data,
@@ -32,30 +32,29 @@ export const FieldsDrawer = t0 => {
32
32
  headerActions,
33
33
  submitRef
34
34
  } = useDrawerSubmit();
35
- const t1 = drawerTitle ?? "";
36
- let t2;
37
- if ($[0] !== closeModal || $[1] !== drawerSlug || $[2] !== handleDrawerSubmit) {
38
- t2 = (args, args2) => {
39
- closeModal(drawerSlug);
40
- setTimeout(() => {
41
- handleDrawerSubmit(args, args2);
42
- }, 1);
43
- };
44
- $[0] = closeModal;
45
- $[1] = drawerSlug;
46
- $[2] = handleDrawerSubmit;
47
- $[3] = t2;
48
- } else {
49
- t2 = $[3];
50
- }
51
- let t3;
52
- if ($[4] !== className || $[5] !== data || $[6] !== drawerSlug || $[7] !== featureKey || $[8] !== fieldMapOverride || $[9] !== headerActions || $[10] !== schemaFieldsPathOverride || $[11] !== schemaPath || $[12] !== schemaPathSuffix || $[13] !== submitRef || $[14] !== t1 || $[15] !== t2) {
53
- t3 = _jsx(EditDepthProvider, {
35
+ let t1;
36
+ if ($[0] !== className || $[1] !== closeModal || $[2] !== data || $[3] !== drawerSlug || $[4] !== drawerTitle || $[5] !== featureKey || $[6] !== fieldMapOverride || $[7] !== handleDrawerSubmit || $[8] !== headerActions || $[9] !== schemaFieldsPathOverride || $[10] !== schemaPath || $[11] !== schemaPathSuffix || $[12] !== submitRef) {
37
+ let t2;
38
+ if ($[14] !== closeModal || $[15] !== drawerSlug || $[16] !== handleDrawerSubmit) {
39
+ t2 = (args, args2) => {
40
+ closeModal(drawerSlug);
41
+ setTimeout(() => {
42
+ handleDrawerSubmit(args, args2);
43
+ }, 1);
44
+ };
45
+ $[14] = closeModal;
46
+ $[15] = drawerSlug;
47
+ $[16] = handleDrawerSubmit;
48
+ $[17] = t2;
49
+ } else {
50
+ t2 = $[17];
51
+ }
52
+ t1 = _jsx(EditDepthProvider, {
54
53
  children: _jsx(Drawer, {
55
54
  className,
56
55
  headerActions,
57
56
  slug: drawerSlug,
58
- title: t1,
57
+ title: drawerTitle ?? "",
59
58
  children: _jsx(DrawerContent, {
60
59
  data,
61
60
  featureKey,
@@ -68,22 +67,23 @@ export const FieldsDrawer = t0 => {
68
67
  })
69
68
  })
70
69
  });
71
- $[4] = className;
72
- $[5] = data;
73
- $[6] = drawerSlug;
74
- $[7] = featureKey;
75
- $[8] = fieldMapOverride;
76
- $[9] = headerActions;
77
- $[10] = schemaFieldsPathOverride;
78
- $[11] = schemaPath;
79
- $[12] = schemaPathSuffix;
80
- $[13] = submitRef;
81
- $[14] = t1;
82
- $[15] = t2;
83
- $[16] = t3;
70
+ $[0] = className;
71
+ $[1] = closeModal;
72
+ $[2] = data;
73
+ $[3] = drawerSlug;
74
+ $[4] = drawerTitle;
75
+ $[5] = featureKey;
76
+ $[6] = fieldMapOverride;
77
+ $[7] = handleDrawerSubmit;
78
+ $[8] = headerActions;
79
+ $[9] = schemaFieldsPathOverride;
80
+ $[10] = schemaPath;
81
+ $[11] = schemaPathSuffix;
82
+ $[12] = submitRef;
83
+ $[13] = t1;
84
84
  } else {
85
- t3 = $[16];
85
+ t1 = $[13];
86
86
  }
87
- return t3;
87
+ return t1;
88
88
  };
89
89
  //# sourceMappingURL=Drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.js","names":["c","_c","Drawer","EditDepthProvider","useModal","React","DrawerContent","useDrawerSubmit","FieldsDrawer","t0","$","className","data","drawerSlug","drawerTitle","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","closeModal","headerActions","submitRef","t1","t2","args","args2","setTimeout","t3","_jsx","children","slug","title"],"sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"sourcesContent":["'use client'\nimport type { ClientField, Data, FormState, JsonObject } from 'payload'\n\nimport { Drawer, EditDepthProvider, useModal } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\nimport { useDrawerSubmit } from './useDrawerSubmit.js'\n\nexport type FieldsDrawerProps = {\n readonly className?: string\n readonly data?: Data\n readonly drawerSlug: string\n readonly drawerTitle?: string\n readonly featureKey: string\n readonly fieldMapOverride?: ClientField[]\n readonly handleDrawerSubmit: (fields: FormState, data: JsonObject) => void\n readonly schemaFieldsPathOverride?: string\n readonly schemaPath: string\n readonly schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { closeModal } = useModal()\n const { headerActions, submitRef } = useDrawerSubmit()\n\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <EditDepthProvider>\n <Drawer\n className={className}\n headerActions={headerActions}\n slug={drawerSlug}\n title={drawerTitle ?? ''}\n >\n <DrawerContent\n data={data}\n featureKey={featureKey}\n fieldMapOverride={fieldMapOverride}\n handleDrawerSubmit={(args, args2) => {\n // Simply close drawer - no need for useLexicalDrawer here as at this point,\n // we don't need to restore the cursor position. This is handled by the useEffect in useLexicalDrawer.\n closeModal(drawerSlug)\n\n // Actual drawer submit logic needs to be triggered after the drawer is closed.\n // That's because the lexical selection / cursor restore logic that is striggerer by\n // `useLexicalDrawer` neeeds to be triggered before any editor.update calls that may happen\n // in the `handleDrawerSubmit` function.\n setTimeout(() => {\n handleDrawerSubmit(args, args2)\n }, 1)\n }}\n schemaFieldsPathOverride={schemaFieldsPathOverride}\n schemaPath={schemaPath}\n schemaPathSuffix={schemaPathSuffix}\n submitRef={submitRef}\n />\n </Drawer>\n </EditDepthProvider>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ;AACpD,OAAOC,KAAA,MAAW;AAElB,SAASC,aAAa,QAAQ;AAC9B,SAASC,eAAe,QAAQ;AAehC;;;;;AAKA,OAAO,MAAMC,YAAA,GAA4CC,EAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EAA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UAAAM,IAAA;UAAAG,UAAA;UAAAC,gBAAA;UAAAC,kBAAA,EAIsBQ,EAYpB;UAAAP,wBAAA;UAAAC,UAAA;UAAAC,gBAAA;UAAAG;QAAA,C;;;;;;;;;;;;;;;;;;;SAvBNM,E;CAgCJ","ignoreList":[]}
1
+ {"version":3,"file":"Drawer.js","names":["c","_c","Drawer","EditDepthProvider","useModal","React","DrawerContent","useDrawerSubmit","FieldsDrawer","t0","$","className","data","drawerSlug","drawerTitle","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","closeModal","headerActions","submitRef","t1","t2","args","args2","setTimeout","_jsx","children","slug","title"],"sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"sourcesContent":["'use client'\nimport type { ClientField, Data, FormState, JsonObject } from 'payload'\n\nimport { Drawer, EditDepthProvider, useModal } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\nimport { useDrawerSubmit } from './useDrawerSubmit.js'\n\nexport type FieldsDrawerProps = {\n readonly className?: string\n readonly data?: Data\n readonly drawerSlug: string\n readonly drawerTitle?: string\n readonly featureKey: string\n readonly fieldMapOverride?: ClientField[]\n readonly handleDrawerSubmit: (fields: FormState, data: JsonObject) => void\n readonly schemaFieldsPathOverride?: string\n readonly schemaPath: string\n readonly schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n}) => {\n const { closeModal } = useModal()\n const { headerActions, submitRef } = useDrawerSubmit()\n\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <EditDepthProvider>\n <Drawer\n className={className}\n headerActions={headerActions}\n slug={drawerSlug}\n title={drawerTitle ?? ''}\n >\n <DrawerContent\n data={data}\n featureKey={featureKey}\n fieldMapOverride={fieldMapOverride}\n handleDrawerSubmit={(args, args2) => {\n // Simply close drawer - no need for useLexicalDrawer here as at this point,\n // we don't need to restore the cursor position. This is handled by the useEffect in useLexicalDrawer.\n closeModal(drawerSlug)\n\n // Actual drawer submit logic needs to be triggered after the drawer is closed.\n // That's because the lexical selection / cursor restore logic that is striggerer by\n // `useLexicalDrawer` neeeds to be triggered before any editor.update calls that may happen\n // in the `handleDrawerSubmit` function.\n setTimeout(() => {\n handleDrawerSubmit(args, args2)\n }, 1)\n }}\n schemaFieldsPathOverride={schemaFieldsPathOverride}\n schemaPath={schemaPath}\n schemaPathSuffix={schemaPathSuffix}\n submitRef={submitRef}\n />\n </Drawer>\n </EditDepthProvider>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,QAAQ,QAAQ;AACpD,OAAOC,KAAA,MAAW;AAElB,SAASC,aAAa,QAAQ;AAC9B,SAASC,eAAe,QAAQ;AAehC;;;;;AAKA,OAAO,MAAMC,YAAA,GAA4CC,EAAA;EAAA,MAAAC,CAAA,GAAAT,EAAA;EAAC;IAAAU,SAAA;IAAAC,IAAA;IAAAC,UAAA;IAAAC,WAAA;IAAAC,UAAA;IAAAC,gBAAA;IAAAC,kBAAA;IAAAC,wBAAA;IAAAC,UAAA;IAAAC;EAAA,IAAAX,EAWzD;EACC;IAAAY;EAAA,IAAuBjB,QAAA;EACvB;IAAAkB,aAAA;IAAAC;EAAA,IAAqChB,eAAA;EAAA,IAAAiB,EAAA;EAAA,IAAAd,CAAA,QAAAC,SAAA,IAAAD,CAAA,QAAAW,UAAA,IAAAX,CAAA,QAAAE,IAAA,I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A;AAGvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC;IACE,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CAChD,GAAG,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,aAAa,CAAC,CAyJ1D,CAAA"}
1
+ {"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC;IACE,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CAChD,GAAG,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,aAAa,CAAC,CAuJ1D,CAAA"}
@@ -2,9 +2,8 @@
2
2
 
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
5
- import { Form, RenderFields, useDocumentForm, useDocumentInfo, useServerFunctions } from '@payloadcms/ui';
5
+ import { Form, RenderFields, useDocumentForm, useDocumentInfo, useEffectEvent, useServerFunctions } from '@payloadcms/ui';
6
6
  import { abortAndIgnore } from '@payloadcms/ui/shared';
7
- import { deepCopyObjectSimpleWithoutReactComponents } from 'payload/shared';
8
7
  import React, { useCallback, useEffect, useRef, useState } from 'react';
9
8
  import { v4 as uuid } from 'uuid';
10
9
  import { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js';
@@ -43,6 +42,8 @@ export const DrawerContent = ({
43
42
  const schemaFieldsPath = schemaFieldsPathOverride ?? `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`;
44
43
  const fields = fieldMapOverride ?? featureClientSchemaMap[featureKey]?.[schemaFieldsPath] // Field Schema
45
44
  ;
45
+ // Parent autosave updates this context without starting a new drawer editing session.
46
+ const getParentDocumentFields = useEffectEvent(() => parentDocumentFields);
46
47
  useEffect(() => {
47
48
  const controller = new AbortController();
48
49
  const awaitInitialState = async () => {
@@ -56,9 +57,7 @@ export const DrawerContent = ({
56
57
  fields: true
57
58
  },
58
59
  docPreferences: await getDocPreferences(),
59
- documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {
60
- excludeFiles: true
61
- }),
60
+ documentFormState: getParentDocumentFields(),
62
61
  globalSlug,
63
62
  initialBlockData: data,
64
63
  operation: 'update',
@@ -73,7 +72,7 @@ export const DrawerContent = ({
73
72
  return () => {
74
73
  abortAndIgnore(controller);
75
74
  };
76
- }, [schemaFieldsPath, id, data, getFormState, collectionSlug, isEditable, globalSlug, getDocPreferences, parentDocumentFields]);
75
+ }, [schemaFieldsPath, id, data, getFormState, collectionSlug, isEditable, globalSlug, getDocPreferences]);
77
76
  const onChange = useCallback(async ({
78
77
  formState: prevFormState
79
78
  }) => {
@@ -89,9 +88,7 @@ export const DrawerContent = ({
89
88
  fields: true
90
89
  },
91
90
  docPreferences: await getDocPreferences(),
92
- documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {
93
- excludeFiles: true
94
- }),
91
+ documentFormState: parentDocumentFields,
95
92
  formState: prevFormState,
96
93
  globalSlug,
97
94
  initialBlockFormState: prevFormState,
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContent.js","names":["useLexicalEditable","Form","RenderFields","useDocumentForm","useDocumentInfo","useServerFunctions","abortAndIgnore","deepCopyObjectSimpleWithoutReactComponents","React","useCallback","useEffect","useRef","useState","v4","uuid","useEditorConfigContext","RegisterFormSubmit","DrawerContent","data","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","submitRef","id","collectionSlug","getDocPreferences","globalSlug","fields","parentDocumentFields","isEditable","onChangeAbortControllerRef","AbortController","initialState","setInitialState","fieldProps","featureClientSchemaMap","getFormState","schemaFieldsPath","controller","awaitInitialState","state","docPermissions","docPreferences","documentFormState","excludeFiles","initialBlockData","operation","readOnly","renderAllFields","signal","onChange","formState","prevFormState","current","initialBlockFormState","_jsxs","beforeSubmit","className","disableValidationOnSubmit","Array","isArray","onSubmit","_jsx","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions"],"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n Form,\n RenderFields,\n useDocumentForm,\n useDocumentInfo,\n useServerFunctions,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { deepCopyObjectSimpleWithoutReactComponents } from 'payload/shared'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\nimport { RegisterFormSubmit } from './useDrawerSubmit.js'\nimport './index.css'\n\nexport const DrawerContent: React.FC<\n {\n submitRef: React.RefObject<(() => void) | null>\n } & Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>\n> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n submitRef,\n}) => {\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { fields: parentDocumentFields } = useDocumentForm()\n const isEditable = useLexicalEditable()\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n\n const [initialState, setInitialState] = useState<false | FormState | undefined>(false)\n\n const {\n fieldProps: { featureClientSchemaMap },\n } = useEditorConfigContext()\n\n const { getFormState } = useServerFunctions()\n\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any = fieldMapOverride ?? featureClientSchemaMap[featureKey]?.[schemaFieldsPath] // Field Schema\n\n useEffect(() => {\n const controller = new AbortController()\n\n const awaitInitialState = async () => {\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: data ?? {},\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n globalSlug,\n initialBlockData: data,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n\n return () => {\n abortAndIgnore(controller)\n }\n }, [\n schemaFieldsPath,\n id,\n data,\n getFormState,\n collectionSlug,\n isEditable,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n ])\n\n const onChange = useCallback(\n async ({ formState: prevFormState }: { formState: FormState }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n return state\n },\n [\n getFormState,\n id,\n isEditable,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n schemaFieldsPath,\n ],\n )\n\n // cleanup effect\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n className=\"fields-drawer\"\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <RegisterFormSubmit submitRef={submitRef} />\n </Form>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,kBAAkB,QAAQ;AACnC,SACEC,IAAI,EACJC,YAAY,EACZC,eAAe,EACfC,eAAe,EACfC,kBAAkB,QACb;AACP,SAASC,cAAc,QAAQ;AAC/B,SAASC,0CAA0C,QAAQ;AAC3D,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAChE,SAASC,EAAA,IAAMC,IAAI,QAAQ;AAI3B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,kBAAkB,QAAQ;AACnC,OAAO;AAEP,OAAO,MAAMC,aAAA,GAITA,CAAC;EACHC,IAAI;EACJC,UAAU;EACVC,gBAAgB;EAChBC,kBAAkB;EAClBC,wBAAwB;EACxBC,UAAU;EACVC,gBAAgB;EAChBC;AAAS,CACV;EACC,MAAM;IAAEC,EAAE;IAAEC,cAAc;IAAEC,iBAAiB;IAAEC;EAAU,CAAE,GAAGzB,eAAA;EAC9D,MAAM;IAAE0B,MAAA,EAAQC;EAAoB,CAAE,GAAG5B,eAAA;EACzC,MAAM6B,UAAA,GAAahC,kBAAA;EAEnB,MAAMiC,0BAAA,GAA6BtB,MAAA,CAAO,IAAIuB,eAAA;EAE9C,MAAM,CAACC,YAAA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AU3C,kBAAA;IACVP,IAAA,EAAMA,IAAA;4BAENmD,IAAA,CAAC/D,YAAA;MACC4B,MAAA,EAAQgC,KAAA,CAAMC,OAAO,CAACjC,MAAA,IAAUA,MAAA,GAAS,EAAE;MAC3CoC,WAAW;MACXC,eAAA,EAAgB;MAChBC,UAAA,EAAW;MACXC,gBAAA,EAAkB7B,gBAAA;MAClB8B,WAAA,EAAa;MACbpB,QAAA,EAAU,CAAClB;qBAEbiC,IAAA,CAACjD,kBAAA;MAAmBS,SAAA,EAAWA;;;AAGrC","ignoreList":[]}
1
+ {"version":3,"file":"DrawerContent.js","names":["useLexicalEditable","Form","RenderFields","useDocumentForm","useDocumentInfo","useEffectEvent","useServerFunctions","abortAndIgnore","React","useCallback","useEffect","useRef","useState","v4","uuid","useEditorConfigContext","RegisterFormSubmit","DrawerContent","data","featureKey","fieldMapOverride","handleDrawerSubmit","schemaFieldsPathOverride","schemaPath","schemaPathSuffix","submitRef","id","collectionSlug","getDocPreferences","globalSlug","fields","parentDocumentFields","isEditable","onChangeAbortControllerRef","AbortController","initialState","setInitialState","fieldProps","featureClientSchemaMap","getFormState","schemaFieldsPath","getParentDocumentFields","controller","awaitInitialState","state","docPermissions","docPreferences","documentFormState","initialBlockData","operation","readOnly","renderAllFields","signal","onChange","formState","prevFormState","current","initialBlockFormState","_jsxs","beforeSubmit","className","disableValidationOnSubmit","Array","isArray","onSubmit","_jsx","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions"],"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormState } from 'payload'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n Form,\n RenderFields,\n useDocumentForm,\n useDocumentInfo,\n useEffectEvent,\n useServerFunctions,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\nimport { RegisterFormSubmit } from './useDrawerSubmit.js'\nimport './index.css'\n\nexport const DrawerContent: React.FC<\n {\n submitRef: React.RefObject<(() => void) | null>\n } & Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>\n> = ({\n data,\n featureKey,\n fieldMapOverride,\n handleDrawerSubmit,\n schemaFieldsPathOverride,\n schemaPath,\n schemaPathSuffix,\n submitRef,\n}) => {\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { fields: parentDocumentFields } = useDocumentForm()\n const isEditable = useLexicalEditable()\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n\n const [initialState, setInitialState] = useState<false | FormState | undefined>(false)\n\n const {\n fieldProps: { featureClientSchemaMap },\n } = useEditorConfigContext()\n\n const { getFormState } = useServerFunctions()\n\n const schemaFieldsPath =\n schemaFieldsPathOverride ??\n `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fields: any = fieldMapOverride ?? featureClientSchemaMap[featureKey]?.[schemaFieldsPath] // Field Schema\n\n // Parent autosave updates this context without starting a new drawer editing session.\n const getParentDocumentFields = useEffectEvent(() => parentDocumentFields)\n\n useEffect(() => {\n const controller = new AbortController()\n\n const awaitInitialState = async () => {\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: data ?? {},\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: getParentDocumentFields(),\n globalSlug,\n initialBlockData: data,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n\n return () => {\n abortAndIgnore(controller)\n }\n }, [\n schemaFieldsPath,\n id,\n data,\n getFormState,\n collectionSlug,\n isEditable,\n globalSlug,\n getDocPreferences,\n ])\n\n const onChange = useCallback(\n async ({ formState: prevFormState }: { formState: FormState }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: parentDocumentFields,\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n return state\n },\n [\n getFormState,\n id,\n isEditable,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n schemaFieldsPath,\n ],\n )\n\n // cleanup effect\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n className=\"fields-drawer\"\n disableValidationOnSubmit\n fields={Array.isArray(fields) ? fields : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fields={Array.isArray(fields) ? fields : []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <RegisterFormSubmit submitRef={submitRef} />\n </Form>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,kBAAkB,QAAQ;AACnC,SACEC,IAAI,EACJC,YAAY,EACZC,eAAe,EACfC,eAAe,EACfC,cAAc,EACdC,kBAAkB,QACb;AACP,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAChE,SAASC,EAAA,IAAMC,IAAI,QAAQ;AAI3B,SAASC,sBAAsB,QAAQ;AACvC,SAASC,kBAAkB,QAAQ;AACnC,OA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e0B,0BAAA,CAA2BuB,OAAO;IACnD;EACF,GAAG,EAAE;EAEL,IAAIrB,YAAA,KAAiB,OAAO;IAC1B,OAAO;EACT;EAEA,oBACEuB,KAAA,CAACzD,IAAA;IACC0D,YAAA,EAAc,CAACN,QAAA,CAAS;IACxBO,SAAA,EAAU;IACVC,yBAAyB;IACzB/B,MAAA,EAAQgC,KAAA,CAAMC,OAAO,CAACjC,MAAA,IAAUA,MAAA,GAAS,EAAE;IAC3CK,YAAA,EAAcA,YAAA;IACdkB,QAAA,EAAU,CAACA,QAAA,CAAS;IACpBW,QAAA,EAAU3C,kBAAA;IACVP,IAAA,EAAMA,IAAA;4BAENmD,IAAA,CAAC/D,YAAA;MACC4B,MAAA,EAAQgC,KAAA,CAAMC,OAAO,CAACjC,MAAA,IAAUA,MAAA,GAAS,EAAE;MAC3CoC,WAAW;MACXC,eAAA,EAAgB;MAChBC,UAAA,EAAW;MACXC,gBAAA,EAAkB7B,gBAAA;MAClB8B,WAAA,EAAa;MACbpB,QAAA,EAAU,CAAClB;qBAEbiC,IAAA,CAACjD,kBAAA;MAAmBS,SAAA,EAAWA;;;AAGrC","ignoreList":[]}
@@ -3,10 +3,10 @@
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  gap: var(--spacer-3);
6
- padding: var(--spacer-2-5);
7
- }
6
+ padding: var(--spacer-4);
8
7
 
9
- .fields-drawer .radio-group .field-description {
10
- margin-top: var(--spacer-2);
8
+ @media (max-width: 768px) {
9
+ padding: var(--spacer-3);
10
+ }
11
11
  }
12
12
  }
@@ -14,7 +14,7 @@ export declare const useDrawerSubmit: () => {
14
14
  headerActions: {
15
15
  label: string;
16
16
  onClick: () => void | undefined;
17
- style: "primary";
17
+ style: 'primary';
18
18
  }[];
19
19
  submitRef: React.RefObject<(() => void) | null>;
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawerSubmit.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useDrawerSubmit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;;;sCAEM,IAAI;CAcrC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CAChD,CAWA,CAAA"}
1
+ {"version":3,"file":"useDrawerSubmit.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/useDrawerSubmit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;;eASb,SAAS;;sCAPU,IAAI;CAcrC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;CAChD,CAWA,CAAA"}
@@ -1 +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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Ref","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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K,OAAA,GAAoB,IAAH;MAAA,CACnB;IAAA,CACF;IAAGC,EAAA,IAACO,MAAA,EAAQb,SAAA,CAAU;IAAAF,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,OAEf;AAAA,CACT","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":"useLexicalDocumentDrawer.js","names":["c","_c","useLexicalComposerContext","useDocumentDrawer","useModal","$getPreviousSelection","$getSelection","$setSelection","useCallback","useEffect","useState","useLexicalDocumentDrawer","args","$","editor","selectionState","setSelectionState","wasOpen","setWasOpen","DocumentDrawer","DocumentDrawerToggler","t0","closeDrawer","drawerSlug","documentDrawerSlug","openDrawer","modalState","t1","read","selection","storeSelection","t2","update","clone","discrete","skipTransforms","restoreSelection","t3","closeDocumentDrawer","t4","t5","thisModalState","isOpen","setTimeout","t6","openDocumentDrawer","t7","props","_jsx","onClick","t8"],"sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"sourcesContent":["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n openDocumentDrawer: () => void\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug, openDrawer },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n const openDocumentDrawer = useCallback(() => {\n storeSelection()\n openDrawer()\n }, [storeSelection, openDrawer])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n openDocumentDrawer,\n }\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ;AAC5C,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,aAAa,QAAQ;AACpE,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ;AAEjD;;;;;AAKA,OAAO,MAAMC,wBAAA,GAA2BC,IAAA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AP,CAAA,SAAAiB,cAAA;IAMNgB,EAAA,GAAAC,KAAA,IAAWC,IAAA,CAAC5B,qBAAA;MAAA,GAA0B2B,KAAK;MAAAE,OAAA,EAAWnB;IAAA,C;;;;;;;;;IAJxEoB,EAAA;MAAAZ,mBAAA;MAAAnB,cAAA;MAAAK,kBAAA;MAAAJ,qBAAA,EAIkB0B,E;;;IAEzBjC,CAAA,OAAAM,cAAA;IAAAN,CAAA,OAAAyB,mBAAA;IAAAzB,CAAA,OAAAW,kBAAA;IAAAX,CAAA,OAAAgC,kBAAA;IAAAhC,CAAA,OAAAiC,EAAA;IAAAjC,CAAA,OAAAqC,EAAA;EAAA;IAAAA,EAAA,GAAArC,CAAA;EAAA;EAAA,OANOqC,EAMP;AAAA,CACF","ignoreList":[]}
1
+ {"version":3,"file":"useLexicalDocumentDrawer.js","names":["c","_c","useLexicalComposerContext","useDocumentDrawer","useModal","$getPreviousSelection","$getSelection","$setSelection","useCallback","useEffect","useState","useLexicalDocumentDrawer","args","$","editor","selectionState","setSelectionState","wasOpen","setWasOpen","DocumentDrawer","DocumentDrawerToggler","t0","closeDrawer","drawerSlug","documentDrawerSlug","openDrawer","modalState","t1","read","selection","storeSelection","t2","update","clone","discrete","skipTransforms","restoreSelection","t3","closeDocumentDrawer","t4","t5","thisModalState","isOpen","setTimeout","t6","openDocumentDrawer","t7","props","_jsx","onClick","t8"],"sources":["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],"sourcesContent":["'use client'\nimport type { UseDocumentDrawer } from '@payloadcms/ui'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useDocumentDrawer, useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useDocumentDrawer that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDocumentDrawer = (\n args: Parameters<UseDocumentDrawer>[0],\n): {\n closeDocumentDrawer: () => void\n DocumentDrawer: ReturnType<UseDocumentDrawer>[0]\n documentDrawerSlug: string\n DocumentDrawerToggler: ReturnType<UseDocumentDrawer>[1]\n openDocumentDrawer: () => void\n} => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const [\n DocumentDrawer,\n DocumentDrawerToggler,\n { closeDrawer: closeDrawer, drawerSlug: documentDrawerSlug, openDrawer },\n ] = useDocumentDrawer(args)\n const { modalState } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n setWasOpen(true)\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDocumentDrawer = () => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeDrawer()\n }\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[documentDrawerSlug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n setTimeout(() => {\n restoreSelection()\n }, 1)\n }\n }, [modalState, documentDrawerSlug, restoreSelection, wasOpen])\n\n const openDocumentDrawer = useCallback(() => {\n storeSelection()\n openDrawer()\n }, [storeSelection, openDrawer])\n\n return {\n closeDocumentDrawer,\n DocumentDrawer,\n documentDrawerSlug,\n DocumentDrawerToggler: (props) => <DocumentDrawerToggler {...props} onClick={storeSelection} />,\n openDocumentDrawer,\n }\n}\n"],"mappings":"AAAA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AAAI,EAAA;EAAA,IAAA/B,CAAA,SAAAY,UAAA,IAAAZ,CAAA,SAAAiB,cAAA;IAEvBc,EAAA,GAAAA,CAAA;MACrCd,cAAA;MACAL,UAAA;IAAA,CACF;IAAAZ,CAAA,OAAAY,UAAA;IAAAZ,CAAA,OAAAiB,cAAA;IAAAjB,CAAA,OAAA+B,EAAA;EAAA;IAAAA,EAAA,GAAA/B,CAAA;EAAA;EAHA,MAAAgC,kBAAA,GAA2BD,EAGI;EAAA,IAAAE,EAAA;EAAA,IAAAjC,CAAA,SAAAO,qBAAA,IAAAP,CAAA,SAAAiB,cAAA;IAMNgB,EAAA,GAAAC,KAAA,IAAWC,IAAA,CAAC5B,qBAAA;MAAA,GAA0B2B,KAAK;MAAAE,OAAA,EAAWnB;;;;;;;;;;IAJxEoB,EAAA;MAAAZ,mBAAA;MAAAnB,cAAA;MAAAK,kBAAA;MAAAJ,qBAAA,EAIkB0B,E;;IAEzB;IAAAjC,CAAA,OAAAM,cAAA;IAAAN,CAAA,OAAAyB,mBAAA;IAAAzB,CAAA,OAAAW,kBAAA;IAAAX,CAAA,OAAAgC,kBAAA;IAAAhC,CAAA,OAAAiC,EAAA;IAAAjC,CAAA,OAAAqC,EAAA;EAAA;IAAAA,EAAA,GAAArC,CAAA;EAAA;EAAA,OANOqC,EAMP;AAAA,CACF","ignoreList":[]}
@@ -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"}