@payloadcms/richtext-lexical 4.0.0-internal.5b1e7cd → 4.0.0-internal.5d5a2b2

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 (1073) hide show
  1. package/dist/@types/assets.d.js +2 -0
  2. package/dist/@types/assets.d.js.map +1 -0
  3. package/dist/cell/rscEntry.d.ts +1 -1
  4. package/dist/cell/rscEntry.d.ts.map +1 -1
  5. package/dist/cell/rscEntry.js +5 -5
  6. package/dist/cell/rscEntry.js.map +1 -1
  7. package/dist/exports/client/Field-VYBSMSRY.js +2 -0
  8. package/dist/exports/client/Field-VYBSMSRY.js.map +7 -0
  9. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js +2 -0
  10. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  11. package/dist/exports/client/bundled.css +1 -1
  12. package/dist/exports/client/chunk-5VIL27GI.js +2 -0
  13. package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
  14. package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  15. package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
  16. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  17. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  18. package/dist/exports/client/chunk-UD4DQ4AK.js +2 -0
  19. package/dist/exports/client/chunk-UD4DQ4AK.js.map +7 -0
  20. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  21. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  22. package/dist/exports/client/chunk-ZYXHC5CY.js +2 -0
  23. package/dist/exports/client/chunk-ZYXHC5CY.js.map +7 -0
  24. package/dist/exports/client/component-PHZQBOJE.js +2 -0
  25. package/dist/exports/client/component-PHZQBOJE.js.map +7 -0
  26. package/dist/exports/client/componentInline-R3EPNYWF.js +2 -0
  27. package/dist/exports/client/index.d.ts +1 -2
  28. package/dist/exports/client/index.d.ts.map +1 -1
  29. package/dist/exports/client/index.js +33 -33
  30. package/dist/exports/client/index.js.map +4 -4
  31. package/dist/exports/react/index.d.ts +1 -1
  32. package/dist/exports/react/index.d.ts.map +1 -1
  33. package/dist/exports/react/index.js.map +1 -1
  34. package/dist/exports/server/rsc.browser.d.ts +11 -0
  35. package/dist/exports/server/rsc.browser.d.ts.map +1 -0
  36. package/dist/exports/server/rsc.browser.js +10 -0
  37. package/dist/exports/server/rsc.browser.js.map +1 -0
  38. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  39. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  40. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  41. package/dist/features/blockquote/server/index.d.ts +1 -4
  42. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  43. package/dist/features/blockquote/server/index.js +2 -39
  44. package/dist/features/blockquote/server/index.js.map +1 -1
  45. package/dist/features/blockquote/server/schema.d.ts +8 -0
  46. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  47. package/dist/features/blockquote/server/schema.js +15 -0
  48. package/dist/features/blockquote/server/schema.js.map +1 -0
  49. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  50. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  51. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  52. package/dist/features/blocks/client/component/index.css +178 -0
  53. package/dist/features/blocks/client/component/index.d.ts +4 -3
  54. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  55. package/dist/features/blocks/client/component/index.js +104 -25
  56. package/dist/features/blocks/client/component/index.js.map +1 -1
  57. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  58. package/dist/features/blocks/client/componentInline/index.css +85 -0
  59. package/dist/features/blocks/client/componentInline/index.d.ts +4 -3
  60. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  61. package/dist/features/blocks/client/componentInline/index.js +45 -15
  62. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  63. package/dist/features/blocks/client/index.d.ts.map +1 -1
  64. package/dist/features/blocks/client/index.js +0 -2
  65. package/dist/features/blocks/client/index.js.map +1 -1
  66. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  67. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  68. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  69. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  70. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  71. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  72. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  73. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  74. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  75. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  76. package/dist/features/blocks/client/plugin/index.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.d.ts +1 -1
  79. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  80. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +4 -0
  81. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  82. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  83. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  84. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  85. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  86. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  87. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  88. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  89. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  90. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  91. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  92. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  93. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  94. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  95. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  96. package/dist/features/blocks/server/index.d.ts +1 -0
  97. package/dist/features/blocks/server/index.d.ts.map +1 -1
  98. package/dist/features/blocks/server/index.js +20 -66
  99. package/dist/features/blocks/server/index.js.map +1 -1
  100. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  101. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  102. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  103. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  104. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  105. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  106. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  107. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  108. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  109. package/dist/features/blocks/server/schema.d.ts +45 -0
  110. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  111. package/dist/features/blocks/server/schema.js +139 -0
  112. package/dist/features/blocks/server/schema.js.map +1 -0
  113. package/dist/features/blocks/server/validate.d.ts +1 -2
  114. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  115. package/dist/features/blocks/server/validate.js.map +1 -1
  116. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  117. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  118. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  123. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  129. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  131. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  132. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  134. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  135. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  137. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  138. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  140. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  141. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  143. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  144. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  146. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  147. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  148. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  149. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  151. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  152. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  154. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  155. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
  157. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  159. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  165. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  170. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  171. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  173. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  174. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  175. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  176. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  177. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  178. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  179. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  180. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  182. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  183. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  185. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  186. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  188. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  189. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  190. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  191. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  192. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  193. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  194. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  195. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  196. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  197. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  198. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
  199. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  200. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  201. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
  202. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
  204. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  207. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  209. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  211. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  215. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  216. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  217. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  218. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  219. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  220. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  221. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  222. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  223. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  224. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  225. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  226. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  227. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  228. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  229. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  230. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  231. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  232. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  233. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  234. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  235. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  236. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  237. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  238. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  239. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  240. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  241. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  242. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  243. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  244. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
  245. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  246. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  247. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  248. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  249. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  250. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
  251. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  252. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  253. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  254. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  255. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  256. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  257. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  258. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  259. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  260. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  261. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  262. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  263. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  264. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  265. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  266. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  267. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  268. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  269. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  270. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  271. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  272. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  273. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  274. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  275. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  276. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  277. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  278. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  279. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  280. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  281. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  282. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  283. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  284. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  285. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  286. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  287. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  288. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  289. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  290. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  291. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  292. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  293. package/dist/features/experimental_table/server/index.d.ts +1 -6
  294. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  295. package/dist/features/experimental_table/server/index.js +4 -102
  296. package/dist/features/experimental_table/server/index.js.map +1 -1
  297. package/dist/features/experimental_table/server/schema.d.ts +27 -0
  298. package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
  299. package/dist/features/experimental_table/server/schema.js +107 -0
  300. package/dist/features/experimental_table/server/schema.js.map +1 -0
  301. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  302. package/dist/features/heading/server/index.d.ts +2 -4
  303. package/dist/features/heading/server/index.d.ts.map +1 -1
  304. package/dist/features/heading/server/index.js +2 -39
  305. package/dist/features/heading/server/index.js.map +1 -1
  306. package/dist/features/heading/server/schema.d.ts +10 -0
  307. package/dist/features/heading/server/schema.d.ts.map +1 -0
  308. package/dist/features/heading/server/schema.js +37 -0
  309. package/dist/features/heading/server/schema.js.map +1 -0
  310. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  311. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  312. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  313. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  314. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  315. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  316. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  317. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  318. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  319. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  320. package/dist/features/horizontalRule/server/index.js +2 -8
  321. package/dist/features/horizontalRule/server/index.js.map +1 -1
  322. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
  323. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  324. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  325. package/dist/features/horizontalRule/server/schema.d.ts +7 -0
  326. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  327. package/dist/features/horizontalRule/server/schema.js +25 -0
  328. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  329. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  330. package/dist/features/link/client/index.d.ts.map +1 -1
  331. package/dist/features/link/client/index.js.map +1 -1
  332. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  333. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  334. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  335. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  336. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  337. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  338. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  339. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  340. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  341. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  342. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  343. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  344. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  345. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  346. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  347. package/dist/features/link/markdownTransformer.d.ts +1 -1
  348. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  349. package/dist/features/link/markdownTransformer.js.map +1 -1
  350. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  351. package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
  352. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  353. package/dist/features/link/nodes/AutoLinkNode.js +2 -1
  354. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  355. package/dist/features/link/nodes/LinkNode.d.ts +3 -3
  356. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  357. package/dist/features/link/nodes/LinkNode.js +2 -1
  358. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  359. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  360. package/dist/features/link/server/baseFields.js.map +1 -1
  361. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  362. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  363. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  364. package/dist/features/link/server/index.d.ts +2 -1
  365. package/dist/features/link/server/index.d.ts.map +1 -1
  366. package/dist/features/link/server/index.js +3 -71
  367. package/dist/features/link/server/index.js.map +1 -1
  368. package/dist/features/link/server/schema.d.ts +32 -0
  369. package/dist/features/link/server/schema.d.ts.map +1 -0
  370. package/dist/features/link/server/schema.js +169 -0
  371. package/dist/features/link/server/schema.js.map +1 -0
  372. package/dist/features/link/server/validate.d.ts +1 -1
  373. package/dist/features/link/server/validate.d.ts.map +1 -1
  374. package/dist/features/link/server/validate.js.map +1 -1
  375. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  376. package/dist/features/lists/checklist/server/index.js +3 -7
  377. package/dist/features/lists/checklist/server/index.js.map +1 -1
  378. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  379. package/dist/features/lists/orderedList/server/index.js +3 -7
  380. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  381. package/dist/features/lists/plugin/index.d.ts +0 -9
  382. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  383. package/dist/features/lists/plugin/index.js.map +1 -1
  384. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  385. package/dist/features/lists/shared/schema.d.ts +18 -0
  386. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  387. package/dist/features/lists/shared/schema.js +62 -0
  388. package/dist/features/lists/shared/schema.js.map +1 -0
  389. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  390. package/dist/features/lists/unorderedList/server/index.js +3 -7
  391. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  392. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
  393. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  394. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  395. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  396. package/dist/features/relationship/client/components/index.css +112 -0
  397. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  398. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  399. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  400. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  401. package/dist/features/relationship/client/plugins/index.d.ts +1 -1
  402. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  403. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  404. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  405. package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
  406. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  407. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
  408. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  409. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  410. package/dist/features/relationship/server/index.d.ts +1 -0
  411. package/dist/features/relationship/server/index.d.ts.map +1 -1
  412. package/dist/features/relationship/server/index.js +2 -0
  413. package/dist/features/relationship/server/index.js.map +1 -1
  414. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  415. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  416. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  417. package/dist/features/relationship/server/schema.d.ts +28 -0
  418. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  419. package/dist/features/relationship/server/schema.js +80 -0
  420. package/dist/features/relationship/server/schema.js.map +1 -0
  421. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
  422. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  423. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
  424. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  425. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  426. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  427. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  428. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  429. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  430. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  431. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  432. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  433. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  434. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  435. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  436. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  437. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  438. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  439. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  440. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  441. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  442. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  443. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  444. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  445. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  446. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  447. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  448. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  449. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  450. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  451. package/dist/features/toolbars/types.d.ts +5 -1
  452. package/dist/features/toolbars/types.d.ts.map +1 -1
  453. package/dist/features/toolbars/types.js.map +1 -1
  454. package/dist/features/typesClient.d.ts +1 -1
  455. package/dist/features/typesClient.d.ts.map +1 -1
  456. package/dist/features/typesClient.js.map +1 -1
  457. package/dist/features/typesServer.d.ts +18 -58
  458. package/dist/features/typesServer.d.ts.map +1 -1
  459. package/dist/features/typesServer.js.map +1 -1
  460. package/dist/features/upload/client/component/index.css +214 -0
  461. package/dist/features/upload/client/component/index.d.ts +2 -2
  462. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  463. package/dist/features/upload/client/component/index.js +86 -63
  464. package/dist/features/upload/client/component/index.js.map +1 -1
  465. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  466. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  467. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  468. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  469. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  470. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  471. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  472. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  473. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  474. package/dist/features/upload/client/plugin/index.js.map +1 -1
  475. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
  476. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  477. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  478. package/dist/features/upload/server/index.d.ts +1 -0
  479. package/dist/features/upload/server/index.d.ts.map +1 -1
  480. package/dist/features/upload/server/index.js +3 -80
  481. package/dist/features/upload/server/index.js.map +1 -1
  482. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  483. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  484. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  485. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  486. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  487. package/dist/features/upload/server/schema.d.ts +52 -0
  488. package/dist/features/upload/server/schema.d.ts.map +1 -0
  489. package/dist/features/upload/server/schema.js +129 -0
  490. package/dist/features/upload/server/schema.js.map +1 -0
  491. package/dist/features/upload/server/validate.d.ts +1 -1
  492. package/dist/features/upload/server/validate.d.ts.map +1 -1
  493. package/dist/features/upload/server/validate.js.map +1 -1
  494. package/dist/field/Diff/converters/link.d.ts +1 -1
  495. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  496. package/dist/field/Diff/converters/link.js.map +1 -1
  497. package/dist/field/Diff/converters/listitem/index.css +80 -0
  498. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  499. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  500. package/dist/field/Diff/converters/listitem/index.js +1 -0
  501. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  502. package/dist/field/Diff/converters/relationship/index.css +108 -0
  503. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  504. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  505. package/dist/field/Diff/converters/relationship/index.js +11 -28
  506. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  507. package/dist/field/Diff/converters/unknown/index.css +37 -0
  508. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  509. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  510. package/dist/field/Diff/converters/unknown/index.js +1 -0
  511. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  512. package/dist/field/Diff/converters/upload/index.css +175 -0
  513. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  514. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  515. package/dist/field/Diff/converters/upload/index.js +7 -2
  516. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  517. package/dist/field/Diff/index.css +156 -0
  518. package/dist/field/Diff/index.d.ts +1 -1
  519. package/dist/field/Diff/index.d.ts.map +1 -1
  520. package/dist/field/Diff/index.js +1 -0
  521. package/dist/field/Diff/index.js.map +1 -1
  522. package/dist/field/Field.d.ts +3 -3
  523. package/dist/field/Field.d.ts.map +1 -1
  524. package/dist/field/Field.js +13 -12
  525. package/dist/field/Field.js.map +1 -1
  526. package/dist/field/RenderLexical/index.d.ts +2 -2
  527. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  528. package/dist/field/RenderLexical/index.js.map +1 -1
  529. package/dist/field/RichTextViewProvider.d.ts +1 -1
  530. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  531. package/dist/field/RichTextViewProvider.js.map +1 -1
  532. package/dist/field/ViewSelector.css +32 -0
  533. package/dist/field/ViewSelector.d.ts +1 -1
  534. package/dist/field/ViewSelector.d.ts.map +1 -1
  535. package/dist/field/ViewSelector.js +1 -0
  536. package/dist/field/ViewSelector.js.map +1 -1
  537. package/dist/field/bundled.css +1 -1
  538. package/dist/field/clientEntry.d.ts +29 -0
  539. package/dist/field/clientEntry.d.ts.map +1 -0
  540. package/dist/field/clientEntry.js +86 -0
  541. package/dist/field/clientEntry.js.map +1 -0
  542. package/dist/field/index.css +57 -0
  543. package/dist/field/index.d.ts +1 -1
  544. package/dist/field/index.d.ts.map +1 -1
  545. package/dist/field/index.js +1 -1
  546. package/dist/field/index.js.map +1 -1
  547. package/dist/field/rscEntry.d.ts +1 -1
  548. package/dist/field/rscEntry.d.ts.map +1 -1
  549. package/dist/field/rscEntry.js +2 -0
  550. package/dist/field/rscEntry.js.map +1 -1
  551. package/dist/hooks.d.ts +6 -0
  552. package/dist/hooks.d.ts.map +1 -0
  553. package/dist/hooks.js +548 -0
  554. package/dist/hooks.js.map +1 -0
  555. package/dist/index.d.ts +11 -18
  556. package/dist/index.d.ts.map +1 -1
  557. package/dist/index.js +67 -632
  558. package/dist/index.js.map +1 -1
  559. package/dist/lexical/LexicalEditor.css +50 -0
  560. package/dist/lexical/LexicalEditor.d.ts +1 -1
  561. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  562. package/dist/lexical/LexicalEditor.js +37 -2
  563. package/dist/lexical/LexicalEditor.js.map +1 -1
  564. package/dist/lexical/LexicalProvider.d.ts +1 -1
  565. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  566. package/dist/lexical/LexicalProvider.js +22 -7
  567. package/dist/lexical/LexicalProvider.js.map +1 -1
  568. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  569. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  570. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  571. package/dist/lexical/config/client/loader.d.ts +1 -1
  572. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  573. package/dist/lexical/config/client/loader.js +5 -1
  574. package/dist/lexical/config/client/loader.js.map +1 -1
  575. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  576. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  577. package/dist/lexical/config/client/sanitize.js.map +1 -1
  578. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  579. package/dist/lexical/config/server/loader.js +12 -9
  580. package/dist/lexical/config/server/loader.js.map +1 -1
  581. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  582. package/dist/lexical/config/server/sanitize.js +9 -17
  583. package/dist/lexical/config/server/sanitize.js.map +1 -1
  584. package/dist/lexical/config/types.d.ts +1 -1
  585. package/dist/lexical/config/types.d.ts.map +1 -1
  586. package/dist/lexical/config/types.js.map +1 -1
  587. package/dist/lexical/nodes/index.d.ts +1 -1
  588. package/dist/lexical/nodes/index.d.ts.map +1 -1
  589. package/dist/lexical/nodes/index.js.map +1 -1
  590. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  591. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  592. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  593. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  594. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  595. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  596. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  597. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  598. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  599. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  600. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  601. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  602. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  603. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  604. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  605. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  606. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  607. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  608. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  609. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  610. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  611. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  612. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  613. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  614. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  615. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  616. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  617. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  618. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  619. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  620. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  621. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  622. package/dist/lexical/theme/EditorTheme.css +359 -0
  623. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  624. package/dist/lexical/theme/EditorTheme.js +1 -0
  625. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  626. package/dist/lexical/ui/ContentEditable.css +95 -0
  627. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  628. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  629. package/dist/lexical/ui/ContentEditable.js +1 -0
  630. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  631. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  632. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  633. package/dist/lexical/ui/icons/Add/index.js +19 -12
  634. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  636. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  637. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  638. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  639. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  640. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  641. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  642. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  643. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  644. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  645. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  646. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  647. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  648. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  649. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  650. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  651. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  652. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  653. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  654. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  655. package/dist/lexical/ui/icons/Block/index.js +13 -28
  656. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  657. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  658. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  659. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  660. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  661. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  662. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  663. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  664. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  665. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  666. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  667. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  668. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  669. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  670. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  671. package/dist/lexical/ui/icons/Code/index.js +15 -13
  672. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  673. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  674. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  675. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  676. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  677. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  678. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  679. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  680. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  681. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  682. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  683. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  684. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  685. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  686. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  687. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  688. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  689. package/dist/lexical/ui/icons/H1/index.js +9 -6
  690. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  691. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  692. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  693. package/dist/lexical/ui/icons/H2/index.js +9 -6
  694. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  695. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  696. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  697. package/dist/lexical/ui/icons/H3/index.js +9 -6
  698. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  699. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  700. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  701. package/dist/lexical/ui/icons/H4/index.js +9 -6
  702. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  703. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  704. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  705. package/dist/lexical/ui/icons/H5/index.js +9 -6
  706. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  707. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  708. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  709. package/dist/lexical/ui/icons/H6/index.js +9 -6
  710. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  711. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  712. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  713. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  714. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  715. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  716. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  717. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  718. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  719. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  720. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  721. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  722. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  723. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  724. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  725. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  726. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  727. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  728. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  729. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  730. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  731. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  732. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  733. package/dist/lexical/ui/icons/Link/index.js +14 -9
  734. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  735. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  736. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  737. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  738. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  739. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  740. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  741. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  742. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  743. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  744. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  745. package/dist/lexical/ui/icons/Page/index.js +21 -0
  746. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  747. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  748. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  749. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  750. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  751. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  752. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  753. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  754. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  755. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  756. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  757. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  758. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  759. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  760. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  761. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  762. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  763. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  764. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  765. package/dist/lexical/ui/icons/Table/index.js +20 -15
  766. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  767. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  768. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  769. package/dist/lexical/ui/icons/Text/index.js +17 -8
  770. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  771. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  772. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  773. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  774. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  775. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  776. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  777. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  778. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  779. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  780. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  781. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  782. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  783. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  784. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  785. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  786. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  787. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  788. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  789. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  790. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  791. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  792. package/dist/types/builtInNodes.d.ts +14 -0
  793. package/dist/types/builtInNodes.d.ts.map +1 -0
  794. package/dist/types/builtInNodes.js +203 -0
  795. package/dist/types/builtInNodes.js.map +1 -0
  796. package/dist/{types.d.ts → types/index.d.ts} +25 -26
  797. package/dist/types/index.d.ts.map +1 -0
  798. package/dist/types/index.js +2 -0
  799. package/dist/types/index.js.map +1 -0
  800. package/dist/types/jsonSchemaHelpers.d.ts +30 -0
  801. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  802. package/dist/types/jsonSchemaHelpers.js +58 -0
  803. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  804. package/dist/types/nodeTypes.d.ts +128 -0
  805. package/dist/types/nodeTypes.d.ts.map +1 -0
  806. package/dist/types/nodeTypes.js +6 -0
  807. package/dist/types/nodeTypes.js.map +1 -0
  808. package/dist/types/schema.d.ts +6 -0
  809. package/dist/types/schema.d.ts.map +1 -0
  810. package/dist/types/schema.js +83 -0
  811. package/dist/types/schema.js.map +1 -0
  812. package/dist/utilities/buildEditorState.d.ts +18 -4
  813. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  814. package/dist/utilities/buildEditorState.js +21 -0
  815. package/dist/utilities/buildEditorState.js.map +1 -1
  816. package/dist/utilities/buildInitialState.d.ts +2 -1
  817. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  818. package/dist/utilities/buildInitialState.js.map +1 -1
  819. package/dist/utilities/createClientFeature.d.ts +1 -1
  820. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  821. package/dist/utilities/createClientFeature.js.map +1 -1
  822. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  823. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  824. package/dist/utilities/editorConfigFactory.js.map +1 -1
  825. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  826. package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
  827. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  828. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  829. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  830. package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
  831. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  832. package/dist/utilities/fieldsDrawer/index.css +12 -0
  833. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  834. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  835. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  836. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  837. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  838. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  839. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  840. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  841. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  842. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  843. package/dist/utilities/generateImportMap.d.ts +1 -1
  844. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  845. package/dist/utilities/generateImportMap.js +7 -3
  846. package/dist/utilities/generateImportMap.js.map +1 -1
  847. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  848. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  849. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  850. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  851. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  852. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  853. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  854. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  855. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  856. package/dist/validate/index.d.ts.map +1 -1
  857. package/package.json +18 -22
  858. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  859. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  860. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  861. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  862. package/dist/exports/client/Field-4UEGQMIN.js +0 -2
  863. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  864. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  865. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  866. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  867. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  868. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  869. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  870. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  871. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  872. package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
  873. package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
  874. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  875. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  876. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  877. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  878. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  879. package/dist/exports/server/migrate.d.ts +0 -16
  880. package/dist/exports/server/migrate.d.ts.map +0 -1
  881. package/dist/exports/server/migrate.js +0 -16
  882. package/dist/exports/server/migrate.js.map +0 -1
  883. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  884. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  885. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  886. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  887. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  888. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  889. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  890. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  891. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  892. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  893. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  894. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  895. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  896. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  897. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  898. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  899. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  900. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  901. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  902. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  903. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  904. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  905. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  906. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  907. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  908. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  909. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  910. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  911. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  912. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  913. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  914. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  915. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  916. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  917. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  918. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  919. package/dist/features/link/nodes/types.d.ts +0 -27
  920. package/dist/features/link/nodes/types.d.ts.map +0 -1
  921. package/dist/features/link/nodes/types.js +0 -2
  922. package/dist/features/link/nodes/types.js.map +0 -1
  923. package/dist/features/lists/htmlConverter.d.ts +0 -5
  924. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  925. package/dist/features/lists/htmlConverter.js +0 -81
  926. package/dist/features/lists/htmlConverter.js.map +0 -1
  927. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  928. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  929. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  930. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  931. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  932. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  933. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  934. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  935. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  936. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  937. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  938. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  939. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  940. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  941. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  942. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  943. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  944. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  945. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  946. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  947. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  948. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  949. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  950. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  951. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  952. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  953. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  954. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  955. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  956. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  957. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  958. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  959. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  960. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  961. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  962. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  963. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  964. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  965. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  966. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  967. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  968. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  969. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  970. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  971. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  972. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  973. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  974. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  975. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  976. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  977. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  978. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  979. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  980. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  981. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  982. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  983. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  984. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  985. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  986. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  987. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  988. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  989. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  990. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  991. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  992. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  993. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  994. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  995. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  996. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  997. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  998. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  999. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  1000. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  1001. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  1002. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  1003. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  1004. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  1005. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  1006. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  1007. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  1008. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  1009. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  1010. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  1011. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  1012. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  1013. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  1014. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  1015. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  1016. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  1017. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  1018. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  1019. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  1020. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  1021. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  1022. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  1023. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  1024. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  1025. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  1026. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  1027. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  1028. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  1029. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  1030. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  1031. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  1032. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  1033. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  1034. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  1035. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  1036. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  1037. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  1038. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  1039. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  1040. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  1041. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  1042. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  1043. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  1044. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  1045. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  1046. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  1047. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  1048. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  1049. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  1050. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  1051. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  1052. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  1053. package/dist/lexical/ui/icons/AI/index.js +0 -34
  1054. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  1055. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  1056. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  1057. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  1058. package/dist/nodeTypes.d.ts +0 -74
  1059. package/dist/nodeTypes.d.ts.map +0 -1
  1060. package/dist/nodeTypes.js +0 -5
  1061. package/dist/nodeTypes.js.map +0 -1
  1062. package/dist/types.d.ts.map +0 -1
  1063. package/dist/types.js +0 -2
  1064. package/dist/types.js.map +0 -1
  1065. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  1066. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  1067. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  1068. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  1069. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  1070. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  1071. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  1072. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  1073. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-R3EPNYWF.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/lexical/config/client/EditorConfigProvider.tsx"],
4
+ "sourcesContent": ["'use client'\n\nimport type { LexicalEditor } from 'lexical'\nimport type { MarkRequired } from 'ts-essentials'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useEditDepth } from '@payloadcms/ui'\nimport * as React from 'react'\nimport { createContext, use, useMemo, useRef, useState } from 'react'\n\nimport type { InlineBlockNode } from '../../../features/blocks/client/nodes/InlineBlocksNode.js'\nimport type { LexicalRichTextFieldProps } from '../../../types/index.js'\nimport type { SanitizedClientEditorConfig } from '../types.js'\n\n// Should always produce a 20 character pseudo-random string\nfunction generateQuickGuid(): string {\n return Math.random().toString(36).substring(2, 12) + Math.random().toString(36).substring(2, 12)\n}\n\nexport interface EditorConfigContextType {\n // Editor focus handling\n blurEditor: (editorContext: EditorConfigContextType) => void\n childrenEditors: React.RefObject<Map<string, EditorConfigContextType>>\n createdInlineBlock?: InlineBlockNode\n editDepth: number\n editor: LexicalEditor\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement>\n fieldProps: MarkRequired<LexicalRichTextFieldProps, 'path' | 'schemaPath'>\n focusedEditor: EditorConfigContextType | null\n // Editor focus handling\n focusEditor: (editorContext: EditorConfigContextType) => void\n parentEditor: EditorConfigContextType\n registerChild: (uuid: string, editorContext: EditorConfigContextType) => void\n setCreatedInlineBlock?: React.Dispatch<React.SetStateAction<InlineBlockNode | undefined>>\n unregisterChild?: (uuid: string) => void\n uuid: string\n}\n\n// @ts-expect-error: TODO: Fix this\nconst Context: React.Context<EditorConfigContextType> = createContext({\n editorConfig: null,\n fieldProps: null,\n uuid: null,\n})\n\nexport const EditorConfigProvider = ({\n children,\n editorConfig,\n editorContainerRef,\n fieldProps,\n parentContext,\n}: {\n children: React.ReactNode\n editorConfig: SanitizedClientEditorConfig\n editorContainerRef: React.RefObject<HTMLDivElement | null>\n\n fieldProps: LexicalRichTextFieldProps\n parentContext?: EditorConfigContextType\n}): React.ReactNode => {\n const [editor] = useLexicalComposerContext()\n // State to store the UUID\n const [uuid] = useState(() => generateQuickGuid())\n\n const childrenEditors = useRef<Map<string, EditorConfigContextType>>(new Map())\n const [focusedEditor, setFocusedEditor] = useState<EditorConfigContextType | null>(null)\n const focusHistory = useRef<Set<string>>(new Set())\n const [createdInlineBlock, setCreatedInlineBlock] = useState<InlineBlockNode>()\n\n const editDepth = useEditDepth()\n\n const editorContext = useMemo(\n () =>\n ({\n blurEditor: (editorContext: EditorConfigContextType) => {\n //setFocusedEditor(null) // Clear focused editor\n focusHistory.current.clear() // Reset focus history when focus is lost\n },\n childrenEditors,\n createdInlineBlock,\n editDepth,\n editor,\n editorConfig,\n editorContainerRef,\n fieldProps,\n focusedEditor,\n focusEditor: (editorContext: EditorConfigContextType) => {\n const editorUUID = editorContext.uuid\n\n // Avoid recursion by checking if this editor is already focused in this cycle\n if (focusHistory.current.has(editorUUID)) {\n return\n }\n\n // Add this editor to the history to prevent future recursions in this cycle\n focusHistory.current.add(editorUUID)\n setFocusedEditor(editorContext)\n\n // Propagate focus event to parent and children, ensuring they do not refocus this editor\n if (parentContext?.uuid) {\n parentContext.focusEditor(editorContext)\n }\n childrenEditors.current.forEach((childEditor) => {\n childEditor.focusEditor(editorContext)\n })\n\n focusHistory.current.clear()\n },\n parentEditor: parentContext,\n registerChild: (childUUID, childEditorContext) => {\n if (!childrenEditors.current.has(childUUID)) {\n const newMap = new Map(childrenEditors.current)\n newMap.set(childUUID, childEditorContext)\n childrenEditors.current = newMap\n }\n },\n setCreatedInlineBlock,\n unregisterChild: (childUUID) => {\n if (childrenEditors.current.has(childUUID)) {\n const newMap = new Map(childrenEditors.current)\n newMap.delete(childUUID)\n childrenEditors.current = newMap\n }\n },\n\n uuid,\n }) as EditorConfigContextType,\n [\n createdInlineBlock,\n setCreatedInlineBlock,\n editor,\n childrenEditors,\n editorConfig,\n editorContainerRef,\n editDepth,\n fieldProps,\n focusedEditor,\n parentContext,\n uuid,\n ],\n )\n\n return <Context value={editorContext}>{children}</Context>\n}\n\nexport const useEditorConfigContext = (): EditorConfigContextType => {\n const context = use(Context)\n if (context === undefined) {\n throw new Error('useEditorConfigContext must be used within an EditorConfigProvider')\n }\n return context\n}\n"],
5
+ "mappings": "wCAKA,OAASA,6BAAAA,MA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QAAQC,MAAK,EAC5B,EACAO,aAAcrB,EACdsB,cAAeA,CAACC,EAAWC,IAAA,CACzB,GAAI,CAACtB,EAAgBW,QAAQI,IAAIM,CAAA,EAAY,CAC3C,IAAME,EAAS,IAAItB,IAAID,EAAgBW,OAAO,EAC9CY,EAAOC,IAAIH,EAAWC,CAAA,EACtBtB,EAAgBW,QAAUY,CAC5B,CACF,EACAhB,sBAAAA,EACAkB,gBAAkBJ,GAAA,CAChB,GAAIrB,EAAgBW,QAAQI,IAAIM,CAAA,EAAY,CAC1C,IAAME,EAAS,IAAItB,IAAID,EAAgBW,OAAO,EAC9CY,EAAOG,OAAOL,CAAA,EACdrB,EAAgBW,QAAUY,CAC5B,CACF,EAEA7B,KAAAA,CACF,GACF,CACEY,EACAC,EACAR,EACAC,EACAR,EACAK,EACAW,EACAf,EACAS,EACAJ,EACAJ,CAAA,CACD,EAGH,OAAOiC,EAACpC,EAAA,CAAQqC,MAAOnB,WAAgBb,GACzC,EAEaiC,EAAyBA,IAAA,CACpC,IAAMC,EAAUhD,EAAIS,CAAA,EACpB,GAAIuC,IAAYC,OACd,MAAM,IAAIC,MAAM,oEAAA,EAElB,OAAOF,CACT",
6
+ "names": ["useLexicalComposerContext", "useEditDepth", "createContext", "use", "useMemo", "useRef", "useState", "generateQuickGuid", "Math", "random", "toString", "substring", "Context", "editorConfig", "fieldProps", "uuid", "EditorConfigProvider", "children", "editorContainerRef", "parentContext", "editor", "childrenEditors", "Map", "focusedEditor", "setFocusedEditor", "focusHistory", "Set", "createdInlineBlock", "setCreatedInlineBlock", "editDepth", "editorContext", "blurEditor", "current", "clear", "focusEditor", "editorUUID", "has", "add", "forEach", "childEditor", "parentEditor", "registerChild", "childUUID", "childEditorContext", "newMap", "set", "unregisterChild", "delete", "_jsx", "value", "useEditorConfigContext", "context", "undefined", "Error"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as O,b as y}from"./chunk-5VIL27GI.js";import{b as F}from"./chunk-RJ5MAOKZ.js";import{c as q}from"react/compiler-runtime";import{jsx as _}from"react/jsx-runtime";import{Drawer as z,EditDepthProvider as G,useModal as J}from"@payloadcms/ui";import"react";import{jsx as I,jsxs as N}from"react/jsx-runtime";import{useLexicalEditable as T}from"@lexical/react/useLexicalEditable";import{Form as W,RenderFields as $,useDocumentForm as v,useDocumentInfo as k,useServerFunctions as L}from"@payloadcms/ui";import{abortAndIgnore as R}from"@payloadcms/ui/shared";import{deepCopyObjectSimpleWithoutReactComponents as E}from"payload/shared";import{useCallback as B,useEffect as M,useRef as H,useState as U}from"react";import{v4 as V}from"uuid";var j=({data:S,featureKey:e,fieldMapOverride:b,handleDrawerSubmit:w,schemaFieldsPathOverride:r,schemaPath:A,schemaPathSuffix:u,submitRef:D})=>{let{id:o,collectionSlug:a,getDocPreferences:i,globalSlug:n}=k(),{fields:s}=v(),t=T(),m=H(new AbortController),[d,l]=U(!1),{fieldProps:{featureClientSchemaMap:f}}=F(),{getFormState:p}=L(),c=r??`${A}.lexical_internal_feature.${e}${u?`.${u}`:""}`,C=b??f[e]?.[c];M(()=>{let h=new AbortController;return(async()=>{let{state:g}=await p({id:o,collectionSlug:a,data:S??{},docPermissions:{fields:!0},docPreferences:await i(),documentFormState:E(s,{excludeFiles:!0}),globalSlug:n,initialBlockData:S,operation:"update",readOnly:!t,renderAllFields:!0,schemaPath:c,signal:h.signal});l(g)})(),()=>{R(h)}},[c,o,S,p,a,t,n,i,s]);let x=B(async({formState:h})=>{R(m.current);let P=new AbortController;m.current=P;let{state:g}=await p({id:o,collectionSlug:a,docPermissions:{fields:!0},docPreferences:await i(),documentFormState:E(s,{excludeFiles:!0}),formState:h,globalSlug:n,initialBlockFormState:h,operation:"update",readOnly:!t,schemaPath:c,signal:P.signal});return g||h},[p,o,t,a,i,s,n,c]);return M(()=>()=>{R(m.current)},[]),d===!1?null:N(W,{beforeSubmit:[x],className:"fields-drawer",disableValidationOnSubmit:!0,fields:Array.isArray(C)?C:[],initialState:d,onChange:[x],onSubmit:w,uuid:V(),children:[I($,{fields:Array.isArray(C)?C:[],forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:c,permissions:!0,readOnly:!t}),I(y,{submitRef:D})]})};var pe=S=>{let e=q(17),{className:b,data:w,drawerSlug:r,drawerTitle:A,featureKey:u,fieldMapOverride:D,handleDrawerSubmit:o,schemaFieldsPathOverride:a,schemaPath:i,schemaPathSuffix:n}=S,{closeModal:s}=J(),{headerActions:t,submitRef:m}=O(),d=A??"",l;e[0]!==s||e[1]!==r||e[2]!==o?(l=(p,c)=>{s(r),setTimeout(()=>{o(p,c)},1)},e[0]=s,e[1]=r,e[2]=o,e[3]=l):l=e[3];let f;return e[4]!==b||e[5]!==w||e[6]!==r||e[7]!==u||e[8]!==D||e[9]!==t||e[10]!==a||e[11]!==i||e[12]!==n||e[13]!==m||e[14]!==d||e[15]!==l?(f=_(G,{children:_(z,{className:b,headerActions:t,slug:r,title:d,children:_(j,{data:w,featureKey:u,fieldMapOverride:D,handleDrawerSubmit:l,schemaFieldsPathOverride:a,schemaPath:i,schemaPathSuffix:n,submitRef:m})})}),e[4]=b,e[5]=w,e[6]=r,e[7]=u,e[8]=D,e[9]=t,e[10]=a,e[11]=i,e[12]=n,e[13]=m,e[14]=d,e[15]=l,e[16]=f):f=e[16],f};import{createCommand as K}from"lexical";var be=K("INSERT_UPLOAD_WITH_DRAWER_COMMAND");export{pe as a,be as b};
2
+ //# sourceMappingURL=chunk-UD4DQ4AK.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utilities/fieldsDrawer/Drawer.tsx", "../../../src/utilities/fieldsDrawer/DrawerContent.tsx", "../../../src/features/upload/client/drawer/commands.ts"],
4
+ "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", "'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", "'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nexport const INSERT_UPLOAD_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_UPLOAD_WITH_DRAWER_COMMAND')\n"],
5
+ "mappings": "uFAAA,OAAAA,KAAAC,MAAA,iEAGA,OAASC,UAAAA,EAAQC,qBAAAA,EAAmBC,YAAAA,MAAgB,iBACpD,MAAkB,0DCDlB,OAASC,sBAAAA,MAA0B,oCACnC,OACEC,QAAAA,EACAC,gBAAAA,EACAC,mBAAAA,EACAC,mBAAAA,EACAC,sBAAAA,MACK,iBACP,OAASC,kBAAAA,MAAsB,wBAC/B,OAASC,8CAAAA,MAAkD,iBAC3D,OAAgBC,eAAAA,EAAaC,aAAAA,EAAWC,UAAAA,EAAQC,YAAAA,MAAgB,QAChE,OAASC,MAAMC,MAAY,OAMpB,IAAAC,EAAA,CAAA,CAEP,KAAAC,EAKEA,WAAAA,EACAC,iBAAAA,EACAC,mBAAAA,EACAC,yBAAAA,EACAC,WAAAA,EACAC,iBAAAA,EACAC,UAAAA,KACAC,CACD,GAAA,CACC,GAAAC,EAAQA,eAAAA,EAAIC,kBAAAA,EAAgBC,WAAAA,GAAmBC,EAAAA,EAAeC,CAC9D,OAAMC,GAAEC,EAAQD,EAAyBE,EAAAC,EAAA,EACnCC,EAAaD,EAAA,IAAA,eAAA,EAEbE,CAAAA,EAAAA,CAA6BC,EAAAA,EAAWC,EAAAA,EAExC,CAEN,WAAM,CACJC,uBAAAA,IAAoCC,EAAA,EAClCA,CAEJ,aAAAC,GAAQA,EAAAA,EAAiBC,EAAApB,GAAA,GAAAC,CAAA,6BAAAJ,CAAA,GAAAK,EAAA,IAAAA,CAAA,GAAA,EAAA,GAEnBmB,EAAAA,GACJrB,EACGC,CAAA,IAAAoB,CAAA,EAE0FC,EAAA,IAAA,CAE/FA,IAAAA,EAAU,IAAA,gBAyBR,OAxBuBN,SAAA,CAEvB,GAAMO,CACJ,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Af,EAAA,EAAA,IAAAiB,GAAAjB,EAAA,EAAA,IAAAkB,GAvBNI,EAAAC,EAAAC,EAAA,CAAAC,SACEF,EAAAG,EAAA,CAAAxB,UAAAA,EAAAY,cAAAA,EAAAa,KAGQvB,EAAAwB,MACCX,EAAeQ,SAEtBF,EAAAM,EAAA,CAAA1B,KAAAA,EAAAG,WAAAA,EAAAC,iBAAAA,EAAAC,mBAIsBU,EAYpBT,yBAAAA,EAAAC,WAAAA,EAAAC,iBAAAA,EAAAI,UAAAA,CAAA,CAAA,iHAvBNO,GE1CJ,OAASQ,iBAAAA,MAAqB,UAEvB,IAAMC,GAERD,EAAc,mCAAA",
6
+ "names": ["c", "_c", "Drawer", "EditDepthProvider", "useModal", "useLexicalEditable", "Form", "RenderFields", "useDocumentForm", "useDocumentInfo", "useServerFunctions", "abortAndIgnore", "deepCopyObjectSimpleWithoutReactComponents", "useCallback", "useEffect", "useRef", "useState", "v4", "uuid", "DrawerContent", "data", "featureKey", "fieldMapOverride", "handleDrawerSubmit", "schemaFieldsPathOverride", "schemaPath", "schemaPathSuffix", "submitRef", "id", "collectionSlug", "getDocPreferences", "globalSlug", "useDocumentInfo", "parentDocumentFields", "fields", "useDocumentForm", "useLexicalEditable", "isEditable", "onChangeAbortControllerRef", "useRef", "AbortController", "fieldProps", "useEditorConfigContext", "getFormState", "useServerFunctions", "schemaFieldsPath", "useEffect", "awaitInitialState", "state", "docPermissions", "docPreferences", "deepCopyObjectSimpleWithoutReactComponents", "documentFormState", "initialBlockData", "operation", "readOnly", "renderAllFields", "setInitialState", "abortAndIgnore", "controller", "onChange", "formState", "state_0", "prevFormState", "initialBlockFormState", "initialState", "_jsxs", "Form", "beforeSubmit", "className", "disableValidationOnSubmit", "isArray", "onSubmit", "uuid", "_jsx", "RenderFields", "forceRender", "parentIndexPath", "parentPath", "parentSchemaPath", "permissions", "FieldsDrawer", "t0", "$", "_c", "className", "data", "drawerSlug", "drawerTitle", "featureKey", "fieldMapOverride", "handleDrawerSubmit", "schemaFieldsPathOverride", "schemaPath", "schemaPathSuffix", "closeModal", "useModal", "headerActions", "submitRef", "useDrawerSubmit", "t1", "t2", "args", "args2", "setTimeout", "t3", "_jsx", "EditDepthProvider", "children", "Drawer", "slug", "title", "DrawerContent", "createCommand", "INSERT_UPLOAD_WITH_DRAWER_COMMAND"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{c as _}from"react/compiler-runtime";import{jsx as b}from"react/jsx-runtime";import{useLexicalComposerContext as h}from"@lexical/react/LexicalComposerContext";import{useDocumentDrawer as v,useModal as E}from"@payloadcms/ui";import{$getPreviousSelection as P,$getSelection as W,$setSelection as q}from"lexical";import{useEffect as y,useState as O}from"react";var J=j=>{let e=_(25),[o]=h(),[n,L]=O(null),[c,k]=O(!1),[d,g,M]=v(j),{closeDrawer:x,drawerSlug:t,openDrawer:C}=M,{modalState:i}=E(),a;e[0]!==o?(a=()=>{o.read(()=>{let l=W()??P();L(l)}),k(!0)},e[0]=o,e[1]=a):a=e[1];let s=a,u;e[2]!==o||e[3]!==n?(u=()=>{n&&o.update(()=>{q(n.clone())},{discrete:!0,skipTransforms:!0})},e[2]=o,e[3]=n,e[4]=u):u=e[4];let m=u,f;e[5]!==x?(f=()=>{x()},e[5]=x,e[6]=f):f=e[6];let T=f,D,p;e[7]!==t||e[8]!==i||e[9]!==m||e[10]!==c?(D=()=>{if(!c)return;let l=i[t];l&&!l?.isOpen&&(k(!1),setTimeout(()=>{m()},1))},p=[i,t,m,c],e[7]=t,e[8]=i,e[9]=m,e[10]=c,e[11]=D,e[12]=p):(D=e[11],p=e[12]),y(D,p);let S;e[13]!==C||e[14]!==s?(S=()=>{s(),C()},e[13]=C,e[14]=s,e[15]=S):S=e[15];let $=S,r;e[16]!==g||e[17]!==s?(r=l=>b(g,{...l,onClick:s}),e[16]=g,e[17]=s,e[18]=r):r=e[18];let w;return e[19]!==d||e[20]!==T||e[21]!==t||e[22]!==$||e[23]!==r?(w={closeDocumentDrawer:T,DocumentDrawer:d,documentDrawerSlug:t,DocumentDrawerToggler:r,openDocumentDrawer:$},e[19]=d,e[20]=T,e[21]=t,e[22]=$,e[23]=r,e[24]=w):w=e[24],w};export{J as a};
2
+ //# sourceMappingURL=chunk-WSAPGI3Z.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/utilities/fieldsDrawer/useLexicalDocumentDrawer.tsx"],
4
+ "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"],
5
+ "mappings": "AAAA,OAAAA,KAAAC,MAAA,iEAIA,OAASC,6BAAAA,MAAiC,wCAC1C,OAASC,qBAAAA,EAAmBC,YAAAA,MAAgB,iBAC5C,OAASC,yBAAAA,EAAuBC,iBAAAA,EAAeC,iBAAAA,MAAqB,UACpE,OAAsBC,aAAAA,EAAWC,YAAAA,MAAgB,QAO1C,IAAMC,EAA2BC,GAAA,CAAA,IAAAC,EAAAX,EAAA,EAAA,EAStC,CAAAY,CAAA,EAAiBX,EAAA,EACjB,CAAAY,EAAAC,CAAA,EAA4CN,EAAA,IAA+B,EAC3E,CAAAO,EAAAC,CAAA,EAA8BR,EAAA,EAAkB,EAEhD,CAAAS,EAAAC,EAAAC,CAAA,EAIIjB,EAAkBQ,CAAA,EADpB,CAAAU,YAAAA,EAAAC,WAAAC,EAAAC,WAAAA,CAAA,EAAAJ,EAEF,CAAAK,WAAAA,CAAA,EAAuBrB,EAAA,EAAAsB,EAAAd,EAAA,CAAA,IAAAC,GAEYa,EAAAA,IAAA,CACjCb,EAAAc,KAAA,IAAA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A1B,EAAA,EAAA,EAAA2B,IAAAD,EAAA1B,EAAA,EAAA,EAAA2B,EAAA3B,EAAA,EAAA,GAb9DJ,EAAU8B,EAaPC,CAA2D,EAAA,IAAAI,EAAA/B,EAAA,EAAA,IAAAY,GAAAZ,EAAA,EAAA,IAAAiB,GAEvBc,EAAAA,IAAA,CACrCd,EAAA,EACAL,EAAA,CAAA,EACFZ,EAAA,EAAA,EAAAY,EAAAZ,EAAA,EAAA,EAAAiB,EAAAjB,EAAA,EAAA,EAAA+B,GAAAA,EAAA/B,EAAA,EAAA,EAHA,IAAAgC,EAA2BD,EAGIE,EAAAjC,EAAA,EAAA,IAAAO,GAAAP,EAAA,EAAA,IAAAiB,GAMNgB,EAAAC,GAAWC,EAAC5B,EAAA,CAAA,GAA0B2B,EAAKE,QAAWnB,CAAA,CAAA,uGAJxEoB,EAAA,CAAAZ,oBAAAA,EAAAnB,eAAAA,EAAAK,mBAAAA,EAAAJ,sBAIkB0B,wBAEzBjC,EAAA,EAAA,EAAAM,EAAAN,EAAA,EAAA,EAAAyB,EAAAzB,EAAA,EAAA,EAAAW,EAAAX,EAAA,EAAA,EAAAgC,EAAAhC,EAAA,EAAA,EAAAiC,EAAAjC,EAAA,EAAA,EAAAqC,GAAAA,EAAArC,EAAA,EAAA,EANOqC,CAMP",
6
+ "names": ["c", "_c", "useLexicalComposerContext", "useDocumentDrawer", "useModal", "$getPreviousSelection", "$getSelection", "$setSelection", "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"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{a as ue,b as me,c as de}from"./chunk-5VIL27GI.js";import{b as ae}from"./chunk-RJ5MAOKZ.js";import{jsx as l,jsxs as _}from"react/jsx-runtime";import{useLexicalComposerContext as Ke}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as Je}from"@lexical/react/useLexicalEditable";import{getTranslation as fe}from"@payloadcms/translations";import{Button as pe,Drawer as ze,EditDepthProvider as Ve,Form as He,formatDrawerSlug as We,RenderFields as Xe,ShimmerEffect as Ge,useConfig as Ue,useDocumentForm as qe,useDocumentInfo as Qe,useEditDepth as Ye,useServerFunctions as Ze,useTranslation as et}from"@payloadcms/ui";import{abortAndIgnore as J}from"@payloadcms/ui/shared";import{$getNodeByKey as z,SKIP_DOM_SELECTION_TAG as be}from"lexical";import{deepCopyObjectSimpleWithoutReactComponents as V,reduceFieldsToValues as tt}from"payload/shared";import F,{createContext as ot,useCallback as H,useEffect as E,useMemo as B,useRef as y}from"react";import{v4 as nt}from"uuid";import{jsx as Le}from"react/jsx-runtime";import Pe from"bson-objectid";import{$applyNodeReplacement as Re}from"lexical";import je from"react";import{addClassNamesToElement as Ne}from"@lexical/utils";import Oe from"bson-objectid";import{$applyNodeReplacement as Te,DecoratorNode as Ee}from"lexical";var S=class extends Ee{__cacheBuster;__fields;constructor({cacheBuster:t,fields:e,key:i}){super(i),this.__fields=e,this.__cacheBuster=t||0}static clone(t){return new this({cacheBuster:t.__cacheBuster,fields:t.__fields,key:t.__key})}static getType(){return"inlineBlock"}static importDOM(){return{}}static importJSON(t){return $e(t.fields)}static isInline(){return!1}canIndent(){return!0}createDOM(t){let e=document.createElement("span");return Ne(e,t?.theme?.inlineBlock),e}decorate(t,e){return null}exportDOM(){let t=document.createElement("span");t.classList.add("inline-block-container");let e=document.createTextNode(this.getTextContent());return t.append(e),{element:t}}exportJSON(){return{type:"inlineBlock",fields:this.getFields(),version:1}}getCacheBuster(){return this.getLatest().__cacheBuster}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}isInline(){return!0}setFields(t,e){let i=this.getWritable();i.__fields=t,e||i.__cacheBuster++}updateDOM(){return!1}};function $e(c){return Te(new S({fields:{...c,id:c?.id||new Oe.default().toHexString()}}))}var Me=je.lazy(()=>import("./componentInline-R3EPNYWF.js").then(c=>({default:c.InlineBlockComponent}))),T=class extends S{static clone(t){return super.clone(t)}static getType(){return super.getType()}static importJSON(t){return Ae(t.fields)}decorate(...[t,e,i,f]){return Le(Me,{cacheBuster:this.getCacheBuster(),className:e.theme.inlineBlock??"LexicalEditorTheme__inlineBlock",CustomBlock:i,CustomLabel:f,formData:this.getFields(),nodeKey:this.getKey()})}exportJSON(){return super.exportJSON()}};function Ae(c){return Re(new T({fields:{...c,id:c?.id||new Pe.default().toHexString()}}))}function K(c){return c instanceof T}var he=ot({initialState:!1}),ke=()=>F.use(he),vt=c=>{let{cacheBuster:t,className:e,CustomBlock:i,CustomLabel:f,formData:o,nodeKey:a}=c,[k]=Ke(),u=Je(),{i18n:$,t:h}=et(),{createdInlineBlock:W,fieldProps:{featureClientSchemaMap:Be,initialLexicalFormState:Ce,schemaPath:X},setCreatedInlineBlock:G,uuid:ge}=ae(),{fields:D}=qe(),{getFormState:I}=Ze(),xe=Ye(),U=y(!1),[m,L]=F.useState(()=>{let r=Ce?.[o.id]?.formState;return r?Object.fromEntries(Object.entries(r).map(([s,n])=>[s,s in o?{...n,initialValue:o[s],value:o[s]}:n])):!1}),q=y(!1),Q=y(t);E(()=>{q.current?(Q.current!==t&&L(!1),Q.current=t):q.current=!0},[t]);let[Se]=F.useState(()=>nt()),[Y,Z]=F.useState(()=>{if(!f)return m?._components?.customComponents?.BlockLabel??void 0}),[ee,te]=F.useState(()=>{if(!i)return m?._components?.customComponents?.Block??void 0}),oe=B(()=>i?l(i,{className:e,formData:o,isEditor:!0,isJSXConverter:!1,nodeKey:a,useInlineBlockComponentContext:ke}):ee,[i,e,o,a,ee]),P=B(()=>f?l(f,{className:e,formData:o,isEditor:!0,isJSXConverter:!1,nodeKey:a,useInlineBlockComponentContext:ke}):Y,[f,e,o,a,Y]),ne=We({slug:`lexical-inlineBlocks-create-${ge}-${o.id}`,depth:xe}),{toggleDrawer:b}=de(ne,!0),_e=y(null),{id:w,collectionSlug:v,getDocPreferences:N,globalSlug:O}=Qe(),{config:ye}=Ue(),Fe=`${X}.lexical_internal_feature.blocks.lexical_inline_blocks.${o.blockType}`,C=Be.blocks?.[Fe]?.[0],d=C?.blockReferences?typeof C?.blockReferences?.[0]=="string"?ye.blocksMap[C?.blockReferences?.[0]]:C?.blockReferences?.[0]:C?.blocks?.[0],re=d?.fields??[];E(()=>{!U.current&&W?.getKey()===a&&(re.length>2&&b(),G?.(void 0),U.current=!0)},[re.length,W,a,G,b]);let se=H(()=>{k.update(()=>{z(a)?.remove()})},[k,a]),g=d?.labels?.singular?fe(d?.labels.singular,$):d?.slug,R=y(new AbortController),x=`${X}.lexical_internal_feature.blocks.lexical_inline_blocks.${d?.slug}.fields`;E(()=>{let r=new AbortController;return o&&!m&&(async()=>{let{state:n}=await I({id:w,collectionSlug:v,data:o,docPermissions:{fields:!0},docPreferences:await N(),documentFormState:V(D,{excludeFiles:!0}),globalSlug:O,initialBlockData:o,initialBlockFormState:o,operation:"update",readOnly:!u,renderAllFields:!0,schemaPath:x,signal:r.signal});if(n){let p=tt(V(n,{excludeFiles:!0}),!0);k.update(()=>{let A=z(a);if(A&&K(A)){let ce=p;ce.blockType=o.blockType,A.setFields(ce,!0)}},{tag:be}),L(n),f||Z(n._components?.customComponents?.BlockLabel),i||te(n._components?.customComponents?.Block)}})(),()=>{J(r)}},[I,k,a,u,f,i,x,w,o,m,v,O,N,D]);let le=H(async({formState:r,submit:s})=>{J(R.current);let n=new AbortController;R.current=n;let{state:p}=await I({id:w,collectionSlug:v,docPermissions:{fields:!0},docPreferences:await N(),documentFormState:V(D,{excludeFiles:!0}),formState:r,globalSlug:O,initialBlockFormState:r,operation:"update",readOnly:!u,renderAllFields:!!s,schemaPath:x,signal:n.signal});return p?(s&&(f||Z(p._components?.customComponents?.BlockLabel),i||te(p._components?.customComponents?.Block)),p):r},[I,w,v,N,D,O,u,x,i,f]);E(()=>{let r=(s,n)=>Object.keys(n).some(p=>n[p]&&s[p]!==n[p].value);return()=>{m&&r(o,m)&&L(!1),J(R.current)}},[o,m]);let De=H((r,s)=>{s.blockType=o.blockType,k.update(()=>{let n=z(a);n&&K(n)&&n.setFields(s,!0)},{tag:be})},[k,a,o]),{headerActions:Ie,submitRef:we}=ue(),j=B(()=>()=>l(pe,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!u,icon:"x",onClick:r=>{r.preventDefault(),r.stopPropagation(),se()},round:!0,size:"medium",tooltip:h("lexical:blocks:inlineBlocks:remove",{label:g})}),[e,g,u,se,h]),ve=B(()=>()=>l(pe,{buttonStyle:"ghost",className:`${e}__editButton`,disabled:!u,el:"button",icon:"edit",onClick:()=>{b()},round:!0,size:"medium",tooltip:h("lexical:blocks:inlineBlocks:edit",{label:g})}),[e,g,u,h,b]),M=B(()=>({children:r,className:s})=>l("div",{className:[`${e}__container`,e+"-"+o.blockType,s].filter(Boolean).join(" "),...u?{onClick:()=>b(),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),b())},role:"button",tabIndex:0}:{},ref:_e,children:r}),[e,o.blockType,u,b]),ie=B(()=>P?()=>P:()=>l("div",{children:d?.labels?fe(d?.labels.singular,$):""}),[P,d?.labels,$]);return d?_(He,{beforeSubmit:[async({formState:r})=>await le({formState:r,submit:!0})],disableValidationOnSubmit:!0,el:"div",fields:d?.fields,initialState:m||{},onChange:[le],onSubmit:(r,s)=>{De(r,s),b()},uuid:Se,children:[l(Ve,{children:l(ze,{className:"",headerActions:Ie,slug:ne,title:h(`lexical:blocks:inlineBlocks:${o?.id?"edit":"create"}`,{label:g??h("lexical:blocks:inlineBlocks:label")}),children:m?_("div",{className:"fields-drawer",children:[l(Xe,{fields:d?.fields,forceRender:!0,parentIndexPath:"",parentPath:"",parentSchemaPath:x,permissions:!0,readOnly:!u}),l(me,{submitRef:we})]}):null})}),oe?l(he,{value:{EditButton:ve,initialState:m,InlineBlockContainer:M,Label:ie,nodeKey:a,RemoveButton:j},children:oe}):_(M,{children:[m?l(ie,{}):l(Ge,{height:"15px",width:"40px"}),u?l("div",{className:`${e}__actions`,children:l(j,{})}):null]})]}):_(M,{className:`${e}-not-found`,children:[_("span",{children:["Error: Block '",o.blockType,"' not found"]}),u?l("div",{className:`${e}__actions`,children:l(j,{})}):null]})};export{ke as a,vt as b,T as c,Ae as d,K as e};
2
+ //# sourceMappingURL=chunk-ZYXHC5CY.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/blocks/client/componentInline/index.tsx", "../../../src/features/blocks/client/nodes/InlineBlocksNode.tsx", "../../../src/features/blocks/server/nodes/InlineBlocksNode.tsx"],
4
+ "sourcesContent": ["'use client'\n\nimport type { BlocksFieldClient, ClientBlock, Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Drawer,\n EditDepthProvider,\n Form,\n formatDrawerSlug,\n RenderFields,\n ShimmerEffect,\n useConfig,\n useDocumentForm,\n useDocumentInfo,\n useEditDepth,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { $getNodeByKey, SKIP_DOM_SELECTION_TAG } from 'lexical'\n\nimport './index.css'\nimport '../../../../utilities/fieldsDrawer/index.css'\n\nimport { deepCopyObjectSimpleWithoutReactComponents, reduceFieldsToValues } from 'payload/shared'\nimport React, { createContext, useCallback, useEffect, useMemo, useRef } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { ViewMapInlineBlockComponentProps } from '../../../../types/index.js'\nimport type { InlineBlockFields } from '../../server/schema.js'\nimport type { BlockComponentProps } from '../component/index.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport {\n RegisterFormSubmit,\n useDrawerSubmit,\n} from '../../../../utilities/fieldsDrawer/useDrawerSubmit.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { $isInlineBlockNode } from '../nodes/InlineBlocksNode.js'\n\nexport type InlineBlockComponentProps<\n TFormData extends Record<string, unknown> = InlineBlockFields,\n> = {\n readonly CustomBlock?: React.FC<ViewMapInlineBlockComponentProps>\n readonly CustomLabel?: React.FC<ViewMapInlineBlockComponentProps>\n} & Pick<BlockComponentProps<TFormData>, 'cacheBuster' | 'className' | 'formData' | 'nodeKey'>\n\nexport type InlineBlockComponentContextType = {\n EditButton?: React.FC\n initialState: false | FormState | undefined\n InlineBlockContainer?: React.FC<{ children: React.ReactNode }>\n Label?: React.FC\n nodeKey?: string\n RemoveButton?: React.FC\n}\n\nconst InlineBlockComponentContext = createContext<InlineBlockComponentContextType>({\n initialState: false,\n})\n\nexport const useInlineBlockComponentContext = () => React.use(InlineBlockComponentContext)\n\nexport const InlineBlockComponent: React.FC<InlineBlockComponentProps<InlineBlockFields>> = (\n props,\n) => {\n const {\n cacheBuster,\n className: baseClass,\n CustomBlock: CustomBlockFromProps,\n CustomLabel: CustomLabelFromProps,\n formData,\n nodeKey,\n } = props\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation<object, string>()\n const {\n createdInlineBlock,\n fieldProps: { featureClientSchemaMap, initialLexicalFormState, schemaPath },\n setCreatedInlineBlock,\n uuid: uuidFromContext,\n } = useEditorConfigContext()\n const { fields: parentDocumentFields } = useDocumentForm()\n\n const { getFormState } = useServerFunctions()\n const editDepth = useEditDepth()\n const firstTimeDrawer = useRef(false)\n\n const [initialState, setInitialState] = React.useState<false | FormState | undefined>(() => {\n // Initial form state that was calculated server-side. May have stale values\n const cachedFormState = initialLexicalFormState?.[formData.id]?.formState\n if (!cachedFormState) {\n return false\n }\n\n // Merge current formData values into the cached form state\n // This ensures that when the component remounts (e.g., due to view changes), we don't lose user edits\n return Object.fromEntries(\n Object.entries(cachedFormState).map(([fieldName, fieldState]) => [\n fieldName,\n fieldName in formData\n ? {\n ...fieldState,\n initialValue: formData[fieldName],\n value: formData[fieldName],\n }\n : fieldState,\n ]),\n )\n })\n\n const hasMounted = useRef(false)\n const prevCacheBuster = useRef(cacheBuster)\n useEffect(() => {\n if (hasMounted.current) {\n if (prevCacheBuster.current !== cacheBuster) {\n setInitialState(false)\n }\n prevCacheBuster.current = cacheBuster\n } else {\n hasMounted.current = true\n }\n }, [cacheBuster])\n\n const [formUuid] = React.useState(() => uuid())\n\n // Server-rendered custom components (from admin.components, NOT viewMap).\n // When viewMap components exist, we render them directly with formData instead.\n const [CustomLabel, setCustomLabel] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomLabelFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.BlockLabel ?? undefined\n })\n\n const [CustomBlock, setCustomBlock] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomBlockFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.Block ?? undefined\n })\n\n const resolvedCustomBlock = useMemo(() => {\n if (CustomBlockFromProps) {\n return (\n <CustomBlockFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useInlineBlockComponentContext={useInlineBlockComponentContext}\n />\n )\n }\n return CustomBlock\n }, [CustomBlockFromProps, baseClass, formData, nodeKey, CustomBlock])\n\n const resolvedCustomLabel = useMemo(() => {\n if (CustomLabelFromProps) {\n return (\n <CustomLabelFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useInlineBlockComponentContext={useInlineBlockComponentContext}\n />\n )\n }\n return CustomLabel\n }, [CustomLabelFromProps, baseClass, formData, nodeKey, CustomLabel])\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-inlineBlocks-create-${uuidFromContext}-${formData.id}`,\n depth: editDepth,\n })\n const { toggleDrawer } = useLexicalDrawer(drawerSlug, true)\n\n const inlineBlockElemElemRef = useRef<HTMLDivElement | null>(null)\n const { id, collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()\n const { config } = useConfig()\n\n const componentMapRenderedBlockPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.${formData.blockType}`\n\n const clientSchemaMap = featureClientSchemaMap['blocks']\n\n const blocksField: BlocksFieldClient | undefined = clientSchemaMap?.[\n componentMapRenderedBlockPath\n ]?.[0] as BlocksFieldClient | undefined\n\n const clientBlock: ClientBlock | undefined = blocksField?.blockReferences\n ? typeof blocksField?.blockReferences?.[0] === 'string'\n ? config.blocksMap[blocksField?.blockReferences?.[0]]\n : blocksField?.blockReferences?.[0]\n : blocksField?.blocks?.[0]\n\n const clientBlockFields = clientBlock?.fields ?? []\n\n // Open drawer on \"mount\"\n useEffect(() => {\n if (!firstTimeDrawer.current && createdInlineBlock?.getKey() === nodeKey) {\n // > 2 because they always have \"id\" and \"blockName\" fields\n if (clientBlockFields.length > 2) {\n toggleDrawer()\n }\n setCreatedInlineBlock?.(undefined)\n firstTimeDrawer.current = true\n }\n }, [clientBlockFields.length, createdInlineBlock, nodeKey, setCreatedInlineBlock, toggleDrawer])\n\n const removeInlineBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const blockDisplayName = clientBlock?.labels?.singular\n ? getTranslation(clientBlock?.labels.singular, i18n)\n : clientBlock?.slug\n\n const onChangeAbortControllerRef = useRef(new AbortController())\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks.${clientBlock?.slug}.fields`\n\n // Initial state for newly created blocks\n useEffect(() => {\n const abortController = new AbortController()\n\n const awaitInitialState = async () => {\n /*\n * This will only run if a new block is created. For all existing blocks that are loaded when the document is loaded, or when the form is saved,\n * this is not run, as the lexical field RSC will fetch the state server-side and pass it to the client. That way, we avoid unnecessary client-side\n * requests. Though for newly created blocks, we need to fetch the state client-side, as the server doesn't know about the block yet.\n */\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: formData,\n docPermissions: { fields: true },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n globalSlug,\n initialBlockData: formData,\n initialBlockFormState: formData,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: abortController.signal,\n })\n\n if (state) {\n const newFormStateData: InlineBlockFields = reduceFieldsToValues(\n deepCopyObjectSimpleWithoutReactComponents(state, { excludeFiles: true }),\n true,\n ) as InlineBlockFields\n\n // Things like default values may come back from the server => update the node with the new data\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isInlineBlockNode(node)) {\n const newData = newFormStateData\n newData.blockType = formData.blockType\n\n node.setFields(newData, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n\n setInitialState(state)\n if (!CustomLabelFromProps) {\n setCustomLabel(state['_components']?.customComponents?.BlockLabel)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(state['_components']?.customComponents?.Block)\n }\n }\n }\n\n if (formData && !initialState) {\n void awaitInitialState()\n }\n\n return () => {\n abortAndIgnore(abortController)\n }\n }, [\n getFormState,\n editor,\n nodeKey,\n isEditable,\n CustomLabelFromProps,\n CustomBlockFromProps,\n schemaFieldsPath,\n id,\n formData,\n initialState,\n collectionSlug,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n ])\n\n /**\n * HANDLE ONCHANGE\n */\n const onChange = useCallback(\n async ({ formState: prevFormState, submit }: { formState: FormState; submit?: boolean }) => {\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 renderAllFields: submit ? true : false,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!state) {\n return prevFormState\n }\n\n if (submit) {\n if (!CustomLabelFromProps) {\n setCustomLabel(state['_components']?.customComponents?.BlockLabel)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(state['_components']?.customComponents?.Block)\n }\n }\n\n return state\n },\n [\n getFormState,\n id,\n collectionSlug,\n getDocPreferences,\n parentDocumentFields,\n globalSlug,\n isEditable,\n schemaFieldsPath,\n CustomBlockFromProps,\n CustomLabelFromProps,\n ],\n )\n // cleanup effect\n useEffect(() => {\n const isStateOutOfSync = (formData: InlineBlockFields, initialState: FormState) => {\n return Object.keys(initialState).some(\n (key) => initialState[key] && formData[key] !== initialState[key].value,\n )\n }\n\n return () => {\n // If the component is unmounted (either via removeInlineBlock or via lexical itself) and the form state got changed before,\n // we need to reset the initial state to force a re-fetch of the initial state when it gets mounted again (e.g. via lexical history undo).\n // Otherwise it would use an outdated initial state.\n if (initialState && isStateOutOfSync(formData, initialState)) {\n setInitialState(false)\n }\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [formData, initialState])\n\n /**\n * HANDLE FORM SUBMIT\n */\n const onFormSubmit = useCallback(\n (formState: FormState, newData: Data) => {\n newData.blockType = formData.blockType\n\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isInlineBlockNode(node)) {\n node.setFields(newData as InlineBlockFields, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n },\n [editor, nodeKey, formData],\n )\n\n const { headerActions, submitRef } = useDrawerSubmit()\n\n const RemoveButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n e.stopPropagation()\n removeInlineBlock()\n }}\n round\n size=\"medium\"\n tooltip={t('lexical:blocks:inlineBlocks:remove', { label: blockDisplayName })}\n />\n ),\n [baseClass, blockDisplayName, isEditable, removeInlineBlock, t],\n )\n\n const EditButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__editButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={() => {\n toggleDrawer()\n }}\n round\n size=\"medium\"\n tooltip={t('lexical:blocks:inlineBlocks:edit', { label: blockDisplayName })}\n />\n ),\n [baseClass, blockDisplayName, isEditable, t, toggleDrawer],\n )\n\n const InlineBlockContainer = useMemo(\n () =>\n ({ children, className }: { children: React.ReactNode; className?: string }) => (\n <div\n className={[`${baseClass}__container`, baseClass + '-' + formData.blockType, className]\n .filter(Boolean)\n .join(' ')}\n {...(isEditable\n ? {\n onClick: () => toggleDrawer(),\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n toggleDrawer()\n }\n },\n role: 'button',\n tabIndex: 0,\n }\n : {})}\n ref={inlineBlockElemElemRef}\n >\n {children}\n </div>\n ),\n [baseClass, formData.blockType, isEditable, toggleDrawer],\n )\n\n const Label = useMemo(() => {\n if (resolvedCustomLabel) {\n return () => resolvedCustomLabel\n } else {\n return () => (\n <div>{clientBlock?.labels ? getTranslation(clientBlock?.labels.singular, i18n) : ''}</div>\n )\n }\n }, [resolvedCustomLabel, clientBlock?.labels, i18n])\n\n if (!clientBlock) {\n return (\n <InlineBlockContainer className={`${baseClass}-not-found`}>\n <span>Error: Block '{formData.blockType}' not found</span>\n {isEditable ? (\n <div className={`${baseClass}__actions`}>\n <RemoveButton />\n </div>\n ) : null}\n </InlineBlockContainer>\n )\n }\n\n return (\n <Form\n beforeSubmit={[\n async ({ formState }) => {\n // This is only called when form is submitted from drawer\n return await onChange({ formState, submit: true })\n },\n ]}\n disableValidationOnSubmit\n el=\"div\"\n fields={clientBlock?.fields}\n initialState={initialState || {}}\n onChange={[onChange]}\n onSubmit={(formState, data) => {\n onFormSubmit(formState, data)\n toggleDrawer()\n }}\n uuid={formUuid}\n >\n <EditDepthProvider>\n <Drawer\n className={''}\n headerActions={headerActions}\n slug={drawerSlug}\n title={t(`lexical:blocks:inlineBlocks:${formData?.id ? 'edit' : 'create'}`, {\n label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label'),\n })}\n >\n {initialState ? (\n <div className=\"fields-drawer\">\n <RenderFields\n fields={clientBlock?.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 </div>\n ) : null}\n </Drawer>\n </EditDepthProvider>\n {resolvedCustomBlock ? (\n <InlineBlockComponentContext\n value={{\n EditButton,\n initialState,\n InlineBlockContainer,\n Label,\n nodeKey,\n RemoveButton,\n }}\n >\n {resolvedCustomBlock}\n </InlineBlockComponentContext>\n ) : (\n <InlineBlockContainer>\n {initialState ? <Label /> : <ShimmerEffect height=\"15px\" width=\"40px\" />}\n {isEditable ? (\n <div className={`${baseClass}__actions`}>\n <RemoveButton />\n </div>\n ) : null}\n </InlineBlockContainer>\n )}\n </Form>\n )\n}\n", "'use client'\nimport ObjectID from 'bson-objectid'\nimport {\n $applyNodeReplacement,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n} from 'lexical'\nimport React, { type JSX } from 'react'\n\nimport type { ViewMapInlineBlockComponentProps } from '../../../../types/index.js'\nimport type { InlineBlockFields, SerializedInlineBlockNode } from '../../server/schema.js'\n\nimport { ServerInlineBlockNode } from '../../server/nodes/InlineBlocksNode.js'\n\nconst InlineBlockComponent = React.lazy(() =>\n import('../componentInline/index.js').then((module) => ({\n default: module.InlineBlockComponent,\n })),\n)\n\nexport type InlineBlockDecorateFunction = (\n editor: LexicalEditor,\n config: EditorConfig,\n CustomBlock?: React.FC<ViewMapInlineBlockComponentProps>,\n CustomLabel?: React.FC<ViewMapInlineBlockComponentProps>,\n) => JSX.Element\n\nexport class InlineBlockNode extends ServerInlineBlockNode {\n static override clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return super.clone(node)\n }\n\n static override getType(): string {\n return super.getType()\n }\n\n static override importJSON(serializedNode: SerializedInlineBlockNode): InlineBlockNode {\n const node = $createInlineBlockNode(serializedNode.fields)\n return node\n }\n\n override decorate(\n ...[_editor, config, CustomBlock, CustomLabel]: Parameters<InlineBlockDecorateFunction>\n ): ReturnType<InlineBlockDecorateFunction> {\n return (\n <InlineBlockComponent\n cacheBuster={this.getCacheBuster()}\n className={config.theme.inlineBlock ?? 'LexicalEditorTheme__inlineBlock'}\n CustomBlock={CustomBlock}\n CustomLabel={CustomLabel}\n formData={this.getFields()}\n nodeKey={this.getKey()}\n />\n )\n }\n\n override exportJSON(): SerializedInlineBlockNode {\n return super.exportJSON()\n }\n}\n\nexport function $createInlineBlockNode(fields: Exclude<InlineBlockFields, 'id'>): InlineBlockNode {\n return $applyNodeReplacement(\n new InlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n }),\n )\n}\n\nexport function $isInlineBlockNode(\n node: InlineBlockNode | LexicalNode | null | undefined,\n): node is InlineBlockNode {\n return node instanceof InlineBlockNode\n}\n", "import type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n} from 'lexical'\nimport type React from 'react'\nimport type { JSX } from 'react'\n\nimport { addClassNamesToElement } from '@lexical/utils'\nimport ObjectID from 'bson-objectid'\nimport { $applyNodeReplacement, DecoratorNode } from 'lexical'\n\nimport type { InlineBlockFields, SerializedInlineBlockNode } from '../schema.js'\n\nexport class ServerInlineBlockNode extends DecoratorNode<null | React.ReactElement> {\n __cacheBuster: number\n __fields: InlineBlockFields\n\n constructor({\n cacheBuster,\n fields,\n key,\n }: {\n cacheBuster?: number\n fields: InlineBlockFields\n key?: NodeKey\n }) {\n super(key)\n this.__fields = fields\n this.__cacheBuster = cacheBuster || 0\n }\n\n static override clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return new this({\n cacheBuster: node.__cacheBuster,\n fields: node.__fields,\n key: node.__key,\n })\n }\n\n static override getType(): string {\n return 'inlineBlock'\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static override importJSON(serializedNode: SerializedInlineBlockNode): ServerInlineBlockNode {\n const node = $createServerInlineBlockNode(serializedNode.fields)\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n canIndent() {\n return true\n }\n\n override createDOM(config?: EditorConfig): HTMLElement {\n const element = document.createElement('span')\n addClassNamesToElement(element, config?.theme?.inlineBlock)\n return element\n }\n\n override decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element | null {\n return null\n }\n\n override exportDOM(): DOMExportOutput {\n const element = document.createElement('span')\n element.classList.add('inline-block-container')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n override exportJSON(): SerializedInlineBlockNode {\n return {\n type: 'inlineBlock',\n fields: this.getFields(),\n version: 1,\n }\n }\n\n getCacheBuster(): number {\n return this.getLatest().__cacheBuster\n }\n\n getFields(): InlineBlockFields {\n return this.getLatest().__fields\n }\n\n override getTextContent(): string {\n return `Block Field`\n }\n\n override isInline() {\n return true\n }\n\n setFields(fields: InlineBlockFields, preventFormStateUpdate?: boolean): void {\n const writable = this.getWritable()\n writable.__fields = fields\n if (!preventFormStateUpdate) {\n writable.__cacheBuster++\n }\n }\n\n override updateDOM(): boolean {\n return false\n }\n}\n\nexport function $createServerInlineBlockNode(\n fields: Exclude<InlineBlockFields, 'id'>,\n): ServerInlineBlockNode {\n return $applyNodeReplacement(\n new ServerInlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n }),\n )\n}\n\nexport function $isServerInlineBlockNode(\n node: LexicalNode | null | ServerInlineBlockNode | undefined,\n): node is ServerInlineBlockNode {\n return node instanceof ServerInlineBlockNode\n}\n"],
5
+ "mappings": "oJAIA,OAASA,6BAAAA,OAAiC,wCAC1C,OAASC,sBAAAA,OAA0B,oCACnC,OAASC,kBAAAA,OAAsB,2BAC/B,OACEC,UAAAA,GACAC,UAAAA,GACAC,qBAAAA,GACAC,QAAAA,GACAC,oBAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,aAAAA,GACAC,mBAAAA,GACAC,mBAAAA,GACAC,gBAAAA,GACAC,sBAAAA,GACAC,kBAAAA,OACK,iBACP,OAASC,kBAAAA,MAAsB,wBAC/B,OAASC,iBAAAA,EAAeC,0BAAAA,OAA8B,UAEtD,OAAO,8CAAAC,EAAA,wBAAAC,OAAA,iBACP,OAAOC,GAAA,iBAAAC,GAAA,eAAAC,EAAA,aAAAC,EAAA,WAAAC,EAAA,UAAAC,MAAA,QAEP,OAASP,MAAAA,OAAAA,gDC3BT,OAAOQ,OAAc,gBACrB,OACEC,yBAAAA,OAIK,UACP,OAAOC,OAAyB,QCGhC,OAASC,0BAAAA,OAA8B,iBACvC,OAAOC,OAAc,gBACrB,OAASC,yBAAAA,GAAuBC,iBAAAA,OAAqB,UAI9C,IAAMC,EAAN,cAAoCD,EAAA,CACzCE,cACAC,SAEAC,YAAY,CACVC,YAAAA,EACAC,OAAAA,EACAC,IAAAA,CAA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alEditable", "getTranslation", "Button", "Drawer", "EditDepthProvider", "Form", "formatDrawerSlug", "RenderFields", "ShimmerEffect", "useConfig", "useDocumentForm", "useDocumentInfo", "useEditDepth", "useServerFunctions", "useTranslation", "abortAndIgnore", "$getNodeByKey", "SKIP_DOM_SELECTION_TAG", "deepCopyObjectSimpleWithoutReactComponents", "reduceFieldsToValues", "React", "createContext", "useCallback", "useEffect", "useMemo", "useRef", "ObjectID", "$applyNodeReplacement", "React", "addClassNamesToElement", "ObjectID", "$applyNodeReplacement", "DecoratorNode", "ServerInlineBlockNode", "__cacheBuster", "__fields", "constructor", "cacheBuster", "fields", "key", "clone", "node", "__key", "getType", "importDOM", "importJSON", "serializedNode", "$createServerInlineBlockNode", "isInline", "canIndent", "createDOM", "config", "element", "document", "createElement", "theme", "inlineBlock", "decorate", "editor", "exportDOM", "classList", "add", "text", "createTextNode", "getTextContent", "append", "exportJSON", "type", "getFields", "version", "getCacheBuster", "getLatest", "setFields", "preventFormStateUpdate", "writable", "getWritable", "updateDOM", "id", "default", "toHexString", "InlineBlockComponent", "React", "lazy", "then", "module", "default", "InlineBlockNode", "ServerInlineBlockNode", "clone", "node", "getType", "importJSON", "serializedNode", "$createInlineBlockNode", "fields", "decorate", "_editor", "config", "CustomBlock", "CustomLabel", "_jsx", "cacheBuster", "getCacheBuster", "className", "theme", "inlineBlock", "formData", "getFields", "nodeKey", "getKey", "exportJSON", "$applyNodeReplacement", "id", "ObjectID", "toHexString", "$isInlineBlockNode", "InlineBlockComponentContext", "createContext", "$isInlineBlockNode", "initialState", "React", "InlineBlockComponent", "props", "cacheBuster", "baseClass", "CustomBlockFromProps", "className", "CustomBlock", "CustomLabel", "formData", "nodeKey", "useLexicalEditable", "i18n", "t", "createdInlineBlock", "fieldProps", "featureClientSchemaMap", "uuidFromContext", "setCreatedInlineBlock", "useEditorConfigContext", "useDocumentForm", "fields", "getFormState", "useServerFunctions", "useRef", "editDepth", "useEditDepth", "setInitialState", "useState", "cachedFormState", "fieldName", "fieldState", "fromEntries", "entries", "initialValue", "prevCacheBuster", "useEffect", "hasMounted", "current", "formUuid", "uuid", "setCustomLabel", "CustomLabelFromProps", "customComponents", "BlockLabel", "resolvedCustomBlock", "useMemo", "isEditor", "useInlineBlockComponentContext", "resolvedCustomLabel", "drawerSlug", "depth", "toggleDrawer", "useLexicalDrawer", "id", "collectionSlug", "getDocPreferences", "globalSlug", "config", "useConfig", "componentMapRenderedBlockPath", "clientSchemaMap", "blocksField", "clientBlockFields", "firstTimeDrawer", "removeInlineBlock", "useCallback", "editor", "length", "$getNodeByKey", "blockDisplayName", "clientBlock", "getTranslation", "labels", "singular", "schemaFieldsPath", "abortController", "state", "data", "docPermissions", "deepCopyObjectSimpleWithoutReactComponents", "parentDocumentFields", "docPreferences", "documentFormState", "initialBlockData", "initialBlockFormState", "operation", "readOnly", "isEditable", "renderAllFields", "signal", "newFormStateData", "reduceFieldsToValues", "node", "newData", "SKIP_DOM_SELECTION_TAG", "setCustomBlock", "awaitInitialState", "abortAndIgnore", "submit", "formState", "controller", "onChangeAbortControllerRef", "excludeFiles", "prevFormState", "state_0", "isStateOutOfSync", "formData_0", "initialState_0", "key", "Object", "onFormSubmit", "blockType", "node_0", "tag", "headerActions", "submitRef", "useDrawerSubmit", "RemoveButton", "buttonStyle", "disabled", "e", "icon", "onClick", "round", "size", "tooltip", "label", "EditButton", "_jsx", "Button", "el", "InlineBlockContainer", "e_0", "onKeyDown", "role", "tabIndex", "children", "ref", "inlineBlockElemElemRef", "formState_0", "beforeSubmit", "onChange", "disableValidationOnSubmit", "onSubmit", "EditDepthProvider", "Drawer", "slug", "title", "_jsxs", "RenderFields", "forceRender", "parentIndexPath", "parentPath", "parentSchemaPath", "RegisterFormSubmit", "value", "Label", "height", "width"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";import{a as E,b as U}from"./chunk-UD4DQ4AK.js";import{c as y}from"./chunk-5VIL27GI.js";import{a as L}from"./chunk-WSAPGI3Z.js";import{b as g}from"./chunk-RJ5MAOKZ.js";import{jsx as a,jsxs as f}from"react/jsx-runtime";import{useLexicalComposerContext as ae}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as oe}from"@lexical/react/useLexicalEditable";import{getTranslation as P}from"@payloadcms/translations";import{Button as h,formatDrawerSlug as le,Pill as se,Thumbnail as ie,useConfig as re,useEditDepth as ne,usePayloadAPI as de,useTranslation as ce}from"@payloadcms/ui";import{$getNodeByKey as T,$getSelection as ue,$isNodeSelection as me,$isRangeSelection as pe}from"lexical";import{formatAdminURL as ge,isImage as fe}from"payload/shared";import{useCallback as _,useEffect as F,useId as he,useReducer as _e,useRef as we,useState as I}from"react";var j={depth:0},Te=k=>{let{className:e,data:{fields:z,relationTo:w,value:c},format:A,nodeKey:l}=k;if(typeof c=="object")throw new Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:B},serverURL:K},getEntityConfig:M}=re(),b=we(null),{uuid:O}=g(),W=ne(),[s]=ae(),{editorConfig:H,fieldProps:{schemaPath:q}}=g(),u=oe(),{i18n:D,t:n}=ce(),[S,m]=I(!1),[$,G]=_e(o=>o+1,0),[i]=I(()=>M({collectionSlug:w})),J=he(),x=le({slug:"lexical-upload-drawer-"+O+J,depth:W}),{toggleDrawer:Q}=y(x,!0),{closeDocumentDrawer:C,DocumentDrawer:V,DocumentDrawerToggler:X}=L({id:c,collectionSlug:i.slug}),[{data:t},{setParams:v}]=de(ge({apiRoute:B,path:`/${i.slug}/${c}`,serverURL:K}),{initialParams:j}),N=t?.thumbnailURL||t?.url;F(()=>s.registerUpdateListener(({editorState:o})=>{o.read(()=>{let r=ue();if(me(r))m(r.has(l));else if(pe(r)){let d=r.getNodes();m(d.some(p=>p.getKey()===l))}else m(!1)})}),[s,l]),F(()=>{let o=b.current?.closest(`.${e}`);o&&o.classList.toggle(`${e}--selected`,S)},[S,e]);let Y=_(()=>{s.update(()=>{T(l)?.remove()})},[s,l]),Z=_(o=>{v({...j,cacheBust:$}),G(),C()},[v,$,C]),R=H?.resolvedFeatureMap?.get("upload")?.sanitizedClientFeatureProps.collections?.[i.slug]?.hasExtraFields,ee=_((o,r)=>{s.update(()=>{let d=T(l);if(d){let p={...d.getData(),fields:r};d.setData(p)}})},[s,l]),te=N&&t?.width&&t?.height?t.width>t.height?"landscape":"portrait":"landscape";return f("div",{className:`${e}__contents ${e}__contents--${te}`,"data-align":A||void 0,"data-filename":t?.filename,ref:b,children:[a("div",{className:`${e}__card`,children:f("div",{className:`${e}__media`,children:[a(ie,{collectionSlug:w,fileSrc:fe(t?.mimeType)?N:null,height:t?.height,size:"none",width:t?.width}),u&&f("div",{className:`${e}__floater`,"data-theme":"dark",children:[a(se,{className:`${e}__collectionLabel`,pillStyle:"dark",size:"small",children:P(i.labels.singular,D)}),a(X,{className:`${e}__doc-drawer-toggler`,children:a("span",{className:`${e}__filename`,children:t?.filename||n("general:untitled")})}),R?a(h,{buttonStyle:"ghost",className:`${e}__upload-drawer-toggler`,disabled:!u,el:"button",icon:"write",onClick:Q,round:!0,size:"medium",tooltip:n("fields:editRelationship")}):null,a("div",{className:`${e}__divider`}),a(h,{buttonStyle:"ghost",className:`${e}__swap-drawer-toggler`,disabled:!u,el:"button",icon:"swap",onClick:()=>{s.dispatchCommand(U,{replace:{nodeKey:l}})},round:!0,size:"medium",tooltip:n("fields:swapUpload")}),a(h,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!u,icon:"x",onClick:o=>{o.preventDefault(),Y()},round:!0,size:"medium",tooltip:n("fields:removeUpload")})]})]})}),c?a(V,{onSave:Z}):null,R?a(E,{data:z,drawerSlug:x,drawerTitle:n("general:editLabel",{label:P(i.labels.singular,D)}),featureKey:"upload",handleDrawerSubmit:ee,schemaPath:q,schemaPathSuffix:i.slug}):null]})};export{Te as UploadComponent};
2
+ //# sourceMappingURL=component-PHZQBOJE.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/features/upload/client/component/index.tsx"],
4
+ "sourcesContent": ["'use client'\nimport type { ClientCollectionConfig, Data, FormState, JsonObject } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n formatDrawerSlug,\n Pill,\n Thumbnail,\n useConfig,\n useEditDepth,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n $isRangeSelection,\n type ElementFormatType,\n} from 'lexical'\nimport { formatAdminURL, isImage } from 'payload/shared'\nimport React, { useCallback, useEffect, useId, useReducer, useRef, useState } from 'react'\n\nimport type { BaseClientFeatureProps } from '../../../typesClient.js'\nimport type { UploadData } from '../../server/schema.js'\nimport type { UploadFeaturePropsClient } from '../index.js'\nimport type { UploadNode } from '../nodes/UploadNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport './index.css'\n\nconst initialParams = {\n depth: 0,\n}\n\nexport type ElementProps = {\n className: string\n data: UploadData\n format?: ElementFormatType\n nodeKey: string\n}\n\nexport const UploadComponent: React.FC<ElementProps> = (props) => {\n const {\n className: baseClass,\n data: { fields, relationTo, value },\n format,\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.',\n )\n }\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n const uploadRef = useRef<HTMLDivElement | null>(null)\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n const [editor] = useLexicalComposerContext()\n\n const {\n editorConfig,\n fieldProps: { schemaPath },\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation()\n const [isSelected, setIsSelected] = useState(false)\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [relatedCollection] = useState<ClientCollectionConfig>(() =>\n getEntityConfig({ collectionSlug: relationTo }),\n )\n\n const componentID = useId()\n\n const extraFieldsDrawerSlug = formatDrawerSlug({\n slug: `lexical-upload-drawer-` + uuid + componentID, // There can be multiple upload components, each with their own drawer, in one single editor => separate them by componentID\n depth: editDepth,\n })\n\n // Need to use hook to initialize useEffect that restores cursor position\n const { toggleDrawer } = useLexicalDrawer(extraFieldsDrawerSlug, true)\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n // Get the referenced document\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const thumbnailSRC = data?.thumbnailURL || data?.url\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = uploadRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeUpload = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateUpload = useCallback(\n (_data: Data) => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n dispatchCacheBust()\n closeDocumentDrawer()\n },\n [setParams, cacheBust, closeDocumentDrawer],\n )\n\n const hasExtraFields = (\n editorConfig?.resolvedFeatureMap?.get('upload')\n ?.sanitizedClientFeatureProps as BaseClientFeatureProps<UploadFeaturePropsClient>\n ).collections?.[relatedCollection.slug]?.hasExtraFields\n\n const onExtraFieldsDrawerSubmit = useCallback(\n (_: FormState, data: JsonObject) => {\n // Update lexical node (with key nodeKey) with new data\n editor.update(() => {\n const uploadNode: null | UploadNode = $getNodeByKey(nodeKey)\n if (uploadNode) {\n const newData: UploadData = {\n ...uploadNode.getData(),\n fields: data,\n }\n uploadNode.setData(newData)\n }\n })\n },\n [editor, nodeKey],\n )\n\n const aspectRatio =\n thumbnailSRC && data?.width && data?.height\n ? data.width > data.height\n ? 'landscape'\n : 'portrait'\n : 'landscape'\n\n return (\n <div\n className={`${baseClass}__contents ${baseClass}__contents--${aspectRatio}`}\n data-align={format || undefined}\n data-filename={data?.filename}\n ref={uploadRef}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__media`}>\n <Thumbnail\n collectionSlug={relationTo}\n fileSrc={isImage(data?.mimeType) ? thumbnailSRC : null}\n height={data?.height}\n size=\"none\"\n width={data?.width}\n />\n\n {isEditable && (\n <div className={`${baseClass}__floater`} data-theme=\"dark\">\n <Pill className={`${baseClass}__collectionLabel`} pillStyle=\"dark\" size=\"small\">\n {getTranslation(relatedCollection.labels.singular, i18n)}\n </Pill>\n\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <span className={`${baseClass}__filename`}>\n {data?.filename || t('general:untitled')}\n </span>\n </DocumentDrawerToggler>\n\n {hasExtraFields ? (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__upload-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"write\"\n onClick={toggleDrawer}\n round\n size=\"medium\"\n tooltip={t('fields:editRelationship')}\n />\n ) : null}\n\n <div className={`${baseClass}__divider`} />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swap-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }}\n round\n size=\"medium\"\n tooltip={t('fields:swapUpload')}\n />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeUpload()\n }}\n round\n size=\"medium\"\n tooltip={t('fields:removeUpload')}\n />\n </div>\n )}\n </div>\n </div>\n\n {value ? <DocumentDrawer onSave={updateUpload} /> : null}\n {hasExtraFields ? (\n <FieldsDrawer\n data={fields}\n drawerSlug={extraFieldsDrawerSlug}\n drawerTitle={t('general:editLabel', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n featureKey=\"upload\"\n handleDrawerSubmit={onExtraFieldsDrawerSubmit}\n schemaPath={schemaPath}\n schemaPathSuffix={relatedCollection.slug}\n />\n ) : null}\n </div>\n )\n}\n"],
5
+ "mappings": "sOAGA,OAASA,6BAAAA,OAAiC,2CAC1C,OAASC,sBAAAA,OAA0B,oCACnC,OAASC,kBAAAA,MAAsB,2BAC/B,OACEC,UAAAA,EACAC,oBAAAA,GACAC,QAAAA,GACAC,aAAAA,GACAC,aAAAA,GACAC,gBAAAA,GACAC,iBAAAA,GACAC,kBAAAA,OACK,iBACP,OACEC,iBAAAA,EACAC,iBAAAA,GACAC,oBAAAA,GACAC,qBAAAA,OAEK,UACP,OAASC,kBAAAA,GAAgBC,WAAAA,OAAe,iBACxC,OAAgBC,eAAAA,EAAaC,aAAAA,EAAWC,SAAAA,GAAOC,cAAAA,GAAYC,UAAAA,GAAQC,YAAAA,MAAgB,QAYnF,IAAAC,EAAO,CAEP,MAAMA,GAENC,GAAAC,GAAA,CASA,G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X,QAAK1D,EAAA,qBAAA,GACLsE,uBAOT3B,IAAwBkC,KAAQlC,EAAAA,EAAAA,EAAAA,MAAmB/D,EAGhDD,WAAMmC,EACNgE,YAAYhE,EAAAA,oBAAA,CACZiE,MAAAA,EAAetE,EAAqB,OAAA,SAAAV,CAAA,IAEpC,WAAA,SACAiF,mBAAWC,GACXC,WAAAA,EACAC,iBAAYA,EAAA,OACZC,IAAAA",
6
+ "names": ["useLexicalComposerContext", "useLexicalEditable", "getTranslation", "Button", "formatDrawerSlug", "Pill", "Thumbnail", "useConfig", "useEditDepth", "usePayloadAPI", "useTranslation", "$getNodeByKey", "$getSelection", "$isNodeSelection", "$isRangeSelection", "formatAdminURL", "isImage", "useCallback", "useEffect", "useId", "useReducer", "useRef", "useState", "initialParams", "UploadComponent", "props", "baseClass", "className", "data", "fields", "relationTo", "format", "nodeKey", "value", "config", "routes", "serverURL", "getEntityConfig", "useConfig", "useRef", "uploadRef", "uuid", "useEditorConfigContext", "editDepth", "useLexicalComposerContext", "editorConfig", "fieldProps", "isEditable", "i18n", "t", "useTranslation", "setIsSelected", "useState", "isSelected", "dispatchCacheBust", "state", "cacheBust", "useReducer", "relatedCollection", "collectionSlug", "componentID", "useId", "formatDrawerSlug", "extraFieldsDrawerSlug", "slug", "toggleDrawer", "useLexicalDrawer", "closeDocumentDrawer", "DocumentDrawer", "DocumentDrawerToggler", "useLexicalDocumentDrawer", "id", "setParams", "usePayloadAPI", "apiRoute", "api", "path", "thumbnailSRC", "useEffect", "editor", "editorState", "$getSelection", "$isNodeSelection", "selection", "nodes", "$isRangeSelection", "getNodes", "node", "outerEl", "removeUpload", "useCallback", "_data", "updateUpload", "hasExtraFields", "resolvedFeatureMap", "update", "$getNodeByKey", "uploadNode", "newData", "aspectRatio", "ref", "_jsx", "_jsxs", "Thumbnail", "fileSrc", "isImage", "height", "size", "width", "Pill", "pillStyle", "getTranslation", "labels", "buttonStyle", "disabled", "el", "icon", "onClick", "round", "tooltip", "INSERT_UPLOAD_WITH_DRAWER_COMMAND", "dispatchCommand", "replace", "Button", "e", "preventDefault", "onSave", "drawerSlug", "drawerTitle", "featureKey", "onExtraFieldsDrawerSubmit", "handleDrawerSubmit", "schemaPath", "schemaPathSuffix"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";import{a,b}from"./chunk-ZYXHC5CY.js";import"./chunk-5VIL27GI.js";import"./chunk-RJ5MAOKZ.js";export{b as InlineBlockComponent,a as useInlineBlockComponentContext};
2
+ //# sourceMappingURL=componentInline-R3EPNYWF.js.map
@@ -20,8 +20,6 @@ export { LinkFeatureClient } from '../../features/link/client/index.js';
20
20
  export { ChecklistFeatureClient } from '../../features/lists/checklist/client/index.js';
21
21
  export { OrderedListFeatureClient } from '../../features/lists/orderedList/client/index.js';
22
22
  export { UnorderedListFeatureClient } from '../../features/lists/unorderedList/client/index.js';
23
- export { LexicalPluginToLexicalFeatureClient } from '../../features/migrations/lexicalPluginToLexical/feature.client.js';
24
- export { SlateToLexicalFeatureClient } from '../../features/migrations/slateToLexical/feature.client.js';
25
23
  export { ParagraphFeatureClient } from '../../features/paragraph/client/index.js';
26
24
  export { DebugJsxConverterFeatureClient } from '../../features/debug/jsxConverter/client/index.js';
27
25
  export { defaultColors } from '../../features/textState/defaultColors.js';
@@ -36,6 +34,7 @@ export { ToolbarButton } from '../../features/toolbars/shared/ToolbarButton/inde
36
34
  export { TableFeatureClient } from '../../features/experimental_table/client/index.js';
37
35
  export { ToolbarDropdown } from '../../features/toolbars/shared/ToolbarDropdown/index.js';
38
36
  export { UploadFeatureClient } from '../../features/upload/client/index.js';
37
+ export { ClientEntryLexicalField } from '../../field/clientEntry.js';
39
38
  export { RichTextField } from '../../field/index.js';
40
39
  export { EditorConfigProvider, useEditorConfigContext, } from '../../lexical/config/client/EditorConfigProvider.js';
41
40
  export { defaultEditorLexicalConfig } from '../../lexical/config/client/default.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/client/index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