@payloadcms/richtext-lexical 3.0.0-canary.ff8c8fd → 3.0.0

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 (821) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts +12 -0
  3. package/dist/cell/rscEntry.d.ts.map +1 -0
  4. package/dist/cell/rscEntry.js +82 -0
  5. package/dist/cell/rscEntry.js.map +1 -0
  6. package/dist/exports/client/Field-KKSJXHR7.js +2 -0
  7. package/dist/exports/client/Field-KKSJXHR7.js.map +7 -0
  8. package/dist/exports/client/RelationshipComponent-2RT3YXUT.js +2 -0
  9. package/dist/exports/client/RelationshipComponent-2RT3YXUT.js.map +7 -0
  10. package/dist/exports/client/bundled.css +1 -1
  11. package/dist/exports/client/chunk-2CYU43GM.js +2 -0
  12. package/dist/exports/client/chunk-2CYU43GM.js.map +7 -0
  13. package/dist/exports/client/chunk-5PBXL4HT.js +2 -0
  14. package/dist/exports/client/chunk-5PBXL4HT.js.map +7 -0
  15. package/dist/exports/client/chunk-C7S3V4EB.js +2 -0
  16. package/dist/exports/client/chunk-C7S3V4EB.js.map +7 -0
  17. package/dist/exports/client/chunk-CUIBIFW2.js +2 -0
  18. package/dist/exports/client/chunk-CUIBIFW2.js.map +7 -0
  19. package/dist/exports/client/{chunk-UJDWBQ2K.js → chunk-MI5HS4QX.js} +2 -2
  20. package/dist/exports/client/{chunk-UJDWBQ2K.js.map → chunk-MI5HS4QX.js.map} +2 -2
  21. package/dist/exports/client/chunk-QPPOQTHD.js +2 -0
  22. package/dist/exports/client/chunk-QPPOQTHD.js.map +7 -0
  23. package/dist/exports/client/chunk-U7O7EYCP.js +2 -0
  24. package/dist/exports/client/chunk-U7O7EYCP.js.map +7 -0
  25. package/dist/exports/client/{chunk-V2LKLT2F.js → chunk-XCEM47RI.js} +3 -3
  26. package/dist/exports/client/{chunk-V2LKLT2F.js.map → chunk-XCEM47RI.js.map} +3 -3
  27. package/dist/exports/client/component-ANB7VZLA.js +2 -0
  28. package/dist/exports/client/component-ANB7VZLA.js.map +7 -0
  29. package/dist/exports/client/component-H3EYQ5KG.js +2 -0
  30. package/dist/exports/client/component-H3EYQ5KG.js.map +7 -0
  31. package/dist/exports/client/componentInline-ZGO3K4TA.js +2 -0
  32. package/dist/exports/client/componentInline-ZGO3K4TA.js.map +7 -0
  33. package/dist/exports/client/index.d.ts +10 -4
  34. package/dist/exports/client/index.d.ts.map +1 -1
  35. package/dist/exports/client/index.js +10 -8
  36. package/dist/exports/client/index.js.map +4 -4
  37. package/dist/exports/server/ast/mdx.d.ts +7 -0
  38. package/dist/exports/server/ast/mdx.d.ts.map +1 -0
  39. package/dist/exports/server/ast/mdx.js +37 -0
  40. package/dist/exports/server/ast/mdx.js.map +1 -0
  41. package/dist/exports/server/rsc.d.ts +3 -0
  42. package/dist/exports/server/rsc.d.ts.map +1 -0
  43. package/dist/exports/server/rsc.js +3 -0
  44. package/dist/exports/server/rsc.js.map +1 -0
  45. package/dist/exports/shared.d.ts +4 -0
  46. package/dist/exports/shared.d.ts.map +1 -0
  47. package/dist/exports/shared.js +4 -0
  48. package/dist/exports/shared.js.map +1 -0
  49. package/dist/features/align/client/index.d.ts +1 -4
  50. package/dist/features/align/client/index.d.ts.map +1 -1
  51. package/dist/features/blockquote/client/index.d.ts +1 -4
  52. package/dist/features/blockquote/client/index.d.ts.map +1 -1
  53. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  54. package/dist/features/blockquote/server/index.d.ts +1 -1
  55. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  56. package/dist/features/blockquote/server/index.js +5 -1
  57. package/dist/features/blockquote/server/index.js.map +1 -1
  58. package/dist/features/blocks/client/component/BlockContent.d.ts +34 -8
  59. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  60. package/dist/features/blocks/client/component/BlockContent.js +66 -170
  61. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  62. package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts +11 -0
  63. package/dist/features/blocks/client/component/components/BlockCollapsible.d.ts.map +1 -0
  64. package/dist/features/blocks/client/component/components/BlockCollapsible.js +37 -0
  65. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -0
  66. package/dist/features/blocks/client/component/components/BlockEditButton.d.ts +3 -0
  67. package/dist/features/blocks/client/component/components/BlockEditButton.d.ts.map +1 -0
  68. package/dist/features/blocks/client/component/components/BlockEditButton.js +22 -0
  69. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -0
  70. package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts +3 -0
  71. package/dist/features/blocks/client/component/components/BlockRemoveButton.d.ts.map +1 -0
  72. package/dist/features/blocks/client/component/components/BlockRemoveButton.js +22 -0
  73. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -0
  74. package/dist/features/blocks/client/component/index.d.ts +1 -1
  75. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  76. package/dist/features/blocks/client/component/index.js +294 -93
  77. package/dist/features/blocks/client/component/index.js.map +1 -1
  78. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts +5 -0
  79. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -0
  80. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +28 -0
  81. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -0
  82. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts +3 -0
  83. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.d.ts.map +1 -0
  84. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +22 -0
  85. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -0
  86. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts +3 -0
  87. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.d.ts.map +1 -0
  88. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +22 -0
  89. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -0
  90. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts +3 -0
  91. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.d.ts.map +1 -0
  92. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +22 -0
  93. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -0
  94. package/dist/features/blocks/client/componentInline/index.d.ts +14 -2
  95. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  96. package/dist/features/blocks/client/componentInline/index.js +237 -63
  97. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  98. package/dist/features/blocks/client/index.d.ts +1 -8
  99. package/dist/features/blocks/client/index.d.ts.map +1 -1
  100. package/dist/features/blocks/client/index.js +140 -147
  101. package/dist/features/blocks/client/index.js.map +1 -1
  102. package/dist/features/blocks/client/markdownTransformer.d.ts +16 -0
  103. package/dist/features/blocks/client/markdownTransformer.d.ts.map +1 -0
  104. package/dist/features/blocks/client/markdownTransformer.js +144 -0
  105. package/dist/features/blocks/client/markdownTransformer.js.map +1 -0
  106. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  107. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  108. package/dist/features/blocks/client/nodes/BlocksNode.js +1 -3
  109. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  110. package/dist/features/blocks/client/plugin/commands.d.ts +0 -4
  111. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
  112. package/dist/features/blocks/client/plugin/commands.js +0 -1
  113. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  114. package/dist/features/blocks/client/plugin/index.d.ts +3 -4
  115. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  116. package/dist/features/blocks/client/plugin/index.js +25 -129
  117. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  118. package/dist/features/blocks/server/index.d.ts +1 -2
  119. package/dist/features/blocks/server/index.d.ts.map +1 -1
  120. package/dist/features/blocks/server/index.js +72 -35
  121. package/dist/features/blocks/server/index.js.map +1 -1
  122. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.d.ts +22 -0
  123. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.d.ts.map +1 -0
  124. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.js +136 -0
  125. package/dist/features/blocks/server/linesFromMatchToContentAndPropsString.js.map +1 -0
  126. package/dist/features/blocks/server/markdownTransformer.d.ts +22 -0
  127. package/dist/features/blocks/server/markdownTransformer.d.ts.map +1 -0
  128. package/dist/features/blocks/server/markdownTransformer.js +400 -0
  129. package/dist/features/blocks/server/markdownTransformer.js.map +1 -0
  130. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +11 -5
  131. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  132. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  133. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +3 -3
  134. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  135. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  136. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  137. package/dist/features/blocks/server/validate.js +8 -5
  138. package/dist/features/blocks/server/validate.js.map +1 -1
  139. package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
  140. package/dist/features/converters/html/converter/converters/paragraph.js +4 -0
  141. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  142. package/dist/features/converters/html/converter/converters/text.d.ts.map +1 -1
  143. package/dist/features/converters/html/converter/converters/text.js +2 -1
  144. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  145. package/dist/features/converters/html/converter/index.d.ts +11 -7
  146. package/dist/features/converters/html/converter/index.d.ts.map +1 -1
  147. package/dist/features/converters/html/converter/index.js +17 -1
  148. package/dist/features/converters/html/converter/index.js.map +1 -1
  149. package/dist/features/converters/html/converter/types.d.ts +3 -1
  150. package/dist/features/converters/html/converter/types.d.ts.map +1 -1
  151. package/dist/features/converters/html/converter/types.js.map +1 -1
  152. package/dist/features/converters/html/field/index.d.ts.map +1 -1
  153. package/dist/features/converters/html/field/index.js +7 -1
  154. package/dist/features/converters/html/field/index.js.map +1 -1
  155. package/dist/features/debug/testRecorder/client/index.d.ts +1 -4
  156. package/dist/features/debug/testRecorder/client/index.d.ts.map +1 -1
  157. package/dist/features/debug/testRecorder/client/plugin/index.js +25 -14
  158. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  159. package/dist/features/debug/treeView/client/index.d.ts +1 -4
  160. package/dist/features/debug/treeView/client/index.d.ts.map +1 -1
  161. package/dist/features/experimental_table/client/index.d.ts +1 -1
  162. package/dist/features/experimental_table/client/index.d.ts.map +1 -1
  163. package/dist/features/experimental_table/client/index.js +2 -0
  164. package/dist/features/experimental_table/client/index.js.map +1 -1
  165. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  166. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +49 -51
  167. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  168. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  169. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +55 -42
  170. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  171. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +1 -1
  172. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  173. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +58 -19
  174. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  175. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  176. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +52 -50
  177. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  178. package/dist/features/experimental_table/client/utils/debounce.js +4 -4
  179. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  180. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  181. package/dist/features/experimental_table/markdownTransformer.d.ts +5 -0
  182. package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -0
  183. package/dist/features/experimental_table/markdownTransformer.js +127 -0
  184. package/dist/features/experimental_table/markdownTransformer.js.map +1 -0
  185. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  186. package/dist/features/experimental_table/server/index.js +22 -4
  187. package/dist/features/experimental_table/server/index.js.map +1 -1
  188. package/dist/features/format/bold/feature.client.d.ts +1 -4
  189. package/dist/features/format/bold/feature.client.d.ts.map +1 -1
  190. package/dist/features/format/bold/feature.client.js +2 -1
  191. package/dist/features/format/bold/feature.client.js.map +1 -1
  192. package/dist/features/format/inlineCode/feature.client.d.ts +1 -4
  193. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
  194. package/dist/features/format/inlineCode/feature.client.js +2 -1
  195. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  196. package/dist/features/format/italic/feature.client.d.ts +1 -4
  197. package/dist/features/format/italic/feature.client.d.ts.map +1 -1
  198. package/dist/features/format/italic/feature.client.js +2 -1
  199. package/dist/features/format/italic/feature.client.js.map +1 -1
  200. package/dist/features/format/strikethrough/feature.client.d.ts +1 -4
  201. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
  202. package/dist/features/format/strikethrough/feature.client.js +2 -1
  203. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  204. package/dist/features/format/subscript/feature.client.d.ts +1 -4
  205. package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
  206. package/dist/features/format/subscript/feature.client.js +2 -1
  207. package/dist/features/format/subscript/feature.client.js.map +1 -1
  208. package/dist/features/format/superscript/feature.client.d.ts +1 -4
  209. package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
  210. package/dist/features/format/superscript/feature.client.js +2 -1
  211. package/dist/features/format/superscript/feature.client.js.map +1 -1
  212. package/dist/features/format/underline/feature.client.d.ts +1 -4
  213. package/dist/features/format/underline/feature.client.d.ts.map +1 -1
  214. package/dist/features/format/underline/feature.client.js +2 -1
  215. package/dist/features/format/underline/feature.client.js.map +1 -1
  216. package/dist/features/heading/client/index.d.ts +1 -4
  217. package/dist/features/heading/client/index.d.ts.map +1 -1
  218. package/dist/features/heading/server/index.d.ts.map +1 -1
  219. package/dist/features/heading/server/index.js +4 -0
  220. package/dist/features/heading/server/index.js.map +1 -1
  221. package/dist/features/horizontalRule/client/component/index.d.ts +1 -1
  222. package/dist/features/horizontalRule/client/component/index.d.ts.map +1 -1
  223. package/dist/features/horizontalRule/client/component/index.js +12 -9
  224. package/dist/features/horizontalRule/client/component/index.js.map +1 -1
  225. package/dist/features/horizontalRule/client/index.d.ts +1 -4
  226. package/dist/features/horizontalRule/client/index.d.ts.map +1 -1
  227. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -2
  228. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  229. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  230. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  231. package/dist/features/indent/client/index.d.ts +1 -4
  232. package/dist/features/indent/client/index.d.ts.map +1 -1
  233. package/dist/features/indent/client/index.js +2 -1
  234. package/dist/features/indent/client/index.js.map +1 -1
  235. package/dist/features/link/client/index.d.ts +1 -13
  236. package/dist/features/link/client/index.d.ts.map +1 -1
  237. package/dist/features/link/client/index.js +2 -2
  238. package/dist/features/link/client/index.js.map +1 -1
  239. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  240. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  241. package/dist/features/link/client/plugins/autoLink/index.js +3 -1
  242. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  243. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  244. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +78 -40
  245. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  246. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  247. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -1
  248. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  249. package/dist/features/link/nodes/AutoLinkNode.js +2 -2
  250. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  251. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  252. package/dist/features/link/nodes/LinkNode.js +12 -7
  253. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  254. package/dist/features/link/nodes/types.d.ts +3 -3
  255. package/dist/features/link/nodes/types.d.ts.map +1 -1
  256. package/dist/features/link/nodes/types.js.map +1 -1
  257. package/dist/features/link/server/baseFields.d.ts +1 -1
  258. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  259. package/dist/features/link/server/baseFields.js +15 -3
  260. package/dist/features/link/server/baseFields.js.map +1 -1
  261. package/dist/features/link/server/i18n.d.ts.map +1 -1
  262. package/dist/features/link/server/i18n.js +64 -32
  263. package/dist/features/link/server/i18n.js.map +1 -1
  264. package/dist/features/link/server/index.d.ts.map +1 -1
  265. package/dist/features/link/server/index.js +17 -4
  266. package/dist/features/link/server/index.js.map +1 -1
  267. package/dist/features/link/server/transformExtraFields.d.ts +1 -1
  268. package/dist/features/link/server/transformExtraFields.d.ts.map +1 -1
  269. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  270. package/dist/features/link/server/validate.d.ts.map +1 -1
  271. package/dist/features/link/server/validate.js +8 -5
  272. package/dist/features/link/server/validate.js.map +1 -1
  273. package/dist/features/lists/checklist/client/index.d.ts +1 -4
  274. package/dist/features/lists/checklist/client/index.d.ts.map +1 -1
  275. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  276. package/dist/features/lists/htmlConverter.js +8 -0
  277. package/dist/features/lists/htmlConverter.js.map +1 -1
  278. package/dist/features/lists/orderedList/client/index.d.ts +1 -4
  279. package/dist/features/lists/orderedList/client/index.d.ts.map +1 -1
  280. package/dist/features/lists/shared/markdown.js.map +1 -1
  281. package/dist/features/lists/unorderedList/client/index.d.ts +1 -4
  282. package/dist/features/lists/unorderedList/client/index.d.ts.map +1 -1
  283. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +1 -1
  284. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +1 -0
  285. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  286. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -4
  287. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  288. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
  289. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  290. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  291. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  292. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  293. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  294. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  295. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  296. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  297. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  298. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  299. package/dist/features/migrations/slateToLexical/converter/index.js +1 -0
  300. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  301. package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -4
  302. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  303. package/dist/features/migrations/slateToLexical/feature.client.js +1 -3
  304. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  305. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -1
  306. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  307. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  308. package/dist/features/paragraph/client/index.d.ts +1 -4
  309. package/dist/features/paragraph/client/index.d.ts.map +1 -1
  310. package/dist/features/paragraph/server/index.d.ts +1 -1
  311. package/dist/features/paragraph/server/index.d.ts.map +1 -1
  312. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  313. package/dist/features/relationship/client/components/RelationshipComponent.js +34 -24
  314. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  315. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  316. package/dist/features/relationship/client/drawer/index.js +27 -26
  317. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  318. package/dist/features/relationship/client/index.d.ts +2 -17
  319. package/dist/features/relationship/client/index.d.ts.map +1 -1
  320. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  321. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  322. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  323. package/dist/features/relationship/client/plugins/index.js +1 -1
  324. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  325. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +1 -1
  326. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
  327. package/dist/features/relationship/server/index.d.ts +1 -1
  328. package/dist/features/relationship/server/index.d.ts.map +1 -1
  329. package/dist/features/relationship/server/index.js +50 -40
  330. package/dist/features/relationship/server/index.js.map +1 -1
  331. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +2 -2
  332. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  333. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  334. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  335. package/dist/features/toolbars/fixed/client/Toolbar/index.js +93 -66
  336. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  337. package/dist/features/toolbars/fixed/client/index.d.ts +1 -4
  338. package/dist/features/toolbars/fixed/client/index.d.ts.map +1 -1
  339. package/dist/features/toolbars/inline/client/Toolbar/index.js +135 -97
  340. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  341. package/dist/features/toolbars/inline/client/index.d.ts +1 -4
  342. package/dist/features/toolbars/inline/client/index.d.ts.map +1 -1
  343. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  344. package/dist/features/toolbars/shared/ToolbarButton/index.js +5 -2
  345. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  346. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +5 -4
  347. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  348. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +24 -10
  349. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  350. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +4 -5
  351. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  352. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +127 -127
  353. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  354. package/dist/features/toolbars/types.d.ts +23 -11
  355. package/dist/features/toolbars/types.d.ts.map +1 -1
  356. package/dist/features/toolbars/types.js.map +1 -1
  357. package/dist/features/typesClient.d.ts +22 -30
  358. package/dist/features/typesClient.d.ts.map +1 -1
  359. package/dist/features/typesClient.js.map +1 -1
  360. package/dist/features/typesServer.d.ts +23 -28
  361. package/dist/features/typesServer.d.ts.map +1 -1
  362. package/dist/features/typesServer.js.map +1 -1
  363. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  364. package/dist/features/upload/client/component/index.js +66 -58
  365. package/dist/features/upload/client/component/index.js.map +1 -1
  366. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  367. package/dist/features/upload/client/drawer/index.js +34 -32
  368. package/dist/features/upload/client/drawer/index.js.map +1 -1
  369. package/dist/features/upload/client/feature.client.d.ts +1 -4
  370. package/dist/features/upload/client/feature.client.d.ts.map +1 -1
  371. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  372. package/dist/features/upload/client/nodes/UploadNode.js +1 -1
  373. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  374. package/dist/features/upload/client/plugin/index.js +1 -1
  375. package/dist/features/upload/client/plugin/index.js.map +1 -1
  376. package/dist/features/upload/server/feature.server.d.ts.map +1 -1
  377. package/dist/features/upload/server/feature.server.js +17 -8
  378. package/dist/features/upload/server/feature.server.js.map +1 -1
  379. package/dist/features/upload/server/validate.d.ts.map +1 -1
  380. package/dist/features/upload/server/validate.js +7 -4
  381. package/dist/features/upload/server/validate.js.map +1 -1
  382. package/dist/field/Field.d.ts.map +1 -1
  383. package/dist/field/Field.js +39 -65
  384. package/dist/field/Field.js.map +1 -1
  385. package/dist/field/bundled.css +1 -1
  386. package/dist/field/index.d.ts.map +1 -1
  387. package/dist/field/index.js +74 -74
  388. package/dist/field/index.js.map +1 -1
  389. package/dist/field/rscEntry.d.ts +9 -0
  390. package/dist/field/rscEntry.d.ts.map +1 -0
  391. package/dist/field/rscEntry.js +56 -0
  392. package/dist/field/rscEntry.js.map +1 -0
  393. package/dist/index.d.ts +8 -4
  394. package/dist/index.d.ts.map +1 -1
  395. package/dist/index.js +101 -105
  396. package/dist/index.js.map +1 -1
  397. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  398. package/dist/lexical/EditorPlugin.js +2 -1
  399. package/dist/lexical/EditorPlugin.js.map +1 -1
  400. package/dist/lexical/LexicalEditor.d.ts +1 -1
  401. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  402. package/dist/lexical/LexicalEditor.js +10 -10
  403. package/dist/lexical/LexicalEditor.js.map +1 -1
  404. package/dist/lexical/LexicalProvider.d.ts +2 -2
  405. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  406. package/dist/lexical/LexicalProvider.js +18 -25
  407. package/dist/lexical/LexicalProvider.js.map +1 -1
  408. package/dist/lexical/config/client/EditorConfigProvider.d.ts +6 -5
  409. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  410. package/dist/lexical/config/client/EditorConfigProvider.js +14 -13
  411. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  412. package/dist/lexical/config/client/loader.d.ts +5 -2
  413. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  414. package/dist/lexical/config/client/loader.js +12 -18
  415. package/dist/lexical/config/client/loader.js.map +1 -1
  416. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  417. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  418. package/dist/lexical/config/client/sanitize.js +19 -18
  419. package/dist/lexical/config/client/sanitize.js.map +1 -1
  420. package/dist/lexical/config/server/loader.d.ts +2 -1
  421. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  422. package/dist/lexical/config/server/loader.js +2 -0
  423. package/dist/lexical/config/server/loader.js.map +1 -1
  424. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  425. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  426. package/dist/lexical/config/server/sanitize.js +27 -13
  427. package/dist/lexical/config/server/sanitize.js.map +1 -1
  428. package/dist/lexical/config/types.d.ts +2 -2
  429. package/dist/lexical/config/types.d.ts.map +1 -1
  430. package/dist/lexical/config/types.js.map +1 -1
  431. package/dist/lexical/nodes/index.d.ts +4 -0
  432. package/dist/lexical/nodes/index.d.ts.map +1 -1
  433. package/dist/lexical/nodes/index.js +8 -1
  434. package/dist/lexical/nodes/index.js.map +1 -1
  435. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +6 -6
  436. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  437. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +19 -8
  438. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  439. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +2 -2
  440. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  441. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +7 -7
  442. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  443. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +3 -2
  444. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  445. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  446. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  447. package/dist/lexical/plugins/SlashMenu/index.js +24 -30
  448. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  449. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  450. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +11 -9
  451. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  452. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts +1 -1
  453. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  454. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +1 -1
  455. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  456. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +1 -1
  457. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  458. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  459. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  460. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  461. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  462. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +9 -7
  463. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  464. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
  465. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +3 -1
  466. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  467. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
  468. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +3 -4
  469. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  470. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  471. package/dist/lexical/theme/EditorTheme.js +1 -2
  472. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  473. package/dist/lexical/utils/nodeFormat.d.ts +2 -2
  474. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  475. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  476. package/dist/lexical/utils/rect.d.ts +4 -4
  477. package/dist/lexical/utils/rect.d.ts.map +1 -1
  478. package/dist/lexical/utils/rect.js.map +1 -1
  479. package/dist/lexical/utils/setFloatingElemPosition.d.ts +1 -1
  480. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  481. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  482. package/dist/lexical/utils/url.d.ts +5 -0
  483. package/dist/lexical/utils/url.d.ts.map +1 -1
  484. package/dist/lexical/utils/url.js +25 -5
  485. package/dist/lexical/utils/url.js.map +1 -1
  486. package/dist/lexical-proxy/@lexical-headless.d.ts +2 -0
  487. package/dist/lexical-proxy/@lexical-headless.d.ts.map +1 -0
  488. package/dist/lexical-proxy/@lexical-headless.js +2 -0
  489. package/dist/lexical-proxy/@lexical-headless.js.map +1 -0
  490. package/dist/lexical-proxy/@lexical-link.d.ts +2 -0
  491. package/dist/lexical-proxy/@lexical-link.d.ts.map +1 -0
  492. package/dist/lexical-proxy/@lexical-link.js +2 -0
  493. package/dist/lexical-proxy/@lexical-link.js.map +1 -0
  494. package/dist/lexical-proxy/@lexical-list.d.ts +2 -0
  495. package/dist/lexical-proxy/@lexical-list.d.ts.map +1 -0
  496. package/dist/lexical-proxy/@lexical-list.js +2 -0
  497. package/dist/lexical-proxy/@lexical-list.js.map +1 -0
  498. package/dist/lexical-proxy/@lexical-mark.d.ts +2 -0
  499. package/dist/lexical-proxy/@lexical-mark.d.ts.map +1 -0
  500. package/dist/lexical-proxy/@lexical-mark.js +2 -0
  501. package/dist/lexical-proxy/@lexical-mark.js.map +1 -0
  502. package/dist/lexical-proxy/@lexical-markdown.d.ts +2 -0
  503. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -0
  504. package/dist/lexical-proxy/@lexical-markdown.js +2 -0
  505. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -0
  506. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts +2 -0
  507. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.d.ts.map +1 -0
  508. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js +2 -0
  509. package/dist/lexical-proxy/@lexical-react/LexicalAutoEmbedPlugin.js.map +1 -0
  510. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts +2 -0
  511. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.d.ts.map +1 -0
  512. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js +2 -0
  513. package/dist/lexical-proxy/@lexical-react/LexicalAutoFocusPlugin.js.map +1 -0
  514. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts +2 -0
  515. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.d.ts.map +1 -0
  516. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js +2 -0
  517. package/dist/lexical-proxy/@lexical-react/LexicalAutoLinkPlugin.js.map +1 -0
  518. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts +2 -0
  519. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.d.ts.map +1 -0
  520. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js +2 -0
  521. package/dist/lexical-proxy/@lexical-react/LexicalBlockWithAlignableContents.js.map +1 -0
  522. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts +2 -0
  523. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.d.ts.map +1 -0
  524. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js +2 -0
  525. package/dist/lexical-proxy/@lexical-react/LexicalCharacterLimitPlugin.js.map +1 -0
  526. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts +2 -0
  527. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.d.ts.map +1 -0
  528. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js +2 -0
  529. package/dist/lexical-proxy/@lexical-react/LexicalCheckListPlugin.js.map +1 -0
  530. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts +2 -0
  531. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.d.ts.map +1 -0
  532. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js +2 -0
  533. package/dist/lexical-proxy/@lexical-react/LexicalClearEditorPlugin.js.map +1 -0
  534. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts +2 -0
  535. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.d.ts.map +1 -0
  536. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js +2 -0
  537. package/dist/lexical-proxy/@lexical-react/LexicalClickableLinkPlugin.js.map +1 -0
  538. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts +2 -0
  539. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.d.ts.map +1 -0
  540. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js +2 -0
  541. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationContext.js.map +1 -0
  542. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts +2 -0
  543. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.d.ts.map +1 -0
  544. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js +2 -0
  545. package/dist/lexical-proxy/@lexical-react/LexicalCollaborationPlugin.js.map +1 -0
  546. package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts +2 -0
  547. package/dist/lexical-proxy/@lexical-react/LexicalComposer.d.ts.map +1 -0
  548. package/dist/lexical-proxy/@lexical-react/LexicalComposer.js +2 -0
  549. package/dist/lexical-proxy/@lexical-react/LexicalComposer.js.map +1 -0
  550. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts +2 -0
  551. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.d.ts.map +1 -0
  552. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js +2 -0
  553. package/dist/lexical-proxy/@lexical-react/LexicalComposerContext.js.map +1 -0
  554. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts +2 -0
  555. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.d.ts.map +1 -0
  556. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js +2 -0
  557. package/dist/lexical-proxy/@lexical-react/LexicalContentEditable.js.map +1 -0
  558. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +2 -0
  559. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +1 -0
  560. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +2 -0
  561. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +1 -0
  562. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts +2 -0
  563. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.d.ts.map +1 -0
  564. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js +2 -0
  565. package/dist/lexical-proxy/@lexical-react/LexicalDecoratorBlockNode.js.map +1 -0
  566. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts +2 -0
  567. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.d.ts.map +1 -0
  568. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js +2 -0
  569. package/dist/lexical-proxy/@lexical-react/LexicalDraggableBlockPlugin.js.map +1 -0
  570. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts +2 -0
  571. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.d.ts.map +1 -0
  572. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js +2 -0
  573. package/dist/lexical-proxy/@lexical-react/LexicalEditorRefPlugin.js.map +1 -0
  574. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts +2 -0
  575. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.d.ts.map +1 -0
  576. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js +2 -0
  577. package/dist/lexical-proxy/@lexical-react/LexicalErrorBoundary.js.map +1 -0
  578. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts +2 -0
  579. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.d.ts.map +1 -0
  580. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js +2 -0
  581. package/dist/lexical-proxy/@lexical-react/LexicalHashtagPlugin.js.map +1 -0
  582. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts +2 -0
  583. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.d.ts.map +1 -0
  584. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js +2 -0
  585. package/dist/lexical-proxy/@lexical-react/LexicalHistoryPlugin.js.map +1 -0
  586. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts +2 -0
  587. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.d.ts.map +1 -0
  588. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js +2 -0
  589. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRuleNode.js.map +1 -0
  590. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts +2 -0
  591. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.d.ts.map +1 -0
  592. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js +2 -0
  593. package/dist/lexical-proxy/@lexical-react/LexicalHorizontalRulePlugin.js.map +1 -0
  594. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts +2 -0
  595. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.d.ts.map +1 -0
  596. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js +2 -0
  597. package/dist/lexical-proxy/@lexical-react/LexicalLinkPlugin.js.map +1 -0
  598. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts +2 -0
  599. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.d.ts.map +1 -0
  600. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js +2 -0
  601. package/dist/lexical-proxy/@lexical-react/LexicalListPlugin.js.map +1 -0
  602. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts +2 -0
  603. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.d.ts.map +1 -0
  604. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js +2 -0
  605. package/dist/lexical-proxy/@lexical-react/LexicalMarkdownShortcutPlugin.js.map +1 -0
  606. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts +2 -0
  607. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.d.ts.map +1 -0
  608. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js +2 -0
  609. package/dist/lexical-proxy/@lexical-react/LexicalNestedComposer.js.map +1 -0
  610. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts +2 -0
  611. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.d.ts.map +1 -0
  612. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js +2 -0
  613. package/dist/lexical-proxy/@lexical-react/LexicalNodeEventPlugin.js.map +1 -0
  614. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts +2 -0
  615. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.d.ts.map +1 -0
  616. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js +2 -0
  617. package/dist/lexical-proxy/@lexical-react/LexicalNodeMenuPlugin.js.map +1 -0
  618. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts +2 -0
  619. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.d.ts.map +1 -0
  620. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js +2 -0
  621. package/dist/lexical-proxy/@lexical-react/LexicalOnChangePlugin.js.map +1 -0
  622. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts +2 -0
  623. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.d.ts.map +1 -0
  624. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js +2 -0
  625. package/dist/lexical-proxy/@lexical-react/LexicalPlainTextPlugin.js.map +1 -0
  626. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts +2 -0
  627. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.d.ts.map +1 -0
  628. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js +2 -0
  629. package/dist/lexical-proxy/@lexical-react/LexicalRichTextPlugin.js.map +1 -0
  630. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts +2 -0
  631. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.d.ts.map +1 -0
  632. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js +2 -0
  633. package/dist/lexical-proxy/@lexical-react/LexicalTabIndentationPlugin.js.map +1 -0
  634. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.d.ts +2 -0
  635. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.d.ts.map +1 -0
  636. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.js +2 -0
  637. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContents.js.map +1 -0
  638. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts +2 -0
  639. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.d.ts.map +1 -0
  640. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js +2 -0
  641. package/dist/lexical-proxy/@lexical-react/LexicalTableOfContentsPlugin.js.map +1 -0
  642. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts +2 -0
  643. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.d.ts.map +1 -0
  644. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js +2 -0
  645. package/dist/lexical-proxy/@lexical-react/LexicalTablePlugin.js.map +1 -0
  646. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts +2 -0
  647. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.d.ts.map +1 -0
  648. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js +2 -0
  649. package/dist/lexical-proxy/@lexical-react/LexicalTreeView.js.map +1 -0
  650. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts +2 -0
  651. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.d.ts.map +1 -0
  652. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js +2 -0
  653. package/dist/lexical-proxy/@lexical-react/LexicalTypeaheadMenuPlugin.js.map +1 -0
  654. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts +2 -0
  655. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.d.ts.map +1 -0
  656. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js +2 -0
  657. package/dist/lexical-proxy/@lexical-react/useLexicalEditable.js.map +1 -0
  658. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts +2 -0
  659. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.d.ts.map +1 -0
  660. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js +2 -0
  661. package/dist/lexical-proxy/@lexical-react/useLexicalIsTextContentEmpty.js.map +1 -0
  662. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts +2 -0
  663. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.d.ts.map +1 -0
  664. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js +2 -0
  665. package/dist/lexical-proxy/@lexical-react/useLexicalNodeSelection.js.map +1 -0
  666. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts +2 -0
  667. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.d.ts.map +1 -0
  668. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js +2 -0
  669. package/dist/lexical-proxy/@lexical-react/useLexicalSubscription.js.map +1 -0
  670. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts +2 -0
  671. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.d.ts.map +1 -0
  672. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js +2 -0
  673. package/dist/lexical-proxy/@lexical-react/useLexicalTextEntity.js.map +1 -0
  674. package/dist/lexical-proxy/@lexical-rich-text.d.ts +2 -0
  675. package/dist/lexical-proxy/@lexical-rich-text.d.ts.map +1 -0
  676. package/dist/lexical-proxy/@lexical-rich-text.js +2 -0
  677. package/dist/lexical-proxy/@lexical-rich-text.js.map +1 -0
  678. package/dist/lexical-proxy/@lexical-selection.d.ts +2 -0
  679. package/dist/lexical-proxy/@lexical-selection.d.ts.map +1 -0
  680. package/dist/lexical-proxy/@lexical-selection.js +2 -0
  681. package/dist/lexical-proxy/@lexical-selection.js.map +1 -0
  682. package/dist/lexical-proxy/@lexical-utils.d.ts +2 -0
  683. package/dist/lexical-proxy/@lexical-utils.d.ts.map +1 -0
  684. package/dist/lexical-proxy/@lexical-utils.js +2 -0
  685. package/dist/lexical-proxy/@lexical-utils.js.map +1 -0
  686. package/dist/lexical-proxy/lexical.d.ts +2 -0
  687. package/dist/lexical-proxy/lexical.d.ts.map +1 -0
  688. package/dist/lexical-proxy/lexical.js +2 -0
  689. package/dist/lexical-proxy/lexical.js.map +1 -0
  690. package/dist/populateGraphQL/populate.d.ts +3 -2
  691. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  692. package/dist/populateGraphQL/populate.js +3 -1
  693. package/dist/populateGraphQL/populate.js.map +1 -1
  694. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  695. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  696. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +5 -4
  697. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  698. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  699. package/dist/types.d.ts +23 -8
  700. package/dist/types.d.ts.map +1 -1
  701. package/dist/types.js.map +1 -1
  702. package/dist/utilities/buildInitialState.d.ts +27 -0
  703. package/dist/utilities/buildInitialState.d.ts.map +1 -0
  704. package/dist/utilities/buildInitialState.js +53 -0
  705. package/dist/utilities/buildInitialState.js.map +1 -0
  706. package/dist/utilities/createClientFeature.d.ts +8 -5
  707. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  708. package/dist/utilities/createClientFeature.js +7 -4
  709. package/dist/utilities/createClientFeature.js.map +1 -1
  710. package/dist/utilities/createServerFeature.d.ts +1 -0
  711. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  712. package/dist/utilities/createServerFeature.js +2 -0
  713. package/dist/utilities/createServerFeature.js.map +1 -1
  714. package/dist/utilities/fieldsDrawer/Drawer.d.ts +1 -0
  715. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  716. package/dist/utilities/fieldsDrawer/Drawer.js +68 -27
  717. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  718. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  719. package/dist/utilities/fieldsDrawer/DrawerContent.js +102 -138
  720. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  721. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +13 -0
  722. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -0
  723. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +129 -0
  724. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -0
  725. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts +10 -0
  726. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -0
  727. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js +136 -0
  728. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -0
  729. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts +16 -0
  730. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -0
  731. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +144 -0
  732. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -0
  733. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  734. package/dist/utilities/generateImportMap.js +2 -3
  735. package/dist/utilities/generateImportMap.js.map +1 -1
  736. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  737. package/dist/utilities/generateSchemaMap.js +13 -10
  738. package/dist/utilities/generateSchemaMap.js.map +1 -1
  739. package/dist/utilities/initLexicalFeatures.d.ts +18 -0
  740. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -0
  741. package/dist/utilities/initLexicalFeatures.js +96 -0
  742. package/dist/utilities/initLexicalFeatures.js.map +1 -0
  743. package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts +52 -0
  744. package/dist/utilities/jsx/collectTopLevelJSXInLines.d.ts.map +1 -0
  745. package/dist/utilities/jsx/collectTopLevelJSXInLines.js +79 -0
  746. package/dist/utilities/jsx/collectTopLevelJSXInLines.js.map +1 -0
  747. package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts +12 -0
  748. package/dist/utilities/jsx/extractPropsFromJSXPropsString.d.ts.map +1 -0
  749. package/dist/utilities/jsx/extractPropsFromJSXPropsString.js +125 -0
  750. package/dist/utilities/jsx/extractPropsFromJSXPropsString.js.map +1 -0
  751. package/dist/utilities/jsx/jsx.d.ts +26 -0
  752. package/dist/utilities/jsx/jsx.d.ts.map +1 -0
  753. package/dist/utilities/jsx/jsx.js +105 -0
  754. package/dist/utilities/jsx/jsx.js.map +1 -0
  755. package/dist/utilities/jsx/jsx.spec.d.ts +2 -0
  756. package/dist/utilities/jsx/jsx.spec.d.ts.map +1 -0
  757. package/dist/utilities/jsx/jsx.spec.js +142 -0
  758. package/dist/utilities/jsx/jsx.spec.js.map +1 -0
  759. package/dist/utilities/jsx/lexicalMarkdownCopy.d.ts +11 -0
  760. package/dist/utilities/jsx/lexicalMarkdownCopy.d.ts.map +1 -0
  761. package/dist/utilities/jsx/lexicalMarkdownCopy.js +61 -0
  762. package/dist/utilities/jsx/lexicalMarkdownCopy.js.map +1 -0
  763. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +1 -1
  764. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -1
  765. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +1 -1
  766. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  767. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +1 -1
  768. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  769. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +5 -1
  770. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  771. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  772. package/dist/utilities/useLexicalFeature.js +12 -4
  773. package/dist/utilities/useLexicalFeature.js.map +1 -1
  774. package/dist/validate/index.d.ts.map +1 -1
  775. package/dist/validate/index.js +2 -2
  776. package/dist/validate/index.js.map +1 -1
  777. package/dist/validate/validateNodes.d.ts +2 -2
  778. package/dist/validate/validateNodes.d.ts.map +1 -1
  779. package/dist/validate/validateNodes.js +4 -4
  780. package/dist/validate/validateNodes.js.map +1 -1
  781. package/package.json +332 -46
  782. package/dist/cell/index.d.ts +0 -9
  783. package/dist/cell/index.d.ts.map +0 -1
  784. package/dist/cell/index.js +0 -135
  785. package/dist/cell/index.js.map +0 -1
  786. package/dist/exports/client/Field-SUWHJ4HF.js +0 -2
  787. package/dist/exports/client/Field-SUWHJ4HF.js.map +0 -7
  788. package/dist/exports/client/RelationshipComponent-EZORSGUZ.js +0 -2
  789. package/dist/exports/client/RelationshipComponent-EZORSGUZ.js.map +0 -7
  790. package/dist/exports/client/chunk-OLSILJA6.js +0 -2
  791. package/dist/exports/client/chunk-OLSILJA6.js.map +0 -7
  792. package/dist/exports/client/chunk-TD7O23AB.js +0 -2
  793. package/dist/exports/client/chunk-TD7O23AB.js.map +0 -7
  794. package/dist/exports/client/chunk-YL453UOS.js +0 -2
  795. package/dist/exports/client/chunk-YL453UOS.js.map +0 -7
  796. package/dist/exports/client/chunk-YSI2QILQ.js +0 -2
  797. package/dist/exports/client/chunk-YSI2QILQ.js.map +0 -7
  798. package/dist/exports/client/component-2YLEVOFH.js +0 -2
  799. package/dist/exports/client/component-2YLEVOFH.js.map +0 -7
  800. package/dist/exports/client/component-7RAP75FW.js +0 -2
  801. package/dist/exports/client/component-7RAP75FW.js.map +0 -7
  802. package/dist/exports/client/component-LLWMZU6K.js +0 -2
  803. package/dist/exports/client/component-LLWMZU6K.js.map +0 -7
  804. package/dist/exports/client/componentInline-YSHGRL2J.js +0 -2
  805. package/dist/exports/client/componentInline-YSHGRL2J.js.map +0 -7
  806. package/dist/features/blocks/client/component/FormSavePlugin.d.ts +0 -11
  807. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +0 -1
  808. package/dist/features/blocks/client/component/FormSavePlugin.js +0 -53
  809. package/dist/features/blocks/client/component/FormSavePlugin.js.map +0 -1
  810. package/dist/features/createClientComponent.d.ts +0 -7
  811. package/dist/features/createClientComponent.d.ts.map +0 -1
  812. package/dist/features/createClientComponent.js +0 -13
  813. package/dist/features/createClientComponent.js.map +0 -1
  814. package/dist/features/createFeaturePropComponent.d.ts +0 -6
  815. package/dist/features/createFeaturePropComponent.d.ts.map +0 -1
  816. package/dist/features/createFeaturePropComponent.js +0 -19
  817. package/dist/features/createFeaturePropComponent.js.map +0 -1
  818. package/dist/utilities/generateComponentMap.d.ts +0 -6
  819. package/dist/utilities/generateComponentMap.d.ts.map +0 -1
  820. package/dist/utilities/generateComponentMap.js +0 -99
  821. package/dist/utilities/generateComponentMap.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ import { fromMarkdown } from 'mdast-util-from-markdown';
2
+ export type AST = ReturnType<typeof fromMarkdown>;
3
+ export declare function parseJSXToAST({ jsxString, keepPositions, }: {
4
+ jsxString: string;
5
+ keepPositions?: boolean;
6
+ }): AST;
7
+ //# sourceMappingURL=mdx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../../../src/exports/server/ast/mdx.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIvD,MAAM,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA;AAEjD,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,aAAa,GACd,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,GAAG,GAAG,CA6BN"}
@@ -0,0 +1,37 @@
1
+ import * as acorn from 'acorn';
2
+ import { fromMarkdown } from 'mdast-util-from-markdown';
3
+ import { mdxJsxFromMarkdown } from 'mdast-util-mdx-jsx';
4
+ import { mdxJsx } from 'micromark-extension-mdx-jsx';
5
+ export function parseJSXToAST({
6
+ jsxString,
7
+ keepPositions
8
+ }) {
9
+ const treeComplex = fromMarkdown(jsxString, {
10
+ // @ts-expect-error
11
+ extensions: [mdxJsx({
12
+ acorn,
13
+ addResult: false
14
+ })],
15
+ mdastExtensions: [mdxJsxFromMarkdown()]
16
+ });
17
+ // Remove "position" keys
18
+ const parseTree = tree => {
19
+ for (const key in tree) {
20
+ if (key === 'position' && tree[key].start && tree[key].end) {
21
+ delete tree[key];
22
+ } else if (typeof tree[key] === 'object') {
23
+ parseTree(tree[key]);
24
+ } else if (Array.isArray(tree[key])) {
25
+ for (const item of tree[key]) {
26
+ parseTree(item);
27
+ }
28
+ }
29
+ }
30
+ };
31
+ const tree = treeComplex;
32
+ if (keepPositions !== true) {
33
+ parseTree(tree);
34
+ }
35
+ return tree;
36
+ }
37
+ //# sourceMappingURL=mdx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdx.js","names":["acorn","fromMarkdown","mdxJsxFromMarkdown","mdxJsx","parseJSXToAST","jsxString","keepPositions","treeComplex","extensions","addResult","mdastExtensions","parseTree","tree","key","start","end","Array","isArray","item"],"sources":["../../../../src/exports/server/ast/mdx.ts"],"sourcesContent":["import * as acorn from 'acorn'\nimport { fromMarkdown } from 'mdast-util-from-markdown'\nimport { mdxJsxFromMarkdown } from 'mdast-util-mdx-jsx'\nimport { mdxJsx } from 'micromark-extension-mdx-jsx'\n\nexport type AST = ReturnType<typeof fromMarkdown>\n\nexport function parseJSXToAST({\n jsxString,\n keepPositions,\n}: {\n jsxString: string\n keepPositions?: boolean\n}): AST {\n const treeComplex: AST = fromMarkdown(jsxString, {\n // @ts-expect-error\n extensions: [mdxJsx({ acorn, addResult: false })],\n mdastExtensions: [mdxJsxFromMarkdown()],\n })\n\n // Remove \"position\" keys\n const parseTree = (tree: object) => {\n for (const key in tree) {\n if (key === 'position' && tree[key].start && tree[key].end) {\n delete tree[key]\n } else if (typeof tree[key] === 'object') {\n parseTree(tree[key])\n } else if (Array.isArray(tree[key])) {\n for (const item of tree[key]) {\n parseTree(item)\n }\n }\n }\n }\n\n const tree: AST = treeComplex\n\n if (keepPositions !== true) {\n parseTree(tree)\n }\n\n return tree\n}\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,YAAY,QAAQ;AAC7B,SAASC,kBAAkB,QAAQ;AACnC,SAASC,MAAM,QAAQ;AAIvB,OAAO,SAASC,cAAc;EAC5BC,SAAS;EACTC;AAAa,CAId;EACC,MAAMC,WAAA,GAAmBN,YAAA,CAAaI,SAAA,EAAW;IAC/C;IACAG,UAAA,EAAY,CAACL,MAAA,CAAO;MAAEH,KAAA;MAAOS,SAAA,EAAW;IAAM,GAAG;IACjDC,eAAA,EAAiB,CAACR,kBAAA;EACpB;EAEA;EACA,MAAMS,SAAA,GAAaC,IAAA;IACjB,KAAK,MAAMC,GAAA,IAAOD,IAAA,EAAM;MACtB,IAAIC,GAAA,KAAQ,cAAcD,IAAI,CAACC,GAAA,CAAI,CAACC,KAAK,IAAIF,IAAI,CAACC,GAAA,CAAI,CAACE,GAAG,EAAE;QAC1D,OAAOH,IAAI,CAACC,GAAA,CAAI;MAClB,OAAO,IAAI,OAAOD,IAAI,CAACC,GAAA,CAAI,KAAK,UAAU;QACxCF,SAAA,CAAUC,IAAI,CAACC,GAAA,CAAI;MACrB,OAAO,IAAIG,KAAA,CAAMC,OAAO,CAACL,IAAI,CAACC,GAAA,CAAI,GAAG;QACnC,KAAK,MAAMK,IAAA,IAAQN,IAAI,CAACC,GAAA,CAAI,EAAE;UAC5BF,SAAA,CAAUO,IAAA;QACZ;MACF;IACF;EACF;EAEA,MAAMN,IAAA,GAAYL,WAAA;EAElB,IAAID,aAAA,KAAkB,MAAM;IAC1BK,SAAA,CAAUC,IAAA;EACZ;EAEA,OAAOA,IAAA;AACT","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export { RscEntryLexicalCell } from '../../cell/rscEntry.js';
2
+ export { RscEntryLexicalField } from '../../field/rscEntry.js';
3
+ //# sourceMappingURL=rsc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/exports/server/rsc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { RscEntryLexicalCell } from '../../cell/rscEntry.js';
2
+ export { RscEntryLexicalField } from '../../field/rscEntry.js';
3
+ //# sourceMappingURL=rsc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rsc.js","names":["RscEntryLexicalCell","RscEntryLexicalField"],"sources":["../../../src/exports/server/rsc.ts"],"sourcesContent":["export { RscEntryLexicalCell } from '../../cell/rscEntry.js'\nexport { RscEntryLexicalField } from '../../field/rscEntry.js'\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,QAAQ","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export { collectTopLevelJSXInLines } from '../utilities/jsx/collectTopLevelJSXInLines.js';
2
+ export { extractPropsFromJSXPropsString } from '../utilities/jsx/extractPropsFromJSXPropsString.js';
3
+ export { extractFrontmatter, frontmatterToObject, objectToFrontmatter, propsToJSXString, } from '../utilities/jsx/jsx.js';
4
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/exports/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAA;AAEzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAA;AACnG,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,yBAAyB,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { collectTopLevelJSXInLines } from '../utilities/jsx/collectTopLevelJSXInLines.js';
2
+ export { extractPropsFromJSXPropsString } from '../utilities/jsx/extractPropsFromJSXPropsString.js';
3
+ export { extractFrontmatter, frontmatterToObject, objectToFrontmatter, propsToJSXString } from '../utilities/jsx/jsx.js';
4
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","names":["collectTopLevelJSXInLines","extractPropsFromJSXPropsString","extractFrontmatter","frontmatterToObject","objectToFrontmatter","propsToJSXString"],"sources":["../../src/exports/shared.ts"],"sourcesContent":["export { collectTopLevelJSXInLines } from '../utilities/jsx/collectTopLevelJSXInLines.js'\n\nexport { extractPropsFromJSXPropsString } from '../utilities/jsx/extractPropsFromJSXPropsString.js'\nexport {\n extractFrontmatter,\n frontmatterToObject,\n objectToFrontmatter,\n propsToJSXString,\n} from '../utilities/jsx/jsx.js'\n"],"mappings":"AAAA,SAASA,yBAAyB,QAAQ;AAE1C,SAASC,8BAA8B,QAAQ;AAC/C,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,QACX","ignoreList":[]}
@@ -1,5 +1,2 @@
1
- export declare const AlignFeatureClient: import("react").FC<{
2
- featureKey: string;
3
- order: number;
4
- }>;
1
+ export declare const AlignFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/index.tsx"],"names":[],"mappings":"AAsJA,eAAO,MAAM,kBAAkB;;;EAO7B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/align/client/index.tsx"],"names":[],"mappings":"AAsJA,eAAO,MAAM,kBAAkB,oFAO7B,CAAA"}
@@ -1,5 +1,2 @@
1
- export declare const BlockquoteFeatureClient: import("react").FC<{
2
- featureKey: string;
3
- order: number;
4
- }>;
1
+ export declare const BlockquoteFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
5
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/client/index.tsx"],"names":[],"mappings":"AA4CA,eAAO,MAAM,uBAAuB;;;EA8BlC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/client/index.tsx"],"names":[],"mappings":"AA4CA,eAAO,MAAM,uBAAuB,oFA8BlC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.js","names":["$createQuoteNode","$isQuoteNode","QuoteNode","$createLineBreakNode","MarkdownTransformer","type","dependencies","export","node","exportChildren","lines","split","output","line","push","join","regExp","replace","parentNode","children","_match","isImport","previousNode","getPreviousSibling","splice","getChildrenSize","select","remove","append"],"sources":["../../../src/features/blockquote/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ;AAC1D,SAASC,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,mBAAA,GAA0C;EACrDC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACJ,SAAA,CAAU;EACzBK,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,IAAI,CAACR,YAAA,CAAaO,IAAA,GAAO;MACvB,OAAO;IACT;IAEA,MAAME,KAAA,GAAQD,cAAA,CAAeD,IAAA,EAAMG,KAAK,CAAC;IACzC,MAAMC,MAAA,GAAS,EAAE;IACjB,KAAK,MAAMC,IAAA,IAAQH,KAAA,EAAO;MACxBE,MAAA,CAAOE,IAAI,CAAC,OAAOD,IAAA;IACrB;IACA,OAAOD,MAAA,CAAOG,IAAI,CAAC;EACrB;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASA,CAACC,UAAA,EAAYC,QAAA,EAAUC,MAAA,EAAQC,QAAA;IACtC,IAAIA,QAAA,EAAU;MACZ,MAAMC,YAAA,GAAeJ,UAAA,CAAWK,kBAAkB;MAClD,IAAItB,YAAA,CAAaqB,YAAA,GAAe;QAC9BA,YAAA,CAAaE,MAAM,CAACF,YAAA,CAAaG,eAAe,IAAI,GAAG,CACrDtB,oBAAA,I,GACGgB,QAAA,CACJ;QACDG,YAAA,CAAaI,MAAM,CAAC,GAAG;QACvBR,UAAA,CAAWS,MAAM;QACjB;MACF;IACF;IAEA,MAAMnB,IAAA,GAAOR,gBAAA;IACbQ,IAAA,CAAKoB,MAAM,IAAIT,QAAA;IACfD,UAAA,CAAWD,OAAO,CAACT,IAAA;IACnBA,IAAA,CAAKkB,MAAM,CAAC,GAAG;EACjB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"markdownTransformer.js","names":["$createQuoteNode","$isQuoteNode","QuoteNode","$createLineBreakNode","MarkdownTransformer","type","dependencies","export","node","exportChildren","lines","split","output","line","push","join","regExp","replace","parentNode","children","_match","isImport","previousNode","getPreviousSibling","splice","getChildrenSize","select","remove","append"],"sources":["../../../src/features/blockquote/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output: string[] = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ;AAC1D,SAASC,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,mBAAA,GAA0C;EACrDC,IAAA,EAAM;EACNC,YAAA,EAAc,CAACJ,SAAA,CAAU;EACzBK,MAAA,EAAQA,CAACC,IAAA,EAAMC,cAAA;IACb,IAAI,CAACR,YAAA,CAAaO,IAAA,GAAO;MACvB,OAAO;IACT;IAEA,MAAME,KAAA,GAAQD,cAAA,CAAeD,IAAA,EAAMG,KAAK,CAAC;IACzC,MAAMC,MAAA,GAAmB,EAAE;IAC3B,KAAK,MAAMC,IAAA,IAAQH,KAAA,EAAO;MACxBE,MAAA,CAAOE,IAAI,CAAC,OAAOD,IAAA;IACrB;IACA,OAAOD,MAAA,CAAOG,IAAI,CAAC;EACrB;EACAC,MAAA,EAAQ;EACRC,OAAA,EAASA,CAACC,UAAA,EAAYC,QAAA,EAAUC,MAAA,EAAQC,QAAA;IACtC,IAAIA,QAAA,EAAU;MACZ,MAAMC,YAAA,GAAeJ,UAAA,CAAWK,kBAAkB;MAClD,IAAItB,YAAA,CAAaqB,YAAA,GAAe;QAC9BA,YAAA,CAAaE,MAAM,CAACF,YAAA,CAAaG,eAAe,IAAI,GAAG,CACrDtB,oBAAA,I,GACGgB,QAAA,CACJ;QACDG,YAAA,CAAaI,MAAM,CAAC,GAAG;QACvBR,UAAA,CAAWS,MAAM;QACjB;MACF;IACF;IAEA,MAAMnB,IAAA,GAAOR,gBAAA;IACbQ,IAAA,CAAKoB,MAAM,IAAIT,QAAA;IACfD,UAAA,CAAWD,OAAO,CAACT,IAAA;IACnBA,IAAA,CAAKkB,MAAM,CAAC,GAAG;EACjB;AACF","ignoreList":[]}
@@ -3,5 +3,5 @@ import type { Spread } from 'lexical';
3
3
  export type SerializedQuoteNode = Spread<{
4
4
  type: 'quote';
5
5
  }, _SerializedQuoteNode>;
6
- export declare const BlockquoteFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, any>;
6
+ export declare const BlockquoteFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, null>;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAUrC,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,IAAI,EAAE,OAAO,CAAA;CACd,EACD,oBAAoB,CACrB,CAAA;AAED,eAAO,MAAM,iBAAiB,yFA0C5B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blockquote/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAUrC,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,IAAI,EAAE,OAAO,CAAA;CACd,EACD,oBAAoB,CACrB,CAAA;AAED,eAAO,MAAM,iBAAiB,0FA8C5B,CAAA"}
@@ -2,8 +2,8 @@ import { QuoteNode } from '@lexical/rich-text';
2
2
  import { createServerFeature } from '../../../utilities/createServerFeature.js';
3
3
  import { convertLexicalNodesToHTML } from '../../converters/html/converter/index.js';
4
4
  import { createNode } from '../../typeUtilities.js';
5
- import { i18n } from './i18n.js';
6
5
  import { MarkdownTransformer } from '../markdownTransformer.js';
6
+ import { i18n } from './i18n.js';
7
7
  export const BlockquoteFeature = createServerFeature({
8
8
  feature: {
9
9
  ClientFeature: '@payloadcms/richtext-lexical/client#BlockquoteFeatureClient',
@@ -15,6 +15,8 @@ export const BlockquoteFeature = createServerFeature({
15
15
  html: {
16
16
  converter: async ({
17
17
  converters,
18
+ currentDepth,
19
+ depth,
18
20
  draft,
19
21
  node,
20
22
  overrideAccess,
@@ -24,6 +26,8 @@ export const BlockquoteFeature = createServerFeature({
24
26
  }) => {
25
27
  const childrenText = await convertLexicalNodesToHTML({
26
28
  converters,
29
+ currentDepth,
30
+ depth,
27
31
  draft,
28
32
  lexicalNodes: node.children,
29
33
  overrideAccess,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["QuoteNode","createServerFeature","convertLexicalNodesToHTML","createNode","i18n","MarkdownTransformer","BlockquoteFeature","feature","ClientFeature","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","nodeTypes","getType","key"],"sources":["../../../../src/features/blockquote/server/index.ts"],"sourcesContent":["import type { SerializedQuoteNode as _SerializedQuoteNode } from '@lexical/rich-text'\nimport type { Spread } from 'lexical'\n\nimport { QuoteNode } from '@lexical/rich-text'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { i18n } from './i18n.js'\nimport { MarkdownTransformer } from '../markdownTransformer.js'\n\nexport type SerializedQuoteNode = Spread<\n {\n type: 'quote'\n },\n _SerializedQuoteNode\n>\n\nexport const BlockquoteFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#BlockquoteFeatureClient',\n clientFeatureProps: null,\n i18n,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n return `<blockquote>${childrenText}</blockquote>`\n },\n nodeTypes: [QuoteNode.getType()],\n },\n },\n node: QuoteNode,\n }),\n ],\n },\n key: 'blockquote',\n})\n"],"mappings":"AAGA,SAASA,SAAS,QAAQ;AAE1B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,IAAI,QAAQ;AACrB,SAASC,mBAAmB,QAAQ;AASpC,OAAO,MAAMC,iBAAA,GAAoBL,mBAAA,CAAoB;EACnDM,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,kBAAA,EAAoB;IACpBL,IAAA;IACAM,oBAAA,EAAsB,CAACL,mBAAA,CAAoB;IAC3CM,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,UAAA,EAAY;QACVC,IAAA,EAAM;UACJC,SAAA,EAAW,MAAAA,CAAO;YAChBF,UAAU;YACVG,KAAK;YACLC,IAAI;YACJC,cAAc;YACdC,MAAM;YACNC,GAAG;YACHC;UAAgB,CACjB;YACC,MAAMC,YAAA,GAAe,MAAMnB,yBAAA,CAA0B;cACnDU,UAAA;cACAG,KAAA;cACAO,YAAA,EAAcN,IAAA,CAAKO,QAAQ;cAC3BN,cAAA;cACAC,MAAA,EAAQ;gBACN,GAAGF,IAAI;gBACPE;cACF;cACAC,GAAA;cACAC;YACF;YAEA,OAAO,eAAeC,YAAA,eAA2B;UACnD;UACAG,SAAA,EAAW,CAACxB,SAAA,CAAUyB,OAAO;QAC/B;MACF;MACAT,IAAA,EAAMhB;IACR;EAEJ;EACA0B,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["QuoteNode","createServerFeature","convertLexicalNodesToHTML","createNode","MarkdownTransformer","i18n","BlockquoteFeature","feature","ClientFeature","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","nodeTypes","getType","key"],"sources":["../../../../src/features/blockquote/server/index.ts"],"sourcesContent":["import type { SerializedQuoteNode as _SerializedQuoteNode } from '@lexical/rich-text'\nimport type { Spread } from 'lexical'\n\nimport { QuoteNode } from '@lexical/rich-text'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/html/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { MarkdownTransformer } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport type SerializedQuoteNode = Spread<\n {\n type: 'quote'\n },\n _SerializedQuoteNode\n>\n\nexport const BlockquoteFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#BlockquoteFeatureClient',\n clientFeatureProps: null,\n i18n,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n return `<blockquote>${childrenText}</blockquote>`\n },\n nodeTypes: [QuoteNode.getType()],\n },\n },\n node: QuoteNode,\n }),\n ],\n },\n key: 'blockquote',\n})\n"],"mappings":"AAGA,SAASA,SAAS,QAAQ;AAE1B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,IAAI,QAAQ;AASrB,OAAO,MAAMC,iBAAA,GAAoBL,mBAAA,CAAoB;EACnDM,OAAA,EAAS;IACPC,aAAA,EAAe;IACfC,kBAAA,EAAoB;IACpBJ,IAAA;IACAK,oBAAA,EAAsB,CAACN,mBAAA,CAAoB;IAC3CO,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,UAAA,EAAY;QACVC,IAAA,EAAM;UACJC,SAAA,EAAW,MAAAA,CAAO;YAChBF,UAAU;YACVG,YAAY;YACZC,KAAK;YACLC,KAAK;YACLC,IAAI;YACJC,cAAc;YACdC,MAAM;YACNC,GAAG;YACHC;UAAgB,CACjB;YACC,MAAMC,YAAA,GAAe,MAAMrB,yBAAA,CAA0B;cACnDU,UAAA;cACAG,YAAA;cACAC,KAAA;cACAC,KAAA;cACAO,YAAA,EAAcN,IAAA,CAAKO,QAAQ;cAC3BN,cAAA;cACAC,MAAA,EAAQ;gBACN,GAAGF,IAAI;gBACPE;cACF;cACAC,GAAA;cACAC;YACF;YAEA,OAAO,eAAeC,YAAA,eAA2B;UACnD;UACAG,SAAA,EAAW,CAAC1B,SAAA,CAAU2B,OAAO;QAC/B;MACF;MACAT,IAAA,EAAMlB;IACR;EAEJ;EACA4B,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,17 +1,43 @@
1
- import type { ClientBlock, ClientField } from 'payload';
1
+ import type { ClientField, FormState } from 'payload';
2
2
  import React from 'react';
3
- import type { LexicalRichTextFieldProps } from '../../../../types.js';
4
- import type { BlockFields } from '../../server/nodes/BlocksNode.js';
5
3
  type Props = {
6
4
  baseClass: string;
7
- clientBlock: ClientBlock;
8
- field: LexicalRichTextFieldProps['field'];
9
- formData: BlockFields;
5
+ BlockDrawer: React.FC;
6
+ Collapsible: React.FC<{
7
+ children?: React.ReactNode;
8
+ editButton?: boolean;
9
+ errorCount?: number;
10
+ fieldHasErrors?: boolean;
11
+ /**
12
+ * Override the default label with a custom label
13
+ */
14
+ Label?: React.ReactNode;
15
+ removeButton?: boolean;
16
+ }>;
17
+ CustomBlock: React.ReactNode;
18
+ EditButton: React.FC;
19
+ errorCount: number;
10
20
  formSchema: ClientField[];
21
+ initialState: false | FormState | undefined;
11
22
  nodeKey: string;
12
- path: string;
13
- schemaPath: string;
23
+ RemoveButton: React.FC;
14
24
  };
25
+ type BlockComponentContextType = {
26
+ BlockCollapsible?: React.FC<{
27
+ children?: React.ReactNode;
28
+ editButton?: boolean;
29
+ /**
30
+ * Override the default label with a custom label
31
+ */
32
+ Label?: React.ReactNode;
33
+ removeButton?: boolean;
34
+ }>;
35
+ EditButton?: React.FC;
36
+ initialState: false | FormState | undefined;
37
+ nodeKey?: string;
38
+ RemoveButton?: React.FC;
39
+ };
40
+ export declare const useBlockComponentContext: () => BlockComponentContextType;
15
41
  /**
16
42
  * The actual content of the Block. This should be INSIDE a Form component,
17
43
  * scoped to the block. All format operations in here are thus scoped to the block's form, and
@@ -1 +1 @@
1
- {"version":3,"file":"BlockContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAmC,MAAM,SAAS,CAAA;AAkBxF,OAAO,KAAsB,MAAM,OAAO,CAAA;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAKnE,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,yBAAyB,CAAC,OAAO,CAAC,CAAA;IACzC,QAAQ,EAAE,WAAW,CAAA;IACrB,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAoBD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAwLxC,CAAA"}
1
+ {"version":3,"file":"BlockContent.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAGrD,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAA;IACrB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;QACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,cAAc,CAAC,EAAE,OAAO,CAAA;QACxB;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QACvB,YAAY,CAAC,EAAE,OAAO,CAAA;KACvB,CAAC,CAAA;IACF,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,UAAU,EAAE,KAAK,CAAC,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,YAAY,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;IAE3C,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,KAAK,CAAC,EAAE,CAAA;CACvB,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QACvB,YAAY,CAAC,EAAE,OAAO,CAAA;KACvB,CAAC,CAAA;IACF,UAAU,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;IACrB,YAAY,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;IAE3C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,KAAK,CAAC,EAAE,CAAA;CACxB,CAAA;AAMD,eAAO,MAAM,wBAAwB,iCAAgD,CAAA;AAErF;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmExC,CAAA"}
@@ -1,192 +1,88 @@
1
1
  'use client';
2
2
 
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
- import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
5
- import { getTranslation } from '@payloadcms/translations';
6
- import { Button, Collapsible, ErrorPill, Pill, RenderComponent, RenderFields, SectionTitle, useDocumentInfo, useFormSubmitted, useTranslation } from '@payloadcms/ui';
7
- import { dequal } from 'dequal/lite';
8
- import { $getNodeByKey } from 'lexical';
9
- import React, { useCallback } from 'react';
10
- import { FormSavePlugin } from './FormSavePlugin.js';
11
- // Recursively remove all undefined values from even being present in formData, as they will
12
- // cause isDeepEqual to return false if, for example, formData has a key that fields.data
13
- // does not have, even if it's undefined.
14
- // Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.
15
- // Inside of fields.data however, that sub-blocks blockName property does not exist at all.
16
- function removeUndefinedAndNullAndEmptyArraysRecursively(obj) {
17
- for (const key in obj) {
18
- const value = obj[key];
19
- if (Array.isArray(value) && !value?.length) {
20
- delete obj[key];
21
- } else if (value && typeof value === 'object') {
22
- removeUndefinedAndNullAndEmptyArraysRecursively(value);
23
- } else if (value === undefined || value === null) {
24
- delete obj[key];
25
- }
26
- }
27
- }
5
+ import { RenderFields, useFormSubmitted } from '@payloadcms/ui';
6
+ import React, { createContext, useMemo } from 'react';
7
+ const BlockComponentContext = /*#__PURE__*/createContext({
8
+ initialState: false
9
+ });
10
+ export const useBlockComponentContext = () => {
11
+ return React.useContext(BlockComponentContext);
12
+ };
28
13
  /**
29
14
  * The actual content of the Block. This should be INSIDE a Form component,
30
15
  * scoped to the block. All format operations in here are thus scoped to the block's form, and
31
16
  * not the whole document.
32
17
  */
33
18
  export const BlockContent = props => {
19
+ const $ = _c(13);
34
20
  const {
35
- baseClass,
36
- clientBlock,
37
- field,
21
+ BlockDrawer,
22
+ Collapsible,
23
+ CustomBlock,
24
+ EditButton,
25
+ errorCount,
38
26
  formSchema,
27
+ initialState,
39
28
  nodeKey,
40
- schemaPath
41
- } = props;
42
- let {
43
- formData
29
+ RemoveButton
44
30
  } = props;
45
- const {
46
- i18n
47
- } = useTranslation();
48
- const [editor] = useLexicalComposerContext();
49
- // Used for saving collapsed to preferences (and gettin' it from there again)
50
- // Remember, these preferences are scoped to the whole document, not just this form. This
51
- // is important to consider for the data path used in setDocFieldPreferences
52
- const {
53
- getDocPreferences,
54
- setDocFieldPreferences
55
- } = useDocumentInfo();
56
- const [isCollapsed, setIsCollapsed] = React.useState(() => {
57
- let initialState = false;
58
- void getDocPreferences().then(currentDocPreferences => {
59
- const currentFieldPreferences = currentDocPreferences?.fields[field.name];
60
- const collapsedArray = currentFieldPreferences?.collapsed;
61
- if (collapsedArray && collapsedArray.includes(formData.id)) {
62
- initialState = true;
63
- setIsCollapsed(true);
64
- }
65
- });
66
- return initialState;
67
- });
68
31
  const hasSubmitted = useFormSubmitted();
69
- const [errorCount, setErrorCount] = React.useState(0);
70
32
  const fieldHasErrors = hasSubmitted && errorCount > 0;
71
- const classNames = [`${baseClass}__row`, fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`].filter(Boolean).join(' ');
72
- const onFormChange = useCallback(({
73
- fullFieldsWithValues,
74
- newFormData
75
- }) => {
76
- newFormData.id = formData.id;
77
- newFormData.blockType = formData.blockType;
78
- removeUndefinedAndNullAndEmptyArraysRecursively(newFormData);
79
- removeUndefinedAndNullAndEmptyArraysRecursively(formData);
80
- // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,
81
- // which would trigger the "Leave without saving" dialog unnecessarily
82
- if (!dequal(formData, newFormData)) {
83
- // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108
84
- // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.
85
- // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we
86
- // ensure that the nested editor has finished its update cycle before we update the block node.
87
- setTimeout(() => {
88
- editor.update(() => {
89
- const node = $getNodeByKey(nodeKey);
90
- if (node) {
91
- formData = newFormData;
92
- node.setFields(newFormData);
93
- }
94
- });
95
- }, 0);
96
- }
97
- // update error count
98
- if (hasSubmitted) {
99
- let rowErrorCount = 0;
100
- for (const formField of Object.values(fullFieldsWithValues)) {
101
- if (formField?.valid === false) {
102
- rowErrorCount++;
103
- }
104
- }
105
- setErrorCount(rowErrorCount);
106
- }
107
- }, [editor, nodeKey, hasSubmitted, formData]);
108
- const onCollapsedChange = useCallback(changedCollapsed => {
109
- void getDocPreferences().then(currentDocPreferences_0 => {
110
- const currentFieldPreferences_0 = currentDocPreferences_0?.fields[field.name];
111
- const collapsedArray_0 = currentFieldPreferences_0?.collapsed;
112
- const newCollapsed = collapsedArray_0 && collapsedArray_0?.length ? collapsedArray_0 : [];
113
- if (changedCollapsed) {
114
- if (!newCollapsed.includes(formData.id)) {
115
- newCollapsed.push(formData.id);
116
- }
117
- } else {
118
- if (newCollapsed.includes(formData.id)) {
119
- newCollapsed.splice(newCollapsed.indexOf(formData.id), 1);
120
- }
121
- }
122
- setDocFieldPreferences(field.name, {
123
- collapsed: newCollapsed,
124
- hello: 'hi'
125
- });
33
+ let t0;
34
+ let t1;
35
+ if ($[0] !== Collapsible || $[1] !== errorCount || $[2] !== fieldHasErrors) {
36
+ t1 = props_0 => _jsx(Collapsible, {
37
+ editButton: props_0.editButton,
38
+ errorCount,
39
+ fieldHasErrors,
40
+ Label: props_0.Label,
41
+ removeButton: props_0.removeButton,
42
+ children: props_0.children
126
43
  });
127
- }, [getDocPreferences, field.name, setDocFieldPreferences, formData.id]);
128
- const removeBlock = useCallback(() => {
129
- editor.update(() => {
130
- $getNodeByKey(nodeKey).remove();
131
- });
132
- }, [editor, nodeKey]);
133
- return /*#__PURE__*/_jsxs(React.Fragment, {
134
- children: [/*#__PURE__*/_jsx(Collapsible, {
135
- className: classNames,
136
- collapsibleStyle: fieldHasErrors ? 'error' : 'default',
137
- header: clientBlock?.admin?.components?.Label ? /*#__PURE__*/_jsx(RenderComponent, {
138
- clientProps: {
139
- blockKind: 'lexicalBlock',
140
- formData
141
- },
142
- mappedComponent: clientBlock.admin.components.Label
143
- }) : /*#__PURE__*/_jsxs("div", {
144
- className: `${baseClass}__block-header`,
145
- children: [/*#__PURE__*/_jsxs("div", {
146
- children: [/*#__PURE__*/_jsx(Pill, {
147
- className: `${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`,
148
- pillStyle: "white",
149
- children: typeof clientBlock?.labels.singular === 'string' ? getTranslation(clientBlock?.labels.singular, i18n) : clientBlock.slug
150
- }), /*#__PURE__*/_jsx(SectionTitle, {
151
- path: "blockName",
152
- readOnly: field?.admin?.readOnly
153
- }), fieldHasErrors && /*#__PURE__*/_jsx(ErrorPill, {
154
- count: errorCount,
155
- i18n: i18n,
156
- withMessage: true
157
- })]
158
- }), editor.isEditable() && /*#__PURE__*/_jsx(Button, {
159
- buttonStyle: "icon-label",
160
- className: `${baseClass}__removeButton`,
161
- disabled: field?.admin?.readOnly,
162
- icon: "x",
163
- onClick: e => {
164
- e.preventDefault();
165
- removeBlock();
166
- },
167
- round: true,
168
- tooltip: "Remove Block"
169
- })]
170
- }),
171
- isCollapsed: isCollapsed,
172
- onToggle: incomingCollapsedState => {
173
- onCollapsedChange(incomingCollapsedState);
174
- setIsCollapsed(incomingCollapsedState);
44
+ $[0] = Collapsible;
45
+ $[1] = errorCount;
46
+ $[2] = fieldHasErrors;
47
+ $[3] = t1;
48
+ } else {
49
+ t1 = $[3];
50
+ }
51
+ t0 = t1;
52
+ const CollapsibleWithErrorProps = t0;
53
+ let t2;
54
+ if ($[4] !== CustomBlock || $[5] !== CollapsibleWithErrorProps || $[6] !== EditButton || $[7] !== initialState || $[8] !== nodeKey || $[9] !== RemoveButton || $[10] !== BlockDrawer || $[11] !== formSchema) {
55
+ t2 = CustomBlock ? _jsxs(BlockComponentContext.Provider, {
56
+ value: {
57
+ BlockCollapsible: CollapsibleWithErrorProps,
58
+ EditButton,
59
+ initialState,
60
+ nodeKey,
61
+ RemoveButton
175
62
  },
176
- children: /*#__PURE__*/_jsx(RenderFields, {
177
- className: `${baseClass}__fields`,
63
+ children: [CustomBlock, _jsx(BlockDrawer, {})]
64
+ }) : _jsx(CollapsibleWithErrorProps, {
65
+ children: _jsx(RenderFields, {
178
66
  fields: formSchema,
179
67
  forceRender: true,
180
- margins: "small",
181
- path: "" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access "myField" instead of "someLexicalField.feature.blocks.someArrayB" // TODO: Could there be any implications leaving path different than schemaPath?
182
- ,
183
-
184
- readOnly: false,
185
- schemaPath: schemaPath
68
+ parentIndexPath: "",
69
+ parentPath: "",
70
+ parentSchemaPath: "",
71
+ permissions: true
186
72
  })
187
- }, 0), /*#__PURE__*/_jsx(FormSavePlugin, {
188
- onChange: onFormChange
189
- })]
190
- });
73
+ });
74
+ $[4] = CustomBlock;
75
+ $[5] = CollapsibleWithErrorProps;
76
+ $[6] = EditButton;
77
+ $[7] = initialState;
78
+ $[8] = nodeKey;
79
+ $[9] = RemoveButton;
80
+ $[10] = BlockDrawer;
81
+ $[11] = formSchema;
82
+ $[12] = t2;
83
+ } else {
84
+ t2 = $[12];
85
+ }
86
+ return t2;
191
87
  };
192
88
  //# sourceMappingURL=BlockContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockContent.js","names":["useLexicalComposerContext","getTranslation","Button","Collapsible","ErrorPill","Pill","RenderComponent","RenderFields","SectionTitle","useDocumentInfo","useFormSubmitted","useTranslation","dequal","$getNodeByKey","React","useCallback","FormSavePlugin","removeUndefinedAndNullAndEmptyArraysRecursively","obj","key","value","Array","isArray","length","undefined","BlockContent","props","baseClass","clientBlock","field","formSchema","nodeKey","schemaPath","formData","i18n","editor","getDocPreferences","setDocFieldPreferences","isCollapsed","setIsCollapsed","useState","initialState","then","currentDocPreferences","currentFieldPreferences","fields","name","collapsedArray","collapsed","includes","id","hasSubmitted","errorCount","setErrorCount","fieldHasErrors","classNames","filter","Boolean","join","onFormChange","fullFieldsWithValues","newFormData","blockType","setTimeout","update","node","setFields","rowErrorCount","formField","Object","values","valid","onCollapsedChange","changedCollapsed","newCollapsed","push","splice","indexOf","hello","removeBlock","remove","_jsxs","Fragment","_jsx","className","collapsibleStyle","header","admin","components","Label","clientProps","blockKind","mappedComponent","pillStyle","labels","singular","slug","path","readOnly","count","withMessage","isEditable","buttonStyle","disabled","icon","onClick","e","preventDefault","round","tooltip","onToggle","incomingCollapsedState","forceRender","margins","onChange"],"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { ClientBlock, ClientField, CollapsedPreferences, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderComponent,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport { dequal } from 'dequal/lite'\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback } from 'react'\n\nimport type { LexicalRichTextFieldProps } from '../../../../types.js'\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\nimport type { BlockNode } from '../nodes/BlocksNode.js'\n\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n clientBlock: ClientBlock\n field: LexicalRichTextFieldProps['field']\n formData: BlockFields\n formSchema: ClientField[]\n nodeKey: string\n path: string\n schemaPath: string\n}\n\n// Recursively remove all undefined values from even being present in formData, as they will\n// cause isDeepEqual to return false if, for example, formData has a key that fields.data\n// does not have, even if it's undefined.\n// Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n// Inside of fields.data however, that sub-blocks blockName property does not exist at all.\nfunction removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const { baseClass, clientBlock, field, formSchema, nodeKey, schemaPath } = props\n let { formData } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(() => {\n let initialState = false\n\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n if (collapsedArray && collapsedArray.includes(formData.id)) {\n initialState = true\n setIsCollapsed(true)\n }\n })\n return initialState\n })\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: BlockFields\n }) => {\n newFormData.id = formData.id\n newFormData.blockType = formData.blockType\n\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!dequal(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node: BlockNode = $getNodeByKey(nodeKey)\n if (node) {\n formData = newFormData\n node.setFields(newFormData)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n clientBlock?.admin?.components?.Label ? (\n <RenderComponent\n clientProps={{ blockKind: 'lexicalBlock', formData }}\n mappedComponent={clientBlock.admin.components.Label}\n />\n ) : (\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof clientBlock?.labels.singular === 'string'\n ? getTranslation(clientBlock?.labels.singular, i18n)\n : clientBlock.slug}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.admin?.readOnly} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.admin?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n )\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n className={`${baseClass}__fields`}\n fields={formSchema}\n forceRender\n margins=\"small\"\n path=\"\" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access \"myField\" instead of \"someLexicalField.feature.blocks.someArrayB\" // TODO: Could there be any implications leaving path different than schemaPath?\n readOnly={false}\n schemaPath={schemaPath} // Having the correct schemaPath here allows sub-fields (like array > addRow) to run correct form-state calls and retrieve their needed form state from the server\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"BlockContent.js","names":["c","_c","RenderFields","useFormSubmitted","React","createContext","useMemo","BlockComponentContext","initialState","useBlockComponentContext","useContext","BlockContent","props","$","BlockDrawer","Collapsible","CustomBlock","EditButton","errorCount","formSchema","nodeKey","RemoveButton","hasSubmitted","fieldHasErrors","t0","t1","props_0","_jsx","editButton","Label","removeButton","children","CollapsibleWithErrorProps","t2","_jsxs","Provider","value","BlockCollapsible","fields","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions"],"sources":["../../../../../src/features/blocks/client/component/BlockContent.tsx"],"sourcesContent":["'use client'\nimport type { ClientField, FormState } from 'payload'\n\nimport { RenderFields, useFormSubmitted } from '@payloadcms/ui'\nimport React, { createContext, useMemo } from 'react'\n\ntype Props = {\n baseClass: string\n BlockDrawer: React.FC\n Collapsible: React.FC<{\n children?: React.ReactNode\n editButton?: boolean\n errorCount?: number\n fieldHasErrors?: boolean\n /**\n * Override the default label with a custom label\n */\n Label?: React.ReactNode\n removeButton?: boolean\n }>\n CustomBlock: React.ReactNode\n EditButton: React.FC\n errorCount: number\n formSchema: ClientField[]\n initialState: false | FormState | undefined\n\n nodeKey: string\n RemoveButton: React.FC\n}\n\ntype BlockComponentContextType = {\n BlockCollapsible?: React.FC<{\n children?: React.ReactNode\n editButton?: boolean\n /**\n * Override the default label with a custom label\n */\n Label?: React.ReactNode\n removeButton?: boolean\n }>\n EditButton?: React.FC\n initialState: false | FormState | undefined\n\n nodeKey?: string\n RemoveButton?: React.FC\n}\n\nconst BlockComponentContext = createContext<BlockComponentContextType>({\n initialState: false,\n})\n\nexport const useBlockComponentContext = () => React.useContext(BlockComponentContext)\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const {\n BlockDrawer,\n Collapsible,\n CustomBlock,\n EditButton,\n errorCount,\n formSchema,\n initialState,\n nodeKey,\n RemoveButton,\n } = props\n\n const hasSubmitted = useFormSubmitted()\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const CollapsibleWithErrorProps = useMemo(\n () =>\n (props: {\n children?: React.ReactNode\n editButton?: boolean\n\n /**\n * Override the default label with a custom label\n */\n Label?: React.ReactNode\n removeButton?: boolean\n }) => (\n <Collapsible\n editButton={props.editButton}\n errorCount={errorCount}\n fieldHasErrors={fieldHasErrors}\n Label={props.Label}\n removeButton={props.removeButton}\n >\n {props.children}\n </Collapsible>\n ),\n [Collapsible, fieldHasErrors, errorCount],\n )\n\n return CustomBlock ? (\n <BlockComponentContext.Provider\n value={{\n BlockCollapsible: CollapsibleWithErrorProps,\n EditButton,\n initialState,\n nodeKey,\n RemoveButton,\n }}\n >\n {CustomBlock}\n <BlockDrawer />\n </BlockComponentContext.Provider>\n ) : (\n <CollapsibleWithErrorProps>\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n />\n </CollapsibleWithErrorProps>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,YAAY,EAAEC,gBAAgB,QAAQ;AAC/C,OAAOC,KAAA,IAASC,aAAa,EAAEC,OAAO,QAAQ;AA2C9C,MAAMC,qBAAA,gBAAwBF,aAAA,CAAyC;EACrEG,YAAA,EAAc;AAChB;AAEA,OAAO,MAAMC,wBAAA,GAA2BA,CAAA;EAAA,OAAML,KAAA,CAAAM,UAAA,CAAAH,qBAAiB;AAAA;AAE/D;;;;;AAKA,OAAO,MAAMI,YAAA,GAAgCC,KAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EAC3C;IAAAa,WAAA;IAAAC,WAAA;IAAAC,WAAA;IAAAC,UAAA;IAAAC,UAAA;IAAAC,UAAA;IAAAX,YAAA;IAAAY,OAAA;IAAAC;EAAA,IAUIT,KAAA;EAEJ,MAAAU,YAAA,GAAqBnB,gBAAA;EAErB,MAAAoB,cAAA,GAAuBD,YAAA,IAAgBJ,UAAA,IAAa;EAAA,IAAAM,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAZ,CAAA,QAAAE,WAAA,IAAAF,CAAA,QAAAK,UAAA,IAAAL,CAAA,QAAAU,cAAA;IAIhDE,EAAA,GAAAC,OAAA,IAUEC,IAAA,CAACZ,WAAA;MAAAa,UAAA,EACahB,OAAA,CAAAgB,UAAA;MAAAV,UAAA;MAAAK,cAAA;MAAAM,KAAA,EAGLjB,OAAA,CAAAiB,KAAA;MAAAC,YAAA,EACOlB,OAAA,CAAAkB,YAAA;MAAAC,QAAA,EAEbnB,OAAA,CAAAmB;IAAA,C;;;;;;;;OAjBLN,E;EAFJ,MAAAO,yBAAA,GAAkCR,EAsBS;EAAA,IAAAS,EAAA;EAAA,IAAApB,CAAA,QAAAG,WAAA,IAAAH,CAAA,QAAAmB,yBAAA,IAAAnB,CAAA,QAAAI,UAAA,IAAAJ,CAAA,QAAAL,YAAA,IAAAK,CAAA,QAAAO,OAAA,IAAAP,CAAA,QAAAQ,YAAA,IAAAR,CAAA,SAAAC,WAAA,IAAAD,CAAA,SAAAM,UAAA;IAGpCc,EAAA,GAAAjB,WAAA,GACLkB,KAAA,CAAA3B,qBAAA,CAAA4B,QAAA;MAAAC,KAAA;QAAAC,gBAAA,EAEsBL,yBAAA;QAAAf,UAAA;QAAAT,YAAA;QAAAY,OAAA;QAAAC;MAAA;MAAAU,QAAA,GAOnBf,WAAA,EACDW,IAAA,CAACb,WAAA;IAAA,C,IAGHa,IAAA,CAACK,yBAAA;MAAAD,QAAA,EACCJ,IAAA,CAAAzB,YAAA;QAAAoC,MAAA,EACUnB,UAAA;QAAAoB,WAAA;QAAAC,eAAA,EAEQ;QAAAC,UAAA,EACJ;QAAAC,gBAAA,EACK;QAAAC,WAAA;MAAA,C;;;;;;;;;;;;;;SApBhBV,E;CAyBT","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare const BlockCollapsible: React.FC<{
3
+ children?: React.ReactNode;
4
+ editButton?: boolean;
5
+ /**
6
+ * Override the default label with a custom label
7
+ */
8
+ Label?: React.ReactNode;
9
+ removeButton?: boolean;
10
+ }>;
11
+ //# sourceMappingURL=BlockCollapsible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockCollapsible.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/client/component/components/BlockCollapsible.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAQA,CAAA"}