@payloadcms/richtext-lexical 3.0.0-alpha.65 → 3.0.0-alpha.67

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 (336) hide show
  1. package/dist/cell/index.d.ts +1 -1
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -4
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  6. package/dist/field/features/align/feature.client.js +1 -2
  7. package/dist/field/features/align/feature.client.js.map +1 -1
  8. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  9. package/dist/field/features/blockquote/feature.client.js +3 -6
  10. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  11. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  12. package/dist/field/features/blockquote/feature.server.js +1 -2
  13. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  14. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  15. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  16. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  17. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  18. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  19. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  20. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  21. package/dist/field/features/blocks/drawer/index.js +2 -4
  22. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  23. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  24. package/dist/field/features/blocks/feature.server.js +28 -68
  25. package/dist/field/features/blocks/feature.server.js.map +1 -1
  26. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  27. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  28. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  29. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  30. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  31. package/dist/field/features/blocks/plugin/commands.js +1 -2
  32. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  33. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  34. package/dist/field/features/blocks/plugin/index.js +3 -6
  35. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  36. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  37. package/dist/field/features/blocks/populationPromise.js +0 -13
  38. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  39. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  40. package/dist/field/features/blocks/validate.js +2 -14
  41. package/dist/field/features/blocks/validate.js.map +1 -1
  42. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +1 -1
  43. package/dist/field/features/debug/testrecorder/plugin/index.js +2 -4
  44. package/dist/field/features/debug/testrecorder/plugin/index.js.map +1 -1
  45. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +1 -1
  46. package/dist/field/features/debug/treeview/plugin/index.js +2 -4
  47. package/dist/field/features/debug/treeview/plugin/index.js.map +1 -1
  48. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  49. package/dist/field/features/format/bold/feature.client.js +1 -2
  50. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  51. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +1 -1
  52. package/dist/field/features/format/inlinecode/feature.client.js +1 -2
  53. package/dist/field/features/format/inlinecode/feature.client.js.map +1 -1
  54. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  55. package/dist/field/features/format/italic/feature.client.js +1 -2
  56. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  57. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  58. package/dist/field/features/format/strikethrough/feature.client.js +1 -2
  59. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  60. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  61. package/dist/field/features/format/subscript/feature.client.js +1 -2
  62. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  63. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  64. package/dist/field/features/format/superscript/feature.client.js +1 -2
  65. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  66. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  67. package/dist/field/features/format/underline/feature.client.js +1 -2
  68. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  69. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  70. package/dist/field/features/heading/feature.client.js +3 -6
  71. package/dist/field/features/heading/feature.client.js.map +1 -1
  72. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  73. package/dist/field/features/heading/feature.server.js +1 -2
  74. package/dist/field/features/heading/feature.server.js.map +1 -1
  75. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  76. package/dist/field/features/heading/markdownTransformer.js +1 -2
  77. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  78. package/dist/field/features/horizontalrule/component/index.d.ts.map +1 -1
  79. package/dist/field/features/horizontalrule/component/index.js +2 -4
  80. package/dist/field/features/horizontalrule/component/index.js.map +1 -1
  81. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts +1 -3
  82. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +1 -1
  83. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js +1 -2
  84. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +1 -1
  85. package/dist/field/features/horizontalrule/plugin/index.d.ts.map +1 -1
  86. package/dist/field/features/horizontalrule/plugin/index.js +3 -6
  87. package/dist/field/features/horizontalrule/plugin/index.js.map +1 -1
  88. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  89. package/dist/field/features/indent/feature.client.js +1 -2
  90. package/dist/field/features/indent/feature.client.js.map +1 -1
  91. package/dist/field/features/link/drawer/baseFields.d.ts +3 -3
  92. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  93. package/dist/field/features/link/drawer/baseFields.js +28 -42
  94. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  95. package/dist/field/features/link/drawer/types.d.ts +4 -2
  96. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  97. package/dist/field/features/link/drawer/types.js.map +1 -1
  98. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  99. package/dist/field/features/link/feature.client.js +2 -4
  100. package/dist/field/features/link/feature.client.js.map +1 -1
  101. package/dist/field/features/link/feature.server.d.ts +0 -2
  102. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  103. package/dist/field/features/link/feature.server.js +22 -6
  104. package/dist/field/features/link/feature.server.js.map +1 -1
  105. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  106. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  107. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  108. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  109. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  110. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  111. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  112. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  113. package/dist/field/features/link/plugins/autoLink/index.js +3 -6
  114. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  115. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  116. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  117. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  118. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  119. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +56 -39
  120. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  121. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +9 -1
  122. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -5
  123. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  124. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +11 -29
  125. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  126. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  127. package/dist/field/features/link/plugins/link/index.js +3 -12
  128. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  129. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  130. package/dist/field/features/link/populationPromise.js +5 -23
  131. package/dist/field/features/link/populationPromise.js.map +1 -1
  132. package/dist/field/features/link/validate.d.ts +5 -0
  133. package/dist/field/features/link/validate.d.ts.map +1 -0
  134. package/dist/field/features/link/validate.js +32 -0
  135. package/dist/field/features/link/validate.js.map +1 -0
  136. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  137. package/dist/field/features/lists/checklist/feature.client.js +1 -2
  138. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  139. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  140. package/dist/field/features/lists/checklist/feature.server.js +1 -2
  141. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  142. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  143. package/dist/field/features/lists/checklist/markdownTransformers.js +1 -2
  144. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  145. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  146. package/dist/field/features/lists/checklist/plugin/index.js +1 -2
  147. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  148. package/dist/field/features/lists/common/markdown.d.ts.map +1 -1
  149. package/dist/field/features/lists/common/markdown.js +1 -2
  150. package/dist/field/features/lists/common/markdown.js.map +1 -1
  151. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  152. package/dist/field/features/lists/htmlConverter.js +1 -2
  153. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  154. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +1 -1
  155. package/dist/field/features/lists/orderedlist/feature.client.js +1 -2
  156. package/dist/field/features/lists/orderedlist/feature.client.js.map +1 -1
  157. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +1 -1
  158. package/dist/field/features/lists/orderedlist/feature.server.js +1 -2
  159. package/dist/field/features/lists/orderedlist/feature.server.js.map +1 -1
  160. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +1 -1
  161. package/dist/field/features/lists/orderedlist/markdownTransformer.js +1 -2
  162. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +1 -1
  163. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  164. package/dist/field/features/lists/plugin/index.js +1 -2
  165. package/dist/field/features/lists/plugin/index.js.map +1 -1
  166. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +1 -1
  167. package/dist/field/features/lists/unorderedlist/feature.client.js +1 -2
  168. package/dist/field/features/lists/unorderedlist/feature.client.js.map +1 -1
  169. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +1 -1
  170. package/dist/field/features/lists/unorderedlist/feature.server.js +1 -2
  171. package/dist/field/features/lists/unorderedlist/feature.server.js.map +1 -1
  172. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +1 -1
  173. package/dist/field/features/lists/unorderedlist/markdownTransformer.js +1 -2
  174. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +1 -1
  175. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  176. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  177. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  178. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  179. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  180. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  181. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  182. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  183. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  184. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  185. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  186. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  187. package/dist/field/features/paragraph/feature.client.js +2 -4
  188. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  189. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  190. package/dist/field/features/relationship/drawer/commands.js +1 -2
  191. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  192. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  193. package/dist/field/features/relationship/drawer/index.js +2 -4
  194. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  195. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +2 -4
  196. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  197. package/dist/field/features/relationship/nodes/RelationshipNode.js +1 -2
  198. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  199. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  200. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +53 -6
  201. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  202. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  203. package/dist/field/features/relationship/plugins/index.js +3 -6
  204. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  205. package/dist/field/features/types.d.ts +5 -1
  206. package/dist/field/features/types.d.ts.map +1 -1
  207. package/dist/field/features/types.js.map +1 -1
  208. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  209. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +2 -4
  210. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  211. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  212. package/dist/field/features/upload/component/index.js +52 -6
  213. package/dist/field/features/upload/component/index.js.map +1 -1
  214. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  215. package/dist/field/features/upload/drawer/commands.js +1 -2
  216. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  217. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  218. package/dist/field/features/upload/drawer/index.js +2 -4
  219. package/dist/field/features/upload/drawer/index.js.map +1 -1
  220. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  221. package/dist/field/features/upload/feature.server.js +14 -2
  222. package/dist/field/features/upload/feature.server.js.map +1 -1
  223. package/dist/field/features/upload/nodes/UploadNode.d.ts +1 -3
  224. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  225. package/dist/field/features/upload/nodes/UploadNode.js +2 -8
  226. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  227. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  228. package/dist/field/features/upload/plugin/index.js +3 -6
  229. package/dist/field/features/upload/plugin/index.js.map +1 -1
  230. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  231. package/dist/field/features/upload/populationPromise.js +2 -12
  232. package/dist/field/features/upload/populationPromise.js.map +1 -1
  233. package/dist/field/features/upload/validate.d.ts +2 -1
  234. package/dist/field/features/upload/validate.d.ts.map +1 -1
  235. package/dist/field/features/upload/validate.js +33 -11
  236. package/dist/field/features/upload/validate.js.map +1 -1
  237. package/dist/field/index.d.ts +1 -1
  238. package/dist/field/index.d.ts.map +1 -1
  239. package/dist/field/index.js.map +1 -1
  240. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  241. package/dist/field/lexical/LexicalEditor.js +6 -11
  242. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  243. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  244. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  245. package/dist/field/lexical/LexicalProvider.js +1 -2
  246. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  247. package/dist/field/lexical/config/client/default.d.ts +1 -1
  248. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  249. package/dist/field/lexical/config/client/default.js.map +1 -1
  250. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  251. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  252. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  253. package/dist/field/lexical/config/server/default.d.ts +2 -3
  254. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  255. package/dist/field/lexical/config/server/default.js +0 -2
  256. package/dist/field/lexical/config/server/default.js.map +1 -1
  257. package/dist/field/lexical/config/server/loader.d.ts +4 -2
  258. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  259. package/dist/field/lexical/config/server/loader.js +3 -2
  260. package/dist/field/lexical/config/server/loader.js.map +1 -1
  261. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  262. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  263. package/dist/field/lexical/config/server/sanitize.js +3 -2
  264. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  265. package/dist/field/lexical/config/types.d.ts +1 -1
  266. package/dist/field/lexical/config/types.d.ts.map +1 -1
  267. package/dist/field/lexical/config/types.js.map +1 -1
  268. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +1 -1
  269. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js +3 -6
  270. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +1 -1
  271. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +1 -1
  272. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js +3 -6
  273. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +1 -1
  274. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +1 -1
  275. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +27 -29
  276. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +1 -1
  277. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  278. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  279. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  280. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  281. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +3 -6
  282. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  283. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  284. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +3 -6
  285. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  286. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  287. package/dist/field/lexical/plugins/SlashMenu/index.js +1 -2
  288. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  289. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  290. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -4
  291. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  292. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  293. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +1 -2
  294. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  295. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  296. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +2 -4
  297. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  298. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  299. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  300. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  301. package/dist/field/lexical/theme/EditorTheme.scss +7 -8
  302. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  303. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  304. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  305. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  306. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  307. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  308. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  309. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  310. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  311. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +1 -1
  312. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  313. package/dist/field/lexical/utils/setFloatingElemPosition.js +15 -13
  314. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  315. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  316. package/dist/field/lexical/utils/url.js +2 -0
  317. package/dist/field/lexical/utils/url.js.map +1 -1
  318. package/dist/generateComponentMap.d.ts.map +1 -1
  319. package/dist/generateComponentMap.js +1 -10
  320. package/dist/generateComponentMap.js.map +1 -1
  321. package/dist/generateSchemaMap.d.ts.map +1 -1
  322. package/dist/generateSchemaMap.js +1 -10
  323. package/dist/generateSchemaMap.js.map +1 -1
  324. package/dist/index.d.ts +5 -5
  325. package/dist/index.d.ts.map +1 -1
  326. package/dist/index.js +241 -234
  327. package/dist/index.js.map +1 -1
  328. package/dist/populate/defaultValue.d.ts.map +1 -1
  329. package/dist/populate/defaultValue.js +1 -0
  330. package/dist/populate/defaultValue.js.map +1 -1
  331. package/dist/types.d.ts +11 -5
  332. package/dist/types.d.ts.map +1 -1
  333. package/dist/types.js.map +1 -1
  334. package/dist/validate/index.d.ts +1 -1
  335. package/dist/validate/index.d.ts.map +1 -1
  336. package/package.json +46 -45
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/field/features/link/plugins/link/index.tsx"],"sourcesContent":["'use client'\nimport lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js'\nconst { useLexicalComposerContext } = lexicalComposerContextImport\nimport lexicalUtilsImport from '@lexical/utils'\nconst { mergeRegister } = lexicalUtilsImport\n\nimport lexicalImport from 'lexical'\nconst { $getSelection, $isElementNode, $isRangeSelection, COMMAND_PRIORITY_LOW, PASTE_COMMAND } =\n lexicalImport\n\nimport { useEffect } from 'react'\n\nimport type { LinkFields } from '../../nodes/types.js'\nimport type { LinkPayload } from '../floatingLinkEditor/types.js'\n\nimport { validateUrl } from '../../../../lexical/utils/url.js'\nimport { LinkNode, TOGGLE_LINK_COMMAND, toggleLink } from '../../nodes/LinkNode.js'\n\nexport function LinkPlugin(): null {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([LinkNode])) {\n throw new Error('LinkPlugin: LinkNode not registered on editor')\n }\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_COMMAND,\n (payload: LinkPayload) => {\n // validate\n if (payload?.fields.linkType === 'custom') {\n if (!(validateUrl === undefined || validateUrl(payload?.fields.url))) {\n return false\n }\n }\n\n toggleLink(payload)\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n validateUrl !== undefined\n ? editor.registerCommand(\n PASTE_COMMAND,\n (event) => {\n const selection = $getSelection()\n if (\n !$isRangeSelection(selection) ||\n selection.isCollapsed() ||\n !(event instanceof ClipboardEvent) ||\n event.clipboardData == null\n ) {\n return false\n }\n const clipboardText = event.clipboardData.getData('text')\n if (!validateUrl(clipboardText)) {\n return false\n }\n // If we select nodes that are elements then avoid applying the link.\n if (!selection.getNodes().some((node) => $isElementNode(node))) {\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: clipboardText,\n }\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: linkFields,\n text: null,\n })\n event.preventDefault()\n return true\n }\n return false\n },\n COMMAND_PRIORITY_LOW,\n )\n : () => {\n // Don't paste arbitrary text as a link when there's no validate function\n },\n )\n }, [editor])\n\n return null\n}\n"],"names":["lexicalComposerContextImport","useLexicalComposerContext","lexicalUtilsImport","mergeRegister","lexicalImport","$getSelection","$isElementNode","$isRangeSelection","COMMAND_PRIORITY_LOW","PASTE_COMMAND","useEffect","validateUrl","LinkNode","TOGGLE_LINK_COMMAND","toggleLink","LinkPlugin","editor","hasNodes","Error","registerCommand","payload","fields","linkType","undefined","url","event","selection","isCollapsed","ClipboardEvent","clipboardData","clipboardText","getData","getNodes","some","node","linkFields","doc","newTab","dispatchCommand","text","preventDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,OAAOA,kCAAkC,2CAA0C;AACnF,MAAM,EAAEC,yBAAyB,EAAE,GAAGD;AACtC,OAAOE,wBAAwB,iBAAgB;AAC/C,MAAM,EAAEC,aAAa,EAAE,GAAGD;AAE1B,OAAOE,mBAAmB,UAAS;AACnC,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAEC,iBAAiB,EAAEC,oBAAoB,EAAEC,aAAa,EAAE,GAC7FL;AAEF,SAASM,SAAS,QAAQ,QAAO;AAKjC,SAASC,WAAW,QAAQ,mCAAkC;AAC9D,SAASC,QAAQ,EAAEC,mBAAmB,EAAEC,UAAU,QAAQ,0BAAyB;AAEnF,OAAO,SAASC;IACd,MAAM,CAACC,OAAO,GAAGf;IAEjBS,UAAU;QACR,IAAI,CAACM,OAAOC,QAAQ,CAAC;YAACL;SAAS,GAAG;YAChC,MAAM,IAAIM,MAAM;QAClB;QACA,OAAOf,cACLa,OAAOG,eAAe,CACpBN,qBACA,CAACO;YACC,WAAW;YACX,IAAIA,SAASC,OAAOC,aAAa,UAAU;gBACzC,IAAI,CAAEX,CAAAA,gBAAgBY,aAAaZ,YAAYS,SAASC,OAAOG,IAAG,GAAI;oBACpE,OAAO;gBACT;YACF;YAEAV,WAAWM;YACX,OAAO;QACT,GACAZ,uBAEFG,gBAAgBY,YACZP,OAAOG,eAAe,CACpBV,eACA,CAACgB;YACC,MAAMC,YAAYrB;YAClB,IACE,CAACE,kBAAkBmB,cACnBA,UAAUC,WAAW,MACrB,CAAEF,CAAAA,iBAAiBG,cAAa,KAChCH,MAAMI,aAAa,IAAI,MACvB;gBACA,OAAO;YACT;YACA,MAAMC,gBAAgBL,MAAMI,aAAa,CAACE,OAAO,CAAC;YAClD,IAAI,CAACpB,YAAYmB,gBAAgB;gBAC/B,OAAO;YACT;YACA,qEAAqE;YACrE,IAAI,CAACJ,UAAUM,QAAQ,GAAGC,IAAI,CAAC,CAACC,OAAS5B,eAAe4B,QAAQ;gBAC9D,MAAMC,aAAyB;oBAC7BC,KAAK;oBACLd,UAAU;oBACVe,QAAQ;oBACRb,KAAKM;gBACP;gBACAd,OAAOsB,eAAe,CAACzB,qBAAqB;oBAC1CQ,QAAQc;oBACRI,MAAM;gBACR;gBACAd,MAAMe,cAAc;gBACpB,OAAO;YACT;YACA,OAAO;QACT,GACAhC,wBAEF;QACE,yEAAyE;QAC3E;IAER,GAAG;QAACQ;KAAO;IAEX,OAAO;AACT"}
1
+ {"version":3,"sources":["../../../../../../src/field/features/link/plugins/link/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { mergeRegister } from '@lexical/utils'\nimport {\n $getSelection,\n $isElementNode,\n $isRangeSelection,\n COMMAND_PRIORITY_LOW,\n PASTE_COMMAND,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { LinkFields } from '../../nodes/types.js'\nimport type { LinkPayload } from '../floatingLinkEditor/types.js'\n\nimport { validateUrl } from '../../../../lexical/utils/url.js'\nimport { LinkNode, TOGGLE_LINK_COMMAND, toggleLink } from '../../nodes/LinkNode.js'\n\nexport function LinkPlugin(): null {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([LinkNode])) {\n throw new Error('LinkPlugin: LinkNode not registered on editor')\n }\n return mergeRegister(\n editor.registerCommand(\n TOGGLE_LINK_COMMAND,\n (payload: LinkPayload) => {\n toggleLink(payload)\n return true\n },\n COMMAND_PRIORITY_LOW,\n ),\n validateUrl !== undefined\n ? editor.registerCommand(\n PASTE_COMMAND,\n (event) => {\n const selection = $getSelection()\n if (\n !$isRangeSelection(selection) ||\n selection.isCollapsed() ||\n !(event instanceof ClipboardEvent) ||\n event.clipboardData == null\n ) {\n return false\n }\n const clipboardText = event.clipboardData.getData('text')\n if (!validateUrl(clipboardText)) {\n return false\n }\n // If we select nodes that are elements then avoid applying the link.\n if (!selection.getNodes().some((node) => $isElementNode(node))) {\n const linkFields: LinkFields = {\n doc: null,\n linkType: 'custom',\n newTab: false,\n url: clipboardText,\n }\n editor.dispatchCommand(TOGGLE_LINK_COMMAND, {\n fields: linkFields,\n text: null,\n })\n event.preventDefault()\n return true\n }\n return false\n },\n COMMAND_PRIORITY_LOW,\n )\n : () => {\n // Don't paste arbitrary text as a link when there's no validate function\n },\n )\n }, [editor])\n\n return null\n}\n"],"names":["useLexicalComposerContext","mergeRegister","$getSelection","$isElementNode","$isRangeSelection","COMMAND_PRIORITY_LOW","PASTE_COMMAND","useEffect","validateUrl","LinkNode","TOGGLE_LINK_COMMAND","toggleLink","LinkPlugin","editor","hasNodes","Error","registerCommand","payload","undefined","event","selection","isCollapsed","ClipboardEvent","clipboardData","clipboardText","getData","getNodes","some","node","linkFields","doc","linkType","newTab","url","dispatchCommand","fields","text","preventDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,aAAa,QAAQ,iBAAgB;AAC9C,SACEC,aAAa,EACbC,cAAc,EACdC,iBAAiB,EACjBC,oBAAoB,EACpBC,aAAa,QACR,UAAS;AAChB,SAASC,SAAS,QAAQ,QAAO;AAKjC,SAASC,WAAW,QAAQ,mCAAkC;AAC9D,SAASC,QAAQ,EAAEC,mBAAmB,EAAEC,UAAU,QAAQ,0BAAyB;AAEnF,OAAO,SAASC;IACd,MAAM,CAACC,OAAO,GAAGb;IAEjBO,UAAU;QACR,IAAI,CAACM,OAAOC,QAAQ,CAAC;YAACL;SAAS,GAAG;YAChC,MAAM,IAAIM,MAAM;QAClB;QACA,OAAOd,cACLY,OAAOG,eAAe,CACpBN,qBACA,CAACO;YACCN,WAAWM;YACX,OAAO;QACT,GACAZ,uBAEFG,gBAAgBU,YACZL,OAAOG,eAAe,CACpBV,eACA,CAACa;YACC,MAAMC,YAAYlB;YAClB,IACE,CAACE,kBAAkBgB,cACnBA,UAAUC,WAAW,MACrB,CAAEF,CAAAA,iBAAiBG,cAAa,KAChCH,MAAMI,aAAa,IAAI,MACvB;gBACA,OAAO;YACT;YACA,MAAMC,gBAAgBL,MAAMI,aAAa,CAACE,OAAO,CAAC;YAClD,IAAI,CAACjB,YAAYgB,gBAAgB;gBAC/B,OAAO;YACT;YACA,qEAAqE;YACrE,IAAI,CAACJ,UAAUM,QAAQ,GAAGC,IAAI,CAAC,CAACC,OAASzB,eAAeyB,QAAQ;gBAC9D,MAAMC,aAAyB;oBAC7BC,KAAK;oBACLC,UAAU;oBACVC,QAAQ;oBACRC,KAAKT;gBACP;gBACAX,OAAOqB,eAAe,CAACxB,qBAAqB;oBAC1CyB,QAAQN;oBACRO,MAAM;gBACR;gBACAjB,MAAMkB,cAAc;gBACpB,OAAO;YACT;YACA,OAAO;QACT,GACAhC,wBAEF;QACE,yEAAyE;QAC3E;IAER,GAAG;QAACQ;KAAO;IAEX,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/populationPromise.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAK1D,eAAO,MAAM,wBAAwB,UAC5B,sBAAsB,KAC5B,kBAAkB,kBAAkB,CAiEtC,CAAA"}
1
+ {"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/populationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAI1D,eAAO,MAAM,wBAAwB,UAC5B,sBAAsB,KAC5B,kBAAkB,kBAAkB,CAyCtC,CAAA"}
@@ -1,45 +1,27 @@
1
- import { sanitizeFields } from 'payload/config';
2
- import { deepCopyObject } from 'payload/utilities';
3
1
  import { recurseNestedFields } from '../../../populate/recurseNestedFields.js';
4
- import { transformExtraFields } from './plugins/floatingLinkEditor/utilities.js';
5
2
  export const linkPopulationPromiseHOC = (props)=>{
6
3
  return ({ context, currentDepth, depth, editorPopulationPromises, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
7
- // Sanitize link's fields here. This is done here and not in the feature, because the payload config is available here
8
- const payloadConfig = req.payload.config;
9
- const validRelationships = payloadConfig.collections.map((c)=>c.slug) || [];
10
- const transformedFields = transformExtraFields(deepCopyObject(props.fields), payloadConfig, req.i18n, props.enabledCollections, props.disabledCollections);
11
- // TODO: Sanitize & transform ahead of time! On startup!
12
- const sanitizedFields = sanitizeFields({
13
- config: payloadConfig,
14
- fields: transformedFields,
15
- requireFieldLevelRichTextEditor: true,
16
- validRelationships
17
- });
18
- if (!sanitizedFields?.length) {
4
+ if (!props.fields?.length) {
19
5
  return;
20
6
  }
21
7
  /**
22
8
  * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field
23
- */ if (Array.isArray(sanitizedFields)) {
9
+ */ if (Array.isArray(props.fields)) {
24
10
  recurseNestedFields({
25
11
  context,
26
12
  currentDepth,
27
- data: {
28
- fields: node.fields
29
- },
13
+ data: node.fields,
30
14
  depth,
31
15
  editorPopulationPromises,
32
16
  fieldPromises,
33
- fields: sanitizedFields,
17
+ fields: props.fields,
34
18
  findMany,
35
19
  flattenLocales,
36
20
  overrideAccess,
37
21
  populationPromises,
38
22
  req,
39
23
  showHiddenFields,
40
- siblingDoc: {
41
- fields: node.fields
42
- }
24
+ siblingDoc: node.fields
43
25
  });
44
26
  }
45
27
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/link/populationPromise.ts"],"sourcesContent":["import { sanitizeFields } from 'payload/config'\nimport { deepCopyObject } from 'payload/utilities'\n\nimport type { PopulationPromise } from '../types.js'\nimport type { LinkFeatureServerProps } from './feature.server.js'\nimport type { SerializedLinkNode } from './nodes/types.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\nimport { transformExtraFields } from './plugins/floatingLinkEditor/utilities.js'\n\nexport const linkPopulationPromiseHOC = (\n props: LinkFeatureServerProps,\n): PopulationPromise<SerializedLinkNode> => {\n return ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n // Sanitize link's fields here. This is done here and not in the feature, because the payload config is available here\n const payloadConfig = req.payload.config\n const validRelationships = payloadConfig.collections.map((c) => c.slug) || []\n\n const transformedFields = transformExtraFields(\n deepCopyObject(props.fields),\n payloadConfig,\n req.i18n,\n props.enabledCollections,\n props.disabledCollections,\n )\n\n // TODO: Sanitize & transform ahead of time! On startup!\n const sanitizedFields = sanitizeFields({\n config: payloadConfig,\n fields: transformedFields,\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n\n if (!sanitizedFields?.length) {\n return\n }\n\n /**\n * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field\n */\n if (Array.isArray(sanitizedFields)) {\n recurseNestedFields({\n context,\n currentDepth,\n data: {\n fields: node.fields,\n },\n depth,\n editorPopulationPromises,\n fieldPromises,\n fields: sanitizedFields,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: {\n fields: node.fields,\n },\n })\n }\n }\n}\n"],"names":["sanitizeFields","deepCopyObject","recurseNestedFields","transformExtraFields","linkPopulationPromiseHOC","props","context","currentDepth","depth","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","payloadConfig","payload","config","validRelationships","collections","map","c","slug","transformedFields","fields","i18n","enabledCollections","disabledCollections","sanitizedFields","requireFieldLevelRichTextEditor","length","Array","isArray","data","siblingDoc"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,cAAc,QAAQ,iBAAgB;AAC/C,SAASC,cAAc,QAAQ,oBAAmB;AAMlD,SAASC,mBAAmB,QAAQ,2CAA0C;AAC9E,SAASC,oBAAoB,QAAQ,4CAA2C;AAEhF,OAAO,MAAMC,2BAA2B,CACtCC;IAEA,OAAO,CAAC,EACNC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,sHAAsH;QACtH,MAAMC,gBAAgBF,IAAIG,OAAO,CAACC,MAAM;QACxC,MAAMC,qBAAqBH,cAAcI,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAE7E,MAAMC,oBAAoBvB,qBACxBF,eAAeI,MAAMsB,MAAM,GAC3BT,eACAF,IAAIY,IAAI,EACRvB,MAAMwB,kBAAkB,EACxBxB,MAAMyB,mBAAmB;QAG3B,wDAAwD;QACxD,MAAMC,kBAAkB/B,eAAe;YACrCoB,QAAQF;YACRS,QAAQD;YACRM,iCAAiC;YACjCX;QACF;QAEA,IAAI,CAACU,iBAAiBE,QAAQ;YAC5B;QACF;QAEA;;KAEC,GACD,IAAIC,MAAMC,OAAO,CAACJ,kBAAkB;YAClC7B,oBAAoB;gBAClBI;gBACAC;gBACA6B,MAAM;oBACJT,QAAQd,KAAKc,MAAM;gBACrB;gBACAnB;gBACAC;gBACAC;gBACAiB,QAAQI;gBACRpB;gBACAC;gBACAE;gBACAC;gBACAC;gBACAC;gBACAoB,YAAY;oBACVV,QAAQd,KAAKc,MAAM;gBACrB;YACF;QACF;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/link/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { LinkFeatureServerProps } from './feature.server.js'\nimport type { SerializedLinkNode } from './nodes/types.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const linkPopulationPromiseHOC = (\n props: LinkFeatureServerProps,\n): PopulationPromise<SerializedLinkNode> => {\n return ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (!props.fields?.length) {\n return\n }\n\n /**\n * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field\n */\n if (Array.isArray(props.fields)) {\n recurseNestedFields({\n context,\n currentDepth,\n data: node.fields,\n depth,\n editorPopulationPromises,\n fieldPromises,\n fields: props.fields,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc: node.fields,\n })\n }\n }\n}\n"],"names":["recurseNestedFields","linkPopulationPromiseHOC","props","context","currentDepth","depth","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","fields","length","Array","isArray","data","siblingDoc"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,2BAA2B,CACtCC;IAEA,OAAO,CAAC,EACNC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAI,CAACZ,MAAMa,MAAM,EAAEC,QAAQ;YACzB;QACF;QAEA;;KAEC,GACD,IAAIC,MAAMC,OAAO,CAAChB,MAAMa,MAAM,GAAG;YAC/Bf,oBAAoB;gBAClBG;gBACAC;gBACAe,MAAMT,KAAKK,MAAM;gBACjBV;gBACAC;gBACAC;gBACAQ,QAAQb,MAAMa,MAAM;gBACpBP;gBACAC;gBACAE;gBACAC;gBACAC;gBACAC;gBACAM,YAAYV,KAAKK,MAAM;YACzB;QACF;IACF;AACF,EAAC"}
@@ -0,0 +1,5 @@
1
+ import type { NodeValidation } from '../types.js';
2
+ import type { LinkFeatureServerProps } from './feature.server.js';
3
+ import type { SerializedAutoLinkNode, SerializedLinkNode } from './nodes/types.js';
4
+ export declare const linkValidation: (props: LinkFeatureServerProps) => NodeValidation<SerializedAutoLinkNode | SerializedLinkNode>;
5
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/field/features/link/validate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAElF,eAAO,MAAM,cAAc,UAClB,sBAAsB,KAE5B,eAAe,sBAAsB,GAAG,kBAAkB,CAuC5D,CAAA"}
@@ -0,0 +1,32 @@
1
+ import { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema';
2
+ export const linkValidation = (props)=>{
3
+ return async ({ node, validation: { options: { id, operation, preferences, req } } })=>{
4
+ /**
5
+ * Run buildStateFromSchema as that properly validates link fields and link sub-fields
6
+ */ const data = {
7
+ ...node.fields,
8
+ text: 'ignored'
9
+ };
10
+ const result = await buildStateFromSchema({
11
+ id,
12
+ data,
13
+ fieldSchema: props.fields,
14
+ operation: operation === 'create' || operation === 'update' ? operation : 'update',
15
+ preferences,
16
+ req,
17
+ siblingData: data
18
+ });
19
+ let errorPaths = [];
20
+ for(const fieldKey in result){
21
+ if (result[fieldKey].errorPaths) {
22
+ errorPaths = errorPaths.concat(result[fieldKey].errorPaths);
23
+ }
24
+ }
25
+ if (errorPaths.length) {
26
+ return 'Link fields validation failed: ' + errorPaths.join(', ');
27
+ }
28
+ return true;
29
+ };
30
+ };
31
+
32
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/field/features/link/validate.ts"],"sourcesContent":["import type { FieldWithRichTextRequiredEditor } from 'payload/types'\n\nimport { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema'\n\nimport type { NodeValidation } from '../types.js'\nimport type { LinkFeatureServerProps } from './feature.server.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from './nodes/types.js'\n\nexport const linkValidation = (\n props: LinkFeatureServerProps,\n // eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents\n): NodeValidation<SerializedAutoLinkNode | SerializedLinkNode> => {\n return async ({\n node,\n validation: {\n options: { id, operation, preferences, req },\n },\n }) => {\n /**\n * Run buildStateFromSchema as that properly validates link fields and link sub-fields\n */\n\n const data = {\n ...node.fields,\n text: 'ignored',\n }\n\n const result = await buildStateFromSchema({\n id,\n data,\n fieldSchema: props.fields as FieldWithRichTextRequiredEditor[], // Sanitized in feature.server.ts\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n preferences,\n req,\n siblingData: data,\n })\n\n let errorPaths = []\n for (const fieldKey in result) {\n if (result[fieldKey].errorPaths) {\n errorPaths = errorPaths.concat(result[fieldKey].errorPaths)\n }\n }\n\n if (errorPaths.length) {\n return 'Link fields validation failed: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"names":["buildStateFromSchema","linkValidation","props","node","validation","options","id","operation","preferences","req","data","fields","text","result","fieldSchema","siblingData","errorPaths","fieldKey","concat","length","join"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,oBAAoB,QAAQ,4CAA2C;AAMhF,OAAO,MAAMC,iBAAiB,CAC5BC;IAGA,OAAO,OAAO,EACZC,IAAI,EACJC,YAAY,EACVC,SAAS,EAAEC,EAAE,EAAEC,SAAS,EAAEC,WAAW,EAAEC,GAAG,EAAE,EAC7C,EACF;QACC;;KAEC,GAED,MAAMC,OAAO;YACX,GAAGP,KAAKQ,MAAM;YACdC,MAAM;QACR;QAEA,MAAMC,SAAS,MAAMb,qBAAqB;YACxCM;YACAI;YACAI,aAAaZ,MAAMS,MAAM;YACzBJ,WAAWA,cAAc,YAAYA,cAAc,WAAWA,YAAY;YAC1EC;YACAC;YACAM,aAAaL;QACf;QAEA,IAAIM,aAAa,EAAE;QACnB,IAAK,MAAMC,YAAYJ,OAAQ;YAC7B,IAAIA,MAAM,CAACI,SAAS,CAACD,UAAU,EAAE;gBAC/BA,aAAaA,WAAWE,MAAM,CAACL,MAAM,CAACI,SAAS,CAACD,UAAU;YAC5D;QACF;QAEA,IAAIA,WAAWG,MAAM,EAAE;YACrB,OAAO,oCAAoCH,WAAWI,IAAI,CAAC;QAC7D;QAEA,OAAO;IACT;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"names":[],"mappings":";AA+EA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"names":[],"mappings":";AA8EA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
- import lexicalListImport from '@lexical/list';
3
- const { INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport;
2
+ import { INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
3
  import { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
5
4
  import { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js';
6
5
  import { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"sourcesContent":["'use client'\nimport lexicalListImport from '@lexical/list'\nconst { INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport\n\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst CheckListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n if (!featureProviderMap.has('unorderedlist') && !featureProviderMap.has('orderedlist')) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: ChecklistIcon,\n isActive: () => false,\n key: 'checkList',\n label: `Check List`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n ],\n },\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n options: [\n {\n displayName: 'Lists',\n key: 'lists',\n options: [\n new SlashMenuOption('checklist', {\n Icon: ChecklistIcon,\n displayName: 'Check List',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }\n },\n }\n}\n\nexport const CheckListFeatureClientComponent = createClientComponent(CheckListFeatureClient)\n"],"names":["lexicalListImport","INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","SlashMenuOption","ChecklistIcon","TextDropdownSectionWithEntries","createClientComponent","LexicalListPlugin","CHECK_LIST","LexicalCheckListPlugin","CheckListFeatureClient","props","clientFeatureProps","feature","featureProviderMap","plugins","Component","position","has","push","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","dispatchCommand","undefined","order","markdownTransformers","nodes","slashMenu","options","displayName","Icon","keywords","onSelect","CheckListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGH;AAI9D,SAASI,eAAe,QAAQ,yEAAwE;AACxG,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,8BAA8B,QAAQ,iEAAgE;AAC/G,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,UAAU,QAAQ,4BAA2B;AACtD,SAASC,sBAAsB,QAAQ,oBAAmB;AAE1D,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,MAAMC,UAA+C;gBACnD;oBACEC,WAAWP;oBACXQ,UAAU;gBACZ;aACD;YAED,IAAI,CAACH,mBAAmBI,GAAG,CAAC,oBAAoB,CAACJ,mBAAmBI,GAAG,CAAC,gBAAgB;gBACtFH,QAAQI,IAAI,CAAC;oBACXH,WAAWT;oBACXU,UAAU;gBACZ;YACF;YAEA,OAAO;gBACLL,oBAAoBD;gBACpBS,uBAAuB;oBACrBC,UAAU;wBACRhB,+BAA+B;4BAC7B;gCACEiB,gBAAgBlB;gCAChBmB,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO,CAAC,UAAU,CAAC;gCACnBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAAC5B,2BAA2B6B;gCACpD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAACvB;iBAAW;gBAClCwB,OACElB,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBAAChB;oBAAUD;iBAAa;gBAC9Bc;gBACAkB,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbX,KAAK;4BACLU,SAAS;gCACP,IAAI/B,gBAAgB,aAAa;oCAC/BiC,MAAMhC;oCACN+B,aAAa;oCACbE,UAAU;wCAAC;wCAAc;wCAAS;wCAAa;qCAAK;oCACpDC,UAAU,CAAC,EAAEX,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAAC5B,2BAA2B6B;oCACpD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMU,kCAAkCjC,sBAAsBI,wBAAuB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.client.tsx"],"sourcesContent":["'use client'\nimport { INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst CheckListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const plugins: ClientFeature<undefined>['plugins'] = [\n {\n Component: LexicalCheckListPlugin,\n position: 'normal',\n },\n ]\n\n if (!featureProviderMap.has('unorderedlist') && !featureProviderMap.has('orderedlist')) {\n plugins.push({\n Component: LexicalListPlugin,\n position: 'normal',\n })\n }\n\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: ChecklistIcon,\n isActive: () => false,\n key: 'checkList',\n label: `Check List`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n ],\n },\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n options: [\n {\n displayName: 'Lists',\n key: 'lists',\n options: [\n new SlashMenuOption('checklist', {\n Icon: ChecklistIcon,\n displayName: 'Check List',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }\n },\n }\n}\n\nexport const CheckListFeatureClientComponent = createClientComponent(CheckListFeatureClient)\n"],"names":["INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","SlashMenuOption","ChecklistIcon","TextDropdownSectionWithEntries","createClientComponent","LexicalListPlugin","CHECK_LIST","LexicalCheckListPlugin","CheckListFeatureClient","props","clientFeatureProps","feature","featureProviderMap","plugins","Component","position","has","push","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","dispatchCommand","undefined","order","markdownTransformers","nodes","slashMenu","options","displayName","Icon","keywords","onSelect","CheckListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAIjF,SAASC,eAAe,QAAQ,yEAAwE;AACxG,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,8BAA8B,QAAQ,iEAAgE;AAC/G,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,UAAU,QAAQ,4BAA2B;AACtD,SAASC,sBAAsB,QAAQ,oBAAmB;AAE1D,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,MAAMC,UAA+C;gBACnD;oBACEC,WAAWP;oBACXQ,UAAU;gBACZ;aACD;YAED,IAAI,CAACH,mBAAmBI,GAAG,CAAC,oBAAoB,CAACJ,mBAAmBI,GAAG,CAAC,gBAAgB;gBACtFH,QAAQI,IAAI,CAAC;oBACXH,WAAWT;oBACXU,UAAU;gBACZ;YACF;YAEA,OAAO;gBACLL,oBAAoBD;gBACpBS,uBAAuB;oBACrBC,UAAU;wBACRhB,+BAA+B;4BAC7B;gCACEiB,gBAAgBlB;gCAChBmB,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO,CAAC,UAAU,CAAC;gCACnBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAAC5B,2BAA2B6B;gCACpD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAACvB;iBAAW;gBAClCwB,OACElB,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBAAChB;oBAAUD;iBAAa;gBAC9Bc;gBACAkB,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbX,KAAK;4BACLU,SAAS;gCACP,IAAI/B,gBAAgB,aAAa;oCAC/BiC,MAAMhC;oCACN+B,aAAa;oCACbE,UAAU;wCAAC;wCAAc;wCAAS;wCAAa;qCAAK;oCACpDC,UAAU,CAAC,EAAEX,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAAC5B,2BAA2B6B;oCACpD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMU,kCAAkCjC,sBAAsBI,wBAAuB"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAOnE,eAAO,MAAM,gBAAgB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA6BhF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAOnE,eAAO,MAAM,gBAAgB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA6BhF,CAAA"}
@@ -1,5 +1,4 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { ListItemNode, ListNode } = lexicalListImport;
1
+ import { ListItemNode, ListNode } from '@lexical/list';
3
2
  import { createNode } from '../../typeUtilities.js';
4
3
  import { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js';
5
4
  import { CheckListFeatureClientComponent } from './feature.client.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"sourcesContent":["import lexicalListImport from '@lexical/list'\nconst { ListItemNode, ListNode } = lexicalListImport\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { CheckListFeatureClientComponent } from './feature.client.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\n\nexport const CheckListFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: ({ featureProviderMap }) => {\n return {\n ClientComponent: CheckListFeatureClientComponent,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist')\n ? []\n : [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'checklist',\n serverFeatureProps: props,\n }\n}\n"],"names":["lexicalListImport","ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","CheckListFeatureClientComponent","CHECK_LIST","CheckListFeature","props","feature","featureProviderMap","ClientComponent","markdownTransformers","nodes","has","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGF;AAInC,SAASG,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,+BAA+B,QAAQ,sBAAqB;AACrE,SAASC,UAAU,QAAQ,4BAA2B;AAEtD,OAAO,MAAMC,mBAAwE,CAACC;IACpF,OAAO;QACLC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLC,iBAAiBN;gBACjBO,sBAAsB;oBAACN;iBAAW;gBAClCO,OACEH,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBACEZ,WAAW;wBACTa,YAAY;4BACVC,MAAMb;wBACR;wBACAc,MAAMhB;oBACR;oBACAC,WAAW;wBACTa,YAAY;4BACVC,MAAMZ;wBACR;wBACAa,MAAMjB;oBACR;iBACD;gBACPkB,oBAAoBV;YACtB;QACF;QACAW,KAAK;QACLD,oBAAoBV;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/checklist/feature.server.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { CheckListFeatureClientComponent } from './feature.client.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\n\nexport const CheckListFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: ({ featureProviderMap }) => {\n return {\n ClientComponent: CheckListFeatureClientComponent,\n markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist')\n ? []\n : [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'checklist',\n serverFeatureProps: props,\n }\n}\n"],"names":["ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","CheckListFeatureClientComponent","CHECK_LIST","CheckListFeature","props","feature","featureProviderMap","ClientComponent","markdownTransformers","nodes","has","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAItD,SAASC,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,+BAA+B,QAAQ,sBAAqB;AACrE,SAASC,UAAU,QAAQ,4BAA2B;AAEtD,OAAO,MAAMC,mBAAwE,CAACC;IACpF,OAAO;QACLC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLC,iBAAiBN;gBACjBO,sBAAsB;oBAACN;iBAAW;gBAClCO,OACEH,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBACEZ,WAAW;wBACTa,YAAY;4BACVC,MAAMb;wBACR;wBACAc,MAAMhB;oBACR;oBACAC,WAAW;wBACTa,YAAY;4BACVC,MAAMZ;wBACR;wBACAa,MAAMjB;oBACR;iBACD;gBACPkB,oBAAoBV;YACtB;QACF;QACAW,KAAK;QACLD,oBAAoBV;IACtB;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/markdownTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAO3D,eAAO,MAAM,UAAU,EAAE,kBAQxB,CAAA"}
1
+ {"version":3,"file":"markdownTransformers.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/checklist/markdownTransformers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,eAAO,MAAM,UAAU,EAAE,kBAQxB,CAAA"}
@@ -1,5 +1,4 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { $isListNode, ListItemNode, ListNode } = lexicalListImport;
1
+ import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
3
2
  import { listExport, listReplace } from '../common/markdown.js';
4
3
  export const CHECK_LIST = {
5
4
  type: 'element',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/checklist/markdownTransformers.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport lexicalListImport from '@lexical/list'\nconst { $isListNode, ListItemNode, ListNode } = lexicalListImport\n\nimport { listExport, listReplace } from '../common/markdown.js'\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,\n replace: listReplace('check'),\n}\n"],"names":["lexicalListImport","$isListNode","ListItemNode","ListNode","listExport","listReplace","CHECK_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAEA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,WAAW,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGH;AAEhD,SAASI,UAAU,EAAEC,WAAW,QAAQ,wBAAuB;AAE/D,OAAO,MAAMC,aAAiC;IAC5CC,MAAM;IACNC,cAAc;QAACL;QAAUD;KAAa;IACtCO,QAAQ,CAACC,MAAMC;QACb,OAAOV,YAAYS,QAAQN,WAAWM,MAAMC,gBAAgB,KAAK;IACnE;IACAC,QAAQ;IACRC,SAASR,YAAY;AACvB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/checklist/markdownTransformers.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../common/markdown.js'\n\nexport const CHECK_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(?:-\\s)?\\s?(\\[(\\s|x)?\\])\\s/i,\n replace: listReplace('check'),\n}\n"],"names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","CHECK_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAEnE,SAASC,UAAU,EAAEC,WAAW,QAAQ,wBAAuB;AAE/D,OAAO,MAAMC,aAAiC;IAC5CC,MAAM;IACNC,cAAc;QAACL;QAAUD;KAAa;IACtCO,QAAQ,CAACC,MAAMC;QACb,OAAOV,YAAYS,QAAQN,WAAWM,MAAMC,gBAAgB,KAAK;IACnE;IACAC,QAAQ;IACRC,SAASR,YAAY;AACvB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,sBAAsB,sBAErC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,sBAAsB,sBAErC"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
- import lexicalCheckListPluginImport from '@lexical/react/LexicalCheckListPlugin.js';
3
- const { CheckListPlugin } = lexicalCheckListPluginImport;
2
+ import { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js';
4
3
  import React from 'react';
5
4
  export function LexicalCheckListPlugin() {
6
5
  return /*#__PURE__*/ React.createElement(CheckListPlugin, null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"sourcesContent":["'use client'\nimport lexicalCheckListPluginImport from '@lexical/react/LexicalCheckListPlugin.js'\nconst { CheckListPlugin } = lexicalCheckListPluginImport\n\nimport React from 'react'\n\nexport function LexicalCheckListPlugin() {\n return <CheckListPlugin />\n}\n"],"names":["lexicalCheckListPluginImport","CheckListPlugin","React","LexicalCheckListPlugin"],"rangeMappings":";;;;;;","mappings":"AAAA;AACA,OAAOA,kCAAkC,2CAA0C;AACnF,MAAM,EAAEC,eAAe,EAAE,GAAGD;AAE5B,OAAOE,WAAW,QAAO;AAEzB,OAAO,SAASC;IACd,qBAAO,oBAACF;AACV"}
1
+ {"version":3,"sources":["../../../../../../src/field/features/lists/checklist/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { CheckListPlugin } from '@lexical/react/LexicalCheckListPlugin.js'\nimport React from 'react'\n\nexport function LexicalCheckListPlugin() {\n return <CheckListPlugin />\n}\n"],"names":["CheckListPlugin","React","LexicalCheckListPlugin"],"rangeMappings":";;;;;","mappings":"AAAA;AACA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,OAAOC,WAAW,QAAO;AAEzB,OAAO,SAASC;IACd,qBAAO,oBAACF;AACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/common/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAQ1C,eAAO,MAAM,WAAW,aAAc,QAAQ,KAAG,kBAAkB,CAAC,SAAS,CA6B5E,CAAA;AAED,eAAO,MAAM,UAAU,aACX,QAAQ,kBACF,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,SACtC,MAAM,KACZ,MA2BF,CAAA"}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/common/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAO1C,eAAO,MAAM,WAAW,aAAc,QAAQ,KAAG,kBAAkB,CAAC,SAAS,CA6B5E,CAAA;AAED,eAAO,MAAM,UAAU,aACX,QAAQ,kBACF,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,SACtC,MAAM,KACZ,MA2BF,CAAA"}
@@ -1,6 +1,5 @@
1
1
  // Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1
2
- import lexicalListImport from '@lexical/list';
3
- const { $createListItemNode, $createListNode, $isListItemNode, $isListNode } = lexicalListImport;
2
+ import { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list';
4
3
  // Amount of spaces that define indentation level
5
4
  const LIST_INDENT_SIZE = 4;
6
5
  export const listReplace = (listType)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/common/markdown.ts"],"sourcesContent":["// Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1\n\nimport type { ListNode, ListType } from '@lexical/list'\nimport type { ElementTransformer } from '@lexical/markdown'\nimport type { ElementNode } from 'lexical'\n\nimport lexicalListImport from '@lexical/list'\nconst { $createListItemNode, $createListNode, $isListItemNode, $isListNode } = lexicalListImport\n\n// Amount of spaces that define indentation level\nconst LIST_INDENT_SIZE = 4\n\nexport const listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = Math.floor(match[1].length / LIST_INDENT_SIZE)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nexport const listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n"],"names":["lexicalListImport","$createListItemNode","$createListNode","$isListItemNode","$isListNode","LIST_INDENT_SIZE","listReplace","listType","parentNode","children","match","previousNode","getPreviousSibling","nextNode","getNextSibling","listItem","undefined","getListType","firstChild","getFirstChild","insertBefore","append","remove","list","Number","replace","select","indent","Math","floor","length","setIndent","listExport","listNode","exportChildren","depth","output","getChildren","index","listItemNode","getChildrenSize","push","repeat","prefix","getStart","getChecked","join"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,mKAAmK;AAMnK,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,mBAAmB,EAAEC,eAAe,EAAEC,eAAe,EAAEC,WAAW,EAAE,GAAGJ;AAE/E,iDAAiD;AACjD,MAAMK,mBAAmB;AAEzB,OAAO,MAAMC,cAAc,CAACC;IAC1B,OAAO,CAACC,YAAYC,UAAUC;QAC5B,MAAMC,eAAeH,WAAWI,kBAAkB;QAClD,MAAMC,WAAWL,WAAWM,cAAc;QAC1C,MAAMC,WAAWd,oBAAoBM,aAAa,UAAUG,KAAK,CAAC,EAAE,KAAK,MAAMM;QAC/E,IAAIZ,YAAYS,aAAaA,SAASI,WAAW,OAAOV,UAAU;YAChE,MAAMW,aAAaL,SAASM,aAAa;YACzC,IAAID,eAAe,MAAM;gBACvBA,WAAWE,YAAY,CAACL;YAC1B,OAAO;gBACL,kEAAkE;gBAClEF,SAASQ,MAAM,CAACN;YAClB;YACAP,WAAWc,MAAM;QACnB,OAAO,IAAIlB,YAAYO,iBAAiBA,aAAaM,WAAW,OAAOV,UAAU;YAC/EI,aAAaU,MAAM,CAACN;YACpBP,WAAWc,MAAM;QACnB,OAAO;YACL,MAAMC,OAAOrB,gBAAgBK,UAAUA,aAAa,WAAWiB,OAAOd,KAAK,CAAC,EAAE,IAAIM;YAClFO,KAAKF,MAAM,CAACN;YACZP,WAAWiB,OAAO,CAACF;QACrB;QACAR,SAASM,MAAM,IAAIZ;QACnBM,SAASW,MAAM,CAAC,GAAG;QACnB,MAAMC,SAASC,KAAKC,KAAK,CAACnB,KAAK,CAAC,EAAE,CAACoB,MAAM,GAAGzB;QAC5C,IAAIsB,QAAQ;YACVZ,SAASgB,SAAS,CAACJ;QACrB;IACF;AACF,EAAC;AAED,OAAO,MAAMK,aAAa,CACxBC,UACAC,gBACAC;IAEA,MAAMC,SAAS,EAAE;IACjB,MAAM3B,WAAWwB,SAASI,WAAW;IACrC,IAAIC,QAAQ;IACZ,KAAK,MAAMC,gBAAgB9B,SAAU;QACnC,IAAIN,gBAAgBoC,eAAe;YACjC,IAAIA,aAAaC,eAAe,OAAO,GAAG;gBACxC,MAAMtB,aAAaqB,aAAapB,aAAa;gBAC7C,IAAIf,YAAYc,aAAa;oBAC3BkB,OAAOK,IAAI,CAACT,WAAWd,YAAYgB,gBAAgBC,QAAQ;oBAC3D;gBACF;YACF;YACA,MAAMR,SAAS,IAAIe,MAAM,CAACP,QAAQ9B;YAClC,MAAME,WAAW0B,SAAShB,WAAW;YACrC,MAAM0B,SACJpC,aAAa,WACT,CAAC,EAAE0B,SAASW,QAAQ,KAAKN,MAAM,EAAE,CAAC,GAClC/B,aAAa,UACX,CAAC,GAAG,EAAEgC,aAAaM,UAAU,KAAK,MAAM,IAAI,EAAE,CAAC,GAC/C;YACRT,OAAOK,IAAI,CAACd,SAASgB,SAAST,eAAeK;YAC7CD;QACF;IACF;IAEA,OAAOF,OAAOU,IAAI,CAAC;AACrB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/common/markdown.ts"],"sourcesContent":["// Copied from https://github.com/facebook/lexical/blob/176b8cf16ecb332ee5efe2c75219e223b7b019f2/packages/lexical-markdown/src/MarkdownTransformers.ts#L97C1-L172C1\n\nimport type { ListNode, ListType } from '@lexical/list'\nimport type { ElementTransformer } from '@lexical/markdown'\nimport type { ElementNode } from 'lexical'\n\nimport { $createListItemNode, $createListNode, $isListItemNode, $isListNode } from '@lexical/list'\n\n// Amount of spaces that define indentation level\nconst LIST_INDENT_SIZE = 4\n\nexport const listReplace = (listType: ListType): ElementTransformer['replace'] => {\n return (parentNode, children, match) => {\n const previousNode = parentNode.getPreviousSibling()\n const nextNode = parentNode.getNextSibling()\n const listItem = $createListItemNode(listType === 'check' ? match[3] === 'x' : undefined)\n if ($isListNode(nextNode) && nextNode.getListType() === listType) {\n const firstChild = nextNode.getFirstChild()\n if (firstChild !== null) {\n firstChild.insertBefore(listItem)\n } else {\n // should never happen, but let's handle gracefully, just in case.\n nextNode.append(listItem)\n }\n parentNode.remove()\n } else if ($isListNode(previousNode) && previousNode.getListType() === listType) {\n previousNode.append(listItem)\n parentNode.remove()\n } else {\n const list = $createListNode(listType, listType === 'number' ? Number(match[2]) : undefined)\n list.append(listItem)\n parentNode.replace(list)\n }\n listItem.append(...children)\n listItem.select(0, 0)\n const indent = Math.floor(match[1].length / LIST_INDENT_SIZE)\n if (indent) {\n listItem.setIndent(indent)\n }\n }\n}\n\nexport const listExport = (\n listNode: ListNode,\n exportChildren: (node: ElementNode) => string,\n depth: number,\n): string => {\n const output = []\n const children = listNode.getChildren()\n let index = 0\n for (const listItemNode of children) {\n if ($isListItemNode(listItemNode)) {\n if (listItemNode.getChildrenSize() === 1) {\n const firstChild = listItemNode.getFirstChild()\n if ($isListNode(firstChild)) {\n output.push(listExport(firstChild, exportChildren, depth + 1))\n continue\n }\n }\n const indent = ' '.repeat(depth * LIST_INDENT_SIZE)\n const listType = listNode.getListType()\n const prefix =\n listType === 'number'\n ? `${listNode.getStart() + index}. `\n : listType === 'check'\n ? `- [${listItemNode.getChecked() ? 'x' : ' '}] `\n : '- '\n output.push(indent + prefix + exportChildren(listItemNode))\n index++\n }\n }\n\n return output.join('\\n')\n}\n"],"names":["$createListItemNode","$createListNode","$isListItemNode","$isListNode","LIST_INDENT_SIZE","listReplace","listType","parentNode","children","match","previousNode","getPreviousSibling","nextNode","getNextSibling","listItem","undefined","getListType","firstChild","getFirstChild","insertBefore","append","remove","list","Number","replace","select","indent","Math","floor","length","setIndent","listExport","listNode","exportChildren","depth","output","getChildren","index","listItemNode","getChildrenSize","push","repeat","prefix","getStart","getChecked","join"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,mKAAmK;AAMnK,SAASA,mBAAmB,EAAEC,eAAe,EAAEC,eAAe,EAAEC,WAAW,QAAQ,gBAAe;AAElG,iDAAiD;AACjD,MAAMC,mBAAmB;AAEzB,OAAO,MAAMC,cAAc,CAACC;IAC1B,OAAO,CAACC,YAAYC,UAAUC;QAC5B,MAAMC,eAAeH,WAAWI,kBAAkB;QAClD,MAAMC,WAAWL,WAAWM,cAAc;QAC1C,MAAMC,WAAWd,oBAAoBM,aAAa,UAAUG,KAAK,CAAC,EAAE,KAAK,MAAMM;QAC/E,IAAIZ,YAAYS,aAAaA,SAASI,WAAW,OAAOV,UAAU;YAChE,MAAMW,aAAaL,SAASM,aAAa;YACzC,IAAID,eAAe,MAAM;gBACvBA,WAAWE,YAAY,CAACL;YAC1B,OAAO;gBACL,kEAAkE;gBAClEF,SAASQ,MAAM,CAACN;YAClB;YACAP,WAAWc,MAAM;QACnB,OAAO,IAAIlB,YAAYO,iBAAiBA,aAAaM,WAAW,OAAOV,UAAU;YAC/EI,aAAaU,MAAM,CAACN;YACpBP,WAAWc,MAAM;QACnB,OAAO;YACL,MAAMC,OAAOrB,gBAAgBK,UAAUA,aAAa,WAAWiB,OAAOd,KAAK,CAAC,EAAE,IAAIM;YAClFO,KAAKF,MAAM,CAACN;YACZP,WAAWiB,OAAO,CAACF;QACrB;QACAR,SAASM,MAAM,IAAIZ;QACnBM,SAASW,MAAM,CAAC,GAAG;QACnB,MAAMC,SAASC,KAAKC,KAAK,CAACnB,KAAK,CAAC,EAAE,CAACoB,MAAM,GAAGzB;QAC5C,IAAIsB,QAAQ;YACVZ,SAASgB,SAAS,CAACJ;QACrB;IACF;AACF,EAAC;AAED,OAAO,MAAMK,aAAa,CACxBC,UACAC,gBACAC;IAEA,MAAMC,SAAS,EAAE;IACjB,MAAM3B,WAAWwB,SAASI,WAAW;IACrC,IAAIC,QAAQ;IACZ,KAAK,MAAMC,gBAAgB9B,SAAU;QACnC,IAAIN,gBAAgBoC,eAAe;YACjC,IAAIA,aAAaC,eAAe,OAAO,GAAG;gBACxC,MAAMtB,aAAaqB,aAAapB,aAAa;gBAC7C,IAAIf,YAAYc,aAAa;oBAC3BkB,OAAOK,IAAI,CAACT,WAAWd,YAAYgB,gBAAgBC,QAAQ;oBAC3D;gBACF;YACF;YACA,MAAMR,SAAS,IAAIe,MAAM,CAACP,QAAQ9B;YAClC,MAAME,WAAW0B,SAAShB,WAAW;YACrC,MAAM0B,SACJpC,aAAa,WACT,CAAC,EAAE0B,SAASW,QAAQ,KAAKN,MAAM,EAAE,CAAC,GAClC/B,aAAa,UACX,CAAC,GAAG,EAAEgC,aAAaM,UAAU,KAAK,MAAM,IAAI,EAAE,CAAC,GAC/C;YACRT,OAAOK,IAAI,CAACd,SAASgB,SAAST,eAAeK;YAC7CD;QACF;IACF;IAEA,OAAOF,OAAOU,IAAI,CAAC;AACrB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"htmlConverter.d.ts","sourceRoot":"","sources":["../../../../src/field/features/lists/htmlConverter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAM/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAI1E,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,kBAAkB,CAe/D,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,sBAAsB,CA0CvE,CAAA"}
1
+ {"version":3,"file":"htmlConverter.d.ts","sourceRoot":"","sources":["../../../../src/field/features/lists/htmlConverter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAK/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAI1E,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,kBAAkB,CAe/D,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,sBAAsB,CA0CvE,CAAA"}
@@ -1,6 +1,5 @@
1
- import lexicalListImport from '@lexical/list';
1
+ import { ListItemNode, ListNode } from '@lexical/list';
2
2
  import { v4 as uuidv4 } from 'uuid';
3
- const { ListItemNode, ListNode } = lexicalListImport;
4
3
  import { convertLexicalNodesToHTML } from '../converters/html/converter/index.js';
5
4
  export const ListHTMLConverter = {
6
5
  converter: async ({ converters, node, parent, payload })=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/lists/htmlConverter.ts"],"sourcesContent":["import type { SerializedListItemNode, SerializedListNode } from '@lexical/list'\n\nimport lexicalListImport from '@lexical/list'\nimport { v4 as uuidv4 } from 'uuid'\nconst { ListItemNode, ListNode } = lexicalListImport\n\nimport type { HTMLConverter } from '../converters/html/converter/types.js'\n\nimport { convertLexicalNodesToHTML } from '../converters/html/converter/index.js'\n\nexport const ListHTMLConverter: HTMLConverter<SerializedListNode> = {\n converter: async ({ converters, node, parent, payload }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\n })\n\n return `<${node?.tag} class=\"list-${node?.listType}\">${childrenText}</${node?.tag}>`\n },\n nodeTypes: [ListNode.getType()],\n}\n\nexport const ListItemHTMLConverter: HTMLConverter<SerializedListItemNode> = {\n converter: async ({ converters, node, parent, payload }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return `<li aria-checked=${node.checked ? 'true' : 'false'} class=\"${\n 'list-item-checkbox' +\n (node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked') +\n (hasSubLists ? ' nestedListItem' : '')\n }\"\n role=\"checkbox\"\n tabIndex=${-1}\n value=${node?.value}\n >\n ${\n hasSubLists\n ? childrenText\n : `\n <input type=\"checkbox\" id=\"${uuid}\"${node.checked ? ' checked' : ''}>\n <label for=\"${uuid}\">${childrenText}</label><br>\n `\n }\n\n\n </li>`\n } else {\n return `<li ${hasSubLists ? `class=\"nestedListItem\" ` : ''}value=${node?.value}>${childrenText}</li>`\n }\n },\n nodeTypes: [ListItemNode.getType()],\n}\n"],"names":["lexicalListImport","v4","uuidv4","ListItemNode","ListNode","convertLexicalNodesToHTML","ListHTMLConverter","converter","converters","node","parent","payload","childrenText","lexicalNodes","children","tag","listType","nodeTypes","getType","ListItemHTMLConverter","hasSubLists","some","child","type","uuid","checked","value"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAOA,uBAAuB,gBAAe;AAC7C,SAASC,MAAMC,MAAM,QAAQ,OAAM;AACnC,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGJ;AAInC,SAASK,yBAAyB,QAAQ,wCAAuC;AAEjF,OAAO,MAAMC,oBAAuD;IAClEC,WAAW,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAE;QACrD,MAAMC,eAAe,MAAMP,0BAA0B;YACnDG;YACAK,cAAcJ,KAAKK,QAAQ;YAC3BJ,QAAQ;gBACN,GAAGD,IAAI;gBACPC;YACF;YACAC;QACF;QAEA,OAAO,CAAC,CAAC,EAAEF,MAAMM,IAAI,aAAa,EAAEN,MAAMO,SAAS,EAAE,EAAEJ,aAAa,EAAE,EAAEH,MAAMM,IAAI,CAAC,CAAC;IACtF;IACAE,WAAW;QAACb,SAASc,OAAO;KAAG;AACjC,EAAC;AAED,OAAO,MAAMC,wBAA+D;IAC1EZ,WAAW,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAE;QACrD,MAAMS,cAAcX,KAAKK,QAAQ,CAACO,IAAI,CAAC,CAACC,QAAUA,MAAMC,IAAI,KAAK;QAEjE,MAAMX,eAAe,MAAMP,0BAA0B;YACnDG;YACAK,cAAcJ,KAAKK,QAAQ;YAC3BJ,QAAQ;gBACN,GAAGD,IAAI;gBACPC;YACF;YACAC;QACF;QAEA,IAAI,cAAcD,UAAUA,QAAQM,aAAa,SAAS;YACxD,MAAMQ,OAAOtB;YAEb,OAAO,CAAC,iBAAiB,EAAEO,KAAKgB,OAAO,GAAG,SAAS,QAAQ,QAAQ,EACjE,uBACChB,CAAAA,KAAKgB,OAAO,GAAG,gCAAgC,+BAA8B,IAC7EL,CAAAA,cAAc,oBAAoB,EAAC,EACrC;;mBAEY,EAAE,CAAC,EAAE;gBACR,EAAEX,MAAMiB,MAAM;;MAExB,EACEN,cACIR,eACA,CAAC;mCACsB,EAAEY,KAAK,CAAC,EAAEf,KAAKgB,OAAO,GAAG,aAAa,GAAG;oBACxD,EAAED,KAAK,EAAE,EAAEZ,aAAa;MACtC,CAAC,CACA;;;eAGQ,CAAC;QACZ,OAAO;YACL,OAAO,CAAC,IAAI,EAAEQ,cAAc,CAAC,uBAAuB,CAAC,GAAG,GAAG,MAAM,EAAEX,MAAMiB,MAAM,CAAC,EAAEd,aAAa,KAAK,CAAC;QACvG;IACF;IACAK,WAAW;QAACd,aAAae,OAAO;KAAG;AACrC,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/lists/htmlConverter.ts"],"sourcesContent":["import type { SerializedListItemNode, SerializedListNode } from '@lexical/list'\n\nimport { ListItemNode, ListNode } from '@lexical/list'\nimport { v4 as uuidv4 } from 'uuid'\n\nimport type { HTMLConverter } from '../converters/html/converter/types.js'\n\nimport { convertLexicalNodesToHTML } from '../converters/html/converter/index.js'\n\nexport const ListHTMLConverter: HTMLConverter<SerializedListNode> = {\n converter: async ({ converters, node, parent, payload }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\n })\n\n return `<${node?.tag} class=\"list-${node?.listType}\">${childrenText}</${node?.tag}>`\n },\n nodeTypes: [ListNode.getType()],\n}\n\nexport const ListItemHTMLConverter: HTMLConverter<SerializedListItemNode> = {\n converter: async ({ converters, node, parent, payload }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n payload,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return `<li aria-checked=${node.checked ? 'true' : 'false'} class=\"${\n 'list-item-checkbox' +\n (node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked') +\n (hasSubLists ? ' nestedListItem' : '')\n }\"\n role=\"checkbox\"\n tabIndex=${-1}\n value=${node?.value}\n >\n ${\n hasSubLists\n ? childrenText\n : `\n <input type=\"checkbox\" id=\"${uuid}\"${node.checked ? ' checked' : ''}>\n <label for=\"${uuid}\">${childrenText}</label><br>\n `\n }\n\n\n </li>`\n } else {\n return `<li ${hasSubLists ? `class=\"nestedListItem\" ` : ''}value=${node?.value}>${childrenText}</li>`\n }\n },\n nodeTypes: [ListItemNode.getType()],\n}\n"],"names":["ListItemNode","ListNode","v4","uuidv4","convertLexicalNodesToHTML","ListHTMLConverter","converter","converters","node","parent","payload","childrenText","lexicalNodes","children","tag","listType","nodeTypes","getType","ListItemHTMLConverter","hasSubLists","some","child","type","uuid","checked","value"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AACtD,SAASC,MAAMC,MAAM,QAAQ,OAAM;AAInC,SAASC,yBAAyB,QAAQ,wCAAuC;AAEjF,OAAO,MAAMC,oBAAuD;IAClEC,WAAW,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAE;QACrD,MAAMC,eAAe,MAAMP,0BAA0B;YACnDG;YACAK,cAAcJ,KAAKK,QAAQ;YAC3BJ,QAAQ;gBACN,GAAGD,IAAI;gBACPC;YACF;YACAC;QACF;QAEA,OAAO,CAAC,CAAC,EAAEF,MAAMM,IAAI,aAAa,EAAEN,MAAMO,SAAS,EAAE,EAAEJ,aAAa,EAAE,EAAEH,MAAMM,IAAI,CAAC,CAAC;IACtF;IACAE,WAAW;QAACf,SAASgB,OAAO;KAAG;AACjC,EAAC;AAED,OAAO,MAAMC,wBAA+D;IAC1EZ,WAAW,OAAO,EAAEC,UAAU,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAE;QACrD,MAAMS,cAAcX,KAAKK,QAAQ,CAACO,IAAI,CAAC,CAACC,QAAUA,MAAMC,IAAI,KAAK;QAEjE,MAAMX,eAAe,MAAMP,0BAA0B;YACnDG;YACAK,cAAcJ,KAAKK,QAAQ;YAC3BJ,QAAQ;gBACN,GAAGD,IAAI;gBACPC;YACF;YACAC;QACF;QAEA,IAAI,cAAcD,UAAUA,QAAQM,aAAa,SAAS;YACxD,MAAMQ,OAAOpB;YAEb,OAAO,CAAC,iBAAiB,EAAEK,KAAKgB,OAAO,GAAG,SAAS,QAAQ,QAAQ,EACjE,uBACChB,CAAAA,KAAKgB,OAAO,GAAG,gCAAgC,+BAA8B,IAC7EL,CAAAA,cAAc,oBAAoB,EAAC,EACrC;;mBAEY,EAAE,CAAC,EAAE;gBACR,EAAEX,MAAMiB,MAAM;;MAExB,EACEN,cACIR,eACA,CAAC;mCACsB,EAAEY,KAAK,CAAC,EAAEf,KAAKgB,OAAO,GAAG,aAAa,GAAG;oBACxD,EAAED,KAAK,EAAE,EAAEZ,aAAa;MACtC,CAAC,CACA;;;eAGQ,CAAC;QACZ,OAAO;YACL,OAAO,CAAC,IAAI,EAAEQ,cAAc,CAAC,uBAAuB,CAAC,GAAG,GAAG,MAAM,EAAEX,MAAMiB,MAAM,CAAC,EAAEd,aAAa,KAAK,CAAC;QACvG;IACF;IACAK,WAAW;QAAChB,aAAaiB,OAAO;KAAG;AACrC,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedlist/feature.client.tsx"],"names":[],"mappings":";AAoEA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedlist/feature.client.tsx"],"names":[],"mappings":";AAmEA,eAAO,MAAM,iCAAiC,+BAAkD,CAAA"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
- import lexicalListImport from '@lexical/list';
3
- const { INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport;
2
+ import { INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
3
  import { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
5
4
  import { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js';
6
5
  import { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/orderedlist/feature.client.tsx"],"sourcesContent":["'use client'\nimport lexicalListImport from '@lexical/list'\nconst { INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js'\nimport { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nconst OrderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: OrderedListIcon,\n isActive: () => false,\n key: 'orderedList',\n label: `Ordered List`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n ],\n },\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('unorderedlist') ? [] : [ListNode, ListItemNode],\n plugins: featureProviderMap.has('unorderedlist')\n ? []\n : [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Lists',\n key: 'lists',\n options: [\n new SlashMenuOption('orderedlist', {\n Icon: OrderedListIcon,\n displayName: 'Ordered List',\n keywords: ['ordered list', 'ol'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }\n },\n }\n}\n\nexport const OrderedListFeatureClientComponent = createClientComponent(OrderedListFeatureClient)\n"],"names":["lexicalListImport","INSERT_ORDERED_LIST_COMMAND","ListItemNode","ListNode","SlashMenuOption","OrderedListIcon","TextDropdownSectionWithEntries","createClientComponent","LexicalListPlugin","ORDERED_LIST","OrderedListFeatureClient","props","clientFeatureProps","feature","featureProviderMap","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","dispatchCommand","undefined","order","markdownTransformers","nodes","has","plugins","Component","position","slashMenu","options","displayName","Icon","keywords","onSelect","OrderedListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,2BAA2B,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGH;AAIhE,SAASI,eAAe,QAAQ,yEAAwE;AACxG,SAASC,eAAe,QAAQ,iDAAgD;AAChF,SAASC,8BAA8B,QAAQ,iEAAgE;AAC/G,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,YAAY,QAAQ,2BAA0B;AAEvD,MAAMC,2BAAqE,CAACC;IAC1E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLF,oBAAoBD;gBACpBI,uBAAuB;oBACrBC,UAAU;wBACRV,+BAA+B;4BAC7B;gCACEW,gBAAgBZ;gCAChBa,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO,CAAC,YAAY,CAAC;gCACrBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACtB,6BAA6BuB;gCACtD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAACjB;iBAAa;gBACpCkB,OAAOb,mBAAmBc,GAAG,CAAC,mBAAmB,EAAE,GAAG;oBAACzB;oBAAUD;iBAAa;gBAC9E2B,SAASf,mBAAmBc,GAAG,CAAC,mBAC5B,EAAE,GACF;oBACE;wBACEE,WAAWtB;wBACXuB,UAAU;oBACZ;iBACD;gBACLC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbf,KAAK;4BACLc,SAAS;gCACP,IAAI7B,gBAAgB,eAAe;oCACjC+B,MAAM9B;oCACN6B,aAAa;oCACbE,UAAU;wCAAC;wCAAgB;qCAAK;oCAChCC,UAAU,CAAC,EAAEf,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACtB,6BAA6BuB;oCACtD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMc,oCAAoC/B,sBAAsBG,0BAAyB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/orderedlist/feature.client.tsx"],"sourcesContent":["'use client'\nimport { INSERT_ORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { OrderedListIcon } from '../../../lexical/ui/icons/OrderedList/index.js'\nimport { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nconst OrderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: OrderedListIcon,\n isActive: () => false,\n key: 'orderedList',\n label: `Ordered List`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n order: 10,\n },\n ]),\n ],\n },\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('unorderedlist') ? [] : [ListNode, ListItemNode],\n plugins: featureProviderMap.has('unorderedlist')\n ? []\n : [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Lists',\n key: 'lists',\n options: [\n new SlashMenuOption('orderedlist', {\n Icon: OrderedListIcon,\n displayName: 'Ordered List',\n keywords: ['ordered list', 'ol'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_ORDERED_LIST_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }\n },\n }\n}\n\nexport const OrderedListFeatureClientComponent = createClientComponent(OrderedListFeatureClient)\n"],"names":["INSERT_ORDERED_LIST_COMMAND","ListItemNode","ListNode","SlashMenuOption","OrderedListIcon","TextDropdownSectionWithEntries","createClientComponent","LexicalListPlugin","ORDERED_LIST","OrderedListFeatureClient","props","clientFeatureProps","feature","featureProviderMap","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","dispatchCommand","undefined","order","markdownTransformers","nodes","has","plugins","Component","position","slashMenu","options","displayName","Icon","keywords","onSelect","OrderedListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,2BAA2B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAInF,SAASC,eAAe,QAAQ,yEAAwE;AACxG,SAASC,eAAe,QAAQ,iDAAgD;AAChF,SAASC,8BAA8B,QAAQ,iEAAgE;AAC/G,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,YAAY,QAAQ,2BAA0B;AAEvD,MAAMC,2BAAqE,CAACC;IAC1E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLF,oBAAoBD;gBACpBI,uBAAuB;oBACrBC,UAAU;wBACRV,+BAA+B;4BAC7B;gCACEW,gBAAgBZ;gCAChBa,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO,CAAC,YAAY,CAAC;gCACrBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACtB,6BAA6BuB;gCACtD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAACjB;iBAAa;gBACpCkB,OAAOb,mBAAmBc,GAAG,CAAC,mBAAmB,EAAE,GAAG;oBAACzB;oBAAUD;iBAAa;gBAC9E2B,SAASf,mBAAmBc,GAAG,CAAC,mBAC5B,EAAE,GACF;oBACE;wBACEE,WAAWtB;wBACXuB,UAAU;oBACZ;iBACD;gBACLC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbf,KAAK;4BACLc,SAAS;gCACP,IAAI7B,gBAAgB,eAAe;oCACjC+B,MAAM9B;oCACN6B,aAAa;oCACbE,UAAU;wCAAC;wCAAgB;qCAAK;oCAChCC,UAAU,CAAC,EAAEf,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACtB,6BAA6BuB;oCACtD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMc,oCAAoC/B,sBAAsBG,0BAAyB"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedlist/feature.server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAOnE,eAAO,MAAM,kBAAkB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BlF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedlist/feature.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAOnE,eAAO,MAAM,kBAAkB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BlF,CAAA"}
@@ -1,5 +1,4 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { ListItemNode, ListNode } = lexicalListImport;
1
+ import { ListItemNode, ListNode } from '@lexical/list';
3
2
  import { createNode } from '../../typeUtilities.js';
4
3
  import { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js';
5
4
  import { OrderedListFeatureClientComponent } from './feature.client.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/orderedlist/feature.server.ts"],"sourcesContent":["import lexicalListImport from '@lexical/list'\nconst { ListItemNode, ListNode } = lexicalListImport\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { OrderedListFeatureClientComponent } from './feature.client.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nexport const OrderedListFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: ({ featureProviderMap }) => {\n return {\n ClientComponent: OrderedListFeatureClientComponent,\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('unorderedlist')\n ? []\n : [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'orderedlist',\n serverFeatureProps: props,\n }\n}\n"],"names":["lexicalListImport","ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","OrderedListFeatureClientComponent","ORDERED_LIST","OrderedListFeature","props","feature","featureProviderMap","ClientComponent","markdownTransformers","nodes","has","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGF;AAInC,SAASG,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,iCAAiC,QAAQ,sBAAqB;AACvE,SAASC,YAAY,QAAQ,2BAA0B;AAEvD,OAAO,MAAMC,qBAA0E,CAACC;IACtF,OAAO;QACLC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLC,iBAAiBN;gBACjBO,sBAAsB;oBAACN;iBAAa;gBACpCO,OAAOH,mBAAmBI,GAAG,CAAC,mBAC1B,EAAE,GACF;oBACEZ,WAAW;wBACTa,YAAY;4BACVC,MAAMb;wBACR;wBACAc,MAAMhB;oBACR;oBACAC,WAAW;wBACTa,YAAY;4BACVC,MAAMZ;wBACR;wBACAa,MAAMjB;oBACR;iBACD;gBACLkB,oBAAoBV;YACtB;QACF;QACAW,KAAK;QACLD,oBAAoBV;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/orderedlist/feature.server.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { OrderedListFeatureClientComponent } from './feature.client.js'\nimport { ORDERED_LIST } from './markdownTransformer.js'\n\nexport const OrderedListFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: ({ featureProviderMap }) => {\n return {\n ClientComponent: OrderedListFeatureClientComponent,\n markdownTransformers: [ORDERED_LIST],\n nodes: featureProviderMap.has('unorderedlist')\n ? []\n : [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'orderedlist',\n serverFeatureProps: props,\n }\n}\n"],"names":["ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","OrderedListFeatureClientComponent","ORDERED_LIST","OrderedListFeature","props","feature","featureProviderMap","ClientComponent","markdownTransformers","nodes","has","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAItD,SAASC,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,iCAAiC,QAAQ,sBAAqB;AACvE,SAASC,YAAY,QAAQ,2BAA0B;AAEvD,OAAO,MAAMC,qBAA0E,CAACC;IACtF,OAAO;QACLC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,OAAO;gBACLC,iBAAiBN;gBACjBO,sBAAsB;oBAACN;iBAAa;gBACpCO,OAAOH,mBAAmBI,GAAG,CAAC,mBAC1B,EAAE,GACF;oBACEZ,WAAW;wBACTa,YAAY;4BACVC,MAAMb;wBACR;wBACAc,MAAMhB;oBACR;oBACAC,WAAW;wBACTa,YAAY;4BACVC,MAAMZ;wBACR;wBACAa,MAAMjB;oBACR;iBACD;gBACLkB,oBAAoBV;YACtB;QACF;QACAW,KAAK;QACLD,oBAAoBV;IACtB;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedlist/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAO3D,eAAO,MAAM,YAAY,EAAE,kBAQ1B,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/orderedlist/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,eAAO,MAAM,YAAY,EAAE,kBAQ1B,CAAA"}
@@ -1,5 +1,4 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { $isListNode, ListItemNode, ListNode } = lexicalListImport;
1
+ import { $isListNode, ListItemNode, ListNode } from '@lexical/list';
3
2
  import { listExport, listReplace } from '../common/markdown.js';
4
3
  export const ORDERED_LIST = {
5
4
  type: 'element',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/orderedlist/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport lexicalListImport from '@lexical/list'\nconst { $isListNode, ListItemNode, ListNode } = lexicalListImport\n\nimport { listExport, listReplace } from '../common/markdown.js'\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(\\d+)\\.\\s/,\n replace: listReplace('number'),\n}\n"],"names":["lexicalListImport","$isListNode","ListItemNode","ListNode","listExport","listReplace","ORDERED_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAEA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,WAAW,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGH;AAEhD,SAASI,UAAU,EAAEC,WAAW,QAAQ,wBAAuB;AAE/D,OAAO,MAAMC,eAAmC;IAC9CC,MAAM;IACNC,cAAc;QAACL;QAAUD;KAAa;IACtCO,QAAQ,CAACC,MAAMC;QACb,OAAOV,YAAYS,QAAQN,WAAWM,MAAMC,gBAAgB,KAAK;IACnE;IACAC,QAAQ;IACRC,SAASR,YAAY;AACvB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/orderedlist/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $isListNode, ListItemNode, ListNode } from '@lexical/list'\n\nimport { listExport, listReplace } from '../common/markdown.js'\n\nexport const ORDERED_LIST: ElementTransformer = {\n type: 'element',\n dependencies: [ListNode, ListItemNode],\n export: (node, exportChildren) => {\n return $isListNode(node) ? listExport(node, exportChildren, 0) : null\n },\n regExp: /^(\\s*)(\\d+)\\.\\s/,\n replace: listReplace('number'),\n}\n"],"names":["$isListNode","ListItemNode","ListNode","listExport","listReplace","ORDERED_LIST","type","dependencies","export","node","exportChildren","regExp","replace"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,WAAW,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAEnE,SAASC,UAAU,EAAEC,WAAW,QAAQ,wBAAuB;AAE/D,OAAO,MAAMC,eAAmC;IAC9CC,MAAM;IACNC,cAAc;QAACL;QAAUD;KAAa;IACtCO,QAAQ,CAACC,MAAMC;QACb,OAAOV,YAAYS,QAAQN,WAAWM,MAAMC,gBAAgB,KAAK;IACnE;IACAC,QAAQ;IACRC,SAASR,YAAY;AACvB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,iBAAiB,sBAEhC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,wBAAgB,iBAAiB,sBAEhC"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
- import lexicalListPluginImport from '@lexical/react/LexicalListPlugin.js';
3
- const { ListPlugin } = lexicalListPluginImport;
2
+ import { ListPlugin } from '@lexical/react/LexicalListPlugin.js';
4
3
  import React from 'react';
5
4
  export function LexicalListPlugin() {
6
5
  return /*#__PURE__*/ React.createElement(ListPlugin, null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport lexicalListPluginImport from '@lexical/react/LexicalListPlugin.js'\nconst { ListPlugin } = lexicalListPluginImport\nimport React from 'react'\n\nexport function LexicalListPlugin() {\n return <ListPlugin />\n}\n"],"names":["lexicalListPluginImport","ListPlugin","React","LexicalListPlugin"],"rangeMappings":";;;;;;","mappings":"AAAA;AACA,OAAOA,6BAA6B,sCAAqC;AACzE,MAAM,EAAEC,UAAU,EAAE,GAAGD;AACvB,OAAOE,WAAW,QAAO;AAEzB,OAAO,SAASC;IACd,qBAAO,oBAACF;AACV"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nexport function LexicalListPlugin() {\n return <ListPlugin />\n}\n"],"names":["ListPlugin","React","LexicalListPlugin"],"rangeMappings":";;;;;","mappings":"AAAA;AACA,SAASA,UAAU,QAAQ,sCAAqC;AAChE,OAAOC,WAAW,QAAO;AAEzB,OAAO,SAASC;IACd,qBAAO,oBAACF;AACV"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedlist/feature.client.tsx"],"names":[],"mappings":";AAmEA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedlist/feature.client.tsx"],"names":[],"mappings":";AAkEA,eAAO,MAAM,mCAAmC,+BAAoD,CAAA"}
@@ -1,6 +1,5 @@
1
1
  'use client';
2
- import lexicalListImport from '@lexical/list';
3
- const { INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport;
2
+ import { INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
3
  import { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
5
4
  import { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js';
6
5
  import { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/unorderedlist/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport lexicalListImport from '@lexical/list'\nconst { INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js'\nimport { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nconst UnorderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: UnorderedListIcon,\n isActive: () => false,\n key: 'unorderedList',\n label: `Unordered List`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n ],\n },\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Lists',\n key: 'lists',\n options: [\n new SlashMenuOption('unorderedlist', {\n Icon: UnorderedListIcon,\n displayName: 'Unordered List',\n keywords: ['unordered list', 'ul'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }\n },\n }\n}\n\nexport const UnorderedListFeatureClientComponent = createClientComponent(UnorderedListFeatureClient)\n"],"names":["lexicalListImport","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","SlashMenuOption","UnorderedListIcon","TextDropdownSectionWithEntries","createClientComponent","LexicalListPlugin","UNORDERED_LIST","UnorderedListFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","dispatchCommand","undefined","order","markdownTransformers","nodes","plugins","Component","position","slashMenu","options","displayName","Icon","keywords","onSelect","UnorderedListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGH;AAIlE,SAASI,eAAe,QAAQ,yEAAwE;AACxG,SAASC,iBAAiB,QAAQ,mDAAkD;AACpF,SAASC,8BAA8B,QAAQ,iEAAgE;AAC/G,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,cAAc,QAAQ,2BAA0B;AAEzD,MAAMC,6BAAuE,CAACC;IAC5E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRT,+BAA+B;4BAC7B;gCACEU,gBAAgBX;gCAChBY,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO,CAAC,cAAc,CAAC;gCACvBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACrB,+BAA+BsB;gCACxD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAAChB;iBAAe;gBACtCiB,OAAO;oBAACvB;oBAAUD;iBAAa;gBAC/ByB,SAAS;oBACP;wBACEC,WAAWpB;wBACXqB,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbd,KAAK;4BACLa,SAAS;gCACP,IAAI3B,gBAAgB,iBAAiB;oCACnC6B,MAAM5B;oCACN2B,aAAa;oCACbE,UAAU;wCAAC;wCAAkB;qCAAK;oCAClCC,UAAU,CAAC,EAAEd,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACrB,+BAA+BsB;oCACxD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMa,sCAAsC7B,sBAAsBG,4BAA2B"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/unorderedlist/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { UnorderedListIcon } from '../../../lexical/ui/icons/UnorderedList/index.js'\nimport { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nconst UnorderedListFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n TextDropdownSectionWithEntries([\n {\n ChildComponent: UnorderedListIcon,\n isActive: () => false,\n key: 'unorderedList',\n label: `Unordered List`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n ],\n },\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Lists',\n key: 'lists',\n options: [\n new SlashMenuOption('unorderedlist', {\n Icon: UnorderedListIcon,\n displayName: 'Unordered List',\n keywords: ['unordered list', 'ul'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }\n },\n }\n}\n\nexport const UnorderedListFeatureClientComponent = createClientComponent(UnorderedListFeatureClient)\n"],"names":["INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","SlashMenuOption","UnorderedListIcon","TextDropdownSectionWithEntries","createClientComponent","LexicalListPlugin","UNORDERED_LIST","UnorderedListFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","key","label","onClick","editor","dispatchCommand","undefined","order","markdownTransformers","nodes","plugins","Component","position","slashMenu","options","displayName","Icon","keywords","onSelect","UnorderedListFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAIrF,SAASC,eAAe,QAAQ,yEAAwE;AACxG,SAASC,iBAAiB,QAAQ,mDAAkD;AACpF,SAASC,8BAA8B,QAAQ,iEAAgE;AAC/G,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,cAAc,QAAQ,2BAA0B;AAEzD,MAAMC,6BAAuE,CAACC;IAC5E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRT,+BAA+B;4BAC7B;gCACEU,gBAAgBX;gCAChBY,UAAU,IAAM;gCAChBC,KAAK;gCACLC,OAAO,CAAC,cAAc,CAAC;gCACvBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACrB,+BAA+BsB;gCACxD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;gBACAC,sBAAsB;oBAAChB;iBAAe;gBACtCiB,OAAO;oBAACvB;oBAAUD;iBAAa;gBAC/ByB,SAAS;oBACP;wBACEC,WAAWpB;wBACXqB,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbd,KAAK;4BACLa,SAAS;gCACP,IAAI3B,gBAAgB,iBAAiB;oCACnC6B,MAAM5B;oCACN2B,aAAa;oCACbE,UAAU;wCAAC;wCAAkB;qCAAK;oCAClCC,UAAU,CAAC,EAAEd,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACrB,+BAA+BsB;oCACxD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMa,sCAAsC7B,sBAAsBG,4BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedlist/feature.server.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAOnE,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BpF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedlist/feature.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAOnE,eAAO,MAAM,oBAAoB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BpF,CAAA"}
@@ -1,5 +1,4 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { ListItemNode, ListNode } = lexicalListImport;
1
+ import { ListItemNode, ListNode } from '@lexical/list';
3
2
  import { createNode } from '../../typeUtilities.js';
4
3
  import { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js';
5
4
  import { UnorderedListFeatureClientComponent } from './feature.client.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/lists/unorderedlist/feature.server.ts"],"sourcesContent":["import lexicalListImport from '@lexical/list'\nconst { ListItemNode, ListNode } = lexicalListImport\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { UnorderedListFeatureClientComponent } from './feature.client.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nexport const UnorderedListFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: UnorderedListFeatureClientComponent,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'unorderedlist',\n serverFeatureProps: props,\n }\n}\n"],"names":["lexicalListImport","ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","UnorderedListFeatureClientComponent","UNORDERED_LIST","UnorderedListFeature","props","feature","ClientComponent","markdownTransformers","nodes","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGF;AAInC,SAASG,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,mCAAmC,QAAQ,sBAAqB;AACzE,SAASC,cAAc,QAAQ,2BAA0B;AAEzD,OAAO,MAAMC,uBAA4E,CACvFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBL;gBACjBM,sBAAsB;oBAACL;iBAAe;gBACtCM,OAAO;oBACLV,WAAW;wBACTW,YAAY;4BACVC,MAAMX;wBACR;wBACAY,MAAMd;oBACR;oBACAC,WAAW;wBACTW,YAAY;4BACVC,MAAMV;wBACR;wBACAW,MAAMf;oBACR;iBACD;gBACDgB,oBAAoBR;YACtB;QACF;QACAS,KAAK;QACLD,oBAAoBR;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/lists/unorderedlist/feature.server.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { createNode } from '../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js'\nimport { UnorderedListFeatureClientComponent } from './feature.client.js'\nimport { UNORDERED_LIST } from './markdownTransformer.js'\n\nexport const UnorderedListFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: UnorderedListFeatureClientComponent,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter,\n },\n node: ListItemNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'unorderedlist',\n serverFeatureProps: props,\n }\n}\n"],"names":["ListItemNode","ListNode","createNode","ListHTMLConverter","ListItemHTMLConverter","UnorderedListFeatureClientComponent","UNORDERED_LIST","UnorderedListFeature","props","feature","ClientComponent","markdownTransformers","nodes","converters","html","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAItD,SAASC,UAAU,QAAQ,yBAAwB;AACnD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,sBAAqB;AAC9E,SAASC,mCAAmC,QAAQ,sBAAqB;AACzE,SAASC,cAAc,QAAQ,2BAA0B;AAEzD,OAAO,MAAMC,uBAA4E,CACvFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBL;gBACjBM,sBAAsB;oBAACL;iBAAe;gBACtCM,OAAO;oBACLV,WAAW;wBACTW,YAAY;4BACVC,MAAMX;wBACR;wBACAY,MAAMd;oBACR;oBACAC,WAAW;wBACTW,YAAY;4BACVC,MAAMV;wBACR;wBACAW,MAAMf;oBACR;iBACD;gBACDgB,oBAAoBR;YACtB;QACF;QACAS,KAAK;QACLD,oBAAoBR;IACtB;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedlist/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAO3D,eAAO,MAAM,cAAc,EAAE,kBAQ5B,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/lists/unorderedlist/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,eAAO,MAAM,cAAc,EAAE,kBAQ5B,CAAA"}