@payloadcms/richtext-lexical 4.0.0-internal.5d5a2b2 → 4.0.0-internal.5e065b3

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 (764) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-MT4FK3IP.js +2 -0
  3. package/dist/exports/client/Field-MT4FK3IP.js.map +7 -0
  4. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  5. package/dist/exports/client/chunk-3LRZDIIG.js.map +7 -0
  6. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  7. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  8. package/dist/exports/client/chunk-ATPSL6IX.js +2 -0
  9. package/dist/exports/client/chunk-ATPSL6IX.js.map +7 -0
  10. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  11. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  12. package/dist/exports/client/componentInline-ZEP5JPTC.js +2 -0
  13. package/dist/exports/client/index.d.ts +1 -3
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +27 -28
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  18. package/dist/features/blockquote/client/index.js +2 -2
  19. package/dist/features/blockquote/client/index.js.map +1 -1
  20. package/dist/features/blockquote/server/index.js +2 -2
  21. package/dist/features/blockquote/server/index.js.map +1 -1
  22. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  23. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  24. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  25. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  26. package/dist/features/blocks/client/component/index.css +2 -2
  27. package/dist/features/blocks/client/component/index.d.ts +0 -6
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +169 -100
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  32. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  33. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  34. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  35. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  36. package/dist/features/blocks/client/componentInline/index.css +8 -9
  37. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  38. package/dist/features/blocks/client/componentInline/index.js +32 -23
  39. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  40. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  41. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  42. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  43. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  44. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  45. package/dist/features/blocks/client/index.d.ts.map +1 -1
  46. package/dist/features/blocks/client/index.js +4 -2
  47. package/dist/features/blocks/client/index.js.map +1 -1
  48. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  49. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  50. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  51. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  52. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  53. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  54. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  55. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  56. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  57. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  58. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  59. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  60. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  61. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  62. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  63. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  64. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  65. package/dist/features/blocks/server/index.d.ts.map +1 -1
  66. package/dist/features/blocks/server/index.js +6 -8
  67. package/dist/features/blocks/server/index.js.map +1 -1
  68. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  69. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  70. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  71. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  72. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  73. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  74. package/dist/features/blocks/server/schema.js +3 -2
  75. package/dist/features/blocks/server/schema.js.map +1 -1
  76. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  77. package/dist/features/blocks/server/validate.js +1 -1
  78. package/dist/features/blocks/server/validate.js.map +1 -1
  79. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  80. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  81. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  82. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  84. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  85. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  86. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  87. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  90. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  91. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  92. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  93. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  94. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  95. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  96. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  97. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  98. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  99. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  100. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  101. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  102. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  103. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  104. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -4
  105. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  106. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  107. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  108. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  109. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  110. package/dist/features/converters/markdownToLexical/index.js +5 -2
  111. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  112. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  113. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  114. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  115. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  116. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  117. package/dist/features/format/bold/feature.client.js +1 -1
  118. package/dist/features/format/bold/feature.client.js.map +1 -1
  119. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  120. package/dist/features/format/bold/feature.server.js +1 -1
  121. package/dist/features/format/bold/feature.server.js.map +1 -1
  122. package/dist/features/format/inlineCode/feature.client.js +1 -1
  123. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  124. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  125. package/dist/features/format/inlineCode/feature.server.js +1 -1
  126. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  127. package/dist/features/format/italic/feature.client.js +1 -1
  128. package/dist/features/format/italic/feature.client.js.map +1 -1
  129. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  130. package/dist/features/format/italic/feature.server.js +1 -1
  131. package/dist/features/format/italic/feature.server.js.map +1 -1
  132. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  133. package/dist/features/format/strikethrough/feature.client.js +1 -1
  134. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  135. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  136. package/dist/features/format/strikethrough/feature.server.js +1 -1
  137. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  138. package/dist/features/heading/client/index.js +2 -2
  139. package/dist/features/heading/client/index.js.map +1 -1
  140. package/dist/features/heading/constants.d.ts +2 -0
  141. package/dist/features/heading/constants.d.ts.map +1 -0
  142. package/dist/features/heading/constants.js +2 -0
  143. package/dist/features/heading/constants.js.map +1 -0
  144. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  145. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  146. package/dist/features/heading/markdownTransformer.js +6 -19
  147. package/dist/features/heading/markdownTransformer.js.map +1 -1
  148. package/dist/features/heading/server/index.d.ts.map +1 -1
  149. package/dist/features/heading/server/index.js +7 -3
  150. package/dist/features/heading/server/index.js.map +1 -1
  151. package/dist/features/heading/server/schema.d.ts.map +1 -1
  152. package/dist/features/heading/server/validate.d.ts +6 -0
  153. package/dist/features/heading/server/validate.d.ts.map +1 -0
  154. package/dist/features/heading/server/validate.js +15 -0
  155. package/dist/features/heading/server/validate.js.map +1 -0
  156. package/dist/features/horizontalRule/client/index.js +2 -2
  157. package/dist/features/horizontalRule/client/index.js.map +1 -1
  158. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  159. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  160. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  161. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  162. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  163. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  164. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  165. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  166. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  167. package/dist/features/horizontalRule/server/index.js +2 -2
  168. package/dist/features/horizontalRule/server/index.js.map +1 -1
  169. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  170. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  171. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  172. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  173. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  174. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  175. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  176. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  177. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  178. package/dist/features/indent/client/IndentPlugin.js +122 -1
  179. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  180. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  181. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  182. package/dist/features/indent/server/i18n.js +74 -37
  183. package/dist/features/indent/server/i18n.js.map +1 -1
  184. package/dist/features/link/client/index.js +2 -2
  185. package/dist/features/link/client/index.js.map +1 -1
  186. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  187. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  188. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +11 -8
  189. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  190. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -13
  191. package/dist/features/link/markdownTransformer.d.ts +4 -4
  192. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  193. package/dist/features/link/markdownTransformer.js +2 -2
  194. package/dist/features/link/markdownTransformer.js.map +1 -1
  195. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  196. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  197. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  198. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  199. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  200. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  201. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  202. package/dist/features/link/server/baseFields.js.map +1 -1
  203. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  204. package/dist/features/link/server/index.js +4 -4
  205. package/dist/features/link/server/index.js.map +1 -1
  206. package/dist/features/link/server/schema.d.ts.map +1 -1
  207. package/dist/features/link/server/schema.js +4 -2
  208. package/dist/features/link/server/schema.js.map +1 -1
  209. package/dist/features/link/server/validate.d.ts.map +1 -1
  210. package/dist/features/link/server/validate.js +1 -1
  211. package/dist/features/link/server/validate.js.map +1 -1
  212. package/dist/features/lists/checklist/client/index.js +1 -1
  213. package/dist/features/lists/checklist/client/index.js.map +1 -1
  214. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  215. package/dist/features/lists/checklist/server/index.js +6 -3
  216. package/dist/features/lists/checklist/server/index.js.map +1 -1
  217. package/dist/features/lists/orderedList/client/index.js +1 -1
  218. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  219. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  220. package/dist/features/lists/orderedList/server/index.js +6 -3
  221. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  222. package/dist/features/lists/shared/constants.d.ts +2 -0
  223. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  224. package/dist/features/lists/shared/constants.js +2 -0
  225. package/dist/features/lists/shared/constants.js.map +1 -0
  226. package/dist/features/lists/shared/validate.d.ts +5 -0
  227. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  228. package/dist/features/lists/shared/validate.js +15 -0
  229. package/dist/features/lists/shared/validate.js.map +1 -0
  230. package/dist/features/lists/unorderedList/client/index.js +1 -1
  231. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  232. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  233. package/dist/features/lists/unorderedList/server/index.js +6 -3
  234. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  235. package/dist/features/relationship/client/components/index.css +3 -6
  236. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  237. package/dist/features/relationship/client/index.d.ts +2 -2
  238. package/dist/features/relationship/client/index.d.ts.map +1 -1
  239. package/dist/features/relationship/client/index.js.map +1 -1
  240. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  241. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  242. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  243. package/dist/features/relationship/client/plugins/index.js +27 -31
  244. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  245. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  246. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  247. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  248. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  249. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  250. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  251. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  252. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  253. package/dist/features/relationship/server/index.d.ts +8 -1
  254. package/dist/features/relationship/server/index.d.ts.map +1 -1
  255. package/dist/features/relationship/server/index.js +28 -11
  256. package/dist/features/relationship/server/index.js.map +1 -1
  257. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  258. package/dist/features/relationship/server/schema.d.ts +5 -5
  259. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  260. package/dist/features/relationship/server/schema.js +27 -15
  261. package/dist/features/relationship/server/schema.js.map +1 -1
  262. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  263. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  264. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  265. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  266. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  267. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  268. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  269. package/dist/features/table/client/index.d.ts.map +1 -0
  270. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  271. package/dist/features/table/client/index.js.map +1 -0
  272. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  273. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  274. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  275. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  276. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -1
  277. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  278. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  279. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  280. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  281. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  282. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  283. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  284. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  285. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  286. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  287. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  288. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  289. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  290. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  291. package/dist/features/table/client/utils/debounce.js.map +1 -0
  292. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  293. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  294. package/dist/features/table/markdownTransformer.d.ts +5 -0
  295. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  296. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  297. package/dist/features/table/markdownTransformer.js.map +1 -0
  298. package/dist/features/table/server/index.d.ts +3 -0
  299. package/dist/features/table/server/index.d.ts.map +1 -0
  300. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  301. package/dist/features/table/server/index.js.map +1 -0
  302. package/dist/features/table/server/schema.d.ts.map +1 -0
  303. package/dist/features/table/server/schema.js.map +1 -0
  304. package/dist/features/textState/feature.client.js +1 -1
  305. package/dist/features/textState/feature.client.js.map +1 -1
  306. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  307. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  308. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  309. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  310. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  311. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  312. package/dist/features/toolbars/fixed/client/Toolbar/index.js +4 -1
  313. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  314. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  315. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  316. package/dist/features/toolbars/inline/client/Toolbar/index.js +2 -2
  317. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  318. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  319. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  320. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  321. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  322. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  323. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  324. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +23 -25
  325. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  326. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  327. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  328. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  329. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  330. package/dist/features/typesClient.d.ts +1 -1
  331. package/dist/features/typesClient.d.ts.map +1 -1
  332. package/dist/features/typesClient.js.map +1 -1
  333. package/dist/features/typesServer.d.ts +19 -14
  334. package/dist/features/typesServer.d.ts.map +1 -1
  335. package/dist/features/typesServer.js.map +1 -1
  336. package/dist/features/upload/client/component/index.css +9 -11
  337. package/dist/features/upload/client/component/index.js +2 -1
  338. package/dist/features/upload/client/component/index.js.map +1 -1
  339. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  340. package/dist/features/upload/client/index.d.ts +3 -2
  341. package/dist/features/upload/client/index.d.ts.map +1 -1
  342. package/dist/features/upload/client/index.js.map +1 -1
  343. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  344. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  345. package/dist/features/upload/client/plugin/index.js +53 -56
  346. package/dist/features/upload/client/plugin/index.js.map +1 -1
  347. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  348. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  349. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  350. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  351. package/dist/features/upload/server/index.d.ts +6 -2
  352. package/dist/features/upload/server/index.d.ts.map +1 -1
  353. package/dist/features/upload/server/index.js +22 -18
  354. package/dist/features/upload/server/index.js.map +1 -1
  355. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  356. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  357. package/dist/features/upload/server/markdownTransformer.js +1 -1
  358. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  359. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  360. package/dist/features/upload/server/schema.d.ts +6 -6
  361. package/dist/features/upload/server/schema.d.ts.map +1 -1
  362. package/dist/features/upload/server/schema.js +30 -14
  363. package/dist/features/upload/server/schema.js.map +1 -1
  364. package/dist/features/upload/server/validate.d.ts +2 -2
  365. package/dist/features/upload/server/validate.d.ts.map +1 -1
  366. package/dist/features/upload/server/validate.js +4 -1
  367. package/dist/features/upload/server/validate.js.map +1 -1
  368. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  369. package/dist/field/Diff/converters/listitem/index.js +2 -1
  370. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  371. package/dist/field/Diff/converters/relationship/index.css +0 -1
  372. package/dist/field/Diff/converters/unknown/index.css +1 -2
  373. package/dist/field/Diff/converters/upload/index.css +0 -1
  374. package/dist/field/Diff/index.css +0 -2
  375. package/dist/field/Diff/index.d.ts +3 -2
  376. package/dist/field/Diff/index.d.ts.map +1 -1
  377. package/dist/field/Diff/index.js +1 -0
  378. package/dist/field/Diff/index.js.map +1 -1
  379. package/dist/field/Field.d.ts.map +1 -1
  380. package/dist/field/Field.js +26 -16
  381. package/dist/field/Field.js.map +1 -1
  382. package/dist/field/RenderLexical/index.d.ts +3 -1
  383. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  384. package/dist/field/RenderLexical/index.js +23 -23
  385. package/dist/field/RenderLexical/index.js.map +1 -1
  386. package/dist/field/ViewSelector.css +1 -1
  387. package/dist/field/ViewSelector.d.ts.map +1 -1
  388. package/dist/field/ViewSelector.js +1 -0
  389. package/dist/field/ViewSelector.js.map +1 -1
  390. package/dist/field/bundled.css +1 -1
  391. package/dist/field/index.css +7 -5
  392. package/dist/i18n.d.ts.map +1 -1
  393. package/dist/i18n.js +68 -0
  394. package/dist/i18n.js.map +1 -1
  395. package/dist/index.d.ts +3 -3
  396. package/dist/index.d.ts.map +1 -1
  397. package/dist/index.js +33 -54
  398. package/dist/index.js.map +1 -1
  399. package/dist/lexical/LexicalEditor.css +30 -19
  400. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  401. package/dist/lexical/LexicalEditor.js +62 -99
  402. package/dist/lexical/LexicalEditor.js.map +1 -1
  403. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  404. package/dist/lexical/LexicalProvider.js +7 -22
  405. package/dist/lexical/LexicalProvider.js.map +1 -1
  406. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  407. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  408. package/dist/lexical/config/server/loader.d.ts +1 -1
  409. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  410. package/dist/lexical/config/server/loader.js +2 -2
  411. package/dist/lexical/config/server/loader.js.map +1 -1
  412. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  413. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  414. package/dist/lexical/config/server/sanitize.js +2 -2
  415. package/dist/lexical/config/server/sanitize.js.map +1 -1
  416. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  417. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  418. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  419. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  420. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  421. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  422. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  423. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  424. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  425. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  426. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  427. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  428. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  429. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  430. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  431. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  432. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  433. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  434. package/dist/lexical/plugins/SlashMenu/index.css +1 -7
  435. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +2 -1
  436. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  437. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  438. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  439. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +5 -3
  440. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  441. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +17 -3
  442. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  443. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  444. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  445. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  446. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  447. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  448. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  449. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  450. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  451. package/dist/lexical/theme/EditorTheme.css +18 -21
  452. package/dist/lexical/ui/ContentEditable.css +22 -17
  453. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  454. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  455. package/dist/lexical/ui/ContentEditable.js +21 -7
  456. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  457. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  458. package/dist/lexical/ui/icons/H3/index.js +13 -6
  459. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  460. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  461. package/dist/lexical/ui/icons/H4/index.js +13 -6
  462. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  463. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  464. package/dist/lexical/ui/icons/H5/index.js +13 -6
  465. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  466. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  467. package/dist/lexical/ui/icons/H6/index.js +13 -6
  468. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  469. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  470. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  471. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  472. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  473. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  474. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  475. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  476. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  477. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  478. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  479. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  480. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  481. package/dist/lexical/utils/point.d.ts.map +1 -1
  482. package/dist/lexical/utils/rect.d.ts.map +1 -1
  483. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  484. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  485. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  486. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  487. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  488. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  489. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  490. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  491. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  492. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  493. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  494. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  495. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  496. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  497. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  498. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  499. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  500. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  501. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  502. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  503. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  504. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  505. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  506. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  507. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  508. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  509. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  510. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  511. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  512. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  513. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  514. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  515. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  516. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  517. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  518. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  519. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  520. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  521. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  522. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  523. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  524. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  525. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  526. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  527. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  528. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  529. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  530. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  531. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  532. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  533. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  534. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  535. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  536. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  537. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  538. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  539. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  540. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  541. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  542. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  543. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  544. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  545. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  546. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  547. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  548. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  549. package/dist/presets/llmInstructions.d.ts +2 -0
  550. package/dist/presets/llmInstructions.d.ts.map +1 -0
  551. package/dist/presets/llmInstructions.js +13 -0
  552. package/dist/presets/llmInstructions.js.map +1 -0
  553. package/dist/types/index.d.ts +3 -3
  554. package/dist/types/index.d.ts.map +1 -1
  555. package/dist/types/index.js.map +1 -1
  556. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  557. package/dist/types/nodeTypes.d.ts +1 -1
  558. package/dist/types/nodeTypes.d.ts.map +1 -1
  559. package/dist/types/nodeTypes.js.map +1 -1
  560. package/dist/types/schema.d.ts.map +1 -1
  561. package/dist/types/schema.js +12 -5
  562. package/dist/types/schema.js.map +1 -1
  563. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  564. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  565. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  566. package/dist/utilities/buildInitialState.d.ts +3 -2
  567. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  568. package/dist/utilities/buildInitialState.js +1 -0
  569. package/dist/utilities/buildInitialState.js.map +1 -1
  570. package/dist/utilities/createServerFeature.d.ts +1 -1
  571. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  572. package/dist/utilities/createServerFeature.js +2 -2
  573. package/dist/utilities/createServerFeature.js.map +1 -1
  574. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  575. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  576. package/dist/utilities/editorConfigFactory.js +9 -9
  577. package/dist/utilities/editorConfigFactory.js.map +1 -1
  578. package/dist/utilities/fieldsDrawer/index.css +4 -4
  579. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  580. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  581. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  582. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  583. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  584. package/dist/utilities/generateImportMap.d.ts +1 -1
  585. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  586. package/dist/utilities/generateImportMap.js +3 -7
  587. package/dist/utilities/generateImportMap.js.map +1 -1
  588. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  589. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  590. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  591. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  592. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  593. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  594. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  595. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  596. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  597. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  598. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  599. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  600. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  601. package/dist/validate/hasText.d.ts +2 -2
  602. package/dist/validate/hasText.d.ts.map +1 -1
  603. package/dist/validate/hasText.js.map +1 -1
  604. package/dist/validate/index.d.ts +1 -1
  605. package/dist/validate/index.d.ts.map +1 -1
  606. package/package.json +98 -30
  607. package/dist/@types/assets.d.js +0 -2
  608. package/dist/@types/assets.d.js.map +0 -1
  609. package/dist/dependencyChecker.spec.js +0 -16
  610. package/dist/dependencyChecker.spec.js.map +0 -1
  611. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  612. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  613. package/dist/exports/client/bundled.css +0 -1
  614. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  615. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  616. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  617. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  618. package/dist/exports/client/chunk-ZYXHC5CY.js +0 -2
  619. package/dist/exports/client/chunk-ZYXHC5CY.js.map +0 -7
  620. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  621. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  622. package/dist/exports/client/componentInline-R3EPNYWF.js +0 -2
  623. package/dist/exports/server/rsc.browser.d.ts +0 -11
  624. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  625. package/dist/exports/server/rsc.browser.js +0 -10
  626. package/dist/exports/server/rsc.browser.js.map +0 -1
  627. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  628. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  629. package/dist/features/blockquote/markdownTransformer.js +0 -33
  630. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  631. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  632. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  633. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  634. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  635. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  636. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  637. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  638. package/dist/features/experimental_table/client/index.js.map +0 -1
  639. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  640. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  641. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  642. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  643. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  644. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  645. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  646. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  647. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  648. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  649. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  650. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  651. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  652. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  653. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  654. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  655. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  656. package/dist/features/experimental_table/server/index.d.ts +0 -3
  657. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  658. package/dist/features/experimental_table/server/index.js.map +0 -1
  659. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  660. package/dist/features/experimental_table/server/schema.js.map +0 -1
  661. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  662. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  663. package/dist/features/format/bold/markdownTransformers.js +0 -23
  664. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  665. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  666. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  667. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  668. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  669. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  670. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  671. package/dist/features/format/italic/markdownTransformers.js +0 -12
  672. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  673. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  674. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  675. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  676. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  677. package/dist/features/link/markdownTransformer.spec.js +0 -195
  678. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  679. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  680. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  681. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  682. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  683. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  684. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  685. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  686. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  687. package/dist/features/lists/shared/markdown.d.ts +0 -6
  688. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  689. package/dist/features/lists/shared/markdown.js +0 -57
  690. package/dist/features/lists/shared/markdown.js.map +0 -1
  691. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  692. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  693. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  694. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  695. package/dist/field/clientEntry.d.ts +0 -29
  696. package/dist/field/clientEntry.d.ts.map +0 -1
  697. package/dist/field/clientEntry.js +0 -86
  698. package/dist/field/clientEntry.js.map +0 -1
  699. package/dist/lexical/utils/guard.d.ts +0 -5
  700. package/dist/lexical/utils/guard.d.ts.map +0 -1
  701. package/dist/lexical/utils/guard.js +0 -9
  702. package/dist/lexical/utils/guard.js.map +0 -1
  703. package/dist/lexical/utils/url.spec.js +0 -114
  704. package/dist/lexical/utils/url.spec.js.map +0 -1
  705. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  706. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  707. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  708. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  709. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  710. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  711. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  712. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  713. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  714. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  715. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  716. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  717. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  718. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  719. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  720. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  721. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  722. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  723. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  724. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  725. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  726. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  727. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  728. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  729. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  730. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  731. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  732. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  733. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  734. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  735. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  736. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  737. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  738. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  739. package/dist/packages/@lexical/markdown/index.js +0 -39
  740. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  741. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  742. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  743. package/dist/packages/@lexical/markdown/utils.js +0 -267
  744. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  745. package/dist/utilities/jsx/jsx.spec.js +0 -178
  746. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  747. /package/dist/exports/client/{componentInline-R3EPNYWF.js.map → componentInline-ZEP5JPTC.js.map} +0 -0
  748. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  749. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  750. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  751. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  752. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  753. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  754. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  755. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  756. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  757. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  758. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  759. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  760. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  761. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  762. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  763. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  764. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
+ import { CHECK_LIST } from '@lexical/markdown';
4
5
  import { $isRangeSelection } from 'lexical';
5
6
  import { ChecklistIcon } from '../../../../lexical/ui/icons/Checklist/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 { CHECK_LIST } from '../markdownTransformers.js';
12
12
  import { LexicalCheckListPlugin } from './plugin/index.js';
13
13
  const toolbarGroups = [toolbarTextDropdownGroupWithItems([{
14
14
  ChildComponent: ChecklistIcon,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isListNode","INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","ChecklistIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","shouldRegisterListBaseNodes","slashMenuListGroupWithItems","CHECK_LIST","LexicalCheckListPlugin","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","ChecklistFeatureClient","featureProviderMap","plugins","Component","position","shouldRegister","push","markdownTransformers","nodes","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/checklist/client/index.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\nimport type { ClientFeature } from '../../../typesClient.js'\n\nimport { ChecklistIcon } from '../../../../lexical/ui/icons/Checklist/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 { CHECK_LIST } from '../markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\n\nexport const ChecklistFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n const shouldRegister = shouldRegisterListBaseNodes('checklist', featureProviderMap)\n if (shouldRegister) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegister ? [ListNode, ListItemNode] : [],\n plugins,\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_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,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAC/E,SAASC,iBAAiB,QAAQ;AAKlC,SAASC,aAAa,QAAQ;AAC9B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,QAAQ;AAEvC,MAAMC,aAAA,GAAgC,CACpCN,iCAAA,CAAkC,CAChC;EACEO,cAAA,EAAgBT,aAAA;EAChBU,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACZ,iBAAA,CAAkBY,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIlB,WAAA,CAAYiB,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,SAAS;QACvD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAIrB,WAAA,CAAYoB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,SAAS;QAC3D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAIrB,WAAA,CAAYsB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,SAAS;QACvE;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,CAAC5B,yBAAA,EAA2B6B,SAAA;EACpD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,sBAAA,GAAyB1B,mBAAA,CAAoB,CAAC;EAAE2B;AAAkB,CAAE;EAC/E,MAAMC,OAAA,GAA+C,CACnD;IACEC,SAAA,EAAWvB,sBAAA;IACXwB,QAAA,EAAU;EACZ,EACD;EAED,MAAMC,cAAA,GAAiB5B,2BAAA,CAA4B,aAAawB,kBAAA;EAChE,IAAII,cAAA,EAAgB;IAClBH,OAAA,CAAQI,IAAI,CAAC;MACXH,SAAA,EAAW3B,iBAAA;MACX4B,QAAA,EAAU;IACZ;EACF;EAEA,OAAO;IACLG,oBAAA,EAAsB,CAAC5B,UAAA,CAAW;IAClC6B,KAAA,EAAOH,cAAA,GAAiB,CAAClC,QAAA,EAAUD,YAAA,CAAa,GAAG,EAAE;IACrDgC,OAAA;IACAO,SAAA,EAAW;MACTC,MAAA,EAAQ,CACNhC,2BAAA,CAA4B,CAC1B;QACEiC,IAAA,EAAMtC,aAAA;QACNkB,GAAA,EAAK;QACLqB,QAAA,EAAU,CAAC,cAAc,SAAS,aAAa,KAAK;QACpDpB,KAAA,EAAOA,CAAC;UAAEC;QAAI,CAAE;UACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;QAChB;QACAC,QAAA,EAAUA,CAAC;UAAEC;QAAM,CAAE;UACnBA,MAAA,CAAOC,eAAe,CAAC5B,yBAAA,EAA2B6B,SAAA;QACpD;MACF,EACD;IAEL;IACAe,YAAA,EAAc;MACZH,MAAA,EAAQ7B;IACV;IACAiC,aAAA,EAAe;MACbJ,MAAA,EAAQ7B;IACV;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isListNode","INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","CHECK_LIST","$isRangeSelection","ChecklistIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","shouldRegisterListBaseNodes","slashMenuListGroupWithItems","LexicalCheckListPlugin","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","ChecklistFeatureClient","featureProviderMap","plugins","Component","position","shouldRegister","push","markdownTransformers","nodes","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/checklist/client/index.tsx"],"sourcesContent":["'use client'\nimport { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { CHECK_LIST } from '@lexical/markdown'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\nimport type { ClientFeature } from '../../../typesClient.js'\n\nimport { ChecklistIcon } from '../../../../lexical/ui/icons/Checklist/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 { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\n\nexport const ChecklistFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n const shouldRegister = shouldRegisterListBaseNodes('checklist', featureProviderMap)\n if (shouldRegister) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegister ? [ListNode, ListItemNode] : [],\n plugins,\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: ({ i18n }) => {\n return i18n.t('lexical:checklist:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_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,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AAC/E,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,QAAQ;AAKlC,SAASC,aAAa,QAAQ;AAC9B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,sBAAsB,QAAQ;AAEvC,MAAMC,aAAA,GAAgC,CACpCL,iCAAA,CAAkC,CAChC;EACEM,cAAA,EAAgBR,aAAA;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,IAAIlB,WAAA,CAAYiB,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,SAAS;QACvD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAIrB,WAAA,CAAYoB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,SAAS;QAC3D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAIrB,WAAA,CAAYsB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,SAAS;QACvE;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,CAAC5B,yBAAA,EAA2B6B,SAAA;EACpD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,sBAAA,GAAyBzB,mBAAA,CAAoB,CAAC;EAAE0B;AAAkB,CAAE;EAC/E,MAAMC,OAAA,GAA+C,CACnD;IACEC,SAAA,EAAWvB,sBAAA;IACXwB,QAAA,EAAU;EACZ,EACD;EAED,MAAMC,cAAA,GAAiB3B,2BAAA,CAA4B,aAAauB,kBAAA;EAChE,IAAII,cAAA,EAAgB;IAClBH,OAAA,CAAQI,IAAI,CAAC;MACXH,SAAA,EAAW1B,iBAAA;MACX2B,QAAA,EAAU;IACZ;EACF;EAEA,OAAO;IACLG,oBAAA,EAAsB,CAACnC,UAAA,CAAW;IAClCoC,KAAA,EAAOH,cAAA,GAAiB,CAAClC,QAAA,EAAUD,YAAA,CAAa,GAAG,EAAE;IACrDgC,OAAA;IACAO,SAAA,EAAW;MACTC,MAAA,EAAQ,CACN/B,2BAAA,CAA4B,CAC1B;QACEgC,IAAA,EAAMrC,aAAA;QACNiB,GAAA,EAAK;QACLqB,QAAA,EAAU,CAAC,cAAc,SAAS,aAAa,KAAK;QACpDpB,KAAA,EAAOA,CAAC;UAAEC;QAAI,CAAE;UACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;QAChB;QACAC,QAAA,EAAUA,CAAC;UAAEC;QAAM,CAAE;UACnBA,MAAA,CAAOC,eAAe,CAAC5B,yBAAA,EAA2B6B,SAAA;QACpD;MACF,EACD;IAEL;IACAe,YAAA,EAAc;MACZH,MAAA,EAAQ7B;IACV;IACAiC,aAAA,EAAe;MACbJ,MAAA,EAAQ7B;IACV;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,kGAqB3B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,gBAAgB,kGAuB3B,CAAA"}
@@ -1,9 +1,10 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { CHECK_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 { CHECK_LIST } from '../markdownTransformers.js';
7
+ import { listItemValidation, listValidation } from '../../shared/validate.js';
7
8
  import { i18n } from './i18n.js';
8
9
  export const ChecklistFeature = createServerFeature({
9
10
  feature: ({
@@ -15,10 +16,12 @@ export const ChecklistFeature = createServerFeature({
15
16
  markdownTransformers: [CHECK_LIST],
16
17
  nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap) ? [createNode({
17
18
  jsonSchema: listNodeJSONSchema,
18
- node: ListNode
19
+ node: ListNode,
20
+ validations: [listValidation]
19
21
  }), createNode({
20
22
  jsonSchema: listItemNodeJSONSchema,
21
- node: ListItemNode
23
+ node: ListItemNode,
24
+ validations: [listItemValidation]
22
25
  })] : []
23
26
  };
24
27
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","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":[]}
@@ -11,7 +11,6 @@
11
11
  background: var(--color-bg);
12
12
  border: var(--stroke-width-small) solid var(--color-border);
13
13
  border-radius: var(--radius-medium);
14
- font-family: var(--font-body);
15
14
  margin-block: var(--spacer-2);
16
15
  color: var(--color-text);
17
16
 
@@ -42,7 +41,6 @@
42
41
  }
43
42
 
44
43
  .LexicalEditorTheme__relationship__label {
45
- font-family: var(--text-body-small-font-family);
46
44
  font-size: var(--text-body-small-font-size);
47
45
  font-weight: var(--text-body-small-font-weight);
48
46
  line-height: var(--text-body-small-line-height);
@@ -55,10 +53,9 @@
55
53
  }
56
54
 
57
55
  .LexicalEditorTheme__relationship__title {
58
- font-family: var(--text-body-medium-strong-font-family);
59
- font-size: var(--text-body-medium-strong-font-size);
60
- font-weight: var(--text-body-medium-strong-font-weight);
61
- line-height: var(--text-body-medium-strong-line-height);
56
+ font-size: var(--text-body-medium-bold-font-size);
57
+ font-weight: var(--text-body-medium-bold-font-weight);
58
+ line-height: var(--text-body-medium-bold-line-height);
62
59
  letter-spacing: var(--text-body-medium-letter-spacing);
63
60
  color: var(--color-text);
64
61
  margin: 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,GAAI,4BAA4B,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,+BAAgC,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
@@ -1,3 +1,3 @@
1
- import type { RelationshipFeatureProps } from '../server/index.js';
2
- export declare const RelationshipFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<RelationshipFeatureProps, RelationshipFeatureProps>;
1
+ import type { RelationshipFeatureClientProps } from '../server/index.js';
2
+ export declare const RelationshipFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<RelationshipFeatureClientProps, RelationshipFeatureClientProps>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/client/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAUlE,eAAO,MAAM,yBAAyB,kHAuDpC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/client/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAA;AAUxE,eAAO,MAAM,yBAAyB,8HAuDpC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isNodeSelection","RelationshipIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","$isRelationshipNode","RelationshipNode","RelationshipPlugin","RelationshipFeatureClient","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","replace","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode"],"sources":["../../../../src/features/relationship/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { RelationshipFeatureProps } from '../server/index.js'\n\nimport { RelationshipIcon } from '../../../lexical/ui/icons/Relationship/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isRelationshipNode, RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nexport const RelationshipFeatureClient = createClientFeature<RelationshipFeatureProps>({\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: RelationshipPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: RelationshipIcon,\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: RelationshipIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isRelationshipNode(firstNode)\n },\n key: 'relationship',\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,gBAAgB,QAAQ;AAIjC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,uCAAuC,QAAQ;AACxD,SAASC,mBAAmB,EAAEC,gBAAgB,QAAQ;AACtD,SAASC,kBAAkB,QAAQ;AAEnC,OAAO,MAAMC,yBAAA,GAA4BP,mBAAA,CAA8C;EACrFQ,KAAA,EAAO,CAACH,gBAAA,CAAiB;EACzBI,OAAA,EAAS,CACP;IACEC,SAAA,EAAWJ,kBAAA;IACXK,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACNZ,4BAAA,CAA6B,CAC3B;MACEa,IAAA,EAAMf,gBAAA;MACNgB,GAAA,EAAK;MACLC,QAAA,EAAU,CAAC,gBAAgB,YAAY,MAAM;MAC7CC,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;EACAC,YAAA,EAAc;IACZX,MAAA,EAAQ,CACNX,gCAAA,CAAiC,CAC/B;MACEuB,cAAA,EAAgB1B,gBAAA;MAChB2B,QAAA,EAAUA,CAAC;QAAEC;MAAS,CAAE;QACtB,IAAI,CAAC7B,gBAAA,CAAiB6B,SAAA,KAAc,CAACA,SAAA,CAAUC,QAAQ,GAAGC,MAAM,EAAE;UAChE,OAAO;QACT;QAEA,MAAMC,SAAA,GAAYH,SAAA,CAAUC,QAAQ,EAAE,CAAC,EAAE;QACzC,OAAOxB,mBAAA,CAAoB0B,SAAA;MAC7B;MACAf,GAAA,EAAK;MACLE,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isNodeSelection","RelationshipIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","$isRelationshipNode","RelationshipNode","RelationshipPlugin","RelationshipFeatureClient","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","replace","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode"],"sources":["../../../../src/features/relationship/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { RelationshipFeatureClientProps } from '../server/index.js'\n\nimport { RelationshipIcon } from '../../../lexical/ui/icons/Relationship/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isRelationshipNode, RelationshipNode } from './nodes/RelationshipNode.js'\nimport { RelationshipPlugin } from './plugins/index.js'\n\nexport const RelationshipFeatureClient = createClientFeature<RelationshipFeatureClientProps>({\n nodes: [RelationshipNode],\n plugins: [\n {\n Component: RelationshipPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: RelationshipIcon,\n key: 'relationship',\n keywords: ['relationship', 'relation', 'rel'],\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: RelationshipIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isRelationshipNode(firstNode)\n },\n key: 'relationship',\n label: ({ i18n }) => {\n return i18n.t('lexical:relationship:label')\n },\n onSelect: ({ editor }) => {\n // dispatch INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,gBAAgB,QAAQ;AAIjC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,uCAAuC,QAAQ;AACxD,SAASC,mBAAmB,EAAEC,gBAAgB,QAAQ;AACtD,SAASC,kBAAkB,QAAQ;AAEnC,OAAO,MAAMC,yBAAA,GAA4BP,mBAAA,CAAoD;EAC3FQ,KAAA,EAAO,CAACH,gBAAA,CAAiB;EACzBI,OAAA,EAAS,CACP;IACEC,SAAA,EAAWJ,kBAAA;IACXK,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACNZ,4BAAA,CAA6B,CAC3B;MACEa,IAAA,EAAMf,gBAAA;MACNgB,GAAA,EAAK;MACLC,QAAA,EAAU,CAAC,gBAAgB,YAAY,MAAM;MAC7CC,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;EACAC,YAAA,EAAc;IACZX,MAAA,EAAQ,CACNX,gCAAA,CAAiC,CAC/B;MACEuB,cAAA,EAAgB1B,gBAAA;MAChB2B,QAAA,EAAUA,CAAC;QAAEC;MAAS,CAAE;QACtB,IAAI,CAAC7B,gBAAA,CAAiB6B,SAAA,KAAc,CAACA,SAAA,CAAUC,QAAQ,GAAGC,MAAM,EAAE;UAChE,OAAO;QACT;QAEA,MAAMC,SAAA,GAAYH,SAAA,CAAUC,QAAQ,EAAE,CAAC,EAAE;QACzC,OAAOxB,mBAAA,CAAoB0B,SAAA;MAC7B;MACAf,GAAA,EAAK;MACLE,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnB;QACAA,MAAA,CAAOC,eAAe,CAACnB,uCAAA,EAAyC;UAC9DoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAsB/E,qBAAa,gBAAiB,SAAQ,sBAAsB;WAC1C,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB;WAI3D,OAAO,IAAI,MAAM;WAIjB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;WAiBpD,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB;IAc/E,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAWlE,UAAU,IAAI,0BAA0B;CAGlD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
1
+ {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAsB/E,qBAAa,gBAAiB,SAAQ,sBAAsB;IAC1D,OAAgB,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB,CAE1E;IAED,OAAgB,OAAO,IAAI,MAAM,CAEhC;IAED,OAAgB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI,CAenE;IAED,OAAgB,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB,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"}