@payloadcms/richtext-lexical 3.0.0-beta.5 → 3.0.0-beta.50

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 (968) hide show
  1. package/README.md +1 -1
  2. package/dist/cell/index.d.ts +5 -2
  3. package/dist/cell/index.d.ts.map +1 -1
  4. package/dist/cell/index.js +45 -31
  5. package/dist/cell/index.js.map +1 -1
  6. package/dist/exports/client/Component-6AVANNNR.js +2 -0
  7. package/dist/exports/client/Component-6AVANNNR.js.map +7 -0
  8. package/dist/exports/client/Component-SZVAYRJX.js +2 -0
  9. package/dist/exports/client/Component-SZVAYRJX.js.map +7 -0
  10. package/dist/exports/client/Field-U5PHZTST.js +2 -0
  11. package/dist/exports/client/Field-U5PHZTST.js.map +7 -0
  12. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js +2 -0
  13. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js.map +7 -0
  14. package/dist/exports/client/bundled.css +1 -0
  15. package/dist/exports/client/chunk-35NZOHAF.js +2 -0
  16. package/dist/exports/client/chunk-35NZOHAF.js.map +7 -0
  17. package/dist/exports/client/chunk-3PZ2ZFQG.js +3 -0
  18. package/dist/exports/client/chunk-3PZ2ZFQG.js.map +7 -0
  19. package/dist/exports/client/chunk-FSTRW2TI.js +2 -0
  20. package/dist/exports/client/chunk-FSTRW2TI.js.map +7 -0
  21. package/dist/exports/client/chunk-M6MN4CA5.js +2 -0
  22. package/dist/exports/client/chunk-M6MN4CA5.js.map +7 -0
  23. package/dist/exports/client/chunk-Y5455JF3.js +2 -0
  24. package/dist/exports/client/chunk-Y5455JF3.js.map +7 -0
  25. package/dist/exports/client/component-FFLILIUZ.js +2 -0
  26. package/dist/exports/client/component-FFLILIUZ.js.map +7 -0
  27. package/dist/exports/client/component-RAVN56DE.js +2 -0
  28. package/dist/exports/client/component-RAVN56DE.js.map +7 -0
  29. package/dist/exports/client/component-Z34HXRX3.js +2 -0
  30. package/dist/exports/client/component-Z34HXRX3.js.map +7 -0
  31. package/dist/exports/client/index.d.ts +52 -0
  32. package/dist/exports/client/index.d.ts.map +1 -0
  33. package/dist/exports/client/index.js +36 -0
  34. package/dist/exports/client/index.js.map +7 -0
  35. package/dist/field/Field.d.ts +1 -2
  36. package/dist/field/Field.d.ts.map +1 -1
  37. package/dist/field/Field.js +69 -55
  38. package/dist/field/Field.js.map +1 -1
  39. package/dist/field/bundled.css +0 -0
  40. package/dist/field/features/align/feature.client.d.ts +4 -1
  41. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  42. package/dist/field/features/align/feature.client.js +135 -54
  43. package/dist/field/features/align/feature.client.js.map +1 -1
  44. package/dist/field/features/align/feature.server.d.ts.map +1 -1
  45. package/dist/field/features/align/feature.server.js +4 -1
  46. package/dist/field/features/align/feature.server.js.map +1 -1
  47. package/dist/field/features/align/i18n.d.ts +3 -0
  48. package/dist/field/features/align/i18n.d.ts.map +1 -0
  49. package/dist/field/features/align/i18n.js +196 -0
  50. package/dist/field/features/align/i18n.js.map +1 -0
  51. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  52. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  53. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  54. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  55. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  56. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  57. package/dist/field/features/blockquote/feature.client.js +60 -46
  58. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  59. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  60. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  61. package/dist/field/features/blockquote/feature.server.js +10 -7
  62. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  63. package/dist/field/features/blockquote/i18n.d.ts +3 -0
  64. package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
  65. package/dist/field/features/blockquote/i18n.js +100 -0
  66. package/dist/field/features/blockquote/i18n.js.map +1 -0
  67. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  68. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  69. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  70. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  71. package/dist/field/features/blocks/component/BlockContent.js +77 -67
  72. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  73. package/dist/field/features/blocks/component/FormSavePlugin.d.ts +1 -2
  74. package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -1
  75. package/dist/field/features/blocks/component/FormSavePlugin.js +2 -2
  76. package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
  77. package/dist/field/features/blocks/component/index.d.ts +0 -1
  78. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  79. package/dist/field/features/blocks/component/index.js +60 -30
  80. package/dist/field/features/blocks/component/index.js.map +1 -1
  81. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts +1 -1
  82. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -1
  83. package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  84. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  85. package/dist/field/features/blocks/drawer/index.js +5 -11
  86. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  87. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  88. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  89. package/dist/field/features/blocks/feature.client.js +58 -27
  90. package/dist/field/features/blocks/feature.client.js.map +1 -1
  91. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  92. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  93. package/dist/field/features/blocks/feature.server.js +62 -82
  94. package/dist/field/features/blocks/feature.server.js.map +1 -1
  95. package/dist/field/features/blocks/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  96. package/dist/field/features/blocks/graphQLPopulationPromise.d.ts.map +1 -0
  97. package/dist/field/features/blocks/graphQLPopulationPromise.js +31 -0
  98. package/dist/field/features/blocks/graphQLPopulationPromise.js.map +1 -0
  99. package/dist/field/features/blocks/i18n.d.ts +3 -0
  100. package/dist/field/features/blocks/i18n.d.ts.map +1 -0
  101. package/dist/field/features/blocks/i18n.js +100 -0
  102. package/dist/field/features/blocks/i18n.js.map +1 -0
  103. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +2 -4
  104. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  105. package/dist/field/features/blocks/nodes/BlocksNode.js +3 -3
  106. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  107. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  108. package/dist/field/features/blocks/plugin/commands.js +1 -2
  109. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  110. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  111. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  112. package/dist/field/features/blocks/plugin/index.js +10 -11
  113. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  114. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  115. package/dist/field/features/blocks/validate.js +22 -36
  116. package/dist/field/features/blocks/validate.js.map +1 -1
  117. package/dist/field/features/converters/html/field/index.d.ts +14 -2
  118. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  119. package/dist/field/features/converters/html/field/index.js +97 -57
  120. package/dist/field/features/converters/html/field/index.js.map +1 -1
  121. package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
  122. package/dist/field/features/createFeaturePropComponent.js +6 -3
  123. package/dist/field/features/createFeaturePropComponent.js.map +1 -1
  124. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
  125. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  126. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  127. package/dist/field/features/debug/testRecorder/feature.server.d.ts.map +1 -0
  128. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +3 -2
  129. package/dist/field/features/debug/testRecorder/feature.server.js.map +1 -0
  130. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  131. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  132. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +68 -45
  133. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  134. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
  135. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
  136. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  137. package/dist/field/features/debug/treeView/feature.server.d.ts.map +1 -0
  138. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +3 -2
  139. package/dist/field/features/debug/treeView/feature.server.js.map +1 -0
  140. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  141. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  142. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +6 -8
  143. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  144. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  145. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  146. package/dist/field/features/format/bold/feature.client.js +26 -23
  147. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  148. package/dist/field/features/format/bold/feature.server.d.ts.map +1 -1
  149. package/dist/field/features/format/bold/feature.server.js +2 -1
  150. package/dist/field/features/format/bold/feature.server.js.map +1 -1
  151. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
  152. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  153. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  154. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  155. package/dist/field/features/format/inlineCode/feature.server.d.ts.map +1 -0
  156. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +3 -2
  157. package/dist/field/features/format/inlineCode/feature.server.js.map +1 -0
  158. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  159. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  160. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  161. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  162. package/dist/field/features/format/italic/feature.client.js +27 -24
  163. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  164. package/dist/field/features/format/italic/feature.server.d.ts.map +1 -1
  165. package/dist/field/features/format/italic/feature.server.js +2 -1
  166. package/dist/field/features/format/italic/feature.server.js.map +1 -1
  167. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  168. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  169. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  170. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  171. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  172. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  173. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  174. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  175. package/dist/field/features/format/strikethrough/feature.server.d.ts.map +1 -1
  176. package/dist/field/features/format/strikethrough/feature.server.js +2 -1
  177. package/dist/field/features/format/strikethrough/feature.server.js.map +1 -1
  178. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  179. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  180. package/dist/field/features/format/subscript/feature.client.js +25 -22
  181. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  182. package/dist/field/features/format/subscript/feature.server.d.ts.map +1 -1
  183. package/dist/field/features/format/subscript/feature.server.js +2 -1
  184. package/dist/field/features/format/subscript/feature.server.js.map +1 -1
  185. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  186. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  187. package/dist/field/features/format/superscript/feature.client.js +25 -22
  188. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  189. package/dist/field/features/format/superscript/feature.server.d.ts.map +1 -1
  190. package/dist/field/features/format/superscript/feature.server.js +2 -1
  191. package/dist/field/features/format/superscript/feature.server.js.map +1 -1
  192. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  193. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  194. package/dist/field/features/format/underline/feature.client.js +25 -22
  195. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  196. package/dist/field/features/format/underline/feature.server.d.ts.map +1 -1
  197. package/dist/field/features/format/underline/feature.server.js +2 -1
  198. package/dist/field/features/format/underline/feature.server.js.map +1 -1
  199. package/dist/field/features/heading/feature.client.d.ts +4 -1
  200. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  201. package/dist/field/features/heading/feature.client.js +75 -54
  202. package/dist/field/features/heading/feature.client.js.map +1 -1
  203. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  204. package/dist/field/features/heading/feature.server.js +9 -6
  205. package/dist/field/features/heading/feature.server.js.map +1 -1
  206. package/dist/field/features/heading/i18n.d.ts +3 -0
  207. package/dist/field/features/heading/i18n.d.ts.map +1 -0
  208. package/dist/field/features/heading/i18n.js +100 -0
  209. package/dist/field/features/heading/i18n.js.map +1 -0
  210. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  211. package/dist/field/features/heading/markdownTransformer.js +1 -2
  212. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  213. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  214. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  215. package/dist/field/features/horizontalRule/component/index.js +67 -0
  216. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  217. package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
  218. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  219. package/dist/field/features/horizontalRule/feature.client.js +77 -0
  220. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  221. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  222. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  223. package/dist/field/features/horizontalRule/feature.server.js +39 -0
  224. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  225. package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
  226. package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
  227. package/dist/field/features/horizontalRule/i18n.js +100 -0
  228. package/dist/field/features/horizontalRule/i18n.js.map +1 -0
  229. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  230. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  231. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  232. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  233. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  234. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  235. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +92 -0
  236. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  237. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  238. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  239. package/dist/field/features/horizontalRule/plugin/index.js +30 -0
  240. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  241. package/dist/field/features/indent/feature.client.d.ts +4 -1
  242. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  243. package/dist/field/features/indent/feature.client.js +47 -42
  244. package/dist/field/features/indent/feature.client.js.map +1 -1
  245. package/dist/field/features/indent/feature.server.d.ts.map +1 -1
  246. package/dist/field/features/indent/feature.server.js +4 -1
  247. package/dist/field/features/indent/feature.server.js.map +1 -1
  248. package/dist/field/features/indent/i18n.d.ts +3 -0
  249. package/dist/field/features/indent/i18n.d.ts.map +1 -0
  250. package/dist/field/features/indent/i18n.js +132 -0
  251. package/dist/field/features/indent/i18n.js.map +1 -0
  252. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  253. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  254. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  255. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  256. package/dist/field/features/link/drawer/baseFields.d.ts +2 -3
  257. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  258. package/dist/field/features/link/drawer/baseFields.js +30 -43
  259. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  260. package/dist/field/features/link/drawer/index.d.ts.map +1 -1
  261. package/dist/field/features/link/drawer/index.js +32 -31
  262. package/dist/field/features/link/drawer/index.js.map +1 -1
  263. package/dist/field/features/link/drawer/types.d.ts +5 -3
  264. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  265. package/dist/field/features/link/drawer/types.js.map +1 -1
  266. package/dist/field/features/link/feature.client.d.ts +13 -1
  267. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  268. package/dist/field/features/link/feature.client.js +65 -47
  269. package/dist/field/features/link/feature.client.js.map +1 -1
  270. package/dist/field/features/link/feature.server.d.ts +10 -6
  271. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  272. package/dist/field/features/link/feature.server.js +66 -17
  273. package/dist/field/features/link/feature.server.js.map +1 -1
  274. package/dist/field/features/link/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  275. package/dist/field/features/link/graphQLPopulationPromise.d.ts.map +1 -0
  276. package/dist/field/features/link/graphQLPopulationPromise.js +31 -0
  277. package/dist/field/features/link/graphQLPopulationPromise.js.map +1 -0
  278. package/dist/field/features/link/i18n.d.ts +3 -0
  279. package/dist/field/features/link/i18n.d.ts.map +1 -0
  280. package/dist/field/features/link/i18n.js +100 -0
  281. package/dist/field/features/link/i18n.js.map +1 -0
  282. package/dist/field/features/link/markdownTransformer.d.ts +6 -0
  283. package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
  284. package/dist/field/features/link/markdownTransformer.js +50 -0
  285. package/dist/field/features/link/markdownTransformer.js.map +1 -0
  286. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  287. package/dist/field/features/link/nodes/AutoLinkNode.js +3 -2
  288. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  289. package/dist/field/features/link/nodes/LinkNode.d.ts +9 -8
  290. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  291. package/dist/field/features/link/nodes/LinkNode.js +28 -11
  292. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  293. package/dist/field/features/link/nodes/types.d.ts +2 -1
  294. package/dist/field/features/link/nodes/types.d.ts.map +1 -1
  295. package/dist/field/features/link/nodes/types.js.map +1 -1
  296. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  297. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  298. package/dist/field/features/link/plugins/autoLink/index.js +11 -12
  299. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  300. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  301. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  302. package/dist/field/features/link/plugins/clickableLink/index.js +5 -6
  303. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  304. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  305. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  306. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  307. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  308. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +179 -143
  309. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  310. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  311. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  312. package/dist/field/features/link/plugins/floatingLinkEditor/index.js +2 -2
  313. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  314. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -6
  315. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  316. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  317. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  318. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  319. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  320. package/dist/field/features/link/plugins/link/index.js +7 -16
  321. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  322. package/dist/field/features/link/validate.d.ts +6 -0
  323. package/dist/field/features/link/validate.d.ts.map +1 -0
  324. package/dist/field/features/link/validate.js +28 -0
  325. package/dist/field/features/link/validate.js.map +1 -0
  326. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  327. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  328. package/dist/field/features/lists/checklist/feature.client.js +69 -44
  329. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  330. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  331. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  332. package/dist/field/features/lists/checklist/feature.server.js +13 -10
  333. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  334. package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
  335. package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
  336. package/dist/field/features/lists/checklist/i18n.js +100 -0
  337. package/dist/field/features/lists/checklist/i18n.js.map +1 -0
  338. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  339. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  340. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  341. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  342. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  343. package/dist/field/features/lists/checklist/plugin/index.js +5 -5
  344. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  345. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  346. package/dist/field/features/lists/htmlConverter.js +13 -6
  347. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  348. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  349. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  350. package/dist/field/features/lists/orderedList/feature.client.js +97 -0
  351. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  352. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  353. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +12 -9
  354. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  355. package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
  356. package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
  357. package/dist/field/features/lists/orderedList/i18n.js +100 -0
  358. package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
  359. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  360. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  361. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  362. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  363. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  364. package/dist/field/features/lists/plugin/index.js +5 -5
  365. package/dist/field/features/lists/plugin/index.js.map +1 -1
  366. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  367. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  368. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  369. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
  370. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
  371. package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
  372. package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
  373. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  374. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  375. package/dist/field/features/lists/unorderedList/feature.client.js +97 -0
  376. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  377. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  378. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +11 -8
  379. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  380. package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
  381. package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
  382. package/dist/field/features/lists/unorderedList/i18n.js +100 -0
  383. package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
  384. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  385. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  386. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  387. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  388. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  389. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  390. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  391. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  392. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  393. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +2 -1
  394. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  395. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -2
  396. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  397. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
  398. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  399. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +4 -5
  400. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  401. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  402. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  403. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  404. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  405. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  406. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  407. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  408. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  409. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  410. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  411. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  412. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  413. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  414. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  415. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  416. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  417. package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  418. package/dist/field/features/migrations/slateToLexical/feature.server.js +2 -1
  419. package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
  420. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -2
  421. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  422. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +3 -6
  423. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  424. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +4 -5
  425. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  426. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  427. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  428. package/dist/field/features/paragraph/feature.client.js +54 -41
  429. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  430. package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
  431. package/dist/field/features/paragraph/feature.server.js +4 -1
  432. package/dist/field/features/paragraph/feature.server.js.map +1 -1
  433. package/dist/field/features/paragraph/i18n.d.ts +3 -0
  434. package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
  435. package/dist/field/features/paragraph/i18n.js +132 -0
  436. package/dist/field/features/paragraph/i18n.js.map +1 -0
  437. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  438. package/dist/field/features/relationship/drawer/commands.js +1 -2
  439. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  440. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  441. package/dist/field/features/relationship/drawer/index.js +18 -16
  442. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  443. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  444. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  445. package/dist/field/features/relationship/feature.client.js +51 -28
  446. package/dist/field/features/relationship/feature.client.js.map +1 -1
  447. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  448. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  449. package/dist/field/features/relationship/feature.server.js +43 -8
  450. package/dist/field/features/relationship/feature.server.js.map +1 -1
  451. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts +5 -0
  452. package/dist/field/features/relationship/graphQLPopulationPromise.d.ts.map +1 -0
  453. package/dist/field/features/relationship/graphQLPopulationPromise.js +29 -0
  454. package/dist/field/features/relationship/graphQLPopulationPromise.js.map +1 -0
  455. package/dist/field/features/relationship/i18n.d.ts +3 -0
  456. package/dist/field/features/relationship/i18n.d.ts.map +1 -0
  457. package/dist/field/features/relationship/i18n.js +100 -0
  458. package/dist/field/features/relationship/i18n.js.map +1 -0
  459. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +4 -9
  460. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  461. package/dist/field/features/relationship/nodes/RelationshipNode.js +12 -11
  462. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  463. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  464. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +119 -56
  465. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  466. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  467. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  468. package/dist/field/features/relationship/plugins/index.js +16 -18
  469. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  470. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  471. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -3
  472. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  473. package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
  474. package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
  475. package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
  476. package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
  477. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  478. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  479. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  480. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  481. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  482. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  483. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  484. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  485. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  486. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  487. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  488. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  489. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
  490. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  491. package/dist/field/features/toolbars/fixed/Toolbar/index.js +207 -0
  492. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  493. package/dist/field/features/toolbars/fixed/feature.client.d.ts +7 -0
  494. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  495. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  496. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  497. package/dist/field/features/toolbars/fixed/feature.server.d.ts +19 -0
  498. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  499. package/dist/field/features/toolbars/fixed/feature.server.js +21 -0
  500. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  501. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  502. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  503. package/dist/field/features/toolbars/inline/Toolbar/index.js +319 -0
  504. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  505. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  506. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  507. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  508. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  509. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  510. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  511. package/dist/field/features/toolbars/inline/feature.server.js +16 -0
  512. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  513. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  514. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  515. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +34 -23
  516. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  517. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +22 -0
  518. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  519. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +75 -102
  520. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  521. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  522. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  523. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +141 -0
  524. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  525. package/dist/field/features/toolbars/types.d.ts +48 -0
  526. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  527. package/dist/field/features/toolbars/types.js.map +1 -0
  528. package/dist/field/features/typeUtilities.d.ts +8 -0
  529. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  530. package/dist/field/features/typeUtilities.js +8 -0
  531. package/dist/field/features/typeUtilities.js.map +1 -0
  532. package/dist/field/features/types.d.ts +259 -69
  533. package/dist/field/features/types.d.ts.map +1 -1
  534. package/dist/field/features/types.js.map +1 -1
  535. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts +1 -1
  536. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  537. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +35 -37
  538. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  539. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  540. package/dist/field/features/upload/component/index.js +160 -85
  541. package/dist/field/features/upload/component/index.js.map +1 -1
  542. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  543. package/dist/field/features/upload/drawer/commands.js +1 -2
  544. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  545. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  546. package/dist/field/features/upload/drawer/index.js +17 -18
  547. package/dist/field/features/upload/drawer/index.js.map +1 -1
  548. package/dist/field/features/upload/feature.client.d.ts +4 -1
  549. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  550. package/dist/field/features/upload/feature.client.js +52 -26
  551. package/dist/field/features/upload/feature.client.js.map +1 -1
  552. package/dist/field/features/upload/feature.server.d.ts +10 -3
  553. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  554. package/dist/field/features/upload/feature.server.js +93 -15
  555. package/dist/field/features/upload/feature.server.js.map +1 -1
  556. package/dist/field/features/upload/{populationPromise.d.ts → graphQLPopulationPromise.d.ts} +1 -1
  557. package/dist/field/features/upload/graphQLPopulationPromise.d.ts.map +1 -0
  558. package/dist/field/features/upload/graphQLPopulationPromise.js +52 -0
  559. package/dist/field/features/upload/graphQLPopulationPromise.js.map +1 -0
  560. package/dist/field/features/upload/i18n.d.ts +3 -0
  561. package/dist/field/features/upload/i18n.d.ts.map +1 -0
  562. package/dist/field/features/upload/i18n.js +100 -0
  563. package/dist/field/features/upload/i18n.js.map +1 -0
  564. package/dist/field/features/upload/nodes/UploadNode.d.ts +7 -19
  565. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  566. package/dist/field/features/upload/nodes/UploadNode.js +45 -15
  567. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  568. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  569. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  570. package/dist/field/features/upload/plugin/index.js +18 -20
  571. package/dist/field/features/upload/plugin/index.js.map +1 -1
  572. package/dist/field/features/upload/validate.d.ts +2 -1
  573. package/dist/field/features/upload/validate.d.ts.map +1 -1
  574. package/dist/field/features/upload/validate.js +37 -10
  575. package/dist/field/features/upload/validate.js.map +1 -1
  576. package/dist/field/index.d.ts +3 -1
  577. package/dist/field/index.d.ts.map +1 -1
  578. package/dist/field/index.js +35 -86
  579. package/dist/field/index.js.map +1 -1
  580. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  581. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  582. package/dist/field/lexical/EditorPlugin.js +8 -4
  583. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  584. package/dist/field/lexical/LexicalEditor.d.ts +3 -1
  585. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  586. package/dist/field/lexical/LexicalEditor.js +157 -77
  587. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  588. package/dist/field/lexical/LexicalProvider.d.ts +1 -2
  589. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  590. package/dist/field/lexical/LexicalProvider.js +52 -41
  591. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  592. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +15 -4
  593. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  594. package/dist/field/lexical/config/client/EditorConfigProvider.js +61 -11
  595. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  596. package/dist/field/lexical/config/client/default.d.ts +1 -1
  597. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  598. package/dist/field/lexical/config/client/default.js.map +1 -1
  599. package/dist/field/lexical/config/client/sanitize.d.ts +3 -2
  600. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  601. package/dist/field/lexical/config/client/sanitize.js +83 -33
  602. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  603. package/dist/field/lexical/config/server/default.d.ts +2 -3
  604. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  605. package/dist/field/lexical/config/server/default.js +12 -10
  606. package/dist/field/lexical/config/server/default.js.map +1 -1
  607. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  608. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  609. package/dist/field/lexical/config/server/loader.js +4 -2
  610. package/dist/field/lexical/config/server/loader.js.map +1 -1
  611. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  612. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  613. package/dist/field/lexical/config/server/sanitize.js +39 -9
  614. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  615. package/dist/field/lexical/config/types.d.ts +3 -1
  616. package/dist/field/lexical/config/types.d.ts.map +1 -1
  617. package/dist/field/lexical/config/types.js.map +1 -1
  618. package/dist/field/lexical/nodes/index.d.ts +1 -2
  619. package/dist/field/lexical/nodes/index.d.ts.map +1 -1
  620. package/dist/field/lexical/nodes/index.js.map +1 -1
  621. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  622. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +3 -3
  623. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  624. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +10 -10
  625. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  626. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  627. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  628. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +5 -5
  629. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  630. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +8 -10
  631. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  632. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  633. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  634. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  635. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  636. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  637. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  638. package/dist/field/lexical/plugins/SlashMenu/index.js +108 -93
  639. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  640. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +2 -2
  641. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  642. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +47 -126
  643. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  644. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +1 -1
  645. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  646. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  647. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +2 -2
  648. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  649. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +116 -67
  650. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  651. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +8 -1
  652. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  653. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +83 -16
  654. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  655. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
  656. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
  657. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +21 -0
  658. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
  659. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  660. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  661. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  662. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  663. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.d.ts +5 -1
  664. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
  665. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.js +5 -18
  666. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
  667. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  668. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  669. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  670. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  671. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  672. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +19 -7
  673. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  674. package/dist/field/lexical/theme/EditorTheme.d.ts.map +1 -1
  675. package/dist/field/lexical/theme/EditorTheme.js +1 -1
  676. package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
  677. package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
  678. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  679. package/dist/field/lexical/ui/ContentEditable.js +3 -4
  680. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  681. package/dist/field/lexical/ui/icons/AI/index.js +26 -17
  682. package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
  683. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  684. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  685. package/dist/field/lexical/ui/icons/Add/index.js +21 -0
  686. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  687. package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
  688. package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
  689. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  690. package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
  691. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  692. package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
  693. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  694. package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
  695. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
  696. package/dist/field/lexical/ui/icons/Block/index.js +30 -24
  697. package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
  698. package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
  699. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
  700. package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
  701. package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
  702. package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
  703. package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
  704. package/dist/field/lexical/ui/icons/Code/index.js +14 -9
  705. package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
  706. package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
  707. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  708. package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
  709. package/dist/field/lexical/ui/icons/H1/index.js +8 -6
  710. package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
  711. package/dist/field/lexical/ui/icons/H2/index.js +8 -6
  712. package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
  713. package/dist/field/lexical/ui/icons/H3/index.js +8 -6
  714. package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
  715. package/dist/field/lexical/ui/icons/H4/index.js +8 -6
  716. package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
  717. package/dist/field/lexical/ui/icons/H5/index.js +8 -6
  718. package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
  719. package/dist/field/lexical/ui/icons/H6/index.js +8 -6
  720. package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
  721. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  722. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  723. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +21 -0
  724. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  725. package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
  726. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  727. package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
  728. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  729. package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
  730. package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
  731. package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
  732. package/dist/field/lexical/ui/icons/Link/index.js +10 -18
  733. package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
  734. package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
  735. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
  736. package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
  737. package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
  738. package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
  739. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  740. package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
  741. package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
  742. package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
  743. package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
  744. package/dist/field/lexical/ui/icons/Text/index.js +8 -6
  745. package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
  746. package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
  747. package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
  748. package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
  749. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  750. package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
  751. package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
  752. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  753. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  754. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  755. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -2
  756. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  757. package/dist/field/lexical/utils/nodeFormat.js +1 -1
  758. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  759. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  760. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  761. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  762. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  763. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  764. package/dist/field/lexical/utils/url.js +13 -2
  765. package/dist/field/lexical/utils/url.js.map +1 -1
  766. package/dist/forEachNodeRecursively.d.ts +10 -0
  767. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  768. package/dist/forEachNodeRecursively.js +24 -0
  769. package/dist/forEachNodeRecursively.js.map +1 -0
  770. package/dist/generateComponentMap.d.ts +1 -1
  771. package/dist/generateComponentMap.d.ts.map +1 -1
  772. package/dist/generateComponentMap.js +21 -29
  773. package/dist/generateComponentMap.js.map +1 -1
  774. package/dist/generateSchemaMap.d.ts +1 -1
  775. package/dist/generateSchemaMap.d.ts.map +1 -1
  776. package/dist/generateSchemaMap.js +4 -12
  777. package/dist/generateSchemaMap.js.map +1 -1
  778. package/dist/i18n.d.ts +3 -0
  779. package/dist/i18n.d.ts.map +1 -0
  780. package/dist/i18n.js +164 -0
  781. package/dist/i18n.js.map +1 -0
  782. package/dist/index.d.ts +21 -36
  783. package/dist/index.d.ts.map +1 -1
  784. package/dist/index.js +592 -201
  785. package/dist/index.js.map +1 -1
  786. package/dist/{populate → populateGraphQL}/defaultValue.d.ts +0 -1
  787. package/dist/populateGraphQL/defaultValue.d.ts.map +1 -0
  788. package/dist/{populate → populateGraphQL}/defaultValue.js +1 -19
  789. package/dist/populateGraphQL/defaultValue.js.map +1 -0
  790. package/dist/populateGraphQL/populate.d.ts +17 -0
  791. package/dist/populateGraphQL/populate.d.ts.map +1 -0
  792. package/dist/populateGraphQL/populate.js +28 -0
  793. package/dist/populateGraphQL/populate.js.map +1 -0
  794. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +12 -0
  795. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -0
  796. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +37 -0
  797. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -0
  798. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +28 -0
  799. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -0
  800. package/dist/{populate/recurseNestedFields.js → populateGraphQL/recursivelyPopulateFieldsForGraphQL.js} +7 -5
  801. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -0
  802. package/dist/recurseNodeTree.d.ts +9 -0
  803. package/dist/recurseNodeTree.d.ts.map +1 -0
  804. package/dist/recurseNodeTree.js +27 -0
  805. package/dist/recurseNodeTree.js.map +1 -0
  806. package/dist/types.d.ts +45 -8
  807. package/dist/types.d.ts.map +1 -1
  808. package/dist/types.js.map +1 -1
  809. package/dist/useLexicalFeature.d.ts.map +1 -1
  810. package/dist/useLexicalFeature.js +6 -3
  811. package/dist/useLexicalFeature.js.map +1 -1
  812. package/dist/validate/index.d.ts +2 -2
  813. package/dist/validate/index.d.ts.map +1 -1
  814. package/dist/validate/index.js +3 -2
  815. package/dist/validate/index.js.map +1 -1
  816. package/dist/validate/validateNodes.d.ts +1 -1
  817. package/dist/validate/validateNodes.d.ts.map +1 -1
  818. package/dist/validate/validateNodes.js +1 -1
  819. package/dist/validate/validateNodes.js.map +1 -1
  820. package/package.json +71 -53
  821. package/components.d.ts +0 -6
  822. package/components.js +0 -7
  823. package/dist/exports/components.d.ts +0 -6
  824. package/dist/exports/components.d.ts.map +0 -1
  825. package/dist/exports/components.js +0 -7
  826. package/dist/exports/components.js.map +0 -1
  827. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  828. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  829. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  830. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  831. package/dist/field/features/blocks/component/index.scss +0 -153
  832. package/dist/field/features/blocks/populationPromise.d.ts.map +0 -1
  833. package/dist/field/features/blocks/populationPromise.js +0 -46
  834. package/dist/field/features/blocks/populationPromise.js.map +0 -1
  835. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  836. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  837. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  838. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  839. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  840. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  841. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  842. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  843. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  844. package/dist/field/features/debug/testrecorder/feature.server.d.ts.map +0 -1
  845. package/dist/field/features/debug/testrecorder/feature.server.js.map +0 -1
  846. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  847. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  848. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  849. package/dist/field/features/debug/testrecorder/plugin/index.scss +0 -49
  850. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  851. package/dist/field/features/debug/treeview/feature.server.d.ts.map +0 -1
  852. package/dist/field/features/debug/treeview/feature.server.js.map +0 -1
  853. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  854. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  855. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  856. package/dist/field/features/debug/treeview/plugin/index.scss +0 -78
  857. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  858. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  859. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  860. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  861. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  862. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  863. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  864. package/dist/field/features/format/inlinecode/feature.server.d.ts.map +0 -1
  865. package/dist/field/features/format/inlinecode/feature.server.js.map +0 -1
  866. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  867. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  868. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  869. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  870. package/dist/field/features/indent/index.scss +0 -4
  871. package/dist/field/features/link/drawer/index.scss +0 -50
  872. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +0 -78
  873. package/dist/field/features/link/populationPromise.d.ts.map +0 -1
  874. package/dist/field/features/link/populationPromise.js +0 -46
  875. package/dist/field/features/link/populationPromise.js.map +0 -1
  876. package/dist/field/features/lists/common/markdown.js.map +0 -1
  877. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  878. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  879. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  880. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  881. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  882. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  883. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  884. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  885. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  886. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  887. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  888. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  889. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  890. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  891. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -14
  892. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +0 -14
  893. package/dist/field/features/relationship/nodes/components/index.scss +0 -97
  894. package/dist/field/features/relationship/populationPromise.d.ts +0 -4
  895. package/dist/field/features/relationship/populationPromise.d.ts.map +0 -1
  896. package/dist/field/features/relationship/populationPromise.js +0 -24
  897. package/dist/field/features/relationship/populationPromise.js.map +0 -1
  898. package/dist/field/features/upload/component/index.scss +0 -152
  899. package/dist/field/features/upload/populationPromise.d.ts.map +0 -1
  900. package/dist/field/features/upload/populationPromise.js +0 -46
  901. package/dist/field/features/upload/populationPromise.js.map +0 -1
  902. package/dist/field/index.scss +0 -46
  903. package/dist/field/lexical/LexicalEditor.scss +0 -56
  904. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  905. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  906. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  907. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.scss +0 -37
  908. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  909. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  910. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  911. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  912. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  913. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  914. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  915. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.scss +0 -100
  916. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  917. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  918. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +0 -270
  919. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  920. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.scss +0 -57
  921. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  922. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  923. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  924. package/dist/field/lexical/plugins/SlashMenu/index.scss +0 -61
  925. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -31
  926. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +0 -1
  927. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +0 -1
  928. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -55
  929. package/dist/field/lexical/theme/EditorTheme.scss +0 -505
  930. package/dist/field/lexical/ui/ContentEditable.scss +0 -25
  931. package/dist/populate/defaultValue.d.ts.map +0 -1
  932. package/dist/populate/defaultValue.js.map +0 -1
  933. package/dist/populate/populate.d.ts +0 -21
  934. package/dist/populate/populate.d.ts.map +0 -1
  935. package/dist/populate/populate.js +0 -21
  936. package/dist/populate/populate.js.map +0 -1
  937. package/dist/populate/recurseNestedFields.d.ts +0 -25
  938. package/dist/populate/recurseNestedFields.d.ts.map +0 -1
  939. package/dist/populate/recurseNestedFields.js.map +0 -1
  940. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  941. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  942. package/dist/populate/richTextRelationshipPromise.js +0 -68
  943. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  944. package/dist/scss/app.scss +0 -209
  945. package/dist/scss/colors.scss +0 -269
  946. package/dist/scss/fonts.scss +0 -75
  947. package/dist/scss/queries.scss +0 -27
  948. package/dist/scss/resets.scss +0 -17
  949. package/dist/scss/styles.scss +0 -11
  950. package/dist/scss/svg.scss +0 -10
  951. package/dist/scss/toastify.scss +0 -58
  952. package/dist/scss/type.scss +0 -117
  953. package/dist/scss/vars.scss +0 -220
  954. package/dist/scss/z-index.scss +0 -9
  955. package/src/index.ts +0 -423
  956. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  957. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  958. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  959. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  960. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  961. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  962. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  963. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  964. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  965. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  966. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  967. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  968. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
package/README.md CHANGED
@@ -14,7 +14,7 @@ npm install @payloadcms/richtext-lexical
14
14
  ## Usage
15
15
 
16
16
  ```ts
17
- import { buildConfig } from 'payload/config'
17
+ import { buildConfig } from 'payload'
18
18
  import { lexicalEditor } from '@payloadcms/richtext-lexical'
19
19
 
20
20
  export default buildConfig({
@@ -1,6 +1,9 @@
1
- import type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js';
1
+ import type { EditorConfig as LexicalEditorConfig } from 'lexical';
2
+ import type { CellComponentProps } from 'payload';
2
3
  import React from 'react';
3
- export declare const RichTextCell: React.FC<{
4
+ import type { LexicalFieldAdminProps } from '../types.js';
5
+ export declare const RichTextCell: React.FC<CellComponentProps & {
6
+ admin?: LexicalFieldAdminProps;
4
7
  lexicalEditorConfig: LexicalEditorConfig;
5
8
  }>;
6
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AASnF,OAAO,KAA8B,MAAM,OAAO,CAAA;AAWlD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,mBAAmB,EAAE,mBAAmB,CAAA;CACzC,CA0JA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cell/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAKjD,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,OAAO,KAAK,EAAqC,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAO5F,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CACjC,kBAAkB,GAAG;IACnB,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,mBAAmB,EAAE,mBAAmB,CAAA;CACzC,CAwKF,CAAA"}
@@ -1,34 +1,35 @@
1
1
  'use client';
2
- import lexicalHeadlessImport from '@lexical/headless';
3
- const { createHeadlessEditor } = lexicalHeadlessImport;
4
- import lexicalImport from 'lexical';
5
- const { $getRoot } = lexicalImport;
6
- import { useTableCell } from '@payloadcms/ui/elements/Table';
7
- import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider';
8
- import { useClientFunctions } from '@payloadcms/ui/providers/ClientFunction';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { createHeadlessEditor } from '@lexical/headless';
4
+ import { useClientFunctions, useTableCell } from '@payloadcms/ui/client';
5
+ import { $getRoot } from 'lexical';
9
6
  import React, { useEffect, useState } from 'react';
10
7
  import { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js';
11
8
  import { loadClientFeatures } from '../field/lexical/config/client/loader.js';
12
9
  import { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js';
13
10
  import { getEnabledNodes } from '../field/lexical/nodes/index.js';
14
11
  export const RichTextCell = (props)=>{
15
- const { lexicalEditorConfig } = props;
12
+ const { admin, lexicalEditorConfig, richTextComponentMap } = props;
16
13
  const [preview, setPreview] = React.useState('Loading...');
17
- const { schemaPath } = useFieldProps();
18
- const { cellData, richTextComponentMap } = useTableCell();
14
+ const { cellData, cellProps: { schemaPath } } = useTableCell();
19
15
  const clientFunctions = useClientFunctions();
20
16
  const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false);
21
17
  const [featureProviders, setFeatureProviders] = useState([]);
22
18
  const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] = useState(null);
23
- let featureProviderComponents = richTextComponentMap.get('features')// TODO: Type better
19
+ const featureProviderComponents = richTextComponentMap.get('features').sort((a, b)=>a.order - b.order) // order by order
24
20
  ;
25
- // order by order
26
- featureProviderComponents = featureProviderComponents.sort((a, b)=>a.order - b.order);
27
- const featureComponentsWithFeaturesLength = Array.from(richTextComponentMap.keys()).filter((key)=>key.startsWith(`feature.`) && !key.includes('.fields.')).length + featureProviderComponents.length;
21
+ let featureProvidersAndComponentsToLoad = 0 // feature providers and components
22
+ ;
23
+ for (const featureProvider of featureProviderComponents){
24
+ const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key)=>key.startsWith(`feature.${featureProvider.key}.components.`));
25
+ featureProvidersAndComponentsToLoad += 1;
26
+ featureProvidersAndComponentsToLoad += featureComponentKeys.length;
27
+ }
28
28
  useEffect(()=>{
29
29
  if (!hasLoadedFeatures) {
30
30
  const featureProvidersLocal = [];
31
- let featureProvidersAndComponentsLoaded = 0;
31
+ let featureProvidersAndComponentsLoaded = 0 // feature providers and components only
32
+ ;
32
33
  Object.entries(clientFunctions).forEach(([key, plugin])=>{
33
34
  if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {
34
35
  if (!key.includes('.components.')) {
@@ -37,7 +38,7 @@ export const RichTextCell = (props)=>{
37
38
  featureProvidersAndComponentsLoaded++;
38
39
  }
39
40
  });
40
- if (featureProvidersAndComponentsLoaded === featureComponentsWithFeaturesLength) {
41
+ if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {
41
42
  setFeatureProviders(featureProvidersLocal);
42
43
  setHasLoadedFeatures(true);
43
44
  /**
@@ -50,10 +51,12 @@ export const RichTextCell = (props)=>{
50
51
  lexical: lexicalEditorConfig
51
52
  }
52
53
  });
53
- setFinalSanitizedEditorConfig(sanitizeClientEditorConfig(lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig, resolvedClientFeatures));
54
+ setFinalSanitizedEditorConfig(sanitizeClientEditorConfig(lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig, resolvedClientFeatures, admin));
54
55
  }
55
56
  }
56
57
  }, [
58
+ admin,
59
+ featureProviderComponents,
57
60
  hasLoadedFeatures,
58
61
  clientFunctions,
59
62
  schemaPath,
@@ -61,9 +64,13 @@ export const RichTextCell = (props)=>{
61
64
  featureProviders,
62
65
  finalSanitizedEditorConfig,
63
66
  lexicalEditorConfig,
64
- featureComponentsWithFeaturesLength
67
+ richTextComponentMap,
68
+ featureProvidersAndComponentsToLoad
65
69
  ]);
66
70
  useEffect(()=>{
71
+ if (!hasLoadedFeatures) {
72
+ return;
73
+ }
67
74
  let dataToUse = cellData;
68
75
  if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {
69
76
  setPreview('');
@@ -112,20 +119,27 @@ export const RichTextCell = (props)=>{
112
119
  finalSanitizedEditorConfig
113
120
  ]);
114
121
  if (!hasLoadedFeatures) {
115
- return /*#__PURE__*/ React.createElement(React.Fragment, null, Array.isArray(featureProviderComponents) && featureProviderComponents.map((featureProvider)=>{
116
- // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}
117
- const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key)=>key.startsWith(`feature.${featureProvider.key}.components.`));
118
- const featureComponents = featureComponentKeys.map((key)=>{
119
- return richTextComponentMap.get(key);
120
- });
121
- return /*#__PURE__*/ React.createElement(React.Fragment, {
122
- key: featureProvider.key
123
- }, featureComponents?.length ? featureComponents.map((FeatureComponent)=>{
124
- return FeatureComponent;
125
- }) : null, featureProvider.ClientComponent);
126
- }));
122
+ return /*#__PURE__*/ _jsx(React.Fragment, {
123
+ children: Array.isArray(featureProviderComponents) && featureProviderComponents.map((featureProvider)=>{
124
+ // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}
125
+ const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key)=>key.startsWith(`feature.${featureProvider.key}.components.`));
126
+ const featureComponents = featureComponentKeys.map((key)=>{
127
+ return richTextComponentMap.get(key);
128
+ });
129
+ return /*#__PURE__*/ _jsxs(React.Fragment, {
130
+ children: [
131
+ featureComponents?.length ? featureComponents.map((FeatureComponent)=>{
132
+ return FeatureComponent;
133
+ }) : null,
134
+ featureProvider.ClientComponent
135
+ ]
136
+ }, featureProvider.key);
137
+ })
138
+ });
127
139
  }
128
- return /*#__PURE__*/ React.createElement("span", null, preview);
140
+ return /*#__PURE__*/ _jsx("span", {
141
+ children: preview
142
+ });
129
143
  };
130
144
 
131
145
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/cell/index.tsx"],"sourcesContent":["'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical/LexicalEditor.js'\n\nimport lexicalHeadlessImport from '@lexical/headless'\nconst { createHeadlessEditor } = lexicalHeadlessImport\nimport lexicalImport from 'lexical'\nconst { $getRoot } = lexicalImport\nimport { useTableCell } from '@payloadcms/ui/elements/Table'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { useClientFunctions } from '@payloadcms/ui/providers/ClientFunction'\nimport React, { useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../field/features/types.js'\nimport type { SanitizedClientEditorConfig } from '../field/lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js'\nimport { loadClientFeatures } from '../field/lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js'\nimport { getEnabledNodes } from '../field/lexical/nodes/index.js'\n\nexport const RichTextCell: React.FC<{\n lexicalEditorConfig: LexicalEditorConfig\n}> = (props) => {\n const { lexicalEditorConfig } = props\n\n const [preview, setPreview] = React.useState('Loading...')\n const { schemaPath } = useFieldProps()\n\n const { cellData, richTextComponentMap } = useTableCell()\n\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n let featureProviderComponents: GeneratedFeatureProviderComponent[] = richTextComponentMap.get(\n 'features',\n ) as GeneratedFeatureProviderComponent[] // TODO: Type better\n // order by order\n featureProviderComponents = featureProviderComponents.sort((a, b) => a.order - b.order)\n\n const featureComponentsWithFeaturesLength =\n Array.from(richTextComponentMap.keys()).filter(\n (key) => key.startsWith(`feature.`) && !key.includes('.fields.'),\n ).length + featureProviderComponents.length\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureComponentsWithFeaturesLength) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n ),\n )\n }\n }\n }, [\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n featureComponentsWithFeaturesLength,\n ])\n\n useEffect(() => {\n let dataToUse = cellData\n if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {\n setPreview('')\n return\n }\n\n // Transform data through load hooks\n if (finalSanitizedEditorConfig?.features?.hooks?.load?.length) {\n finalSanitizedEditorConfig.features.hooks.load.forEach((hook) => {\n dataToUse = hook({ incomingEditorState: dataToUse })\n })\n }\n\n if (!dataToUse || typeof dataToUse !== 'object') {\n setPreview('')\n return\n }\n\n // If data is from Slate and not Lexical\n if (Array.isArray(dataToUse) && !('root' in dataToUse)) {\n setPreview('')\n return\n }\n\n // If data is from payload-plugin-lexical\n if ('jsonContent' in dataToUse) {\n setPreview('')\n return\n }\n\n // initialize headless editor\n const headlessEditor = createHeadlessEditor({\n namespace: finalSanitizedEditorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig: finalSanitizedEditorConfig }),\n theme: finalSanitizedEditorConfig.lexical.theme,\n })\n headlessEditor.setEditorState(headlessEditor.parseEditorState(dataToUse))\n\n const textContent =\n headlessEditor.getEditorState().read(() => {\n return $getRoot().getTextContent()\n }) || ''\n\n // Limiting the number of characters shown is done in a CSS rule\n setPreview(textContent)\n }, [cellData, lexicalEditorConfig, hasLoadedFeatures, finalSanitizedEditorConfig])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n })\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return <span>{preview}</span>\n}\n"],"names":["lexicalHeadlessImport","createHeadlessEditor","lexicalImport","$getRoot","useTableCell","useFieldProps","useClientFunctions","React","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","getEnabledNodes","RichTextCell","props","lexicalEditorConfig","preview","setPreview","schemaPath","cellData","richTextComponentMap","clientFunctions","hasLoadedFeatures","setHasLoadedFeatures","featureProviders","setFeatureProviders","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","featureProviderComponents","get","sort","a","b","order","featureComponentsWithFeaturesLength","Array","from","keys","filter","key","startsWith","includes","length","featureProvidersLocal","featureProvidersAndComponentsLoaded","Object","entries","forEach","plugin","push","resolvedClientFeatures","unSanitizedEditorConfig","features","lexical","dataToUse","hooks","load","hook","incomingEditorState","isArray","headlessEditor","namespace","nodes","editorConfig","theme","setEditorState","parseEditorState","textContent","getEditorState","read","getTextContent","Fragment","map","featureProvider","featureComponentKeys","featureComponents","FeatureComponent","ClientComponent","span"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
1
+ {"version":3,"sources":["../../src/cell/index.tsx"],"sourcesContent":["'use client'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\nimport type { CellComponentProps } from 'payload'\n\nimport { createHeadlessEditor } from '@lexical/headless'\nimport { useClientFunctions, useTableCell } from '@payloadcms/ui/client'\nimport { $getRoot } from 'lexical'\nimport React, { useEffect, useState } from 'react'\n\nimport type { FeatureProviderClient } from '../field/features/types.js'\nimport type { SanitizedClientEditorConfig } from '../field/lexical/config/types.js'\nimport type { GeneratedFeatureProviderComponent, LexicalFieldAdminProps } from '../types.js'\n\nimport { defaultEditorLexicalConfig } from '../field/lexical/config/client/default.js'\nimport { loadClientFeatures } from '../field/lexical/config/client/loader.js'\nimport { sanitizeClientEditorConfig } from '../field/lexical/config/client/sanitize.js'\nimport { getEnabledNodes } from '../field/lexical/nodes/index.js'\n\nexport const RichTextCell: React.FC<\n CellComponentProps & {\n admin?: LexicalFieldAdminProps\n lexicalEditorConfig: LexicalEditorConfig\n }\n> = (props) => {\n const { admin, lexicalEditorConfig, richTextComponentMap } = props\n\n const [preview, setPreview] = React.useState('Loading...')\n\n const {\n cellData,\n cellProps: { schemaPath },\n } = useTableCell()\n\n const clientFunctions = useClientFunctions()\n const [hasLoadedFeatures, setHasLoadedFeatures] = useState(false)\n\n const [featureProviders, setFeatureProviders] = useState<FeatureProviderClient<unknown>[]>([])\n\n const [finalSanitizedEditorConfig, setFinalSanitizedEditorConfig] =\n useState<SanitizedClientEditorConfig>(null)\n\n const featureProviderComponents: GeneratedFeatureProviderComponent[] = (\n richTextComponentMap.get('features') as GeneratedFeatureProviderComponent[]\n ).sort((a, b) => a.order - b.order) // order by order\n\n let featureProvidersAndComponentsToLoad = 0 // feature providers and components\n for (const featureProvider of featureProviderComponents) {\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n featureProvidersAndComponentsToLoad += 1\n featureProvidersAndComponentsToLoad += featureComponentKeys.length\n }\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n const featureProvidersLocal: FeatureProviderClient<unknown>[] = []\n let featureProvidersAndComponentsLoaded = 0 // feature providers and components only\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`lexicalFeature.${schemaPath}.`)) {\n if (!key.includes('.components.')) {\n featureProvidersLocal.push(plugin)\n }\n featureProvidersAndComponentsLoaded++\n }\n })\n\n if (featureProvidersAndComponentsLoaded === featureProvidersAndComponentsToLoad) {\n setFeatureProviders(featureProvidersLocal)\n setHasLoadedFeatures(true)\n\n /**\n * Loaded feature provided => create the final sanitized editor config\n */\n\n const resolvedClientFeatures = loadClientFeatures({\n clientFunctions,\n schemaPath,\n unSanitizedEditorConfig: {\n features: featureProvidersLocal,\n lexical: lexicalEditorConfig,\n },\n })\n\n setFinalSanitizedEditorConfig(\n sanitizeClientEditorConfig(\n lexicalEditorConfig ? lexicalEditorConfig : defaultEditorLexicalConfig,\n resolvedClientFeatures,\n admin,\n ),\n )\n }\n }\n }, [\n admin,\n featureProviderComponents,\n hasLoadedFeatures,\n clientFunctions,\n schemaPath,\n featureProviderComponents.length,\n featureProviders,\n finalSanitizedEditorConfig,\n lexicalEditorConfig,\n richTextComponentMap,\n featureProvidersAndComponentsToLoad,\n ])\n\n useEffect(() => {\n if (!hasLoadedFeatures) {\n return\n }\n let dataToUse = cellData\n if (dataToUse == null || !hasLoadedFeatures || !finalSanitizedEditorConfig) {\n setPreview('')\n return\n }\n\n // Transform data through load hooks\n if (finalSanitizedEditorConfig?.features?.hooks?.load?.length) {\n finalSanitizedEditorConfig.features.hooks.load.forEach((hook) => {\n dataToUse = hook({ incomingEditorState: dataToUse })\n })\n }\n\n if (!dataToUse || typeof dataToUse !== 'object') {\n setPreview('')\n return\n }\n\n // If data is from Slate and not Lexical\n if (Array.isArray(dataToUse) && !('root' in dataToUse)) {\n setPreview('')\n return\n }\n\n // If data is from payload-plugin-lexical\n if ('jsonContent' in dataToUse) {\n setPreview('')\n return\n }\n\n // initialize headless editor\n const headlessEditor = createHeadlessEditor({\n namespace: finalSanitizedEditorConfig.lexical.namespace,\n nodes: getEnabledNodes({ editorConfig: finalSanitizedEditorConfig }),\n theme: finalSanitizedEditorConfig.lexical.theme,\n })\n headlessEditor.setEditorState(headlessEditor.parseEditorState(dataToUse))\n\n const textContent =\n headlessEditor.getEditorState().read(() => {\n return $getRoot().getTextContent()\n }) || ''\n\n // Limiting the number of characters shown is done in a CSS rule\n setPreview(textContent)\n }, [cellData, lexicalEditorConfig, hasLoadedFeatures, finalSanitizedEditorConfig])\n\n if (!hasLoadedFeatures) {\n return (\n <React.Fragment>\n {Array.isArray(featureProviderComponents) &&\n featureProviderComponents.map((featureProvider) => {\n // get all components starting with key feature.${FeatureProvider.key}.components.{featureComponentKey}\n const featureComponentKeys = Array.from(richTextComponentMap.keys()).filter((key) =>\n key.startsWith(`feature.${featureProvider.key}.components.`),\n )\n\n const featureComponents: React.ReactNode[] = featureComponentKeys.map((key) => {\n return richTextComponentMap.get(key)\n })\n\n return (\n <React.Fragment key={featureProvider.key}>\n {featureComponents?.length\n ? featureComponents.map((FeatureComponent) => {\n return FeatureComponent\n })\n : null}\n {featureProvider.ClientComponent}\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n }\n\n return <span>{preview}</span>\n}\n"],"names":["createHeadlessEditor","useClientFunctions","useTableCell","$getRoot","React","useEffect","useState","defaultEditorLexicalConfig","loadClientFeatures","sanitizeClientEditorConfig","getEnabledNodes","RichTextCell","props","admin","lexicalEditorConfig","richTextComponentMap","preview","setPreview","cellData","cellProps","schemaPath","clientFunctions","hasLoadedFeatures","setHasLoadedFeatures","featureProviders","setFeatureProviders","finalSanitizedEditorConfig","setFinalSanitizedEditorConfig","featureProviderComponents","get","sort","a","b","order","featureProvidersAndComponentsToLoad","featureProvider","featureComponentKeys","Array","from","keys","filter","key","startsWith","length","featureProvidersLocal","featureProvidersAndComponentsLoaded","Object","entries","forEach","plugin","includes","push","resolvedClientFeatures","unSanitizedEditorConfig","features","lexical","dataToUse","hooks","load","hook","incomingEditorState","isArray","headlessEditor","namespace","nodes","editorConfig","theme","setEditorState","parseEditorState","textContent","getEditorState","read","getTextContent","Fragment","map","featureComponents","FeatureComponent","ClientComponent","span"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";var d=o=>{let{data:n}=o;return t("div",{children:["Unknown converted Slate node: ",e("strong",{children:n?.nodeType})]})};export{d as UnknownConvertedNodeComponent};
2
+ //# sourceMappingURL=Component-6AVANNNR.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.tsx"],
4
+ "sourcesContent": ["import React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted Slate node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
5
+ "mappings": "AAYI,OACgC,OAAAA,EADhC,QAAAC,MAAA,oBAJG,IAAMC,EAAkDC,GAAU,CACvE,GAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OACEF,EAAC,OAAI,2CAC2BD,EAAC,UAAQ,SAAAI,GAAM,SAAS,GACxD,CAEJ",
6
+ "names": ["jsx", "jsxs", "UnknownConvertedNodeComponent", "props", "data"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";var d=o=>{let{data:n}=o;return t("div",{children:["Unknown converted payload-plugin-lexical node: ",e("strong",{children:n?.nodeType})]})};export{d as UnknownConvertedNodeComponent};
2
+ //# sourceMappingURL=Component-SZVAYRJX.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.tsx"],
4
+ "sourcesContent": ["import React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted payload-plugin-lexical node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
5
+ "mappings": "AAYI,OACiD,OAAAA,EADjD,QAAAC,MAAA,oBAJG,IAAMC,EAAkDC,GAAU,CACvE,GAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OACEF,EAAC,OAAI,4DAC4CD,EAAC,UAAQ,SAAAI,GAAM,SAAS,GACzE,CAEJ",
6
+ "names": ["jsx", "jsxs", "UnknownConvertedNodeComponent", "props", "data"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use client";import{a as he,b as G,c as O,e as Ee}from"./chunk-35NZOHAF.js";import{a as ye,b as N}from"./chunk-Y5455JF3.js";import{FieldDescription as Nn,FieldError as In,FieldLabel as Pn,useField as wn,useFieldProps as On,withCondition as kn}from"@payloadcms/ui/client";import{useCallback as An}from"react";import{ErrorBoundary as Dn}from"react-error-boundary";import"./bundled.css";import{LexicalComposer as vn}from"@lexical/react/LexicalComposer.js";import*as ct from"react";import{useMemo as st}from"react";import{useLexicalComposerContext as En}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as xn}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as bn}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Mn}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Cn}from"@lexical/react/LexicalRichTextPlugin.js";import{TabIndentationPlugin as Tn}from"@lexical/react/LexicalTabIndentationPlugin.js";import{useTranslation as Rn}from"@payloadcms/ui/client";import{BLUR_COMMAND as Sn,COMMAND_PRIORITY_LOW as rt,FOCUS_COMMAND as Ln}from"lexical";import*as j from"react";import{useEffect as it,useState as lt}from"react";import{jsx as xe}from"react/jsx-runtime";var F=({anchorElem:t,clientProps:e,plugin:n})=>n.position==="floatingAnchorElem"?n.Component&&xe(n.Component,{anchorElem:t,clientProps:e}):n.Component&&xe(n.Component,{clientProps:e});import{MarkdownShortcutPlugin as ft}from"@lexical/react/LexicalMarkdownShortcutPlugin.js";import{jsx as pt}from"react/jsx-runtime";var be=()=>{let{editorConfig:t}=N();return pt(ft,{transformers:t.features.markdownTransformers})};import{useLexicalComposerContext as Kt}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as Fe}from"@payloadcms/ui/client";import{useCallback as Be,useMemo as Gt,useState as Wt}from"react";import*as He from"react";import*as _e from"react-dom";import{useLexicalComposerContext as Ot}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as kt}from"@lexical/utils";import{$getSelection as ue,$isRangeSelection as me,$isTextNode as At,COMMAND_PRIORITY_LOW as Dt,createCommand as Bt}from"lexical";import{useCallback as Ne,useEffect as Ie,useState as Ft}from"react";import*as ce from"react";import{useLexicalComposerContext as Se}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Me}from"@lexical/utils";import{$getSelection as gt,$isRangeSelection as ht,COMMAND_PRIORITY_LOW as W,KEY_ARROW_DOWN_COMMAND as yt,KEY_ARROW_UP_COMMAND as Et,KEY_ENTER_COMMAND as xt,KEY_ESCAPE_COMMAND as bt,KEY_TAB_COMMAND as Mt,createCommand as Ct}from"lexical";import{useCallback as J,useEffect as Y,useLayoutEffect as Tt,useMemo as Rt,useRef as St,useState as Lt}from"react";var vt="slash-menu-popup",Ce=t=>{let e=document.getElementById("slash-menu");if(!e)return;let n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),t.scrollIntoView({block:"nearest"})};function Nt(t,e,n){let o=n;for(let r=o;r<=e.length;r++)t.substring(t.length-r)===e.substring(0,r)&&(o=r);return o}function It(t){let e=gt();if(!ht(e)||!e.isCollapsed())return null;let n=e.anchor;if(n.type!=="text")return null;let o=n.getNode();if(!o.isSimpleText())return null;let r=n.offset,u=o.getTextContent().slice(0,r),d=t.replaceableString.length,g=Nt(u,t.matchingString,d),s=r-g;if(s<0)return null;let a;return s===0?[a]=o.splitText(r):[,a]=o.splitText(s,r),a}function Pt(t,e){let n=getComputedStyle(t),o=n.position==="absolute",r=e?/(auto|scroll|hidden)/:/(auto|scroll)/;if(n.position==="fixed")return document.body;for(let u=t;u=u.parentElement;)if(n=getComputedStyle(u),!(o&&n.position==="static")&&r.test(n.overflow+n.overflowY+n.overflowX))return u;return document.body}function Te(t,e){let n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return n.top>o.top&&n.top<o.bottom}function wt(t,e,n,o){let[r]=Se();Y(()=>{if(e!=null&&t!=null){let u=r.getRootElement(),d=u!=null?Pt(u,!1):document.body,g=!1,s=Te(e,d),a=function(){g||(window.requestAnimationFrame(function(){n(),g=!1}),g=!0);let m=Te(e,d);m!==s&&(s=m,o?.(m))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",a,{capture:!0,passive:!0}),c.observe(e),()=>{c.unobserve(e),window.removeEventListener("resize",n),document.removeEventListener("scroll",a,!0)}}},[e,r,o,n,t])}var Re=Ct("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function Le({anchorElementRef:t,close:e,editor:n,groups:o,menuRenderFn:r,onSelectItem:u,resolution:d,shouldSplitNodeWithQuery:g=!1}){let[s,a]=Lt(null),c=d.match&&d.match.matchingString||"",m=J(p=>{let f=n.getRootElement();f!==null&&(f.setAttribute("aria-activedescendant",`${vt}__item-${p.key}`),a(p.key))},[n]),i=J(()=>{if(o!==null&&c!=null){let p=o.flatMap(f=>f.items);if(p.length){let f=p[0];m(f)}}},[o,m,c]);Y(()=>{i()},[c,i]);let l=J(p=>{n.update(()=>{let f=d.match!=null&&g?It(d.match):null;u(p,f,e,d.match?d.match.matchingString:"")})},[n,g,d.match,u,e]);Y(()=>()=>{let p=n.getRootElement();p!==null&&p.removeAttribute("aria-activedescendant")},[n]),Tt(()=>{o===null?a(null):s===null&&i()},[o,s,m,i]),Y(()=>Me(n.registerCommand(Re,({item:p})=>p.ref&&p.ref.current!=null?(Ce(p.ref.current),!0):!1,W)),[n,m]),Y(()=>Me(n.registerCommand(yt,p=>{let f=p;if(o!==null&&o.length&&s!==null){let y=o.flatMap(b=>b.items),h=y.findIndex(b=>b.key===s),x=h!==y.length-1?h+1:0,M=y[x];m(M),M.ref!=null&&M.ref.current&&n.dispatchCommand(Re,{index:x,item:M}),f.preventDefault(),f.stopImmediatePropagation()}return!0},W),n.registerCommand(Et,p=>{let f=p;if(o!==null&&o.length&&s!==null){let y=o.flatMap(b=>b.items),h=y.findIndex(b=>b.key===s),x=h!==0?h-1:y.length-1,M=y[x];m(M),M.ref!=null&&M.ref.current&&Ce(M.ref.current),f.preventDefault(),f.stopImmediatePropagation()}return!0},W),n.registerCommand(bt,p=>{let f=p;return f.preventDefault(),f.stopImmediatePropagation(),e(),!0},W),n.registerCommand(Mt,p=>{let f=p;if(o===null||s===null)return!1;let h=o.flatMap(x=>x.items).find(x=>x.key===s);return h?(f.preventDefault(),f.stopImmediatePropagation(),l(h),!0):!1},W),n.registerCommand(xt,p=>{if(o===null||s===null)return!1;let y=o.flatMap(h=>h.items).find(h=>h.key===s);return y?(p!==null&&(p.preventDefault(),p.stopImmediatePropagation()),l(y),!0):!1},W)),[l,e,n,o,s,m]);let E=Rt(()=>({groups:o,selectItemAndCleanUp:l,selectedItemKey:s,setSelectedItemKey:a}),[l,s,o]);return r(t,E,d.match?d.match.matchingString:"")}function ve(t,e,n,o){let[r]=Se(),u=St(document.createElement("div")),d=J(()=>{let s=r.getRootElement(),a=u.current,c=32,m=a.firstChild;if(s!==null&&e!==null){let{height:i,width:l}=e.getRect(),{left:E,top:p}=e.getRect(),f=p;if(p-=t.getBoundingClientRect().top+window.scrollY,E-=t.getBoundingClientRect().left+window.scrollX,a.style.left=`${E+window.scrollX}px`,a.style.height=`${i}px`,a.style.width=`${l}px`,m!==null){let y=m.getBoundingClientRect(),h=y.height,x=y.width,M=s.getBoundingClientRect();E+x>M.right&&(a.style.left=`${M.right-x+window.scrollX}px`);let b=f+h+c>window.innerHeight,T=f<0;b&&!T?a.style.top=`${p+c-h+window.scrollY-(i+24)}px`:a.style.top=`${p+window.scrollY+c}px`}a.isConnected||(o!=null&&(a.className=o),a.setAttribute("aria-label","Slash menu"),a.setAttribute("id","slash-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",t.append(a)),u.current=a,s.setAttribute("aria-controls","slash-menu")}},[r,e,o,t]);Y(()=>{let s=r.getRootElement();if(e!==null)return d(),()=>{s!==null&&s.removeAttribute("aria-controls");let a=u.current;a!==null&&a.isConnected&&a.remove()}},[r,d,e]);let g=J(s=>{e!==null&&(s||n(null))},[e,n]);return wt(e,u.current,d,g),u}import{jsx as $t}from"react/jsx-runtime";var ke=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;function Ht(t){let e=t.anchor;if(e.type!=="text")return null;let n=e.getNode();if(!n.isSimpleText())return null;let o=e.offset;return n.getTextContent().slice(0,o)}function Pe(t,e,n){let o=n.getSelection();if(o===null||!o.isCollapsed)return!1;let r=o.anchorNode,u=t,d=o.anchorOffset;if(r==null||d==null)return!1;try{e.setStart(r,u),e.setEnd(r,d>1?d:1)}catch{return!1}return!0}function _t(t){let e=null;return t.getEditorState().read(()=>{let n=ue();me(n)&&(e=Ht(n))}),e}function we(t,e){return e!==0?!1:t.getEditorState().read(()=>{let n=ue();if(me(n)){let u=n.anchor.getNode().getPreviousSibling();return At(u)&&u.isTextEntity()}return!1})}function Oe(t){ce.startTransition?ce.startTransition(t):t()}var de=Bt("ENABLE_SLASH_MENU_COMMAND");function Ae({anchorClassName:t,anchorElem:e,groups:n,menuRenderFn:o,onClose:r,onOpen:u,onQueryChange:d,onSelectItem:g,triggerFn:s}){let[a]=Ot(),[c,m]=Ft(null),i=ve(e,c,m,t),l=Ne(()=>{m(null),r!=null&&c!==null&&r()},[r,c]),E=Ne(p=>{m(p),u!=null&&c===null&&u(p)},[u,c]);return Ie(()=>kt(a.registerCommand(de,({node:p})=>(a.getEditorState().read(()=>{let f={leadOffset:0,matchingString:"",replaceableString:""};if(f!==null&&!we(a,f.leadOffset)&&p!==null){let y=a._window??window,h=y.document.createRange();Pe(f.leadOffset,h,y)!==null&&Oe(()=>E({getRect:()=>h.getBoundingClientRect(),match:f}));return}}),!0),Dt)),[a,E]),Ie(()=>{let p=()=>{a.getEditorState().read(()=>{let y=a._window??window,h=y.document.createRange(),x=ue(),M=_t(a);if(!me(x)||!x.isCollapsed()||M===null||h===null){l();return}let b=s({editor:a,query:M});if(d(b?b.matchingString:null),b!==null&&!we(a,b.leadOffset)&&Pe(b.leadOffset,h,y)!==null){Oe(()=>E({getRect:()=>h.getBoundingClientRect(),match:b}));return}l()})},f=a.registerUpdateListener(p);return()=>{f()}},[a,s,d,c,l,E]),c===null||a===null?null:$t(Le,{anchorElementRef:i,close:l,editor:a,groups:n,menuRenderFn:o,onSelectItem:g,resolution:c,shouldSplitNodeWithQuery:!0})}import{useCallback as zt}from"react";function De(t,{maxLength:e=75,minLength:n=1}){return zt(({query:o})=>{let r="[^"+t+ke+"\\s]",d=new RegExp("(^|\\s|\\()(["+t+"]((?:"+r+"){0,"+e+"}))$").exec(o);if(d!==null){let g=d[1],s=d[3];if(s.length>=n)return{leadOffset:d.index+g.length,matchingString:s,replaceableString:d[2]}}return null},[e,n,t])}import{jsx as H,jsxs as ze}from"react/jsx-runtime";var P="slash-menu-popup";function Yt({isSelected:t,item:e,onClick:n,onMouseEnter:o}){let{i18n:r}=Fe(),u=`${P}__item ${P}__item-${e.key}`;t&&(u+=` ${P}__item--selected`);let d=e.key;return e.label&&(d=typeof e.label=="function"?e.label({i18n:r}):e.label),d.length>25&&(d=d.substring(0,25)+"..."),ze("button",{"aria-selected":t,className:u,id:P+"__item-"+e.key,onClick:n,onMouseEnter:o,ref:e.ref,role:"option",tabIndex:-1,type:"button",children:[e?.Icon&&H(e.Icon,{}),H("span",{className:`${P}__item-text`,children:d})]},e.key)}function $e({anchorElem:t=document.body}){let[e]=Kt(),[n,o]=Wt(null),{editorConfig:r}=N(),{i18n:u}=Fe(),d=De("/",{minLength:0}),g=Be(()=>{let c=[];for(let m of r.features.slashMenu.dynamicGroups){let i=m({editor:e,queryString:n});c=c.concat(i)}return c},[e,n,r?.features]),s=Gt(()=>{let c=[];for(let m of r?.features.slashMenu.groups??[])c.push(m);if(n){c=c.map(i=>{let l=i.items.filter(E=>{let p=E.key;return E.label&&(p=typeof E.label=="function"?E.label({i18n:u}):E.label),new RegExp(n,"gi").exec(p)?!0:E.keywords!=null?E.keywords.some(f=>new RegExp(n,"gi").exec(f)):!1});return l.length?{...i,items:l}:null}),c=c.filter(i=>i!=null);let m=g();for(let i of m){let l=c.find(E=>E.key===i.key);l?c=c.filter(E=>E.key!==i.key):l={...i,items:[]},l?.items?.length&&(l.items=l.items.concat(l.items)),c.push(l)}}return c},[g,n,r?.features,u]),a=Be((c,m,i,l)=>{m&&e.update(()=>{m.remove()}),c.onSelect({editor:e,queryString:l}),i()},[e]);return H(He.Fragment,{children:H(Ae,{anchorElem:t,groups:s,menuRenderFn:(c,{selectItemAndCleanUp:m,selectedItemKey:i,setSelectedItemKey:l})=>c.current&&s.length?_e.createPortal(H("div",{className:P,children:s.map(E=>{let p=E.key;return E.label&&(p=typeof E.label=="function"?E.label({i18n:u}):E.label),ze("div",{className:`${P}__group ${P}__group-${E.key}`,children:[H("div",{className:`${P}__group-title`,children:p}),E.items.map((f,y)=>H(Yt,{index:y,isSelected:i===f.key,item:f,onClick:()=>{l(f.key),m(f)},onMouseEnter:()=>{l(f.key)}},f.key))]},E.key)})}),c.current):null,onQueryChange:o,onSelectItem:a,triggerFn:d})})}import{useLexicalComposerContext as qt}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as Qt}from"lexical";import*as Ye from"react";import{useCallback as Zt,useEffect as We,useRef as en,useState as tn}from"react";import{createPortal as nn}from"react-dom";var V=(t,e,n,o,r=50,u=25)=>{let d=0;if(t&&!t.contains(o)){let{bottom:g,left:s,right:a,top:c}=t.getBoundingClientRect(),m=c+window.scrollY,i=g+window.scrollY;if(n<m-u||n>i+u||e<s-r||e>a+r)return-1;(e<s||e>a)&&(d=e<s?e-s:e-a)}return d};import{$getNodeByKey as ee}from"lexical";function k(t){let e=t.getBoundingClientRect(),n=getComputedStyle(t).getPropertyValue("transform");if(!n||n==="none")return e;let o=n.split(",").pop();return e.y=e.y-Number(o.replace(")","")),e}function Z(t){let e=(s,a)=>s?parseFloat(window.getComputedStyle(s)[a]):0,{marginBottom:n,marginTop:o}=window.getComputedStyle(t),r=e(t.previousElementSibling,"marginBottom"),u=e(t.nextElementSibling,"marginTop"),d=Math.max(parseFloat(o),r);return{marginBottom:Math.max(parseFloat(n),u),marginTop:d}}import{$getRoot as Vt}from"lexical";function _(t){return t.getEditorState().read(()=>Vt().getChildrenKeys())}var Ut=1,Xt=-1,Ke=0,w={props:null,result:null};function jt(t,e,n=20){let o=t.x-e.x,r=t.y-e.y;return o*o+r*r<=n*n}function U(t){let{anchorElem:e,cache_threshold:n=20,editor:o,fuzzy:r=!1,horizontalOffset:u=0,point:{x:d,y:g},startIndex:s=0,useEdgeAsDefault:a=!1,verbose:c=!1}=t;if(n>0&&w.props&&w.result&&w.props.fuzzy===t.fuzzy&&w.props.horizontalOffset===t.horizontalOffset&&w.props.useEdgeAsDefault===t.useEdgeAsDefault&&jt(w.props.point,t.point,n))return w.result;let m=e.getBoundingClientRect(),i=_(o),l={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return o.getEditorState().read(()=>{if(a){let[f,y]=[o.getElementByKey(i[0]),o.getElementByKey(i[i.length-1])],[h,x]=[k(f),k(y)];if(h&&x&&(g<h.top?(l.blockElem=f,l.distance=h.top-g,l.blockNode=ee(i[0]),l.foundAtIndex=0):g>x.bottom&&(l.distance=g-x.bottom,l.blockNode=ee(i[i.length-1]),l.blockElem=y,l.foundAtIndex=i.length-1),l?.blockElem))return{blockElem:null,isFoundNodeEmptyParagraph:!1}}let E=s,p=Ke;for(;E>=0&&E<i.length;){let f=i[E],y=o.getElementByKey(f);if(y===null)break;let h=new O(d+u,g),x=Ee.fromDOMRect(k(y)),{marginBottom:M,marginTop:b}=Z(y),T=x.generateNewRect({bottom:x.bottom+M,left:m.left,right:m.right,top:x.top-b}),{distance:L,isOnBottomSide:C,isOnTopSide:A}=T.distanceFromPoint(h);if(L===0){l.blockElem=y,l.blockNode=ee(f),l.foundAtIndex=E,l.distance=L,l.blockNode&&l.blockNode.getType()==="paragraph"&&l.blockNode.getTextContent()===""&&(!r&&!t.returnEmptyParagraphs&&(l.blockElem=null,l.blockNode=null),l.isFoundNodeEmptyParagraph=!0);break}else r&&L<l.distance&&(l.blockElem=y,l.blockNode=ee(f),l.distance=L,l.foundAtIndex=E);p===Ke&&(A?p=Xt:C?p=Ut:p=1/0),E+=p}}),w.props=t,w.result={blockElem:l.blockElem,blockNode:l.blockNode,foundAtIndex:l.foundAtIndex,isFoundNodeEmptyParagraph:l.isFoundNodeEmptyParagraph},{blockElem:l.blockElem,blockNode:l.blockNode,foundAtIndex:l.foundAtIndex,isFoundNodeEmptyParagraph:l.isFoundNodeEmptyParagraph}}function te(t,e){return!!t.closest(`.${e}`)}var Jt=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Ge(t){if(!t||Jt.includes(t.tagName)||t.offsetHeight===0||t.offsetWidth===0)return!1;let e=window.getComputedStyle(t);return!(e.display==="table-cell"||e.position==="absolute"||e.visibility==="hidden"||e.opacity==="0")}function ne(t,e,n,o=0){if(!t){e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)";return}let r=t.getBoundingClientRect(),u=window.getComputedStyle(t),d=e.getBoundingClientRect(),g=n.getBoundingClientRect(),s;if(r.height<60)s=r.top-d.height/2-g.top+r.height/2-1;else{let m=Ge(t)?parseInt(u.lineHeight,10):0;s=r.top+(m-d.height)/2-g.top-1}let c=o;e.style.opacity="1",e.style.transform=`translate(${c}px, ${s}px)`}import{jsx as fe}from"react/jsx-runtime";var on="add-block-menu",oe=1/0;function rn(t){return t===0?1/0:oe>=0&&oe<t?oe:Math.floor(t/2)}function ln(t,e,n){let o=e.parentElement,{editorConfig:r}=N(),u=r?.admin?.hideGutter?-24:12,d=en(null),[g,s]=tn(null);We(()=>{function c(m){let i=m.target;if(!G(i))return;let l=V(o,m.pageX,m.pageY,i);if(l===-1){s(null);return}if(te(i,on))return;let E=_(t),{blockElem:p,blockNode:f,foundAtIndex:y}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-l,point:new O(m.x,m.y),returnEmptyParagraphs:!0,startIndex:rn(E.length),useEdgeAsDefault:!1});oe=y,p&&(g?.node!==f||g?.elem!==p)&&s({elem:p,node:f})}return document?.addEventListener("mousemove",c),()=>{document?.removeEventListener("mousemove",c)}},[o,e,t,g]),We(()=>{d.current&&g?.node&&ne(g?.elem,d.current,e,u)},[e,g,u]);let a=Zt(c=>{let m=g;m?.node&&(t.update(()=>{let i=!0;if((m.node.getType()!=="paragraph"||m.node.getTextContent()!=="")&&(i=!1),!i){let l=Qt();m.node.insertAfter(l),setTimeout(()=>{m={elem:t.getElementByKey(l.getKey()),node:l},s(m)},0)}}),setTimeout(()=>{t.update(()=>{t.focus(),m.node&&"select"in m.node&&typeof m.node.select=="function"&&m.node.select()})},1),setTimeout(()=>{t.dispatchCommand(de,{node:m.node})},2),c.stopPropagation(),c.preventDefault())},[t,g]);return nn(fe(Ye.Fragment,{children:fe("button",{className:"icon add-block-menu",onClick:c=>{a(c)},ref:d,type:"button",children:fe("div",{className:n?"icon":""})})}),e)}function Ve({anchorElem:t=document.body}){let[e]=qt();return ln(e,t,e._editable)}import{useLexicalComposerContext as cn}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as je}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as Je,$getNodeByKey as un}from"lexical";import*as tt from"react";import{useEffect as pe,useRef as re,useState as qe}from"react";import{createPortal as mn}from"react-dom";function Ue(t,e,n){if(!t.current)return;let{left:o,top:r}=n.getBoundingClientRect(),u=k(e),d=u.width,g=u.height,s=u.top-r,a=u.left-o;t.current.style.border="2px solid green",t.current.style.boxSizing="border-box",t.current.style.height=g+"px",t.current.style.pointerEvents="none",t.current.style.position="absolute",t.current.style.top=s+"px",t.current.style.left=a+"px",t.current.style.width=d+"px",t.current.style.zIndex="1000",t.current.style.opacity="0.5"}var X=25,an=-24,sn=!1,$=0;function Xe(t,e,n,o,r,u,d,g,s,a=!1){let{height:c,top:m}=o.getBoundingClientRect(),{top:i,width:l}=d.getBoundingClientRect(),{marginBottom:E,marginTop:p}=Z(o),f=m,y=u>=m+c/2+window.scrollY,h=!1;if(r?.elem)if(o!==r?.elem)(y&&r?.elem&&r?.elem===o.nextElementSibling||!y&&r?.elem&&r?.elem===o.previousElementSibling)&&($++,$<200&&(h=!0));else{$++;let L=r?.boundingBox?.y,C=o.getBoundingClientRect().y;(y===r?.isBelow&&L===C||$<200)&&(h=!1)}if(h)return{isBelow:y,willStayInSamePosition:h};a?f+=c/2:y?f+=c+E/2:f-=p/2;let x=0;a||(y?x=-X:x=X);let M=f-i+x,b=an-e;n.style.width=`calc(${l}px - ${t})`,n.style.opacity=".4";let T=12;return a?n.style.transform=`translate(${b}px, ${M-X}px)`:y?(o.style.marginBottom=X*2+T+"px",n.style.transform=`translate(${b}px, calc(${M}px - 0px))`):(o.style.marginTop=X*2+T+"px",n.style.transform=`translate(${b}px, calc(${M-X*2}px - 0px))`),sn&&Ue(s,o,d),r.elem.style.opacity="",r?.elem===o?y?r.elem.style.marginTop="":r.elem.style.marginBottom="":(r.elem.style.marginBottom="",r.elem.style.marginTop=""),$=0,{isBelow:y,willStayInSamePosition:h}}import{jsx as ie,jsxs as gn}from"react/jsx-runtime";var dn="draggable-block-menu",Qe="application/x-lexical-drag-block",q=1/0;function Ze(t){return t===0?1/0:q>=0&&q<t?q:Math.floor(t/2)}function fn(t,e){let{transform:n}=e.style;t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}function et(t,e){t&&(t.style.opacity="0"),e&&(e.style.opacity="",e.style.marginBottom="",e.style.marginTop="")}function pn(t,e,n){let o=e.parentElement,r=re(null),u=re(null),d=re(null),g=re(!1),[s,a]=qe(null),[c,m]=qe(null),{editorConfig:i}=N(),l=i?.admin?.hideGutter?-44:-8;pe(()=>{function f(y){let h=y.target;if(!G(h))return;let x=V(o,y.pageX,y.pageY,h);if(x===-1){a(null);return}if(te(h,dn))return;let M=_(t),{blockElem:b,foundAtIndex:T,isFoundNodeEmptyParagraph:L}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-x,point:new O(y.x,y.y),startIndex:Ze(M.length),useEdgeAsDefault:!1,verbose:!1});q=T,!(!b&&!L)&&s!==b&&a(b)}return document?.addEventListener("mousemove",f),()=>{document?.removeEventListener("mousemove",f)}},[o,e,t,s]),pe(()=>{r.current&&ne(s,r.current,e,l)},[e,s,l]),pe(()=>{function f(h){if(!g.current)return!1;let[x]=je(h);if(x)return!1;let{pageY:M,target:b}=h;if(!G(b))return!1;let T=V(o,h.pageX,h.pageY,b,100,50),L=_(t),{blockElem:C,foundAtIndex:A,isFoundNodeEmptyParagraph:D}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-T,point:new O(h.x,h.y),startIndex:Ze(L.length),useEdgeAsDefault:!0,verbose:!0});q=A;let B=u.current;if(C===null||B===null)return!1;if(s!==C){let{isBelow:v,willStayInSamePosition:I}=Xe(i?.admin?.hideGutter?"0px":"3rem",l+(i?.admin?.hideGutter?r?.current?.getBoundingClientRect()?.width??0:-r?.current?.getBoundingClientRect()?.width),B,C,c,M,e,h,d,D);h.preventDefault(),I||m({boundingBox:C.getBoundingClientRect(),elem:C,isBelow:v})}else et(B,c?.elem),m({boundingBox:C.getBoundingClientRect(),elem:C,isBelow:!1});return!0}function y(h){if(!g.current)return!1;let[x]=je(h);if(x)return!1;let{dataTransfer:M,pageY:b,target:T}=h,L=M?.getData(Qe)||"";return t.update(()=>{let C=un(L);if(!C||!G(T))return!1;let A=V(o,h.pageX,h.pageY,T,100,50),{blockElem:D,isFoundNodeEmptyParagraph:B}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-A,point:new O(h.x,h.y),useEdgeAsDefault:!0});if(!D)return!1;let v=Je(D);if(!v)return!1;if(v===C)return!0;let{height:I,top:se}=k(D),mt=b>=se+I/2+window.scrollY;B?(v.insertBefore(C),v.remove()):mt?v.insertAfter(C):v.insertBefore(C),s!==null&&a(null),document.querySelectorAll(".lexical-block-highlighter").forEach(K=>{K.remove()});let dt=t.getElementByKey(C.getKey());setTimeout(()=>{let K=dt.getBoundingClientRect(),S=document.createElement("div");S.className="lexical-block-highlighter",document.documentElement.getAttribute("data-theme")==="dark"?S.style.backgroundColor="white":S.style.backgroundColor="black",S.style.transition="opacity 0.1s ease-in-out",S.style.zIndex="1",S.style.pointerEvents="none",S.style.boxSizing="border-box",S.style.borderRadius="4px",S.style.position="absolute",document.body.appendChild(S),S.style.opacity="0.1",S.style.height=`${K.height+8}px`,S.style.width=`${K.width+8}px`,S.style.top=`${K.top+window.scrollY-4}px`,S.style.left=`${K.left-4}px`,setTimeout(()=>{S.style.opacity="0",setTimeout(()=>{S.remove()},1e3)},3e3)},120)}),!0}return document.addEventListener("dragover",f),document.addEventListener("drop",y),()=>{document.removeEventListener("dragover",f),document.removeEventListener("drop",y)}},[o,l,e,t,c,s,i?.admin?.hideGutter]);function E(f){let y=f.dataTransfer;if(!y||!s)return;fn(y,s);let h="";t.update(()=>{let x=Je(s);x&&(h=x.getKey())}),g.current=!0,y.setData(Qe,h)}function p(){g.current=!1,et(u.current,c?.elem)}return mn(gn(tt.Fragment,{children:[ie("div",{className:"icon draggable-block-menu",draggable:!0,onDragEnd:p,onDragStart:E,ref:r,children:ie("div",{className:n?"icon":""})}),ie("div",{className:"draggable-block-target-line",ref:u}),ie("div",{className:"debug-highlight",ref:d})]}),e)}function nt({anchorElem:t=document.body}){let[e]=cn();return pn(e,t,e._editable)}import{ContentEditable as hn}from"@lexical/react/LexicalContentEditable.js";import{jsx as yn}from"react/jsx-runtime";function ot({className:t}){return yn(hn,{className:t??"ContentEditable__root"})}import{jsx as R,jsxs as Q}from"react/jsx-runtime";var at=t=>{let{editorConfig:e,editorContainerRef:n,onChange:o}=t,r=N(),[u]=En(),{t:d}=Rn(),[g,s]=lt(null),a=i=>{i!==null&&s(i)};it(()=>{if(!r?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}r?.parentEditor?.uuid&&r.parentEditor?.registerChild(r.uuid,r);let i=()=>{r.focusEditor(r)},l=()=>{r.blurEditor(r)},E=u.registerCommand(Ln,()=>(i(),!0),rt),p=u.registerCommand(Sn,()=>(l(),!0),rt);return()=>{E(),p(),r.parentEditor?.unregisterChild?.(r.uuid)}},[u,r]);let[c,m]=lt(!1);return it(()=>{let i=()=>{let l=window.matchMedia("(max-width: 768px)").matches;l!==c&&m(l)};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[c]),Q(j.Fragment,{children:[e.features.plugins.map(i=>{if(i.position==="aboveContainer")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),Q("div",{className:"editor-container",ref:n,children:[e.features.plugins.map(i=>{if(i.position==="top")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),R(Cn,{ErrorBoundary:xn,contentEditable:R("div",{className:"editor-scroller",children:R("div",{className:"editor",ref:a,children:R(ot,{})})}),placeholder:R("p",{className:"editor-placeholder",children:d("lexical:general:placeholder")})}),R(Mn,{ignoreSelectionChange:!0,onChange:(i,l,E)=>{(!E.has("focus")||E.size>1)&&o?.(i,l,E)}}),g&&Q(j.Fragment,{children:[!c&&u.isEditable()&&Q(j.Fragment,{children:[R(nt,{anchorElem:g}),R(Ve,{anchorElem:g})]}),e.features.plugins.map(i=>{if(i.position==="floatingAnchorElem"&&!(i.desktopOnly===!0&&c))return R(F,{anchorElem:g,clientProps:i.clientProps,plugin:i},i.key)}),u.isEditable()&&R(j.Fragment,{children:R($e,{anchorElem:g})})]}),u.isEditable()&&Q(j.Fragment,{children:[R(bn,{}),e?.features?.markdownTransformers?.length>0&&R(be,{})]}),R(Tn,{}),e.features.plugins.map(i=>{if(i.position==="normal")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),e.features.plugins.map(i=>{if(i.position==="bottom")return R(F,{clientProps:i.clientProps,plugin:i},i.key)})]}),e.features.plugins.map(i=>{if(i.position==="belowContainer")return R(F,{clientProps:i.clientProps,plugin:i},i.key)})]})};import{jsx as le}from"react/jsx-runtime";var ut=t=>{let{editorConfig:e,fieldProps:n,onChange:o,path:r,readOnly:u,value:d}=t,g=N(),s=ct.useRef(null),a=st(()=>{let m=d;return e?.features?.hooks?.load?.length&&e.features.hooks.load.forEach(i=>{m=i({incomingEditorState:m})}),m},[e,d]),c=st(()=>{if(a&&typeof a!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(a));if(a&&Array.isArray(a)&&!("root"in a))throw new Error("You have tried to pass in data from the old, Slate editor, to the new, Lexical editor. This is not supported. There is no automatic conversion from Slate to Lexical data available yet (coming soon). Please remove the data from the field and start again.");if(a&&"jsonContent"in a)throw new Error("You have tried to pass in data from payload-plugin-lexical. This is not supported. The data structure has changed in this editor, compared to the plugin, and there is no automatic conversion available yet (coming soon). Please remove the data from the field and start again.");return{editable:u!==!0,editorState:a!=null?JSON.stringify(a):void 0,namespace:e.lexical.namespace,nodes:[...he({editorConfig:e})],onError:m=>{throw m},theme:e.lexical.theme}},[e,a,u]);return c?le(vn,{initialConfig:c,children:le(ye,{editorConfig:e,editorContainerRef:s,fieldProps:n,parentContext:g,children:le(at,{editorConfig:e,editorContainerRef:s,onChange:o})})},r):le("p",{children:"Loading..."})};import{jsx as z,jsxs as ge}from"react/jsx-runtime";var ae="rich-text-lexical",Bn=t=>{let{name:e,CustomDescription:n,CustomError:o,CustomLabel:r,className:u,descriptionProps:d,editorConfig:g,errorProps:s,label:a,labelProps:c,path:m,readOnly:i,required:l,style:E,validate:p,width:f}=t,y=An((v,I)=>{if(typeof p=="function")return p(v,{...I,props:t,required:l})},[p,l]),{path:h}=On(),x=wn({path:h??m??e,validate:y}),{errorMessage:M,initialValue:b,path:T,schemaPath:L,setValue:C,showError:A,value:D}=x,B=[ae,"field-type",u,A&&"error",i&&`${ae}--read-only`,g?.admin?.hideGutter!==!0?`${ae}--show-gutter`:null].filter(Boolean).join(" ");return ge("div",{className:B,style:{...E,width:f},children:[z(Pn,{CustomLabel:r,label:a,required:l,...c||{}}),ge("div",{className:`${ae}__wrap`,children:[z(In,{CustomError:o,path:T,...s||{}}),z(Dn,{fallbackRender:Fn,onReset:()=>{},children:z(ut,{editorConfig:g,fieldProps:t,onChange:v=>{let I=v.toJSON();g?.features?.hooks?.save?.length&&g.features.hooks.save.forEach(se=>{I=se({incomingEditorState:I})}),C(I)},path:T,readOnly:i,value:D},JSON.stringify({initialValue:b,path:T}))}),n!==void 0?n:z(Nn,{...d||{}})]})]},T)};function Fn({error:t}){return ge("div",{className:"errorBoundary",role:"alert",children:[z("p",{children:"Something went wrong:"}),z("pre",{style:{color:"red"},children:t.message})]})}var jr=kn(Bn);export{jr as RichText};
2
+ //# sourceMappingURL=Field-U5PHZTST.js.map