@payloadcms/richtext-lexical 4.0.0-canary.2 → 4.0.0-canary.21

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 (552) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js +5 -5
  4. package/dist/cell/rscEntry.js.map +1 -1
  5. package/dist/exports/client/Field-F22V5L4V.js +2 -0
  6. package/dist/exports/client/Field-F22V5L4V.js.map +7 -0
  7. package/dist/exports/client/bundled.css +1 -1
  8. package/dist/exports/client/chunk-43E5QYAA.js +2 -0
  9. package/dist/exports/client/chunk-43E5QYAA.js.map +7 -0
  10. package/dist/exports/client/{chunk-CUFJGFNW.js → chunk-ESITTE3C.js} +2 -2
  11. package/dist/exports/client/{chunk-CUFJGFNW.js.map → chunk-ESITTE3C.js.map} +2 -2
  12. package/dist/exports/client/chunk-LN6VX25I.js +2 -0
  13. package/dist/exports/client/chunk-LN6VX25I.js.map +7 -0
  14. package/dist/exports/client/component-D5QLYS7W.js +2 -0
  15. package/dist/exports/client/component-D5QLYS7W.js.map +7 -0
  16. package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
  17. package/dist/exports/client/index.d.ts +1 -2
  18. package/dist/exports/client/index.d.ts.map +1 -1
  19. package/dist/exports/client/index.js +27 -28
  20. package/dist/exports/client/index.js.map +4 -4
  21. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  22. package/dist/features/blockquote/client/index.js +2 -2
  23. package/dist/features/blockquote/client/index.js.map +1 -1
  24. package/dist/features/blockquote/server/index.js +2 -2
  25. package/dist/features/blockquote/server/index.js.map +1 -1
  26. package/dist/features/blocks/client/component/index.css +2 -2
  27. package/dist/features/blocks/client/component/index.js.map +1 -1
  28. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  29. package/dist/features/blocks/client/componentInline/index.css +8 -8
  30. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  31. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  32. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  33. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  34. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  35. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  36. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  37. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  38. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  39. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  40. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  41. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  42. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  43. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  44. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  46. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  47. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  48. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  49. package/dist/features/blocks/server/index.js +2 -2
  50. package/dist/features/blocks/server/index.js.map +1 -1
  51. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  52. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  53. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  54. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  55. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  56. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  57. package/dist/features/blocks/server/schema.js +3 -2
  58. package/dist/features/blocks/server/schema.js.map +1 -1
  59. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  60. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  61. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  62. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  63. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  64. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  65. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  66. package/dist/features/converters/markdownToLexical/index.js +5 -2
  67. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  68. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  69. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  70. package/dist/features/format/bold/feature.client.js +1 -1
  71. package/dist/features/format/bold/feature.client.js.map +1 -1
  72. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  73. package/dist/features/format/bold/feature.server.js +1 -1
  74. package/dist/features/format/bold/feature.server.js.map +1 -1
  75. package/dist/features/format/inlineCode/feature.client.js +1 -1
  76. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  77. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  78. package/dist/features/format/inlineCode/feature.server.js +1 -1
  79. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  80. package/dist/features/format/italic/feature.client.js +1 -1
  81. package/dist/features/format/italic/feature.client.js.map +1 -1
  82. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  83. package/dist/features/format/italic/feature.server.js +1 -1
  84. package/dist/features/format/italic/feature.server.js.map +1 -1
  85. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  86. package/dist/features/format/strikethrough/feature.client.js +1 -1
  87. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  88. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  89. package/dist/features/format/strikethrough/feature.server.js +1 -1
  90. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  91. package/dist/features/heading/client/index.js +2 -2
  92. package/dist/features/heading/client/index.js.map +1 -1
  93. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  94. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  95. package/dist/features/heading/markdownTransformer.js +6 -19
  96. package/dist/features/heading/markdownTransformer.js.map +1 -1
  97. package/dist/features/heading/server/index.js +2 -2
  98. package/dist/features/heading/server/index.js.map +1 -1
  99. package/dist/features/heading/server/schema.d.ts.map +1 -1
  100. package/dist/features/horizontalRule/client/index.js +2 -2
  101. package/dist/features/horizontalRule/client/index.js.map +1 -1
  102. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  103. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  104. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  105. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  106. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  107. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  108. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -1
  109. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  110. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  111. package/dist/features/horizontalRule/server/index.js +2 -2
  112. package/dist/features/horizontalRule/server/index.js.map +1 -1
  113. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  114. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  115. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  116. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  117. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  118. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  119. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +1 -1
  120. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  121. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  122. package/dist/features/link/client/index.js +2 -2
  123. package/dist/features/link/client/index.js.map +1 -1
  124. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  125. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +3 -3
  126. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  127. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -12
  128. package/dist/features/link/markdownTransformer.d.ts +4 -4
  129. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  130. package/dist/features/link/markdownTransformer.js +2 -2
  131. package/dist/features/link/markdownTransformer.js.map +1 -1
  132. package/dist/features/link/markdownTransformer.spec.js +10 -10
  133. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  134. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  135. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  136. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  137. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  138. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  139. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  140. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  141. package/dist/features/link/server/baseFields.js.map +1 -1
  142. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  143. package/dist/features/link/server/index.js +4 -4
  144. package/dist/features/link/server/index.js.map +1 -1
  145. package/dist/features/link/server/schema.d.ts.map +1 -1
  146. package/dist/features/link/server/schema.js +4 -2
  147. package/dist/features/link/server/schema.js.map +1 -1
  148. package/dist/features/link/server/validate.d.ts.map +1 -1
  149. package/dist/features/lists/checklist/client/index.js +1 -1
  150. package/dist/features/lists/checklist/client/index.js.map +1 -1
  151. package/dist/features/lists/checklist/server/index.js +1 -1
  152. package/dist/features/lists/checklist/server/index.js.map +1 -1
  153. package/dist/features/lists/orderedList/client/index.js +1 -1
  154. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  155. package/dist/features/lists/orderedList/server/index.js +1 -1
  156. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  157. package/dist/features/lists/unorderedList/client/index.js +1 -1
  158. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  159. package/dist/features/lists/unorderedList/server/index.js +1 -1
  160. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  161. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  162. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  163. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  164. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  165. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  166. package/dist/features/relationship/server/schema.d.ts +3 -3
  167. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  168. package/dist/features/relationship/server/schema.js +22 -5
  169. package/dist/features/relationship/server/schema.js.map +1 -1
  170. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  171. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  172. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  173. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  174. package/dist/features/table/client/index.d.ts.map +1 -0
  175. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  176. package/dist/features/table/client/index.js.map +1 -0
  177. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  178. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  179. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  180. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  181. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  182. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  183. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  184. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  185. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  186. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  187. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  188. package/dist/features/table/client/utils/debounce.js.map +1 -0
  189. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  190. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  191. package/dist/features/table/markdownTransformer.d.ts +5 -0
  192. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  193. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  194. package/dist/features/table/markdownTransformer.js.map +1 -0
  195. package/dist/features/table/server/index.d.ts +3 -0
  196. package/dist/features/table/server/index.d.ts.map +1 -0
  197. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  198. package/dist/features/table/server/index.js.map +1 -0
  199. package/dist/features/table/server/schema.d.ts.map +1 -0
  200. package/dist/features/table/server/schema.js.map +1 -0
  201. package/dist/features/textState/feature.client.js +1 -1
  202. package/dist/features/textState/feature.client.js.map +1 -1
  203. package/dist/features/toolbars/fixed/client/Toolbar/index.css +4 -6
  204. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  205. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  206. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +8 -14
  207. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  208. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  209. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  210. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  211. package/dist/features/typesClient.d.ts +1 -1
  212. package/dist/features/typesClient.d.ts.map +1 -1
  213. package/dist/features/typesClient.js.map +1 -1
  214. package/dist/features/typesServer.d.ts +3 -3
  215. package/dist/features/typesServer.d.ts.map +1 -1
  216. package/dist/features/typesServer.js.map +1 -1
  217. package/dist/features/upload/client/component/index.css +9 -9
  218. package/dist/features/upload/client/component/index.js +2 -1
  219. package/dist/features/upload/client/component/index.js.map +1 -1
  220. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  221. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  222. package/dist/features/upload/client/plugin/index.js +5 -5
  223. package/dist/features/upload/client/plugin/index.js.map +1 -1
  224. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  225. package/dist/features/upload/server/index.js +4 -4
  226. package/dist/features/upload/server/index.js.map +1 -1
  227. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  228. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  229. package/dist/features/upload/server/markdownTransformer.js +1 -1
  230. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  231. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  232. package/dist/features/upload/server/schema.d.ts +4 -4
  233. package/dist/features/upload/server/schema.d.ts.map +1 -1
  234. package/dist/features/upload/server/schema.js +26 -6
  235. package/dist/features/upload/server/schema.js.map +1 -1
  236. package/dist/features/upload/server/validate.d.ts.map +1 -1
  237. package/dist/field/Diff/converters/unknown/index.css +1 -1
  238. package/dist/field/Field.d.ts.map +1 -1
  239. package/dist/field/Field.js +18 -15
  240. package/dist/field/Field.js.map +1 -1
  241. package/dist/field/ViewSelector.css +1 -1
  242. package/dist/field/bundled.css +1 -1
  243. package/dist/field/index.css +5 -9
  244. package/dist/field/index.js +1 -1
  245. package/dist/field/index.js.map +1 -1
  246. package/dist/field/rscEntry.d.ts.map +1 -1
  247. package/dist/field/rscEntry.js +2 -0
  248. package/dist/field/rscEntry.js.map +1 -1
  249. package/dist/i18n.d.ts.map +1 -1
  250. package/dist/i18n.js +68 -0
  251. package/dist/i18n.js.map +1 -1
  252. package/dist/index.d.ts +3 -3
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +7 -7
  255. package/dist/index.js.map +1 -1
  256. package/dist/lexical/LexicalEditor.css +18 -18
  257. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  258. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  259. package/dist/lexical/config/client/loader.js +5 -1
  260. package/dist/lexical/config/client/loader.js.map +1 -1
  261. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  262. package/dist/lexical/config/server/loader.d.ts +1 -1
  263. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  264. package/dist/lexical/config/server/loader.js +2 -2
  265. package/dist/lexical/config/server/loader.js.map +1 -1
  266. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  267. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  268. package/dist/lexical/config/server/sanitize.js +2 -2
  269. package/dist/lexical/config/server/sanitize.js.map +1 -1
  270. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  271. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +16 -24
  272. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  273. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  274. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  275. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  276. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  277. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  278. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  279. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  280. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  281. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  282. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  283. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +1 -20
  284. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  285. package/dist/lexical/plugins/SlashMenu/index.css +1 -6
  286. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -1
  287. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  288. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +4 -3
  289. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  290. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  291. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  292. package/dist/lexical/theme/EditorTheme.css +18 -19
  293. package/dist/lexical/ui/ContentEditable.css +22 -17
  294. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  295. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  296. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  297. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  298. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  299. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  300. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  301. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  302. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  303. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  304. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  305. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  306. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  307. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  308. package/dist/lexical/utils/point.d.ts.map +1 -1
  309. package/dist/lexical/utils/rect.d.ts.map +1 -1
  310. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  311. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  312. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  313. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  314. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  315. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  316. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  317. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  318. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  319. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  320. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  321. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  322. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  323. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  324. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  325. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  326. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  327. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  328. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  329. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  330. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  331. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  332. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  333. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  334. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  335. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  336. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  337. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  338. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  339. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  340. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  341. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  342. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  343. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  344. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  345. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  346. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  347. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  348. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  349. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  350. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  351. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  352. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  353. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  354. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  355. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  356. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  357. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  358. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  359. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  360. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  361. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  362. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  363. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  364. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  365. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  366. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  367. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  368. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  369. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  370. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  371. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  372. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  373. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  374. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  375. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  376. package/dist/types/index.d.ts +3 -3
  377. package/dist/types/index.d.ts.map +1 -1
  378. package/dist/types/index.js.map +1 -1
  379. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  380. package/dist/types/nodeTypes.d.ts +1 -1
  381. package/dist/types/nodeTypes.d.ts.map +1 -1
  382. package/dist/types/nodeTypes.js.map +1 -1
  383. package/dist/types/schema.d.ts.map +1 -1
  384. package/dist/types/schema.js +12 -5
  385. package/dist/types/schema.js.map +1 -1
  386. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  387. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  388. package/dist/utilities/buildInitialState.d.ts +2 -1
  389. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  390. package/dist/utilities/buildInitialState.js.map +1 -1
  391. package/dist/utilities/createServerFeature.d.ts +1 -1
  392. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  393. package/dist/utilities/createServerFeature.js +2 -2
  394. package/dist/utilities/createServerFeature.js.map +1 -1
  395. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  396. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  397. package/dist/utilities/editorConfigFactory.js +9 -9
  398. package/dist/utilities/editorConfigFactory.js.map +1 -1
  399. package/dist/utilities/fieldsDrawer/index.css +0 -4
  400. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  401. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  402. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  403. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  404. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  405. package/dist/utilities/generateImportMap.d.ts +1 -1
  406. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  407. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  408. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  409. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  410. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  411. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  412. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  413. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  414. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  415. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  416. package/dist/validate/index.d.ts.map +1 -1
  417. package/package.json +96 -27
  418. package/dist/exports/client/Field-G5Z2HM5Y.js +0 -2
  419. package/dist/exports/client/Field-G5Z2HM5Y.js.map +0 -7
  420. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  421. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  422. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  423. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  424. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  425. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  426. package/dist/exports/client/componentInline-DV4EGOWU.js +0 -2
  427. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  428. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  429. package/dist/features/blockquote/markdownTransformer.js +0 -33
  430. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  431. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  432. package/dist/features/experimental_table/client/index.js.map +0 -1
  433. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  434. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  435. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  436. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  437. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  438. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  439. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  440. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  441. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  442. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  443. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  444. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  445. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  446. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  447. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  448. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  449. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  450. package/dist/features/experimental_table/server/index.d.ts +0 -3
  451. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  452. package/dist/features/experimental_table/server/index.js.map +0 -1
  453. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  454. package/dist/features/experimental_table/server/schema.js.map +0 -1
  455. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  456. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  457. package/dist/features/format/bold/markdownTransformers.js +0 -23
  458. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  459. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  460. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  461. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  462. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  463. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  464. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  465. package/dist/features/format/italic/markdownTransformers.js +0 -12
  466. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  467. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  468. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  469. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  470. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  471. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  472. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  473. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  474. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  475. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  476. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  477. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  478. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  479. package/dist/features/lists/shared/markdown.d.ts +0 -6
  480. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  481. package/dist/features/lists/shared/markdown.js +0 -57
  482. package/dist/features/lists/shared/markdown.js.map +0 -1
  483. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  484. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  485. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  486. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  487. package/dist/lexical/utils/guard.d.ts +0 -5
  488. package/dist/lexical/utils/guard.d.ts.map +0 -1
  489. package/dist/lexical/utils/guard.js +0 -9
  490. package/dist/lexical/utils/guard.js.map +0 -1
  491. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  492. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  493. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  494. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  495. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  496. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  497. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  498. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  499. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  500. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  501. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  502. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  503. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  504. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  505. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  506. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  507. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  508. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  509. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  510. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  511. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  512. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  513. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  514. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  515. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  516. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  517. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  518. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  519. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  520. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  521. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  522. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  523. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  524. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  525. package/dist/packages/@lexical/markdown/index.js +0 -39
  526. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  527. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  528. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  529. package/dist/packages/@lexical/markdown/utils.js +0 -267
  530. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  531. /package/dist/exports/client/{componentInline-DV4EGOWU.js.map → componentInline-H24N7GUG.js.map} +0 -0
  532. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  533. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +0 -0
  534. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  535. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +0 -0
  536. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  537. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  538. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +0 -0
  539. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  540. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  541. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -0
  542. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  543. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  544. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  545. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  546. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  547. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  548. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  549. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  550. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  551. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  552. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAK3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExE,MAAM,MAAM,UAAU,GAAG;IACvB,6DAA6D;IAC7D,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACpB,GAAG,CAAC,EAAE;QACJ,UAAU,EAAE,MAAM,CAAA;QAClB,yEAAyE;QACzE,KAAK,EAAE;YAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;YAAC,EAAE,EAAE,qBAAqB,CAAA;SAAE,GAAG,qBAAqB,CAAA;KACnF,GAAG,IAAI,CAAA;IACR,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,WAAW,kBAAkB,CACjC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,OAAO,GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,mEAAmE;IACnE,EAAE,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GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,mEAAmE;IACnE,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,EAC/D,OAAO,GAAG,UAAU,CACpB,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,UAAU,CAAA;CACjB;AAuHD,eAAO,MAAM,wBAAwB,+BACN,KAAK,EAAE,KAAG,YActC,CAAA;AAEH,eAAO,MAAM,4BAA4B,+BACV,KAAK,EAAE,KAAG,YAatC,CAAA"}
@@ -28,7 +28,8 @@ const buildLinkFieldsJSONSchema = (sanitizedFieldsWithoutText, {
28
28
  config,
29
29
  i18n,
30
30
  interfaceNameDefinitions,
31
- typeStringDefinitions
31
+ typeStringDefinitions,
32
+ variant
32
33
  }) => {
33
34
  const flattenedExtraFields = flattenAllFields({
34
35
  fields: sanitizedFieldsWithoutText
@@ -39,7 +40,8 @@ const buildLinkFieldsJSONSchema = (sanitizedFieldsWithoutText, {
39
40
  fields: flattenedExtraFields,
40
41
  i18n,
41
42
  interfaceNameDefinitions,
42
- typeStringDefinitions
43
+ typeStringDefinitions,
44
+ variant
43
45
  }) : {
44
46
  properties: {},
45
47
  required: []
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":["createHash","fieldsToJSONSchema","flattenAllFields","LINK_NODES_TS","buildLinkFieldsJSONSchema","sanitizedFieldsWithoutText","collectionIDFieldTypes","config","i18n","interfaceNameDefinitions","typeStringDefinitions","flattenedExtraFields","fields","userFieldsSchema","length","properties","required","type","additionalProperties","doc","oneOf","relationTo","value","id","linkType","enum","newTab","url","Set","STANDARD_LINK_FIELD_NAMES","hashLinkFields","schema","update","JSON","stringify","digest","slice","toUpperCase","resolveLinkFieldsRef","args","fieldsSchema","hasUserExtras","some","field","has","name","fieldsRef","fieldsTypeName","set","$ref","createLinkNodeJSONSchema","elementNodeSchema","nodeUnionName","add","nodeType","tsType","createAutoLinkNodeJSONSchema"],"sources":["../../../../src/features/link/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { DefaultDocumentIDType, Field } from 'payload'\n\nimport { createHash } from 'crypto'\nimport { fieldsToJSONSchema, flattenAllFields } from 'payload'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaArgs, JSONSchemaFn } from '../../typesServer.js'\n\nexport type LinkFields = {\n /** Custom fields added via `LinkFeature`'s `fields` prop. */\n [k: string]: unknown\n doc?: {\n relationTo: string\n /** Document ID, or the full doc when populated by the afterRead hook. */\n value: { [k: string]: unknown; id: DefaultDocumentIDType } | DefaultDocumentIDType\n } | null\n linkType: 'custom' | 'internal'\n newTab: boolean\n url?: string\n}\n\nexport interface SerializedLinkNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n TFields = LinkFields,\n> extends SerializedLexicalElementBase<TChildren> {\n fields: TFields\n /** @todo make required in 4.0 and type AutoLinkNode differently */\n id?: string\n type: 'link'\n}\n\nexport interface SerializedAutoLinkNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n TFields = LinkFields,\n> extends SerializedLexicalElementBase<TChildren> {\n fields: TFields\n type: 'autolink'\n}\n\n/**\n * MUST stay byte-for-byte in sync with the runtime `LinkFields`, `SerializedLinkNode`,\n * and `SerializedAutoLinkNode` declared above.\n */\nconst LINK_NODES_TS = `export interface LexicalLinkFields {\n [k: string]: unknown;\n doc?: {\n relationTo: string;\n value: Config['db']['defaultIDType'] | { [k: string]: unknown; id: Config['db']['defaultIDType'] };\n } | null;\n linkType: 'custom' | 'internal';\n newTab: boolean;\n url?: string;\n}\nexport interface SerializedLinkNode<TChildren, TFields = LexicalLinkFields> extends SerializedLexicalElementBase<TChildren> {\n type: 'link';\n fields: TFields;\n id?: string;\n}\nexport interface SerializedAutoLinkNode<TChildren, TFields = LexicalLinkFields> extends SerializedLexicalElementBase<TChildren> {\n type: 'autolink';\n fields: TFields;\n}`\n\nconst buildLinkFieldsJSONSchema = (\n sanitizedFieldsWithoutText: Field[],\n {\n collectionIDFieldTypes,\n config,\n i18n,\n interfaceNameDefinitions,\n typeStringDefinitions,\n }: JSONSchemaArgs,\n): JSONSchema4 => {\n const flattenedExtraFields = flattenAllFields({ fields: sanitizedFieldsWithoutText })\n const userFieldsSchema =\n flattenedExtraFields.length > 0 && config\n ? fieldsToJSONSchema({\n collectionIDFieldTypes,\n config,\n fields: flattenedExtraFields,\n i18n,\n interfaceNameDefinitions,\n typeStringDefinitions,\n })\n : { properties: {}, required: [] }\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...userFieldsSchema.properties,\n doc: {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: {\n relationTo: { type: 'string' },\n value: {\n oneOf: [\n { type: 'string' },\n { type: 'number' },\n // Populated form (afterRead inflates `value` into the doc).\n {\n type: 'object',\n additionalProperties: true,\n properties: { id: { type: ['string', 'number'] } },\n required: ['id'],\n },\n ],\n },\n },\n required: ['relationTo', 'value'],\n },\n { type: 'null' },\n ],\n },\n linkType: { type: 'string', enum: ['custom', 'internal'] },\n newTab: { type: 'boolean' },\n url: { type: 'string' },\n },\n // `linkType`/`newTab` are already in `userFieldsSchema.required`; use Set to dedupe,\n // so `required` stays unique (draft 2020-12 enforces `uniqueItems`).\n required: [...new Set(['linkType', 'newTab', ...userFieldsSchema.required])],\n }\n}\n\n/** Fields auto-attached by `LinkFeature` (see `transformExtraFields`). */\nconst STANDARD_LINK_FIELD_NAMES = new Set(['doc', 'linkType', 'newTab', 'url'])\n\nconst hashLinkFields = (schema: JSONSchema4): string =>\n createHash('sha256').update(JSON.stringify(schema)).digest('hex').slice(0, 8).toUpperCase()\n\n/**\n * With custom link fields, emit a `LexicalLinkFields_<hash>` interface (hashed by its own content)\n * so the link node picks up their real shape. Without any, reuse the default `LexicalLinkFields` for\n * cross-alias assignability.\n */\nconst resolveLinkFieldsRef = (\n sanitizedFieldsWithoutText: Field[],\n args: JSONSchemaArgs,\n): { fieldsRef: JSONSchema4; fieldsTypeName: string } => {\n const fieldsSchema = buildLinkFieldsJSONSchema(sanitizedFieldsWithoutText, args)\n const hasUserExtras = sanitizedFieldsWithoutText.some(\n (field) => 'name' in field && !STANDARD_LINK_FIELD_NAMES.has(field.name),\n )\n if (!hasUserExtras) {\n return { fieldsRef: fieldsSchema, fieldsTypeName: 'LexicalLinkFields' }\n }\n const fieldsTypeName = `LexicalLinkFields_${hashLinkFields(fieldsSchema)}`\n args.interfaceNameDefinitions.set(fieldsTypeName, fieldsSchema)\n return { fieldsRef: { $ref: `#/$defs/${fieldsTypeName}` }, fieldsTypeName }\n}\n\nexport const createLinkNodeJSONSchema =\n (sanitizedFieldsWithoutText: Field[]): JSONSchemaFn =>\n (args) => {\n const { elementNodeSchema, nodeUnionName, typeStringDefinitions } = args\n typeStringDefinitions.add(LINK_NODES_TS)\n const { fieldsRef, fieldsTypeName } = resolveLinkFieldsRef(sanitizedFieldsWithoutText, args)\n return elementNodeSchema({\n nodeType: 'link',\n properties: {\n id: { type: 'string' },\n fields: fieldsRef,\n },\n required: ['fields'],\n tsType: `SerializedLinkNode<${nodeUnionName}, ${fieldsTypeName}>`,\n })\n }\n\nexport const createAutoLinkNodeJSONSchema =\n (sanitizedFieldsWithoutText: Field[]): JSONSchemaFn =>\n (args) => {\n const { elementNodeSchema, nodeUnionName, typeStringDefinitions } = args\n typeStringDefinitions.add(LINK_NODES_TS)\n const { fieldsRef, fieldsTypeName } = resolveLinkFieldsRef(sanitizedFieldsWithoutText, args)\n return elementNodeSchema({\n nodeType: 'autolink',\n properties: {\n fields: fieldsRef,\n },\n required: ['fields'],\n tsType: `SerializedAutoLinkNode<${nodeUnionName}, ${fieldsTypeName}>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AA;EACpE7B,qBAAA,CAAsB2C,GAAG,CAAClD,aAAA;EAC1B,MAAM;IAAE2C,SAAS;IAAEC;EAAc,CAAE,GAAGT,oBAAA,CAAqBjC,0BAAA,EAA4BkC,IAAA;EACvF,OAAOY,iBAAA,CAAkB;IACvBG,QAAA,EAAU;IACVvC,UAAA,EAAY;MACVQ,EAAA,EAAI;QAAEN,IAAA,EAAM;MAAS;MACrBL,MAAA,EAAQkC;IACV;IACA9B,QAAA,EAAU,CAAC,SAAS;IACpBuC,MAAA,EAAQ,sBAAsBH,aAAA,KAAkBL,cAAA;EAClD;AACF;AAEF,OAAO,MAAMS,4BAAA,GACVnD,0BAAA,IACAkC,IAAA;EACC,MAAM;IAAEY,iBAAiB;IAAEC,aAAa;IAAE1C;EAAqB,CAAE,GAAG6B,IAAA;EACpE7B,qBAAA,CAAsB2C,GAAG,CAAClD,aAAA;EAC1B,MAAM;IAAE2C,SAAS;IAAEC;EAAc,CAAE,GAAGT,oBAAA,CAAqBjC,0BAAA,EAA4BkC,IAAA;EACvF,OAAOY,iBAAA,CAAkB;IACvBG,QAAA,EAAU;IACVvC,UAAA,EAAY;MACVH,MAAA,EAAQkC;IACV;IACA9B,QAAA,EAAU,CAAC,SAAS;IACpBuC,MAAA,EAAQ,0BAA0BH,aAAA,KAAkBL,cAAA;EACtD;AACF","ignoreList":[]}
1
+ {"version":3,"file":"schema.js","names":["createHash","fieldsToJSONSchema","flattenAllFields","LINK_NODES_TS","buildLinkFieldsJSONSchema","sanitizedFieldsWithoutText","collectionIDFieldTypes","config","i18n","interfaceNameDefinitions","typeStringDefinitions","variant","flattenedExtraFields","fields","userFieldsSchema","length","properties","required","type","additionalProperties","doc","oneOf","relationTo","value","id","linkType","enum","newTab","url","Set","STANDARD_LINK_FIELD_NAMES","hashLinkFields","schema","update","JSON","stringify","digest","slice","toUpperCase","resolveLinkFieldsRef","args","fieldsSchema","hasUserExtras","some","field","has","name","fieldsRef","fieldsTypeName","set","$ref","createLinkNodeJSONSchema","elementNodeSchema","nodeUnionName","add","nodeType","tsType","createAutoLinkNodeJSONSchema"],"sources":["../../../../src/features/link/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { DefaultDocumentIDType, Field } from 'payload'\n\nimport { createHash } from 'crypto'\nimport { fieldsToJSONSchema, flattenAllFields } from 'payload'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaArgs, JSONSchemaFn } from '../../typesServer.js'\n\nexport type LinkFields = {\n /** Custom fields added via `LinkFeature`'s `fields` prop. */\n [k: string]: unknown\n doc?: {\n relationTo: string\n /** Document ID, or the full doc when populated by the afterRead hook. */\n value: { [k: string]: unknown; id: DefaultDocumentIDType } | DefaultDocumentIDType\n } | null\n linkType: 'custom' | 'internal'\n newTab: boolean\n url?: string\n}\n\nexport interface SerializedLinkNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n TFields = LinkFields,\n> extends SerializedLexicalElementBase<TChildren> {\n fields: TFields\n /** @todo make required in 4.0 and type AutoLinkNode differently */\n id?: string\n type: 'link'\n}\n\nexport interface SerializedAutoLinkNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n TFields = LinkFields,\n> extends SerializedLexicalElementBase<TChildren> {\n fields: TFields\n type: 'autolink'\n}\n\n/**\n * MUST stay byte-for-byte in sync with the runtime `LinkFields`, `SerializedLinkNode`,\n * and `SerializedAutoLinkNode` declared above.\n */\nconst LINK_NODES_TS = `export interface LexicalLinkFields {\n [k: string]: unknown;\n doc?: {\n relationTo: string;\n value: Config['db']['defaultIDType'] | { [k: string]: unknown; id: Config['db']['defaultIDType'] };\n } | null;\n linkType: 'custom' | 'internal';\n newTab: boolean;\n url?: string;\n}\nexport interface SerializedLinkNode<TChildren, TFields = LexicalLinkFields> extends SerializedLexicalElementBase<TChildren> {\n type: 'link';\n fields: TFields;\n id?: string;\n}\nexport interface SerializedAutoLinkNode<TChildren, TFields = LexicalLinkFields> extends SerializedLexicalElementBase<TChildren> {\n type: 'autolink';\n fields: TFields;\n}`\n\nconst buildLinkFieldsJSONSchema = (\n sanitizedFieldsWithoutText: Field[],\n {\n collectionIDFieldTypes,\n config,\n i18n,\n interfaceNameDefinitions,\n typeStringDefinitions,\n variant,\n }: JSONSchemaArgs,\n): JSONSchema4 => {\n const flattenedExtraFields = flattenAllFields({ fields: sanitizedFieldsWithoutText })\n const userFieldsSchema =\n flattenedExtraFields.length > 0 && config\n ? fieldsToJSONSchema({\n collectionIDFieldTypes,\n config,\n fields: flattenedExtraFields,\n i18n,\n interfaceNameDefinitions,\n typeStringDefinitions,\n variant,\n })\n : { properties: {}, required: [] }\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n ...userFieldsSchema.properties,\n doc: {\n oneOf: [\n {\n type: 'object',\n additionalProperties: false,\n properties: {\n relationTo: { type: 'string' },\n value: {\n oneOf: [\n { type: 'string' },\n { type: 'number' },\n // Populated form (afterRead inflates `value` into the doc).\n {\n type: 'object',\n additionalProperties: true,\n properties: { id: { type: ['string', 'number'] } },\n required: ['id'],\n },\n ],\n },\n },\n required: ['relationTo', 'value'],\n },\n { type: 'null' },\n ],\n },\n linkType: { type: 'string', enum: ['custom', 'internal'] },\n newTab: { type: 'boolean' },\n url: { type: 'string' },\n },\n // `linkType`/`newTab` are already in `userFieldsSchema.required`; use Set to dedupe,\n // so `required` stays unique (draft 2020-12 enforces `uniqueItems`).\n required: [...new Set(['linkType', 'newTab', ...userFieldsSchema.required])],\n }\n}\n\n/** Fields auto-attached by `LinkFeature` (see `transformExtraFields`). */\nconst STANDARD_LINK_FIELD_NAMES = new Set(['doc', 'linkType', 'newTab', 'url'])\n\nconst hashLinkFields = (schema: JSONSchema4): string =>\n createHash('sha256').update(JSON.stringify(schema)).digest('hex').slice(0, 8).toUpperCase()\n\n/**\n * With custom link fields, emit a `LexicalLinkFields_<hash>` interface (hashed by its own content)\n * so the link node picks up their real shape. Without any, reuse the default `LexicalLinkFields` for\n * cross-alias assignability.\n */\nconst resolveLinkFieldsRef = (\n sanitizedFieldsWithoutText: Field[],\n args: JSONSchemaArgs,\n): { fieldsRef: JSONSchema4; fieldsTypeName: string } => {\n const fieldsSchema = buildLinkFieldsJSONSchema(sanitizedFieldsWithoutText, args)\n const hasUserExtras = sanitizedFieldsWithoutText.some(\n (field) => 'name' in field && !STANDARD_LINK_FIELD_NAMES.has(field.name),\n )\n if (!hasUserExtras) {\n return { fieldsRef: fieldsSchema, fieldsTypeName: 'LexicalLinkFields' }\n }\n const fieldsTypeName = `LexicalLinkFields_${hashLinkFields(fieldsSchema)}`\n args.interfaceNameDefinitions.set(fieldsTypeName, fieldsSchema)\n return { fieldsRef: { $ref: `#/$defs/${fieldsTypeName}` }, fieldsTypeName }\n}\n\nexport const createLinkNodeJSONSchema =\n (sanitizedFieldsWithoutText: Field[]): JSONSchemaFn =>\n (args) => {\n const { elementNodeSchema, nodeUnionName, typeStringDefinitions } = args\n typeStringDefinitions.add(LINK_NODES_TS)\n const { fieldsRef, fieldsTypeName } = resolveLinkFieldsRef(sanitizedFieldsWithoutText, args)\n return elementNodeSchema({\n nodeType: 'link',\n properties: {\n id: { type: 'string' },\n fields: fieldsRef,\n },\n required: ['fields'],\n tsType: `SerializedLinkNode<${nodeUnionName}, ${fieldsTypeName}>`,\n })\n }\n\nexport const createAutoLinkNodeJSONSchema =\n (sanitizedFieldsWithoutText: Field[]): JSONSchemaFn =>\n (args) => {\n const { elementNodeSchema, nodeUnionName, typeStringDefinitions } = args\n typeStringDefinitions.add(LINK_NODES_TS)\n const { fieldsRef, fieldsTypeName } = resolveLinkFieldsRef(sanitizedFieldsWithoutText, args)\n return elementNodeSchema({\n nodeType: 'autolink',\n properties: {\n fields: fieldsRef,\n },\n required: ['fields'],\n tsType: `SerializedAutoLinkNode<${nodeUnionName}, ${fieldsTypeName}>`,\n })\n }\n"],"mappings":"AAIA,SAASA,UAAU,QAAQ;AAC3B,SAASC,kB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,CAACnD,aAAA;EAC1B,MAAM;IAAE4C,SAAS;IAAEC;EAAc,CAAE,GAAGT,oBAAA,CAAqBlC,0BAAA,EAA4BmC,IAAA;EACvF,OAAOY,iBAAA,CAAkB;IACvBG,QAAA,EAAU;IACVvC,UAAA,EAAY;MACVQ,EAAA,EAAI;QAAEN,IAAA,EAAM;MAAS;MACrBL,MAAA,EAAQkC;IACV;IACA9B,QAAA,EAAU,CAAC,SAAS;IACpBuC,MAAA,EAAQ,sBAAsBH,aAAA,KAAkBL,cAAA;EAClD;AACF;AAEF,OAAO,MAAMS,4BAAA,GACVpD,0BAAA,IACAmC,IAAA;EACC,MAAM;IAAEY,iBAAiB;IAAEC,aAAa;IAAE3C;EAAqB,CAAE,GAAG8B,IAAA;EACpE9B,qBAAA,CAAsB4C,GAAG,CAACnD,aAAA;EAC1B,MAAM;IAAE4C,SAAS;IAAEC;EAAc,CAAE,GAAGT,oBAAA,CAAqBlC,0BAAA,EAA4BmC,IAAA;EACvF,OAAOY,iBAAA,CAAkB;IACvBG,QAAA,EAAU;IACVvC,UAAA,EAAY;MACVH,MAAA,EAAQkC;IACV;IACA9B,QAAA,EAAU,CAAC,SAAS;IACpBuC,MAAA,EAAQ,0BAA0BH,aAAA,KAAkBL,cAAA;EACtD;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE7E,eAAO,MAAM,cAAc,GACzB,OAAO,sBAAsB,EAC7B,4BAA4B,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CA4C5D,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/link/server/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE7E,eAAO,MAAM,cAAc,UAClB,sBAAsB,8BACD,KAAK,EAAE,KAClC,cAAc,CAAC,sBAAsB,GAAG,kBAAkB,CA4C5D,CAAA"}
@@ -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,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AAA,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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,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,9 +1,9 @@
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
7
  import { i18n } from './i18n.js';
8
8
  export const ChecklistFeature = createServerFeature({
9
9
  feature: ({
@@ -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","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { CHECK_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,UAAU,QAAQ;AAE3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBN,mBAAA,CAAoB;EAClDO,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACX,UAAA,CAAW;MAClCY,KAAA,EAAOP,2BAAA,CAA4B,aAAaI,kBAAA,IAC5C,CACEP,UAAA,CAAW;QACTW,UAAA,EAAYT,kBAAA;QACZU,IAAA,EAAMf;MACR,IACAG,UAAA,CAAW;QACTW,UAAA,EAAYV,sBAAA;QACZW,IAAA,EAAMhB;MACR,GACD,GACD;IACN;EACF;EACAiB,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,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,MAAM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,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,QA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8B,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,9 +1,9 @@
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
7
  import { i18n } from './i18n.js';
8
8
  export const OrderedListFeature = createServerFeature({
9
9
  feature: ({
@@ -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","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { ORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAE7B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBN,mBAAA,CAAoB;EACpDO,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACX,YAAA,CAAa;MACpCY,KAAA,EAAOP,2BAAA,CAA4B,WAAWI,kBAAA,IAC1C,CACEP,UAAA,CAAW;QACTW,UAAA,EAAYT,kBAAA;QACZU,IAAA,EAAMf;MACR,IACAG,UAAA,CAAW;QACTW,UAAA,EAAYV,sBAAA;QACZW,IAAA,EAAMhB;MACR,GACD,GACD;IACN;EACF;EACAiB,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,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;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AAW;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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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,8 +1,8 @@
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
6
  import { i18n } from './i18n.js';
7
7
  export const UnorderedListFeature = createServerFeature({
8
8
  feature: {
@@ -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","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBL,mBAAA,CAAoB;EACtDM,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACT,cAAA,CAAe;IACtCU,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,UAAA,EAAYP,kBAAA;MACZQ,IAAA,EAAMb;IACR,IACAG,UAAA,CAAW;MACTS,UAAA,EAAYR,sBAAA;MACZS,IAAA,EAAMd;IACR;EAEJ;EACAe,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +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 +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 +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;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,aACxB,8BAA8B,KACvC,6BAmBF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAI7D,eAAO,MAAM,gCAAgC,GAC3C,OAAO,wBAAwB,KAC9B,iBAAiB,CAAC,0BAA0B,CAwC9C,CAAA"}
1
+ {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,KAAK,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UAAU,IAAI,0BAA0B;IASjD,OAAO,IAAI,gBAAgB;IAIlB,cAAc,IAAI,MAAM;IAIjC,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;CAItC;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,gBAAgB,GAAG,sBAAsB,CAM5F;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,sBAAsB,GAAG,SAAS,GAC5D,IAAI,IAAI,sBAAsB,CAEhC"}
1
+ {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/server/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAEhF,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,OAAO,EACb,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAgBhF,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,MAAM,EAAE,gBAAgB,CAAA;IAExB,YAAY,EACV,IAAI,EACJ,MAAM,EACN,GAAG,GACJ,EAAE;QACD,IAAI,EAAE,gBAAgB,CAAA;QACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;QAC1B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd,EAGA;IAED,OAAgB,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB,CAM1E;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,sBAAsB,CAY7F;IAED,MAAM,CAAC,QAAQ,IAAI,KAAK,CAEvB;IAEQ,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAIrD;IAEQ,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAE5E;IAEQ,SAAS,IAAI,eAAe,CAWpC;IAEQ,UAAU,IAAI,0BAA0B,CAOhD;IAED,OAAO,IAAI,gBAAgB,CAE1B;IAEQ,cAAc,IAAI,MAAM,CAEhC;IAED,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAGpC;CACF;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,gBAAgB,GAAG,sBAAsB,CAM5F;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,sBAAsB,GAAG,SAAS,GAC5D,IAAI,IAAI,sBAAsB,CAEhC"}
@@ -1,11 +1,11 @@
1
- import type { CollectionSlug, DataFromCollectionSlug, UploadCollectionSlug } from 'payload';
1
+ import type { CollectionSlug, DataFromCollectionSlug, IDTypeForCollectionSlug, UploadCollectionSlug } from 'payload';
2
2
  import type { LexicalElementFormat } from '../../../types/nodeTypes.js';
3
3
  import type { JSONSchemaFn } from '../../typesServer.js';
4
4
  import type { RelationshipFeatureProps } from './index.js';
5
5
  export type RelationshipData = {
6
6
  [TCollectionSlug in CollectionSlug]: {
7
7
  relationTo: TCollectionSlug;
8
- value: DataFromCollectionSlug<TCollectionSlug> | number | string;
8
+ value: DataFromCollectionSlug<TCollectionSlug> | IDTypeForCollectionSlug<TCollectionSlug>;
9
9
  };
10
10
  }[CollectionSlug];
11
11
  /**
@@ -17,7 +17,7 @@ export type NonUploadCollectionSlug = [Exclude<CollectionSlug, UploadCollectionS
17
17
  export type SerializedRelationshipNode<TSlugs extends CollectionSlug = NonUploadCollectionSlug> = {
18
18
  [TSlug in TSlugs]: {
19
19
  relationTo: TSlug;
20
- value: DataFromCollectionSlug<TSlug> | number | string;
20
+ value: DataFromCollectionSlug<TSlug> | IDTypeForCollectionSlug<TSlug>;
21
21
  };
22
22
  }[TSlugs] & {
23
23
  format: LexicalElementFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/server/schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAK1D,MAAM,MAAM,gBAAgB,GAAG;KAC5B,eAAe,IAAI,cAAc,GAAG;QACnC,UAAU,EAAE,eAAe,CAAA;QAC3B,KAAK,EAAE,sBAAsB,CAAC,eAAe,CAAC,GAAG,MAAM,GAAG,MAAM,CAAA;KACjE;CACF,CAAC,cAAc,CAAC,CAAA;AAEjB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC,SAAS;IAC5F,KAAK;CACN,GACG,cAAc,GACd,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAA;AAEjD,MAAM,MAAM,0BAA0B,CAAC,MAAM,SAAS,cAAc,GAAG,uBAAuB,IAAI;KAC/F,KAAK,IAAI,MAAM,GAAG;QACjB,UAAU,EAAE,KAAK,CAAA;QACjB,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,MAAM,CAAA;KACvD;CACF,CAAC,MAAM,CAAC,GAAG;IACV,MAAM,EAAE,oBAAoB,CAAA;IAC5B,IAAI,EAAE,cAAc,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA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SAAS,KAAG,YAwD9C,CAAA"}
@@ -8,15 +8,28 @@ const SERIALIZED_RELATIONSHIP_NODE_TS = `export type SerializedRelationshipNode<
8
8
  } & {
9
9
  [TSlug in TSlugs]: {
10
10
  relationTo: TSlug;
11
- value: number | string | Config['collections'][TSlug];
11
+ value: Config['collections'][TSlug]['id'] | Config['collections'][TSlug];
12
+ };
13
+ }[TSlugs];`;
14
+ /** Input variant of `SerializedRelationshipNode`: `value` is ID-only (you only ever write an ID). */
15
+ const SERIALIZED_RELATIONSHIP_NODE_INPUT_TS = `export type SerializedRelationshipNodeInput<TSlugs extends keyof Config['collections']> = {
16
+ type: 'relationship';
17
+ format: LexicalElementFormat;
18
+ version: number;
19
+ } & {
20
+ [TSlug in TSlugs]: {
21
+ relationTo: TSlug;
22
+ value: Config['collections'][TSlug]['id'];
12
23
  };
13
24
  }[TSlugs];`;
14
25
  export const createRelationshipNodeJSONSchema = props => ({
15
26
  collectionIDFieldTypes,
16
27
  config,
17
- typeStringDefinitions
28
+ typeStringDefinitions,
29
+ variant
18
30
  }) => {
19
- typeStringDefinitions.add(SERIALIZED_RELATIONSHIP_NODE_TS);
31
+ const isInput = variant === 'input';
32
+ typeStringDefinitions.add(isInput ? SERIALIZED_RELATIONSHIP_NODE_INPUT_TS : SERIALIZED_RELATIONSHIP_NODE_TS);
20
33
  const enabledCollections = config?.collections ? filterEnabledRelationshipCollections(config.collections, {
21
34
  disabledCollections: props?.disabledCollections,
22
35
  enabledCollections: props?.enabledCollections,
@@ -38,7 +51,10 @@ export const createRelationshipNodeJSONSchema = props => ({
38
51
  type: 'string',
39
52
  const: slug
40
53
  },
41
- value: {
54
+ value: isInput ? {
55
+ type: idType,
56
+ description: 'The related document ID.'
57
+ } : {
42
58
  description: 'The related document by ID (string or number). Populated to the full document when read at depth > 0.',
43
59
  oneOf: [{
44
60
  type: idType
@@ -70,9 +86,10 @@ export const createRelationshipNodeJSONSchema = props => ({
70
86
  const baseSchema = variants.length === 1 ? variants[0] : {
71
87
  oneOf: variants
72
88
  };
89
+ const tsName = isInput ? 'SerializedRelationshipNodeInput' : 'SerializedRelationshipNode';
73
90
  schema = {
74
91
  ...baseSchema,
75
- tsType: `SerializedRelationshipNode<${slugUnion}>`
92
+ tsType: `${tsName}<${slugUnion}>`
76
93
  };
77
94
  }
78
95
  return schema;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","names":["formatSchema","versionSchema","filterEnabledRelationshipCollections","SERIALIZED_RELATIONSHIP_NODE_TS","createRelationshipNodeJSONSchema","props","collectionIDFieldTypes","config","typeStringDefinitions","add","enabledCollections","collections","disabledCollections","uploads","variants","map","collection","slug","idType","type","additionalProperties","properties","const","format","relationTo","value","description","oneOf","$ref","version","required","schema","length","slugUnion","c","join","baseSchema","tsType"],"sources":["../../../../src/features/relationship/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { CollectionSlug, DataFromCollectionSlug, UploadCollectionSlug } from 'payload'\n\nimport type { LexicalElementFormat } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\nimport type { RelationshipFeatureProps } from './index.js'\n\nimport { formatSchema, versionSchema } from '../../../types/jsonSchemaHelpers.js'\nimport { filterEnabledRelationshipCollections } from '../shared/filterEnabledRelationshipCollections.js'\n\nexport type RelationshipData = {\n [TCollectionSlug in CollectionSlug]: {\n relationTo: TCollectionSlug\n value: DataFromCollectionSlug<TCollectionSlug> | number | string\n }\n}[CollectionSlug]\n\n/**\n * Exclude upload collection slugs. This matches runtime behavior, as well as the json schema.\n */\nexport type NonUploadCollectionSlug = [Exclude<CollectionSlug, UploadCollectionSlug>] extends [\n never,\n]\n ? CollectionSlug\n : Exclude<CollectionSlug, UploadCollectionSlug>\n\nexport type SerializedRelationshipNode<TSlugs extends CollectionSlug = NonUploadCollectionSlug> = {\n [TSlug in TSlugs]: {\n relationTo: TSlug\n value: DataFromCollectionSlug<TSlug> | number | string\n }\n}[TSlugs] & {\n format: LexicalElementFormat\n type: 'relationship'\n version: number\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedRelationshipNode` declared above. */\nconst SERIALIZED_RELATIONSHIP_NODE_TS = `export type SerializedRelationshipNode<TSlugs extends keyof Config['collections']> = {\n type: 'relationship';\n format: LexicalElementFormat;\n version: number;\n} & {\n [TSlug in TSlugs]: {\n relationTo: TSlug;\n value: number | string | Config['collections'][TSlug];\n };\n}[TSlugs];`\n\nexport const createRelationshipNodeJSONSchema =\n (props: RelationshipFeatureProps | undefined): JSONSchemaFn =>\n ({ collectionIDFieldTypes, config, typeStringDefinitions }) => {\n typeStringDefinitions.add(SERIALIZED_RELATIONSHIP_NODE_TS)\n const enabledCollections = config?.collections\n ? filterEnabledRelationshipCollections(config.collections, {\n disabledCollections: props?.disabledCollections,\n enabledCollections: props?.enabledCollections,\n uploads: false,\n })\n : []\n\n const variants: JSONSchema4[] = enabledCollections.map((collection) => {\n const slug = collection.slug\n const idType: 'number' | 'string' = collectionIDFieldTypes[slug] ?? 'string'\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'relationship' },\n format: formatSchema,\n relationTo: { type: 'string', const: slug },\n value: {\n description:\n 'The related document by ID (string or number). Populated to the full document when read at depth > 0.',\n oneOf: [{ type: idType }, { $ref: `#/$defs/${slug}` }],\n },\n version: versionSchema,\n },\n required: ['format', 'relationTo', 'type', 'value', 'version'],\n }\n })\n\n let schema: JSONSchema4\n if (variants.length === 0) {\n schema = {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: { type: 'string', const: 'relationship' },\n version: versionSchema,\n },\n required: ['type', 'version'],\n }\n } else {\n const slugUnion = enabledCollections.map((c) => `'${c.slug}'`).join(' | ')\n const baseSchema: JSONSchema4 = variants.length === 1 ? variants[0]! : { oneOf: variants }\n schema = { ...baseSchema, tsType: `SerializedRelationshipNode<${slugUnion}>` }\n }\n\n return schema\n }\n"],"mappings":"AAOA,SAASA,YAAY,EAAEC,aAAa,QAAQ;AAC5C,S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,EAAM;UAAUG,KAAA,EAAO;QAAe;QAC9CO,OAAA,EAAS5B;MACX;MACA6B,QAAA,EAAU,CAAC,QAAQ;IACrB;EACF,OAAO;IACL,MAAMG,SAAA,GAAYvB,kBAAA,CAAmBK,GAAG,CAAEmB,CAAA,IAAM,IAAIA,CAAA,CAAEjB,IAAI,GAAG,EAAEkB,IAAI,CAAC;IACpE,MAAMC,UAAA,GAA0BtB,QAAA,CAASkB,MAAM,KAAK,IAAIlB,QAAQ,CAAC,EAAE,GAAI;MAAEa,KAAA,EAAOb;IAAS;IACzFiB,MAAA,GAAS;MAAE,GAAGK,UAAU;MAAEC,MAAA,EAAQ,8BAA8BJ,SAAA;IAAa;EAC/E;EAEA,OAAOF,MAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"schema.js","names":["formatSchema","versionSchema","filterEnabledRelationshipCollections","SERIALIZED_RELATIONSHIP_NODE_TS","SERIALIZED_RELATIONSHIP_NODE_INPUT_TS","createRelationshipNodeJSONSchema","props","collectionIDFieldTypes","config","typeStringDefinitions","variant","isInput","add","enabledCollections","collections","disabledCollections","uploads","variants","map","collection","slug","idType","type","additionalProperties","properties","const","format","relationTo","value","description","oneOf","$ref","version","required","schema","length","slugUnion","c","join","baseSchema","tsName","tsType"],"sources":["../../../../src/features/relationship/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n CollectionSlug,\n DataFromCollectionSlug,\n IDTypeForCollectionSlug,\n UploadCollectionSlug,\n} from 'payload'\n\nimport type { LexicalElementFormat } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\nimport type { RelationshipFeatureProps } from './index.js'\n\nimport { formatSchema, versionSchema } from '../../../types/jsonSchemaHelpers.js'\nimport { filterEnabledRelationshipCollections } from '../shared/filterEnabledRelationshipCollections.js'\n\nexport type RelationshipData = {\n [TCollectionSlug in CollectionSlug]: {\n relationTo: TCollectionSlug\n value: DataFromCollectionSlug<TCollectionSlug> | IDTypeForCollectionSlug<TCollectionSlug>\n }\n}[CollectionSlug]\n\n/**\n * Exclude upload collection slugs. This matches runtime behavior, as well as the json schema.\n */\nexport type NonUploadCollectionSlug = [Exclude<CollectionSlug, UploadCollectionSlug>] extends [\n never,\n]\n ? CollectionSlug\n : Exclude<CollectionSlug, UploadCollectionSlug>\n\nexport type SerializedRelationshipNode<TSlugs extends CollectionSlug = NonUploadCollectionSlug> = {\n [TSlug in TSlugs]: {\n relationTo: TSlug\n value: DataFromCollectionSlug<TSlug> | IDTypeForCollectionSlug<TSlug>\n }\n}[TSlugs] & {\n format: LexicalElementFormat\n type: 'relationship'\n version: number\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedRelationshipNode` declared above. */\nconst SERIALIZED_RELATIONSHIP_NODE_TS = `export type SerializedRelationshipNode<TSlugs extends keyof Config['collections']> = {\n type: 'relationship';\n format: LexicalElementFormat;\n version: number;\n} & {\n [TSlug in TSlugs]: {\n relationTo: TSlug;\n value: Config['collections'][TSlug]['id'] | Config['collections'][TSlug];\n };\n}[TSlugs];`\n\n/** Input variant of `SerializedRelationshipNode`: `value` is ID-only (you only ever write an ID). */\nconst SERIALIZED_RELATIONSHIP_NODE_INPUT_TS = `export type SerializedRelationshipNodeInput<TSlugs extends keyof Config['collections']> = {\n type: 'relationship';\n format: LexicalElementFormat;\n version: number;\n} & {\n [TSlug in TSlugs]: {\n relationTo: TSlug;\n value: Config['collections'][TSlug]['id'];\n };\n}[TSlugs];`\n\nexport const createRelationshipNodeJSONSchema =\n (props: RelationshipFeatureProps | undefined): JSONSchemaFn =>\n ({ collectionIDFieldTypes, config, typeStringDefinitions, variant }) => {\n const isInput = variant === 'input'\n typeStringDefinitions.add(\n isInput ? SERIALIZED_RELATIONSHIP_NODE_INPUT_TS : SERIALIZED_RELATIONSHIP_NODE_TS,\n )\n const enabledCollections = config?.collections\n ? filterEnabledRelationshipCollections(config.collections, {\n disabledCollections: props?.disabledCollections,\n enabledCollections: props?.enabledCollections,\n uploads: false,\n })\n : []\n\n const variants: JSONSchema4[] = enabledCollections.map((collection) => {\n const slug = collection.slug\n const idType: 'number' | 'string' = collectionIDFieldTypes[slug] ?? 'string'\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: { type: 'string', const: 'relationship' },\n format: formatSchema,\n relationTo: { type: 'string', const: slug },\n value: isInput\n ? { type: idType, description: 'The related document ID.' }\n : {\n description:\n 'The related document by ID (string or number). Populated to the full document when read at depth > 0.',\n oneOf: [{ type: idType }, { $ref: `#/$defs/${slug}` }],\n },\n version: versionSchema,\n },\n required: ['format', 'relationTo', 'type', 'value', 'version'],\n }\n })\n\n let schema: JSONSchema4\n if (variants.length === 0) {\n schema = {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: { type: 'string', const: 'relationship' },\n version: versionSchema,\n },\n required: ['type', 'version'],\n }\n } else {\n const slugUnion = enabledCollections.map((c) => `'${c.slug}'`).join(' | ')\n const baseSchema: JSONSchema4 = variants.length === 1 ? variants[0]! : { oneOf: variants }\n const tsName = isInput ? 'SerializedRelationshipNodeInput' : 'SerializedRelationshipNode'\n schema = { ...baseSchema, tsType: `${tsName}<${slugUnion}>` }\n }\n\n return schema\n }\n"],"mappings":"AAYA,SAASA,YAAY,EAAEC,aAAa,QAAQ;AAC5C,SAASC,oCAAoC,QAAQ;AA6BrD;AACA,MAAMC,+BAAA,GAAkC;;;;;;;;;WAS7B;AAEX;AACA,MAAMC,qCAAA,GAAwC;;;;;;;;;WASnC;AAEX,OAAO,MAAMC,gCAAA,GACVC,KAAA,IACD,CAAC;EAAEC,sBAAsB;EAAEC,MAAM;EAAEC,qBAAqB;EAAEC;AAAO,CAAE;EACjE,MAAMC,OAAA,GAAUD,OAAA,KAAY;EAC5BD,qBAAA,CAAsBG,GAAG,CACvBD,OAAA,GAAUP,qCAAA,GAAwCD,+BAAA;EAEpD,MAAMU,kBAAA,GAAqBL,MAAA,EAAQM,WAAA,GAC/BZ,oCAAA,CAAqCM,MAAA,CAAOM,WAA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AC;IACpE,MAAMC,UAAA,GAA0BtB,QAAA,CAASkB,MAAM,KAAK,IAAIlB,QAAQ,CAAC,EAAE,GAAI;MAAEa,KAAA,EAAOb;IAAS;IACzF,MAAMuB,MAAA,GAAS7B,OAAA,GAAU,oCAAoC;IAC7DuB,MAAA,GAAS;MAAE,GAAGK,UAAU;MAAEE,MAAA,EAAQ,GAAGD,MAAA,IAAUJ,SAAA;IAAa;EAC9D;EAEA,OAAOF,MAAA;AACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"filterEnabledRelationshipCollections.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/shared/filterEnabledRelationshipCollections.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE;QACN,0BAA0B,CAAC,EAAE,OAAO,CAAA;KACrC,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,2CAA2C,GAAG;IACxD,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACtC,wFAAwF;IACxF,OAAO,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,oCAAoC,GAAI,WAAW,SAAS,cAAc,EACrF,aAAa,SAAS,WAAW,EAAE,EACnC,qEAKG,2CAA2C,KAC7C,WAAW,EA4Bb,CAAA"}
1
+ {"version":3,"file":"filterEnabledRelationshipCollections.d.ts","sourceRoot":"","sources":["../../../../src/features/relationship/shared/filterEnabledRelationshipCollections.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE;QACN,0BAA0B,CAAC,EAAE,OAAO,CAAA;KACrC,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,2CAA2C,GAAG;IACxD,2DAA2D;IAC3D,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACtC,wFAAwF;IACxF,OAAO,EAAE,OAAO,CAAA;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,oCAAoC,GAAI,WAAW,SAAS,cAAc,eACxE,SAAS,WAAW,EAAE,uEAMhC,2CAA2C,KAC7C,WAAW,EA4Bb,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"addDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/addDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,gCAAgC,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAQ5E,CAAA"}
1
+ {"version":3,"file":"addDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/addDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,gCAAgC,UAAW,gBAAgB,EAAE,KAAG,YAQ5E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"featureButtonsGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/featureButtonsGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,mCAAmC,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAO/E,CAAA"}
1
+ {"version":3,"file":"featureButtonsGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/featureButtonsGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE7E,eAAO,MAAM,mCAAmC,UAAW,gBAAgB,EAAE,KAAG,YAO/E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"textDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/textDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,iCAAiC,GAAI,OAAO,gBAAgB,EAAE,KAAG,YAQ7E,CAAA"}
1
+ {"version":3,"file":"textDropdownGroup.d.ts","sourceRoot":"","sources":["../../../../src/features/shared/toolbar/textDropdownGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI7E,eAAO,MAAM,iCAAiC,UAAW,gBAAgB,EAAE,KAAG,YAQ7E,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/table/client/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,kBAAkB,8EAmD7B,CAAA"}
@@ -5,13 +5,13 @@ import { TableIcon } from '../../../lexical/ui/icons/Table/index.js';
5
5
  import { createClientFeature } from '../../../utilities/createClientFeature.js';
6
6
  import { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js';
7
7
  import { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js';
8
- import { TableMarkdownTransformer } from '../markdownTransformer.js';
8
+ import { PAYLOAD_TABLE } from '../markdownTransformer.js';
9
9
  import { TableActionMenuPlugin } from './plugins/TableActionMenuPlugin/index.js';
10
10
  import { TableCellResizerPlugin } from './plugins/TableCellResizerPlugin/index.js';
11
11
  import { TableHoverActionsPlugin } from './plugins/TableHoverActionsPlugin/index.js';
12
12
  import { OPEN_TABLE_DRAWER_COMMAND, TableContext, TablePlugin } from './plugins/TablePlugin/index.js';
13
13
  export const TableFeatureClient = createClientFeature({
14
- markdownTransformers: [TableMarkdownTransformer],
14
+ markdownTransformers: [PAYLOAD_TABLE],
15
15
  nodes: [TableNode, TableCellNode, TableRowNode],
16
16
  plugins: [{
17
17
  Component: TablePlugin,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["TableCellNode","TableNode","TableRowNode","TableIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","PAYLOAD_TABLE","TableActionMenuPlugin","TableCellResizerPlugin","TableHoverActionsPlugin","OPEN_TABLE_DRAWER_COMMAND","TableContext","TablePlugin","TableFeatureClient","markdownTransformers","nodes","plugins","Component","position","providers","slashMenu","groups","Icon","key","keywords","label","onSelect","editor","dispatchCommand","toolbarFixed","ChildComponent"],"sources":["../../../../src/features/table/client/index.ts"],"sourcesContent":["'use client'\n\nimport { TableCellNode, TableNode, TableRowNode } from '@lexical/table'\n\nimport { TableIcon } from '../../../lexical/ui/icons/Table/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { PAYLOAD_TABLE } from '../markdownTransformer.js'\nimport { TableActionMenuPlugin } from './plugins/TableActionMenuPlugin/index.js'\nimport { TableCellResizerPlugin } from './plugins/TableCellResizerPlugin/index.js'\nimport { TableHoverActionsPlugin } from './plugins/TableHoverActionsPlugin/index.js'\nimport {\n OPEN_TABLE_DRAWER_COMMAND,\n TableContext,\n TablePlugin,\n} from './plugins/TablePlugin/index.js'\n\nexport const TableFeatureClient = createClientFeature({\n markdownTransformers: [PAYLOAD_TABLE],\n nodes: [TableNode, TableCellNode, TableRowNode],\n plugins: [\n {\n Component: TablePlugin,\n position: 'normal',\n },\n {\n Component: TableCellResizerPlugin,\n position: 'normal',\n },\n {\n Component: TableActionMenuPlugin,\n position: 'floatingAnchorElem',\n },\n {\n Component: TableHoverActionsPlugin,\n position: 'floatingAnchorElem',\n },\n ],\n providers: [TableContext],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: TableIcon,\n key: 'table',\n keywords: ['table'],\n label: 'Table',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {})\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: TableIcon,\n key: 'table',\n label: 'Table',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OPEN_TABLE_DRAWER_COMMAND, {})\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,aAAa,EAAEC,SAAS,EAAEC,YAAY,QAAQ;AAEvD,SAASC,SAAS,QAAQ;AAC1B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,aAAa,QAAQ;AAC9B,SAASC,qBAAqB,QAAQ;AACtC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,uBAAuB,QAAQ;AACxC,SACEC,yBAAyB,EACzBC,YAAY,EACZC,WAAW,QACN;AAEP,OAAO,MAAMC,kBAAA,GAAqBV,mBAAA,CAAoB;EACpDW,oBAAA,EAAsB,CAACR,aAAA,CAAc;EACrCS,KAAA,EAAO,CAACf,SAAA,EAAWD,aAAA,EAAeE,YAAA,CAAa;EAC/Ce,OAAA,EAAS,CACP;IACEC,SAAA,EAAWL,WAAA;IACXM,QAAA,EAAU;EACZ,GACA;IACED,SAAA,EAAWT,sBAAA;IACXU,QAAA,EAAU;EACZ,GACA;IACED,SAAA,EAAWV,qBAAA;IACXW,QAAA,EAAU;EACZ,GACA;IACED,SAAA,EAAWR,uBAAA;IACXS,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW,CAACR,YAAA,CAAa;EACzBS,SAAA,EAAW;IACTC,MAAA,EAAQ,CACNjB,4BAAA,CAA6B,CAC3B;MACEkB,IAAA,EAAMpB,SAAA;MACNqB,GAAA,EAAK;MACLC,QAAA,EAAU,CAAC,QAAQ;MACnBC,KAAA,EAAO;MACPC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAClB,yBAAA,EAA2B,CAAC;MACrD;IACF,EACD;EAEL;EACAmB,YAAA,EAAc;IACZR,MAAA,EAAQ,CACNhB,gCAAA,CAAiC,CAC/B;MACEyB,cAAA,EAAgB5B,SAAA;MAChBqB,GAAA,EAAK;MACLE,KAAA,EAAO;MACPC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAClB,yBAAA,EAA2B,CAAC;MACrD;IACF,EACD;EAEL;AACF","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/table/client/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,OAAO,aAAa,CAAA;AA6oBpB,eAAO,MAAM,qBAAqB,EAAE,yBAQnC,CAAA"}