@payloadcms/richtext-lexical 4.0.0-internal.e7d4ebc → 4.0.0-internal.ee5d8bd

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 (611) hide show
  1. package/dist/exports/client/Field-334JNLRF.js +2 -0
  2. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  3. package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
  4. package/dist/exports/client/chunk-BEKGION5.js +2 -0
  5. package/dist/exports/client/chunk-BEKGION5.js.map +7 -0
  6. package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
  7. package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
  8. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  9. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  10. package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
  11. package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
  12. package/dist/exports/client/chunk-SE5IITBK.js +2 -0
  13. package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
  14. package/dist/exports/client/component-QENB4QTS.js +2 -0
  15. package/dist/exports/client/component-QENB4QTS.js.map +7 -0
  16. package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
  17. package/dist/exports/client/index.d.ts +1 -1
  18. package/dist/exports/client/index.d.ts.map +1 -1
  19. package/dist/exports/client/index.js +26 -26
  20. package/dist/exports/client/index.js.map +4 -4
  21. package/dist/features/align/client/index.js.map +1 -1
  22. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  23. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  24. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  25. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  26. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  27. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  28. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  29. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  30. package/dist/features/blocks/client/component/index.d.ts +0 -6
  31. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  32. package/dist/features/blocks/client/component/index.js +199 -109
  33. package/dist/features/blocks/client/component/index.js.map +1 -1
  34. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  35. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  36. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  37. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  38. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  39. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  40. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  41. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  42. package/dist/features/blocks/client/componentInline/index.css +0 -1
  43. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  44. package/dist/features/blocks/client/componentInline/index.js +32 -30
  45. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  46. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  47. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  48. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  49. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  50. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  51. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  52. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  53. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  54. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
  55. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  56. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  57. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  58. package/dist/features/blocks/server/index.js +2 -2
  59. package/dist/features/blocks/server/index.js.map +1 -1
  60. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  62. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  63. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  64. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  65. package/dist/features/blocks/server/schema.d.ts +2 -0
  66. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  67. package/dist/features/blocks/server/schema.js +7 -9
  68. package/dist/features/blocks/server/schema.js.map +1 -1
  69. package/dist/features/blocks/server/validate.js +1 -1
  70. package/dist/features/blocks/server/validate.js.map +1 -1
  71. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  72. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  73. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  74. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  75. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  76. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  77. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  78. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  79. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  80. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  81. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  82. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  84. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  85. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  86. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  87. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  90. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  91. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  92. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  93. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  94. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  95. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  96. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  97. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  98. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  99. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  100. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  101. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  102. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  103. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  104. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  105. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  106. package/dist/features/heading/client/index.js.map +1 -1
  107. package/dist/features/heading/constants.d.ts +2 -0
  108. package/dist/features/heading/constants.d.ts.map +1 -0
  109. package/dist/features/heading/constants.js +2 -0
  110. package/dist/features/heading/constants.js.map +1 -0
  111. package/dist/features/heading/server/index.d.ts.map +1 -1
  112. package/dist/features/heading/server/index.js +5 -1
  113. package/dist/features/heading/server/index.js.map +1 -1
  114. package/dist/features/heading/server/validate.d.ts +6 -0
  115. package/dist/features/heading/server/validate.d.ts.map +1 -0
  116. package/dist/features/heading/server/validate.js +15 -0
  117. package/dist/features/heading/server/validate.js.map +1 -0
  118. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
  119. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  120. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  121. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  122. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  123. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  124. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  125. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  126. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  127. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  128. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  129. package/dist/features/horizontalRule/server/schema.js +6 -5
  130. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  131. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  132. package/dist/features/indent/client/IndentPlugin.js +122 -1
  133. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  134. package/dist/features/indent/client/index.d.ts.map +1 -1
  135. package/dist/features/indent/client/index.js +0 -2
  136. package/dist/features/indent/client/index.js.map +1 -1
  137. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  138. package/dist/features/indent/server/i18n.js +74 -37
  139. package/dist/features/indent/server/i18n.js.map +1 -1
  140. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  141. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  142. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +18 -7
  143. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  144. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -2
  145. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  146. package/dist/features/link/markdownTransformer.js +2 -2
  147. package/dist/features/link/markdownTransformer.js.map +1 -1
  148. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  149. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  150. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  151. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  152. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  153. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  154. package/dist/features/link/nodes/LinkNode.js +2 -15
  155. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  156. package/dist/features/link/server/baseFields.js.map +1 -1
  157. package/dist/features/link/server/index.js +2 -2
  158. package/dist/features/link/server/index.js.map +1 -1
  159. package/dist/features/link/server/validate.js +1 -1
  160. package/dist/features/link/server/validate.js.map +1 -1
  161. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  162. package/dist/features/lists/checklist/server/index.js +5 -2
  163. package/dist/features/lists/checklist/server/index.js.map +1 -1
  164. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  165. package/dist/features/lists/orderedList/server/index.js +5 -2
  166. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  167. package/dist/features/lists/shared/constants.d.ts +2 -0
  168. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  169. package/dist/features/lists/shared/constants.js +2 -0
  170. package/dist/features/lists/shared/constants.js.map +1 -0
  171. package/dist/features/lists/shared/schema.d.ts.map +1 -1
  172. package/dist/features/lists/shared/schema.js.map +1 -1
  173. package/dist/features/lists/shared/validate.d.ts +5 -0
  174. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  175. package/dist/features/lists/shared/validate.js +15 -0
  176. package/dist/features/lists/shared/validate.js.map +1 -0
  177. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  178. package/dist/features/lists/unorderedList/server/index.js +5 -2
  179. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  180. package/dist/features/relationship/client/components/index.css +3 -6
  181. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  182. package/dist/features/relationship/client/index.d.ts +2 -2
  183. package/dist/features/relationship/client/index.d.ts.map +1 -1
  184. package/dist/features/relationship/client/index.js.map +1 -1
  185. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  186. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  187. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  188. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  189. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  190. package/dist/features/relationship/client/plugins/index.js +27 -31
  191. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  192. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  193. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  194. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  195. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  196. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  197. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  198. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  199. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  200. package/dist/features/relationship/server/index.d.ts +8 -1
  201. package/dist/features/relationship/server/index.d.ts.map +1 -1
  202. package/dist/features/relationship/server/index.js +28 -11
  203. package/dist/features/relationship/server/index.js.map +1 -1
  204. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  205. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  206. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  207. package/dist/features/relationship/server/schema.d.ts +3 -2
  208. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  209. package/dist/features/relationship/server/schema.js +9 -12
  210. package/dist/features/relationship/server/schema.js.map +1 -1
  211. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  212. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  213. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  214. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  215. package/dist/features/table/client/index.d.ts.map +1 -0
  216. package/dist/features/table/client/index.js.map +1 -0
  217. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  218. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  219. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  220. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  221. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +1 -2
  222. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  223. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  224. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  225. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  226. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +47 -24
  227. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  228. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  229. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  230. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  231. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  232. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  233. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  234. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +54 -18
  235. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  236. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  237. package/dist/features/table/client/utils/debounce.js.map +1 -0
  238. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  239. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  240. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  241. package/dist/features/table/markdownTransformer.js.map +1 -0
  242. package/dist/features/table/server/index.d.ts +3 -0
  243. package/dist/features/table/server/index.d.ts.map +1 -0
  244. package/dist/features/{experimental_table → table}/server/index.js +4 -4
  245. package/dist/features/table/server/index.js.map +1 -0
  246. package/dist/features/table/server/schema.d.ts.map +1 -0
  247. package/dist/features/table/server/schema.js.map +1 -0
  248. package/dist/features/textState/defaultColors.js +1 -1
  249. package/dist/features/textState/defaultColors.js.map +1 -1
  250. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  251. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  252. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  253. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  254. package/dist/features/toolbars/fixed/client/Toolbar/index.css +77 -3
  255. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  256. package/dist/features/toolbars/fixed/client/Toolbar/index.js +145 -71
  257. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  258. package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
  259. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  260. package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
  261. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  262. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  263. package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
  264. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  265. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  266. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
  267. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  268. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -14
  269. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  270. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
  271. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  272. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  273. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  274. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  275. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  276. package/dist/features/typesServer.d.ts +17 -12
  277. package/dist/features/typesServer.d.ts.map +1 -1
  278. package/dist/features/typesServer.js.map +1 -1
  279. package/dist/features/upload/client/component/index.css +0 -2
  280. package/dist/features/upload/client/component/index.js +2 -1
  281. package/dist/features/upload/client/component/index.js.map +1 -1
  282. package/dist/features/upload/client/drawer/index.js.map +1 -1
  283. package/dist/features/upload/client/index.d.ts +3 -2
  284. package/dist/features/upload/client/index.d.ts.map +1 -1
  285. package/dist/features/upload/client/index.js.map +1 -1
  286. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  287. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  288. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  289. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  290. package/dist/features/upload/client/plugin/index.js +50 -53
  291. package/dist/features/upload/client/plugin/index.js.map +1 -1
  292. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  293. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  294. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  295. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  296. package/dist/features/upload/server/index.d.ts +7 -3
  297. package/dist/features/upload/server/index.d.ts.map +1 -1
  298. package/dist/features/upload/server/index.js +20 -16
  299. package/dist/features/upload/server/index.js.map +1 -1
  300. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  301. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  302. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  303. package/dist/features/upload/server/schema.d.ts +4 -16
  304. package/dist/features/upload/server/schema.d.ts.map +1 -1
  305. package/dist/features/upload/server/schema.js +8 -10
  306. package/dist/features/upload/server/schema.js.map +1 -1
  307. package/dist/features/upload/server/validate.d.ts +2 -2
  308. package/dist/features/upload/server/validate.d.ts.map +1 -1
  309. package/dist/features/upload/server/validate.js +4 -1
  310. package/dist/features/upload/server/validate.js.map +1 -1
  311. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  312. package/dist/field/Diff/converters/listitem/index.js +2 -1
  313. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  314. package/dist/field/Diff/converters/relationship/index.css +0 -1
  315. package/dist/field/Diff/converters/unknown/index.css +0 -1
  316. package/dist/field/Diff/converters/upload/index.css +0 -1
  317. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  318. package/dist/field/Diff/index.css +0 -2
  319. package/dist/field/Diff/index.d.ts +3 -2
  320. package/dist/field/Diff/index.d.ts.map +1 -1
  321. package/dist/field/Diff/index.js +3 -2
  322. package/dist/field/Diff/index.js.map +1 -1
  323. package/dist/field/Field.d.ts.map +1 -1
  324. package/dist/field/Field.js +8 -1
  325. package/dist/field/Field.js.map +1 -1
  326. package/dist/field/RenderLexical/index.d.ts +3 -1
  327. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  328. package/dist/field/RenderLexical/index.js +23 -23
  329. package/dist/field/RenderLexical/index.js.map +1 -1
  330. package/dist/field/ViewSelector.d.ts.map +1 -1
  331. package/dist/field/ViewSelector.js +13 -4
  332. package/dist/field/ViewSelector.js.map +1 -1
  333. package/dist/field/bundled.css +1 -1
  334. package/dist/field/index.css +10 -11
  335. package/dist/field/index.js.map +1 -1
  336. package/dist/field/rscEntry.d.ts +2 -2
  337. package/dist/field/rscEntry.d.ts.map +1 -1
  338. package/dist/field/rscEntry.js.map +1 -1
  339. package/dist/i18n.d.ts.map +1 -1
  340. package/dist/i18n.js +112 -0
  341. package/dist/i18n.js.map +1 -1
  342. package/dist/index.d.ts +5 -5
  343. package/dist/index.d.ts.map +1 -1
  344. package/dist/index.js +27 -5
  345. package/dist/index.js.map +1 -1
  346. package/dist/lexical/LexicalEditor.css +21 -10
  347. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  348. package/dist/lexical/LexicalEditor.js +61 -64
  349. package/dist/lexical/LexicalEditor.js.map +1 -1
  350. package/dist/lexical/config/server/loader.d.ts +1 -1
  351. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  352. package/dist/lexical/config/server/loader.js +2 -2
  353. package/dist/lexical/config/server/loader.js.map +1 -1
  354. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  355. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  356. package/dist/lexical/config/server/sanitize.js +2 -2
  357. package/dist/lexical/config/server/sanitize.js.map +1 -1
  358. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  359. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  360. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  361. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  362. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  363. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  364. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  365. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  366. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  367. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  368. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  369. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  370. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +236 -108
  371. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  372. package/dist/lexical/plugins/SlashMenu/index.css +0 -2
  373. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  374. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  375. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  376. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  377. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  378. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +17 -0
  379. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  380. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +139 -37
  381. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  382. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  383. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  384. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  385. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  386. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  387. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  388. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  389. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  390. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  391. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  392. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  393. package/dist/lexical/theme/EditorTheme.css +0 -2
  394. package/dist/lexical/ui/ContentEditable.css +0 -4
  395. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  396. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  397. package/dist/lexical/ui/ContentEditable.js +32 -11
  398. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  399. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  400. package/dist/lexical/ui/icons/H3/index.js +13 -6
  401. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  402. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  403. package/dist/lexical/ui/icons/H4/index.js +13 -6
  404. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  405. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  406. package/dist/lexical/ui/icons/H5/index.js +13 -6
  407. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  408. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  409. package/dist/lexical/ui/icons/H6/index.js +13 -6
  410. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  411. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  412. package/dist/lexical/utils/nodeFormat.js +0 -2
  413. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  414. package/dist/lexical/utils/url.d.ts.map +1 -1
  415. package/dist/lexical/utils/url.js +1 -1
  416. package/dist/lexical/utils/url.js.map +1 -1
  417. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  418. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  419. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  420. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  421. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  422. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  423. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  424. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  425. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  426. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  427. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  428. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  429. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  430. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  431. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  432. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  433. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  434. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  435. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  436. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  437. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  438. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  439. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  440. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  441. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  442. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  443. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  444. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  445. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  446. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  447. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  448. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  449. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  450. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  451. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  452. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  453. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  454. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  455. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  456. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  457. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  458. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  459. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  460. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  461. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  462. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  463. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  464. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  465. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  466. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  467. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  468. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  469. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  470. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  471. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  472. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  473. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  474. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  475. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  476. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  477. package/dist/populateGraphQL/populate.js.map +1 -1
  478. package/dist/presets/llmInstructions.d.ts +2 -0
  479. package/dist/presets/llmInstructions.d.ts.map +1 -0
  480. package/dist/presets/llmInstructions.js +13 -0
  481. package/dist/presets/llmInstructions.js.map +1 -0
  482. package/dist/types/builtInNodes.d.ts +1 -1
  483. package/dist/types/builtInNodes.d.ts.map +1 -1
  484. package/dist/types/builtInNodes.js +8 -3
  485. package/dist/types/builtInNodes.js.map +1 -1
  486. package/dist/types/index.d.ts +4 -7
  487. package/dist/types/index.d.ts.map +1 -1
  488. package/dist/types/index.js.map +1 -1
  489. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  490. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  491. package/dist/types/jsonSchemaHelpers.js +7 -2
  492. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  493. package/dist/types/nodeTypes.d.ts +6 -1
  494. package/dist/types/nodeTypes.d.ts.map +1 -1
  495. package/dist/types/nodeTypes.js.map +1 -1
  496. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  497. package/dist/utilities/buildEditorState.js.map +1 -1
  498. package/dist/utilities/buildInitialState.d.ts +3 -2
  499. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  500. package/dist/utilities/buildInitialState.js +1 -0
  501. package/dist/utilities/buildInitialState.js.map +1 -1
  502. package/dist/utilities/createServerFeature.d.ts +1 -1
  503. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  504. package/dist/utilities/createServerFeature.js +2 -2
  505. package/dist/utilities/createServerFeature.js.map +1 -1
  506. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  507. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  508. package/dist/utilities/editorConfigFactory.js +9 -9
  509. package/dist/utilities/editorConfigFactory.js.map +1 -1
  510. package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
  511. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  512. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  513. package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -9
  514. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  515. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
  516. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  517. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  518. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  519. package/dist/utilities/generateImportMap.d.ts +2 -2
  520. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  521. package/dist/utilities/generateImportMap.js.map +1 -1
  522. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  523. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  524. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  525. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  526. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  527. package/dist/utilities/initLexicalFeatures.js +38 -4
  528. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  529. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  530. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  531. package/dist/utilities/useLexicalFeature.js +15 -6
  532. package/dist/utilities/useLexicalFeature.js.map +1 -1
  533. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  534. package/dist/validate/hasText.d.ts +2 -2
  535. package/dist/validate/hasText.d.ts.map +1 -1
  536. package/dist/validate/hasText.js.map +1 -1
  537. package/dist/validate/index.d.ts +1 -1
  538. package/dist/validate/index.d.ts.map +1 -1
  539. package/package.json +125 -54
  540. package/dist/dependencyChecker.spec.js +0 -16
  541. package/dist/dependencyChecker.spec.js.map +0 -1
  542. package/dist/exports/client/Field-QGSHF22S.js +0 -2
  543. package/dist/exports/client/Field-QGSHF22S.js.map +0 -7
  544. package/dist/exports/client/bundled.css +0 -1
  545. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  546. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  547. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  548. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  549. package/dist/exports/client/chunk-X3D4LZS7.js +0 -2
  550. package/dist/exports/client/chunk-X3D4LZS7.js.map +0 -7
  551. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  552. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  553. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  554. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  555. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  556. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  557. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  558. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  559. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  560. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  561. package/dist/features/experimental_table/client/index.js.map +0 -1
  562. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  563. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  564. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  565. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  566. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  567. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  568. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  569. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  570. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  571. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  572. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  573. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  574. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  575. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  576. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  577. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  578. package/dist/features/experimental_table/server/index.d.ts +0 -3
  579. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  580. package/dist/features/experimental_table/server/index.js.map +0 -1
  581. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  582. package/dist/features/experimental_table/server/schema.js.map +0 -1
  583. package/dist/features/link/markdownTransformer.spec.js +0 -195
  584. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  585. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  586. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  587. package/dist/lexical/utils/url.spec.js +0 -114
  588. package/dist/lexical/utils/url.spec.js.map +0 -1
  589. package/dist/utilities/jsx/jsx.spec.js +0 -178
  590. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  591. /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
  592. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-AU7IBNY7.js.map} +0 -0
  593. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  594. /package/dist/features/{experimental_table → table}/client/index.js +0 -0
  595. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  596. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  597. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  598. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  599. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  600. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  601. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  602. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  603. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  604. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  605. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  606. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  607. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  608. /package/dist/features/{experimental_table → table}/markdownTransformer.d.ts +0 -0
  609. /package/dist/features/{experimental_table → table}/markdownTransformer.js +0 -0
  610. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  611. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["sanitizeFields","createServerFeature","createNode","createPayloadLinkTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","createAutoLinkNodeJSONSchema","createLinkNodeJSONSchema","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","internalDocToHref","nodes","jsonSchema","node","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { createPayloadLinkTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport {\n createAutoLinkNodeJSONSchema,\n createLinkNodeJSONSchema,\n type SerializedLinkNode,\n} from './schema.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type { LinkFields, SerializedAutoLinkNode, SerializedLinkNode } from './schema.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Resolves an internal link node to a URL string for use in the markdown converter.\n * Internal links store a doc reference rather than a URL, so without this the markdown\n * output will have an empty href: `[link text]()`.\n */\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [\n createPayloadLinkTransformer({ internalDocToHref: props.internalDocToHref }),\n ],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n jsonSchema: createAutoLinkNodeJSONSchema(sanitizedFieldsWithoutText),\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n jsonSchema: createLinkNodeJSONSchema(sanitizedFieldsWithoutText),\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ].filter(Boolean) as Array<NodeWithHooks>,\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,SAASA,cAAc,QAAQ;AAK/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,IAAI,QAAQ;AACrB,SACEC,4BAA4B,EAC5BC,wBAAwB,QAEnB;AACP,SAASC,oBAAoB,QAAQ;AACrC,SAASC,cAAc,QAAQ;AA8D/B,OAAO,MAAMC,WAAA,GAAcX,mBAAA,CAIzB;EACAY,OAAA,EAAS,MAAAA,CAAO;IAAEC,MAAA,EAAQC,OAAO;IAAEC,MAAM;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IACnE,IAAI,CAACA,KAAA,EAAO;MACVA,KAAA,GAAQ,CAAC;IACX;IACA,MAAMC,kBAAA,GAAqBJ,OAAA,CAAQK,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAK,EAAE;IAEvE,MAAMC,kBAAA,GAAqBd,oBAAA,CACzBQ,KAAA,CAAMO,MAAM,GA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AAA,CAAMQ;MAC5B;MACAkB,iBAAA,EAAmBA,CAAA;QACjB,IAAI,CAACf,eAAA,IAAmB,CAACgB,KAAA,CAAMC,OAAO,CAACjB,eAAA,KAAoBA,eAAA,CAAgBkB,MAAM,KAAK,GAAG;UACvF,OAAO;QACT;QAEA,MAAMC,SAAA,GAA4B,IAAIC,GAAA;QACtCD,SAAA,CAAUE,GAAG,CAAC,UAAU;UACtBzB,MAAA,EAAQI;QACV;QAEA,OAAOmB,SAAA;MACT;MACAzC,IAAA;MACA4C,oBAAA,EAAsB,CACpBhD,4BAAA,CAA6B;QAAEiD,iBAAA,EAAmBlC,KAAA,CAAMkC;MAAkB,GAC3E;MACDC,KAAA,EAAO,CACLnC,KAAA,EAAOyB,gBAAA,KAAqB,OACxB,OACAzC,UAAA,CAAW;QACToD,UAAA,EAAY9C,4BAAA,CAA6BuB,0BAAA;QACzCwB,IAAA,EAAMnD,YAAA;QACN;QACAoD,WAAA,EAAa,CAAC7C,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,IACJ7B,UAAA,CAAW;QACTuD,YAAA,EAAcA,CAAA;UACZ,OAAO1B,0BAAA;QACT;QACA2B,gBAAA,EAAkBA,CAAC;UAAEH;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAM9B,MAAA;QACf;QACAkC,yBAAA,EAA2B,CAACrD,wBAAA,CAAyBY,KAAA,EAAO;QAC5DoC,UAAA,EAAY7C,wBAAA,CAAyBsB,0BAAA;QACrCwB,IAAA,EAAMlD,QAAA;QACNmD,WAAA,EAAa,CAAC7C,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD,CAACC,MAAM,CAAC4B,OAAA;MACTC,2BAAA,EAA6B3C;IAC/B;EACF;EACA4C,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["sanitizeFields","createServerFeature","createNode","createPayloadLinkTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","createAutoLinkNodeJSONSchema","createLinkNodeJSONSchema","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","internalDocToHref","nodes","jsonSchema","node","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { createPayloadLinkTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport {\n createAutoLinkNodeJSONSchema,\n createLinkNodeJSONSchema,\n type SerializedLinkNode,\n} from './schema.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type { LinkFields, SerializedAutoLinkNode, SerializedLinkNode } from './schema.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Resolves an internal link node to a URL string for use in the markdown converter.\n * Internal links store a doc reference rather than a URL, so without this the markdown\n * output will have an empty href: `[link text]()`.\n */\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [\n createPayloadLinkTransformer({ internalDocToHref: props.internalDocToHref }),\n ],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n jsonSchema: createAutoLinkNodeJSONSchema(sanitizedFieldsWithoutText),\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n jsonSchema: createLinkNodeJSONSchema(sanitizedFieldsWithoutText),\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n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B,gBAAA,KAAqB,OACxB,OACAzC,UAAA,CAAW;QACToD,UAAA,EAAY9C,4BAAA,CAA6BuB,0BAAA;QACzCwB,IAAA,EAAMnD,YAAA;QACN;QACAoD,WAAA,EAAa,CAAC7C,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,IACJ7B,UAAA,CAAW;QACTuD,YAAA,EAAcA,CAAA;UACZ,OAAO1B,0BAAA;QACT;QACA2B,gBAAA,EAAkBA,CAAC;UAAEH;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAM9B,MAAA;QACf;QACAkC,yBAAA,EAA2B,CAACrD,wBAAA,CAAyBY,KAAA,EAAO;QAC5DoC,UAAA,EAAY7C,wBAAA,CAAyBsB,0BAAA;QACrCwB,IAAA,EAAMlD,QAAA;QACNmD,WAAA,EAAa,CAAC7C,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD,CAACC,MAAM,CAAC4B,OAAA;MACTC,2BAAA,EAA6B3C;IAC/B;EACF;EACA4C,GAAA,EAAK;AACP","ignoreList":[]}
@@ -24,7 +24,7 @@ export const linkValidation = (props, sanitizedFieldsWithoutText) => {
24
24
  fields: sanitizedFieldsWithoutText,
25
25
  fieldSchemaMap: undefined,
26
26
  initialBlockData: node.fields,
27
- operation: operation === 'create' || operation === 'update' ? operation : 'update',
27
+ operation,
28
28
  permissions: {},
29
29
  preferences,
30
30
  renderAllFields: false,
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","names":["fieldSchemasToFormState","linkValidation","props","sanitizedFieldsWithoutText","node","validation","options","id","collectionSlug","data","operation","preferences","req","result","fields","documentData","fieldSchemaMap","undefined","initialBlockData","permissions","renderAllFields","schemaPath","errorPathsSet","Set","fieldKey","fieldState","errorPaths","length","errorPath","add","Array","from","join"],"sources":["../../../../src/features/link/server/validate.ts"],"sourcesContent":["import type { Field } from 'payload'\n\nimport { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { LinkFeatureServerProps } from './index.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from './schema.js'\n\nexport const linkValidation = (\n props: LinkFeatureServerProps,\n sanitizedFieldsWithoutText: Field[],\n): NodeValidation<SerializedAutoLinkNode | SerializedLinkNode> => {\n return async ({\n node,\n validation: {\n options: { id, collectionSlug, data, operation, preferences, req },\n },\n }) => {\n /**\n * Run fieldSchemasToFormState as that properly validates link fields and link sub-fields\n */\n\n const result = await fieldSchemasToFormState({\n id,\n collectionSlug,\n data: node.fields,\n documentData: data,\n fields: sanitizedFieldsWithoutText, // Sanitized in feature.server.ts\n fieldSchemaMap: undefined,\n initialBlockData: node.fields,\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n permissions: {},\n preferences,\n renderAllFields: false,\n req,\n schemaPath: '',\n })\n\n const errorPathsSet = new Set<string>()\n for (const fieldKey in result) {\n const fieldState = result[fieldKey]\n if (fieldState?.errorPaths?.length) {\n for (const errorPath of fieldState.errorPaths) {\n errorPathsSet.add(errorPath)\n }\n }\n }\n const errorPaths = Array.from(errorPathsSet)\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,uBAAuB,QAAQ;AAMxC,OAAO,MAAMC,cAAA,GAAiBA,CAC5BC,KAAA,EACAC,0BAAA;EAEA,OAAO,OAAO;IACZC,IAAI;IACJC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,EAAE;QAAEC,cAAc;QAAEC,IAAI;QAAEC,SAAS;QAAEC,WAAW;QAAEC;MAAG;IAAE;EACnE,CACF;IACC;;;IAIA,MAAMC,MAAA,GAAS,MAAMb,uBAAA,CAAwB;MAC3CO,EAAA;MACAC,cAAA;MACAC,IAAA,EAAML,IAAA,CAAKU,MAAM;MACjBC,YAAA,EAAcN,IAAA;MACdK,MAAA,EAAQX,0BAAA;MACRa,cAAA,EAAgBC,SAAA;MAChBC,gBAAA,EAAkBd,IAAA,CAAKU,MAAM;MAC7BJ,SAAA,EAAWA,SAAA,KAAc,YAAYA,SAAA,KAAc,WAAWA,SAAA,GAAY;MAC1ES,WAAA,EAAa,CAAC;MACdR,WAAA;MACAS,eAAA,EAAiB;MACjBR,GAAA;MACAS,UAAA,EAAY;IACd;IAEA,MAAMC,aAAA,GAAgB,IAAIC,GAAA;IAC1B,KAAK,MAAMC,QAAA,IAAYX,MAAA,EAAQ;MAC7B,MAAMY,UAAA,GAAaZ,MAAM,CAACW,QAAA,CAAS;MACnC,IAAIC,UAAA,EAAYC,UAAA,EAAYC,MAAA,EAAQ;QAClC,KAAK,MAAMC,SAAA,IAAaH,UAAA,CAAWC,UAAU,EAAE;UAC7CJ,aAAA,CAAcO,GAAG,CAACD,SAAA;QACpB;MACF;IACF;IACA,MAAMF,UAAA,GAAaI,KAAA,CAAMC,IAAI,CAACT,aAAA;IAE9B,IAAII,UAAA,CAAWC,MAAM,EAAE;MACrB,OAAO,uCAAuCD,UAAA,CAAWM,IAAI,CAAC;IAChE;IAEA,OAAO;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"file":"validate.js","names":["fieldSchemasToFormState","linkValidation","props","sanitizedFieldsWithoutText","node","validation","options","id","collectionSlug","data","operation","preferences","req","result","fields","documentData","fieldSchemaMap","undefined","initialBlockData","permissions","renderAllFields","schemaPath","errorPathsSet","Set","fieldKey","fieldState","errorPaths","length","errorPath","add","Array","from","join"],"sources":["../../../../src/features/link/server/validate.ts"],"sourcesContent":["import type { Field } from 'payload'\n\nimport { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { LinkFeatureServerProps } from './index.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from './schema.js'\n\nexport const linkValidation = (\n props: LinkFeatureServerProps,\n sanitizedFieldsWithoutText: Field[],\n): NodeValidation<SerializedAutoLinkNode | SerializedLinkNode> => {\n return async ({\n node,\n validation: {\n options: { id, collectionSlug, data, operation, preferences, req },\n },\n }) => {\n /**\n * Run fieldSchemasToFormState as that properly validates link fields and link sub-fields\n */\n\n const result = await fieldSchemasToFormState({\n id,\n collectionSlug,\n data: node.fields,\n documentData: data,\n fields: sanitizedFieldsWithoutText, // Sanitized in feature.server.ts\n fieldSchemaMap: undefined,\n initialBlockData: node.fields,\n operation,\n permissions: {},\n preferences,\n renderAllFields: false,\n req,\n schemaPath: '',\n })\n\n const errorPathsSet = new Set<string>()\n for (const fieldKey in result) {\n const fieldState = result[fieldKey]\n if (fieldState?.errorPaths?.length) {\n for (const errorPath of fieldState.errorPaths) {\n errorPathsSet.add(errorPath)\n }\n }\n }\n const errorPaths = Array.from(errorPathsSet)\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,uBAAuB,QAAQ;AAMxC,OAAO,MAAMC,cAAA,GAAiBA,CAC5BC,KAAA,EACAC,0BAAA;EAEA,OAAO,OAAO;IACZC,IAAI;IACJC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,EAAE;QAAEC,cAAc;QAAEC,IAAI;QAAEC,SAAS;QAAEC,WAAW;QAAEC;MAAG;IAAE;EACnE,CACF;IACC;;;IAIA,MAAMC,MAAA,GAAS,MAAMb,uBAAA,CAAwB;MAC3CO,EAAA;MACAC,cAAA;MACAC,IAAA,EAAML,IAAA,CAAKU,MAAM;MACjBC,YAAA,EAAcN,IAAA;MACdK,MAAA,EAAQX,0BAAA;MACRa,cAAA,EAAgBC,SAAA;MAChBC,gBAAA,EAAkBd,IAAA,CAAKU,MAAM;MAC7BJ,SAAA;MACAS,WAAA,EAAa,CAAC;MACdR,WAAA;MACAS,eAAA,EAAiB;MACjBR,GAAA;MACAS,UAAA,EAAY;IACd;IAEA,MAAMC,aAAA,GAAgB,IAAIC,GAAA;IAC1B,KAAK,MAAMC,QAAA,IAAYX,MAAA,EAAQ;MAC7B,MAAMY,UAAA,GAAaZ,MAAM,CAACW,QAAA,CAAS;MACnC,IAAIC,UAAA,EAAYC,UAAA,EAAYC,MAAA,EAAQ;QAClC,KAAK,MAAMC,SAAA,IAAaH,UAAA,CAAWC,UAAU,EAAE;UAC7CJ,aAAA,CAAcO,GAAG,CAACD,SAAA;QACpB;MACF;IACF;IACA,MAAMF,UAAA,GAAaI,KAAA,CAAMC,IAAI,CAACT,aAAA;IAE9B,IAAII,UAAA,CAAWC,MAAM,EAAE;MACrB,OAAO,uCAAuCD,UAAA,CAAWM,IAAI,CAAC;IAChE;IAEA,OAAO;EACT;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,kGAqB3B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,kGAuB3B,CAAA"}
@@ -4,6 +4,7 @@ import { createServerFeature } from '../../../../utilities/createServerFeature.j
4
4
  import { createNode } from '../../../typeUtilities.js';
5
5
  import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
6
6
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
7
+ import { listItemValidation, listValidation } from '../../shared/validate.js';
7
8
  import { i18n } from './i18n.js';
8
9
  export const ChecklistFeature = createServerFeature({
9
10
  feature: ({
@@ -15,10 +16,12 @@ export const ChecklistFeature = createServerFeature({
15
16
  markdownTransformers: [CHECK_LIST],
16
17
  nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap) ? [createNode({
17
18
  jsonSchema: listNodeJSONSchema,
18
- node: ListNode
19
+ node: ListNode,
20
+ validations: [listValidation]
19
21
  }), createNode({
20
22
  jsonSchema: listItemNodeJSONSchema,
21
- node: ListItemNode
23
+ node: ListItemNode,
24
+ validations: [listItemValidation]
22
25
  })] : []
23
26
  };
24
27
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","CHECK_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { CHECK_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,UAAU,QAAQ;AAE3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBN,mBAAA,CAAoB;EAClDO,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACX,UAAA,CAAW;MAClCY,KAAA,EAAOP,2BAAA,CAA4B,aAAaI,kBAAA,IAC5C,CACEP,UAAA,CAAW;QACTW,UAAA,EAAYT,kBAAA;QACZU,IAAA,EAAMf;MACR,IACAG,UAAA,CAAW;QACTW,UAAA,EAAYV,sBAAA;QACZW,IAAA,EAAMhB;MACR,GACD,GACD;IACN;EACF;EACAiB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","CHECK_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","listItemValidation","listValidation","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","validations","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { CHECK_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { listItemValidation, listValidation } from '../../shared/validate.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n validations: [listValidation],\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n validations: [listItemValidation],\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,UAAU,QAAQ;AAE3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,kBAAkB,EAAEC,cAAc,QAAQ;AACnD,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBR,mBAAA,CAAoB;EAClDS,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACb,UAAA,CAAW;MAClCc,KAAA,EAAOT,2BAAA,CAA4B,aAAaM,kBAAA,IAC5C,CACET,UAAA,CAAW;QACTa,UAAA,EAAYX,kBAAA;QACZY,IAAA,EAAMjB,QAAA;QACNkB,WAAA,EAAa,CAACV,cAAA;MAChB,IACAL,UAAA,CAAW;QACTa,UAAA,EAAYZ,sBAAA;QACZa,IAAA,EAAMlB,YAAA;QACNmB,WAAA,EAAa,CAACX,kBAAA;MAChB,GACD,GACD;IACN;EACF;EACAY,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,kGAqB7B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,kBAAkB,kGAuB7B,CAAA"}
@@ -4,6 +4,7 @@ import { createServerFeature } from '../../../../utilities/createServerFeature.j
4
4
  import { createNode } from '../../../typeUtilities.js';
5
5
  import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
6
6
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
7
+ import { listItemValidation, listValidation } from '../../shared/validate.js';
7
8
  import { i18n } from './i18n.js';
8
9
  export const OrderedListFeature = createServerFeature({
9
10
  feature: ({
@@ -15,10 +16,12 @@ export const OrderedListFeature = createServerFeature({
15
16
  markdownTransformers: [ORDERED_LIST],
16
17
  nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap) ? [createNode({
17
18
  jsonSchema: listNodeJSONSchema,
18
- node: ListNode
19
+ node: ListNode,
20
+ validations: [listValidation]
19
21
  }), createNode({
20
22
  jsonSchema: listItemNodeJSONSchema,
21
- node: ListItemNode
23
+ node: ListItemNode,
24
+ validations: [listItemValidation]
22
25
  })] : []
23
26
  };
24
27
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","ORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { ORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAE7B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBN,mBAAA,CAAoB;EACpDO,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACX,YAAA,CAAa;MACpCY,KAAA,EAAOP,2BAAA,CAA4B,WAAWI,kBAAA,IAC1C,CACEP,UAAA,CAAW;QACTW,UAAA,EAAYT,kBAAA;QACZU,IAAA,EAAMf;MACR,IACAG,UAAA,CAAW;QACTW,UAAA,EAAYV,sBAAA;QACZW,IAAA,EAAMhB;MACR,GACD,GACD;IACN;EACF;EACAiB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","ORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","listItemValidation","listValidation","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","validations","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { ORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { listItemValidation, listValidation } from '../../shared/validate.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n validations: [listValidation],\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n validations: [listItemValidation],\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAE7B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,kBAAkB,EAAEC,cAAc,QAAQ;AACnD,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBR,mBAAA,CAAoB;EACpDS,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACb,YAAA,CAAa;MACpCc,KAAA,EAAOT,2BAAA,CAA4B,WAAWM,kBAAA,IAC1C,CACET,UAAA,CAAW;QACTa,UAAA,EAAYX,kBAAA;QACZY,IAAA,EAAMjB,QAAA;QACNkB,WAAA,EAAa,CAACV,cAAA;MAChB,IACAL,UAAA,CAAW;QACTa,UAAA,EAAYZ,sBAAA;QACZa,IAAA,EAAMlB,YAAA;QACNmB,WAAA,EAAa,CAACX,kBAAA;MAChB,GACD,GACD;IACN;EACF;EACAY,GAAA,EAAK;AACP","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export declare const ALLOWED_LIST_TAGS: Set<string>;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,aAAwB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const ALLOWED_LIST_TAGS = new Set(['ol', 'ul']);
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","names":["ALLOWED_LIST_TAGS","Set"],"sources":["../../../../src/features/lists/shared/constants.ts"],"sourcesContent":["export const ALLOWED_LIST_TAGS = new Set(['ol', 'ul'])\n"],"mappings":"AAAA,OAAO,MAAMA,iBAAA,GAAoB,IAAIC,GAAA,CAAI,CAAC,MAAM,KAAK","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB,CAAC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CACjG,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAkBD,eAAO,MAAM,kBAAkB,EAAE,YAiBhC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAepC,CAAA"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB,CACjC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAkBD,eAAO,MAAM,kBAAkB,EAAE,YAiBhC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAepC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":["SERIALIZED_LIST_NODE_TS","SERIALIZED_LIST_ITEM_NODE_TS","listNodeJSONSchema","elementNodeSchema","nodeUnionName","typeStringDefinitions","add","nodeType","properties","checked","type","listType","enum","start","tag","required","tsType","listItemNodeJSONSchema","value"],"sources":["../../../../src/features/lists/shared/schema.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\n\nexport interface SerializedListItemNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n checked?: boolean\n type: 'listitem'\n value: number\n}\n\nexport interface SerializedListNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode>\n extends SerializedLexicalElementBase<TChildren> {\n checked?: boolean\n listType: 'bullet' | 'check' | 'number'\n start: number\n tag: 'ol' | 'ul'\n type: 'list'\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedListNode` declared above. */\nconst SERIALIZED_LIST_NODE_TS = `export interface SerializedListNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'list';\n checked?: boolean;\n listType: 'number' | 'bullet' | 'check';\n start: number;\n tag: 'ul' | 'ol';\n}`\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedListItemNode` declared above. */\nconst SERIALIZED_LIST_ITEM_NODE_TS = `export interface SerializedListItemNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'listitem';\n checked?: boolean;\n value: number;\n}`\n\nexport const listNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(SERIALIZED_LIST_NODE_TS)\n return elementNodeSchema({\n nodeType: 'list',\n properties: {\n checked: { type: 'boolean' },\n listType: { type: 'string', enum: ['number', 'bullet', 'check'] },\n start: { type: 'integer' },\n tag: { type: 'string', enum: ['ul', 'ol'] },\n },\n required: ['listType', 'start', 'tag'],\n tsType: `SerializedListNode<${nodeUnionName}>`,\n })\n}\n\nexport const listItemNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(SERIALIZED_LIST_ITEM_NODE_TS)\n return elementNodeSchema({\n nodeType: 'listitem',\n properties: {\n checked: { type: 'boolean' },\n value: { type: 'integer' },\n },\n required: ['value'],\n tsType: `SerializedListItemNode<${nodeUnionName}>`,\n })\n}\n"],"mappings":"AAsBA,4FACA,MAAMA,uBAAA,GAA0B;;;;;;EAM9B;AAEF;AACA,MAAMC,4BAAA,GAA+B;;;;EAInC;AAEF,OAAO,MAAMC,kBAAA,GAAmCA,CAAC;EAC/CC,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACN,uBAAA;EAC1B,OAAOG,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,IAAA,EAAM;MAAU;MAC3BC,QAAA,EAAU;QAAED,IAAA,EAAM;QAAUE,IAAA,EAAM,CAAC,UAAU,UAAU;MAAS;MAChEC,KAAA,EAAO;QAAEH,IAAA,EAAM;MAAU;MACzBI,GAAA,EAAK;QAAEJ,IAAA,EAAM;QAAUE,IAAA,EAAM,CAAC,MAAM;MAAM;IAC5C;IACAG,QAAA,EAAU,CAAC,YAAY,SAAS,MAAM;IACtCC,MAAA,EAAQ,sBAAsBZ,aAAA;EAChC;AACF;AAEA,OAAO,MAAMa,sBAAA,GAAuCA,CAAC;EACnDd,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACL,4BAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,IAAA,EAAM;MAAU;MAC3BQ,KAAA,EAAO;QAAER,IAAA,EAAM;MAAU;IAC3B;IACAK,QAAA,EAAU,CAAC,QAAQ;IACnBC,MAAA,EAAQ,0BAA0BZ,aAAA;EACpC;AACF","ignoreList":[]}
1
+ {"version":3,"file":"schema.js","names":["SERIALIZED_LIST_NODE_TS","SERIALIZED_LIST_ITEM_NODE_TS","listNodeJSONSchema","elementNodeSchema","nodeUnionName","typeStringDefinitions","add","nodeType","properties","checked","type","listType","enum","start","tag","required","tsType","listItemNodeJSONSchema","value"],"sources":["../../../../src/features/lists/shared/schema.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\n\nexport interface SerializedListItemNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n checked?: boolean\n type: 'listitem'\n value: number\n}\n\nexport interface SerializedListNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n checked?: boolean\n listType: 'bullet' | 'check' | 'number'\n start: number\n tag: 'ol' | 'ul'\n type: 'list'\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedListNode` declared above. */\nconst SERIALIZED_LIST_NODE_TS = `export interface SerializedListNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'list';\n checked?: boolean;\n listType: 'number' | 'bullet' | 'check';\n start: number;\n tag: 'ul' | 'ol';\n}`\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedListItemNode` declared above. */\nconst SERIALIZED_LIST_ITEM_NODE_TS = `export interface SerializedListItemNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'listitem';\n checked?: boolean;\n value: number;\n}`\n\nexport const listNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(SERIALIZED_LIST_NODE_TS)\n return elementNodeSchema({\n nodeType: 'list',\n properties: {\n checked: { type: 'boolean' },\n listType: { type: 'string', enum: ['number', 'bullet', 'check'] },\n start: { type: 'integer' },\n tag: { type: 'string', enum: ['ul', 'ol'] },\n },\n required: ['listType', 'start', 'tag'],\n tsType: `SerializedListNode<${nodeUnionName}>`,\n })\n}\n\nexport const listItemNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(SERIALIZED_LIST_ITEM_NODE_TS)\n return elementNodeSchema({\n nodeType: 'listitem',\n properties: {\n checked: { type: 'boolean' },\n value: { type: 'integer' },\n },\n required: ['value'],\n tsType: `SerializedListItemNode<${nodeUnionName}>`,\n })\n}\n"],"mappings":"AAuBA,4FACA,MAAMA,uBAAA,GAA0B;;;;;;EAM9B;AAEF;AACA,MAAMC,4BAAA,GAA+B;;;;EAInC;AAEF,OAAO,MAAMC,kBAAA,GAAmCA,CAAC;EAC/CC,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACN,uBAAA;EAC1B,OAAOG,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,IAAA,EAAM;MAAU;MAC3BC,QAAA,EAAU;QAAED,IAAA,EAAM;QAAUE,IAAA,EAAM,CAAC,UAAU,UAAU;MAAS;MAChEC,KAAA,EAAO;QAAEH,IAAA,EAAM;MAAU;MACzBI,GAAA,EAAK;QAAEJ,IAAA,EAAM;QAAUE,IAAA,EAAM,CAAC,MAAM;MAAM;IAC5C;IACAG,QAAA,EAAU,CAAC,YAAY,SAAS,MAAM;IACtCC,MAAA,EAAQ,sBAAsBZ,aAAA;EAChC;AACF;AAEA,OAAO,MAAMa,sBAAA,GAAuCA,CAAC;EACnDd,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACL,4BAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,IAAA,EAAM;MAAU;MAC3BQ,KAAA,EAAO;QAAER,IAAA,EAAM;MAAU;IAC3B;IACAK,QAAA,EAAU,CAAC,QAAQ;IACnBC,MAAA,EAAQ,0BAA0BZ,aAAA;EACpC;AACF","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ import type { SerializedListItemNode, SerializedListNode } from '@lexical/list';
2
+ import type { NodeValidation } from '../../typesServer.js';
3
+ export declare const listItemValidation: NodeValidation<SerializedListItemNode>;
4
+ export declare const listValidation: NodeValidation<SerializedListNode>;
5
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAE/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAI1D,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,sBAAsB,CAMrE,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,kBAAkB,CAE7D,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { ALLOWED_LIST_TAGS } from './constants.js';
2
+ export const listItemValidation = ({
3
+ node
4
+ }) => {
5
+ if (typeof node.value !== 'number' || !Number.isFinite(node.value)) {
6
+ return 'List item value must be a finite number.';
7
+ }
8
+ return true;
9
+ };
10
+ export const listValidation = ({
11
+ node
12
+ }) => {
13
+ return ALLOWED_LIST_TAGS.has(node.tag) ? true : 'List tag must be one of ol, ul.';
14
+ };
15
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.js","names":["ALLOWED_LIST_TAGS","listItemValidation","node","value","Number","isFinite","listValidation","has","tag"],"sources":["../../../../src/features/lists/shared/validate.ts"],"sourcesContent":["import type { SerializedListItemNode, SerializedListNode } from '@lexical/list'\n\nimport type { NodeValidation } from '../../typesServer.js'\n\nimport { ALLOWED_LIST_TAGS } from './constants.js'\n\nexport const listItemValidation: NodeValidation<SerializedListItemNode> = ({ node }) => {\n if (typeof node.value !== 'number' || !Number.isFinite(node.value)) {\n return 'List item value must be a finite number.'\n }\n\n return true\n}\n\nexport const listValidation: NodeValidation<SerializedListNode> = ({ node }) => {\n return ALLOWED_LIST_TAGS.has(node.tag) ? true : 'List tag must be one of ol, ul.'\n}\n"],"mappings":"AAIA,SAASA,iBAAiB,QAAQ;AAElC,OAAO,MAAMC,kBAAA,GAA6DA,CAAC;EAAEC;AAAI,CAAE;EACjF,IAAI,OAAOA,IAAA,CAAKC,KAAK,KAAK,YAAY,CAACC,MAAA,CAAOC,QAAQ,CAACH,IAAA,CAAKC,KAAK,GAAG;IAClE,OAAO;EACT;EAEA,OAAO;AACT;AAEA,OAAO,MAAMG,cAAA,GAAqDA,CAAC;EAAEJ;AAAI,CAAE;EACzE,OAAOF,iBAAA,CAAkBO,GAAG,CAACL,IAAA,CAAKM,GAAG,IAAI,OAAO;AAClD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,kGAiB/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,oBAAoB,kGAmB/B,CAAA"}
@@ -3,6 +3,7 @@ import { UNORDERED_LIST } from '@lexical/markdown';
3
3
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
4
4
  import { createNode } from '../../../typeUtilities.js';
5
5
  import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
6
+ import { listItemValidation, listValidation } from '../../shared/validate.js';
6
7
  import { i18n } from './i18n.js';
7
8
  export const UnorderedListFeature = createServerFeature({
8
9
  feature: {
@@ -11,10 +12,12 @@ export const UnorderedListFeature = createServerFeature({
11
12
  markdownTransformers: [UNORDERED_LIST],
12
13
  nodes: [createNode({
13
14
  jsonSchema: listNodeJSONSchema,
14
- node: ListNode
15
+ node: ListNode,
16
+ validations: [listValidation]
15
17
  }), createNode({
16
18
  jsonSchema: listItemNodeJSONSchema,
17
- node: ListItemNode
19
+ node: ListItemNode,
20
+ validations: [listItemValidation]
18
21
  })]
19
22
  },
20
23
  key: 'unorderedList'
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","UNORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBL,mBAAA,CAAoB;EACtDM,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACT,cAAA,CAAe;IACtCU,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,UAAA,EAAYP,kBAAA;MACZQ,IAAA,EAAMb;IACR,IACAG,UAAA,CAAW;MACTS,UAAA,EAAYR,sBAAA;MACZS,IAAA,EAAMd;IACR;EAEJ;EACAe,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","UNORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","listItemValidation","listValidation","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","jsonSchema","node","validations","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { listItemValidation, listValidation } from '../../shared/validate.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n validations: [listValidation],\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n validations: [listItemValidation],\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,kBAAkB,EAAEC,cAAc,QAAQ;AACnD,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBP,mBAAA,CAAoB;EACtDQ,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACX,cAAA,CAAe;IACtCY,KAAA,EAAO,CACLV,UAAA,CAAW;MACTW,UAAA,EAAYT,kBAAA;MACZU,IAAA,EAAMf,QAAA;MACNgB,WAAA,EAAa,CAACT,cAAA;IAChB,IACAJ,UAAA,CAAW;MACTW,UAAA,EAAYV,sBAAA;MACZW,IAAA,EAAMhB,YAAA;MACNiB,WAAA,EAAa,CAACV,kBAAA;IAChB;EAEJ;EACAW,GAAA,EAAK;AACP","ignoreList":[]}
@@ -11,7 +11,6 @@
11
11
  background: var(--color-bg);
12
12
  border: var(--stroke-width-small) solid var(--color-border);
13
13
  border-radius: var(--radius-medium);
14
- font-family: var(--font-body);
15
14
  margin-block: var(--spacer-2);
16
15
  color: var(--color-text);
17
16
 
@@ -42,7 +41,6 @@
42
41
  }
43
42
 
44
43
  .LexicalEditorTheme__relationship__label {
45
- font-family: var(--text-body-small-font-family);
46
44
  font-size: var(--text-body-small-font-size);
47
45
  font-weight: var(--text-body-small-font-weight);
48
46
  line-height: var(--text-body-small-line-height);
@@ -55,10 +53,9 @@
55
53
  }
56
54
 
57
55
  .LexicalEditorTheme__relationship__title {
58
- font-family: var(--text-body-medium-strong-font-family);
59
- font-size: var(--text-body-medium-strong-font-size);
60
- font-weight: var(--text-body-medium-strong-font-weight);
61
- line-height: var(--text-body-medium-strong-line-height);
56
+ font-size: var(--text-body-medium-bold-font-size);
57
+ font-weight: var(--text-body-medium-bold-font-weight);
58
+ line-height: var(--text-body-medium-bold-line-height);
62
59
  letter-spacing: var(--text-body-medium-letter-spacing);
63
60
  color: var(--color-text);
64
61
  margin: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","toast","$getNodeByKey","COMMAND_PRIORITY_EDITOR","React","useCallback","useEffect","useState","useLexicalListDrawer","$createRelationshipNode","INSERT_RELATIONSHIP_COMMAND","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","insertRelationship","editor","relationTo","replaceNodeKey","value","dispatchCommand","update","node","replace","RelationshipDrawerComponent","t0","$","enabledCollectionSlugs","setReplaceNodeKey","t1","t2","collectionSlugs","selectedCollection","closeListDrawer","ListDrawer","openListDrawer","t3","t4","registerCommand","payload","nodeKey","t5","t6","collectionSlug","doc","id","onSelect","_jsx","RelationshipDrawerComponentFallback","_temp","RelationshipDrawer","length","error"],"sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { CollectionSlug } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { type ListDrawerProps, toast } from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport { useLexicalListDrawer } from '../../../../utilities/fieldsDrawer/useLexicalListDrawer.js'\nimport { $createRelationshipNode } from '../nodes/RelationshipNode.js'\nimport { INSERT_RELATIONSHIP_COMMAND } from '../plugins/index.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './commands.js'\n\nconst insertRelationship = ({\n editor,\n relationTo,\n replaceNodeKey,\n value,\n}: {\n editor: LexicalEditor\n relationTo: string\n replaceNodeKey: null | string\n value: number | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_COMMAND, {\n relationTo,\n value,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace($createRelationshipNode({ relationTo, value }))\n }\n })\n }\n}\n\ntype Props = {\n enabledCollectionSlugs: CollectionSlug[]\n}\n\nconst RelationshipDrawerComponent: React.FC<Props> = ({ enabledCollectionSlugs }) => {\n const [editor] = useLexicalComposerContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n\n const { closeListDrawer, ListDrawer, openListDrawer } = useLexicalListDrawer({\n collectionSlugs: enabledCollectionSlugs,\n selectedCollection: enabledCollectionSlugs?.[0],\n })\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openListDrawer()\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, openListDrawer])\n\n const onSelect = useCallback<NonNullable<ListDrawerProps['onSelect']>>(\n ({ collectionSlug, doc }) => {\n insertRelationship({\n editor,\n relationTo: collectionSlug,\n replaceNodeKey,\n value: doc.id,\n })\n closeListDrawer()\n },\n [editor, closeListDrawer, replaceNodeKey],\n )\n\n return <ListDrawer onSelect={onSelect} />\n}\n\nconst RelationshipDrawerComponentFallback: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND,\n () => {\n toast.error('No relationship collections enabled')\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return null\n}\n\nexport const RelationshipDrawer = ({ enabledCollectionSlugs }: Props): React.ReactNode => {\n if (!enabledCollectionSlugs?.length) {\n return <RelationshipDrawerComponentFallback />\n }\n\n return <RelationshipDrawerComponent enabledCollectionSlugs={enabledCollectionSlugs} />\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAIA,SAASC,yBAAyB,QAAQ;AAC1C,SAA+BC,KAAK,QAAQ;AAC5C,SAASC,aAAa,EAAEC,uBAAuB,QAAQ;AACvD,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ;AAExD,SAASC,oBAAoB,QAAQ;AACrC,SAASC,uBAAuB,QAAQ;AACxC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,uCAAuC,QAAQ;AAExD,MAAMC,kBAAA,GAAqBA,CAAC;EAC1BC,MAAM;EACNC,UAAU;EACVC,cAAc;EACdC;AAAK,CAMN;EACC,IAAI,CAACD,cAAA,EAAgB;IACnBF,MAAA,CAAOI,eAAe,CAACP,2BAAA,EAA6B;MAClDI,UAAA;MACAE;IACF;EACF,OAAO;IACLH,MAAA,CAAOK,MAAM,CAAC;MACZ,MAAMC,IAAA,GAAOjB,aAAA,CAAca,cAAA;MAC3B,IAAII,IAAA,EAAM;QACRA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;AAAsB,CAAS;EAClE,IAAI,CAACA,sBAAA,EAAwBwB,MAAA,EAAQ;IACnC,oBAAOJ,IAAA,CAACC,mCAAA;EACV;EAEA,oBAAOD,IAAA,CAACvB,2BAAA;IAA4BG,sBAAA,EAAwBA;;AAC9D;AAzBsD,SAAAsB,MAAA;EAS9C7C,KAAA,CAAAgD,KAAA,CAAY;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","toast","$getNodeByKey","COMMAND_PRIORITY_EDITOR","React","useCallback","useEffect","useState","useLexicalListDrawer","$createRelationshipNode","INSERT_RELATIONSHIP_COMMAND","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","insertRelationship","editor","relationTo","replaceNodeKey","value","dispatchCommand","update","node","replace","RelationshipDrawerComponent","t0","$","enabledCollectionSlugs","setReplaceNodeKey","t1","t2","collectionSlugs","selectedCollection","closeListDrawer","ListDrawer","openListDrawer","t3","t4","registerCommand","payload","nodeKey","t5","t6","collectionSlug","doc","id","onSelect","_jsx","RelationshipDrawerComponentFallback","_temp","RelationshipDrawer","length","error"],"sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { CollectionSlug } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { type ListDrawerProps, toast } from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport { useLexicalListDrawer } from '../../../../utilities/fieldsDrawer/useLexicalListDrawer.js'\nimport { $createRelationshipNode } from '../nodes/RelationshipNode.js'\nimport { INSERT_RELATIONSHIP_COMMAND } from '../plugins/index.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './commands.js'\n\nconst insertRelationship = ({\n editor,\n relationTo,\n replaceNodeKey,\n value,\n}: {\n editor: LexicalEditor\n relationTo: string\n replaceNodeKey: null | string\n value: number | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_COMMAND, {\n relationTo,\n value,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace($createRelationshipNode({ relationTo, value }))\n }\n })\n }\n}\n\ntype Props = {\n enabledCollectionSlugs: CollectionSlug[]\n}\n\nconst RelationshipDrawerComponent: React.FC<Props> = ({ enabledCollectionSlugs }) => {\n const [editor] = useLexicalComposerContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n\n const { closeListDrawer, ListDrawer, openListDrawer } = useLexicalListDrawer({\n collectionSlugs: enabledCollectionSlugs,\n selectedCollection: enabledCollectionSlugs?.[0],\n })\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openListDrawer()\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, openListDrawer])\n\n const onSelect = useCallback<NonNullable<ListDrawerProps['onSelect']>>(\n ({ collectionSlug, doc }) => {\n insertRelationship({\n editor,\n relationTo: collectionSlug,\n replaceNodeKey,\n value: doc.id,\n })\n closeListDrawer()\n },\n [editor, closeListDrawer, replaceNodeKey],\n )\n\n return <ListDrawer onSelect={onSelect} />\n}\n\nconst RelationshipDrawerComponentFallback: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND,\n () => {\n toast.error('No relationship collections enabled')\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return null\n}\n\nexport const RelationshipDrawer = ({ enabledCollectionSlugs }: Props): React.ReactNode => {\n if (!enabledCollectionSlugs?.length) {\n return <RelationshipD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A;EATF,MAAAoB,QAAA,GAAiBL,EAU0B;EAAA,IAAAC,EAAA;EAAA,IAAAhB,CAAA,SAAAQ,UAAA,IAAAR,CAAA,SAAAoB,QAAA;IAGpCJ,EAAA,GAAAK,IAAA,CAACb,UAAA;MAAAY;;;;;;;;SAADJ,E;CACT;AAEA,MAAMM,mCAAA,GAAgDA,CAAA;EAAA,MAAAtB,CAAA,GAAAxB,EAAA;EACpD,OAAAc,MAAA,IAAiBb,yBAAA;EAAA,IAAAsB,EAAA;EAAA,IAAAI,EAAA;EAAA,IAAAH,CAAA,QAAAV,MAAA;IAEPS,EAAA,GAAAA,CAAA,KACDT,MAAA,CAAAsB,eAAsB,CAG3BxB,uCAAA,EACAmC,KAGA,EACA3C,uBAAA,CAEJ;IAAGuB,EAAA,IAACb,MAAA,CAAO;IAAAU,CAAA,MAAAV,MAAA;IAAAU,CAAA,MAAAD,EAAA;IAAAC,CAAA,MAAAG,EAAA;EAAA;IAAAJ,EAAA,GAAAC,CAAA;IAAAG,EAAA,GAAAH,CAAA;EAAA;EAXXjB,SAAA,CAAUgB,EAWV,EAAGI,EAAQ;EAAA,OAEJ;AAAA,CACT;AAEA,OAAO,MAAMqB,kBAAA,GAAqBA,CAAC;EAAEvB;AAAsB,CAAS;EAClE,IAAI,CAACA,sBAAA,EAAwBwB,MAAA,EAAQ;IACnC,oBAAOJ,IAAA,CAACC,mCAAA;EACV;EAEA,oBAAOD,IAAA,CAACvB,2BAAA;IAA4BG,sBAAA,EAAwBA;;AAC9D;AAzBsD,SAAAsB,MAAA;EAS9C7C,KAAA,CAAAgD,KAAW,CAAC;EAAA,OACL;AAAA","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import type { RelationshipFeatureProps } from '../server/index.js';
2
- export declare const RelationshipFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<RelationshipFeatureProps, RelationshipFeatureProps>;
1
+ import type { RelationshipFeatureClientProps } from '../server/index.js';
2
+ export declare const RelationshipFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<RelationshipFeatureClientProps, RelationshipFeatureClientProps>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/client/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAUlE,eAAO,MAAM,yBAAyB,kHAuDpC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/client/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAA;AAUxE,eAAO,MAAM,yBAAyB,8HAuDpC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isNodeSelection","RelationshipIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","$isRelationshipNode","RelationshipNode","RelationshipPlugin","RelationshipFeatureClient","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","replace","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode"],"sources":["../../../../src/features/relationship/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { RelationshipFeatureProps } from '../server/index.js'\n\nimport { RelationshipIcon } from '../../../lexical/ui/icons/Relationship/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isRelationshipNode, RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nexport const RelationshipFeatureClient = createClientFeature<RelationshipFeatureProps>({\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: RelationshipPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: RelationshipIcon,\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: RelationshipIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isRelationshipNode(firstNode)\n },\n key: 'relationship',\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,gBAAgB,QAAQ;AAIjC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,uCAAuC,QAAQ;AACxD,SAASC,mBAAmB,EAAEC,gBAAgB,QAAQ;AACtD,SAASC,kBAAkB,QAAQ;AAEnC,OAAO,MAAMC,yBAAA,GAA4BP,mBAAA,CAA8C;EACrFQ,KAAA,EAAO,CAACH,gBAAA,CAAiB;EACzBI,OAAA,EAAS,CACP;IACEC,SAAA,EAAWJ,kBAAA;IACXK,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACNZ,4BAAA,CAA6B,CAC3B;MACEa,IAAA,EAAMf,gBAAA;MACNgB,GAAA,EAAK;MACLC,QAAA,EAAU,CAAC,gBAAgB,YAAY,MAAM;MAC7CC,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;EACAC,YAAA,EAAc;IACZX,MAAA,EAAQ,CACNX,gCAAA,CAAiC,CAC/B;MACEuB,cAAA,EAAgB1B,gBAAA;MAChB2B,QAAA,EAAUA,CAAC;QAAEC;MAAS,CAAE;QACtB,IAAI,CAAC7B,gBAAA,CAAiB6B,SAAA,KAAc,CAACA,SAAA,CAAUC,QAAQ,GAAGC,MAAM,EAAE;UAChE,OAAO;QACT;QAEA,MAAMC,SAAA,GAAYH,SAAA,CAAUC,QAAQ,EAAE,CAAC,EAAE;QACzC,OAAOxB,mBAAA,CAAoB0B,SAAA;MAC7B;MACAf,GAAA,EAAK;MACLE,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isNodeSelection","RelationshipIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","$isRelationshipNode","RelationshipNode","RelationshipPlugin","RelationshipFeatureClient","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","replace","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode"],"sources":["../../../../src/features/relationship/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { RelationshipFeatureClientProps } from '../server/index.js'\n\nimport { RelationshipIcon } from '../../../lexical/ui/icons/Relationship/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isRelationshipNode, RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nexport const RelationshipFeatureClient = createClientFeature<RelationshipFeatureClientProps>({\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: RelationshipPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: RelationshipIcon,\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: RelationshipIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isRelationshipNode(firstNode)\n },\n key: 'relationship',\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSER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AA,CAAoB0B,SAAA;MAC7B;MACAf,GAAA,EAAK;MACLE,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAsB/E,qBAAa,gBAAiB,SAAQ,sBAAsB;IAC1D,OAAgB,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB,CAE1E;IAED,OAAgB,OAAO,IAAI,MAAM,CAEhC;IAED,OAAgB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI,CAenE;IAED,OAAgB,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB,CAYvF;IAEQ,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAS1E;IAEQ,UAAU,IAAI,0BAA0B,CAEhD;CACF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
1
+ {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAsB/E,qBAAa,gBAAiB,SAAQ,sBAAsB;IAC1D,OAAgB,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB,CAE1E;IAED,OAAgB,OAAO,IAAI,MAAM,CAEhC;IAED,OAAgB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI,CAenE;IAED,OAAgB,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB,CAQvF;IAEQ,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAS1E;IAEQ,UAAU,IAAI,0BAA0B,CAEhD;CACF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
@@ -42,9 +42,6 @@ export class RelationshipNode extends RelationshipServerNode {
42
42
  };
43
43
  }
44
44
  static importJSON(serializedNode) {
45
- if (serializedNode.version === 1 && serializedNode?.value?.id) {
46
- serializedNode.value = serializedNode.value.id;
47
- }
48
45
  const importedData = {
49
46
  relationTo: serializedNode.relationTo,
50
47
  value: serializedNode.value
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.js","names":["$applyNodeReplacement","React","RelationshipServerNode","RelationshipComponent","lazy","then","module","default","$relationshipElementToNode","domNode","id","getAttribute","relationTo","node","$createRelationshipNode","value","RelationshipNode","clone","getType","importDOM","div","hasAttribute","conversion","priority","importJSON","serializedNode","version","importedData","setFormat","format","decorate","editor","config","_jsx","className","theme","relationship","data","__data","__format","nodeKey","getKey","exportJSON","$isRelationshipNode"],"sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"sourcesContent":["'use client'\nimport type { JSX } from 'react'\n\nimport {\n $applyNodeReplacement,\n type DOMConversionMap,\n type DOMConversionOutput,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n} from 'lexical'\nimport * as React from 'react'\n\nimport type { RelationshipData, SerializedRelationshipNode } from '../../server/schema.js'\n\nimport { RelationshipServerNode } from '../../server/nodes/RelationshipNode.js'\n\nconst RelationshipComponent = React.lazy(() =>\n import('../components/RelationshipComponent.js').then((module) => ({\n default: module.RelationshipComponent,\n })),\n)\n\nfunction $relationshipElementToNode(domNode: HTMLDivElement): DOMConversionOutput | null {\n const id = domNode.getAttribute('data-lexical-relationship-id')\n const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo')\n\n if (id != null && relationTo != null) {\n const node = $createRelationshipNode({\n relationTo,\n value: id,\n })\n return { node }\n }\n return null\n}\n\nexport class RelationshipNode extends RelationshipServerNode {\n static override clone(node: RelationshipServerNode): RelationshipServerNode {\n return super.clone(node)\n }\n\n static override getType(): string {\n return super.getType()\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {\n div: (domNode: HTMLDivElement) => {\n if (\n !domNode.hasAttribute('data-lexical-relationship-relationTo') ||\n !domNode.hasAttribute('data-lexical-relationship-id')\n ) {\n return null\n }\n return {\n conversion: $relationshipElementToNode,\n priority: 2,\n }\n },\n }\n }\n\n static override importJSON(serializedNode: SerializedRelationshipNode): RelationshipNode {\n if (serializedNode.version === 1 && (serializedNode?.value as unknown as { id: string })?.id) {\n serializedNode.value = (serializedNode.value as unknown as { id: string }).id\n }\n\n const importedData: RelationshipData = {\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n const node = $createRelationshipNode(importedData)\n node.setFormat(serializedNode.format)\n return node\n }\n\n override decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return (\n <RelationshipComponent\n className={config.theme.relationship ?? 'LexicalEditorTheme__relationship'}\n data={this.__data}\n format={this.__format}\n nodeKey={this.getKey()}\n />\n )\n }\n\n override exportJSON(): SerializedRelationshipNode {\n return super.exportJSON()\n }\n}\n\nexport function $createRelationshipNode(data: RelationshipData): RelationshipNode {\n return $applyNodeReplacement(\n new RelationshipNode({\n data,\n }),\n )\n}\n\nexport function $isRelationshipNode(\n node: LexicalNode | null | RelationshipNode | undefined,\n): node is RelationshipNode {\n return node instanceof RelationshipNode\n}\n"],"mappings":"AAAA;;;AAGA,SACEA,qBAAqB,QAMhB;AACP,YAAYC,KAAA,MAAW;AAIvB,SAASC,sBAAsB,QAAQ;AAEvC,MAAMC,qBAAA,gBAAwBF,KAAA,CAAMG,IAAI,CAAC,MACvC,MAAM,CAAC,0CAA0CC,IAAI,CAAEC,MAAA,KAAY;EACjEC,OAAA,EAASD,MAAA,CAAOH;AAClB;AAGF,SAASK,2BAA2BC,OAAuB;EACzD,MAAMC,EAAA,GAAKD,OAAA,CAAQE,YAAY,CAAC;EAChC,MAAMC,UAAA,GAAaH,OAAA,CAAQE,YAAY,CAAC;EAExC,IAAID,EAAA,IAAM,QAAQE,UAAA,IAAc,MAAM;IACpC,MAAMC,IAAA,GAAOC,uBAAA,CAAwB;MACnCF,UAAA;MACAG,KAAA,EAAOL;IACT;IACA,OAAO;MAAEG;IAAK;EAChB;EACA,OAAO;AACT;AAEA,OAAO,MAAMG,gBAAA,SAAyBd,sBAAA;EACpC,OAAgBe,MAA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J;AAEA,OAAO,SAASM,oBACd9B,IAAuD;EAEvD,OAAOA,IAAA,YAAgBG,gBAAA;AACzB","ignoreList":[]}
1
+ {"version":3,"file":"RelationshipNode.js","names":["$applyNodeReplacement","React","RelationshipServerNode","RelationshipComponent","lazy","then","module","default","$relationshipElementToNode","domNode","id","getAttribute","relationTo","node","$createRelationshipNode","value","RelationshipNode","clone","getType","importDOM","div","hasAttribute","conversion","priority","importJSON","serializedNode","importedData","setFormat","format","decorate","editor","config","_jsx","className","theme","relationship","data","__data","__format","nodeKey","getKey","exportJSON","$isRelationshipNode"],"sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"sourcesContent":["'use client'\nimport type { JSX } from 'react'\n\nimport {\n $applyNodeReplacement,\n type DOMConversionMap,\n type DOMConversionOutput,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n} from 'lexical'\nimport * as React from 'react'\n\nimport type { RelationshipData, SerializedRelationshipNode } from '../../server/schema.js'\n\nimport { RelationshipServerNode } from '../../server/nodes/RelationshipNode.js'\n\nconst RelationshipComponent = React.lazy(() =>\n import('../components/RelationshipComponent.js').then((module) => ({\n default: module.RelationshipComponent,\n })),\n)\n\nfunction $relationshipElementToNode(domNode: HTMLDivElement): DOMConversionOutput | null {\n const id = domNode.getAttribute('data-lexical-relationship-id')\n const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo')\n\n if (id != null && relationTo != null) {\n const node = $createRelationshipNode({\n relationTo,\n value: id,\n })\n return { node }\n }\n return null\n}\n\nexport class RelationshipNode extends RelationshipServerNode {\n static override clone(node: RelationshipServerNode): RelationshipServerNode {\n return super.clone(node)\n }\n\n static override getType(): string {\n return super.getType()\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {\n div: (domNode: HTMLDivElement) => {\n if (\n !domNode.hasAttribute('data-lexical-relationship-relationTo') ||\n !domNode.hasAttribute('data-lexical-relationship-id')\n ) {\n return null\n }\n return {\n conversion: $relationshipElementToNode,\n priority: 2,\n }\n },\n }\n }\n\n static override importJSON(serializedNode: SerializedRelationshipNode): RelationshipNode {\n const importedData: RelationshipData = {\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n const node = $createRelationshipNode(importedData)\n node.setFormat(serializedNode.format)\n return node\n }\n\n override decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return (\n <RelationshipComponent\n className={config.theme.relationship ?? 'LexicalEditorTheme__relationship'}\n data={this.__data}\n format={this.__format}\n nodeKey={this.getKey()}\n />\n )\n }\n\n override exportJSON(): SerializedRelationshipNode {\n return super.exportJSON()\n }\n}\n\nexport function $createRelationshipNode(data: RelationshipData): RelationshipNode {\n return $applyNodeReplacement(\n new RelationshipNode({\n data,\n }),\n )\n}\n\nexport function $isRelationshipNode(\n node: LexicalNode | null | RelationshipNode | undefined,\n): node is RelationshipNode {\n return node instanceof RelationshipNode\n}\n"],"mappings":"AAAA;;;AAGA,SACEA,qBAAqB,QAMhB;AACP,YAAYC,KAAA,MAAW;AAIvB,SAASC,sBAAsB,QAAQ;AAEvC,MAAMC,qBAAA,gBAAwBF,KAAA,CAAMG,IAAI,CAAC,MACvC,MAAM,CAAC,0CAA0CC,IAAI,CAAEC,MAAA,KAAY;EACjEC,OAAA,EAASD,MAAA,CAAOH;AAClB;AAGF,SAASK,2BAA2BC,OAAuB;EACzD,MAAMC,EAAA,GAAKD,OAAA,CAAQE,YAAY,CAAC;EAChC,MAAMC,UAAA,GAAaH,OAAA,CAAQE,YAAY,CAAC;EAExC,IAAID,EAAA,IAAM,QAAQE,UAAA,IAAc,MAAM;IACpC,MAAMC,IAAA,GAAOC,uBAAA,CAAwB;MACnCF,UAAA;MACAG,KAAA,EAAOL;IACT;IACA,OAAO;MAAEG;IAAK;EAChB;EACA,OAAO;AACT;AAEA,OAAO,MAAMG,gBAAA,SAAyBd,sBAAA;EACpC,OAAgBe,MAAMJ,IAA4B,EAA0B;IAC1E,OAAO,KAAK,CAACI,KAAA,CAAMJ,IAAA;EACrB;EAEA,OAAgBK,QAAA,EAAkB;IAChC,OAAO,KAAK,CAACA,OAAA;EACf;EAEA,OAAgBC,UAAA,EAAqD;IACnE,OAAO;MACLC,GAAA,EAAMX,OAAA;QACJ,IACE,CAACA,OAAA,CAAQY,YAAY,CAAC,2CACtB,CAACZ,OAAA,CAAQY,YAAY,CAAC,iCACtB;UACA,OAAO;QACT;QACA,OAAO;UACLC,UAAA,EAAYd,0BAAA;UACZe,QAAA,EAAU;QACZ;MACF;IACF;EACF;EAEA,OAAgBC,WAAWC,cAA0C,EAAoB;IACvF,MAAMC,YAAA,GAAiC;MACrCd,UAAA,EAAYa,cAAA,CAAeb,UAAU;MACrCG,KAAA,EAAOU,cAAA,CAAeV;IACxB;IACA,MAAMF,IAAA,GAAOC,uBAAA,CAAwBY,YAAA;IACrCb,IAAA,CAAKc,SAAS,CAACF,cAAA,CAAeG,MAAM;IACpC,OAAOf,IAAA;EACT;EAESgB,SAASC,MAAqB,EAAEC,MAAoB,EAAe;IAC1E,oBACEC,IAAA,CAAC7B,qBAAA;MACC8B,SAAA,EAAWF,MAAA,CAAOG,KAAK,CAACC,YAAY,IAAI;MACxCC,IAAA,EAAM,IAAI,CAACC,MAAM;MACjBT,MAAA,EAAQ,IAAI,CAACU,QAAQ;MACrBC,OAAA,EAAS,IAAI,CAACC,MAAM;;EAG1B;EAESC,WAAA,EAAyC;IAChD,OAAO,KAAK,CAACA,UAAA;EACf;AACF;AAEA,OAAO,SAAS3B,wBAAwBsB,IAAsB;EAC5D,OAAOpC,qBAAA,CACL,IAAIgB,gBAAA,CAAiB;IACnBoB;EACF;AAEJ;AAEA,OAAO,SAASM,oBACd7B,IAAuD;EAEvD,OAAOA,IAAA,YAAgBG,gBAAA;AACzB","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { LexicalCommand } from 'lexical';
2
2
  import type { PluginComponent } from '../../../typesClient.js';
3
- import type { RelationshipFeatureProps } from '../../server/index.js';
3
+ import type { RelationshipFeatureClientProps } from '../../server/index.js';
4
4
  import type { RelationshipData } from '../../server/schema.js';
5
5
  export declare const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData>;
6
- export declare const RelationshipPlugin: PluginComponent<RelationshipFeatureProps>;
6
+ export declare const RelationshipPlugin: PluginComponent<RelationshipFeatureClientProps>;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAc7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAM9D,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,gBAAgB,CAExE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAc7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAM9D,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,gBAAgB,CAExE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,8BAA8B,CAwC9E,CAAA"}
@@ -11,57 +11,53 @@ import { $createRelationshipNode, RelationshipNode } from '../nodes/Relationship
11
11
  import { useEnabledRelationships } from '../utils/useEnabledRelationships.js';
12
12
  export const INSERT_RELATIONSHIP_COMMAND = createCommand('INSERT_RELATIONSHIP_COMMAND');
13
13
  export const RelationshipPlugin = t0 => {
14
- const $ = _c(8);
14
+ const $ = _c(7);
15
15
  const {
16
16
  clientProps
17
17
  } = t0;
18
18
  const [editor] = useLexicalComposerContext();
19
- const t1 = clientProps?.disabledCollections;
20
- const t2 = clientProps?.enabledCollections;
21
- let t3;
22
- if ($[0] !== t1 || $[1] !== t2) {
23
- t3 = {
24
- collectionSlugsBlacklist: t1,
25
- collectionSlugsWhitelist: t2
19
+ let t1;
20
+ if ($[0] !== clientProps.enabledCollectionSlugs) {
21
+ t1 = {
22
+ enabledCollectionSlugs: clientProps.enabledCollectionSlugs
26
23
  };
27
- $[0] = t1;
28
- $[1] = t2;
29
- $[2] = t3;
24
+ $[0] = clientProps.enabledCollectionSlugs;
25
+ $[1] = t1;
30
26
  } else {
31
- t3 = $[2];
27
+ t1 = $[1];
32
28
  }
33
29
  const {
34
30
  enabledCollectionSlugs
35
- } = useEnabledRelationships(t3);
36
- let t4;
37
- let t5;
38
- if ($[3] !== editor) {
39
- t4 = () => {
31
+ } = useEnabledRelationships(t1);
32
+ let t2;
33
+ let t3;
34
+ if ($[2] !== editor) {
35
+ t2 = () => {
40
36
  if (!editor.hasNodes([RelationshipNode])) {
41
37
  throw new Error("RelationshipPlugin: RelationshipNode not registered on editor");
42
38
  }
43
39
  return editor.registerCommand(INSERT_RELATIONSHIP_COMMAND, _temp, COMMAND_PRIORITY_EDITOR);
44
40
  };
45
- t5 = [editor];
46
- $[3] = editor;
47
- $[4] = t4;
48
- $[5] = t5;
41
+ t3 = [editor];
42
+ $[2] = editor;
43
+ $[3] = t2;
44
+ $[4] = t3;
49
45
  } else {
50
- t4 = $[4];
51
- t5 = $[5];
46
+ t2 = $[3];
47
+ t3 = $[4];
52
48
  }
53
- useEffect(t4, t5);
54
- let t6;
55
- if ($[6] !== enabledCollectionSlugs) {
56
- t6 = _jsx(RelationshipDrawer, {
49
+ useEffect(t2, t3);
50
+ let t4;
51
+ if ($[5] !== enabledCollectionSlugs) {
52
+ t4 = _jsx(RelationshipDrawer, {
57
53
  enabledCollectionSlugs
58
54
  });
59
- $[6] = enabledCollectionSlugs;
60
- $[7] = t6;
55
+ $[5] = enabledCollectionSlugs;
56
+ $[6] = t4;
61
57
  } else {
62
- t6 = $[7];
58
+ t4 = $[6];
63
59
  }
64
- return t6;
60
+ return t4;
65
61
  };
66
62
  function _temp(payload) {
67
63
  const selection = $getSelection() || $getPreviousSelection();