@payloadcms/richtext-lexical 4.0.0-internal.4804abd → 4.0.0-internal.4c2ee12

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 (602) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-MT4FK3IP.js +2 -0
  3. package/dist/exports/client/Field-MT4FK3IP.js.map +7 -0
  4. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  5. package/dist/exports/client/{chunk-X3D4LZS7.js.map → chunk-3LRZDIIG.js.map} +4 -4
  6. package/dist/exports/client/chunk-E6LSRRP2.js +2 -0
  7. package/dist/exports/client/chunk-E6LSRRP2.js.map +7 -0
  8. package/dist/exports/client/chunk-ZQX5HXUL.js +2 -0
  9. package/dist/exports/client/chunk-ZQX5HXUL.js.map +7 -0
  10. package/dist/exports/client/component-6DQLENIE.js +2 -0
  11. package/dist/exports/client/component-6DQLENIE.js.map +7 -0
  12. package/dist/exports/client/componentInline-HNE5G4TE.js +2 -0
  13. package/dist/exports/client/index.d.ts +1 -2
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +28 -28
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  18. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  19. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  20. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  21. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  22. package/dist/features/blocks/client/component/index.d.ts +0 -6
  23. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  24. package/dist/features/blocks/client/component/index.js +169 -101
  25. package/dist/features/blocks/client/component/index.js.map +1 -1
  26. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  27. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  28. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  29. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  30. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  31. package/dist/features/blocks/client/componentInline/index.css +0 -1
  32. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  33. package/dist/features/blocks/client/componentInline/index.js +30 -22
  34. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  35. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  36. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  37. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  38. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  39. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  40. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  41. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  42. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  43. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  44. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  45. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  46. package/dist/features/blocks/server/index.js +2 -2
  47. package/dist/features/blocks/server/index.js.map +1 -1
  48. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  49. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  50. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  51. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  52. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  53. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  54. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  55. package/dist/features/blocks/server/schema.d.ts +2 -0
  56. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  57. package/dist/features/blocks/server/schema.js +7 -9
  58. package/dist/features/blocks/server/schema.js.map +1 -1
  59. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  60. package/dist/features/blocks/server/validate.js +1 -1
  61. package/dist/features/blocks/server/validate.js.map +1 -1
  62. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  63. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  64. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  65. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  66. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  67. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  68. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  69. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  70. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  71. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  72. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  73. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  74. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  75. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  76. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  77. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  78. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  79. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  80. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  81. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  82. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  83. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  84. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  85. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  86. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  87. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  88. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  89. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  90. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  91. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  92. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  93. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  94. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  95. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  96. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  97. package/dist/features/heading/constants.d.ts +2 -0
  98. package/dist/features/heading/constants.d.ts.map +1 -0
  99. package/dist/features/heading/constants.js +2 -0
  100. package/dist/features/heading/constants.js.map +1 -0
  101. package/dist/features/heading/server/index.d.ts.map +1 -1
  102. package/dist/features/heading/server/index.js +5 -1
  103. package/dist/features/heading/server/index.js.map +1 -1
  104. package/dist/features/heading/server/schema.d.ts.map +1 -1
  105. package/dist/features/heading/server/validate.d.ts +6 -0
  106. package/dist/features/heading/server/validate.d.ts.map +1 -0
  107. package/dist/features/heading/server/validate.js +15 -0
  108. package/dist/features/heading/server/validate.js.map +1 -0
  109. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
  110. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  111. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  112. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  113. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  114. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  115. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  116. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  117. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  118. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  119. package/dist/features/horizontalRule/server/schema.js +6 -5
  120. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  121. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  122. package/dist/features/indent/client/IndentPlugin.js +122 -1
  123. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  124. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  125. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  126. package/dist/features/indent/server/i18n.js +74 -37
  127. package/dist/features/indent/server/i18n.js.map +1 -1
  128. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  129. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  130. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +8 -5
  131. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  132. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -2
  133. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  134. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  135. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  136. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  137. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  138. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  139. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  140. package/dist/features/link/nodes/LinkNode.js +2 -15
  141. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  142. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  143. package/dist/features/link/server/baseFields.js.map +1 -1
  144. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  145. package/dist/features/link/server/index.js +2 -2
  146. package/dist/features/link/server/index.js.map +1 -1
  147. package/dist/features/link/server/schema.d.ts.map +1 -1
  148. package/dist/features/link/server/validate.d.ts.map +1 -1
  149. package/dist/features/link/server/validate.js +1 -1
  150. package/dist/features/link/server/validate.js.map +1 -1
  151. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  152. package/dist/features/lists/checklist/server/index.js +5 -2
  153. package/dist/features/lists/checklist/server/index.js.map +1 -1
  154. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  155. package/dist/features/lists/orderedList/server/index.js +5 -2
  156. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  157. package/dist/features/lists/shared/constants.d.ts +2 -0
  158. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  159. package/dist/features/lists/shared/constants.js +2 -0
  160. package/dist/features/lists/shared/constants.js.map +1 -0
  161. package/dist/features/lists/shared/validate.d.ts +5 -0
  162. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  163. package/dist/features/lists/shared/validate.js +15 -0
  164. package/dist/features/lists/shared/validate.js.map +1 -0
  165. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  166. package/dist/features/lists/unorderedList/server/index.js +5 -2
  167. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  168. package/dist/features/relationship/client/components/index.css +3 -6
  169. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  170. package/dist/features/relationship/client/index.d.ts +2 -2
  171. package/dist/features/relationship/client/index.d.ts.map +1 -1
  172. package/dist/features/relationship/client/index.js.map +1 -1
  173. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  174. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  175. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  176. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  177. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  178. package/dist/features/relationship/client/plugins/index.js +27 -31
  179. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  180. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  181. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  182. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  183. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  184. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  185. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  186. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  187. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  188. package/dist/features/relationship/server/index.d.ts +8 -1
  189. package/dist/features/relationship/server/index.d.ts.map +1 -1
  190. package/dist/features/relationship/server/index.js +28 -11
  191. package/dist/features/relationship/server/index.js.map +1 -1
  192. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  193. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  194. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  195. package/dist/features/relationship/server/schema.d.ts +3 -2
  196. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  197. package/dist/features/relationship/server/schema.js +9 -12
  198. package/dist/features/relationship/server/schema.js.map +1 -1
  199. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  200. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  201. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  202. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  203. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  204. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  205. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  206. package/dist/features/table/client/index.d.ts.map +1 -0
  207. package/dist/features/table/client/index.js.map +1 -0
  208. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  209. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  210. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  211. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  212. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -1
  213. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  214. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  215. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  216. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  217. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  218. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  219. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  220. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  221. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  222. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  223. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  224. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  225. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  226. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  227. package/dist/features/table/client/utils/debounce.js.map +1 -0
  228. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  229. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  230. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  231. package/dist/features/table/markdownTransformer.js.map +1 -0
  232. package/dist/features/table/server/index.d.ts +3 -0
  233. package/dist/features/table/server/index.d.ts.map +1 -0
  234. package/dist/features/{experimental_table → table}/server/index.js +4 -4
  235. package/dist/features/table/server/index.js.map +1 -0
  236. package/dist/features/table/server/schema.d.ts.map +1 -0
  237. package/dist/features/table/server/schema.js.map +1 -0
  238. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  239. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  240. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  241. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  242. package/dist/features/toolbars/fixed/client/Toolbar/index.css +78 -6
  243. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  244. package/dist/features/toolbars/fixed/client/Toolbar/index.js +19 -1
  245. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  246. package/dist/features/toolbars/inline/client/Toolbar/index.css +0 -1
  247. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  248. package/dist/features/toolbars/inline/client/Toolbar/index.js +17 -2
  249. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  250. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  251. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  252. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  253. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  254. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  255. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  256. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -14
  257. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  258. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  259. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  260. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +79 -0
  261. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  262. package/dist/features/typesServer.d.ts +17 -12
  263. package/dist/features/typesServer.d.ts.map +1 -1
  264. package/dist/features/typesServer.js.map +1 -1
  265. package/dist/features/upload/client/component/index.css +0 -2
  266. package/dist/features/upload/client/component/index.js +2 -1
  267. package/dist/features/upload/client/component/index.js.map +1 -1
  268. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  269. package/dist/features/upload/client/index.d.ts +3 -2
  270. package/dist/features/upload/client/index.d.ts.map +1 -1
  271. package/dist/features/upload/client/index.js.map +1 -1
  272. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  273. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  274. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  275. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  276. package/dist/features/upload/client/plugin/index.js +50 -53
  277. package/dist/features/upload/client/plugin/index.js.map +1 -1
  278. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  279. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  280. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  281. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  282. package/dist/features/upload/server/index.d.ts +7 -3
  283. package/dist/features/upload/server/index.d.ts.map +1 -1
  284. package/dist/features/upload/server/index.js +20 -16
  285. package/dist/features/upload/server/index.js.map +1 -1
  286. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  287. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  288. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  289. package/dist/features/upload/server/schema.d.ts +4 -16
  290. package/dist/features/upload/server/schema.d.ts.map +1 -1
  291. package/dist/features/upload/server/schema.js +8 -10
  292. package/dist/features/upload/server/schema.js.map +1 -1
  293. package/dist/features/upload/server/validate.d.ts +2 -2
  294. package/dist/features/upload/server/validate.d.ts.map +1 -1
  295. package/dist/features/upload/server/validate.js +4 -1
  296. package/dist/features/upload/server/validate.js.map +1 -1
  297. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  298. package/dist/field/Diff/converters/listitem/index.js +2 -1
  299. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  300. package/dist/field/Diff/converters/relationship/index.css +0 -1
  301. package/dist/field/Diff/converters/unknown/index.css +0 -1
  302. package/dist/field/Diff/converters/upload/index.css +0 -1
  303. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  304. package/dist/field/Diff/index.css +0 -2
  305. package/dist/field/Diff/index.d.ts +3 -2
  306. package/dist/field/Diff/index.d.ts.map +1 -1
  307. package/dist/field/Diff/index.js +3 -2
  308. package/dist/field/Diff/index.js.map +1 -1
  309. package/dist/field/Field.d.ts.map +1 -1
  310. package/dist/field/Field.js +26 -16
  311. package/dist/field/Field.js.map +1 -1
  312. package/dist/field/RenderLexical/index.d.ts +3 -1
  313. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  314. package/dist/field/RenderLexical/index.js +23 -23
  315. package/dist/field/RenderLexical/index.js.map +1 -1
  316. package/dist/field/ViewSelector.d.ts.map +1 -1
  317. package/dist/field/ViewSelector.js +1 -0
  318. package/dist/field/ViewSelector.js.map +1 -1
  319. package/dist/field/bundled.css +1 -1
  320. package/dist/field/index.css +2 -3
  321. package/dist/field/rscEntry.d.ts +2 -2
  322. package/dist/field/rscEntry.d.ts.map +1 -1
  323. package/dist/field/rscEntry.js.map +1 -1
  324. package/dist/i18n.d.ts.map +1 -1
  325. package/dist/i18n.js +68 -0
  326. package/dist/i18n.js.map +1 -1
  327. package/dist/index.d.ts +5 -5
  328. package/dist/index.d.ts.map +1 -1
  329. package/dist/index.js +31 -52
  330. package/dist/index.js.map +1 -1
  331. package/dist/lexical/LexicalEditor.css +30 -19
  332. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  333. package/dist/lexical/LexicalEditor.js +62 -99
  334. package/dist/lexical/LexicalEditor.js.map +1 -1
  335. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  336. package/dist/lexical/LexicalProvider.js +7 -22
  337. package/dist/lexical/LexicalProvider.js.map +1 -1
  338. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  339. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  340. package/dist/lexical/config/server/loader.d.ts +1 -1
  341. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  342. package/dist/lexical/config/server/loader.js +2 -2
  343. package/dist/lexical/config/server/loader.js.map +1 -1
  344. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  345. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  346. package/dist/lexical/config/server/sanitize.js +2 -2
  347. package/dist/lexical/config/server/sanitize.js.map +1 -1
  348. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  349. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  350. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  351. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  352. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  353. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  354. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  355. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  356. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  357. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  358. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  359. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  360. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  361. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  362. package/dist/lexical/plugins/SlashMenu/index.css +0 -2
  363. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  364. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  365. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  366. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  367. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +2 -0
  368. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  369. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -2
  370. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  371. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  372. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  373. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  374. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  375. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  376. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  377. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  378. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  379. package/dist/lexical/theme/EditorTheme.css +0 -2
  380. package/dist/lexical/ui/ContentEditable.css +19 -14
  381. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  382. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  383. package/dist/lexical/ui/ContentEditable.js +21 -7
  384. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  385. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  386. package/dist/lexical/ui/icons/H3/index.js +13 -6
  387. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  388. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  389. package/dist/lexical/ui/icons/H4/index.js +13 -6
  390. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  391. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  392. package/dist/lexical/ui/icons/H5/index.js +13 -6
  393. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  394. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  395. package/dist/lexical/ui/icons/H6/index.js +13 -6
  396. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  397. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  398. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  399. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  400. package/dist/lexical/utils/point.d.ts.map +1 -1
  401. package/dist/lexical/utils/rect.d.ts.map +1 -1
  402. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  403. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  404. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  405. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  406. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  407. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  408. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  409. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  410. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  411. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  412. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  413. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  414. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  415. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  416. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  417. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  418. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  419. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  420. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  421. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  422. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  423. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  424. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  425. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  426. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  427. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  428. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  429. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  430. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  431. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  432. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  433. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  434. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  435. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  436. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  437. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  438. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  439. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  440. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  441. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  442. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  443. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  444. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  445. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  446. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  447. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  448. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  449. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  450. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  451. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  452. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  453. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  454. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  455. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  456. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  457. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  458. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  459. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  460. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  461. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  462. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  463. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  464. package/dist/presets/llmInstructions.d.ts +2 -0
  465. package/dist/presets/llmInstructions.d.ts.map +1 -0
  466. package/dist/presets/llmInstructions.js +13 -0
  467. package/dist/presets/llmInstructions.js.map +1 -0
  468. package/dist/types/builtInNodes.d.ts +1 -1
  469. package/dist/types/builtInNodes.d.ts.map +1 -1
  470. package/dist/types/builtInNodes.js +8 -3
  471. package/dist/types/builtInNodes.js.map +1 -1
  472. package/dist/types/index.d.ts +4 -7
  473. package/dist/types/index.d.ts.map +1 -1
  474. package/dist/types/index.js.map +1 -1
  475. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  476. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  477. package/dist/types/jsonSchemaHelpers.js +7 -2
  478. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  479. package/dist/types/nodeTypes.d.ts +6 -1
  480. package/dist/types/nodeTypes.d.ts.map +1 -1
  481. package/dist/types/nodeTypes.js.map +1 -1
  482. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  483. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  484. package/dist/utilities/buildInitialState.d.ts +3 -2
  485. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  486. package/dist/utilities/buildInitialState.js +1 -0
  487. package/dist/utilities/buildInitialState.js.map +1 -1
  488. package/dist/utilities/createServerFeature.d.ts +1 -1
  489. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  490. package/dist/utilities/createServerFeature.js +2 -2
  491. package/dist/utilities/createServerFeature.js.map +1 -1
  492. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  493. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  494. package/dist/utilities/editorConfigFactory.js +9 -9
  495. package/dist/utilities/editorConfigFactory.js.map +1 -1
  496. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  497. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  498. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  499. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  500. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  501. package/dist/utilities/generateImportMap.d.ts +3 -3
  502. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  503. package/dist/utilities/generateImportMap.js +3 -7
  504. package/dist/utilities/generateImportMap.js.map +1 -1
  505. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  506. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  507. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  508. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  509. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  510. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  511. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  512. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  513. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  514. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  515. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  516. package/dist/validate/hasText.d.ts +2 -2
  517. package/dist/validate/hasText.d.ts.map +1 -1
  518. package/dist/validate/hasText.js.map +1 -1
  519. package/dist/validate/index.d.ts +1 -1
  520. package/dist/validate/index.d.ts.map +1 -1
  521. package/package.json +99 -27
  522. package/dist/@types/assets.d.js +0 -2
  523. package/dist/@types/assets.d.js.map +0 -1
  524. package/dist/dependencyChecker.spec.js +0 -16
  525. package/dist/dependencyChecker.spec.js.map +0 -1
  526. package/dist/exports/client/Field-DXKR3OGV.js +0 -2
  527. package/dist/exports/client/Field-DXKR3OGV.js.map +0 -7
  528. package/dist/exports/client/bundled.css +0 -1
  529. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  530. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  531. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  532. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  533. package/dist/exports/client/chunk-X3D4LZS7.js +0 -2
  534. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  535. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  536. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  537. package/dist/exports/server/rsc.browser.d.ts +0 -11
  538. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  539. package/dist/exports/server/rsc.browser.js +0 -10
  540. package/dist/exports/server/rsc.browser.js.map +0 -1
  541. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  542. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  543. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  544. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  545. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  546. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  547. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  548. package/dist/features/experimental_table/client/index.js.map +0 -1
  549. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  550. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  551. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  552. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  553. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  554. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  555. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  556. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  557. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  558. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  559. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  560. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  561. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  562. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  563. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  564. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  565. package/dist/features/experimental_table/server/index.d.ts +0 -3
  566. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  567. package/dist/features/experimental_table/server/index.js.map +0 -1
  568. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  569. package/dist/features/experimental_table/server/schema.js.map +0 -1
  570. package/dist/features/link/markdownTransformer.spec.js +0 -195
  571. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  572. package/dist/field/clientEntry.d.ts +0 -29
  573. package/dist/field/clientEntry.d.ts.map +0 -1
  574. package/dist/field/clientEntry.js +0 -86
  575. package/dist/field/clientEntry.js.map +0 -1
  576. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  577. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  578. package/dist/lexical/utils/url.spec.js +0 -114
  579. package/dist/lexical/utils/url.spec.js.map +0 -1
  580. package/dist/utilities/jsx/jsx.spec.js +0 -178
  581. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  582. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-HNE5G4TE.js.map} +0 -0
  583. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  584. /package/dist/features/{experimental_table → table}/client/index.js +0 -0
  585. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  586. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  587. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  588. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  589. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  590. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  591. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  592. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  593. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  594. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  595. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  596. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  597. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  598. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  599. /package/dist/features/{experimental_table → table}/markdownTransformer.d.ts +0 -0
  600. /package/dist/features/{experimental_table → table}/markdownTransformer.js +0 -0
  601. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  602. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAK3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExE,MAAM,MAAM,UAAU,GAAG;IACvB,6DAA6D;IAC7D,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACpB,GAAG,CAAC,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;QAClB,yEAAyE;QACzE,KAAK,EAAE;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;YAAC,EAAE,EAAE,qBAAqB,CAAA;SAAE,GAAG,qBAAqB,CAAA;KACnF,GAAG,IAAI,CAAA;IACR,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,WAAW,kBAAkB,CACjC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,OAAO,GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,mEAAmE;IACnE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,OAAO,GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,UAAU,CAAA;CACjB;AAuHD,eAAO,MAAM,wBAAwB,GAClC,4BAA4B,KAAK,EAAE,KAAG,YActC,CAAA;AAEH,eAAO,MAAM,4BAA4B,GACtC,4BAA4B,KAAK,EAAE,KAAG,YAatC,CAAA"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAK3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExE,MAAM,MAAM,UAAU,GAAG;IACvB,6DAA6D;IAC7D,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACpB,GAAG,CAAC,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;QAClB,yEAAyE;QACzE,KAAK,EAAE;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;YAAC,EAAE,EAAE,qBAAqB,CAAA;SAAE,GAAG,qBAAqB,CAAA;KACnF,GAAG,IAAI,CAAA;IACR,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,WAAW,kBAAkB,CACjC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,OAAO,GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,mEAAmE;IACnE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,OAAO,GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,UAAU,CAAA;CACjB;AAuHD,eAAO,MAAM,wBAAwB,+BACN,KAAK,EAAE,KAAG,YActC,CAAA;AAEH,eAAO,MAAM,4BAA4B,+BACV,KAAK,EAAE,KAAG,YAatC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE7E,eAAO,MAAM,cAAc,GACzB,OAAO,sBAAsB,EAC7B,4BAA4B,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CA4C5D,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE7E,eAAO,MAAM,cAAc,UAClB,sBAAsB,8BACD,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CA4C5D,CAAA"}
@@ -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":[]}
@@ -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.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,GAAI,4BAA4B,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,+BAAgC,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
@@ -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(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,CAAoD;EAC3FQ,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 +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;WAC1C,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB;WAI3D,OAAO,IAAI,MAAM;WAIjB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;WAiBpD,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB;IAc/E,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAWlE,UAAU,IAAI,0BAA0B;CAGlD;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,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,IAAIA,cAAA,CAAeC,OAAO,KAAK,KAAMD,cAAA,EAAgBV,KAAA,EAAqCL,EAAA,EAAI;MAC5Fe,cAAA,CAAeV,KAAK,GAAGU,cAAC,CAAeV,KAAK,CAA+BL,EAAE;IAC/E;IAEA,MAAMiB,YAAA,GAAiC;MACrCf,UAAA,EAAYa,cAAA,CAAeb,UAAU;MACrCG,KAAA,EAAOU,cAAA,CAAeV;IACxB;IACA,MAAMF,IAAA,GAAOC,uBAAA,CAAwBa,YAAA;IACrCd,IAAA,CAAKe,SAAS,CAACH,cAAA,CAAeI,MAAM;IACpC,OAAOhB,IAAA;EACT;EAESiB,SAASC,MAAqB,EAAEC,MAAoB,EAAe;IAC1E,oBACEC,IAAA,CAAC9B,qBAAA;MACC+B,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,SAAS5B,wBAAwBuB,IAAsB;EAC5D,OAAOrC,qBAAA,CACL,IAAIgB,gBAAA,CAAiB;IACnBqB;EACF;AAEJ;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();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$insertNodeToNearestRoot","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","createCommand","useEffect","RelationshipDrawer","$createRelationshipNode","RelationshipNode","useEnabledRelationships","INSERT_RELATIONSHIP_COMMAND","RelationshipPlugin","t0","$","clientProps","editor","t1","disabledCollections","t2","enabledCollections","t3","collectionSlugsBlacklist","collectionSlugsWhitelist","enabledCollectionSlugs","t4","t5","hasNodes","Error","registerCommand","_temp","t6","_jsx","payload","selection","relationshipNode","focus","focusNode","getNode","__first","remove"],"sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { RelationshipFeatureProps } from '../../server/index.js'\nimport type { RelationshipData } from '../../server/schema.js'\n\nimport { RelationshipDrawer } from '../drawer/index.js'\nimport { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js'\nimport { useEnabledRelationships } from '../utils/useEnabledRelationships.js'\n\nexport const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData> = createCommand(\n 'INSERT_RELATIONSHIP_COMMAND',\n)\n\nexport const RelationshipPlugin: PluginComponent<RelationshipFeatureProps> = ({ clientProps }) => {\n const [editor] = useLexicalComposerContext()\n\n const { enabledCollectionSlugs } = useEnabledRelationships({\n collectionSlugsBlacklist: clientProps?.disabledCollections,\n collectionSlugsWhitelist: clientProps?.enabledCollections,\n })\n\n useEffect(() => {\n if (!editor.hasNodes([RelationshipNode])) {\n throw new Error('RelationshipPlugin: RelationshipNode not registered on editor')\n }\n\n return editor.registerCommand<RelationshipData>(\n INSERT_RELATIONSHIP_COMMAND,\n (payload) => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const relationshipNode = $createRelationshipNode(payload)\n // we need to get the focus node before inserting the block node, as $insertNodeToNearestRoot can change the focus node\n const { focus } = selection\n const focusNode = focus.getNode()\n // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(relationshipNode)\n\n // Delete the node it it's an empty paragraph\n if ($isParagraphNode(focusNode) && !focusNode.__first) {\n focusNode.remove()\n }\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return <RelationshipDrawer enabledCollectionSlugs={enabledCollectionSlugs} />\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,wBAAwB,QAAQ;AACzC,SACEC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,EACvBC,aAAa,QACR;AACP,SAASC,SAAS,QAAQ;AAM1B,SAASC,kBAAkB,QAAQ;AACnC,SAASC,uBAAuB,EAAEC,gBAAgB,QAAQ;AAC1D,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,2BAAA,GAAgEN,aAAA,CAC3E;AAGF,OAAO,MAAMO,kBAAA,GAAgEC,EAAA;EAAA,MAAAC,CAAA,GAAAjB,EAAA;EAAC;IAAAkB;EAAA,IAAAF,EAAe;EAC3F,OAAAG,MAAA,IAAiBlB,yBAAA;EAGW,MAAAmB,EAAA,GAAAF,WAAA,EAAAG,mBAAA;EACA,MAAAC,EAAA,GAAAJ,WAAA,EAAAK,kBAAA;EAAa,IAAAC,EAAA;EAAA,IAAAP,CAAA,QAAAG,EAAA,IAAAH,CAAA,QAAAK,EAAA;IAFkBE,EAAA;MAAAC,wBAAA,EAC/BL,EAAa;MAAAM,wBAAA,EACbJ;IAAa;IACzCL,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAK,EAAA;IAAAL,CAAA,MAAAO,EAAA;EAAA;IAAAA,EAAA,GAAAP,CAAA;EAAA;EAHA;IAAAU;EAAA,IAAmCd,uBAAA,CAAwBW,EAG3D;EAAA,IAAAI,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAZ,CAAA,QAAAE,MAAA;IAEUS,EAAA,GAAAA,CAAA;MAAA,KACHT,MAAA,CAAAW,QAAA,EAAAlB,gBAAA,CAAkC;QAAA,UAAAmB,KAAA,CACrB;MAAA;MAAA,OAGXZ,MAAA,CAAAa,eAAA,CAAAlB,2BAAA,EAAAmB,KAAA,EAAA1B,uBAqBL;IAAA;IAEDsB,EAAA,IAACV,MAAA;IAAOF,CAAA,MAAAE,MAAA;IAAAF,CAAA,MAAAW,EAAA;IAAAX,CAAA,MAAAY,EAAA;EAAA;IAAAD,EAAA,GAAAX,CAAA;IAAAY,EAAA,GAAAZ,CAAA;EAAA;EA5BXR,SAAA,CAAUmB,EA4BV,EAAGC,EAAQ;EAAA,IAAAK,EAAA;EAAA,IAAAjB,CAAA,QAAAU,sBAAA;IAEJO,EAAA,GAAAC,IAAA,CAAAzB,kBAAA;MAAAiB;IAAA,C;;;;;;SAAAO,E;CACT;AAvC6E,SAAAD,MAAAG,OAAA;EAgBrE,MAAAC,SAAA,GAAkBjC,aAAA,MAAmBD,qBAAA;EAAA,IAEjCG,iBAAA,CAAkB+B,SAAA;IACpB,MAAAC,gBAAA,GAAyB3B,uBAAA,CAAwByB,OAAA;IAEjD;MAAAG;IAAA,IAAkBF,SAAA;IAClB,MAAAG,SAAA,GAAkBD,KAAA,CAAAE,OAAA,CAAa;IAE/BvC,wBAAA,CAAyBoC,gBAAA;IAAA,IAGrBjC,gBAAA,CAAiBmC,SAAA,MAAeA,SAAA,CAAAE,OAAiB;MACnDF,SAAA,CAAAG,MAAA,CAAgB;IAAA;EAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$insertNodeToNearestRoot","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","createCommand","useEffect","RelationshipDrawer","$createRelationshipNode","RelationshipNode","useEnabledRelationships","INSERT_RELATIONSHIP_COMMAND","RelationshipPlugin","t0","$","clientProps","editor","t1","enabledCollectionSlugs","t2","t3","hasNodes","Error","registerCommand","_temp","t4","_jsx","payload","selection","relationshipNode","focus","focusNode","getNode","__first","remove"],"sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { RelationshipFeatureClientProps } from '../../server/index.js'\nimport type { RelationshipData } from '../../server/schema.js'\n\nimport { RelationshipDrawer } from '../drawer/index.js'\nimport { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js'\nimport { useEnabledRelationships } from '../utils/useEnabledRelationships.js'\n\nexport const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData> = createCommand(\n 'INSERT_RELATIONSHIP_COMMAND',\n)\n\nexport const RelationshipPlugin: PluginComponent<RelationshipFeatureClientProps> = ({\n clientProps,\n}) => {\n const [editor] = useLexicalComposerContext()\n\n const { enabledCollectionSlugs } = useEnabledRelationships({\n enabledCollectionSlugs: clientProps.enabledCollectionSlugs,\n })\n\n useEffect(() => {\n if (!editor.hasNodes([RelationshipNode])) {\n throw new Error('RelationshipPlugin: RelationshipNode not registered on editor')\n }\n\n return editor.registerCommand<RelationshipData>(\n INSERT_RELATIONSHIP_COMMAND,\n (payload) => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const relationshipNode = $createRelationshipNode(payload)\n // we need to get the focus node before inserting the block node, as $insertNodeToNearestRoot can change the focus node\n const { focus } = selection\n const focusNode = focus.getNode()\n // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(relationshipNode)\n\n // Delete the node it it's an empty paragraph\n if ($isParagraphNode(focusNode) && !focusNode.__first) {\n focusNode.remove()\n }\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return <RelationshipDrawer enabledCollectionSlugs={enabledCollectionSlugs} />\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,wBAAwB,QAAQ;AACzC,SACEC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,EACvBC,aAAa,QACR;AACP,SAASC,SAAS,QAAQ;AAM1B,SAASC,kBAAkB,QAAQ;AACnC,SAASC,uBAAuB,EAAEC,gBAAgB,QAAQ;AAC1D,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,2BAAA,GAAgEN,aAAA,CAC3E;AAGF,OAAO,MAAMO,kBAAA,GAAsEC,EAAA;EAAA,MAAAC,CAAA,GAAAjB,EAAA;EAAC;IAAAkB;EAAA,IAAAF,EAEnF;EACC,OAAAG,MAAA,IAAiBlB,yBAAA;EAAA,IAAAmB,EAAA;EAAA,IAAAH,CAAA,QAAAC,WAAA,CAAAG,sBAAA;IAE0CD,EAAA;MAAAC,sBAAA,EACjCH,WAAA,CAAAG;IAAA;IAC1BJ,CAAA,MAAAC,WAAA,CAAAG,sBAAA;IAAAJ,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAFA;IAAAI;EAAA,IAAmCR,uBAAA,CAAwBO,EAE3D;EAAA,IAAAE,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAN,CAAA,QAAAE,MAAA;IAEUG,EAAA,GAAAA,CAAA;MAAA,KACHH,MAAA,CAAAK,QAAA,EAAAZ,gBAAA,CAAkC;QAAA,UAAAa,KAAA,CACrB;MAAA;MAAA,OAGXN,MAAA,CAAAO,eAAA,CAAAZ,2BAAA,EAAAa,KAAA,EAAApB,uBAqBL;IAAA;IAEDgB,EAAA,IAACJ,MAAA;IAAOF,CAAA,MAAAE,MAAA;IAAAF,CAAA,MAAAK,EAAA;IAAAL,CAAA,MAAAM,EAAA;EAAA;IAAAD,EAAA,GAAAL,CAAA;IAAAM,EAAA,GAAAN,CAAA;EAAA;EA5BXR,SAAA,CAAUa,EA4BV,EAAGC,EAAQ;EAAA,IAAAK,EAAA;EAAA,IAAAX,CAAA,QAAAI,sBAAA;IAEJO,EAAA,GAAAC,IAAA,CAAAnB,kBAAA;MAAAW;IAAA,C;;;;;;SAAAO,E;CACT;AAxCmF,SAAAD,MAAAG,OAAA;EAiB3E,MAAAC,SAAA,GAAkB3B,aAAA,MAAmBD,qBAAA;EAAA,IAEjCG,iBAAA,CAAkByB,SAAA;IACpB,MAAAC,gBAAA,GAAyBrB,uBAAA,CAAwBmB,OAAA;IAEjD;MAAAG;IAAA,IAAkBF,SAAA;IAClB,MAAAG,SAAA,GAAkBD,KAAA,CAAAE,OAAA,CAAa;IAE/BjC,wBAAA,CAAyB8B,gBAAA;IAAA,IAGrB3B,gBAAA,CAAiB6B,SAAA,MAAeA,SAAA,CAAAE,OAAiB;MACnDF,SAAA,CAAAG,MAAA,CAAgB;IAAA;EAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,13 +1,11 @@
1
1
  import type { ClientCollectionConfig, CollectionSlug } from 'payload';
2
2
  type UseEnabledRelationshipsOptions = {
3
- collectionSlugsBlacklist?: string[];
4
- collectionSlugsWhitelist?: string[];
5
- uploads?: boolean;
3
+ enabledCollectionSlugs: CollectionSlug[];
6
4
  };
7
5
  type UseEnabledRelationshipsResult = {
8
6
  enabledCollections: ClientCollectionConfig[];
9
7
  enabledCollectionSlugs: CollectionSlug[];
10
8
  };
11
- export declare const useEnabledRelationships: (options?: UseEnabledRelationshipsOptions) => UseEnabledRelationshipsResult;
9
+ export declare const useEnabledRelationships: ({ enabledCollectionSlugs, }: UseEnabledRelationshipsOptions) => UseEnabledRelationshipsResult;
12
10
  export {};
13
11
  //# sourceMappingURL=useEnabledRelationships.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEnabledRelationships.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/utils/useEnabledRelationships.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAOrE,KAAK,8BAA8B,GAAG;IACpC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;IAC5C,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,uBAAuB,GAClC,UAAU,8BAA8B,KACvC,6BAmBF,CAAA"}
1
+ {"version":3,"file":"useEnabledRelationships.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/utils/useEnabledRelationships.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAKrE,KAAK,8BAA8B,GAAG;IACpC,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,kBAAkB,EAAE,sBAAsB,EAAE,CAAA;IAC5C,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,uBAAuB,gCAEjC,8BAA8B,KAAG,6BAiBnC,CAAA"}
@@ -1,33 +1,66 @@
1
1
  'use client';
2
2
 
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { useConfig, useEntityVisibility } from '@payloadcms/ui';
4
5
  import * as React from 'react';
5
- import { filterEnabledRelationshipCollections } from '../../shared/filterEnabledRelationshipCollections.js';
6
- export const useEnabledRelationships = options => {
6
+ export const useEnabledRelationships = t0 => {
7
+ const $ = _c(11);
7
8
  const {
8
- collectionSlugsBlacklist,
9
- collectionSlugsWhitelist,
10
- uploads = false
11
- } = options || {};
9
+ enabledCollectionSlugs
10
+ } = t0;
12
11
  const {
13
- config: {
14
- collections
15
- }
12
+ config: t1
16
13
  } = useConfig();
14
+ const {
15
+ collections
16
+ } = t1;
17
17
  const {
18
18
  visibleEntities
19
19
  } = useEntityVisibility();
20
- return React.useMemo(() => {
21
- const enabledCollections = filterEnabledRelationshipCollections(collections, {
22
- disabledCollections: collectionSlugsBlacklist,
23
- enabledCollections: collectionSlugsWhitelist,
24
- uploads,
25
- visibleSlugs: visibleEntities?.collections
26
- });
27
- return {
28
- enabledCollections,
29
- enabledCollectionSlugs: enabledCollections.map(c => c.slug)
20
+ let t2;
21
+ let t3;
22
+ if ($[0] !== collections || $[1] !== enabledCollectionSlugs || $[2] !== visibleEntities) {
23
+ let t4;
24
+ if ($[5] !== enabledCollectionSlugs || $[6] !== visibleEntities) {
25
+ t4 = t5 => {
26
+ const {
27
+ slug
28
+ } = t5;
29
+ return enabledCollectionSlugs.includes(slug) && (!visibleEntities?.collections || visibleEntities.collections.includes(slug));
30
+ };
31
+ $[5] = enabledCollectionSlugs;
32
+ $[6] = visibleEntities;
33
+ $[7] = t4;
34
+ } else {
35
+ t4 = $[7];
36
+ }
37
+ const enabledCollections = collections.filter(t4);
38
+ t2 = enabledCollections;
39
+ t3 = enabledCollections.map(_temp);
40
+ $[0] = collections;
41
+ $[1] = enabledCollectionSlugs;
42
+ $[2] = visibleEntities;
43
+ $[3] = t2;
44
+ $[4] = t3;
45
+ } else {
46
+ t2 = $[3];
47
+ t3 = $[4];
48
+ }
49
+ let t4;
50
+ if ($[8] !== t2 || $[9] !== t3) {
51
+ t4 = {
52
+ enabledCollections: t2,
53
+ enabledCollectionSlugs: t3
30
54
  };
31
- }, [collections, visibleEntities, uploads, collectionSlugsWhitelist, collectionSlugsBlacklist]);
55
+ $[8] = t2;
56
+ $[9] = t3;
57
+ $[10] = t4;
58
+ } else {
59
+ t4 = $[10];
60
+ }
61
+ return t4;
32
62
  };
63
+ function _temp(c) {
64
+ return c.slug;
65
+ }
33
66
  //# sourceMappingURL=useEnabledRelationships.js.map