@payloadcms/richtext-lexical 3.0.0-beta.3 → 3.0.0-beta.30

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 (645) 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/exports/components.d.ts +8 -2
  6. package/dist/exports/components.d.ts.map +1 -1
  7. package/dist/exports/components.js +8 -2
  8. package/dist/exports/components.js.map +1 -1
  9. package/dist/field/Field.d.ts +0 -2
  10. package/dist/field/Field.d.ts.map +1 -1
  11. package/dist/field/Field.js.map +1 -1
  12. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  13. package/dist/field/features/align/feature.client.js +127 -54
  14. package/dist/field/features/align/feature.client.js.map +1 -1
  15. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  16. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  17. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  18. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  19. package/dist/field/features/blockquote/feature.client.d.ts +1 -1
  20. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  21. package/dist/field/features/blockquote/feature.client.js +53 -40
  22. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  23. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  24. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  25. package/dist/field/features/blockquote/feature.server.js +7 -7
  26. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  27. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  28. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  29. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  30. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  31. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  32. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  33. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  34. package/dist/field/features/blocks/component/index.js +37 -4
  35. package/dist/field/features/blocks/component/index.js.map +1 -1
  36. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  37. package/dist/field/features/blocks/drawer/index.js +2 -4
  38. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  39. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  40. package/dist/field/features/blocks/feature.client.js +56 -27
  41. package/dist/field/features/blocks/feature.client.js.map +1 -1
  42. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  43. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  44. package/dist/field/features/blocks/feature.server.js +109 -77
  45. package/dist/field/features/blocks/feature.server.js.map +1 -1
  46. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  47. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  49. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  50. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  51. package/dist/field/features/blocks/plugin/commands.js +1 -2
  52. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  53. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  54. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  55. package/dist/field/features/blocks/plugin/index.js +5 -8
  56. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  57. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  58. package/dist/field/features/blocks/populationPromise.js +4 -18
  59. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  60. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  61. package/dist/field/features/blocks/validate.js +22 -36
  62. package/dist/field/features/blocks/validate.js.map +1 -1
  63. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  64. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  65. package/dist/field/features/converters/html/field/index.js +6 -3
  66. package/dist/field/features/converters/html/field/index.js.map +1 -1
  67. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts.map +1 -1
  68. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  69. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  70. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  71. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  72. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  73. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  74. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +2 -4
  75. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  76. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts.map +1 -1
  77. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  78. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  79. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  80. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  81. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  82. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  83. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +4 -6
  84. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  85. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  86. package/dist/field/features/format/bold/feature.client.js +26 -23
  87. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  88. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  89. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  90. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  91. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  92. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  93. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  94. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  95. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  96. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  97. package/dist/field/features/format/italic/feature.client.js +27 -24
  98. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  99. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  100. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  101. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  102. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  103. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  104. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  105. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  106. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  107. package/dist/field/features/format/subscript/feature.client.js +25 -22
  108. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  109. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  110. package/dist/field/features/format/superscript/feature.client.js +25 -22
  111. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  112. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  113. package/dist/field/features/format/underline/feature.client.js +25 -22
  114. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  115. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  116. package/dist/field/features/heading/feature.client.js +71 -54
  117. package/dist/field/features/heading/feature.client.js.map +1 -1
  118. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  119. package/dist/field/features/heading/feature.server.js +5 -5
  120. package/dist/field/features/heading/feature.server.js.map +1 -1
  121. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  122. package/dist/field/features/heading/markdownTransformer.js +1 -2
  123. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  124. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  125. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  126. package/dist/field/features/horizontalRule/component/index.js +62 -0
  127. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  128. package/dist/field/features/horizontalRule/feature.client.d.ts +3 -0
  129. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  130. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  131. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  132. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  133. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  134. package/dist/field/features/horizontalRule/feature.server.js +37 -0
  135. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  136. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  137. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  138. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  139. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  140. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  141. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  142. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +88 -0
  143. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  144. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  145. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  146. package/dist/field/features/horizontalRule/plugin/index.js +31 -0
  147. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  148. package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
  149. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  150. package/dist/field/features/indent/feature.client.js +43 -42
  151. package/dist/field/features/indent/feature.client.js.map +1 -1
  152. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  153. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  154. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  155. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  156. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  157. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  158. package/dist/field/features/link/drawer/baseFields.js +30 -43
  159. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  160. package/dist/field/features/link/drawer/index.js +3 -2
  161. package/dist/field/features/link/drawer/index.js.map +1 -1
  162. package/dist/field/features/link/drawer/types.d.ts +4 -2
  163. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  164. package/dist/field/features/link/drawer/types.js.map +1 -1
  165. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  166. package/dist/field/features/link/feature.client.js +59 -47
  167. package/dist/field/features/link/feature.client.js.map +1 -1
  168. package/dist/field/features/link/feature.server.d.ts +10 -5
  169. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  170. package/dist/field/features/link/feature.server.js +48 -9
  171. package/dist/field/features/link/feature.server.js.map +1 -1
  172. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  173. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  174. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  175. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  176. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  177. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  178. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  179. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  180. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  181. package/dist/field/features/link/plugins/autoLink/index.js +5 -8
  182. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  183. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  184. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  185. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  186. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  187. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  188. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  189. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  190. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  191. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +93 -69
  192. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  193. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  194. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  195. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  196. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  197. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  198. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  199. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  200. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  201. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  202. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  203. package/dist/field/features/link/plugins/link/index.js +5 -14
  204. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  205. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  206. package/dist/field/features/link/populationPromise.js +10 -25
  207. package/dist/field/features/link/populationPromise.js.map +1 -1
  208. package/dist/field/features/link/validate.d.ts +5 -0
  209. package/dist/field/features/link/validate.d.ts.map +1 -0
  210. package/dist/field/features/link/validate.js +32 -0
  211. package/dist/field/features/link/validate.js.map +1 -0
  212. package/dist/field/features/lists/checklist/feature.client.d.ts +1 -1
  213. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  214. package/dist/field/features/lists/checklist/feature.client.js +56 -32
  215. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  216. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  217. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  218. package/dist/field/features/lists/checklist/feature.server.js +10 -10
  219. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  220. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  221. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  222. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  223. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  224. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  225. package/dist/field/features/lists/checklist/plugin/index.js +3 -4
  226. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  227. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  228. package/dist/field/features/lists/htmlConverter.js +13 -6
  229. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  230. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  231. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  232. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  233. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  234. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +7 -7
  235. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  236. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  237. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  238. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  239. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  240. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  241. package/dist/field/features/lists/plugin/index.js +3 -4
  242. package/dist/field/features/lists/plugin/index.js.map +1 -1
  243. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  244. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  245. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  246. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  247. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  248. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  249. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  250. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +7 -7
  251. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  252. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  253. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  254. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  255. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  256. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  257. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  258. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  259. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  260. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  261. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  262. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  263. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  264. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  265. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  266. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  267. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  268. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  269. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  270. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  271. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  272. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  273. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  274. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  275. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  276. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  277. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  278. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  279. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  280. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  281. package/dist/field/features/paragraph/feature.client.js +45 -33
  282. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  283. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  284. package/dist/field/features/relationship/drawer/commands.js +1 -2
  285. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  286. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  287. package/dist/field/features/relationship/drawer/index.js +7 -13
  288. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  289. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  290. package/dist/field/features/relationship/feature.client.js +37 -15
  291. package/dist/field/features/relationship/feature.client.js.map +1 -1
  292. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  293. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  294. package/dist/field/features/relationship/feature.server.js +5 -4
  295. package/dist/field/features/relationship/feature.server.js.map +1 -1
  296. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  297. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  298. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  299. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  300. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  301. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +56 -7
  302. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  303. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  304. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  305. package/dist/field/features/relationship/plugins/index.js +9 -12
  306. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  307. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  308. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  309. package/dist/field/features/relationship/populationPromise.js +25 -19
  310. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  311. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  312. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  313. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  314. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  315. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  316. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  317. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  318. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  319. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  320. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  321. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  322. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  323. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
  324. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  325. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  326. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  327. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +81 -0
  328. package/dist/field/features/toolbars/fixed/feature.client.d.ts +3 -0
  329. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  330. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  331. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  332. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  333. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  334. package/dist/field/features/toolbars/fixed/feature.server.js +16 -0
  335. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  336. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  337. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  338. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +112 -70
  339. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  340. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  341. package/dist/field/features/toolbars/inline/feature.client.d.ts +3 -0
  342. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  343. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  344. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  345. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  346. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  347. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  348. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  349. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  350. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  351. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +29 -19
  352. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  353. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  354. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  355. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  356. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +27 -72
  357. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  358. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  359. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  360. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  361. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  362. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  363. package/dist/field/features/toolbars/types.d.ts +48 -0
  364. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  365. package/dist/field/features/toolbars/types.js.map +1 -0
  366. package/dist/field/features/typeUtilities.d.ts +8 -0
  367. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  368. package/dist/field/features/typeUtilities.js +8 -0
  369. package/dist/field/features/typeUtilities.js.map +1 -0
  370. package/dist/field/features/types.d.ts +128 -57
  371. package/dist/field/features/types.d.ts.map +1 -1
  372. package/dist/field/features/types.js.map +1 -1
  373. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  374. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  375. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  376. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  377. package/dist/field/features/upload/component/index.js +59 -9
  378. package/dist/field/features/upload/component/index.js.map +1 -1
  379. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  380. package/dist/field/features/upload/drawer/commands.js +1 -2
  381. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  382. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  383. package/dist/field/features/upload/drawer/index.js +8 -12
  384. package/dist/field/features/upload/drawer/index.js.map +1 -1
  385. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  386. package/dist/field/features/upload/feature.client.js +35 -10
  387. package/dist/field/features/upload/feature.client.js.map +1 -1
  388. package/dist/field/features/upload/feature.server.d.ts +10 -3
  389. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  390. package/dist/field/features/upload/feature.server.js +39 -11
  391. package/dist/field/features/upload/feature.server.js.map +1 -1
  392. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  393. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  394. package/dist/field/features/upload/nodes/UploadNode.js +24 -11
  395. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  396. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  397. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  398. package/dist/field/features/upload/plugin/index.js +6 -11
  399. package/dist/field/features/upload/plugin/index.js.map +1 -1
  400. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  401. package/dist/field/features/upload/populationPromise.js +15 -9
  402. package/dist/field/features/upload/populationPromise.js.map +1 -1
  403. package/dist/field/features/upload/validate.d.ts +2 -1
  404. package/dist/field/features/upload/validate.d.ts.map +1 -1
  405. package/dist/field/features/upload/validate.js +37 -12
  406. package/dist/field/features/upload/validate.js.map +1 -1
  407. package/dist/field/index.d.ts +1 -1
  408. package/dist/field/index.d.ts.map +1 -1
  409. package/dist/field/index.js.map +1 -1
  410. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  411. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  412. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  413. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  414. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  415. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  416. package/dist/field/lexical/EditorPlugin.js +6 -3
  417. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  418. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  419. package/dist/field/lexical/LexicalEditor.js +31 -15
  420. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  421. package/dist/field/lexical/LexicalEditor.scss +3 -19
  422. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  423. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  424. package/dist/field/lexical/LexicalProvider.js +4 -4
  425. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  426. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  427. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  428. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  429. package/dist/field/lexical/config/client/default.d.ts +1 -1
  430. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  431. package/dist/field/lexical/config/client/default.js.map +1 -1
  432. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  433. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  434. package/dist/field/lexical/config/client/sanitize.js +81 -32
  435. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  436. package/dist/field/lexical/config/server/default.d.ts +2 -3
  437. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  438. package/dist/field/lexical/config/server/default.js +12 -10
  439. package/dist/field/lexical/config/server/default.js.map +1 -1
  440. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  441. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  442. package/dist/field/lexical/config/server/loader.js +4 -2
  443. package/dist/field/lexical/config/server/loader.js.map +1 -1
  444. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  445. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  446. package/dist/field/lexical/config/server/sanitize.js +23 -8
  447. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  448. package/dist/field/lexical/config/types.d.ts +1 -1
  449. package/dist/field/lexical/config/types.d.ts.map +1 -1
  450. package/dist/field/lexical/config/types.js.map +1 -1
  451. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  452. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  453. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  454. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  455. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  456. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  457. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  458. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  459. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  460. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +6 -9
  461. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  462. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +17 -25
  463. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  464. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  465. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  466. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  467. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  468. package/dist/field/lexical/plugins/SlashMenu/index.js +72 -67
  469. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  470. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  471. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
  472. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  473. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  474. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  475. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +3 -4
  476. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  477. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  478. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -10
  479. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  480. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  481. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  482. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  483. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  484. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  485. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  486. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  487. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  488. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  489. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  490. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  491. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  492. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  493. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  494. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  495. package/dist/field/lexical/theme/EditorTheme.scss +13 -14
  496. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  497. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  498. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  499. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  500. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  501. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  502. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  503. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  504. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  505. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  506. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  507. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  508. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  509. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  510. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  511. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  512. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  513. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  514. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  515. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  516. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  517. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  518. package/dist/field/lexical/utils/url.js +3 -0
  519. package/dist/field/lexical/utils/url.js.map +1 -1
  520. package/dist/forEachNodeRecursively.d.ts +10 -0
  521. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  522. package/dist/forEachNodeRecursively.js +24 -0
  523. package/dist/forEachNodeRecursively.js.map +1 -0
  524. package/dist/generateComponentMap.d.ts.map +1 -1
  525. package/dist/generateComponentMap.js +16 -22
  526. package/dist/generateComponentMap.js.map +1 -1
  527. package/dist/generateSchemaMap.d.ts.map +1 -1
  528. package/dist/generateSchemaMap.js +4 -12
  529. package/dist/generateSchemaMap.js.map +1 -1
  530. package/dist/index.d.ts +24 -20
  531. package/dist/index.d.ts.map +1 -1
  532. package/dist/index.js +275 -184
  533. package/dist/index.js.map +1 -1
  534. package/dist/populate/defaultValue.d.ts.map +1 -1
  535. package/dist/populate/defaultValue.js +1 -0
  536. package/dist/populate/defaultValue.js.map +1 -1
  537. package/dist/populate/populate.d.ts +5 -4
  538. package/dist/populate/populate.d.ts.map +1 -1
  539. package/dist/populate/populate.js +13 -11
  540. package/dist/populate/populate.js.map +1 -1
  541. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  542. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  543. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  544. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  545. package/dist/populate/recurseNestedFields.d.ts +8 -4
  546. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  547. package/dist/populate/recurseNestedFields.js +4 -5
  548. package/dist/populate/recurseNestedFields.js.map +1 -1
  549. package/dist/scss/app.scss +2 -3
  550. package/dist/scss/vars.scss +0 -7
  551. package/dist/types.d.ts +12 -5
  552. package/dist/types.d.ts.map +1 -1
  553. package/dist/types.js.map +1 -1
  554. package/dist/validate/index.d.ts +1 -1
  555. package/dist/validate/index.d.ts.map +1 -1
  556. package/package.json +48 -47
  557. package/components.d.ts +0 -6
  558. package/components.js +0 -7
  559. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  560. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  561. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  562. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  563. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  564. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  565. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  566. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  567. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  568. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  569. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  570. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  571. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  572. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  573. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  574. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  575. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  576. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  577. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  578. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  579. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  580. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  581. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  582. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  583. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  584. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  585. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  586. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  587. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  588. package/dist/field/features/indent/index.scss +0 -4
  589. package/dist/field/features/lists/common/markdown.js.map +0 -1
  590. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  591. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  592. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  593. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  594. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  595. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  596. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  597. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  598. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  599. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  600. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  601. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  602. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  603. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  604. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  605. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  606. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  607. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  608. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  609. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  610. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  611. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  612. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  613. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  614. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  615. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  616. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  617. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  618. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  619. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  620. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  621. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  622. package/dist/populate/richTextRelationshipPromise.js +0 -68
  623. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  624. package/dist/scss/fonts.scss +0 -75
  625. package/src/index.ts +0 -423
  626. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +0 -0
  627. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  628. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  629. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  630. /package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +0 -0
  631. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  632. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  633. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  634. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +0 -0
  635. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  636. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  637. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  638. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +0 -0
  639. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  640. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  641. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  642. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +0 -0
  643. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  644. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  645. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -7,11 +7,11 @@ html[data-theme='light'] {
7
7
  }
8
8
 
9
9
  .link-editor {
10
- z-index: 10;
10
+ z-index: 1;
11
11
  display: flex;
12
12
  align-items: center;
13
13
  background: var(--color-base-0);
14
- padding: 0px 3.72px 0px 6.25px;
14
+ padding: 0 3.72px 0 6.25px;
15
15
  vertical-align: middle;
16
16
  position: absolute;
17
17
  top: 0;
@@ -36,12 +36,20 @@ html[data-theme='light'] {
36
36
  position: relative;
37
37
  font-family: var(--font-body);
38
38
 
39
+ &__label-pure {
40
+ color: var(--color-base-1000);
41
+ margin-right: 15px;
42
+ display: block;
43
+ white-space: nowrap;
44
+ overflow: hidden;
45
+ }
46
+
39
47
  a {
40
48
  text-decoration: none;
41
49
  display: block;
42
50
  white-space: nowrap;
43
51
  overflow: hidden;
44
- margin-right: 30px;
52
+ margin-right: 15px;
45
53
  text-overflow: ellipsis;
46
54
  color: var(--color-blue-600);
47
55
  border-bottom: 1px dotted;
@@ -1,4 +1,3 @@
1
- import type { I18n } from '@payloadcms/translations';
2
1
  import type { SanitizedConfig } from 'payload/config';
3
2
  import type { Field } from 'payload/types';
4
3
  /**
@@ -7,6 +6,5 @@ import type { Field } from 'payload/types';
7
6
  export declare function transformExtraFields(customFieldSchema: ((args: {
8
7
  config: SanitizedConfig;
9
8
  defaultFields: Field[];
10
- i18n: I18n;
11
- }) => Field[]) | Field[], config: SanitizedConfig, i18n: I18n, enabledCollections?: false | string[], disabledCollections?: false | string[]): Field[];
9
+ }) => Field[]) | Field[], config: SanitizedConfig, enabledCollections?: false | string[], disabledCollections?: false | string[], maxDepth?: number): Field[];
12
10
  //# sourceMappingURL=utilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/link/plugins/floatingLinkEditor/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAc,MAAM,eAAe,CAAA;AAItD;;GAEG;AAEH,wBAAgB,oBAAoB,CAClC,iBAAiB,EACb,CAAC,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,aAAa,EAAE,KAAK,EAAE,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,KAAK,KAAK,EAAE,CAAC,GACpF,KAAK,EAAE,EACX,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,IAAI,EACV,kBAAkB,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,EACrC,mBAAmB,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,GACrC,KAAK,EAAE,CA0CT"}
1
+ {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/link/plugins/floatingLinkEditor/utilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAI1C;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,EACb,CAAC,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,aAAa,EAAE,KAAK,EAAE,CAAA;CAAE,KAAK,KAAK,EAAE,CAAC,GACxE,KAAK,EAAE,EACX,MAAM,EAAE,eAAe,EACvB,kBAAkB,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,EACrC,mBAAmB,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,EACtC,QAAQ,CAAC,EAAE,MAAM,GAChB,KAAK,EAAE,CAmBT"}
@@ -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) {
6
- 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);
4
+ */ export function transformExtraFields(customFieldSchema, config, enabledCollections, disabledCollections, maxDepth) {
5
+ const baseFields = getBaseFields(config, enabledCollections, disabledCollections, maxDepth);
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 { Field } 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: { config: SanitizedConfig; defaultFields: Field[] }) => Field[])\n | Field[],\n config: SanitizedConfig,\n enabledCollections?: false | string[],\n disabledCollections?: false | string[],\n maxDepth?: number,\n): Field[] {\n const baseFields: Field[] = getBaseFields(\n config,\n enabledCollections,\n disabledCollections,\n maxDepth,\n )\n\n let fields: Field[]\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","maxDepth","baseFields","fields","defaultFields","Array","isArray"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,aAAa,QAAQ,6BAA4B;AAE1D;;CAEC,GACD,OAAO,SAASC,qBACdC,iBAEW,EACXC,MAAuB,EACvBC,kBAAqC,EACrCC,mBAAsC,EACtCC,QAAiB;IAEjB,MAAMC,aAAsBP,cAC1BG,QACAC,oBACAC,qBACAC;IAGF,IAAIE;IAEJ,IAAI,OAAON,sBAAsB,YAAY;QAC3CM,SAASN,kBAAkB;YAAEC;YAAQM,eAAeF;QAAW;IACjE,OAAO,IAAIG,MAAMC,OAAO,CAACT,oBAAoB;QAC3CM,SAASN;IACX,OAAO;QACLM,SAASD;IACX;IAEA,OAAOC;AACT"}
@@ -1,2 +1,4 @@
1
- export declare function LinkPlugin(): null;
1
+ import type { PluginComponent } from '../../../types.js';
2
+ import type { ClientProps } from '../../feature.client.js';
3
+ export declare const LinkPlugin: PluginComponent<ClientProps>;
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -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":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,eAAO,MAAM,UAAU,EAAE,eAAe,CAAC,WAAW,CA2DnD,CAAA"}
@@ -1,14 +1,11 @@
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';
11
- export function LinkPlugin() {
8
+ export const LinkPlugin = ()=>{
12
9
  const [editor] = useLexicalComposerContext();
13
10
  useEffect(()=>{
14
11
  if (!editor.hasNodes([
@@ -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)=>{
@@ -57,6 +48,6 @@ export function LinkPlugin() {
57
48
  editor
58
49
  ]);
59
50
  return null;
60
- }
51
+ };
61
52
 
62
53
  //# sourceMappingURL=index.js.map
@@ -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 { PluginComponent } from '../../../types.js'\nimport type { ClientProps } from '../../feature.client.js'\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 const LinkPlugin: PluginComponent<ClientProps> = () => {\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;AAOjC,SAASC,WAAW,QAAQ,mCAAkC;AAC9D,SAASC,QAAQ,EAAEC,mBAAmB,EAAEC,UAAU,QAAQ,0BAAyB;AAEnF,OAAO,MAAMC,aAA2C;IACtD,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,EAAC"}
@@ -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,CA2CtC,CAAA"}
@@ -1,46 +1,31 @@
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, draft, 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,
15
+ draft,
29
16
  editorPopulationPromises,
17
+ fieldPromises,
30
18
  fields: props.fields,
31
19
  findMany,
32
20
  flattenLocales,
33
21
  overrideAccess,
34
22
  populationPromises,
35
- promises,
36
23
  req,
37
24
  showHiddenFields,
38
- siblingDoc: node.fields || {}
25
+ siblingDoc: node.fields
39
26
  });
40
27
  }
41
- return promises;
42
28
  };
43
- return linkPopulationPromise;
44
29
  };
45
30
 
46
31
  //# 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 draft,\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 draft,\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","draft","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,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAI,CAACb,MAAMc,MAAM,EAAEC,QAAQ;YACzB;QACF;QAEA;;KAEC,GACD,IAAIC,MAAMC,OAAO,CAACjB,MAAMc,MAAM,GAAG;YAC/BhB,oBAAoB;gBAClBG;gBACAC;gBACAgB,MAAMT,KAAKK,MAAM;gBACjBX;gBACAC;gBACAC;gBACAC;gBACAQ,QAAQd,MAAMc,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 { Field } 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 Field[], // 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,3 +1,3 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const CheckListFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const ChecklistFeatureClientComponent: import("react").FC<undefined>;
3
3
  //# sourceMappingURL=feature.client.d.ts.map
@@ -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":";AA6GA,eAAO,MAAM,+BAA+B,+BAAgD,CAAA"}
@@ -1,14 +1,47 @@
1
1
  'use client';
2
- import lexicalListImport from '@lexical/list';
3
- const { INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } = lexicalListImport;
4
- import { SlashMenuOption } from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
2
+ import { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
3
+ import { $isRangeSelection } from 'lexical';
5
4
  import { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js';
6
- import { TextDropdownSectionWithEntries } from '../../common/floatingSelectToolbarTextDropdownSection/index.js';
7
5
  import { createClientComponent } from '../../createClientComponent.js';
6
+ import { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js';
8
7
  import { LexicalListPlugin } from '../plugin/index.js';
9
8
  import { CHECK_LIST } from './markdownTransformers.js';
10
9
  import { LexicalCheckListPlugin } from './plugin/index.js';
11
- const CheckListFeatureClient = (props)=>{
10
+ const toolbarGroups = [
11
+ toolbarTextDropdownGroupWithItems([
12
+ {
13
+ ChildComponent: ChecklistIcon,
14
+ isActive: ({ selection })=>{
15
+ if (!$isRangeSelection(selection)) {
16
+ return false;
17
+ }
18
+ for (const node of selection.getNodes()){
19
+ if ($isListNode(node) && node.getListType() === 'check') {
20
+ continue;
21
+ }
22
+ const parent = node.getParent();
23
+ if ($isListNode(parent) && parent.getListType() === 'check') {
24
+ continue;
25
+ }
26
+ const parentParent = parent?.getParent();
27
+ // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode
28
+ if ($isListNode(parentParent) && parentParent.getListType() === 'check') {
29
+ continue;
30
+ }
31
+ return false;
32
+ }
33
+ return true;
34
+ },
35
+ key: 'checklist',
36
+ label: `Check List`,
37
+ onSelect: ({ editor })=>{
38
+ editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
39
+ },
40
+ order: 12
41
+ }
42
+ ])
43
+ ];
44
+ const ChecklistFeatureClient = (props)=>{
12
45
  return {
13
46
  clientFeatureProps: props,
14
47
  feature: ({ featureProviderMap })=>{
@@ -18,7 +51,7 @@ const CheckListFeatureClient = (props)=>{
18
51
  position: 'normal'
19
52
  }
20
53
  ];
21
- if (!featureProviderMap.has('unorderedlist') && !featureProviderMap.has('orderedlist')) {
54
+ if (!featureProviderMap.has('unorderedList') && !featureProviderMap.has('orderedList')) {
22
55
  plugins.push({
23
56
  Component: LexicalListPlugin,
24
57
  position: 'normal'
@@ -26,57 +59,48 @@ const CheckListFeatureClient = (props)=>{
26
59
  }
27
60
  return {
28
61
  clientFeatureProps: props,
29
- floatingSelectToolbar: {
30
- sections: [
31
- TextDropdownSectionWithEntries([
32
- {
33
- ChildComponent: ChecklistIcon,
34
- isActive: ()=>false,
35
- key: 'checkList',
36
- label: `Check List`,
37
- onClick: ({ editor })=>{
38
- editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
39
- },
40
- order: 12
41
- }
42
- ])
43
- ]
44
- },
45
62
  markdownTransformers: [
46
63
  CHECK_LIST
47
64
  ],
48
- nodes: featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist') ? [] : [
65
+ nodes: featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList') ? [] : [
49
66
  ListNode,
50
67
  ListItemNode
51
68
  ],
52
69
  plugins,
53
70
  slashMenu: {
54
- options: [
71
+ groups: [
55
72
  {
56
- displayName: 'Lists',
57
- key: 'lists',
58
- options: [
59
- new SlashMenuOption('checklist', {
73
+ items: [
74
+ {
60
75
  Icon: ChecklistIcon,
61
- displayName: 'Check List',
76
+ key: 'checklist',
62
77
  keywords: [
63
78
  'check list',
64
79
  'check',
65
80
  'checklist',
66
81
  'cl'
67
82
  ],
83
+ label: 'Check List',
68
84
  onSelect: ({ editor })=>{
69
85
  editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined);
70
86
  }
71
- })
72
- ]
87
+ }
88
+ ],
89
+ key: 'lists',
90
+ label: 'Lists'
73
91
  }
74
92
  ]
93
+ },
94
+ toolbarFixed: {
95
+ groups: toolbarGroups
96
+ },
97
+ toolbarInline: {
98
+ groups: toolbarGroups
75
99
  }
76
100
  };
77
101
  }
78
102
  };
79
103
  };
80
- export const CheckListFeatureClientComponent = createClientComponent(CheckListFeatureClient);
104
+ export const ChecklistFeatureClientComponent = createClientComponent(ChecklistFeatureClient);
81
105
 
82
106
  //# sourceMappingURL=feature.client.js.map
@@ -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 { $isListNode, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { ClientFeature, FeatureProviderProviderClient } from '../../types.js'\n\nimport { ChecklistIcon } from '../../../lexical/ui/icons/Checklist/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../plugin/index.js'\nimport { CHECK_LIST } from './markdownTransformers.js'\nimport { LexicalCheckListPlugin } from './plugin/index.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: ChecklistIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'check') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'check') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'check') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'checklist',\n label: `Check List`,\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n order: 12,\n },\n ]),\n]\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 markdownTransformers: [CHECK_LIST],\n nodes:\n featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList')\n ? []\n : [ListNode, ListItemNode],\n plugins,\n slashMenu: {\n groups: [\n {\n items: [\n {\n Icon: ChecklistIcon,\n key: 'checklist',\n keywords: ['check list', 'check', 'checklist', 'cl'],\n label: 'Check List',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_CHECK_LIST_COMMAND, undefined)\n },\n },\n ],\n key: 'lists',\n label: 'Lists',\n },\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const ChecklistFeatureClientComponent = createClientComponent(ChecklistFeatureClient)\n"],"names":["$isListNode","INSERT_CHECK_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","ChecklistIcon","createClientComponent","toolbarTextDropdownGroupWithItems","LexicalListPlugin","CHECK_LIST","LexicalCheckListPlugin","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","onSelect","editor","dispatchCommand","undefined","order","ChecklistFeatureClient","props","clientFeatureProps","feature","featureProviderMap","plugins","Component","position","has","push","markdownTransformers","nodes","slashMenu","groups","items","Icon","keywords","toolbarFixed","toolbarInline","ChecklistFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,yBAAyB,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,gBAAe;AAC9F,SAASC,iBAAiB,QAAQ,UAAS;AAK3C,SAASC,aAAa,QAAQ,+CAA8C;AAC5E,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,iCAAiC,QAAQ,4CAA2C;AAC7F,SAASC,iBAAiB,QAAQ,qBAAoB;AACtD,SAASC,UAAU,QAAQ,4BAA2B;AACtD,SAASC,sBAAsB,QAAQ,oBAAmB;AAE1D,MAAMC,gBAAgC;IACpCJ,kCAAkC;QAChC;YACEK,gBAAgBP;YAChBQ,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACV,kBAAkBU,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAIhB,YAAYe,SAASA,KAAKE,WAAW,OAAO,SAAS;wBACvD;oBACF;oBAEA,MAAMC,SAASH,KAAKI,SAAS;oBAE7B,IAAInB,YAAYkB,WAAWA,OAAOD,WAAW,OAAO,SAAS;wBAC3D;oBACF;oBAEA,MAAMG,eAAeF,QAAQC;oBAC7B,oFAAoF;oBACpF,IAAInB,YAAYoB,iBAAiBA,aAAaH,WAAW,OAAO,SAAS;wBACvE;oBACF;oBAEA,OAAO;gBACT;gBACA,OAAO;YACT;YACAI,KAAK;YACLC,OAAO,CAAC,UAAU,CAAC;YACnBC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACxB,2BAA2ByB;YACpD;YACAC,OAAO;QACT;KACD;CACF;AAED,MAAMC,yBAAmE,CAACC;IACxE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,MAAMC,UAA+C;gBACnD;oBACEC,WAAWxB;oBACXyB,UAAU;gBACZ;aACD;YAED,IAAI,CAACH,mBAAmBI,GAAG,CAAC,oBAAoB,CAACJ,mBAAmBI,GAAG,CAAC,gBAAgB;gBACtFH,QAAQI,IAAI,CAAC;oBACXH,WAAW1B;oBACX2B,UAAU;gBACZ;YACF;YAEA,OAAO;gBACLL,oBAAoBD;gBACpBS,sBAAsB;oBAAC7B;iBAAW;gBAClC8B,OACEP,mBAAmBI,GAAG,CAAC,oBAAoBJ,mBAAmBI,GAAG,CAAC,iBAC9D,EAAE,GACF;oBAACjC;oBAAUD;iBAAa;gBAC9B+B;gBACAO,WAAW;oBACTC,QAAQ;wBACN;4BACEC,OAAO;gCACL;oCACEC,MAAMtC;oCACNgB,KAAK;oCACLuB,UAAU;wCAAC;wCAAc;wCAAS;wCAAa;qCAAK;oCACpDtB,OAAO;oCACPC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACxB,2BAA2ByB;oCACpD;gCACF;6BACD;4BACDL,KAAK;4BACLC,OAAO;wBACT;qBACD;gBACH;gBACAuB,cAAc;oBACZJ,QAAQ9B;gBACV;gBACAmC,eAAe;oBACbL,QAAQ9B;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMoC,kCAAkCzC,sBAAsBsB,wBAAuB"}
@@ -1,3 +1,3 @@
1
1
  import type { FeatureProviderProviderServer } from '../../types.js';
2
- export declare const CheckListFeature: FeatureProviderProviderServer<undefined, undefined>;
2
+ export declare const ChecklistFeature: FeatureProviderProviderServer<undefined, undefined>;
3
3
  //# sourceMappingURL=feature.server.d.ts.map
@@ -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,29 +1,29 @@
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
- import { CheckListFeatureClientComponent } from './feature.client.js';
4
+ import { ChecklistFeatureClientComponent } from './feature.client.js';
5
5
  import { CHECK_LIST } from './markdownTransformers.js';
6
- export const CheckListFeature = (props)=>{
6
+ export const ChecklistFeature = (props)=>{
7
7
  return {
8
8
  feature: ({ featureProviderMap })=>{
9
9
  return {
10
- ClientComponent: CheckListFeatureClientComponent,
10
+ ClientComponent: ChecklistFeatureClientComponent,
11
11
  markdownTransformers: [
12
12
  CHECK_LIST
13
13
  ],
14
- nodes: featureProviderMap.has('unorderedlist') || featureProviderMap.has('orderedlist') ? [] : [
15
- {
14
+ nodes: featureProviderMap.has('unorderedList') || featureProviderMap.has('orderedList') ? [] : [
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"}