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

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 (666) 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 +4 -1
  13. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  14. package/dist/field/features/align/feature.client.js +127 -54
  15. package/dist/field/features/align/feature.client.js.map +1 -1
  16. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  17. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  18. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  19. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  20. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  21. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  22. package/dist/field/features/blockquote/feature.client.js +53 -40
  23. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  24. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  25. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  26. package/dist/field/features/blockquote/feature.server.js +7 -7
  27. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  28. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  29. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  30. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  31. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  32. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  33. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  34. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  35. package/dist/field/features/blocks/component/index.js +37 -4
  36. package/dist/field/features/blocks/component/index.js.map +1 -1
  37. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  38. package/dist/field/features/blocks/drawer/index.js +2 -4
  39. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  40. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  41. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  42. package/dist/field/features/blocks/feature.client.js +56 -27
  43. package/dist/field/features/blocks/feature.client.js.map +1 -1
  44. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  45. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  46. package/dist/field/features/blocks/feature.server.js +109 -77
  47. package/dist/field/features/blocks/feature.server.js.map +1 -1
  48. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  49. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  50. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  51. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  52. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  53. package/dist/field/features/blocks/plugin/commands.js +1 -2
  54. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  55. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  56. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  57. package/dist/field/features/blocks/plugin/index.js +5 -8
  58. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  59. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  60. package/dist/field/features/blocks/populationPromise.js +4 -18
  61. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  62. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  63. package/dist/field/features/blocks/validate.js +22 -36
  64. package/dist/field/features/blocks/validate.js.map +1 -1
  65. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  66. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  67. package/dist/field/features/converters/html/field/index.js +6 -3
  68. package/dist/field/features/converters/html/field/index.js.map +1 -1
  69. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
  70. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  71. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  72. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  73. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  74. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  75. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  76. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  77. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +2 -4
  78. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  79. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
  80. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
  81. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  82. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  83. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  84. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  85. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  86. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  87. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +4 -6
  88. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  89. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  90. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  91. package/dist/field/features/format/bold/feature.client.js +26 -23
  92. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  93. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
  94. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  95. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  96. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  97. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  98. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  99. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  100. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  101. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  102. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  103. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  104. package/dist/field/features/format/italic/feature.client.js +27 -24
  105. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  106. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  107. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  108. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  109. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  110. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  111. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  112. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  113. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  114. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  115. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  116. package/dist/field/features/format/subscript/feature.client.js +25 -22
  117. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  118. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  119. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  120. package/dist/field/features/format/superscript/feature.client.js +25 -22
  121. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  122. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  123. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  124. package/dist/field/features/format/underline/feature.client.js +25 -22
  125. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  126. package/dist/field/features/heading/feature.client.d.ts +4 -1
  127. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  128. package/dist/field/features/heading/feature.client.js +71 -54
  129. package/dist/field/features/heading/feature.client.js.map +1 -1
  130. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  131. package/dist/field/features/heading/feature.server.js +5 -5
  132. package/dist/field/features/heading/feature.server.js.map +1 -1
  133. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  134. package/dist/field/features/heading/markdownTransformer.js +1 -2
  135. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  136. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  137. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  138. package/dist/field/features/horizontalRule/component/index.js +62 -0
  139. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  140. package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
  141. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  142. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  143. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  144. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  145. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  146. package/dist/field/features/horizontalRule/feature.server.js +36 -0
  147. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  148. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  149. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  150. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  151. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  152. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  153. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  154. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +88 -0
  155. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  156. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  157. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  158. package/dist/field/features/horizontalRule/plugin/index.js +31 -0
  159. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  160. package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
  161. package/dist/field/features/indent/feature.client.d.ts +4 -1
  162. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  163. package/dist/field/features/indent/feature.client.js +43 -42
  164. package/dist/field/features/indent/feature.client.js.map +1 -1
  165. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  166. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  167. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  168. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  169. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  170. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  171. package/dist/field/features/link/drawer/baseFields.js +30 -43
  172. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  173. package/dist/field/features/link/drawer/index.js +3 -2
  174. package/dist/field/features/link/drawer/index.js.map +1 -1
  175. package/dist/field/features/link/drawer/types.d.ts +4 -2
  176. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  177. package/dist/field/features/link/drawer/types.js.map +1 -1
  178. package/dist/field/features/link/feature.client.d.ts +13 -1
  179. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  180. package/dist/field/features/link/feature.client.js +59 -47
  181. package/dist/field/features/link/feature.client.js.map +1 -1
  182. package/dist/field/features/link/feature.server.d.ts +10 -5
  183. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  184. package/dist/field/features/link/feature.server.js +48 -9
  185. package/dist/field/features/link/feature.server.js.map +1 -1
  186. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  187. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  188. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  189. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  190. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  191. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  192. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  193. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  194. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  195. package/dist/field/features/link/plugins/autoLink/index.js +5 -8
  196. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  197. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  198. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  199. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  200. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  201. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  202. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  203. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  204. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  205. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +93 -69
  206. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  207. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  208. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  209. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  210. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  211. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  212. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  213. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  214. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  215. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  216. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  217. package/dist/field/features/link/plugins/link/index.js +5 -14
  218. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  219. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  220. package/dist/field/features/link/populationPromise.js +10 -25
  221. package/dist/field/features/link/populationPromise.js.map +1 -1
  222. package/dist/field/features/link/validate.d.ts +5 -0
  223. package/dist/field/features/link/validate.d.ts.map +1 -0
  224. package/dist/field/features/link/validate.js +32 -0
  225. package/dist/field/features/link/validate.js.map +1 -0
  226. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  227. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  228. package/dist/field/features/lists/checklist/feature.client.js +56 -32
  229. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  230. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  231. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  232. package/dist/field/features/lists/checklist/feature.server.js +10 -10
  233. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  234. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  235. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  236. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  237. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  238. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  239. package/dist/field/features/lists/checklist/plugin/index.js +3 -4
  240. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  241. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  242. package/dist/field/features/lists/htmlConverter.js +13 -6
  243. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  244. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  245. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  246. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  247. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  248. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  249. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +7 -7
  250. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  251. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  252. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  253. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  254. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  255. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  256. package/dist/field/features/lists/plugin/index.js +3 -4
  257. package/dist/field/features/lists/plugin/index.js.map +1 -1
  258. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  259. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  260. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  261. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  262. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  263. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  264. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  265. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  266. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +7 -7
  267. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  268. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  269. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  270. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  271. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  272. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  273. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  274. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  275. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  276. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  277. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  278. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  279. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  280. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  281. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  282. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  283. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  284. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  285. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  286. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  287. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  288. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  289. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  290. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  291. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  292. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  293. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  294. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  295. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  296. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  297. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  298. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  299. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  300. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  301. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  302. package/dist/field/features/paragraph/feature.client.js +45 -33
  303. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  304. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  305. package/dist/field/features/relationship/drawer/commands.js +1 -2
  306. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  307. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  308. package/dist/field/features/relationship/drawer/index.js +7 -13
  309. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  310. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  311. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  312. package/dist/field/features/relationship/feature.client.js +37 -15
  313. package/dist/field/features/relationship/feature.client.js.map +1 -1
  314. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  315. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  316. package/dist/field/features/relationship/feature.server.js +5 -4
  317. package/dist/field/features/relationship/feature.server.js.map +1 -1
  318. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  319. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  320. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  321. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  322. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  323. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +56 -7
  324. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  325. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  326. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  327. package/dist/field/features/relationship/plugins/index.js +9 -12
  328. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  329. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  330. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  331. package/dist/field/features/relationship/populationPromise.js +25 -19
  332. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  333. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  334. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  335. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  336. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  337. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  338. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  339. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  340. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  341. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  342. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  343. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  344. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  345. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
  346. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  347. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  348. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  349. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +91 -0
  350. package/dist/field/features/toolbars/fixed/feature.client.d.ts +6 -0
  351. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  352. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  353. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  354. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  355. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  356. package/dist/field/features/toolbars/fixed/feature.server.js +15 -0
  357. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  358. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  359. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  360. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +112 -70
  361. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  362. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  363. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  364. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  365. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  366. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  367. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  368. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  369. package/dist/field/features/toolbars/inline/feature.server.js +15 -0
  370. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  371. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  372. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  373. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +29 -19
  374. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  375. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  376. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  377. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  378. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +27 -72
  379. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  380. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  381. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  382. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  383. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  384. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  385. package/dist/field/features/toolbars/types.d.ts +48 -0
  386. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  387. package/dist/field/features/toolbars/types.js.map +1 -0
  388. package/dist/field/features/typeUtilities.d.ts +8 -0
  389. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  390. package/dist/field/features/typeUtilities.js +8 -0
  391. package/dist/field/features/typeUtilities.js.map +1 -0
  392. package/dist/field/features/types.d.ts +136 -62
  393. package/dist/field/features/types.d.ts.map +1 -1
  394. package/dist/field/features/types.js.map +1 -1
  395. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  396. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  397. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  398. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  399. package/dist/field/features/upload/component/index.js +59 -9
  400. package/dist/field/features/upload/component/index.js.map +1 -1
  401. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  402. package/dist/field/features/upload/drawer/commands.js +1 -2
  403. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  404. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  405. package/dist/field/features/upload/drawer/index.js +8 -12
  406. package/dist/field/features/upload/drawer/index.js.map +1 -1
  407. package/dist/field/features/upload/feature.client.d.ts +4 -1
  408. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  409. package/dist/field/features/upload/feature.client.js +35 -10
  410. package/dist/field/features/upload/feature.client.js.map +1 -1
  411. package/dist/field/features/upload/feature.server.d.ts +10 -3
  412. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  413. package/dist/field/features/upload/feature.server.js +39 -11
  414. package/dist/field/features/upload/feature.server.js.map +1 -1
  415. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  416. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  417. package/dist/field/features/upload/nodes/UploadNode.js +24 -11
  418. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  419. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  420. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  421. package/dist/field/features/upload/plugin/index.js +6 -11
  422. package/dist/field/features/upload/plugin/index.js.map +1 -1
  423. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  424. package/dist/field/features/upload/populationPromise.js +15 -9
  425. package/dist/field/features/upload/populationPromise.js.map +1 -1
  426. package/dist/field/features/upload/validate.d.ts +2 -1
  427. package/dist/field/features/upload/validate.d.ts.map +1 -1
  428. package/dist/field/features/upload/validate.js +37 -12
  429. package/dist/field/features/upload/validate.js.map +1 -1
  430. package/dist/field/index.d.ts +1 -1
  431. package/dist/field/index.d.ts.map +1 -1
  432. package/dist/field/index.js.map +1 -1
  433. package/dist/field/index.scss +4 -0
  434. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  435. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  436. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  437. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  438. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  439. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  440. package/dist/field/lexical/EditorPlugin.js +6 -3
  441. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  442. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  443. package/dist/field/lexical/LexicalEditor.js +31 -15
  444. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  445. package/dist/field/lexical/LexicalEditor.scss +3 -19
  446. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  447. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  448. package/dist/field/lexical/LexicalProvider.js +4 -4
  449. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  450. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  451. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  452. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  453. package/dist/field/lexical/config/client/default.d.ts +1 -1
  454. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  455. package/dist/field/lexical/config/client/default.js.map +1 -1
  456. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  457. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  458. package/dist/field/lexical/config/client/sanitize.js +81 -32
  459. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  460. package/dist/field/lexical/config/server/default.d.ts +2 -3
  461. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  462. package/dist/field/lexical/config/server/default.js +12 -10
  463. package/dist/field/lexical/config/server/default.js.map +1 -1
  464. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  465. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  466. package/dist/field/lexical/config/server/loader.js +4 -2
  467. package/dist/field/lexical/config/server/loader.js.map +1 -1
  468. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  469. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  470. package/dist/field/lexical/config/server/sanitize.js +23 -8
  471. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  472. package/dist/field/lexical/config/types.d.ts +1 -1
  473. package/dist/field/lexical/config/types.d.ts.map +1 -1
  474. package/dist/field/lexical/config/types.js.map +1 -1
  475. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  476. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  477. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  478. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  479. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  480. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  481. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  482. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  483. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  484. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +6 -9
  485. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  486. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  487. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  488. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  489. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  490. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  491. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  492. package/dist/field/lexical/plugins/SlashMenu/index.js +72 -67
  493. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  494. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  495. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
  496. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  497. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  498. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  499. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +3 -4
  500. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  501. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  502. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -10
  503. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  504. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  505. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  506. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  507. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  508. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  509. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  510. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  511. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  512. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  513. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  514. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  515. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  516. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  517. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  518. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  519. package/dist/field/lexical/theme/EditorTheme.scss +13 -14
  520. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  521. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  522. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  523. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  524. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  525. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  526. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  527. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  528. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  529. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  530. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  531. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  532. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  533. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  534. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  535. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  536. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  537. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  538. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  539. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  540. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  541. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  542. package/dist/field/lexical/utils/url.js +3 -0
  543. package/dist/field/lexical/utils/url.js.map +1 -1
  544. package/dist/forEachNodeRecursively.d.ts +10 -0
  545. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  546. package/dist/forEachNodeRecursively.js +24 -0
  547. package/dist/forEachNodeRecursively.js.map +1 -0
  548. package/dist/generateComponentMap.d.ts.map +1 -1
  549. package/dist/generateComponentMap.js +16 -22
  550. package/dist/generateComponentMap.js.map +1 -1
  551. package/dist/generateSchemaMap.d.ts.map +1 -1
  552. package/dist/generateSchemaMap.js +4 -12
  553. package/dist/generateSchemaMap.js.map +1 -1
  554. package/dist/index.d.ts +24 -20
  555. package/dist/index.d.ts.map +1 -1
  556. package/dist/index.js +275 -184
  557. package/dist/index.js.map +1 -1
  558. package/dist/populate/defaultValue.d.ts.map +1 -1
  559. package/dist/populate/defaultValue.js +1 -0
  560. package/dist/populate/defaultValue.js.map +1 -1
  561. package/dist/populate/populate.d.ts +5 -4
  562. package/dist/populate/populate.d.ts.map +1 -1
  563. package/dist/populate/populate.js +13 -11
  564. package/dist/populate/populate.js.map +1 -1
  565. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  566. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  567. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  568. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  569. package/dist/populate/recurseNestedFields.d.ts +8 -4
  570. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  571. package/dist/populate/recurseNestedFields.js +4 -5
  572. package/dist/populate/recurseNestedFields.js.map +1 -1
  573. package/dist/scss/app.scss +2 -3
  574. package/dist/scss/vars.scss +0 -7
  575. package/dist/types.d.ts +12 -5
  576. package/dist/types.d.ts.map +1 -1
  577. package/dist/types.js.map +1 -1
  578. package/dist/validate/index.d.ts +1 -1
  579. package/dist/validate/index.d.ts.map +1 -1
  580. package/package.json +48 -47
  581. package/components.d.ts +0 -6
  582. package/components.js +0 -7
  583. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  584. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  585. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  586. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  587. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  588. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  589. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  590. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  591. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  592. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  593. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  594. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  595. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  596. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  597. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  598. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  599. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  600. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  601. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  602. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  603. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  604. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  605. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  606. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  607. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  608. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  609. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  610. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  611. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  612. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  613. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  614. package/dist/field/features/indent/index.scss +0 -4
  615. package/dist/field/features/lists/common/markdown.js.map +0 -1
  616. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  617. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  618. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  619. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  620. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  621. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  622. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  623. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  624. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  625. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  626. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  627. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  628. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  629. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  630. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  631. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  632. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  633. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  634. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  635. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  636. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  637. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  638. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  639. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  640. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  641. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  642. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  643. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  644. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  645. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  646. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  647. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  648. package/dist/populate/richTextRelationshipPromise.js +0 -68
  649. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  650. package/dist/scss/fonts.scss +0 -75
  651. package/src/index.ts +0 -423
  652. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  653. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  654. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  655. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  656. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  657. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  658. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  659. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  660. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  661. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  662. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  663. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  664. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  665. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  666. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -0,0 +1,53 @@
1
+ import type { DOMConversionMap, DOMExportOutput, LexicalCommand, LexicalNode, SerializedLexicalNode } from 'lexical';
2
+ import { DecoratorNode } from 'lexical';
3
+ import * as React from 'react';
4
+ /**
5
+ * Serialized representation of a horizontal rule node. Serialized = converted to JSON. This is what is stored in the database / in the lexical editor state.
6
+ */
7
+ export type SerializedHorizontalRuleNode = SerializedLexicalNode;
8
+ export declare const INSERT_HORIZONTAL_RULE_COMMAND: LexicalCommand<void>;
9
+ /**
10
+ * This node is a DecoratorNode. DecoratorNodes allow you to render React components in the editor.
11
+ *
12
+ * They need both createDom and decorate functions. createDom => outside of the html. decorate => React Component inside of the html.
13
+ *
14
+ * If we used DecoratorBlockNode instead, we would only need a decorate method
15
+ */
16
+ export declare class HorizontalRuleNode extends DecoratorNode<React.ReactElement> {
17
+ static clone(node: HorizontalRuleNode): HorizontalRuleNode;
18
+ static getType(): string;
19
+ /**
20
+ * Defines what happens if you copy an hr element from another page and paste it into the lexical editor
21
+ *
22
+ * This also determines the behavior of lexical's internal HTML -> Lexical converter
23
+ */
24
+ static importDOM(): DOMConversionMap | null;
25
+ /**
26
+ * The data for this node is stored serialized as JSON. This is the "load function" of that node: it takes the saved data and converts it into a node.
27
+ */
28
+ static importJSON(serializedNode: SerializedHorizontalRuleNode): HorizontalRuleNode;
29
+ /**
30
+ * Determines how the hr element is rendered in the lexical editor. This is only the "initial" / "outer" HTML element.
31
+ */
32
+ createDOM(): HTMLElement;
33
+ /**
34
+ * Allows you to render a React component within whatever createDOM returns.
35
+ */
36
+ decorate(): React.ReactElement;
37
+ /**
38
+ * Opposite of importDOM, this function defines what happens when you copy an hr element from the lexical editor and paste it into another page.
39
+ *
40
+ * This also determines the behavior of lexical's internal Lexical -> HTML converter
41
+ */
42
+ exportDOM(): DOMExportOutput;
43
+ /**
44
+ * Opposite of importJSON. This determines what data is saved in the database / in the lexical editor state.
45
+ */
46
+ exportJSON(): SerializedLexicalNode;
47
+ getTextContent(): string;
48
+ isInline(): false;
49
+ updateDOM(): boolean;
50
+ }
51
+ export declare function $createHorizontalRuleNode(): HorizontalRuleNode;
52
+ export declare function $isHorizontalRuleNode(node: LexicalNode | null | undefined): node is HorizontalRuleNode;
53
+ //# sourceMappingURL=HorizontalRuleNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalRuleNode.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/horizontalRule/nodes/HorizontalRuleNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,cAAc,EACd,WAAW,EACX,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAyB,aAAa,EAAiB,MAAM,SAAS,CAAA;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,CAAA;AAEhE,eAAO,MAAM,8BAA8B,EAAE,cAAc,CAAC,IAAI,CAE/D,CAAA;AAED;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;IACvE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB;IAI1D,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB;;;;OAIG;IACH,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAS3C;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,4BAA4B,GAAG,kBAAkB;IAInF;;OAEG;IACH,SAAS,IAAI,WAAW;IAIxB;;OAEG;IACH,QAAQ,IAAI,KAAK,CAAC,YAAY;IAI9B;;;;OAIG;IACH,SAAS,IAAI,eAAe;IAG5B;;OAEG;IACH,UAAU,IAAI,qBAAqB;IAOnC,cAAc,IAAI,MAAM;IAIxB,QAAQ,IAAI,KAAK;IAIjB,SAAS,IAAI,OAAO;CAGrB;AAMD,wBAAgB,yBAAyB,IAAI,kBAAkB,CAE9D;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,kBAAkB,CAE5B"}
@@ -0,0 +1,88 @@
1
+ import { $applyNodeReplacement, DecoratorNode, createCommand } from 'lexical';
2
+ import * as React from 'react';
3
+ const HorizontalRuleComponent = /*#__PURE__*/ React.lazy(()=>import('../component/index.js').then((module)=>({
4
+ default: module.HorizontalRuleComponent
5
+ })));
6
+ export const INSERT_HORIZONTAL_RULE_COMMAND = createCommand('INSERT_HORIZONTAL_RULE_COMMAND');
7
+ /**
8
+ * This node is a DecoratorNode. DecoratorNodes allow you to render React components in the editor.
9
+ *
10
+ * They need both createDom and decorate functions. createDom => outside of the html. decorate => React Component inside of the html.
11
+ *
12
+ * If we used DecoratorBlockNode instead, we would only need a decorate method
13
+ */ export class HorizontalRuleNode extends DecoratorNode {
14
+ static clone(node) {
15
+ return new HorizontalRuleNode(node.__key);
16
+ }
17
+ static getType() {
18
+ return 'horizontalrule';
19
+ }
20
+ /**
21
+ * Defines what happens if you copy an hr element from another page and paste it into the lexical editor
22
+ *
23
+ * This also determines the behavior of lexical's internal HTML -> Lexical converter
24
+ */ static importDOM() {
25
+ return {
26
+ hr: ()=>({
27
+ conversion: convertHorizontalRuleElement,
28
+ priority: 0
29
+ })
30
+ };
31
+ }
32
+ /**
33
+ * The data for this node is stored serialized as JSON. This is the "load function" of that node: it takes the saved data and converts it into a node.
34
+ */ static importJSON(serializedNode) {
35
+ return $createHorizontalRuleNode();
36
+ }
37
+ /**
38
+ * Determines how the hr element is rendered in the lexical editor. This is only the "initial" / "outer" HTML element.
39
+ */ createDOM() {
40
+ return document.createElement('hr');
41
+ }
42
+ /**
43
+ * Allows you to render a React component within whatever createDOM returns.
44
+ */ decorate() {
45
+ return /*#__PURE__*/ React.createElement(HorizontalRuleComponent, {
46
+ nodeKey: this.__key
47
+ });
48
+ }
49
+ /**
50
+ * Opposite of importDOM, this function defines what happens when you copy an hr element from the lexical editor and paste it into another page.
51
+ *
52
+ * This also determines the behavior of lexical's internal Lexical -> HTML converter
53
+ */ exportDOM() {
54
+ return {
55
+ element: document.createElement('hr')
56
+ };
57
+ }
58
+ /**
59
+ * Opposite of importJSON. This determines what data is saved in the database / in the lexical editor state.
60
+ */ exportJSON() {
61
+ return {
62
+ type: 'horizontalrule',
63
+ version: 1
64
+ };
65
+ }
66
+ getTextContent() {
67
+ return '\n';
68
+ }
69
+ isInline() {
70
+ return false;
71
+ }
72
+ updateDOM() {
73
+ return false;
74
+ }
75
+ }
76
+ function convertHorizontalRuleElement() {
77
+ return {
78
+ node: $createHorizontalRuleNode()
79
+ };
80
+ }
81
+ export function $createHorizontalRuleNode() {
82
+ return $applyNodeReplacement(new HorizontalRuleNode());
83
+ }
84
+ export function $isHorizontalRuleNode(node) {
85
+ return node instanceof HorizontalRuleNode;
86
+ }
87
+
88
+ //# sourceMappingURL=HorizontalRuleNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/horizontalRule/nodes/HorizontalRuleNode.tsx"],"sourcesContent":["import type {\n DOMConversionMap,\n DOMConversionOutput,\n DOMExportOutput,\n LexicalCommand,\n LexicalNode,\n SerializedLexicalNode,\n} from 'lexical'\n\nimport { $applyNodeReplacement, DecoratorNode, createCommand } from 'lexical'\nimport * as React from 'react'\n\nconst HorizontalRuleComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.HorizontalRuleComponent,\n })),\n)\n\n/**\n * Serialized representation of a horizontal rule node. Serialized = converted to JSON. This is what is stored in the database / in the lexical editor state.\n */\nexport type SerializedHorizontalRuleNode = SerializedLexicalNode\n\nexport const INSERT_HORIZONTAL_RULE_COMMAND: LexicalCommand<void> = createCommand(\n 'INSERT_HORIZONTAL_RULE_COMMAND',\n)\n\n/**\n * This node is a DecoratorNode. DecoratorNodes allow you to render React components in the editor.\n *\n * They need both createDom and decorate functions. createDom => outside of the html. decorate => React Component inside of the html.\n *\n * If we used DecoratorBlockNode instead, we would only need a decorate method\n */\nexport class HorizontalRuleNode extends DecoratorNode<React.ReactElement> {\n static clone(node: HorizontalRuleNode): HorizontalRuleNode {\n return new HorizontalRuleNode(node.__key)\n }\n\n static getType(): string {\n return 'horizontalrule'\n }\n\n /**\n * Defines what happens if you copy an hr element from another page and paste it into the lexical editor\n *\n * This also determines the behavior of lexical's internal HTML -> Lexical converter\n */\n static importDOM(): DOMConversionMap | null {\n return {\n hr: () => ({\n conversion: convertHorizontalRuleElement,\n priority: 0,\n }),\n }\n }\n\n /**\n * The data for this node is stored serialized as JSON. This is the \"load function\" of that node: it takes the saved data and converts it into a node.\n */\n static importJSON(serializedNode: SerializedHorizontalRuleNode): HorizontalRuleNode {\n return $createHorizontalRuleNode()\n }\n\n /**\n * Determines how the hr element is rendered in the lexical editor. This is only the \"initial\" / \"outer\" HTML element.\n */\n createDOM(): HTMLElement {\n return document.createElement('hr')\n }\n\n /**\n * Allows you to render a React component within whatever createDOM returns.\n */\n decorate(): React.ReactElement {\n return <HorizontalRuleComponent nodeKey={this.__key} />\n }\n\n /**\n * Opposite of importDOM, this function defines what happens when you copy an hr element from the lexical editor and paste it into another page.\n *\n * This also determines the behavior of lexical's internal Lexical -> HTML converter\n */\n exportDOM(): DOMExportOutput {\n return { element: document.createElement('hr') }\n }\n /**\n * Opposite of importJSON. This determines what data is saved in the database / in the lexical editor state.\n */\n exportJSON(): SerializedLexicalNode {\n return {\n type: 'horizontalrule',\n version: 1,\n }\n }\n\n getTextContent(): string {\n return '\\n'\n }\n\n isInline(): false {\n return false\n }\n\n updateDOM(): boolean {\n return false\n }\n}\n\nfunction convertHorizontalRuleElement(): DOMConversionOutput {\n return { node: $createHorizontalRuleNode() }\n}\n\nexport function $createHorizontalRuleNode(): HorizontalRuleNode {\n return $applyNodeReplacement(new HorizontalRuleNode())\n}\n\nexport function $isHorizontalRuleNode(\n node: LexicalNode | null | undefined,\n): node is HorizontalRuleNode {\n return node instanceof HorizontalRuleNode\n}\n"],"names":["$applyNodeReplacement","DecoratorNode","createCommand","React","HorizontalRuleComponent","lazy","then","module","default","INSERT_HORIZONTAL_RULE_COMMAND","HorizontalRuleNode","clone","node","__key","getType","importDOM","hr","conversion","convertHorizontalRuleElement","priority","importJSON","serializedNode","$createHorizontalRuleNode","createDOM","document","createElement","decorate","nodeKey","exportDOM","element","exportJSON","type","version","getTextContent","isInline","updateDOM","$isHorizontalRuleNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AASA,SAASA,qBAAqB,EAAEC,aAAa,EAAEC,aAAa,QAAQ,UAAS;AAC7E,YAAYC,WAAW,QAAO;AAE9B,MAAMC,wCAA0BD,MAAME,IAAI,CAAC,IACzC,MAAM,CAAC,yBAAyBC,IAAI,CAAC,CAACC,SAAY,CAAA;YAChDC,SAASD,OAAOH,uBAAuB;QACzC,CAAA;AAQF,OAAO,MAAMK,iCAAuDP,cAClE,kCACD;AAED;;;;;;CAMC,GACD,OAAO,MAAMQ,2BAA2BT;IACtC,OAAOU,MAAMC,IAAwB,EAAsB;QACzD,OAAO,IAAIF,mBAAmBE,KAAKC,KAAK;IAC1C;IAEA,OAAOC,UAAkB;QACvB,OAAO;IACT;IAEA;;;;GAIC,GACD,OAAOC,YAAqC;QAC1C,OAAO;YACLC,IAAI,IAAO,CAAA;oBACTC,YAAYC;oBACZC,UAAU;gBACZ,CAAA;QACF;IACF;IAEA;;GAEC,GACD,OAAOC,WAAWC,cAA4C,EAAsB;QAClF,OAAOC;IACT;IAEA;;GAEC,GACDC,YAAyB;QACvB,OAAOC,SAASC,aAAa,CAAC;IAChC;IAEA;;GAEC,GACDC,WAA+B;QAC7B,qBAAO,oBAACtB;YAAwBuB,SAAS,IAAI,CAACd,KAAK;;IACrD;IAEA;;;;GAIC,GACDe,YAA6B;QAC3B,OAAO;YAAEC,SAASL,SAASC,aAAa,CAAC;QAAM;IACjD;IACA;;GAEC,GACDK,aAAoC;QAClC,OAAO;YACLC,MAAM;YACNC,SAAS;QACX;IACF;IAEAC,iBAAyB;QACvB,OAAO;IACT;IAEAC,WAAkB;QAChB,OAAO;IACT;IAEAC,YAAqB;QACnB,OAAO;IACT;AACF;AAEA,SAASjB;IACP,OAAO;QAAEN,MAAMU;IAA4B;AAC7C;AAEA,OAAO,SAASA;IACd,OAAOtB,sBAAsB,IAAIU;AACnC;AAEA,OAAO,SAAS0B,sBACdxB,IAAoC;IAEpC,OAAOA,gBAAgBF;AACzB"}
@@ -0,0 +1,7 @@
1
+ import type { PluginComponent } from '../../types.js';
2
+ import './index.scss';
3
+ /**
4
+ * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.
5
+ */
6
+ export declare const HorizontalRulePlugin: PluginComponent<undefined>;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/horizontalRule/plugin/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMrD,OAAO,cAAc,CAAA;AAErB;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,eAAe,CAAC,SAAS,CA2B3D,CAAA"}
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
3
+ import { $insertNodeToNearestRoot } from '@lexical/utils';
4
+ import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from 'lexical';
5
+ import { useEffect } from 'react';
6
+ import { $createHorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND } from '../nodes/HorizontalRuleNode.js';
7
+ import './index.scss';
8
+ /**
9
+ * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.
10
+ */ export const HorizontalRulePlugin = ()=>{
11
+ const [editor] = useLexicalComposerContext();
12
+ useEffect(()=>{
13
+ return editor.registerCommand(INSERT_HORIZONTAL_RULE_COMMAND, (type)=>{
14
+ const selection = $getSelection();
15
+ if (!$isRangeSelection(selection)) {
16
+ return false;
17
+ }
18
+ const focusNode = selection.focus.getNode();
19
+ if (focusNode !== null) {
20
+ const horizontalRuleNode = $createHorizontalRuleNode();
21
+ $insertNodeToNearestRoot(horizontalRuleNode);
22
+ }
23
+ return true;
24
+ }, COMMAND_PRIORITY_EDITOR);
25
+ }, [
26
+ editor
27
+ ]);
28
+ return null;
29
+ };
30
+
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/horizontalRule/plugin/index.tsx"],"sourcesContent":["'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../types.js'\n\nimport {\n $createHorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from '../nodes/HorizontalRuleNode.js'\nimport './index.scss'\n\n/**\n * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.\n */\nexport const HorizontalRulePlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand(\n INSERT_HORIZONTAL_RULE_COMMAND,\n (type) => {\n const selection = $getSelection()\n\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n const focusNode = selection.focus.getNode()\n\n if (focusNode !== null) {\n const horizontalRuleNode = $createHorizontalRuleNode()\n $insertNodeToNearestRoot(horizontalRuleNode)\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return null\n}\n"],"names":["useLexicalComposerContext","$insertNodeToNearestRoot","$getSelection","$isRangeSelection","COMMAND_PRIORITY_EDITOR","useEffect","$createHorizontalRuleNode","INSERT_HORIZONTAL_RULE_COMMAND","HorizontalRulePlugin","editor","registerCommand","type","selection","focusNode","focus","getNode","horizontalRuleNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,wBAAwB,QAAQ,iBAAgB;AACzD,SAASC,aAAa,EAAEC,iBAAiB,EAAEC,uBAAuB,QAAQ,UAAS;AACnF,SAASC,SAAS,QAAQ,QAAO;AAIjC,SACEC,yBAAyB,EACzBC,8BAA8B,QACzB,iCAAgC;AACvC,OAAO,eAAc;AAErB;;CAEC,GACD,OAAO,MAAMC,uBAAmD;IAC9D,MAAM,CAACC,OAAO,GAAGT;IAEjBK,UAAU;QACR,OAAOI,OAAOC,eAAe,CAC3BH,gCACA,CAACI;YACC,MAAMC,YAAYV;YAElB,IAAI,CAACC,kBAAkBS,YAAY;gBACjC,OAAO;YACT;YAEA,MAAMC,YAAYD,UAAUE,KAAK,CAACC,OAAO;YAEzC,IAAIF,cAAc,MAAM;gBACtB,MAAMG,qBAAqBV;gBAC3BL,yBAAyBe;YAC3B;YAEA,OAAO;QACT,GACAZ;IAEJ,GAAG;QAACK;KAAO;IAEX,OAAO;AACT,EAAC"}
@@ -0,0 +1,20 @@
1
+ @import '../../../../scss/styles.scss';
2
+
3
+ hr {
4
+ padding: 2px 2px;
5
+ border: none;
6
+ margin: 1rem 0;
7
+ cursor: pointer;
8
+ }
9
+
10
+ hr:after {
11
+ content: '';
12
+ display: block;
13
+ height: 2px;
14
+ background-color: var(--theme-elevation-250);
15
+ }
16
+
17
+ hr.selected {
18
+ outline: 2px solid var(--theme-success-500);
19
+ user-select: none;
20
+ }
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const IndentFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const IndentFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.client.tsx"],"names":[],"mappings":";AAkEA,eAAO,MAAM,4BAA4B,+BAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/feature.client.tsx"],"names":[],"mappings":";AAmEA,eAAO,MAAM,4BAA4B;;;EAA6C,CAAA"}
@@ -1,54 +1,55 @@
1
1
  'use client';
2
- import lexicalImport from 'lexical';
3
- const { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } = lexicalImport;
2
+ import { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } from 'lexical';
4
3
  import { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js';
5
4
  import { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js';
6
5
  import { createClientComponent } from '../createClientComponent.js';
7
- import { IndentSectionWithEntries } from './floatingSelectToolbarIndentSection.js';
6
+ import { toolbarIndentGroupWithItems } from './toolbarIndentGroup.js';
7
+ const toolbarGroups = [
8
+ toolbarIndentGroupWithItems([
9
+ {
10
+ ChildComponent: IndentDecreaseIcon,
11
+ isActive: ()=>false,
12
+ isEnabled: ({ selection })=>{
13
+ if (!selection || !selection?.getNodes()?.length) {
14
+ return false;
15
+ }
16
+ for (const node of selection.getNodes()){
17
+ // If at least one node is indented, this should be active
18
+ if ('__indent' in node && node.__indent > 0 || node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0) {
19
+ return true;
20
+ }
21
+ }
22
+ return false;
23
+ },
24
+ key: 'indentDecrease',
25
+ label: `Decrease Indent`,
26
+ onSelect: ({ editor })=>{
27
+ editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined);
28
+ },
29
+ order: 1
30
+ },
31
+ {
32
+ ChildComponent: IndentIncreaseIcon,
33
+ isActive: ()=>false,
34
+ key: 'indentIncrease',
35
+ label: `Increase Indent`,
36
+ onSelect: ({ editor })=>{
37
+ editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined);
38
+ },
39
+ order: 2
40
+ }
41
+ ])
42
+ ];
8
43
  const IndentFeatureClient = (props)=>{
9
44
  return {
10
45
  clientFeatureProps: props,
11
46
  feature: ()=>({
12
47
  clientFeatureProps: props,
13
- floatingSelectToolbar: {
14
- sections: [
15
- IndentSectionWithEntries([
16
- {
17
- ChildComponent: IndentDecreaseIcon,
18
- isActive: ()=>false,
19
- isEnabled: ({ selection })=>{
20
- if (!selection || !selection?.getNodes()?.length) {
21
- return false;
22
- }
23
- for (const node of selection.getNodes()){
24
- // If at least one node is indented, this should be active
25
- if ('__indent' in node && node.__indent > 0 || node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0) {
26
- return true;
27
- }
28
- }
29
- return false;
30
- },
31
- key: 'indent-decrease',
32
- label: `Decrease Indent`,
33
- onClick: ({ editor })=>{
34
- editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined);
35
- },
36
- order: 1
37
- }
38
- ]),
39
- IndentSectionWithEntries([
40
- {
41
- ChildComponent: IndentIncreaseIcon,
42
- isActive: ()=>false,
43
- key: 'indent-increase',
44
- label: `Increase Indent`,
45
- onClick: ({ editor })=>{
46
- editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined);
47
- },
48
- order: 2
49
- }
50
- ])
51
- ]
48
+ toolbarFixed: {
49
+ groups: toolbarGroups
50
+ },
51
+ toolbarInline: {
52
+ groups: toolbarGroups
52
53
  }
53
54
  })
54
55
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/indent/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport lexicalImport from 'lexical'\nconst { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } = lexicalImport\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { IndentSectionWithEntries } from './floatingSelectToolbarIndentSection.js'\n\nconst IndentFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n IndentSectionWithEntries([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() &&\n '__indent' in node.getParent() &&\n node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indent-decrease',\n label: `Decrease Indent`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n ]),\n IndentSectionWithEntries([\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indent-increase',\n label: `Increase Indent`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const IndentFeatureClientComponent = createClientComponent(IndentFeatureClient)\n"],"names":["lexicalImport","INDENT_CONTENT_COMMAND","OUTDENT_CONTENT_COMMAND","IndentDecreaseIcon","IndentIncreaseIcon","createClientComponent","IndentSectionWithEntries","IndentFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","isEnabled","selection","getNodes","length","node","__indent","getParent","key","label","onClick","editor","dispatchCommand","undefined","order","IndentFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,OAAOA,mBAAmB,UAAS;AACnC,MAAM,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAE,GAAGF;AAI5D,SAASG,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,wBAAwB,QAAQ,0CAAyC;AAElF,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRN,yBAAyB;4BACvB;gCACEO,gBAAgBV;gCAChBW,UAAU,IAAM;gCAChBC,WAAW,CAAC,EAAEC,SAAS,EAAE;oCACvB,IAAI,CAACA,aAAa,CAACA,WAAWC,YAAYC,QAAQ;wCAChD,OAAO;oCACT;oCACA,KAAK,MAAMC,QAAQH,UAAUC,QAAQ,GAAI;wCACvC,0DAA0D;wCAC1D,IACE,AAAC,cAAcE,QAAQ,AAACA,KAAKC,QAAQ,GAAc,KAClDD,KAAKE,SAAS,MACb,cAAcF,KAAKE,SAAS,MAC5BF,KAAKE,SAAS,GAAGD,QAAQ,GAAG,GAC9B;4CACA,OAAO;wCACT;oCACF;oCACA,OAAO;gCACT;gCACAE,KAAK;gCACLC,OAAO,CAAC,eAAe,CAAC;gCACxBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACxB,yBAAyByB;gCAClD;gCACAC,OAAO;4BACT;yBACD;wBACDtB,yBAAyB;4BACvB;gCACEO,gBAAgBT;gCAChBU,UAAU,IAAM;gCAChBQ,KAAK;gCACLC,OAAO,CAAC,eAAe,CAAC;gCACxBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACzB,wBAAwB0B;gCACjD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+BxB,sBAAsBE,qBAAoB"}
1
+ {"version":3,"sources":["../../../../src/field/features/indent/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarIndentGroupWithItems } from './toolbarIndentGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarIndentGroupWithItems([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() && '__indent' in node.getParent() && node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indentDecrease',\n label: `Decrease Indent`,\n onSelect: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indentIncrease',\n label: `Increase Indent`,\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n]\n\nconst IndentFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const IndentFeatureClientComponent = createClientComponent(IndentFeatureClient)\n"],"names":["INDENT_CONTENT_COMMAND","OUTDENT_CONTENT_COMMAND","IndentDecreaseIcon","IndentIncreaseIcon","createClientComponent","toolbarIndentGroupWithItems","toolbarGroups","ChildComponent","isActive","isEnabled","selection","getNodes","length","node","__indent","getParent","key","label","onSelect","editor","dispatchCommand","undefined","order","IndentFeatureClient","props","clientFeatureProps","feature","toolbarFixed","groups","toolbarInline","IndentFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,sBAAsB,EAAEC,uBAAuB,QAAQ,UAAS;AAKzE,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,2BAA2B,QAAQ,0BAAyB;AAErE,MAAMC,gBAAgC;IACpCD,4BAA4B;QAC1B;YACEE,gBAAgBL;YAChBM,UAAU,IAAM;YAChBC,WAAW,CAAC,EAAEC,SAAS,EAAE;gBACvB,IAAI,CAACA,aAAa,CAACA,WAAWC,YAAYC,QAAQ;oBAChD,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQH,UAAUC,QAAQ,GAAI;oBACvC,0DAA0D;oBAC1D,IACE,AAAC,cAAcE,QAAQ,AAACA,KAAKC,QAAQ,GAAc,KAClDD,KAAKE,SAAS,MAAM,cAAcF,KAAKE,SAAS,MAAMF,KAAKE,SAAS,GAAGD,QAAQ,GAAG,GACnF;wBACA,OAAO;oBACT;gBACF;gBACA,OAAO;YACT;YACAE,KAAK;YACLC,OAAO,CAAC,eAAe,CAAC;YACxBC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACnB,yBAAyBoB;YAClD;YACAC,OAAO;QACT;QACA;YACEf,gBAAgBJ;YAChBK,UAAU,IAAM;YAChBQ,KAAK;YACLC,OAAO,CAAC,eAAe,CAAC;YACxBC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACpB,wBAAwBqB;YACjD;YACAC,OAAO;QACT;KACD;CACF;AAED,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,cAAc;oBACZC,QAAQtB;gBACV;gBACAuB,eAAe;oBACbD,QAAQtB;gBACV;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMwB,+BAA+B1B,sBAAsBmB,qBAAoB"}
@@ -0,0 +1,3 @@
1
+ import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js';
2
+ export declare const toolbarIndentGroupWithItems: (items: ToolbarGroupItem[]) => ToolbarGroup;
3
+ //# sourceMappingURL=toolbarIndentGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbarIndentGroup.d.ts","sourceRoot":"","sources":["../../../../src/field/features/indent/toolbarIndentGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE1E,eAAO,MAAM,2BAA2B,UAAW,gBAAgB,EAAE,KAAG,YAOvE,CAAA"}
@@ -0,0 +1,10 @@
1
+ export const toolbarIndentGroupWithItems = (items)=>{
2
+ return {
3
+ type: 'buttons',
4
+ items,
5
+ key: 'indent',
6
+ order: 35
7
+ };
8
+ };
9
+
10
+ //# sourceMappingURL=toolbarIndentGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/field/features/indent/toolbarIndentGroup.ts"],"sourcesContent":["import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nexport const toolbarIndentGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'buttons',\n items,\n key: 'indent',\n order: 35,\n }\n}\n"],"names":["toolbarIndentGroupWithItems","items","type","key","order"],"rangeMappings":";;;;;;;","mappings":"AAEA,OAAO,MAAMA,8BAA8B,CAACC;IAC1C,OAAO;QACLC,MAAM;QACND;QACAE,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { Config } from 'payload/config';
1
+ import type { SanitizedConfig } from 'payload/config';
2
2
  import type { Field } from 'payload/types';
3
- export declare const getBaseFields: (config: Config, enabledCollections: false | string[], disabledCollections: false | string[]) => Field[];
3
+ export declare const getBaseFields: (config: SanitizedConfig, enabledCollections: false | string[], disabledCollections: false | string[], maxDepth?: number) => Field[];
4
4
  //# sourceMappingURL=baseFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseFields.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAyB,MAAM,eAAe,CAAA;AAIjE,eAAO,MAAM,aAAa,WAChB,MAAM,sBACM,KAAK,GAAG,MAAM,EAAE,uBACf,KAAK,GAAG,MAAM,EAAE,KACpC,KAAK,EAmHP,CAAA"}
1
+ {"version":3,"file":"baseFields.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAyB,MAAM,eAAe,CAAA;AAIjE,eAAO,MAAM,aAAa,WAChB,eAAe,sBACH,KAAK,GAAG,MAAM,EAAE,uBACf,KAAK,GAAG,MAAM,EAAE,aAC1B,MAAM,KAChB,KAAK,EAsGP,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { validateUrl } from '../../../lexical/utils/url.js';
2
- export const getBaseFields = (config, enabledCollections, disabledCollections)=>{
2
+ export const getBaseFields = (config, enabledCollections, disabledCollections, maxDepth)=>{
3
3
  let enabledRelations;
4
4
  /**
5
5
  * Figure out which relations should be enabled (enabledRelations) based on a collection's admin.enableRichTextLink property,
@@ -24,61 +24,47 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
24
24
  required: true
25
25
  },
26
26
  {
27
- name: 'fields',
28
- type: 'group',
27
+ name: 'linkType',
28
+ type: 'radio',
29
29
  admin: {
30
- style: {
31
- borderBottom: 0,
32
- borderTop: 0,
33
- margin: 0,
34
- padding: 0
35
- }
30
+ description: ({ t })=>t('fields:chooseBetweenCustomTextOrDocument')
36
31
  },
37
- fields: [
38
- {
39
- name: 'linkType',
40
- type: 'radio',
41
- admin: {
42
- description: ({ t })=>t('fields:chooseBetweenCustomTextOrDocument')
43
- },
44
- defaultValue: 'custom',
45
- label: ({ t })=>t('fields:linkType'),
46
- options: [
47
- {
48
- label: ({ t })=>t('fields:customURL'),
49
- value: 'custom'
50
- }
51
- ],
52
- required: true
53
- },
32
+ defaultValue: 'custom',
33
+ label: ({ t })=>t('fields:linkType'),
34
+ options: [
54
35
  {
55
- name: 'url',
56
- type: 'text',
57
- label: ({ t })=>t('fields:enterURL'),
58
- required: true,
59
- validate: (value)=>{
60
- if (value && !validateUrl(value)) {
61
- return 'Invalid URL';
62
- }
63
- }
36
+ label: ({ t })=>t('fields:customURL'),
37
+ value: 'custom'
38
+ }
39
+ ],
40
+ required: true
41
+ },
42
+ {
43
+ name: 'url',
44
+ type: 'text',
45
+ label: ({ t })=>t('fields:enterURL'),
46
+ required: true,
47
+ validate: (value)=>{
48
+ if (!validateUrl(value)) {
49
+ return 'Invalid URL';
64
50
  }
65
- ]
51
+ }
66
52
  }
67
53
  ];
68
54
  // Only display internal link-specific fields / options / conditions if there are enabled relations
69
55
  if (enabledRelations?.length) {
70
- baseFields[1].fields[0].options.push({
56
+ baseFields[1].options.push({
71
57
  label: ({ t })=>t('fields:internalLink'),
72
58
  value: 'internal'
73
59
  });
74
- baseFields[1].fields[1].admin = {
75
- condition: ({ fields })=>fields?.linkType !== 'internal'
60
+ baseFields[2].admin = {
61
+ condition: ({ linkType })=>linkType !== 'internal'
76
62
  };
77
- baseFields[1].fields.push({
63
+ baseFields.push({
78
64
  name: 'doc',
79
65
  admin: {
80
- condition: ({ fields })=>{
81
- return fields?.linkType === 'internal';
66
+ condition: ({ linkType })=>{
67
+ return linkType === 'internal';
82
68
  }
83
69
  },
84
70
  // when admin.hidden is a function we need to dynamically call hidden with the user to know if the collection should be shown
@@ -92,11 +78,12 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
92
78
  }
93
79
  } : null,
94
80
  label: ({ t })=>t('fields:chooseDocumentToLink'),
81
+ maxDepth,
95
82
  relationTo: enabledRelations,
96
83
  required: true
97
84
  });
98
85
  }
99
- baseFields[1].fields.push({
86
+ baseFields.push({
100
87
  name: 'newTab',
101
88
  type: 'checkbox',
102
89
  label: ({ t })=>t('fields:openInNewTab')
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"sourcesContent":["import type { User } from 'payload/auth'\nimport type { Config } from 'payload/config'\nimport type { Field, RadioField, TextField } from 'payload/types'\n\nimport { validateUrl } from '../../../lexical/utils/url.js'\n\nexport const getBaseFields = (\n config: Config,\n enabledCollections: false | string[],\n disabledCollections: false | string[],\n): Field[] => {\n let enabledRelations: string[]\n\n /**\n * Figure out which relations should be enabled (enabledRelations) based on a collection's admin.enableRichTextLink property,\n * or the Link Feature's enabledCollections and disabledCollections properties which override it.\n */\n if (enabledCollections) {\n enabledRelations = enabledCollections\n } else if (disabledCollections) {\n enabledRelations = config.collections\n .filter(({ slug }) => !disabledCollections.includes(slug))\n .map(({ slug }) => slug)\n } else {\n enabledRelations = config.collections\n .filter(({ admin: { enableRichTextLink, hidden } }) => {\n if (typeof hidden !== 'function' && hidden) {\n return false\n }\n return enableRichTextLink\n })\n .map(({ slug }) => slug)\n }\n\n const baseFields = [\n {\n name: 'text',\n type: 'text',\n label: ({ t }) => t('fields:textToDisplay'),\n required: true,\n },\n {\n name: 'fields',\n type: 'group',\n admin: {\n style: {\n borderBottom: 0,\n borderTop: 0,\n margin: 0,\n padding: 0,\n },\n },\n fields: [\n {\n name: 'linkType',\n type: 'radio',\n admin: {\n description: ({ t }) => t('fields:chooseBetweenCustomTextOrDocument'),\n },\n defaultValue: 'custom',\n label: ({ t }) => t('fields:linkType'),\n options: [\n {\n label: ({ t }) => t('fields:customURL'),\n value: 'custom',\n },\n ],\n required: true,\n },\n {\n name: 'url',\n type: 'text',\n label: ({ t }) => t('fields:enterURL'),\n required: true,\n validate: (value: string) => {\n if (value && !validateUrl(value)) {\n return 'Invalid URL'\n }\n },\n },\n ] as Field[],\n },\n ]\n\n // Only display internal link-specific fields / options / conditions if there are enabled relations\n if (enabledRelations?.length) {\n ;(baseFields[1].fields[0] as RadioField).options.push({\n label: ({ t }) => t('fields:internalLink'),\n value: 'internal',\n })\n ;(baseFields[1].fields[1] as TextField).admin = {\n condition: ({ fields }) => fields?.linkType !== 'internal',\n }\n\n baseFields[1].fields.push({\n name: 'doc',\n admin: {\n condition: ({ fields }) => {\n return fields?.linkType === 'internal'\n },\n },\n // when admin.hidden is a function we need to dynamically call hidden with the user to know if the collection should be shown\n type: 'relationship',\n filterOptions:\n !enabledCollections && !disabledCollections\n ? ({ relationTo, user }) => {\n const hidden = config.collections.find(({ slug }) => slug === relationTo).admin.hidden\n if (typeof hidden === 'function' && hidden({ user } as { user: User })) {\n return false\n }\n }\n : null,\n label: ({ t }) => t('fields:chooseDocumentToLink'),\n relationTo: enabledRelations,\n required: true,\n })\n }\n\n baseFields[1].fields.push({\n name: 'newTab',\n type: 'checkbox',\n label: ({ t }) => t('fields:openInNewTab'),\n })\n\n return baseFields as Field[]\n}\n"],"names":["validateUrl","getBaseFields","config","enabledCollections","disabledCollections","enabledRelations","collections","filter","slug","includes","map","admin","enableRichTextLink","hidden","baseFields","name","type","label","t","required","style","borderBottom","borderTop","margin","padding","fields","description","defaultValue","options","value","validate","length","push","condition","linkType","filterOptions","relationTo","user","find"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,WAAW,QAAQ,gCAA+B;AAE3D,OAAO,MAAMC,gBAAgB,CAC3BC,QACAC,oBACAC;IAEA,IAAIC;IAEJ;;;GAGC,GACD,IAAIF,oBAAoB;QACtBE,mBAAmBF;IACrB,OAAO,IAAIC,qBAAqB;QAC9BC,mBAAmBH,OAAOI,WAAW,CAClCC,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAK,CAACJ,oBAAoBK,QAAQ,CAACD,OACnDE,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB,OAAO;QACLH,mBAAmBH,OAAOI,WAAW,CAClCC,MAAM,CAAC,CAAC,EAAEI,OAAO,EAAEC,kBAAkB,EAAEC,MAAM,EAAE,EAAE;YAChD,IAAI,OAAOA,WAAW,cAAcA,QAAQ;gBAC1C,OAAO;YACT;YACA,OAAOD;QACT,GACCF,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB;IAEA,MAAMM,aAAa;QACjB;YACEC,MAAM;YACNC,MAAM;YACNC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBC,UAAU;QACZ;QACA;YACEJ,MAAM;YACNC,MAAM;YACNL,OAAO;gBACLS,OAAO;oBACLC,cAAc;oBACdC,WAAW;oBACXC,QAAQ;oBACRC,SAAS;gBACX;YACF;YACAC,QAAQ;gBACN;oBACEV,MAAM;oBACNC,MAAM;oBACNL,OAAO;wBACLe,aAAa,CAAC,EAAER,CAAC,EAAE,GAAKA,EAAE;oBAC5B;oBACAS,cAAc;oBACdV,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBU,SAAS;wBACP;4BACEX,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;4BACpBW,OAAO;wBACT;qBACD;oBACDV,UAAU;gBACZ;gBACA;oBACEJ,MAAM;oBACNC,MAAM;oBACNC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBC,UAAU;oBACVW,UAAU,CAACD;wBACT,IAAIA,SAAS,CAAC7B,YAAY6B,QAAQ;4BAChC,OAAO;wBACT;oBACF;gBACF;aACD;QACH;KACD;IAED,mGAAmG;IACnG,IAAIxB,kBAAkB0B,QAAQ;QAC1BjB,UAAU,CAAC,EAAE,CAACW,MAAM,CAAC,EAAE,CAAgBG,OAAO,CAACI,IAAI,CAAC;YACpDf,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBW,OAAO;QACT;QACEf,UAAU,CAAC,EAAE,CAACW,MAAM,CAAC,EAAE,CAAed,KAAK,GAAG;YAC9CsB,WAAW,CAAC,EAAER,MAAM,EAAE,GAAKA,QAAQS,aAAa;QAClD;QAEApB,UAAU,CAAC,EAAE,CAACW,MAAM,CAACO,IAAI,CAAC;YACxBjB,MAAM;YACNJ,OAAO;gBACLsB,WAAW,CAAC,EAAER,MAAM,EAAE;oBACpB,OAAOA,QAAQS,aAAa;gBAC9B;YACF;YACA,6HAA6H;YAC7HlB,MAAM;YACNmB,eACE,CAAChC,sBAAsB,CAACC,sBACpB,CAAC,EAAEgC,UAAU,EAAEC,IAAI,EAAE;gBACnB,MAAMxB,SAASX,OAAOI,WAAW,CAACgC,IAAI,CAAC,CAAC,EAAE9B,IAAI,EAAE,GAAKA,SAAS4B,YAAYzB,KAAK,CAACE,MAAM;gBACtF,IAAI,OAAOA,WAAW,cAAcA,OAAO;oBAAEwB;gBAAK,IAAsB;oBACtE,OAAO;gBACT;YACF,IACA;YACNpB,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBkB,YAAY/B;YACZc,UAAU;QACZ;IACF;IAEAL,UAAU,CAAC,EAAE,CAACW,MAAM,CAACO,IAAI,CAAC;QACxBjB,MAAM;QACNC,MAAM;QACNC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IAEA,OAAOJ;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"sourcesContent":["import type { User } from 'payload/auth'\nimport type { SanitizedConfig } from 'payload/config'\nimport type { Field, RadioField, TextField } from 'payload/types'\n\nimport { validateUrl } from '../../../lexical/utils/url.js'\n\nexport const getBaseFields = (\n config: SanitizedConfig,\n enabledCollections: false | string[],\n disabledCollections: false | string[],\n maxDepth?: number,\n): Field[] => {\n let enabledRelations: string[]\n\n /**\n * Figure out which relations should be enabled (enabledRelations) based on a collection's admin.enableRichTextLink property,\n * or the Link Feature's enabledCollections and disabledCollections properties which override it.\n */\n if (enabledCollections) {\n enabledRelations = enabledCollections\n } else if (disabledCollections) {\n enabledRelations = config.collections\n .filter(({ slug }) => !disabledCollections.includes(slug))\n .map(({ slug }) => slug)\n } else {\n enabledRelations = config.collections\n .filter(({ admin: { enableRichTextLink, hidden } }) => {\n if (typeof hidden !== 'function' && hidden) {\n return false\n }\n return enableRichTextLink\n })\n .map(({ slug }) => slug)\n }\n\n const baseFields: Field[] = [\n {\n name: 'text',\n type: 'text',\n label: ({ t }) => t('fields:textToDisplay'),\n required: true,\n },\n {\n name: 'linkType',\n type: 'radio',\n admin: {\n description: ({ t }) => t('fields:chooseBetweenCustomTextOrDocument'),\n },\n defaultValue: 'custom',\n label: ({ t }) => t('fields:linkType'),\n options: [\n {\n label: ({ t }) => t('fields:customURL'),\n value: 'custom',\n },\n ],\n required: true,\n } as RadioField,\n {\n name: 'url',\n type: 'text',\n label: ({ t }) => t('fields:enterURL'),\n required: true,\n validate: (value: string) => {\n if (!validateUrl(value)) {\n return 'Invalid URL'\n }\n },\n },\n ]\n\n // Only display internal link-specific fields / options / conditions if there are enabled relations\n if (enabledRelations?.length) {\n ;(baseFields[1] as RadioField).options.push({\n label: ({ t }) => t('fields:internalLink'),\n value: 'internal',\n })\n ;(baseFields[2] as TextField).admin = {\n condition: ({ linkType }) => linkType !== 'internal',\n }\n\n baseFields.push({\n name: 'doc',\n admin: {\n condition: ({ linkType }) => {\n return linkType === 'internal'\n },\n },\n // when admin.hidden is a function we need to dynamically call hidden with the user to know if the collection should be shown\n type: 'relationship',\n filterOptions:\n !enabledCollections && !disabledCollections\n ? ({ relationTo, user }) => {\n const hidden = config.collections.find(({ slug }) => slug === relationTo).admin.hidden\n if (typeof hidden === 'function' && hidden({ user } as { user: User })) {\n return false\n }\n }\n : null,\n label: ({ t }) => t('fields:chooseDocumentToLink'),\n maxDepth,\n relationTo: enabledRelations,\n required: true,\n })\n }\n\n baseFields.push({\n name: 'newTab',\n type: 'checkbox',\n label: ({ t }) => t('fields:openInNewTab'),\n })\n\n return baseFields\n}\n"],"names":["validateUrl","getBaseFields","config","enabledCollections","disabledCollections","maxDepth","enabledRelations","collections","filter","slug","includes","map","admin","enableRichTextLink","hidden","baseFields","name","type","label","t","required","description","defaultValue","options","value","validate","length","push","condition","linkType","filterOptions","relationTo","user","find"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,WAAW,QAAQ,gCAA+B;AAE3D,OAAO,MAAMC,gBAAgB,CAC3BC,QACAC,oBACAC,qBACAC;IAEA,IAAIC;IAEJ;;;GAGC,GACD,IAAIH,oBAAoB;QACtBG,mBAAmBH;IACrB,OAAO,IAAIC,qBAAqB;QAC9BE,mBAAmBJ,OAAOK,WAAW,CAClCC,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAK,CAACL,oBAAoBM,QAAQ,CAACD,OACnDE,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB,OAAO;QACLH,mBAAmBJ,OAAOK,WAAW,CAClCC,MAAM,CAAC,CAAC,EAAEI,OAAO,EAAEC,kBAAkB,EAAEC,MAAM,EAAE,EAAE;YAChD,IAAI,OAAOA,WAAW,cAAcA,QAAQ;gBAC1C,OAAO;YACT;YACA,OAAOD;QACT,GACCF,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB;IAEA,MAAMM,aAAsB;QAC1B;YACEC,MAAM;YACNC,MAAM;YACNC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBC,UAAU;QACZ;QACA;YACEJ,MAAM;YACNC,MAAM;YACNL,OAAO;gBACLS,aAAa,CAAC,EAAEF,CAAC,EAAE,GAAKA,EAAE;YAC5B;YACAG,cAAc;YACdJ,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBI,SAAS;gBACP;oBACEL,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;oBACpBK,OAAO;gBACT;aACD;YACDJ,UAAU;QACZ;QACA;YACEJ,MAAM;YACNC,MAAM;YACNC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBC,UAAU;YACVK,UAAU,CAACD;gBACT,IAAI,CAACxB,YAAYwB,QAAQ;oBACvB,OAAO;gBACT;YACF;QACF;KACD;IAED,mGAAmG;IACnG,IAAIlB,kBAAkBoB,QAAQ;QAC1BX,UAAU,CAAC,EAAE,CAAgBQ,OAAO,CAACI,IAAI,CAAC;YAC1CT,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBK,OAAO;QACT;QACET,UAAU,CAAC,EAAE,CAAeH,KAAK,GAAG;YACpCgB,WAAW,CAAC,EAAEC,QAAQ,EAAE,GAAKA,aAAa;QAC5C;QAEAd,WAAWY,IAAI,CAAC;YACdX,MAAM;YACNJ,OAAO;gBACLgB,WAAW,CAAC,EAAEC,QAAQ,EAAE;oBACtB,OAAOA,aAAa;gBACtB;YACF;YACA,6HAA6H;YAC7HZ,MAAM;YACNa,eACE,CAAC3B,sBAAsB,CAACC,sBACpB,CAAC,EAAE2B,UAAU,EAAEC,IAAI,EAAE;gBACnB,MAAMlB,SAASZ,OAAOK,WAAW,CAAC0B,IAAI,CAAC,CAAC,EAAExB,IAAI,EAAE,GAAKA,SAASsB,YAAYnB,KAAK,CAACE,MAAM;gBACtF,IAAI,OAAOA,WAAW,cAAcA,OAAO;oBAAEkB;gBAAK,IAAsB;oBACtE,OAAO;gBACT;YACF,IACA;YACNd,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;YACpBd;YACA0B,YAAYzB;YACZc,UAAU;QACZ;IACF;IAEAL,WAAWY,IAAI,CAAC;QACdX,MAAM;QACNC,MAAM;QACNC,OAAO,CAAC,EAAEC,CAAC,EAAE,GAAKA,EAAE;IACtB;IAEA,OAAOJ;AACT,EAAC"}
@@ -84,9 +84,10 @@ export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
84
84
  }, /*#__PURE__*/ React.createElement(RenderFields, {
85
85
  fieldMap: Array.isArray(fieldMap) ? fieldMap : [],
86
86
  forceRender: true,
87
- path: "",
87
+ path: "" // See Blocks feature path for details as for why this is empty
88
+ ,
88
89
  readOnly: false,
89
- schemaPath: ""
90
+ schemaPath: schemaFieldsPath
90
91
  }), /*#__PURE__*/ React.createElement(FormSubmit, null, t('general:submit'))));
91
92
  };
92
93
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/link/drawer/index.tsx"],"sourcesContent":["import type { FormProps } from '@payloadcms/ui/forms/Form'\nimport type { FormState } from 'payload/types'\n\nimport { Drawer } from '@payloadcms/ui/elements/Drawer'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { Form } from '@payloadcms/ui/forms/Form'\nimport { RenderFields } from '@payloadcms/ui/forms/RenderFields'\nimport { FormSubmit } from '@payloadcms/ui/forms/Submit'\nimport { useConfig } from '@payloadcms/ui/providers/Config'\nimport { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport { getFormState } from '@payloadcms/ui/utilities/getFormState'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport './index.scss'\nimport { type Props } from './types.js'\n\nconst baseClass = 'lexical-link-edit-drawer'\n\nexport const LinkDrawer: React.FC<Props> = ({ drawerSlug, handleModalSubmit, stateData }) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.link.fields.fields`\n const schemaFieldsPath = `${schemaPath}.feature.link.fields`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: stateData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (stateData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, stateData])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n return (\n <Drawer className={baseClass} slug={drawerSlug} title={t('fields:editLink') ?? ''}>\n {initialState !== false && (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleModalSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\"\n readOnly={false}\n schemaPath=\"\"\n />\n\n <FormSubmit>{t('general:submit')}</FormSubmit>\n </Form>\n )}\n </Drawer>\n )\n}\n"],"names":["Drawer","useFieldProps","Form","RenderFields","FormSubmit","useConfig","useDocumentInfo","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","baseClass","LinkDrawer","drawerSlug","handleModalSubmit","stateData","t","id","schemaPath","config","initialState","setInitialState","field","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","fieldMap","get","awaitInitialState","state","apiRoute","routes","api","body","data","operation","serverURL","onChange","formState","prevFormState","className","slug","title","beforeSubmit","disableValidationOnSubmit","fields","Array","isArray","onSubmit","forceRender","path","readOnly"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,MAAM,QAAQ,iCAAgC;AACvD,SAASC,aAAa,QAAQ,0CAAyC;AACvE,SAASC,IAAI,QAAQ,4BAA2B;AAChD,SAASC,YAAY,QAAQ,oCAAmC;AAChE,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,SAASC,eAAe,QAAQ,wCAAuC;AACvE,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,YAAY,QAAQ,wCAAuC;AACpE,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC/D,SAASC,MAAMC,IAAI,QAAQ,OAAM;AAEjC,SAASC,sBAAsB,QAAQ,yDAAwD;AAC/F,OAAO,eAAc;AAGrB,MAAMC,YAAY;AAElB,OAAO,MAAMC,aAA8B,CAAC,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,EAAE;IACtF,MAAM,EAAEC,CAAC,EAAE,GAAGd;IACd,MAAM,EAAEe,EAAE,EAAE,GAAGhB;IACf,MAAM,EAAEiB,UAAU,EAAE,GAAGtB;IACvB,MAAMuB,SAASnB;IACf,MAAM,CAACoB,cAAcC,gBAAgB,GAAGd,SAA4B;IACpE,MAAM,EACJe,OAAO,EAAEC,oBAAoB,EAAE,EAChC,GAAGb;IAEJ,MAAMc,iCAAiC,CAAC,0BAA0B,CAAC;IACnE,MAAMC,mBAAmB,CAAC,EAAEP,WAAW,oBAAoB,CAAC;IAE5D,MAAMQ,WAAWH,qBAAqBI,GAAG,CAACH,gCAAgC,eAAe;;IAEzFlB,UAAU;QACR,MAAMsB,oBAAoB;YACxB,MAAMC,QAAQ,MAAM1B,aAAa;gBAC/B2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;gBAC3BC,MAAM;oBACJhB;oBACAiB,MAAMnB;oBACNoB,WAAW;oBACXjB,YAAYO;gBACd;gBACAW,WAAWjB,OAAOiB,SAAS;YAC7B,GAAG,aAAa;;YAEhBf,gBAAgBQ;QAClB;QAEA,IAAId,WAAW;YACb,KAAKa;QACP;IACF,GAAG;QAACT,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;QAAIF;KAAU;IAEzE,MAAMsB,WAAqChC,YACzC,OAAO,EAAEiC,WAAWC,aAAa,EAAE;QACjC,OAAO,MAAMpC,aAAa;YACxB2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;YAC3BC,MAAM;gBACJhB;gBACAqB,WAAWC;gBACXJ,WAAW;gBACXjB,YAAYO;YACd;YACAW,WAAWjB,OAAOiB,SAAS;QAC7B;IACF,GAEA;QAACjB,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;KAAG;IAG7D,qBACE,oBAACtB;QAAO6C,WAAW7B;QAAW8B,MAAM5B;QAAY6B,OAAO1B,EAAE,sBAAsB;OAC5EI,iBAAiB,uBAChB,oBAACvB;QACC8C,cAAc;YAACN;SAAS;QACxBO,2BAAAA;QACAC,QAAQC,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QAC/CN,cAAcA;QACdiB,UAAU;YAACA;SAAS;QACpBW,UAAUlC;QACVL,MAAMA;qBAEN,oBAACX;QACC4B,UAAUoB,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QACjDuB,aAAAA;QACAC,MAAK;QACLC,UAAU;QACVjC,YAAW;sBAGb,oBAACnB,kBAAYiB,EAAE;AAKzB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/link/drawer/index.tsx"],"sourcesContent":["import type { FormProps } from '@payloadcms/ui/forms/Form'\nimport type { FormState } from 'payload/types'\n\nimport { Drawer } from '@payloadcms/ui/elements/Drawer'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { Form } from '@payloadcms/ui/forms/Form'\nimport { RenderFields } from '@payloadcms/ui/forms/RenderFields'\nimport { FormSubmit } from '@payloadcms/ui/forms/Submit'\nimport { useConfig } from '@payloadcms/ui/providers/Config'\nimport { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport { getFormState } from '@payloadcms/ui/utilities/getFormState'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport './index.scss'\nimport { type Props } from './types.js'\n\nconst baseClass = 'lexical-link-edit-drawer'\n\nexport const LinkDrawer: React.FC<Props> = ({ drawerSlug, handleModalSubmit, stateData }) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.link.fields.fields`\n const schemaFieldsPath = `${schemaPath}.feature.link.fields`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: stateData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (stateData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, stateData])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n return (\n <Drawer className={baseClass} slug={drawerSlug} title={t('fields:editLink') ?? ''}>\n {initialState !== false && (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleModalSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('general:submit')}</FormSubmit>\n </Form>\n )}\n </Drawer>\n )\n}\n"],"names":["Drawer","useFieldProps","Form","RenderFields","FormSubmit","useConfig","useDocumentInfo","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","baseClass","LinkDrawer","drawerSlug","handleModalSubmit","stateData","t","id","schemaPath","config","initialState","setInitialState","field","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","fieldMap","get","awaitInitialState","state","apiRoute","routes","api","body","data","operation","serverURL","onChange","formState","prevFormState","className","slug","title","beforeSubmit","disableValidationOnSubmit","fields","Array","isArray","onSubmit","forceRender","path","readOnly"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,MAAM,QAAQ,iCAAgC;AACvD,SAASC,aAAa,QAAQ,0CAAyC;AACvE,SAASC,IAAI,QAAQ,4BAA2B;AAChD,SAASC,YAAY,QAAQ,oCAAmC;AAChE,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,SAASC,eAAe,QAAQ,wCAAuC;AACvE,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,YAAY,QAAQ,wCAAuC;AACpE,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC/D,SAASC,MAAMC,IAAI,QAAQ,OAAM;AAEjC,SAASC,sBAAsB,QAAQ,yDAAwD;AAC/F,OAAO,eAAc;AAGrB,MAAMC,YAAY;AAElB,OAAO,MAAMC,aAA8B,CAAC,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,EAAE;IACtF,MAAM,EAAEC,CAAC,EAAE,GAAGd;IACd,MAAM,EAAEe,EAAE,EAAE,GAAGhB;IACf,MAAM,EAAEiB,UAAU,EAAE,GAAGtB;IACvB,MAAMuB,SAASnB;IACf,MAAM,CAACoB,cAAcC,gBAAgB,GAAGd,SAA4B;IACpE,MAAM,EACJe,OAAO,EAAEC,oBAAoB,EAAE,EAChC,GAAGb;IAEJ,MAAMc,iCAAiC,CAAC,0BAA0B,CAAC;IACnE,MAAMC,mBAAmB,CAAC,EAAEP,WAAW,oBAAoB,CAAC;IAE5D,MAAMQ,WAAWH,qBAAqBI,GAAG,CAACH,gCAAgC,eAAe;;IAEzFlB,UAAU;QACR,MAAMsB,oBAAoB;YACxB,MAAMC,QAAQ,MAAM1B,aAAa;gBAC/B2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;gBAC3BC,MAAM;oBACJhB;oBACAiB,MAAMnB;oBACNoB,WAAW;oBACXjB,YAAYO;gBACd;gBACAW,WAAWjB,OAAOiB,SAAS;YAC7B,GAAG,aAAa;;YAEhBf,gBAAgBQ;QAClB;QAEA,IAAId,WAAW;YACb,KAAKa;QACP;IACF,GAAG;QAACT,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;QAAIF;KAAU;IAEzE,MAAMsB,WAAqChC,YACzC,OAAO,EAAEiC,WAAWC,aAAa,EAAE;QACjC,OAAO,MAAMpC,aAAa;YACxB2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;YAC3BC,MAAM;gBACJhB;gBACAqB,WAAWC;gBACXJ,WAAW;gBACXjB,YAAYO;YACd;YACAW,WAAWjB,OAAOiB,SAAS;QAC7B;IACF,GAEA;QAACjB,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;KAAG;IAG7D,qBACE,oBAACtB;QAAO6C,WAAW7B;QAAW8B,MAAM5B;QAAY6B,OAAO1B,EAAE,sBAAsB;OAC5EI,iBAAiB,uBAChB,oBAACvB;QACC8C,cAAc;YAACN;SAAS;QACxBO,2BAAAA;QACAC,QAAQC,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QAC/CN,cAAcA;QACdiB,UAAU;YAACA;SAAS;QACpBW,UAAUlC;QACVL,MAAMA;qBAEN,oBAACX;QACC4B,UAAUoB,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QACjDuB,aAAAA;QACAC,MAAK,GAAG,+DAA+D;;QACvEC,UAAU;QACVjC,YAAYO;sBAGd,oBAAC1B,kBAAYiB,EAAE;AAKzB,EAAC"}