@payloadcms/richtext-lexical 3.0.0-beta.84 → 3.0.0-beta.86

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 (757) hide show
  1. package/dist/cell/index.js +117 -127
  2. package/dist/cell/index.js.map +1 -1
  3. package/dist/exports/client/Component-DOSSWC76.js +2 -0
  4. package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
  5. package/dist/exports/client/Component-MBLHTKDK.js +2 -0
  6. package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
  7. package/dist/exports/client/Field-KUSPHC7Q.js +2 -0
  8. package/dist/exports/client/Field-KUSPHC7Q.js.map +7 -0
  9. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js +2 -0
  10. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js.map +7 -0
  11. package/dist/exports/client/bundled.css +1 -1
  12. package/dist/exports/client/chunk-G5DTIOPI.js +2 -0
  13. package/dist/exports/client/chunk-G5DTIOPI.js.map +7 -0
  14. package/dist/exports/client/chunk-LGUXX2QH.js +2 -0
  15. package/dist/exports/client/chunk-LGUXX2QH.js.map +7 -0
  16. package/dist/exports/client/chunk-NI6Z4GBD.js +2 -0
  17. package/dist/exports/client/{chunk-SQHN3N6E.js.map → chunk-NI6Z4GBD.js.map} +2 -2
  18. package/dist/exports/client/chunk-OKMIHD2R.js +2 -0
  19. package/dist/exports/client/chunk-OKMIHD2R.js.map +7 -0
  20. package/dist/exports/client/chunk-TO2W7Q2G.js +2 -0
  21. package/dist/exports/client/chunk-TO2W7Q2G.js.map +7 -0
  22. package/dist/exports/client/chunk-V2LKLT2F.js +3 -0
  23. package/dist/exports/client/chunk-V2LKLT2F.js.map +7 -0
  24. package/dist/exports/client/component-3OFD6Q4Z.js +2 -0
  25. package/dist/exports/client/component-3OFD6Q4Z.js.map +7 -0
  26. package/dist/exports/client/component-LCAAX56T.js +2 -0
  27. package/dist/exports/client/component-LCAAX56T.js.map +7 -0
  28. package/dist/exports/client/component-LLWMZU6K.js +2 -0
  29. package/dist/exports/client/component-LLWMZU6K.js.map +7 -0
  30. package/dist/exports/client/componentInline-72VZAAHP.js +2 -0
  31. package/dist/exports/client/componentInline-72VZAAHP.js.map +7 -0
  32. package/dist/exports/client/index.js +9 -9
  33. package/dist/exports/client/index.js.map +3 -3
  34. package/dist/exports/server/migrate.js +0 -1
  35. package/dist/exports/server/migrate.js.map +1 -1
  36. package/dist/features/align/client/index.js +151 -134
  37. package/dist/features/align/client/index.js.map +1 -1
  38. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  39. package/dist/features/align/client/toolbarAlignGroup.js +10 -9
  40. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  41. package/dist/features/align/server/i18n.js +192 -193
  42. package/dist/features/align/server/i18n.js.map +1 -1
  43. package/dist/features/align/server/index.js +5 -6
  44. package/dist/features/align/server/index.js.map +1 -1
  45. package/dist/features/blockquote/client/index.js +60 -65
  46. package/dist/features/blockquote/client/index.js.map +1 -1
  47. package/dist/features/blockquote/markdownTransformer.js +28 -34
  48. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  49. package/dist/features/blockquote/server/i18n.js +96 -97
  50. package/dist/features/blockquote/server/i18n.js.map +1 -1
  51. package/dist/features/blockquote/server/index.js +38 -37
  52. package/dist/features/blockquote/server/index.js.map +1 -1
  53. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  54. package/dist/features/blocks/client/component/BlockContent.js +166 -172
  55. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  56. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -1
  57. package/dist/features/blocks/client/component/FormSavePlugin.js +46 -22
  58. package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -1
  59. package/dist/features/blocks/client/component/index.js +130 -142
  60. package/dist/features/blocks/client/component/index.js.map +1 -1
  61. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -1
  62. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +12 -8
  63. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
  64. package/dist/features/blocks/client/componentInline/index.js +106 -122
  65. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  66. package/dist/features/blocks/client/index.js +149 -142
  67. package/dist/features/blocks/client/index.js.map +1 -1
  68. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  69. package/dist/features/blocks/client/nodes/BlocksNode.js +41 -40
  70. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  71. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  72. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +31 -30
  73. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  74. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
  75. package/dist/features/blocks/client/plugin/commands.js +2 -1
  76. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  77. package/dist/features/blocks/client/plugin/index.js +179 -106
  78. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  79. package/dist/features/blocks/server/graphQLPopulationPromise.js +41 -28
  80. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  81. package/dist/features/blocks/server/i18n.js +288 -289
  82. package/dist/features/blocks/server/i18n.js.map +1 -1
  83. package/dist/features/blocks/server/index.js +149 -151
  84. package/dist/features/blocks/server/index.js.map +1 -1
  85. package/dist/features/blocks/server/nodes/BlocksNode.js +76 -73
  86. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  87. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +78 -76
  88. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  89. package/dist/features/blocks/server/validate.js +45 -34
  90. package/dist/features/blocks/server/validate.js.map +1 -1
  91. package/dist/features/converters/html/converter/converters/linebreak.js +4 -7
  92. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  93. package/dist/features/converters/html/converter/converters/paragraph.js +24 -19
  94. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  95. package/dist/features/converters/html/converter/converters/text.js +28 -29
  96. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  97. package/dist/features/converters/html/converter/defaultConverters.js +1 -6
  98. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  99. package/dist/features/converters/html/converter/index.js +66 -51
  100. package/dist/features/converters/html/converter/index.js.map +1 -1
  101. package/dist/features/converters/html/converter/types.js +1 -2
  102. package/dist/features/converters/html/converter/types.js.map +1 -1
  103. package/dist/features/converters/html/field/index.js +134 -139
  104. package/dist/features/converters/html/field/index.js.map +1 -1
  105. package/dist/features/converters/html/index.js +2 -3
  106. package/dist/features/converters/html/index.js.map +1 -1
  107. package/dist/features/createClientComponent.js +7 -6
  108. package/dist/features/createClientComponent.js.map +1 -1
  109. package/dist/features/createFeaturePropComponent.js +14 -13
  110. package/dist/features/createFeaturePropComponent.js.map +1 -1
  111. package/dist/features/debug/testRecorder/client/index.js +5 -7
  112. package/dist/features/debug/testRecorder/client/index.js.map +1 -1
  113. package/dist/features/debug/testRecorder/client/plugin/index.js +518 -402
  114. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  115. package/dist/features/debug/testRecorder/server/index.js +4 -5
  116. package/dist/features/debug/testRecorder/server/index.js.map +1 -1
  117. package/dist/features/debug/treeView/client/index.js +5 -7
  118. package/dist/features/debug/treeView/client/index.js.map +1 -1
  119. package/dist/features/debug/treeView/client/plugin/index.js +21 -11
  120. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  121. package/dist/features/debug/treeView/server/index.js +4 -5
  122. package/dist/features/debug/treeView/server/index.js.map +1 -1
  123. package/dist/features/experimental_table/client/index.js +41 -58
  124. package/dist/features/experimental_table/client/index.js.map +1 -1
  125. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +714 -560
  126. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  127. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +295 -301
  128. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  129. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -7
  130. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  131. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +228 -159
  132. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  133. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  134. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  135. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +129 -82
  136. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  137. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
  138. package/dist/features/experimental_table/client/utils/debounce.js +108 -89
  139. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  140. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -1
  141. package/dist/features/experimental_table/client/utils/useDebounce.js +11 -13
  142. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  143. package/dist/features/experimental_table/server/index.js +127 -114
  144. package/dist/features/experimental_table/server/index.js.map +1 -1
  145. package/dist/features/format/bold/feature.client.js +34 -35
  146. package/dist/features/format/bold/feature.client.js.map +1 -1
  147. package/dist/features/format/bold/feature.server.js +14 -18
  148. package/dist/features/format/bold/feature.server.js.map +1 -1
  149. package/dist/features/format/bold/markdownTransformers.js +14 -25
  150. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  151. package/dist/features/format/inlineCode/feature.client.js +26 -28
  152. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  153. package/dist/features/format/inlineCode/feature.server.js +5 -8
  154. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  155. package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
  156. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  157. package/dist/features/format/italic/feature.client.js +26 -29
  158. package/dist/features/format/italic/feature.client.js.map +1 -1
  159. package/dist/features/format/italic/feature.server.js +5 -9
  160. package/dist/features/format/italic/feature.server.js.map +1 -1
  161. package/dist/features/format/italic/markdownTransformers.js +7 -12
  162. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  163. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  164. package/dist/features/format/shared/toolbarFormatGroup.js +9 -8
  165. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  166. package/dist/features/format/strikethrough/feature.client.js +26 -28
  167. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  168. package/dist/features/format/strikethrough/feature.server.js +5 -8
  169. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  170. package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
  171. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  172. package/dist/features/format/subscript/feature.client.js +25 -25
  173. package/dist/features/format/subscript/feature.client.js.map +1 -1
  174. package/dist/features/format/subscript/feature.server.js +4 -5
  175. package/dist/features/format/subscript/feature.server.js.map +1 -1
  176. package/dist/features/format/superscript/feature.client.js +25 -25
  177. package/dist/features/format/superscript/feature.client.js.map +1 -1
  178. package/dist/features/format/superscript/feature.server.js +4 -5
  179. package/dist/features/format/superscript/feature.server.js.map +1 -1
  180. package/dist/features/format/underline/feature.client.js +25 -25
  181. package/dist/features/format/underline/feature.client.js.map +1 -1
  182. package/dist/features/format/underline/feature.server.js +4 -5
  183. package/dist/features/format/underline/feature.server.js.map +1 -1
  184. package/dist/features/heading/client/index.js +86 -90
  185. package/dist/features/heading/client/index.js.map +1 -1
  186. package/dist/features/heading/markdownTransformer.js +22 -25
  187. package/dist/features/heading/markdownTransformer.js.map +1 -1
  188. package/dist/features/heading/server/i18n.js +96 -97
  189. package/dist/features/heading/server/i18n.js.map +1 -1
  190. package/dist/features/heading/server/index.js +49 -51
  191. package/dist/features/heading/server/index.js.map +1 -1
  192. package/dist/features/horizontalRule/client/component/index.js +81 -51
  193. package/dist/features/horizontalRule/client/component/index.js.map +1 -1
  194. package/dist/features/horizontalRule/client/index.js +48 -57
  195. package/dist/features/horizontalRule/client/index.js.map +1 -1
  196. package/dist/features/horizontalRule/client/markdownTransformer.js +15 -18
  197. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  198. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  199. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +33 -30
  200. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  201. package/dist/features/horizontalRule/client/plugin/index.js +31 -20
  202. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  203. package/dist/features/horizontalRule/server/i18n.js +96 -97
  204. package/dist/features/horizontalRule/server/i18n.js.map +1 -1
  205. package/dist/features/horizontalRule/server/index.js +17 -24
  206. package/dist/features/horizontalRule/server/index.js.map +1 -1
  207. package/dist/features/horizontalRule/server/markdownTransformer.js +15 -18
  208. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  209. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +71 -66
  210. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  211. package/dist/features/indent/client/index.js +52 -47
  212. package/dist/features/indent/client/index.js.map +1 -1
  213. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  214. package/dist/features/indent/client/toolbarIndentGroup.js +9 -8
  215. package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
  216. package/dist/features/indent/server/i18n.js +128 -129
  217. package/dist/features/indent/server/i18n.js.map +1 -1
  218. package/dist/features/indent/server/index.js +5 -6
  219. package/dist/features/indent/server/index.js.map +1 -1
  220. package/dist/features/link/client/index.js +78 -83
  221. package/dist/features/link/client/index.js.map +1 -1
  222. package/dist/features/link/client/plugins/autoLink/index.js +267 -271
  223. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  224. package/dist/features/link/client/plugins/clickableLink/index.js +3 -3
  225. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  226. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  227. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +2 -1
  228. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  229. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +254 -276
  230. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  231. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +8 -6
  232. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  233. package/dist/features/link/client/plugins/floatingLinkEditor/types.js +1 -2
  234. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  235. package/dist/features/link/client/plugins/link/index.js +50 -41
  236. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  237. package/dist/features/link/markdownTransformer.js +38 -39
  238. package/dist/features/link/markdownTransformer.js.map +1 -1
  239. package/dist/features/link/nodes/AutoLinkNode.js +57 -56
  240. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  241. package/dist/features/link/nodes/LinkNode.js +277 -276
  242. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  243. package/dist/features/link/nodes/types.js +1 -2
  244. package/dist/features/link/nodes/types.js.map +1 -1
  245. package/dist/features/link/server/baseFields.js +118 -88
  246. package/dist/features/link/server/baseFields.js.map +1 -1
  247. package/dist/features/link/server/graphQLPopulationPromise.js +42 -28
  248. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  249. package/dist/features/link/server/i18n.js +96 -97
  250. package/dist/features/link/server/i18n.js.map +1 -1
  251. package/dist/features/link/server/index.js +120 -114
  252. package/dist/features/link/server/index.js.map +1 -1
  253. package/dist/features/link/server/transformExtraFields.js +15 -15
  254. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  255. package/dist/features/link/server/validate.js +37 -26
  256. package/dist/features/link/server/validate.js.map +1 -1
  257. package/dist/features/lists/checklist/client/index.js +77 -85
  258. package/dist/features/lists/checklist/client/index.js.map +1 -1
  259. package/dist/features/lists/checklist/client/plugin/index.js +3 -3
  260. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  261. package/dist/features/lists/checklist/markdownTransformers.js +7 -11
  262. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  263. package/dist/features/lists/checklist/server/i18n.js +96 -97
  264. package/dist/features/lists/checklist/server/i18n.js.map +1 -1
  265. package/dist/features/lists/checklist/server/index.js +21 -25
  266. package/dist/features/lists/checklist/server/index.js.map +1 -1
  267. package/dist/features/lists/htmlConverter.js +54 -43
  268. package/dist/features/lists/htmlConverter.js.map +1 -1
  269. package/dist/features/lists/orderedList/client/index.js +71 -77
  270. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  271. package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
  272. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  273. package/dist/features/lists/orderedList/server/i18n.js +96 -97
  274. package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
  275. package/dist/features/lists/orderedList/server/index.js +21 -25
  276. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  277. package/dist/features/lists/plugin/index.js +3 -3
  278. package/dist/features/lists/plugin/index.js.map +1 -1
  279. package/dist/features/lists/shared/markdown.js +48 -49
  280. package/dist/features/lists/shared/markdown.js.map +1 -1
  281. package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
  282. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  283. package/dist/features/lists/unorderedList/client/index.js +68 -76
  284. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  285. package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
  286. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  287. package/dist/features/lists/unorderedList/server/i18n.js +96 -97
  288. package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
  289. package/dist/features/lists/unorderedList/server/index.js +17 -23
  290. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  291. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +18 -17
  292. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  293. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +30 -29
  294. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  295. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +21 -20
  296. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  297. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +21 -19
  298. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  299. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +18 -17
  300. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  301. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +24 -23
  302. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +1 -10
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +69 -61
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -7
  312. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +42 -43
  314. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  317. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +64 -59
  319. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  320. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
  321. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  322. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +20 -25
  323. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  324. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +28 -30
  325. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  326. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +26 -26
  327. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  328. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +22 -21
  329. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  330. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
  331. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  332. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +12 -13
  333. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  334. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
  335. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  336. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
  337. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  338. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +15 -16
  339. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +1 -13
  341. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/index.js +105 -98
  343. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
  345. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  346. package/dist/features/migrations/slateToLexical/feature.client.js +7 -7
  347. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/feature.server.js +43 -44
  349. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  351. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  352. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +64 -59
  354. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  355. package/dist/features/paragraph/client/index.js +58 -61
  356. package/dist/features/paragraph/client/index.js.map +1 -1
  357. package/dist/features/paragraph/server/i18n.js +128 -129
  358. package/dist/features/paragraph/server/i18n.js.map +1 -1
  359. package/dist/features/paragraph/server/index.js +6 -7
  360. package/dist/features/paragraph/server/index.js.map +1 -1
  361. package/dist/features/relationship/client/components/RelationshipComponent.js +141 -149
  362. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  363. package/dist/features/relationship/client/drawer/commands.js +0 -1
  364. package/dist/features/relationship/client/drawer/commands.js.map +1 -1
  365. package/dist/features/relationship/client/drawer/index.js +138 -67
  366. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  367. package/dist/features/relationship/client/index.js +53 -59
  368. package/dist/features/relationship/client/index.js.map +1 -1
  369. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  370. package/dist/features/relationship/client/nodes/RelationshipNode.js +60 -59
  371. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  372. package/dist/features/relationship/client/plugins/index.js +90 -35
  373. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  374. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  375. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +97 -26
  376. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
  377. package/dist/features/relationship/server/graphQLPopulationPromise.js +34 -26
  378. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  379. package/dist/features/relationship/server/i18n.js +96 -97
  380. package/dist/features/relationship/server/i18n.js.map +1 -1
  381. package/dist/features/relationship/server/index.js +48 -44
  382. package/dist/features/relationship/server/index.js.map +1 -1
  383. package/dist/features/relationship/server/nodes/RelationshipNode.js +90 -87
  384. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  385. package/dist/features/shared/slashMenu/basicGroup.js +9 -8
  386. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  387. package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
  388. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  389. package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
  390. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  391. package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
  392. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  393. package/dist/features/toolbars/fixed/client/Toolbar/index.js +264 -187
  394. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  395. package/dist/features/toolbars/fixed/client/index.js +5 -7
  396. package/dist/features/toolbars/fixed/client/index.js.map +1 -1
  397. package/dist/features/toolbars/fixed/server/index.js +14 -13
  398. package/dist/features/toolbars/fixed/server/index.js.map +1 -1
  399. package/dist/features/toolbars/inline/client/Toolbar/index.js +374 -286
  400. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  401. package/dist/features/toolbars/inline/client/index.js +5 -7
  402. package/dist/features/toolbars/inline/client/index.js.map +1 -1
  403. package/dist/features/toolbars/inline/server/index.js +4 -5
  404. package/dist/features/toolbars/inline/server/index.js.map +1 -1
  405. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  406. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  407. package/dist/features/toolbars/shared/ToolbarButton/index.js +75 -97
  408. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  409. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +190 -211
  410. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  411. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  412. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  413. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +289 -124
  414. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  415. package/dist/features/toolbars/types.js +1 -2
  416. package/dist/features/toolbars/types.js.map +1 -1
  417. package/dist/features/typeUtilities.js +2 -3
  418. package/dist/features/typeUtilities.js.map +1 -1
  419. package/dist/features/typesClient.js +1 -2
  420. package/dist/features/typesClient.js.map +1 -1
  421. package/dist/features/typesServer.js +1 -2
  422. package/dist/features/typesServer.js.map +1 -1
  423. package/dist/features/upload/client/component/index.js +208 -224
  424. package/dist/features/upload/client/component/index.js.map +1 -1
  425. package/dist/features/upload/client/drawer/commands.js +1 -1
  426. package/dist/features/upload/client/drawer/commands.js.map +1 -1
  427. package/dist/features/upload/client/drawer/index.js +107 -58
  428. package/dist/features/upload/client/drawer/index.js.map +1 -1
  429. package/dist/features/upload/client/feature.client.js +51 -61
  430. package/dist/features/upload/client/feature.client.js.map +1 -1
  431. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  432. package/dist/features/upload/client/nodes/UploadNode.js +76 -73
  433. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  434. package/dist/features/upload/client/plugin/index.js +67 -39
  435. package/dist/features/upload/client/plugin/index.js.map +1 -1
  436. package/dist/features/upload/server/feature.server.js +190 -171
  437. package/dist/features/upload/server/feature.server.js.map +1 -1
  438. package/dist/features/upload/server/graphQLPopulationPromise.js +60 -47
  439. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  440. package/dist/features/upload/server/i18n.js +96 -97
  441. package/dist/features/upload/server/i18n.js.map +1 -1
  442. package/dist/features/upload/server/nodes/UploadNode.js +113 -108
  443. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  444. package/dist/features/upload/server/validate.js +53 -40
  445. package/dist/features/upload/server/validate.js.map +1 -1
  446. package/dist/field/Field.js +124 -105
  447. package/dist/field/Field.js.map +1 -1
  448. package/dist/field/bundled.css +1 -0
  449. package/dist/field/index.js +92 -36
  450. package/dist/field/index.js.map +1 -1
  451. package/dist/i18n.js +160 -161
  452. package/dist/i18n.js.map +1 -1
  453. package/dist/index.d.ts.map +1 -1
  454. package/dist/index.js +670 -623
  455. package/dist/index.js.map +1 -1
  456. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  457. package/dist/lexical/EditorPlugin.js +15 -10
  458. package/dist/lexical/EditorPlugin.js.map +1 -1
  459. package/dist/lexical/LexicalEditor.js +206 -161
  460. package/dist/lexical/LexicalEditor.js.map +1 -1
  461. package/dist/lexical/LexicalProvider.js +83 -82
  462. package/dist/lexical/LexicalProvider.js.map +1 -1
  463. package/dist/lexical/config/client/EditorConfigProvider.js +76 -79
  464. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  465. package/dist/lexical/config/client/default.js +3 -3
  466. package/dist/lexical/config/client/default.js.map +1 -1
  467. package/dist/lexical/config/client/loader.js +42 -39
  468. package/dist/lexical/config/client/loader.js.map +1 -1
  469. package/dist/lexical/config/client/sanitize.js +165 -165
  470. package/dist/lexical/config/client/sanitize.js.map +1 -1
  471. package/dist/lexical/config/server/default.js +5 -27
  472. package/dist/lexical/config/server/default.js.map +1 -1
  473. package/dist/lexical/config/server/loader.js +103 -103
  474. package/dist/lexical/config/server/loader.js.map +1 -1
  475. package/dist/lexical/config/server/sanitize.js +98 -99
  476. package/dist/lexical/config/server/sanitize.js.map +1 -1
  477. package/dist/lexical/config/types.js +1 -2
  478. package/dist/lexical/config/types.js.map +1 -1
  479. package/dist/lexical/nodes/index.js +9 -8
  480. package/dist/lexical/nodes/index.js.map +1 -1
  481. package/dist/lexical/plugins/MarkdownShortcut/index.js +17 -5
  482. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  483. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +384 -361
  484. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  485. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +223 -160
  486. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  487. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -2
  488. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  489. package/dist/lexical/plugins/SlashMenu/index.js +191 -179
  490. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  491. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -1
  492. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -26
  493. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  494. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +164 -129
  495. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  496. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  497. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +11 -10
  498. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  499. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -1
  500. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +11 -10
  501. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  502. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  503. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +27 -23
  504. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  505. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +331 -300
  506. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  507. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +110 -97
  508. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  509. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  510. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +23 -16
  511. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  512. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
  513. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +18 -27
  514. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  515. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -1
  516. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +15 -11
  517. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  518. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
  519. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +133 -118
  520. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  521. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  522. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +3 -2
  523. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  524. package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -1
  525. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +3 -2
  526. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  527. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  528. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +26 -25
  529. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  530. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  531. package/dist/lexical/theme/EditorTheme.js +97 -102
  532. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  533. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  534. package/dist/lexical/ui/ContentEditable.js +27 -10
  535. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  536. package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -1
  537. package/dist/lexical/ui/icons/AI/index.js +31 -33
  538. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  539. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  540. package/dist/lexical/ui/icons/Add/index.js +16 -18
  541. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  542. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  543. package/dist/lexical/ui/icons/AlignCenter/index.js +25 -28
  544. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  545. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  546. package/dist/lexical/ui/icons/AlignJustify/index.js +25 -28
  547. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  548. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  549. package/dist/lexical/ui/icons/AlignLeft/index.js +25 -28
  550. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  551. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  552. package/dist/lexical/ui/icons/AlignRight/index.js +25 -28
  553. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  554. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  555. package/dist/lexical/ui/icons/Block/index.js +34 -37
  556. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  557. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  558. package/dist/lexical/ui/icons/Blockquote/index.js +16 -15
  559. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  560. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  561. package/dist/lexical/ui/icons/Bold/index.js +16 -15
  562. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  563. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  564. package/dist/lexical/ui/icons/Checklist/index.js +24 -26
  565. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  566. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  567. package/dist/lexical/ui/icons/Code/index.js +19 -21
  568. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  569. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  570. package/dist/lexical/ui/icons/CodeBlock/index.js +19 -21
  571. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  572. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  573. package/dist/lexical/ui/icons/H1/index.js +16 -15
  574. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  575. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  576. package/dist/lexical/ui/icons/H2/index.js +16 -15
  577. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  579. package/dist/lexical/ui/icons/H3/index.js +16 -15
  580. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  582. package/dist/lexical/ui/icons/H4/index.js +16 -15
  583. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  585. package/dist/lexical/ui/icons/H5/index.js +16 -15
  586. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  588. package/dist/lexical/ui/icons/H6/index.js +16 -15
  589. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  591. package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -18
  592. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  593. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  594. package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -32
  595. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  597. package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -32
  598. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  599. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  600. package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -17
  601. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  603. package/dist/lexical/ui/icons/Italic/index.js +16 -15
  604. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  606. package/dist/lexical/ui/icons/Link/index.js +17 -16
  607. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  608. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  609. package/dist/lexical/ui/icons/Meatballs/index.js +19 -22
  610. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  611. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  612. package/dist/lexical/ui/icons/OrderedList/index.js +31 -36
  613. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  615. package/dist/lexical/ui/icons/Relationship/index.js +31 -33
  616. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  617. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  618. package/dist/lexical/ui/icons/Strikethrough/index.js +19 -21
  619. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  620. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  621. package/dist/lexical/ui/icons/Subscript/index.js +16 -15
  622. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  623. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  624. package/dist/lexical/ui/icons/Superscript/index.js +16 -15
  625. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  627. package/dist/lexical/ui/icons/Table/index.js +17 -16
  628. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  629. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  630. package/dist/lexical/ui/icons/Text/index.js +16 -15
  631. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  632. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  633. package/dist/lexical/ui/icons/Underline/index.js +19 -21
  634. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  636. package/dist/lexical/ui/icons/UnorderedList/index.js +46 -52
  637. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  639. package/dist/lexical/ui/icons/Upload/index.js +28 -31
  640. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  641. package/dist/lexical/utils/canUseDOM.d.ts.map +1 -1
  642. package/dist/lexical/utils/canUseDOM.js +2 -1
  643. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  644. package/dist/lexical/utils/environment.d.ts.map +1 -1
  645. package/dist/lexical/utils/environment.js +2 -1
  646. package/dist/lexical/utils/environment.js.map +1 -1
  647. package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -1
  648. package/dist/lexical/utils/getDOMRangeRect.js +13 -12
  649. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  650. package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -1
  651. package/dist/lexical/utils/getSelectedNode.js +18 -13
  652. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  653. package/dist/lexical/utils/guard.d.ts.map +1 -1
  654. package/dist/lexical/utils/guard.js +3 -2
  655. package/dist/lexical/utils/guard.js.map +1 -1
  656. package/dist/lexical/utils/joinClasses.d.ts.map +1 -1
  657. package/dist/lexical/utils/joinClasses.js +3 -2
  658. package/dist/lexical/utils/joinClasses.js.map +1 -1
  659. package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
  660. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  661. package/dist/lexical/utils/nodeFormat.js +58 -59
  662. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  663. package/dist/lexical/utils/point.d.ts.map +1 -1
  664. package/dist/lexical/utils/point.js +40 -32
  665. package/dist/lexical/utils/point.js.map +1 -1
  666. package/dist/lexical/utils/rect.d.ts.map +1 -1
  667. package/dist/lexical/utils/rect.js +167 -134
  668. package/dist/lexical/utils/rect.js.map +1 -1
  669. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  670. package/dist/lexical/utils/setFloatingElemPosition.js +56 -45
  671. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  672. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -1
  673. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +23 -22
  674. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  675. package/dist/lexical/utils/swipe.d.ts.map +1 -1
  676. package/dist/lexical/utils/swipe.js +82 -83
  677. package/dist/lexical/utils/swipe.js.map +1 -1
  678. package/dist/lexical/utils/url.js +23 -22
  679. package/dist/lexical/utils/url.js.map +1 -1
  680. package/dist/nodeTypes.js +1 -2
  681. package/dist/nodeTypes.js.map +1 -1
  682. package/dist/populateGraphQL/defaultValue.js +24 -29
  683. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  684. package/dist/populateGraphQL/populate.js +35 -25
  685. package/dist/populateGraphQL/populate.js.map +1 -1
  686. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +47 -32
  687. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  688. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +39 -25
  689. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  690. package/dist/types.js +1 -2
  691. package/dist/types.js.map +1 -1
  692. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  693. package/dist/utilities/createClientFeature.js +40 -26
  694. package/dist/utilities/createClientFeature.js.map +1 -1
  695. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  696. package/dist/utilities/createServerFeature.js +46 -31
  697. package/dist/utilities/createServerFeature.js.map +1 -1
  698. package/dist/utilities/fieldsDrawer/Drawer.js +28 -17
  699. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  700. package/dist/utilities/fieldsDrawer/DrawerContent.js +149 -78
  701. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  702. package/dist/utilities/forEachNodeRecursively.js +24 -19
  703. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  704. package/dist/utilities/generateComponentMap.js +90 -82
  705. package/dist/utilities/generateComponentMap.js.map +1 -1
  706. package/dist/utilities/generateImportMap.js +53 -47
  707. package/dist/utilities/generateImportMap.js.map +1 -1
  708. package/dist/utilities/generateSchemaMap.js +35 -30
  709. package/dist/utilities/generateSchemaMap.js.map +1 -1
  710. package/dist/utilities/migrateSlateToLexical/index.js +99 -86
  711. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
  712. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +73 -66
  713. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  714. package/dist/utilities/recurseNodeTree.js +25 -22
  715. package/dist/utilities/recurseNodeTree.js.map +1 -1
  716. package/dist/utilities/upgradeLexicalData/index.js +99 -86
  717. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  718. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +71 -66
  719. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  720. package/dist/utilities/useLexicalFeature.js +9 -8
  721. package/dist/utilities/useLexicalFeature.js.map +1 -1
  722. package/dist/validate/index.js +32 -26
  723. package/dist/validate/index.js.map +1 -1
  724. package/dist/validate/validateNodes.js +31 -28
  725. package/dist/validate/validateNodes.js.map +1 -1
  726. package/package.json +22 -11
  727. package/dist/exports/client/Component-7HS6FEJS.js +0 -2
  728. package/dist/exports/client/Component-7HS6FEJS.js.map +0 -7
  729. package/dist/exports/client/Component-LAKSCIDX.js +0 -2
  730. package/dist/exports/client/Component-LAKSCIDX.js.map +0 -7
  731. package/dist/exports/client/Field-BYB3WX7J.js +0 -2
  732. package/dist/exports/client/Field-BYB3WX7J.js.map +0 -7
  733. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +0 -2
  734. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +0 -7
  735. package/dist/exports/client/chunk-4EX7W4UX.js +0 -2
  736. package/dist/exports/client/chunk-4EX7W4UX.js.map +0 -7
  737. package/dist/exports/client/chunk-E4HH5PS6.js +0 -2
  738. package/dist/exports/client/chunk-E4HH5PS6.js.map +0 -7
  739. package/dist/exports/client/chunk-EBB2CEB6.js +0 -2
  740. package/dist/exports/client/chunk-EBB2CEB6.js.map +0 -7
  741. package/dist/exports/client/chunk-LTR7V74A.js +0 -2
  742. package/dist/exports/client/chunk-LTR7V74A.js.map +0 -7
  743. package/dist/exports/client/chunk-SQHN3N6E.js +0 -2
  744. package/dist/exports/client/chunk-VMCQSR3T.js +0 -3
  745. package/dist/exports/client/chunk-VMCQSR3T.js.map +0 -7
  746. package/dist/exports/client/component-6C5JERGA.js +0 -2
  747. package/dist/exports/client/component-6C5JERGA.js.map +0 -7
  748. package/dist/exports/client/component-GUWIGB77.js +0 -2
  749. package/dist/exports/client/component-GUWIGB77.js.map +0 -7
  750. package/dist/exports/client/component-UQ2BKD5X.js +0 -2
  751. package/dist/exports/client/component-UQ2BKD5X.js.map +0 -7
  752. package/dist/exports/client/componentInline-C2XIK5VZ.js +0 -2
  753. package/dist/exports/client/componentInline-C2XIK5VZ.js.map +0 -7
  754. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +0 -12
  755. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  756. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +0 -181
  757. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +0 -1
@@ -2,85 +2,87 @@ import ObjectID from 'bson-objectid';
2
2
  import { DecoratorNode } from 'lexical';
3
3
  import { deepCopyObjectSimple } from 'payload/shared';
4
4
  export class ServerInlineBlockNode extends DecoratorNode {
5
- __fields;
6
- constructor({ fields, key }){
7
- super(key);
8
- this.__fields = fields;
9
- }
10
- static clone(node) {
11
- return new this({
12
- fields: node.__fields,
13
- key: node.__key
14
- });
15
- }
16
- static getType() {
17
- return 'inlineBlock';
18
- }
19
- static importDOM() {
20
- return {};
21
- }
22
- static importJSON(serializedNode) {
23
- const node = $createServerInlineBlockNode(serializedNode.fields);
24
- return node;
25
- }
26
- static isInline() {
27
- return false;
28
- }
29
- canIndent() {
30
- return true;
31
- }
32
- createDOM() {
33
- const element = document.createElement('span');
34
- element.classList.add('inline-block-container');
35
- return element;
36
- }
37
- decorate(editor, config) {
38
- return null;
39
- }
40
- exportDOM() {
41
- const element = document.createElement('span');
42
- element.classList.add('inline-block-container');
43
- const text = document.createTextNode(this.getTextContent());
44
- element.append(text);
45
- return {
46
- element
47
- };
48
- }
49
- exportJSON() {
50
- return {
51
- type: 'inlineBlock',
52
- fields: this.getFields(),
53
- version: 1
54
- };
55
- }
56
- getFields() {
57
- return this.getLatest().__fields;
58
- }
59
- getTextContent() {
60
- return `Block Field`;
61
- }
62
- isInline() {
63
- return true;
64
- }
65
- setFields(fields) {
66
- const fieldsCopy = deepCopyObjectSimple(fields);
67
- const writable = this.getWritable();
68
- writable.__fields = fieldsCopy;
69
- }
70
- updateDOM() {
71
- return false;
72
- }
5
+ __fields;
6
+ constructor({
7
+ fields,
8
+ key
9
+ }) {
10
+ super(key);
11
+ this.__fields = fields;
12
+ }
13
+ static clone(node) {
14
+ return new this({
15
+ fields: node.__fields,
16
+ key: node.__key
17
+ });
18
+ }
19
+ static getType() {
20
+ return 'inlineBlock';
21
+ }
22
+ static importDOM() {
23
+ return {};
24
+ }
25
+ static importJSON(serializedNode) {
26
+ const node = $createServerInlineBlockNode(serializedNode.fields);
27
+ return node;
28
+ }
29
+ static isInline() {
30
+ return false;
31
+ }
32
+ canIndent() {
33
+ return true;
34
+ }
35
+ createDOM() {
36
+ const element = document.createElement('span');
37
+ element.classList.add('inline-block-container');
38
+ return element;
39
+ }
40
+ decorate(editor, config) {
41
+ return null;
42
+ }
43
+ exportDOM() {
44
+ const element = document.createElement('span');
45
+ element.classList.add('inline-block-container');
46
+ const text = document.createTextNode(this.getTextContent());
47
+ element.append(text);
48
+ return {
49
+ element
50
+ };
51
+ }
52
+ exportJSON() {
53
+ return {
54
+ type: 'inlineBlock',
55
+ fields: this.getFields(),
56
+ version: 1
57
+ };
58
+ }
59
+ getFields() {
60
+ return this.getLatest().__fields;
61
+ }
62
+ getTextContent() {
63
+ return `Block Field`;
64
+ }
65
+ isInline() {
66
+ return true;
67
+ }
68
+ setFields(fields) {
69
+ const fieldsCopy = deepCopyObjectSimple(fields);
70
+ const writable = this.getWritable();
71
+ writable.__fields = fieldsCopy;
72
+ }
73
+ updateDOM() {
74
+ return false;
75
+ }
73
76
  }
74
77
  export function $createServerInlineBlockNode(fields) {
75
- return new ServerInlineBlockNode({
76
- fields: {
77
- ...fields,
78
- id: fields?.id || new ObjectID.default().toHexString()
79
- }
80
- });
78
+ return new ServerInlineBlockNode({
79
+ fields: {
80
+ ...fields,
81
+ id: fields?.id || new ObjectID.default().toHexString()
82
+ }
83
+ });
81
84
  }
82
85
  export function $isServerInlineBlockNode(node) {
83
- return node instanceof ServerInlineBlockNode;
86
+ return node instanceof ServerInlineBlockNode;
84
87
  }
85
-
86
88
  //# sourceMappingURL=InlineBlocksNode.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/blocks/server/nodes/InlineBlocksNode.tsx"],"sourcesContent":["import type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n SerializedLexicalNode,\n Spread,\n} from 'lexical'\nimport type React from 'react'\nimport type { JSX } from 'react'\n\nimport ObjectID from 'bson-objectid'\nimport { DecoratorNode } from 'lexical'\nimport { deepCopyObjectSimple } from 'payload/shared'\n\nexport type InlineBlockFields = {\n /** Block form data */\n [key: string]: any\n //blockName: string\n blockType: string\n id: string\n}\n\nexport type SerializedServerInlineBlockNode = Spread<\n {\n children?: never // required so that our typed editor state doesn't automatically add children\n fields: InlineBlockFields\n type: 'inlineBlock'\n },\n SerializedLexicalNode\n>\n\nexport class ServerInlineBlockNode extends DecoratorNode<React.ReactElement> {\n __fields: InlineBlockFields\n\n constructor({ fields, key }: { fields: InlineBlockFields; key?: NodeKey }) {\n super(key)\n this.__fields = fields\n }\n\n static clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return new this({\n fields: node.__fields,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'inlineBlock'\n }\n\n static importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static importJSON(serializedNode: SerializedServerInlineBlockNode): ServerInlineBlockNode {\n const node = $createServerInlineBlockNode(serializedNode.fields)\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n canIndent() {\n return true\n }\n createDOM() {\n const element = document.createElement('span')\n element.classList.add('inline-block-container')\n\n return element\n }\n\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return null\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('span')\n element.classList.add('inline-block-container')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n exportJSON(): SerializedServerInlineBlockNode {\n return {\n type: 'inlineBlock',\n fields: this.getFields(),\n version: 1,\n }\n }\n\n getFields(): InlineBlockFields {\n return this.getLatest().__fields\n }\n\n getTextContent(): string {\n return `Block Field`\n }\n\n isInline() {\n return true\n }\n\n setFields(fields: InlineBlockFields): void {\n const fieldsCopy = deepCopyObjectSimple(fields)\n\n const writable = this.getWritable()\n writable.__fields = fieldsCopy\n }\n\n updateDOM(): boolean {\n return false\n }\n}\n\nexport function $createServerInlineBlockNode(\n fields: Exclude<InlineBlockFields, 'id'>,\n): ServerInlineBlockNode {\n return new ServerInlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isServerInlineBlockNode(\n node: LexicalNode | ServerInlineBlockNode | null | undefined,\n): node is ServerInlineBlockNode {\n return node instanceof ServerInlineBlockNode\n}\n"],"names":["ObjectID","DecoratorNode","deepCopyObjectSimple","ServerInlineBlockNode","__fields","constructor","fields","key","clone","node","__key","getType","importDOM","importJSON","serializedNode","$createServerInlineBlockNode","isInline","canIndent","createDOM","element","document","createElement","classList","add","decorate","editor","config","exportDOM","text","createTextNode","getTextContent","append","exportJSON","type","getFields","version","getLatest","setFields","fieldsCopy","writable","getWritable","updateDOM","id","default","toHexString","$isServerInlineBlockNode"],"mappings":"AAaA,OAAOA,cAAc,gBAAe;AACpC,SAASC,aAAa,QAAQ,UAAS;AACvC,SAASC,oBAAoB,QAAQ,iBAAgB;AAmBrD,OAAO,MAAMC,8BAA8BF;IACzCG,SAA2B;IAE3BC,YAAY,EAAEC,MAAM,EAAEC,GAAG,EAAgD,CAAE;QACzE,KAAK,CAACA;QACN,IAAI,CAACH,QAAQ,GAAGE;IAClB;IAEA,OAAOE,MAAMC,IAA2B,EAAyB;QAC/D,OAAO,IAAI,IAAI,CAAC;YACdH,QAAQG,KAAKL,QAAQ;YACrBG,KAAKE,KAAKC,KAAK;QACjB;IACF;IAEA,OAAOC,UAAkB;QACvB,OAAO;IACT;IAEA,OAAOC,YAAqD;QAC1D,OAAO,CAAC;IACV;IAEA,OAAOC,WAAWC,cAA+C,EAAyB;QACxF,MAAML,OAAOM,6BAA6BD,eAAeR,MAAM;QAC/D,OAAOG;IACT;IAEA,OAAOO,WAAkB;QACvB,OAAO;IACT;IAEAC,YAAY;QACV,OAAO;IACT;IACAC,YAAY;QACV,MAAMC,UAAUC,SAASC,aAAa,CAAC;QACvCF,QAAQG,SAAS,CAACC,GAAG,CAAC;QAEtB,OAAOJ;IACT;IAEAK,SAASC,MAAqB,EAAEC,MAAoB,EAAe;QACjE,OAAO;IACT;IAEAC,YAA6B;QAC3B,MAAMR,UAAUC,SAASC,aAAa,CAAC;QACvCF,QAAQG,SAAS,CAACC,GAAG,CAAC;QAEtB,MAAMK,OAAOR,SAASS,cAAc,CAAC,IAAI,CAACC,cAAc;QACxDX,QAAQY,MAAM,CAACH;QACf,OAAO;YAAET;QAAQ;IACnB;IAEAa,aAA8C;QAC5C,OAAO;YACLC,MAAM;YACN3B,QAAQ,IAAI,CAAC4B,SAAS;YACtBC,SAAS;QACX;IACF;IAEAD,YAA+B;QAC7B,OAAO,IAAI,CAACE,SAAS,GAAGhC,QAAQ;IAClC;IAEA0B,iBAAyB;QACvB,OAAO,CAAC,WAAW,CAAC;IACtB;IAEAd,WAAW;QACT,OAAO;IACT;IAEAqB,UAAU/B,MAAyB,EAAQ;QACzC,MAAMgC,aAAapC,qBAAqBI;QAExC,MAAMiC,WAAW,IAAI,CAACC,WAAW;QACjCD,SAASnC,QAAQ,GAAGkC;IACtB;IAEAG,YAAqB;QACnB,OAAO;IACT;AACF;AAEA,OAAO,SAAS1B,6BACdT,MAAwC;IAExC,OAAO,IAAIH,sBAAsB;QAC/BG,QAAQ;YACN,GAAGA,MAAM;YACToC,IAAIpC,QAAQoC,MAAM,IAAI1C,SAAS2C,OAAO,GAAGC,WAAW;QACtD;IACF;AACF;AAEA,OAAO,SAASC,yBACdpC,IAA4D;IAE5D,OAAOA,gBAAgBN;AACzB"}
1
+ {"version":3,"file":"InlineBlocksNode.js","names":["ObjectID","DecoratorNode","deepCopyObjectSimple","ServerInlineBlockNode","__fields","constructor","fields","key","clone","node","__key","getType","importDOM","importJSON","serializedNode","$createServerInlineBlockNode","isInline","canIndent","createDOM","element","document","createElement","classList","add","decorate","editor","config","exportDOM","text","createTextNode","getTextContent","append","exportJSON","type","getFields","version","getLatest","setFields","fieldsCopy","writable","getWritable","updateDOM","id","default","toHexString","$isServerInlineBlockNode"],"sources":["../../../../../src/features/blocks/server/nodes/InlineBlocksNode.tsx"],"sourcesContent":["import type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n SerializedLexicalNode,\n Spread,\n} from 'lexical'\nimport type React from 'react'\nimport type { JSX } from 'react'\n\nimport ObjectID from 'bson-objectid'\nimport { DecoratorNode } from 'lexical'\nimport { deepCopyObjectSimple } from 'payload/shared'\n\nexport type InlineBlockFields = {\n /** Block form data */\n [key: string]: any\n //blockName: string\n blockType: string\n id: string\n}\n\nexport type SerializedServerInlineBlockNode = Spread<\n {\n children?: never // required so that our typed editor state doesn't automatically add children\n fields: InlineBlockFields\n type: 'inlineBlock'\n },\n SerializedLexicalNode\n>\n\nexport class ServerInlineBlockNode extends DecoratorNode<React.ReactElement> {\n __fields: InlineBlockFields\n\n constructor({ fields, key }: { fields: InlineBlockFields; key?: NodeKey }) {\n super(key)\n this.__fields = fields\n }\n\n static clone(node: ServerInlineBlockNode): ServerInlineBlockNode {\n return new this({\n fields: node.__fields,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'inlineBlock'\n }\n\n static importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static importJSON(serializedNode: SerializedServerInlineBlockNode): ServerInlineBlockNode {\n const node = $createServerInlineBlockNode(serializedNode.fields)\n return node\n }\n\n static isInline(): false {\n return false\n }\n\n canIndent() {\n return true\n }\n createDOM() {\n const element = document.createElement('span')\n element.classList.add('inline-block-container')\n\n return element\n }\n\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return null\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('span')\n element.classList.add('inline-block-container')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n exportJSON(): SerializedServerInlineBlockNode {\n return {\n type: 'inlineBlock',\n fields: this.getFields(),\n version: 1,\n }\n }\n\n getFields(): InlineBlockFields {\n return this.getLatest().__fields\n }\n\n getTextContent(): string {\n return `Block Field`\n }\n\n isInline() {\n return true\n }\n\n setFields(fields: InlineBlockFields): void {\n const fieldsCopy = deepCopyObjectSimple(fields)\n\n const writable = this.getWritable()\n writable.__fields = fieldsCopy\n }\n\n updateDOM(): boolean {\n return false\n }\n}\n\nexport function $createServerInlineBlockNode(\n fields: Exclude<InlineBlockFields, 'id'>,\n): ServerInlineBlockNode {\n return new ServerInlineBlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isServerInlineBlockNode(\n node: LexicalNode | ServerInlineBlockNode | null | undefined,\n): node is ServerInlineBlockNode {\n return node instanceof ServerInlineBlockNode\n}\n"],"mappings":"AAaA,OAAOA,QAAA,MAAc;AACrB,SAASC,aAAa,QAAQ;AAC9B,SAASC,oBAAoB,QAAQ;AAmBrC,OAAO,MAAMC,qBAAA,SAA8BF,aAAA;EACzCG,QAAA;EAEAC,YAAY;IAAEC,MAAM;IAAEC;EAAG,CAAgD,EAAE;IACzE,KAAK,CAACA,GAAA;IACN,IAAI,CAACH,QAAQ,GAAGE,MAAA;EAClB;EAEA,OAAOE,MAAMC,IAA2B,EAAyB;IAC/D,OAAO,IAAI,IAAI,CAAC;MACdH,MAAA,EAAQG,IAAA,CAAKL,QAAQ;MACrBG,GAAA,EAAKE,IAAA,CAAKC;IACZ;EACF;EAEA,OAAOC,QAAA,EAAkB;IACvB,OAAO;EACT;EAEA,OAAOC,UAAA,EAAqD;IAC1D,OAAO,CAAC;EACV;EAEA,OAAOC,WAAWC,cAA+C,EAAyB;IACxF,MAAML,IAAA,GAAOM,4BAAA,CAA6BD,cAAA,CAAeR,MAAM;IAC/D,OAAOG,IAAA;EACT;EAEA,OAAOO,SAAA,EAAkB;IACvB,OAAO;EACT;EAEAC,UAAA,EAAY;IACV,OAAO;EACT;EACAC,UAAA,EAAY;IACV,MAAMC,OAAA,GAAUC,QAAA,CAASC,aAAa,CAAC;IACvCF,OAAA,CAAQG,SAAS,CAACC,GAAG,CAAC;IAEtB,OAAOJ,OAAA;EACT;EAEAK,SAASC,MAAqB,EAAEC,MAAoB,EAAe;IACjE,OAAO;EACT;EAEAC,UAAA,EAA6B;IAC3B,MAAMR,OAAA,GAAUC,QAAA,CAASC,aAAa,CAAC;IACvCF,OAAA,CAAQG,SAAS,CAACC,GAAG,CAAC;IAEtB,MAAMK,IAAA,GAAOR,QAAA,CAASS,cAAc,CAAC,IAAI,CAACC,cAAc;IACxDX,OAAA,CAAQY,MAAM,CAACH,IAAA;IACf,OAAO;MAAET;IAAQ;EACnB;EAEAa,WAAA,EAA8C;IAC5C,OAAO;MACLC,IAAA,EAAM;MACN3B,MAAA,EAAQ,IAAI,CAAC4B,SAAS;MACtBC,OAAA,EAAS;IACX;EACF;EAEAD,UAAA,EAA+B;IAC7B,OAAO,IAAI,CAACE,SAAS,GAAGhC,QAAQ;EAClC;EAEA0B,eAAA,EAAyB;IACvB,OAAO,aAAa;EACtB;EAEAd,SAAA,EAAW;IACT,OAAO;EACT;EAEAqB,UAAU/B,MAAyB,EAAQ;IACzC,MAAMgC,UAAA,GAAapC,oBAAA,CAAqBI,MAAA;IAExC,MAAMiC,QAAA,GAAW,IAAI,CAACC,WAAW;IACjCD,QAAA,CAASnC,QAAQ,GAAGkC,UAAA;EACtB;EAEAG,UAAA,EAAqB;IACnB,OAAO;EACT;AACF;AAEA,OAAO,SAAS1B,6BACdT,MAAwC;EAExC,OAAO,IAAIH,qBAAA,CAAsB;IAC/BG,MAAA,EAAQ;MACN,GAAGA,MAAM;MACToC,EAAA,EAAIpC,MAAA,EAAQoC,EAAA,IAAM,IAAI1C,QAAA,CAAS2C,OAAO,GAAGC,WAAW;IACtD;EACF;AACF;AAEA,OAAO,SAASC,yBACdpC,IAA4D;EAE5D,OAAOA,IAAA,YAAgBN,qBAAA;AACzB","ignoreList":[]}
@@ -1,37 +1,48 @@
1
1
  import { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema';
2
- export const blockValidationHOC = (blocks)=>{
3
- return async ({ node, validation })=>{
4
- const blockFieldData = node.fields ?? {};
5
- const { options: { id, collectionSlug, operation, preferences, req } } = validation;
6
- // find block
7
- const block = blocks.find((block)=>block.slug === blockFieldData.blockType);
8
- // validate block
9
- if (!block) {
10
- return 'Block not found';
11
- }
12
- /**
13
- * Run buildStateFromSchema as that properly validates block and block sub-fields
14
- */ const result = await buildStateFromSchema({
15
- id,
16
- collectionSlug,
17
- data: blockFieldData,
18
- fieldSchema: block.fields,
19
- operation: operation === 'create' || operation === 'update' ? operation : 'update',
20
- preferences,
21
- req,
22
- siblingData: blockFieldData
23
- });
24
- let errorPaths = [];
25
- for(const fieldKey in result){
26
- if (result[fieldKey].errorPaths) {
27
- errorPaths = errorPaths.concat(result[fieldKey].errorPaths);
28
- }
29
- }
30
- if (errorPaths.length) {
31
- return 'The following fields are invalid: ' + errorPaths.join(', ');
32
- }
33
- return true;
34
- };
2
+ export const blockValidationHOC = blocks => {
3
+ return async ({
4
+ node,
5
+ validation
6
+ }) => {
7
+ const blockFieldData = node.fields ?? {};
8
+ const {
9
+ options: {
10
+ id,
11
+ collectionSlug,
12
+ operation,
13
+ preferences,
14
+ req
15
+ }
16
+ } = validation;
17
+ // find block
18
+ const block = blocks.find(block => block.slug === blockFieldData.blockType);
19
+ // validate block
20
+ if (!block) {
21
+ return 'Block not found';
22
+ }
23
+ /**
24
+ * Run buildStateFromSchema as that properly validates block and block sub-fields
25
+ */
26
+ const result = await buildStateFromSchema({
27
+ id,
28
+ collectionSlug,
29
+ data: blockFieldData,
30
+ fieldSchema: block.fields,
31
+ operation: operation === 'create' || operation === 'update' ? operation : 'update',
32
+ preferences,
33
+ req,
34
+ siblingData: blockFieldData
35
+ });
36
+ let errorPaths = [];
37
+ for (const fieldKey in result) {
38
+ if (result[fieldKey].errorPaths) {
39
+ errorPaths = errorPaths.concat(result[fieldKey].errorPaths);
40
+ }
41
+ }
42
+ if (errorPaths.length) {
43
+ return 'The following fields are invalid: ' + errorPaths.join(', ');
44
+ }
45
+ return true;
46
+ };
35
47
  };
36
-
37
48
  //# sourceMappingURL=validate.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/server/validate.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { SerializedInlineBlockNode } from '../client/nodes/InlineBlocksNode.js'\nimport type { BlockFields, SerializedBlockNode } from './nodes/BlocksNode.js'\n\nexport const blockValidationHOC = (\n blocks: Block[],\n): NodeValidation<SerializedBlockNode | SerializedInlineBlockNode> => {\n return async ({ node, validation }) => {\n const blockFieldData = node.fields ?? ({} as BlockFields)\n\n const {\n options: { id, collectionSlug, operation, preferences, req },\n } = validation\n\n // find block\n const block = blocks.find((block) => block.slug === blockFieldData.blockType)\n\n // validate block\n if (!block) {\n return 'Block not found'\n }\n\n /**\n * Run buildStateFromSchema as that properly validates block and block sub-fields\n */\n\n const result = await buildStateFromSchema({\n id,\n collectionSlug,\n data: blockFieldData,\n fieldSchema: block.fields,\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n preferences,\n req,\n siblingData: blockFieldData,\n })\n\n let errorPaths = []\n for (const fieldKey in result) {\n if (result[fieldKey].errorPaths) {\n errorPaths = errorPaths.concat(result[fieldKey].errorPaths)\n }\n }\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"names":["buildStateFromSchema","blockValidationHOC","blocks","node","validation","blockFieldData","fields","options","id","collectionSlug","operation","preferences","req","block","find","slug","blockType","result","data","fieldSchema","siblingData","errorPaths","fieldKey","concat","length","join"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ,4CAA2C;AAMhF,OAAO,MAAMC,qBAAqB,CAChCC;IAEA,OAAO,OAAO,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAChC,MAAMC,iBAAiBF,KAAKG,MAAM,IAAK,CAAC;QAExC,MAAM,EACJC,SAAS,EAAEC,EAAE,EAAEC,cAAc,EAAEC,SAAS,EAAEC,WAAW,EAAEC,GAAG,EAAE,EAC7D,GAAGR;QAEJ,aAAa;QACb,MAAMS,QAAQX,OAAOY,IAAI,CAAC,CAACD,QAAUA,MAAME,IAAI,KAAKV,eAAeW,SAAS;QAE5E,iBAAiB;QACjB,IAAI,CAACH,OAAO;YACV,OAAO;QACT;QAEA;;KAEC,GAED,MAAMI,SAAS,MAAMjB,qBAAqB;YACxCQ;YACAC;YACAS,MAAMb;YACNc,aAAaN,MAAMP,MAAM;YACzBI,WAAWA,cAAc,YAAYA,cAAc,WAAWA,YAAY;YAC1EC;YACAC;YACAQ,aAAaf;QACf;QAEA,IAAIgB,aAAa,EAAE;QACnB,IAAK,MAAMC,YAAYL,OAAQ;YAC7B,IAAIA,MAAM,CAACK,SAAS,CAACD,UAAU,EAAE;gBAC/BA,aAAaA,WAAWE,MAAM,CAACN,MAAM,CAACK,SAAS,CAACD,UAAU;YAC5D;QACF;QAEA,IAAIA,WAAWG,MAAM,EAAE;YACrB,OAAO,uCAAuCH,WAAWI,IAAI,CAAC;QAChE;QAEA,OAAO;IACT;AACF,EAAC"}
1
+ {"version":3,"file":"validate.js","names":["buildStateFromSchema","blockValidationHOC","blocks","node","validation","blockFieldData","fields","options","id","collectionSlug","operation","preferences","req","block","find","slug","blockType","result","data","fieldSchema","siblingData","errorPaths","fieldKey","concat","length","join"],"sources":["../../../../src/features/blocks/server/validate.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { SerializedInlineBlockNode } from '../client/nodes/InlineBlocksNode.js'\nimport type { BlockFields, SerializedBlockNode } from './nodes/BlocksNode.js'\n\nexport const blockValidationHOC = (\n blocks: Block[],\n): NodeValidation<SerializedBlockNode | SerializedInlineBlockNode> => {\n return async ({ node, validation }) => {\n const blockFieldData = node.fields ?? ({} as BlockFields)\n\n const {\n options: { id, collectionSlug, operation, preferences, req },\n } = validation\n\n // find block\n const block = blocks.find((block) => block.slug === blockFieldData.blockType)\n\n // validate block\n if (!block) {\n return 'Block not found'\n }\n\n /**\n * Run buildStateFromSchema as that properly validates block and block sub-fields\n */\n\n const result = await buildStateFromSchema({\n id,\n collectionSlug,\n data: blockFieldData,\n fieldSchema: block.fields,\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n preferences,\n req,\n siblingData: blockFieldData,\n })\n\n let errorPaths = []\n for (const fieldKey in result) {\n if (result[fieldKey].errorPaths) {\n errorPaths = errorPaths.concat(result[fieldKey].errorPaths)\n }\n }\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAMrC,OAAO,MAAMC,kBAAA,GACXC,MAAA;EAEA,OAAO,OAAO;IAAEC,IAAI;IAAEC;EAAU,CAAE;IAChC,MAAMC,cAAA,GAAiBF,IAAA,CAAKG,MAAM,IAAK,CAAC;IAExC,MAAM;MACJC,OAAA,EAAS;QAAEC,EAAE;QAAEC,cAAc;QAAEC,SAAS;QAAEC,WAAW;QAAEC;MAAG;IAAE,CAC7D,GAAGR,UAAA;IAEJ;IACA,MAAMS,KAAA,GAAQX,MAAA,CAAOY,IAAI,CAAED,KAAA,IAAUA,KAAA,CAAME,IAAI,KAAKV,cAAA,CAAeW,SAAS;IAE5E;IACA,IAAI,CAACH,KAAA,EAAO;MACV,OAAO;IACT;IAEA;;;IAIA,MAAMI,MAAA,GAAS,MAAMjB,oBAAA,CAAqB;MACxCQ,EAAA;MACAC,cAAA;MACAS,IAAA,EAAMb,cAAA;MACNc,WAAA,EAAaN,KAAA,CAAMP,MAAM;MACzBI,SAAA,EAAWA,SAAA,KAAc,YAAYA,SAAA,KAAc,WAAWA,SAAA,GAAY;MAC1EC,WAAA;MACAC,GAAA;MACAQ,WAAA,EAAaf;IACf;IAEA,IAAIgB,UAAA,GAAa,EAAE;IACnB,KAAK,MAAMC,QAAA,IAAYL,MAAA,EAAQ;MAC7B,IAAIA,MAAM,CAACK,QAAA,CAAS,CAACD,UAAU,EAAE;QAC/BA,UAAA,GAAaA,UAAA,CAAWE,MAAM,CAACN,MAAM,CAACK,QAAA,CAAS,CAACD,UAAU;MAC5D;IACF;IAEA,IAAIA,UAAA,CAAWG,MAAM,EAAE;MACrB,OAAO,uCAAuCH,UAAA,CAAWI,IAAI,CAAC;IAChE;IAEA,OAAO;EACT;AACF","ignoreList":[]}
@@ -1,10 +1,7 @@
1
1
  export const LinebreakHTMLConverter = {
2
- converter () {
3
- return `<br>`;
4
- },
5
- nodeTypes: [
6
- 'linebreak'
7
- ]
2
+ converter() {
3
+ return `<br>`;
4
+ },
5
+ nodeTypes: ['linebreak']
8
6
  };
9
-
10
7
  //# sourceMappingURL=linebreak.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/html/converter/converters/linebreak.ts"],"sourcesContent":["import type { SerializedParagraphNode } from 'lexical'\n\nimport type { HTMLConverter } from '../types.js'\n\nexport const LinebreakHTMLConverter: HTMLConverter<SerializedParagraphNode> = {\n converter() {\n return `<br>`\n },\n nodeTypes: ['linebreak'],\n}\n"],"names":["LinebreakHTMLConverter","converter","nodeTypes"],"mappings":"AAIA,OAAO,MAAMA,yBAAiE;IAC5EC;QACE,OAAO,CAAC,IAAI,CAAC;IACf;IACAC,WAAW;QAAC;KAAY;AAC1B,EAAC"}
1
+ {"version":3,"file":"linebreak.js","names":["LinebreakHTMLConverter","converter","nodeTypes"],"sources":["../../../../../../src/features/converters/html/converter/converters/linebreak.ts"],"sourcesContent":["import type { SerializedParagraphNode } from 'lexical'\n\nimport type { HTMLConverter } from '../types.js'\n\nexport const LinebreakHTMLConverter: HTMLConverter<SerializedParagraphNode> = {\n converter() {\n return `<br>`\n },\n nodeTypes: ['linebreak'],\n}\n"],"mappings":"AAIA,OAAO,MAAMA,sBAAA,GAAiE;EAC5EC,UAAA;IACE,OAAO,MAAM;EACf;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,23 +1,28 @@
1
1
  import { convertLexicalNodesToHTML } from '../index.js';
2
2
  export const ParagraphHTMLConverter = {
3
- async converter ({ converters, draft, node, overrideAccess, parent, req, showHiddenFields }) {
4
- const childrenText = await convertLexicalNodesToHTML({
5
- converters,
6
- draft,
7
- lexicalNodes: node.children,
8
- overrideAccess,
9
- parent: {
10
- ...node,
11
- parent
12
- },
13
- req,
14
- showHiddenFields
15
- });
16
- return `<p>${childrenText}</p>`;
17
- },
18
- nodeTypes: [
19
- 'paragraph'
20
- ]
3
+ async converter({
4
+ converters,
5
+ draft,
6
+ node,
7
+ overrideAccess,
8
+ parent,
9
+ req,
10
+ showHiddenFields
11
+ }) {
12
+ const childrenText = await convertLexicalNodesToHTML({
13
+ converters,
14
+ draft,
15
+ lexicalNodes: node.children,
16
+ overrideAccess,
17
+ parent: {
18
+ ...node,
19
+ parent
20
+ },
21
+ req,
22
+ showHiddenFields
23
+ });
24
+ return `<p>${childrenText}</p>`;
25
+ },
26
+ nodeTypes: ['paragraph']
21
27
  };
22
-
23
28
  //# sourceMappingURL=paragraph.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/html/converter/converters/paragraph.ts"],"sourcesContent":["import type { SerializedParagraphNode } from 'lexical'\n\nimport type { HTMLConverter } from '../types.js'\n\nimport { convertLexicalNodesToHTML } from '../index.js'\n\nexport const ParagraphHTMLConverter: HTMLConverter<SerializedParagraphNode> = {\n async converter({ converters, draft, node, overrideAccess, parent, req, showHiddenFields }) {\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 return `<p>${childrenText}</p>`\n },\n nodeTypes: ['paragraph'],\n}\n"],"names":["convertLexicalNodesToHTML","ParagraphHTMLConverter","converter","converters","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","nodeTypes"],"mappings":"AAIA,SAASA,yBAAyB,QAAQ,cAAa;AAEvD,OAAO,MAAMC,yBAAiE;IAC5E,MAAMC,WAAU,EAAEC,UAAU,EAAEC,KAAK,EAAEC,IAAI,EAAEC,cAAc,EAAEC,MAAM,EAAEC,GAAG,EAAEC,gBAAgB,EAAE;QACxF,MAAMC,eAAe,MAAMV,0BAA0B;YACnDG;YACAC;YACAO,cAAcN,KAAKO,QAAQ;YAC3BN;YACAC,QAAQ;gBACN,GAAGF,IAAI;gBACPE;YACF;YACAC;YACAC;QACF;QACA,OAAO,CAAC,GAAG,EAAEC,aAAa,IAAI,CAAC;IACjC;IACAG,WAAW;QAAC;KAAY;AAC1B,EAAC"}
1
+ {"version":3,"file":"paragraph.js","names":["convertLexicalNodesToHTML","ParagraphHTMLConverter","converter","converters","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","nodeTypes"],"sources":["../../../../../../src/features/converters/html/converter/converters/paragraph.ts"],"sourcesContent":["import type { SerializedParagraphNode } from 'lexical'\n\nimport type { HTMLConverter } from '../types.js'\n\nimport { convertLexicalNodesToHTML } from '../index.js'\n\nexport const ParagraphHTMLConverter: HTMLConverter<SerializedParagraphNode> = {\n async converter({ converters, draft, node, overrideAccess, parent, req, showHiddenFields }) {\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 return `<p>${childrenText}</p>`\n },\n nodeTypes: ['paragraph'],\n}\n"],"mappings":"AAIA,SAASA,yBAAyB,QAAQ;AAE1C,OAAO,MAAMC,sBAAA,GAAiE;EAC5E,MAAMC,UAAU;IAAEC,UAAU;IAAEC,KAAK;IAAEC,IAAI;IAAEC,cAAc;IAAEC,MAAM;IAAEC,GAAG;IAAEC;EAAgB,CAAE;IACxF,MAAMC,YAAA,GAAe,MAAMV,yBAAA,CAA0B;MACnDG,UAAA;MACAC,KAAA;MACAO,YAAA,EAAcN,IAAA,CAAKO,QAAQ;MAC3BN,cAAA;MACAC,MAAA,EAAQ;QACN,GAAGF,IAAI;QACPE;MACF;MACAC,GAAA;MACAC;IACF;IACA,OAAO,MAAMC,YAAA,MAAkB;EACjC;EACAG,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,33 +1,32 @@
1
1
  import { NodeFormat } from '../../../../../lexical/utils/nodeFormat.js';
2
2
  export const TextHTMLConverter = {
3
- converter ({ node }) {
4
- let text = node.text;
5
- if (node.format & NodeFormat.IS_BOLD) {
6
- text = `<strong>${text}</strong>`;
7
- }
8
- if (node.format & NodeFormat.IS_ITALIC) {
9
- text = `<em>${text}</em>`;
10
- }
11
- if (node.format & NodeFormat.IS_STRIKETHROUGH) {
12
- text = `<span style="text-decoration: line-through">${text}</span>`;
13
- }
14
- if (node.format & NodeFormat.IS_UNDERLINE) {
15
- text = `<span style="text-decoration: underline">${text}</span>`;
16
- }
17
- if (node.format & NodeFormat.IS_CODE) {
18
- text = `<code>${text}</code>`;
19
- }
20
- if (node.format & NodeFormat.IS_SUBSCRIPT) {
21
- text = `<sub>${text}</sub>`;
22
- }
23
- if (node.format & NodeFormat.IS_SUPERSCRIPT) {
24
- text = `<sup>${text}</sup>`;
25
- }
26
- return text;
27
- },
28
- nodeTypes: [
29
- 'text'
30
- ]
3
+ converter({
4
+ node
5
+ }) {
6
+ let text = node.text;
7
+ if (node.format & NodeFormat.IS_BOLD) {
8
+ text = `<strong>${text}</strong>`;
9
+ }
10
+ if (node.format & NodeFormat.IS_ITALIC) {
11
+ text = `<em>${text}</em>`;
12
+ }
13
+ if (node.format & NodeFormat.IS_STRIKETHROUGH) {
14
+ text = `<span style="text-decoration: line-through">${text}</span>`;
15
+ }
16
+ if (node.format & NodeFormat.IS_UNDERLINE) {
17
+ text = `<span style="text-decoration: underline">${text}</span>`;
18
+ }
19
+ if (node.format & NodeFormat.IS_CODE) {
20
+ text = `<code>${text}</code>`;
21
+ }
22
+ if (node.format & NodeFormat.IS_SUBSCRIPT) {
23
+ text = `<sub>${text}</sub>`;
24
+ }
25
+ if (node.format & NodeFormat.IS_SUPERSCRIPT) {
26
+ text = `<sup>${text}</sup>`;
27
+ }
28
+ return text;
29
+ },
30
+ nodeTypes: ['text']
31
31
  };
32
-
33
32
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/html/converter/converters/text.ts"],"sourcesContent":["import type { SerializedTextNode } from 'lexical'\n\nimport type { HTMLConverter } from '../types.js'\n\nimport { NodeFormat } from '../../../../../lexical/utils/nodeFormat.js'\n\nexport const TextHTMLConverter: HTMLConverter<SerializedTextNode> = {\n converter({ node }) {\n let text = node.text\n\n if (node.format & NodeFormat.IS_BOLD) {\n text = `<strong>${text}</strong>`\n }\n if (node.format & NodeFormat.IS_ITALIC) {\n text = `<em>${text}</em>`\n }\n if (node.format & NodeFormat.IS_STRIKETHROUGH) {\n text = `<span style=\"text-decoration: line-through\">${text}</span>`\n }\n if (node.format & NodeFormat.IS_UNDERLINE) {\n text = `<span style=\"text-decoration: underline\">${text}</span>`\n }\n if (node.format & NodeFormat.IS_CODE) {\n text = `<code>${text}</code>`\n }\n if (node.format & NodeFormat.IS_SUBSCRIPT) {\n text = `<sub>${text}</sub>`\n }\n if (node.format & NodeFormat.IS_SUPERSCRIPT) {\n text = `<sup>${text}</sup>`\n }\n\n return text\n },\n nodeTypes: ['text'],\n}\n"],"names":["NodeFormat","TextHTMLConverter","converter","node","text","format","IS_BOLD","IS_ITALIC","IS_STRIKETHROUGH","IS_UNDERLINE","IS_CODE","IS_SUBSCRIPT","IS_SUPERSCRIPT","nodeTypes"],"mappings":"AAIA,SAASA,UAAU,QAAQ,6CAA4C;AAEvE,OAAO,MAAMC,oBAAuD;IAClEC,WAAU,EAAEC,IAAI,EAAE;QAChB,IAAIC,OAAOD,KAAKC,IAAI;QAEpB,IAAID,KAAKE,MAAM,GAAGL,WAAWM,OAAO,EAAE;YACpCF,OAAO,CAAC,QAAQ,EAAEA,KAAK,SAAS,CAAC;QACnC;QACA,IAAID,KAAKE,MAAM,GAAGL,WAAWO,SAAS,EAAE;YACtCH,OAAO,CAAC,IAAI,EAAEA,KAAK,KAAK,CAAC;QAC3B;QACA,IAAID,KAAKE,MAAM,GAAGL,WAAWQ,gBAAgB,EAAE;YAC7CJ,OAAO,CAAC,4CAA4C,EAAEA,KAAK,OAAO,CAAC;QACrE;QACA,IAAID,KAAKE,MAAM,GAAGL,WAAWS,YAAY,EAAE;YACzCL,OAAO,CAAC,yCAAyC,EAAEA,KAAK,OAAO,CAAC;QAClE;QACA,IAAID,KAAKE,MAAM,GAAGL,WAAWU,OAAO,EAAE;YACpCN,OAAO,CAAC,MAAM,EAAEA,KAAK,OAAO,CAAC;QAC/B;QACA,IAAID,KAAKE,MAAM,GAAGL,WAAWW,YAAY,EAAE;YACzCP,OAAO,CAAC,KAAK,EAAEA,KAAK,MAAM,CAAC;QAC7B;QACA,IAAID,KAAKE,MAAM,GAAGL,WAAWY,cAAc,EAAE;YAC3CR,OAAO,CAAC,KAAK,EAAEA,KAAK,MAAM,CAAC;QAC7B;QAEA,OAAOA;IACT;IACAS,WAAW;QAAC;KAAO;AACrB,EAAC"}
1
+ {"version":3,"file":"text.js","names":["NodeFormat","TextHTMLConverter","converter","node","text","format","IS_BOLD","IS_ITALIC","IS_STRIKETHROUGH","IS_UNDERLINE","IS_CODE","IS_SUBSCRIPT","IS_SUPERSCRIPT","nodeTypes"],"sources":["../../../../../../src/features/converters/html/converter/converters/text.ts"],"sourcesContent":["import type { SerializedTextNode } from 'lexical'\n\nimport type { HTMLConverter } from '../types.js'\n\nimport { NodeFormat } from '../../../../../lexical/utils/nodeFormat.js'\n\nexport const TextHTMLConverter: HTMLConverter<SerializedTextNode> = {\n converter({ node }) {\n let text = node.text\n\n if (node.format & NodeFormat.IS_BOLD) {\n text = `<strong>${text}</strong>`\n }\n if (node.format & NodeFormat.IS_ITALIC) {\n text = `<em>${text}</em>`\n }\n if (node.format & NodeFormat.IS_STRIKETHROUGH) {\n text = `<span style=\"text-decoration: line-through\">${text}</span>`\n }\n if (node.format & NodeFormat.IS_UNDERLINE) {\n text = `<span style=\"text-decoration: underline\">${text}</span>`\n }\n if (node.format & NodeFormat.IS_CODE) {\n text = `<code>${text}</code>`\n }\n if (node.format & NodeFormat.IS_SUBSCRIPT) {\n text = `<sub>${text}</sub>`\n }\n if (node.format & NodeFormat.IS_SUPERSCRIPT) {\n text = `<sup>${text}</sup>`\n }\n\n return text\n },\n nodeTypes: ['text'],\n}\n"],"mappings":"AAIA,SAASA,UAAU,QAAQ;AAE3B,OAAO,MAAMC,iBAAA,GAAuD;EAClEC,UAAU;IAAEC;EAAI,CAAE;IAChB,IAAIC,IAAA,GAAOD,IAAA,CAAKC,IAAI;IAEpB,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWM,OAAO,EAAE;MACpCF,IAAA,GAAO,WAAWA,IAAA,WAAe;IACnC;IACA,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWO,SAAS,EAAE;MACtCH,IAAA,GAAO,OAAOA,IAAA,OAAW;IAC3B;IACA,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWQ,gBAAgB,EAAE;MAC7CJ,IAAA,GAAO,+CAA+CA,IAAA,SAAa;IACrE;IACA,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWS,YAAY,EAAE;MACzCL,IAAA,GAAO,4CAA4CA,IAAA,SAAa;IAClE;IACA,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWU,OAAO,EAAE;MACpCN,IAAA,GAAO,SAASA,IAAA,SAAa;IAC/B;IACA,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWW,YAAY,EAAE;MACzCP,IAAA,GAAO,QAAQA,IAAA,QAAY;IAC7B;IACA,IAAID,IAAA,CAAKE,MAAM,GAAGL,UAAA,CAAWY,cAAc,EAAE;MAC3CR,IAAA,GAAO,QAAQA,IAAA,QAAY;IAC7B;IAEA,OAAOA,IAAA;EACT;EACAS,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,10 +1,5 @@
1
1
  import { LinebreakHTMLConverter } from './converters/linebreak.js';
2
2
  import { ParagraphHTMLConverter } from './converters/paragraph.js';
3
3
  import { TextHTMLConverter } from './converters/text.js';
4
- export const defaultHTMLConverters = [
5
- ParagraphHTMLConverter,
6
- TextHTMLConverter,
7
- LinebreakHTMLConverter
8
- ];
9
-
4
+ export const defaultHTMLConverters = [ParagraphHTMLConverter, TextHTMLConverter, LinebreakHTMLConverter];
10
5
  //# sourceMappingURL=defaultConverters.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/converters/html/converter/defaultConverters.ts"],"sourcesContent":["import type { HTMLConverter } from './types.js'\n\nimport { LinebreakHTMLConverter } from './converters/linebreak.js'\nimport { ParagraphHTMLConverter } from './converters/paragraph.js'\nimport { TextHTMLConverter } from './converters/text.js'\n\nexport const defaultHTMLConverters: HTMLConverter[] = [\n ParagraphHTMLConverter,\n TextHTMLConverter,\n LinebreakHTMLConverter,\n]\n"],"names":["LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters"],"mappings":"AAEA,SAASA,sBAAsB,QAAQ,4BAA2B;AAClE,SAASC,sBAAsB,QAAQ,4BAA2B;AAClE,SAASC,iBAAiB,QAAQ,uBAAsB;AAExD,OAAO,MAAMC,wBAAyC;IACpDF;IACAC;IACAF;CACD,CAAA"}
1
+ {"version":3,"file":"defaultConverters.js","names":["LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters"],"sources":["../../../../../src/features/converters/html/converter/defaultConverters.ts"],"sourcesContent":["import type { HTMLConverter } from './types.js'\n\nimport { LinebreakHTMLConverter } from './converters/linebreak.js'\nimport { ParagraphHTMLConverter } from './converters/paragraph.js'\nimport { TextHTMLConverter } from './converters/text.js'\n\nexport const defaultHTMLConverters: HTMLConverter[] = [\n ParagraphHTMLConverter,\n TextHTMLConverter,\n LinebreakHTMLConverter,\n]\n"],"mappings":"AAEA,SAASA,sBAAsB,QAAQ;AACvC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,iBAAiB,QAAQ;AAElC,OAAO,MAAMC,qBAAA,GAAyC,CACpDF,sBAAA,EACAC,iBAAA,EACAF,sBAAA,CACD","ignoreList":[]}
@@ -1,57 +1,72 @@
1
1
  import { createLocalReq } from 'payload';
2
- export async function convertLexicalToHTML({ converters, data, draft, overrideAccess, payload, req, showHiddenFields }) {
3
- if (data?.root?.children?.length) {
4
- if (req === undefined && payload) {
5
- req = await createLocalReq({}, payload);
6
- }
7
- return await convertLexicalNodesToHTML({
8
- converters,
9
- draft: draft === undefined ? false : draft,
10
- lexicalNodes: data?.root?.children,
11
- overrideAccess: overrideAccess === undefined ? false : overrideAccess,
12
- parent: data?.root,
13
- req,
14
- showHiddenFields: showHiddenFields === undefined ? false : showHiddenFields
15
- });
2
+ export async function convertLexicalToHTML({
3
+ converters,
4
+ data,
5
+ draft,
6
+ overrideAccess,
7
+ payload,
8
+ req,
9
+ showHiddenFields
10
+ }) {
11
+ if (data?.root?.children?.length) {
12
+ if (req === undefined && payload) {
13
+ req = await createLocalReq({}, payload);
16
14
  }
17
- return '';
15
+ return await convertLexicalNodesToHTML({
16
+ converters,
17
+ draft: draft === undefined ? false : draft,
18
+ lexicalNodes: data?.root?.children,
19
+ overrideAccess: overrideAccess === undefined ? false : overrideAccess,
20
+ parent: data?.root,
21
+ req,
22
+ showHiddenFields: showHiddenFields === undefined ? false : showHiddenFields
23
+ });
24
+ }
25
+ return '';
18
26
  }
19
- export async function convertLexicalNodesToHTML({ converters, draft, lexicalNodes, overrideAccess, parent, req, showHiddenFields }) {
20
- const unknownConverter = converters.find((converter)=>converter.nodeTypes.includes('unknown'));
21
- const htmlArray = await Promise.all(lexicalNodes.map(async (node, i)=>{
22
- const converterForNode = converters.find((converter)=>converter.nodeTypes.includes(node.type));
23
- try {
24
- if (!converterForNode) {
25
- if (unknownConverter) {
26
- return await unknownConverter.converter({
27
- childIndex: i,
28
- converters,
29
- draft,
30
- node,
31
- overrideAccess,
32
- parent,
33
- req,
34
- showHiddenFields
35
- });
36
- }
37
- return '<span>unknown node</span>';
38
- }
39
- return await converterForNode.converter({
40
- childIndex: i,
41
- converters,
42
- draft,
43
- node,
44
- overrideAccess,
45
- parent,
46
- req,
47
- showHiddenFields
48
- });
49
- } catch (error) {
50
- console.error('Error converting lexical node to HTML:', error, 'node:', node);
51
- return '';
27
+ export async function convertLexicalNodesToHTML({
28
+ converters,
29
+ draft,
30
+ lexicalNodes,
31
+ overrideAccess,
32
+ parent,
33
+ req,
34
+ showHiddenFields
35
+ }) {
36
+ const unknownConverter = converters.find(converter => converter.nodeTypes.includes('unknown'));
37
+ const htmlArray = await Promise.all(lexicalNodes.map(async (node, i) => {
38
+ const converterForNode = converters.find(converter => converter.nodeTypes.includes(node.type));
39
+ try {
40
+ if (!converterForNode) {
41
+ if (unknownConverter) {
42
+ return await unknownConverter.converter({
43
+ childIndex: i,
44
+ converters,
45
+ draft,
46
+ node,
47
+ overrideAccess,
48
+ parent,
49
+ req,
50
+ showHiddenFields
51
+ });
52
52
  }
53
- }));
54
- return htmlArray.join('') || '';
53
+ return '<span>unknown node</span>';
54
+ }
55
+ return await converterForNode.converter({
56
+ childIndex: i,
57
+ converters,
58
+ draft,
59
+ node,
60
+ overrideAccess,
61
+ parent,
62
+ req,
63
+ showHiddenFields
64
+ });
65
+ } catch (error) {
66
+ console.error('Error converting lexical node to HTML:', error, 'node:', node);
67
+ return '';
68
+ }
69
+ }));
70
+ return htmlArray.join('') || '';
55
71
  }
56
-
57
72
  //# sourceMappingURL=index.js.map