@payloadcms/richtext-lexical 3.0.0-beta.2 → 3.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (415) 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 +4 -4
  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/component/index.d.ts.map +1 -1
  21. package/dist/field/features/blocks/component/index.js +36 -3
  22. package/dist/field/features/blocks/component/index.js.map +1 -1
  23. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  24. package/dist/field/features/blocks/drawer/index.js +2 -4
  25. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  26. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  27. package/dist/field/features/blocks/feature.server.js +109 -77
  28. package/dist/field/features/blocks/feature.server.js.map +1 -1
  29. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  30. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  31. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  32. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  33. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  34. package/dist/field/features/blocks/plugin/commands.js +1 -2
  35. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  36. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  37. package/dist/field/features/blocks/plugin/index.js +3 -6
  38. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  39. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  40. package/dist/field/features/blocks/populationPromise.js +3 -18
  41. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  42. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  43. package/dist/field/features/blocks/validate.js +22 -36
  44. package/dist/field/features/blocks/validate.js.map +1 -1
  45. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  46. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  47. package/dist/field/features/converters/html/field/index.js +6 -3
  48. package/dist/field/features/converters/html/field/index.js.map +1 -1
  49. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +1 -1
  50. package/dist/field/features/debug/testrecorder/plugin/index.js +2 -4
  51. package/dist/field/features/debug/testrecorder/plugin/index.js.map +1 -1
  52. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +1 -1
  53. package/dist/field/features/debug/treeview/plugin/index.js +2 -4
  54. package/dist/field/features/debug/treeview/plugin/index.js.map +1 -1
  55. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  56. package/dist/field/features/format/bold/feature.client.js +1 -2
  57. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  58. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +1 -1
  59. package/dist/field/features/format/inlinecode/feature.client.js +1 -2
  60. package/dist/field/features/format/inlinecode/feature.client.js.map +1 -1
  61. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  62. package/dist/field/features/format/italic/feature.client.js +1 -2
  63. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  64. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  65. package/dist/field/features/format/strikethrough/feature.client.js +1 -2
  66. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  67. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  68. package/dist/field/features/format/subscript/feature.client.js +1 -2
  69. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  70. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  71. package/dist/field/features/format/superscript/feature.client.js +1 -2
  72. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  73. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  74. package/dist/field/features/format/underline/feature.client.js +1 -2
  75. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  76. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  77. package/dist/field/features/heading/feature.client.js +3 -6
  78. package/dist/field/features/heading/feature.client.js.map +1 -1
  79. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  80. package/dist/field/features/heading/feature.server.js +5 -5
  81. package/dist/field/features/heading/feature.server.js.map +1 -1
  82. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  83. package/dist/field/features/heading/markdownTransformer.js +1 -2
  84. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  85. package/dist/field/features/horizontalrule/component/index.d.ts +10 -0
  86. package/dist/field/features/horizontalrule/component/index.d.ts.map +1 -0
  87. package/dist/field/features/horizontalrule/component/index.js +62 -0
  88. package/dist/field/features/horizontalrule/component/index.js.map +1 -0
  89. package/dist/field/features/horizontalrule/feature.client.d.ts +3 -0
  90. package/dist/field/features/horizontalrule/feature.client.d.ts.map +1 -0
  91. package/dist/field/features/horizontalrule/feature.client.js +53 -0
  92. package/dist/field/features/horizontalrule/feature.client.js.map +1 -0
  93. package/dist/field/features/horizontalrule/feature.server.d.ts +3 -0
  94. package/dist/field/features/horizontalrule/feature.server.d.ts.map +1 -0
  95. package/dist/field/features/horizontalrule/feature.server.js +37 -0
  96. package/dist/field/features/horizontalrule/feature.server.js.map +1 -0
  97. package/dist/field/features/horizontalrule/markdownTransformer.d.ts +3 -0
  98. package/dist/field/features/horizontalrule/markdownTransformer.d.ts.map +1 -0
  99. package/dist/field/features/horizontalrule/markdownTransformer.js +23 -0
  100. package/dist/field/features/horizontalrule/markdownTransformer.js.map +1 -0
  101. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts +53 -0
  102. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  103. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js +88 -0
  104. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +1 -0
  105. package/dist/field/features/horizontalrule/plugin/index.d.ts +6 -0
  106. package/dist/field/features/horizontalrule/plugin/index.d.ts.map +1 -0
  107. package/dist/field/features/horizontalrule/plugin/index.js +31 -0
  108. package/dist/field/features/horizontalrule/plugin/index.js.map +1 -0
  109. package/dist/field/features/horizontalrule/plugin/index.scss +20 -0
  110. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  111. package/dist/field/features/indent/feature.client.js +1 -2
  112. package/dist/field/features/indent/feature.client.js.map +1 -1
  113. package/dist/field/features/link/drawer/baseFields.d.ts +3 -3
  114. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  115. package/dist/field/features/link/drawer/baseFields.js +28 -42
  116. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  117. package/dist/field/features/link/drawer/index.js +3 -2
  118. package/dist/field/features/link/drawer/index.js.map +1 -1
  119. package/dist/field/features/link/drawer/types.d.ts +4 -2
  120. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  121. package/dist/field/features/link/drawer/types.js.map +1 -1
  122. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  123. package/dist/field/features/link/feature.client.js +2 -4
  124. package/dist/field/features/link/feature.client.js.map +1 -1
  125. package/dist/field/features/link/feature.server.d.ts +0 -2
  126. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  127. package/dist/field/features/link/feature.server.js +48 -9
  128. package/dist/field/features/link/feature.server.js.map +1 -1
  129. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  130. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  131. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  132. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  133. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  134. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  135. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  136. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  137. package/dist/field/features/link/plugins/autoLink/index.js +3 -6
  138. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  139. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  140. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  141. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  142. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  143. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +56 -39
  144. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  145. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +9 -1
  146. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -5
  147. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  148. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +11 -29
  149. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  150. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  151. package/dist/field/features/link/plugins/link/index.js +3 -12
  152. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  153. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  154. package/dist/field/features/link/populationPromise.js +9 -25
  155. package/dist/field/features/link/populationPromise.js.map +1 -1
  156. package/dist/field/features/link/validate.d.ts +5 -0
  157. package/dist/field/features/link/validate.d.ts.map +1 -0
  158. package/dist/field/features/link/validate.js +32 -0
  159. package/dist/field/features/link/validate.js.map +1 -0
  160. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  161. package/dist/field/features/lists/checklist/feature.client.js +1 -2
  162. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  163. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  164. package/dist/field/features/lists/checklist/feature.server.js +6 -6
  165. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  166. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  167. package/dist/field/features/lists/checklist/markdownTransformers.js +1 -2
  168. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  169. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  170. package/dist/field/features/lists/checklist/plugin/index.js +1 -2
  171. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  172. package/dist/field/features/lists/common/markdown.d.ts.map +1 -1
  173. package/dist/field/features/lists/common/markdown.js +1 -2
  174. package/dist/field/features/lists/common/markdown.js.map +1 -1
  175. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  176. package/dist/field/features/lists/htmlConverter.js +13 -6
  177. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  178. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +1 -1
  179. package/dist/field/features/lists/orderedlist/feature.client.js +1 -2
  180. package/dist/field/features/lists/orderedlist/feature.client.js.map +1 -1
  181. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +1 -1
  182. package/dist/field/features/lists/orderedlist/feature.server.js +6 -6
  183. package/dist/field/features/lists/orderedlist/feature.server.js.map +1 -1
  184. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +1 -1
  185. package/dist/field/features/lists/orderedlist/markdownTransformer.js +1 -2
  186. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +1 -1
  187. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  188. package/dist/field/features/lists/plugin/index.js +1 -2
  189. package/dist/field/features/lists/plugin/index.js.map +1 -1
  190. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +1 -1
  191. package/dist/field/features/lists/unorderedlist/feature.client.js +1 -2
  192. package/dist/field/features/lists/unorderedlist/feature.client.js.map +1 -1
  193. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +1 -1
  194. package/dist/field/features/lists/unorderedlist/feature.server.js +6 -6
  195. package/dist/field/features/lists/unorderedlist/feature.server.js.map +1 -1
  196. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +1 -1
  197. package/dist/field/features/lists/unorderedlist/markdownTransformer.js +1 -2
  198. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +1 -1
  199. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  200. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  201. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  202. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  203. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  204. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  205. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  206. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  207. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  208. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  209. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  210. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  211. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  212. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  213. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  214. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  215. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  216. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  217. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  218. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  219. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  220. package/dist/field/features/paragraph/feature.client.js +2 -4
  221. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  222. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  223. package/dist/field/features/relationship/drawer/commands.js +1 -2
  224. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  225. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  226. package/dist/field/features/relationship/drawer/index.js +7 -13
  227. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  228. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  229. package/dist/field/features/relationship/feature.server.js +3 -2
  230. package/dist/field/features/relationship/feature.server.js.map +1 -1
  231. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  232. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  233. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  234. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  235. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  236. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +54 -7
  237. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  238. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  239. package/dist/field/features/relationship/plugins/index.js +3 -6
  240. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  241. package/dist/field/features/relationship/populationPromise.js +7 -6
  242. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  243. package/dist/field/features/typeUtilities.d.ts +8 -0
  244. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  245. package/dist/field/features/typeUtilities.js +8 -0
  246. package/dist/field/features/typeUtilities.js.map +1 -0
  247. package/dist/field/features/types.d.ts +57 -33
  248. package/dist/field/features/types.d.ts.map +1 -1
  249. package/dist/field/features/types.js.map +1 -1
  250. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  251. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  252. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  253. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  254. package/dist/field/features/upload/component/index.js +55 -9
  255. package/dist/field/features/upload/component/index.js.map +1 -1
  256. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  257. package/dist/field/features/upload/drawer/commands.js +1 -2
  258. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  259. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  260. package/dist/field/features/upload/drawer/index.js +8 -12
  261. package/dist/field/features/upload/drawer/index.js.map +1 -1
  262. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  263. package/dist/field/features/upload/feature.server.js +39 -11
  264. package/dist/field/features/upload/feature.server.js.map +1 -1
  265. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  266. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  267. package/dist/field/features/upload/nodes/UploadNode.js +6 -9
  268. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  269. package/dist/field/features/upload/plugin/index.d.ts +2 -2
  270. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  271. package/dist/field/features/upload/plugin/index.js +4 -9
  272. package/dist/field/features/upload/plugin/index.js.map +1 -1
  273. package/dist/field/features/upload/populationPromise.js +11 -8
  274. package/dist/field/features/upload/populationPromise.js.map +1 -1
  275. package/dist/field/features/upload/validate.d.ts +2 -1
  276. package/dist/field/features/upload/validate.d.ts.map +1 -1
  277. package/dist/field/features/upload/validate.js +34 -12
  278. package/dist/field/features/upload/validate.js.map +1 -1
  279. package/dist/field/index.d.ts +1 -1
  280. package/dist/field/index.d.ts.map +1 -1
  281. package/dist/field/index.js.map +1 -1
  282. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  283. package/dist/field/lexical/LexicalEditor.js +6 -11
  284. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  285. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  286. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  287. package/dist/field/lexical/LexicalProvider.js +1 -2
  288. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  289. package/dist/field/lexical/config/client/default.d.ts +1 -1
  290. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  291. package/dist/field/lexical/config/client/default.js.map +1 -1
  292. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  293. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  294. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  295. package/dist/field/lexical/config/server/default.d.ts +2 -3
  296. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  297. package/dist/field/lexical/config/server/default.js +3 -3
  298. package/dist/field/lexical/config/server/default.js.map +1 -1
  299. package/dist/field/lexical/config/server/loader.d.ts +4 -2
  300. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  301. package/dist/field/lexical/config/server/loader.js +3 -2
  302. package/dist/field/lexical/config/server/loader.js.map +1 -1
  303. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  304. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  305. package/dist/field/lexical/config/server/sanitize.js +23 -8
  306. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  307. package/dist/field/lexical/config/types.d.ts +1 -1
  308. package/dist/field/lexical/config/types.d.ts.map +1 -1
  309. package/dist/field/lexical/config/types.js.map +1 -1
  310. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +1 -1
  311. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js +3 -6
  312. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +1 -1
  313. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +1 -1
  314. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js +3 -6
  315. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +1 -1
  316. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +1 -1
  317. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +27 -29
  318. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +1 -1
  319. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  320. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  321. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  322. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  323. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +3 -6
  324. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  325. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  326. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +3 -6
  327. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  328. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  329. package/dist/field/lexical/plugins/SlashMenu/index.js +1 -2
  330. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  331. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  332. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
  333. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  334. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  335. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +1 -2
  336. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  337. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  338. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +10 -7
  339. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  340. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  341. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  342. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  343. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  344. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  345. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  346. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  347. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  348. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  349. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  350. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  351. package/dist/field/lexical/theme/EditorTheme.scss +11 -8
  352. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  353. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  354. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  355. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  356. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  357. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  358. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  359. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  360. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  361. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  362. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  363. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  364. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  365. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +1 -1
  366. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  367. package/dist/field/lexical/utils/setFloatingElemPosition.js +15 -13
  368. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  369. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  370. package/dist/field/lexical/utils/url.js +3 -0
  371. package/dist/field/lexical/utils/url.js.map +1 -1
  372. package/dist/forEachNodeRecursively.d.ts +10 -0
  373. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  374. package/dist/forEachNodeRecursively.js +24 -0
  375. package/dist/forEachNodeRecursively.js.map +1 -0
  376. package/dist/generateComponentMap.d.ts.map +1 -1
  377. package/dist/generateComponentMap.js +16 -22
  378. package/dist/generateComponentMap.js.map +1 -1
  379. package/dist/generateSchemaMap.d.ts.map +1 -1
  380. package/dist/generateSchemaMap.js +4 -12
  381. package/dist/generateSchemaMap.js.map +1 -1
  382. package/dist/index.d.ts +6 -5
  383. package/dist/index.d.ts.map +1 -1
  384. package/dist/index.js +260 -173
  385. package/dist/index.js.map +1 -1
  386. package/dist/populate/defaultValue.d.ts.map +1 -1
  387. package/dist/populate/defaultValue.js +1 -0
  388. package/dist/populate/defaultValue.js.map +1 -1
  389. package/dist/populate/populate.d.ts +3 -3
  390. package/dist/populate/populate.d.ts.map +1 -1
  391. package/dist/populate/populate.js.map +1 -1
  392. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  393. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  394. package/dist/populate/populateLexicalPopulationPromises.js +35 -0
  395. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  396. package/dist/populate/recurseNestedFields.d.ts +7 -4
  397. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  398. package/dist/populate/recurseNestedFields.js +3 -5
  399. package/dist/populate/recurseNestedFields.js.map +1 -1
  400. package/dist/scss/app.scss +2 -3
  401. package/dist/scss/vars.scss +0 -7
  402. package/dist/types.d.ts +11 -5
  403. package/dist/types.d.ts.map +1 -1
  404. package/dist/types.js.map +1 -1
  405. package/dist/validate/index.d.ts +1 -1
  406. package/dist/validate/index.d.ts.map +1 -1
  407. package/package.json +47 -46
  408. package/components.d.ts +0 -6
  409. package/components.js +0 -7
  410. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  411. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  412. package/dist/populate/richTextRelationshipPromise.js +0 -68
  413. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  414. package/dist/scss/fonts.scss +0 -75
  415. package/src/index.ts +0 -423
@@ -1,36 +1,18 @@
1
1
  import { getBaseFields } from '../../drawer/baseFields.js';
2
2
  /**
3
3
  * This function is run to enrich the basefields which every link has with potential, custom user-added fields.
4
- */ // eslint-disable-next-line @typescript-eslint/require-await
5
- export function transformExtraFields(customFieldSchema, config, i18n, enabledCollections, disabledCollections) {
4
+ */ export function transformExtraFields(customFieldSchema, config, enabledCollections, disabledCollections) {
6
5
  const baseFields = getBaseFields(config, enabledCollections, disabledCollections);
7
- const fields = typeof customFieldSchema === 'function' ? customFieldSchema({
8
- config,
9
- defaultFields: baseFields,
10
- i18n
11
- }) : baseFields;
12
- // Wrap fields which are not part of the base schema in a group named 'fields' - otherwise they will be rendered but not saved
13
- const extraFields = [];
14
- for(let i = fields.length - 1; i >= 0; i--){
15
- const field = fields[i];
16
- if ('name' in field) {
17
- if (!baseFields.find((baseField)=>!('name' in baseField) || baseField.name === field.name)) {
18
- if (field.name !== 'fields' && field.type !== 'group') {
19
- extraFields.push(field);
20
- // Remove from fields from now, as they need to be part of the fields group below
21
- fields.splice(fields.indexOf(field), 1);
22
- }
23
- }
24
- }
25
- }
26
- if (Array.isArray(customFieldSchema) || fields.length > 0) {
27
- // find field with name 'fields' and add the extra fields to it
28
- const fieldsField = fields.find((field)=>field.type === 'group' && field.name === 'fields');
29
- if (!fieldsField) {
30
- throw new Error('Could not find field with name "fields". This is required to add fields to the link field.');
31
- }
32
- fieldsField.fields = Array.isArray(fieldsField.fields) ? fieldsField.fields : [];
33
- fieldsField.fields.push(...Array.isArray(customFieldSchema) ? customFieldSchema.concat(extraFields) : extraFields);
6
+ let fields;
7
+ if (typeof customFieldSchema === 'function') {
8
+ fields = customFieldSchema({
9
+ config,
10
+ defaultFields: baseFields
11
+ });
12
+ } else if (Array.isArray(customFieldSchema)) {
13
+ fields = customFieldSchema;
14
+ } else {
15
+ fields = baseFields;
34
16
  }
35
17
  return fields;
36
18
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/field/features/link/plugins/floatingLinkEditor/utilities.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type { SanitizedConfig } from 'payload/config'\nimport type { Field, GroupField } from 'payload/types'\n\nimport { getBaseFields } from '../../drawer/baseFields.js'\n\n/**\n * This function is run to enrich the basefields which every link has with potential, custom user-added fields.\n */\n// eslint-disable-next-line @typescript-eslint/require-await\nexport function transformExtraFields(\n customFieldSchema:\n | ((args: { config: SanitizedConfig; defaultFields: Field[]; i18n: I18n }) => Field[])\n | Field[],\n config: SanitizedConfig,\n i18n: I18n,\n enabledCollections?: false | string[],\n disabledCollections?: false | string[],\n): Field[] {\n const baseFields: Field[] = getBaseFields(config, enabledCollections, disabledCollections)\n\n const fields =\n typeof customFieldSchema === 'function'\n ? customFieldSchema({ config, defaultFields: baseFields, i18n })\n : baseFields\n\n // Wrap fields which are not part of the base schema in a group named 'fields' - otherwise they will be rendered but not saved\n const extraFields = []\n for (let i = fields.length - 1; i >= 0; i--) {\n const field = fields[i]\n\n if ('name' in field) {\n if (\n !baseFields.find((baseField) => !('name' in baseField) || baseField.name === field.name)\n ) {\n if (field.name !== 'fields' && field.type !== 'group') {\n extraFields.push(field)\n // Remove from fields from now, as they need to be part of the fields group below\n fields.splice(fields.indexOf(field), 1)\n }\n }\n }\n }\n\n if (Array.isArray(customFieldSchema) || fields.length > 0) {\n // find field with name 'fields' and add the extra fields to it\n const fieldsField: GroupField = fields.find(\n (field) => field.type === 'group' && field.name === 'fields',\n ) as GroupField\n if (!fieldsField) {\n throw new Error(\n 'Could not find field with name \"fields\". This is required to add fields to the link field.',\n )\n }\n fieldsField.fields = Array.isArray(fieldsField.fields) ? fieldsField.fields : []\n fieldsField.fields.push(\n ...(Array.isArray(customFieldSchema) ? customFieldSchema.concat(extraFields) : extraFields),\n )\n }\n return fields\n}\n"],"names":["getBaseFields","transformExtraFields","customFieldSchema","config","i18n","enabledCollections","disabledCollections","baseFields","fields","defaultFields","extraFields","i","length","field","find","baseField","name","type","push","splice","indexOf","Array","isArray","fieldsField","Error","concat"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,aAAa,QAAQ,6BAA4B;AAE1D;;CAEC,GACD,4DAA4D;AAC5D,OAAO,SAASC,qBACdC,iBAEW,EACXC,MAAuB,EACvBC,IAAU,EACVC,kBAAqC,EACrCC,mBAAsC;IAEtC,MAAMC,aAAsBP,cAAcG,QAAQE,oBAAoBC;IAEtE,MAAME,SACJ,OAAON,sBAAsB,aACzBA,kBAAkB;QAAEC;QAAQM,eAAeF;QAAYH;IAAK,KAC5DG;IAEN,8HAA8H;IAC9H,MAAMG,cAAc,EAAE;IACtB,IAAK,IAAIC,IAAIH,OAAOI,MAAM,GAAG,GAAGD,KAAK,GAAGA,IAAK;QAC3C,MAAME,QAAQL,MAAM,CAACG,EAAE;QAEvB,IAAI,UAAUE,OAAO;YACnB,IACE,CAACN,WAAWO,IAAI,CAAC,CAACC,YAAc,CAAE,CAAA,UAAUA,SAAQ,KAAMA,UAAUC,IAAI,KAAKH,MAAMG,IAAI,GACvF;gBACA,IAAIH,MAAMG,IAAI,KAAK,YAAYH,MAAMI,IAAI,KAAK,SAAS;oBACrDP,YAAYQ,IAAI,CAACL;oBACjB,iFAAiF;oBACjFL,OAAOW,MAAM,CAACX,OAAOY,OAAO,CAACP,QAAQ;gBACvC;YACF;QACF;IACF;IAEA,IAAIQ,MAAMC,OAAO,CAACpB,sBAAsBM,OAAOI,MAAM,GAAG,GAAG;QACzD,+DAA+D;QAC/D,MAAMW,cAA0Bf,OAAOM,IAAI,CACzC,CAACD,QAAUA,MAAMI,IAAI,KAAK,WAAWJ,MAAMG,IAAI,KAAK;QAEtD,IAAI,CAACO,aAAa;YAChB,MAAM,IAAIC,MACR;QAEJ;QACAD,YAAYf,MAAM,GAAGa,MAAMC,OAAO,CAACC,YAAYf,MAAM,IAAIe,YAAYf,MAAM,GAAG,EAAE;QAChFe,YAAYf,MAAM,CAACU,IAAI,IACjBG,MAAMC,OAAO,CAACpB,qBAAqBA,kBAAkBuB,MAAM,CAACf,eAAeA;IAEnF;IACA,OAAOF;AACT"}
1
+ {"version":3,"sources":["../../../../../../src/field/features/link/plugins/floatingLinkEditor/utilities.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload/config'\nimport type { FieldWithRichTextRequiredEditor } from 'payload/types'\n\nimport { getBaseFields } from '../../drawer/baseFields.js'\n\n/**\n * This function is run to enrich the basefields which every link has with potential, custom user-added fields.\n */\nexport function transformExtraFields(\n customFieldSchema:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldWithRichTextRequiredEditor[]\n }) => FieldWithRichTextRequiredEditor[])\n | FieldWithRichTextRequiredEditor[],\n config: SanitizedConfig,\n enabledCollections?: false | string[],\n disabledCollections?: false | string[],\n): FieldWithRichTextRequiredEditor[] {\n const baseFields: FieldWithRichTextRequiredEditor[] = getBaseFields(\n config,\n enabledCollections,\n disabledCollections,\n )\n\n let fields: FieldWithRichTextRequiredEditor[]\n\n if (typeof customFieldSchema === 'function') {\n fields = customFieldSchema({ config, defaultFields: baseFields })\n } else if (Array.isArray(customFieldSchema)) {\n fields = customFieldSchema\n } else {\n fields = baseFields\n }\n\n return fields\n}\n"],"names":["getBaseFields","transformExtraFields","customFieldSchema","config","enabledCollections","disabledCollections","baseFields","fields","defaultFields","Array","isArray"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,aAAa,QAAQ,6BAA4B;AAE1D;;CAEC,GACD,OAAO,SAASC,qBACdC,iBAKqC,EACrCC,MAAuB,EACvBC,kBAAqC,EACrCC,mBAAsC;IAEtC,MAAMC,aAAgDN,cACpDG,QACAC,oBACAC;IAGF,IAAIE;IAEJ,IAAI,OAAOL,sBAAsB,YAAY;QAC3CK,SAASL,kBAAkB;YAAEC;YAAQK,eAAeF;QAAW;IACjE,OAAO,IAAIG,MAAMC,OAAO,CAACR,oBAAoB;QAC3CK,SAASL;IACX,OAAO;QACLK,SAASD;IACX;IAEA,OAAOC;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/link/plugins/link/index.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,UAAU,IAAI,IAAI,CAkEjC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/link/plugins/link/index.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,UAAU,IAAI,IAAI,CA2DjC"}
@@ -1,10 +1,7 @@
1
1
  'use client';
2
- import lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js';
3
- const { useLexicalComposerContext } = lexicalComposerContextImport;
4
- import lexicalUtilsImport from '@lexical/utils';
5
- const { mergeRegister } = lexicalUtilsImport;
6
- import lexicalImport from 'lexical';
7
- const { $getSelection, $isElementNode, $isRangeSelection, COMMAND_PRIORITY_LOW, PASTE_COMMAND } = lexicalImport;
2
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
3
+ import { mergeRegister } from '@lexical/utils';
4
+ import { $getSelection, $isElementNode, $isRangeSelection, COMMAND_PRIORITY_LOW, PASTE_COMMAND } from 'lexical';
8
5
  import { useEffect } from 'react';
9
6
  import { validateUrl } from '../../../../lexical/utils/url.js';
10
7
  import { LinkNode, TOGGLE_LINK_COMMAND, toggleLink } from '../../nodes/LinkNode.js';
@@ -17,12 +14,6 @@ export function LinkPlugin() {
17
14
  throw new Error('LinkPlugin: LinkNode not registered on editor');
18
15
  }
19
16
  return mergeRegister(editor.registerCommand(TOGGLE_LINK_COMMAND, (payload)=>{
20
- // validate
21
- if (payload?.fields.linkType === 'custom') {
22
- if (!(validateUrl === undefined || validateUrl(payload?.fields.url))) {
23
- return false;
24
- }
25
- }
26
17
  toggleLink(payload);
27
18
  return true;
28
19
  }, COMMAND_PRIORITY_LOW), validateUrl !== undefined ? editor.registerCommand(PASTE_COMMAND, (event)=>{
@@ -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":"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;AAK1D,eAAO,MAAM,wBAAwB,UAC5B,sBAAsB,KAC5B,kBAAkB,kBAAkB,CA+DtC,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,46 +1,30 @@
1
- import { populate } from '../../../populate/populate.js';
2
1
  import { recurseNestedFields } from '../../../populate/recurseNestedFields.js';
3
2
  export const linkPopulationPromiseHOC = (props)=>{
4
- const linkPopulationPromise = ({ context, currentDepth, depth, editorPopulationPromises, field, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
5
- const promises = [];
6
- if (node?.fields?.doc?.value && node?.fields?.doc?.relationTo) {
7
- const collection = req.payload.collections[node?.fields?.doc?.relationTo];
8
- if (collection) {
9
- promises.push(populate({
10
- id: typeof node?.fields?.doc?.value === 'object' ? node?.fields?.doc?.value?.id : node?.fields?.doc?.value,
11
- collection,
12
- currentDepth,
13
- data: node?.fields?.doc,
14
- depth,
15
- field,
16
- key: 'value',
17
- overrideAccess,
18
- req,
19
- showHiddenFields
20
- }));
21
- }
3
+ return ({ context, currentDepth, depth, editorPopulationPromises, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
4
+ if (!props.fields?.length) {
5
+ return;
22
6
  }
23
- if (Array.isArray(props.fields)) {
7
+ /**
8
+ * Should populate all fields, including the doc field (for internal links), as it's treated like a normal field
9
+ */ if (Array.isArray(props.fields)) {
24
10
  recurseNestedFields({
25
11
  context,
26
12
  currentDepth,
27
- data: node.fields || {},
13
+ data: node.fields,
28
14
  depth,
29
15
  editorPopulationPromises,
16
+ fieldPromises,
30
17
  fields: props.fields,
31
18
  findMany,
32
19
  flattenLocales,
33
20
  overrideAccess,
34
21
  populationPromises,
35
- promises,
36
22
  req,
37
23
  showHiddenFields,
38
- siblingDoc: node.fields || {}
24
+ siblingDoc: node.fields
39
25
  });
40
26
  }
41
- return promises;
42
27
  };
43
- return linkPopulationPromise;
44
28
  };
45
29
 
46
30
  //# sourceMappingURL=populationPromise.js.map
@@ -1 +1 @@
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 { populate } from '../../../populate/populate.js'\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const linkPopulationPromiseHOC = (\n props: LinkFeatureServerProps,\n): PopulationPromise<SerializedLinkNode> => {\n const linkPopulationPromise: PopulationPromise<SerializedLinkNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) => {\n const promises: Promise<void>[] = []\n\n if (node?.fields?.doc?.value && node?.fields?.doc?.relationTo) {\n const collection = req.payload.collections[node?.fields?.doc?.relationTo]\n\n if (collection) {\n promises.push(\n populate({\n id:\n typeof node?.fields?.doc?.value === 'object'\n ? node?.fields?.doc?.value?.id\n : node?.fields?.doc?.value,\n collection,\n currentDepth,\n data: node?.fields?.doc,\n depth,\n field,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n }\n }\n if (Array.isArray(props.fields)) {\n recurseNestedFields({\n context,\n currentDepth,\n data: node.fields || {},\n depth,\n editorPopulationPromises,\n fields: props.fields,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n promises,\n req,\n showHiddenFields,\n siblingDoc: node.fields || {},\n })\n }\n return promises\n }\n\n return linkPopulationPromise\n}\n"],"names":["populate","recurseNestedFields","linkPopulationPromiseHOC","props","linkPopulationPromise","context","currentDepth","depth","editorPopulationPromises","field","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","promises","fields","doc","value","relationTo","collection","payload","collections","push","id","data","key","Array","isArray"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,QAAQ,QAAQ,gCAA+B;AACxD,SAASC,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,2BAA2B,CACtCC;IAEA,MAAMC,wBAA+D,CAAC,EACpEC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,KAAK,EACLC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACX;QACC,MAAMC,WAA4B,EAAE;QAEpC,IAAIN,MAAMO,QAAQC,KAAKC,SAAST,MAAMO,QAAQC,KAAKE,YAAY;YAC7D,MAAMC,aAAaR,IAAIS,OAAO,CAACC,WAAW,CAACb,MAAMO,QAAQC,KAAKE,WAAW;YAEzE,IAAIC,YAAY;gBACdL,SAASQ,IAAI,CACX1B,SAAS;oBACP2B,IACE,OAAOf,MAAMO,QAAQC,KAAKC,UAAU,WAChCT,MAAMO,QAAQC,KAAKC,OAAOM,KAC1Bf,MAAMO,QAAQC,KAAKC;oBACzBE;oBACAjB;oBACAsB,MAAMhB,MAAMO,QAAQC;oBACpBb;oBACAE;oBACAoB,KAAK;oBACLhB;oBACAE;oBACAC;gBACF;YAEJ;QACF;QACA,IAAIc,MAAMC,OAAO,CAAC5B,MAAMgB,MAAM,GAAG;YAC/BlB,oBAAoB;gBAClBI;gBACAC;gBACAsB,MAAMhB,KAAKO,MAAM,IAAI,CAAC;gBACtBZ;gBACAC;gBACAW,QAAQhB,MAAMgB,MAAM;gBACpBT;gBACAC;gBACAE;gBACAC;gBACAI;gBACAH;gBACAC;gBACAC,YAAYL,KAAKO,MAAM,IAAI,CAAC;YAC9B;QACF;QACA,OAAOD;IACT;IAEA,OAAOd;AACT,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;AAMnE,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,5 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { ListItemNode, ListNode } = lexicalListImport;
1
+ import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { createNode } from '../../typeUtilities.js';
3
3
  import { ListHTMLConverter, ListItemHTMLConverter } from '../htmlConverter.js';
4
4
  import { CheckListFeatureClientComponent } from './feature.client.js';
5
5
  import { CHECK_LIST } from './markdownTransformers.js';
@@ -12,18 +12,18 @@ export const CheckListFeature = (props)=>{
12
12
  CHECK_LIST
13
13
  ],
14
14
  nodes: featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist') ? [] : [
15
- {
15
+ createNode({
16
16
  converters: {
17
17
  html: ListHTMLConverter
18
18
  },
19
19
  node: ListNode
20
- },
21
- {
20
+ }),
21
+ createNode({
22
22
  converters: {
23
23
  html: ListItemHTMLConverter
24
24
  },
25
25
  node: ListItemNode
26
- }
26
+ })
27
27
  ],
28
28
  serverFeatureProps: props
29
29
  };
@@ -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 { 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 {\n converters: {\n html: ListHTMLConverter,\n },\n node: ListNode,\n },\n {\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","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,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;oBACE;wBACEC,YAAY;4BACVC,MAAMb;wBACR;wBACAc,MAAMf;oBACR;oBACA;wBACEa,YAAY;4BACVC,MAAMZ;wBACR;wBACAa,MAAMhB;oBACR;iBACD;gBACPiB,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;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,CA6BvE,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,5 +1,5 @@
1
- import lexicalListImport from '@lexical/list';
2
- const { ListItemNode, ListNode } = lexicalListImport;
1
+ import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { v4 as uuidv4 } from 'uuid';
3
3
  import { convertLexicalNodesToHTML } from '../converters/html/converter/index.js';
4
4
  export const ListHTMLConverter = {
5
5
  converter: async ({ converters, node, parent, payload })=>{
@@ -12,7 +12,7 @@ export const ListHTMLConverter = {
12
12
  },
13
13
  payload
14
14
  });
15
- return `<${node?.tag} class="${node?.listType}">${childrenText}</${node?.tag}>`;
15
+ return `<${node?.tag} class="list-${node?.listType}">${childrenText}</${node?.tag}>`;
16
16
  },
17
17
  nodeTypes: [
18
18
  ListNode.getType()
@@ -20,6 +20,7 @@ export const ListHTMLConverter = {
20
20
  };
21
21
  export const ListItemHTMLConverter = {
22
22
  converter: async ({ converters, node, parent, payload })=>{
23
+ const hasSubLists = node.children.some((child)=>child.type === 'list');
23
24
  const childrenText = await convertLexicalNodesToHTML({
24
25
  converters,
25
26
  lexicalNodes: node.children,
@@ -30,15 +31,21 @@ export const ListItemHTMLConverter = {
30
31
  payload
31
32
  });
32
33
  if ('listType' in parent && parent?.listType === 'check') {
33
- return `<li aria-checked=${node.checked ? 'true' : 'false'} class="${'list-item-checkbox' + node.checked ? 'list-item-checkbox-checked' : 'list-item-checkbox-unchecked'}"
34
+ const uuid = uuidv4();
35
+ return `<li aria-checked=${node.checked ? 'true' : 'false'} class="${'list-item-checkbox' + (node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked') + (hasSubLists ? ' nestedListItem' : '')}"
34
36
  role="checkbox"
35
37
  tabIndex=${-1}
36
38
  value=${node?.value}
37
39
  >
38
- ${childrenText}
40
+ ${hasSubLists ? childrenText : `
41
+ <input type="checkbox" id="${uuid}"${node.checked ? ' checked' : ''}>
42
+ <label for="${uuid}">${childrenText}</label><br>
43
+ `}
44
+
45
+
39
46
  </li>`;
40
47
  } else {
41
- return `<li value=${node?.value}>${childrenText}</li>`;
48
+ return `<li ${hasSubLists ? `class="nestedListItem" ` : ''}value=${node?.value}>${childrenText}</li>`;
42
49
  }
43
50
  },
44
51
  nodeTypes: [
@@ -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'\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=\"${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 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 return `<li aria-checked=${node.checked ? 'true' : 'false'} class=\"${\n 'list-item-checkbox' + node.checked\n ? 'list-item-checkbox-checked'\n : 'list-item-checkbox-unchecked'\n }\"\n role=\"checkbox\"\n tabIndex=${-1}\n value=${node?.value}\n >\n ${childrenText}\n </li>`\n } else {\n return `<li value=${node?.value}>${childrenText}</li>`\n }\n },\n nodeTypes: [ListItemNode.getType()],\n}\n"],"names":["lexicalListImport","ListItemNode","ListNode","convertLexicalNodesToHTML","ListHTMLConverter","converter","converters","node","parent","payload","childrenText","lexicalNodes","children","tag","listType","nodeTypes","getType","ListItemHTMLConverter","checked","value"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAOA,uBAAuB,gBAAe;AAC7C,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAE,GAAGF;AAInC,SAASG,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,QAAQ,EAAEN,MAAMO,SAAS,EAAE,EAAEJ,aAAa,EAAE,EAAEH,MAAMM,IAAI,CAAC,CAAC;IACjF;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,MAAMC,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,OAAO,CAAC,iBAAiB,EAAEP,KAAKW,OAAO,GAAG,SAAS,QAAQ,QAAQ,EACjE,uBAAuBX,KAAKW,OAAO,GAC/B,+BACA,+BACL;;mBAEY,EAAE,CAAC,EAAE;gBACR,EAAEX,MAAMY,MAAM;;UAEpB,EAAET,aAAa;eACV,CAAC;QACZ,OAAO;YACL,OAAO,CAAC,UAAU,EAAEH,MAAMY,MAAM,CAAC,EAAET,aAAa,KAAK,CAAC;QACxD;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"}