@payloadcms/richtext-lexical 4.0.0-internal.688c4d0 → 4.0.0-internal.77191e5

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 (659) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-QKAL7KMC.js +2 -0
  3. package/dist/exports/client/Field-QKAL7KMC.js.map +7 -0
  4. package/dist/exports/client/bundled.css +1 -1
  5. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  6. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  7. package/dist/exports/client/chunk-LN6VX25I.js +2 -0
  8. package/dist/exports/client/chunk-LN6VX25I.js.map +7 -0
  9. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  10. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  11. package/dist/exports/client/index.d.ts +1 -3
  12. package/dist/exports/client/index.d.ts.map +1 -1
  13. package/dist/exports/client/index.js +26 -27
  14. package/dist/exports/client/index.js.map +4 -4
  15. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  16. package/dist/features/blockquote/client/index.js +2 -2
  17. package/dist/features/blockquote/client/index.js.map +1 -1
  18. package/dist/features/blockquote/server/index.js +2 -2
  19. package/dist/features/blockquote/server/index.js.map +1 -1
  20. package/dist/features/blocks/client/component/index.css +2 -2
  21. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  22. package/dist/features/blocks/client/componentInline/index.css +8 -8
  23. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  24. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  25. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  26. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  27. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  28. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  29. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  30. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  31. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  32. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  33. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  34. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  35. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  36. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  37. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  38. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  39. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  40. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  41. package/dist/features/blocks/server/index.js +2 -2
  42. package/dist/features/blocks/server/index.js.map +1 -1
  43. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  44. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  45. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  46. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  47. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  48. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  49. package/dist/features/blocks/server/schema.js +3 -2
  50. package/dist/features/blocks/server/schema.js.map +1 -1
  51. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  52. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  53. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  54. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  55. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  56. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  57. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  58. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  59. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  60. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  61. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  62. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  63. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  64. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  65. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  66. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  67. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  68. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  69. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  70. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  71. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  72. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  73. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  74. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  75. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  76. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  77. package/dist/features/converters/markdownToLexical/index.js +5 -2
  78. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  79. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  80. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  81. package/dist/features/format/bold/feature.client.js +1 -1
  82. package/dist/features/format/bold/feature.client.js.map +1 -1
  83. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  84. package/dist/features/format/bold/feature.server.js +1 -1
  85. package/dist/features/format/bold/feature.server.js.map +1 -1
  86. package/dist/features/format/inlineCode/feature.client.js +1 -1
  87. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  88. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  89. package/dist/features/format/inlineCode/feature.server.js +1 -1
  90. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  91. package/dist/features/format/italic/feature.client.js +1 -1
  92. package/dist/features/format/italic/feature.client.js.map +1 -1
  93. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  94. package/dist/features/format/italic/feature.server.js +1 -1
  95. package/dist/features/format/italic/feature.server.js.map +1 -1
  96. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  97. package/dist/features/format/strikethrough/feature.client.js +1 -1
  98. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  99. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  100. package/dist/features/format/strikethrough/feature.server.js +1 -1
  101. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  102. package/dist/features/heading/client/index.js +2 -2
  103. package/dist/features/heading/client/index.js.map +1 -1
  104. package/dist/features/heading/constants.d.ts +2 -0
  105. package/dist/features/heading/constants.d.ts.map +1 -0
  106. package/dist/features/heading/constants.js +2 -0
  107. package/dist/features/heading/constants.js.map +1 -0
  108. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  109. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  110. package/dist/features/heading/markdownTransformer.js +6 -19
  111. package/dist/features/heading/markdownTransformer.js.map +1 -1
  112. package/dist/features/heading/server/index.d.ts.map +1 -1
  113. package/dist/features/heading/server/index.js +7 -3
  114. package/dist/features/heading/server/index.js.map +1 -1
  115. package/dist/features/heading/server/schema.d.ts.map +1 -1
  116. package/dist/features/heading/server/validate.d.ts +6 -0
  117. package/dist/features/heading/server/validate.d.ts.map +1 -0
  118. package/dist/features/heading/server/validate.js +15 -0
  119. package/dist/features/heading/server/validate.js.map +1 -0
  120. package/dist/features/horizontalRule/client/index.js +2 -2
  121. package/dist/features/horizontalRule/client/index.js.map +1 -1
  122. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  123. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  124. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  125. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  126. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  127. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  128. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  129. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  130. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  131. package/dist/features/horizontalRule/server/index.js +2 -2
  132. package/dist/features/horizontalRule/server/index.js.map +1 -1
  133. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  134. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  135. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  136. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  137. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  138. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  139. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  140. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  141. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  142. package/dist/features/link/client/index.js +2 -2
  143. package/dist/features/link/client/index.js.map +1 -1
  144. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  145. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  146. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  147. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  148. package/dist/features/link/markdownTransformer.d.ts +4 -4
  149. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  150. package/dist/features/link/markdownTransformer.js +2 -2
  151. package/dist/features/link/markdownTransformer.js.map +1 -1
  152. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  153. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  154. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  155. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  156. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  157. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  158. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  159. package/dist/features/link/server/baseFields.js.map +1 -1
  160. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  161. package/dist/features/link/server/index.js +4 -4
  162. package/dist/features/link/server/index.js.map +1 -1
  163. package/dist/features/link/server/schema.d.ts.map +1 -1
  164. package/dist/features/link/server/schema.js +4 -2
  165. package/dist/features/link/server/schema.js.map +1 -1
  166. package/dist/features/link/server/validate.d.ts.map +1 -1
  167. package/dist/features/lists/checklist/client/index.js +1 -1
  168. package/dist/features/lists/checklist/client/index.js.map +1 -1
  169. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  170. package/dist/features/lists/checklist/server/index.js +6 -3
  171. package/dist/features/lists/checklist/server/index.js.map +1 -1
  172. package/dist/features/lists/orderedList/client/index.js +1 -1
  173. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  174. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  175. package/dist/features/lists/orderedList/server/index.js +6 -3
  176. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  177. package/dist/features/lists/shared/constants.d.ts +2 -0
  178. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  179. package/dist/features/lists/shared/constants.js +2 -0
  180. package/dist/features/lists/shared/constants.js.map +1 -0
  181. package/dist/features/lists/shared/validate.d.ts +5 -0
  182. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  183. package/dist/features/lists/shared/validate.js +15 -0
  184. package/dist/features/lists/shared/validate.js.map +1 -0
  185. package/dist/features/lists/unorderedList/client/index.js +1 -1
  186. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  187. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  188. package/dist/features/lists/unorderedList/server/index.js +6 -3
  189. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  190. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  191. package/dist/features/relationship/client/index.d.ts +2 -2
  192. package/dist/features/relationship/client/index.d.ts.map +1 -1
  193. package/dist/features/relationship/client/index.js.map +1 -1
  194. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  195. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  196. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  197. package/dist/features/relationship/client/plugins/index.js +27 -31
  198. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  199. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  200. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  201. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  202. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  203. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  204. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  205. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  206. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  207. package/dist/features/relationship/server/index.d.ts +8 -1
  208. package/dist/features/relationship/server/index.d.ts.map +1 -1
  209. package/dist/features/relationship/server/index.js +28 -11
  210. package/dist/features/relationship/server/index.js.map +1 -1
  211. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  212. package/dist/features/relationship/server/schema.d.ts +5 -5
  213. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  214. package/dist/features/relationship/server/schema.js +27 -15
  215. package/dist/features/relationship/server/schema.js.map +1 -1
  216. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  217. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  218. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  219. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  220. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  221. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  222. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  223. package/dist/features/table/client/index.d.ts.map +1 -0
  224. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  225. package/dist/features/table/client/index.js.map +1 -0
  226. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  227. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  228. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  229. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  230. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  231. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +16 -43
  232. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  233. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  234. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  235. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  236. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  237. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  238. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  239. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  240. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  241. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  242. package/dist/features/table/client/utils/debounce.js.map +1 -0
  243. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  244. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  245. package/dist/features/table/markdownTransformer.d.ts +5 -0
  246. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  247. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  248. package/dist/features/table/markdownTransformer.js.map +1 -0
  249. package/dist/features/table/server/index.d.ts +3 -0
  250. package/dist/features/table/server/index.d.ts.map +1 -0
  251. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  252. package/dist/features/table/server/index.js.map +1 -0
  253. package/dist/features/table/server/schema.d.ts.map +1 -0
  254. package/dist/features/table/server/schema.js.map +1 -0
  255. package/dist/features/textState/feature.client.js +1 -1
  256. package/dist/features/textState/feature.client.js.map +1 -1
  257. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  258. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  259. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  260. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  261. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  262. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  263. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  264. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  265. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  266. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  267. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +19 -24
  268. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  269. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  270. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  271. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  272. package/dist/features/typesClient.d.ts +1 -1
  273. package/dist/features/typesClient.d.ts.map +1 -1
  274. package/dist/features/typesClient.js.map +1 -1
  275. package/dist/features/typesServer.d.ts +3 -3
  276. package/dist/features/typesServer.d.ts.map +1 -1
  277. package/dist/features/typesServer.js.map +1 -1
  278. package/dist/features/upload/client/component/index.css +9 -9
  279. package/dist/features/upload/client/component/index.js +2 -1
  280. package/dist/features/upload/client/component/index.js.map +1 -1
  281. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  282. package/dist/features/upload/client/index.d.ts +3 -2
  283. package/dist/features/upload/client/index.d.ts.map +1 -1
  284. package/dist/features/upload/client/index.js.map +1 -1
  285. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  286. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  287. package/dist/features/upload/client/plugin/index.js +50 -55
  288. package/dist/features/upload/client/plugin/index.js.map +1 -1
  289. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  290. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  291. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  292. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  293. package/dist/features/upload/server/index.d.ts +6 -2
  294. package/dist/features/upload/server/index.d.ts.map +1 -1
  295. package/dist/features/upload/server/index.js +22 -18
  296. package/dist/features/upload/server/index.js.map +1 -1
  297. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  298. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  299. package/dist/features/upload/server/markdownTransformer.js +1 -1
  300. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  301. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  302. package/dist/features/upload/server/schema.d.ts +6 -6
  303. package/dist/features/upload/server/schema.d.ts.map +1 -1
  304. package/dist/features/upload/server/schema.js +30 -14
  305. package/dist/features/upload/server/schema.js.map +1 -1
  306. package/dist/features/upload/server/validate.d.ts +2 -2
  307. package/dist/features/upload/server/validate.d.ts.map +1 -1
  308. package/dist/features/upload/server/validate.js +3 -0
  309. package/dist/features/upload/server/validate.js.map +1 -1
  310. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  311. package/dist/field/Diff/converters/listitem/index.js +2 -1
  312. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  313. package/dist/field/Diff/converters/unknown/index.css +1 -1
  314. package/dist/field/Diff/index.d.ts.map +1 -1
  315. package/dist/field/Diff/index.js +1 -0
  316. package/dist/field/Diff/index.js.map +1 -1
  317. package/dist/field/Field.d.ts.map +1 -1
  318. package/dist/field/Field.js +18 -15
  319. package/dist/field/Field.js.map +1 -1
  320. package/dist/field/RenderLexical/index.d.ts +3 -1
  321. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  322. package/dist/field/RenderLexical/index.js +23 -23
  323. package/dist/field/RenderLexical/index.js.map +1 -1
  324. package/dist/field/ViewSelector.css +1 -1
  325. package/dist/field/bundled.css +1 -1
  326. package/dist/field/index.css +7 -8
  327. package/dist/i18n.d.ts.map +1 -1
  328. package/dist/i18n.js +68 -0
  329. package/dist/i18n.js.map +1 -1
  330. package/dist/index.d.ts +3 -3
  331. package/dist/index.d.ts.map +1 -1
  332. package/dist/index.js +11 -54
  333. package/dist/index.js.map +1 -1
  334. package/dist/lexical/LexicalEditor.css +18 -18
  335. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  336. package/dist/lexical/LexicalEditor.js +2 -36
  337. package/dist/lexical/LexicalEditor.js.map +1 -1
  338. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  339. package/dist/lexical/LexicalProvider.js +7 -22
  340. package/dist/lexical/LexicalProvider.js.map +1 -1
  341. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  342. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  343. package/dist/lexical/config/server/loader.d.ts +1 -1
  344. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  345. package/dist/lexical/config/server/loader.js +2 -2
  346. package/dist/lexical/config/server/loader.js.map +1 -1
  347. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  348. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  349. package/dist/lexical/config/server/sanitize.js +2 -2
  350. package/dist/lexical/config/server/sanitize.js.map +1 -1
  351. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  352. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  353. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  354. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  355. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  356. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  357. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  358. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  359. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  360. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  361. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  362. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  363. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  364. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  365. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  366. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  367. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  368. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  369. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  370. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  371. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  372. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  373. package/dist/lexical/theme/EditorTheme.css +18 -19
  374. package/dist/lexical/ui/ContentEditable.css +22 -17
  375. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  376. package/dist/lexical/ui/icons/H3/index.js +13 -6
  377. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  378. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  379. package/dist/lexical/ui/icons/H4/index.js +13 -6
  380. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  381. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  382. package/dist/lexical/ui/icons/H5/index.js +13 -6
  383. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  384. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  385. package/dist/lexical/ui/icons/H6/index.js +13 -6
  386. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  387. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  388. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  389. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  390. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  391. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  392. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  393. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  394. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  395. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  396. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  397. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  398. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  399. package/dist/lexical/utils/point.d.ts.map +1 -1
  400. package/dist/lexical/utils/rect.d.ts.map +1 -1
  401. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  402. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  403. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  404. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  405. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  406. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  407. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  408. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  409. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  410. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  411. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  412. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  413. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  414. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  415. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  416. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  417. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  418. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  419. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  420. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  421. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  422. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  423. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  424. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  425. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  426. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  427. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  428. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  429. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  430. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  431. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  432. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  433. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  434. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  435. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  436. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  437. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  438. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  439. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  440. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  441. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  442. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  443. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  444. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  445. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  446. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  447. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  448. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  449. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  450. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  451. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  452. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  453. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  454. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  455. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  456. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  457. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  458. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  459. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  460. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  461. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  462. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  463. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  464. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  465. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  466. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  467. package/dist/types/index.d.ts +1 -1
  468. package/dist/types/index.d.ts.map +1 -1
  469. package/dist/types/index.js.map +1 -1
  470. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  471. package/dist/types/nodeTypes.d.ts +1 -1
  472. package/dist/types/nodeTypes.d.ts.map +1 -1
  473. package/dist/types/nodeTypes.js.map +1 -1
  474. package/dist/types/schema.d.ts.map +1 -1
  475. package/dist/types/schema.js +12 -5
  476. package/dist/types/schema.js.map +1 -1
  477. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  478. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  479. package/dist/utilities/createServerFeature.d.ts +1 -1
  480. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  481. package/dist/utilities/createServerFeature.js +2 -2
  482. package/dist/utilities/createServerFeature.js.map +1 -1
  483. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  484. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  485. package/dist/utilities/editorConfigFactory.js +9 -9
  486. package/dist/utilities/editorConfigFactory.js.map +1 -1
  487. package/dist/utilities/fieldsDrawer/index.css +0 -4
  488. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  489. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  490. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  491. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  492. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  493. package/dist/utilities/generateImportMap.d.ts +1 -1
  494. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  495. package/dist/utilities/generateImportMap.js +3 -7
  496. package/dist/utilities/generateImportMap.js.map +1 -1
  497. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  498. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  499. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  500. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  501. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  502. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  503. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  504. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  505. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  506. package/dist/validate/index.d.ts.map +1 -1
  507. package/package.json +97 -29
  508. package/dist/@types/assets.d.js +0 -2
  509. package/dist/@types/assets.d.js.map +0 -1
  510. package/dist/dependencyChecker.spec.js +0 -16
  511. package/dist/dependencyChecker.spec.js.map +0 -1
  512. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  513. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  514. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  515. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  516. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  517. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  518. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  519. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  520. package/dist/exports/server/rsc.browser.d.ts +0 -11
  521. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  522. package/dist/exports/server/rsc.browser.js +0 -10
  523. package/dist/exports/server/rsc.browser.js.map +0 -1
  524. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  525. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  526. package/dist/features/blockquote/markdownTransformer.js +0 -33
  527. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  528. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  529. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  530. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  531. package/dist/features/experimental_table/client/index.js.map +0 -1
  532. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  533. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  534. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  535. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  536. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  537. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  538. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  539. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  540. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  541. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  542. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  543. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  544. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  545. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  546. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  547. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  548. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  549. package/dist/features/experimental_table/server/index.d.ts +0 -3
  550. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  551. package/dist/features/experimental_table/server/index.js.map +0 -1
  552. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  553. package/dist/features/experimental_table/server/schema.js.map +0 -1
  554. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  555. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  556. package/dist/features/format/bold/markdownTransformers.js +0 -23
  557. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  558. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  559. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  560. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  561. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  562. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  563. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  564. package/dist/features/format/italic/markdownTransformers.js +0 -12
  565. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  566. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  567. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  568. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  569. package/dist/features/format/strikethrough/markdownTransformers.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/features/lists/checklist/markdownTransformers.d.ts +0 -3
  573. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  574. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  575. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  576. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  577. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  578. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  579. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  580. package/dist/features/lists/shared/markdown.d.ts +0 -6
  581. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  582. package/dist/features/lists/shared/markdown.js +0 -57
  583. package/dist/features/lists/shared/markdown.js.map +0 -1
  584. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  585. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  586. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  587. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  588. package/dist/field/clientEntry.d.ts +0 -29
  589. package/dist/field/clientEntry.d.ts.map +0 -1
  590. package/dist/field/clientEntry.js +0 -86
  591. package/dist/field/clientEntry.js.map +0 -1
  592. package/dist/lexical/utils/guard.d.ts +0 -5
  593. package/dist/lexical/utils/guard.d.ts.map +0 -1
  594. package/dist/lexical/utils/guard.js +0 -9
  595. package/dist/lexical/utils/guard.js.map +0 -1
  596. package/dist/lexical/utils/url.spec.js +0 -114
  597. package/dist/lexical/utils/url.spec.js.map +0 -1
  598. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  599. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  600. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  601. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  602. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  603. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  604. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  605. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  606. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  607. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  608. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  609. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  610. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  611. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  612. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  613. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  614. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  615. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  616. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  617. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  618. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  619. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  620. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  621. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  622. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  623. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  624. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  625. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  626. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  627. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  628. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  629. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  630. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  631. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  632. package/dist/packages/@lexical/markdown/index.js +0 -39
  633. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  634. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  635. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  636. package/dist/packages/@lexical/markdown/utils.js +0 -267
  637. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  638. package/dist/utilities/jsx/jsx.spec.js +0 -178
  639. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  640. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  641. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  642. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  643. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  644. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  645. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  646. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  647. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  648. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  649. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  650. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  651. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  652. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  653. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  654. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  655. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  656. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  657. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  658. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  659. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","CHECK_LIST","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'\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 { CHECK_LIST } from '../markdownTransformers.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;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,UAAU,QAAQ;AAC3B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBP,mBAAA,CAAoB;EAClDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,UAAA,CAAW;MAClCO,KAAA,EAAOR,2BAAA,CAA4B,aAAaK,kBAAA,IAC5C,CACER,UAAA,CAAW;QACTY,UAAA,EAAYV,kBAAA;QACZW,IAAA,EAAMf;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAYX,sBAAA;QACZY,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,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
+ import { ORDERED_LIST } from '@lexical/markdown';
4
5
  import { $isRangeSelection } from 'lexical';
5
6
  import { OrderedListIcon } from '../../../../lexical/ui/icons/OrderedList/index.js';
6
7
  import { createClientFeature } from '../../../../utilities/createClientFeature.js';
@@ -8,7 +9,6 @@ import { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textD
8
9
  import { LexicalListPlugin } from '../../plugin/index.js';
9
10
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
10
11
  import { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js';
11
- import { ORDERED_LIST } from '../markdownTransformer.js';
12
12
  const toolbarGroups = [toolbarTextDropdownGroupWithItems([{
13
13
  ChildComponent: OrderedListIcon,
14
14
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isListNode","INSERT_ORDERED_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","OrderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","shouldRegisterListBaseNodes","slashMenuListGroupWithItems","ORDERED_LIST","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","OrderedListFeatureClient","featureProviderMap","shouldRegister","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/orderedList/client/index.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { OrderedListIcon } from '../../../../lexical/ui/icons/OrderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\nimport { ORDERED_LIST } from '../markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: OrderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'number') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'number') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'number') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'orderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n]\n\nexport const OrderedListFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const shouldRegister = shouldRegisterListBaseNodes('ordered', featureProviderMap)\n return {\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegister ? [ListNode, ListItemNode] : [],\n plugins: shouldRegister\n ? [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ]\n : [],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: OrderedListIcon,\n key: 'orderedList',\n keywords: ['ordered list', 'ol'],\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n"],"mappings":"AAAA;;AACA,SAASA,WAAW,EAAEC,2BAA2B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACjF,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,eAAe,QAAQ;AAChC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAE7B,MAAMC,aAAA,GAAgC,CACpCL,iCAAA,CAAkC,CAChC;EACEM,cAAA,EAAgBR,eAAA;EAChBS,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACX,iBAAA,CAAkBW,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIjB,WAAA,CAAYgB,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,UAAU;QACxD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAIpB,WAAA,CAAYmB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,UAAU;QAC5D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAIpB,WAAA,CAAYqB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,UAAU;QACxE;MACF;MAEA,OAAO;IACT;IACA,OAAO;EACT;EACAI,GAAA,EAAK;EACLC,KAAA,EAAOA,CAAC;IAAEC;EAAI,CAAE;IACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;EAChB;EACAC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAC3B,2BAAA,EAA6B4B,SAAA;EACtD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,wBAAA,GAA2BzB,mBAAA,CAAoB,CAAC;EAAE0B;AAAkB,CAAE;EACjF,MAAMC,cAAA,GAAiBxB,2BAAA,CAA4B,WAAWuB,kBAAA;EAC9D,OAAO;IACLE,oBAAA,EAAsB,CAACvB,YAAA,CAAa;IACpCwB,KAAA,EAAOF,cAAA,GAAiB,CAAC9B,QAAA,EAAUD,YAAA,CAAa,GAAG,EAAE;IACrDkC,OAAA,EAASH,cAAA,GACL,CACE;MACEI,SAAA,EAAW7B,iBAAA;MACX8B,QAAA,EAAU;IACZ,EACD,GACD,EAAE;IACNC,SAAA,EAAW;MACTC,MAAA,EAAQ,CACN9B,2BAAA,CAA4B,CAC1B;QACE+B,IAAA,EAAMpC,eAAA;QACNiB,GAAA,EAAK;QACLoB,QAAA,EAAU,CAAC,gBAAgB,KAAK;QAChCnB,KAAA,EAAOA,CAAC;UAAEC;QAAI,CAAE;UACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;QAChB;QACAC,QAAA,EAAUA,CAAC;UAAEC;QAAM,CAAE;UACnBA,MAAA,CAAOC,eAAe,CAAC3B,2BAAA,EAA6B4B,SAAA;QACtD;MACF,EACD;IAEL;IACAc,YAAA,EAAc;MACZH,MAAA,EAAQ5B;IACV;IACAgC,aAAA,EAAe;MACbJ,MAAA,EAAQ5B;IACV;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isListNode","INSERT_ORDERED_LIST_COMMAND","ListItemNode","ListNode","ORDERED_LIST","$isRangeSelection","OrderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","shouldRegisterListBaseNodes","slashMenuListGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","OrderedListFeatureClient","featureProviderMap","shouldRegister","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/orderedList/client/index.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { ORDERED_LIST } from '@lexical/markdown'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { OrderedListIcon } from '../../../../lexical/ui/icons/OrderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: OrderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'number') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'number') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'number') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'orderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n]\n\nexport const OrderedListFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const shouldRegister = shouldRegisterListBaseNodes('ordered', featureProviderMap)\n return {\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegister ? [ListNode, ListItemNode] : [],\n plugins: shouldRegister\n ? [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ]\n : [],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: OrderedListIcon,\n key: 'orderedList',\n keywords: ['ordered list', 'ol'],\n label: ({ i18n }) => {\n return i18n.t('lexical:orderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n"],"mappings":"AAAA;;AACA,SAASA,WAAW,EAAEC,2BAA2B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACjF,SAASC,YAAY,QAAQ;AAC7B,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,eAAe,QAAQ;AAChC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCJ,iCAAA,CAAkC,CAChC;EACEK,cAAA,EAAgBP,eAAA;EAChBQ,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACV,iBAAA,CAAkBU,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIjB,WAAA,CAAYgB,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,UAAU;QACxD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAIpB,WAAA,CAAYmB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,UAAU;QAC5D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAIpB,WAAA,CAAYqB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,UAAU;QACxE;MACF;MAEA,OAAO;IACT;IACA,OAAO;EACT;EACAI,GAAA,EAAK;EACLC,KAAA,EAAOA,CAAC;IAAEC;EAAI,CAAE;IACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;EAChB;EACAC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAC3B,2BAAA,EAA6B4B,SAAA;EACtD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,wBAAA,GAA2BxB,mBAAA,CAAoB,CAAC;EAAEyB;AAAkB,CAAE;EACjF,MAAMC,cAAA,GAAiBvB,2BAAA,CAA4B,WAAWsB,kBAAA;EAC9D,OAAO;IACLE,oBAAA,EAAsB,CAAC9B,YAAA,CAAa;IACpC+B,KAAA,EAAOF,cAAA,GAAiB,CAAC9B,QAAA,EAAUD,YAAA,CAAa,GAAG,EAAE;IACrDkC,OAAA,EAASH,cAAA,GACL,CACE;MACEI,SAAA,EAAW5B,iBAAA;MACX6B,QAAA,EAAU;IACZ,EACD,GACD,EAAE;IACNC,SAAA,EAAW;MACTC,MAAA,EAAQ,CACN7B,2BAAA,CAA4B,CAC1B;QACE8B,IAAA,EAAMnC,eAAA;QACNgB,GAAA,EAAK;QACLoB,QAAA,EAAU,CAAC,gBAAgB,KAAK;QAChCnB,KAAA,EAAOA,CAAC;UAAEC;QAAI,CAAE;UACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;QAChB;QACAC,QAAA,EAAUA,CAAC;UAAEC;QAAM,CAAE;UACnBA,MAAA,CAAOC,eAAe,CAAC3B,2BAAA,EAA6B4B,SAAA;QACtD;MACF,EACD;IAEL;IACAc,YAAA,EAAc;MACZH,MAAA,EAAQ5B;IACV;IACAgC,aAAA,EAAe;MACbJ,MAAA,EAAQ5B;IACV;EACF;AACF","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"}
@@ -1,9 +1,10 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { ORDERED_LIST } from '@lexical/markdown';
2
3
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
4
  import { createNode } from '../../../typeUtilities.js';
4
5
  import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
5
6
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
6
- import { ORDERED_LIST } from '../markdownTransformer.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","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","ORDERED_LIST","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'\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 { ORDERED_LIST } from '../markdownTransformer.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;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAC7B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBP,mBAAA,CAAoB;EACpDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,YAAA,CAAa;MACpCO,KAAA,EAAOR,2BAAA,CAA4B,WAAWK,kBAAA,IAC1C,CACER,UAAA,CAAW;QACTY,UAAA,EAAYV,kBAAA;QACZW,IAAA,EAAMf;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAYX,sBAAA;QACZY,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,13 +1,13 @@
1
1
  'use client';
2
2
 
3
3
  import { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
+ import { UNORDERED_LIST } from '@lexical/markdown';
4
5
  import { $isRangeSelection } from 'lexical';
5
6
  import { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js';
6
7
  import { createClientFeature } from '../../../../utilities/createClientFeature.js';
7
8
  import { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js';
8
9
  import { LexicalListPlugin } from '../../plugin/index.js';
9
10
  import { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js';
10
- import { UNORDERED_LIST } from '../markdownTransformer.js';
11
11
  const toolbarGroups = [toolbarTextDropdownGroupWithItems([{
12
12
  ChildComponent: UnorderedListIcon,
13
13
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","UnorderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","UNORDERED_LIST","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","UnorderedListFeatureClient","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nexport const UnorderedListFeatureClient = createClientFeature({\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACnF,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,cAAc,QAAQ;AAE/B,MAAMC,aAAA,GAAgC,CACpCJ,iCAAA,CAAkC,CAChC;EACEK,cAAA,EAAgBP,iBAAA;EAChBQ,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACV,iBAAA,CAAkBU,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIhB,WAAA,CAAYe,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,UAAU;QACxD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAInB,WAAA,CAAYkB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,UAAU;QAC5D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAInB,WAAA,CAAYoB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,UAAU;QACxE;MACF;MAEA,OAAO;IACT;IACA,OAAO;EACT;EACAI,GAAA,EAAK;EACLC,KAAA,EAAOA,CAAC;IAAEC;EAAI,CAAE;IACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;EAChB;EACAC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;EACxD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6BxB,mBAAA,CAAoB;EAC5DyB,oBAAA,EAAsB,CAACrB,cAAA,CAAe;EACtCsB,KAAA,EAAO,CAAC7B,QAAA,EAAUD,YAAA,CAAa;EAC/B+B,OAAA,EAAS,CACP;IACEC,SAAA,EAAW1B,iBAAA;IACX2B,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACN5B,2BAAA,CAA4B,CAC1B;MACE6B,IAAA,EAAMjC,iBAAA;MACNgB,GAAA,EAAK;MACLkB,QAAA,EAAU,CAAC,kBAAkB,KAAK;MAClCjB,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;MACxD;IACF,EACD;EAEL;EACAY,YAAA,EAAc;IACZH,MAAA,EAAQ1B;EACV;EACA8B,aAAA,EAAe;IACbJ,MAAA,EAAQ1B;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","UNORDERED_LIST","$isRangeSelection","UnorderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","UnorderedListFeatureClient","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nexport const UnorderedListFeatureClient = createClientFeature({\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACnF,SAASC,cAAc,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCH,iCAAA,CAAkC,CAChC;EACEI,cAAA,EAAgBN,iBAAA;EAChBO,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACT,iBAAA,CAAkBS,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIhB,WAAA,CAAYe,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,UAAU;QACxD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAInB,WAAA,CAAYkB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,UAAU;QAC5D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAInB,WAAA,CAAYoB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,UAAU;QACxE;MACF;MAEA,OAAO;IACT;IACA,OAAO;EACT;EACAI,GAAA,EAAK;EACLC,KAAA,EAAOA,CAAC;IAAEC;EAAI,CAAE;IACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;EAChB;EACAC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;EACxD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6BvB,mBAAA,CAAoB;EAC5DwB,oBAAA,EAAsB,CAAC3B,cAAA,CAAe;EACtC4B,KAAA,EAAO,CAAC7B,QAAA,EAAUD,YAAA,CAAa;EAC/B+B,OAAA,EAAS,CACP;IACEC,SAAA,EAAWzB,iBAAA;IACX0B,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACN3B,2BAAA,CAA4B,CAC1B;MACE4B,IAAA,EAAMhC,iBAAA;MACNe,GAAA,EAAK;MACLkB,QAAA,EAAU,CAAC,kBAAkB,KAAK;MAClCjB,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;MACxD;IACF,EACD;EAEL;EACAY,YAAA,EAAc;IACZH,MAAA,EAAQ1B;EACV;EACA8B,aAAA,EAAe;IACbJ,MAAA,EAAQ1B;EACV;AACF","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"}
@@ -1,8 +1,9 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { UNORDERED_LIST } from '@lexical/markdown';
2
3
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
4
  import { createNode } from '../../../typeUtilities.js';
4
5
  import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
5
- import { UNORDERED_LIST } from '../markdownTransformer.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","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","UNORDERED_LIST","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.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;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBN,mBAAA,CAAoB;EACtDO,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACL,cAAA,CAAe;IACtCM,KAAA,EAAO,CACLT,UAAA,CAAW;MACTU,UAAA,EAAYR,kBAAA;MACZS,IAAA,EAAMb;IACR,IACAE,UAAA,CAAW;MACTU,UAAA,EAAYT,sBAAA;MACZU,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":[]}
@@ -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,CAYvF;IAEQ,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAS1E;IAEQ,UAAU,IAAI,0BAA0B,CAEhD;CACF;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
@@ -1,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
@@ -1 +1 @@
1
- {"version":3,"file":"useEnabledRelationships.js","names":["useConfig","useEntityVisibility","React","filterEnabledRelationshipCollections","useEnabledRelationships","options","collectionSlugsBlacklist","collectionSlugsWhitelist","uploads","config","collections","visibleEntities","useMemo","enabledCollections","disabledCollections","visibleSlugs","enabledCollectionSlugs","map","c","slug"],"sources":["../../../../../src/features/relationship/client/utils/useEnabledRelationships.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, CollectionSlug } from 'payload'\n\nimport { useConfig, useEntityVisibility } from '@payloadcms/ui'\nimport * as React from 'react'\n\nimport { filterEnabledRelationshipCollections } from '../../shared/filterEnabledRelationshipCollections.js'\n\ntype UseEnabledRelationshipsOptions = {\n collectionSlugsBlacklist?: string[]\n collectionSlugsWhitelist?: string[]\n uploads?: boolean\n}\n\ntype UseEnabledRelationshipsResult = {\n enabledCollections: ClientCollectionConfig[]\n enabledCollectionSlugs: CollectionSlug[]\n}\n\nexport const useEnabledRelationships = (\n options?: UseEnabledRelationshipsOptions,\n): UseEnabledRelationshipsResult => {\n const { collectionSlugsBlacklist, collectionSlugsWhitelist, uploads = false } = options || {}\n const {\n config: { collections },\n } = useConfig()\n const { visibleEntities } = useEntityVisibility()\n\n return React.useMemo(() => {\n const enabledCollections = filterEnabledRelationshipCollections(collections, {\n disabledCollections: collectionSlugsBlacklist,\n enabledCollections: collectionSlugsWhitelist,\n uploads,\n visibleSlugs: visibleEntities?.collections,\n })\n return {\n enabledCollections,\n enabledCollectionSlugs: enabledCollections.map((c) => c.slug),\n }\n }, [collections, visibleEntities, uploads, collectionSlugsWhitelist, collectionSlugsBlacklist])\n}\n"],"mappings":"AAAA;;AAGA,SAASA,SAAS,EAAEC,mBAAmB,QAAQ;AAC/C,YAAYC,KAAA,MAAW;AAEvB,SAASC,oCAAoC,QAAQ;AAarD,OAAO,MAAMC,uBAAA,GACXC,OAAA;EAEA,MAAM;IAAEC,wBAAwB;IAAEC,wBAAwB;IAAEC,OAAA,GAAU;EAAK,CAAE,GAAGH,OAAA,IAAW,CAAC;EAC5F,MAAM;IACJI,MAAA,EAAQ;MAAEC;IAAW;EAAE,CACxB,GAAGV,SAAA;EACJ,MAAM;IAAEW;EAAe,CAAE,GAAGV,mBAAA;EAE5B,OAAOC,KAAA,CAAMU,OAAO,CAAC;IACnB,MAAMC,kBAAA,GAAqBV,oCAAA,CAAqCO,WAAA,EAAa;MAC3EI,mBAAA,EAAqBR,wBAAA;MACrBO,kBAAA,EAAoBN,wBAAA;MACpBC,OAAA;MACAO,YAAA,EAAcJ,eAAA,EAAiBD;IACjC;IACA,OAAO;MACLG,kBAAA;MACAG,sBAAA,EAAwBH,kBAAA,CAAmBI,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI;IAC9D;EACF,GAAG,CAACT,WAAA,EAAaC,eAAA,EAAiBH,OAAA,EAASD,wBAAA,EAA0BD,wBAAA,CAAyB;AAChG","ignoreList":[]}
1
+ {"version":3,"file":"useEnabledRelationships.js","names":["c","_c","useConfig","useEntityVisibility","React","useEnabledRelationships","t0","$","enabledCollectionSlugs","config","t1","collections","visibleEntities","t2","t3","t4","t5","slug","includes","enabledCollections","filter","map","_temp"],"sources":["../../../../../src/features/relationship/client/utils/useEnabledRelationships.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, CollectionSlug } from 'payload'\n\nimport { useConfig, useEntityVisibility } from '@payloadcms/ui'\nimport * as React from 'react'\n\ntype UseEnabledRelationshipsOptions = {\n enabledCollectionSlugs: CollectionSlug[]\n}\n\ntype UseEnabledRelationshipsResult = {\n enabledCollections: ClientCollectionConfig[]\n enabledCollectionSlugs: CollectionSlug[]\n}\n\nexport const useEnabledRelationships = ({\n enabledCollectionSlugs,\n}: UseEnabledRelationshipsOptions): UseEnabledRelationshipsResult => {\n const {\n config: { collections },\n } = useConfig()\n const { visibleEntities } = useEntityVisibility()\n\n return React.useMemo(() => {\n const enabledCollections = collections.filter(\n ({ slug }) =>\n enabledCollectionSlugs.includes(slug) &&\n (!visibleEntities?.collections || visibleEntities.collections.includes(slug)),\n )\n return {\n enabledCollections,\n enabledCollectionSlugs: enabledCollections.map((c) => c.slug),\n }\n }, [collections, enabledCollectionSlugs, visibleEntities])\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAGA,SAASC,SAAS,EAAEC,mBAAmB,QAAQ;AAC/C,YAAYC,KAAA,MAAW;AAWvB,OAAO,MAAMC,uBAAA,GAA0BC,EAAA;EAAA,MAAAC,CAAA,GAAAN,EAAA;EAAC;IAAAO;EAAA,IAAAF,EAEP;EAC/B;IAAAG,MAAA,EAAAC;EAAA,IAEIR,SAAA;EADM;IAAAS;EAAA,IAAAD,EAAe;EAEzB;IAAAE;EAAA,IAA4BT,mBAAA;EAAA,IAAAU,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAP,CAAA,QAAAI,WAAA,IAAAJ,CAAA,QAAAC,sBAAA,IAAAD,CAAA,QAAAK,eAAA;IAAA,IAAAG,EAAA;IAAA,IAAAR,CAAA,QAAAC,sBAAA,IAAAD,CAAA,QAAAK,eAAA;MAIxBG,EAAA,GAAAC,EAAA;QAAC;UAAAC;QAAA,IAAAD,EAAQ;QAAA,OACPR,sBAAA,CAAAU,QAAA,CAAgCD,IAAA,MAC/B,CAACL,eAAA,EAAAD,WAAA,IAAgCC,eAAA,CAAAD,WAAA,CAAAO,QAAA,CAAqCD,IAAA,CAAI;MAAA;MAAAV,CAAA,MAAAC,sBAAA;MAAAD,CAAA,MAAAK,eAAA;MAAAL,CAAA,MAAAQ,EAAA;IAAA;MAAAA,EAAA,GAAAR,CAAA;IAAA;IAH/E,MAAAY,kBAAA,GAA2BR,WAAA,CAAAS,MAAA,CACzBL,EAE6E;IAG7EI,EAAA,CAAAA,CAAA,CAAAA,kBAAA;IACwBL,EAAA,GAAAK,kBAAA,CAAAE,GAAA,CAAAC,KAAoC;IAAAf,CAAA,MAAAI,WAAA;IAAAJ,CAAA,MAAAC,sBAAA;IAAAD,CAAA,MAAAK,eAAA;IAAAL,CAAA,MAAAM,EAAA;IAAAN,CAAA,MAAAO,EAAA;EAAA;IAAAD,EAAA,GAAAN,CAAA;IAAAO,EAAA,GAAAP,CAAA;EAAA;EAAA,IAAAQ,EAAA;EAAA,IAAAR,CAAA,QAAAM,EAAA,IAAAN,CAAA,QAAAO,EAAA;IAFvDC,EAAA;MAAAI,kBAAA,EACLA,EAAA;MAAAX,sBAAA,EACwBM;IAAoC;IAC9DP,CAAA,MAAAM,EAAA;IAAAN,CAAA,MAAAO,EAAA;IAAAP,CAAA,OAAAQ,EAAA;EAAA;IAAAA,EAAA,GAAAR,CAAA;EAAA;EAAA,OAHOQ,EAGP;AAAA,CAEJ;AAnBuC,SAAAO,MAAAtB,CAAA;EAAA,OAgBqBA,CAAA,CAAAiB,IAAA;AAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type { PopulationPromise } from '../../typesServer.js';
2
- import type { RelationshipFeatureProps } from './index.js';
2
+ import type { RelationshipFeatureServerProps } from './index.js';
3
3
  import type { SerializedRelationshipNode } from './schema.js';
4
- export declare const relationshipPopulationPromiseHOC: (props: RelationshipFeatureProps) => PopulationPromise<SerializedRelationshipNode>;
4
+ export declare const relationshipPopulationPromiseHOC: (props: RelationshipFeatureServerProps) => PopulationPromise<SerializedRelationshipNode>;
5
5
  //# sourceMappingURL=graphQLPopulationPromise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAI7D,eAAO,MAAM,gCAAgC,GAC3C,OAAO,wBAAwB,KAC9B,iBAAiB,CAAC,0BAA0B,CAwC9C,CAAA"}
1
+ {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAI7D,eAAO,MAAM,gCAAgC,UACpC,8BAA8B,KACpC,iBAAiB,CAAC,0BAA0B,CAwC9C,CAAA"}