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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (666) hide show
  1. package/dist/cell/index.d.ts +1 -1
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -4
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/components.d.ts +8 -2
  6. package/dist/exports/components.d.ts.map +1 -1
  7. package/dist/exports/components.js +8 -2
  8. package/dist/exports/components.js.map +1 -1
  9. package/dist/field/Field.d.ts +0 -2
  10. package/dist/field/Field.d.ts.map +1 -1
  11. package/dist/field/Field.js.map +1 -1
  12. package/dist/field/features/align/feature.client.d.ts +4 -1
  13. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  14. package/dist/field/features/align/feature.client.js +127 -54
  15. package/dist/field/features/align/feature.client.js.map +1 -1
  16. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  17. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  18. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  19. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  20. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  21. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  22. package/dist/field/features/blockquote/feature.client.js +53 -40
  23. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  24. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  25. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  26. package/dist/field/features/blockquote/feature.server.js +7 -7
  27. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  28. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  29. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  30. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  31. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  32. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  33. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  34. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  35. package/dist/field/features/blocks/component/index.js +37 -4
  36. package/dist/field/features/blocks/component/index.js.map +1 -1
  37. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  38. package/dist/field/features/blocks/drawer/index.js +2 -4
  39. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  40. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  41. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  42. package/dist/field/features/blocks/feature.client.js +56 -27
  43. package/dist/field/features/blocks/feature.client.js.map +1 -1
  44. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  45. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  46. package/dist/field/features/blocks/feature.server.js +109 -77
  47. package/dist/field/features/blocks/feature.server.js.map +1 -1
  48. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  49. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  50. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  51. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  52. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  53. package/dist/field/features/blocks/plugin/commands.js +1 -2
  54. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  55. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  56. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  57. package/dist/field/features/blocks/plugin/index.js +5 -8
  58. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  59. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  60. package/dist/field/features/blocks/populationPromise.js +4 -18
  61. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  62. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  63. package/dist/field/features/blocks/validate.js +22 -36
  64. package/dist/field/features/blocks/validate.js.map +1 -1
  65. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  66. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  67. package/dist/field/features/converters/html/field/index.js +6 -3
  68. package/dist/field/features/converters/html/field/index.js.map +1 -1
  69. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
  70. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  71. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  72. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  73. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  74. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  75. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  76. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  77. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +2 -4
  78. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  79. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
  80. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
  81. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  82. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  83. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  84. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  85. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  86. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  87. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +4 -6
  88. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  89. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  90. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  91. package/dist/field/features/format/bold/feature.client.js +26 -23
  92. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  93. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
  94. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  95. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  96. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  97. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  98. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  99. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  100. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  101. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  102. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  103. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  104. package/dist/field/features/format/italic/feature.client.js +27 -24
  105. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  106. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  107. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  108. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  109. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  110. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  111. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  112. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  113. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  114. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  115. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  116. package/dist/field/features/format/subscript/feature.client.js +25 -22
  117. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  118. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  119. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  120. package/dist/field/features/format/superscript/feature.client.js +25 -22
  121. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  122. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  123. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  124. package/dist/field/features/format/underline/feature.client.js +25 -22
  125. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  126. package/dist/field/features/heading/feature.client.d.ts +4 -1
  127. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  128. package/dist/field/features/heading/feature.client.js +71 -54
  129. package/dist/field/features/heading/feature.client.js.map +1 -1
  130. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  131. package/dist/field/features/heading/feature.server.js +5 -5
  132. package/dist/field/features/heading/feature.server.js.map +1 -1
  133. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  134. package/dist/field/features/heading/markdownTransformer.js +1 -2
  135. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  136. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  137. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  138. package/dist/field/features/horizontalRule/component/index.js +62 -0
  139. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  140. package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
  141. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  142. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  143. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  144. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  145. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  146. package/dist/field/features/horizontalRule/feature.server.js +36 -0
  147. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  148. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  149. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  150. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  151. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  152. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  153. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  154. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +88 -0
  155. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  156. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  157. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  158. package/dist/field/features/horizontalRule/plugin/index.js +31 -0
  159. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  160. package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
  161. package/dist/field/features/indent/feature.client.d.ts +4 -1
  162. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  163. package/dist/field/features/indent/feature.client.js +43 -42
  164. package/dist/field/features/indent/feature.client.js.map +1 -1
  165. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  166. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  167. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  168. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  169. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  170. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  171. package/dist/field/features/link/drawer/baseFields.js +30 -43
  172. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  173. package/dist/field/features/link/drawer/index.js +3 -2
  174. package/dist/field/features/link/drawer/index.js.map +1 -1
  175. package/dist/field/features/link/drawer/types.d.ts +4 -2
  176. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  177. package/dist/field/features/link/drawer/types.js.map +1 -1
  178. package/dist/field/features/link/feature.client.d.ts +13 -1
  179. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  180. package/dist/field/features/link/feature.client.js +59 -47
  181. package/dist/field/features/link/feature.client.js.map +1 -1
  182. package/dist/field/features/link/feature.server.d.ts +10 -5
  183. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  184. package/dist/field/features/link/feature.server.js +48 -9
  185. package/dist/field/features/link/feature.server.js.map +1 -1
  186. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  187. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  188. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  189. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  190. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  191. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  192. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  193. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  194. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  195. package/dist/field/features/link/plugins/autoLink/index.js +5 -8
  196. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  197. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  198. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  199. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  200. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  201. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  202. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  203. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  204. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  205. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +93 -69
  206. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  207. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  208. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  209. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  210. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  211. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  212. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  213. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  214. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  215. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  216. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  217. package/dist/field/features/link/plugins/link/index.js +5 -14
  218. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  219. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  220. package/dist/field/features/link/populationPromise.js +10 -25
  221. package/dist/field/features/link/populationPromise.js.map +1 -1
  222. package/dist/field/features/link/validate.d.ts +5 -0
  223. package/dist/field/features/link/validate.d.ts.map +1 -0
  224. package/dist/field/features/link/validate.js +32 -0
  225. package/dist/field/features/link/validate.js.map +1 -0
  226. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  227. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  228. package/dist/field/features/lists/checklist/feature.client.js +56 -32
  229. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  230. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  231. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  232. package/dist/field/features/lists/checklist/feature.server.js +10 -10
  233. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  234. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  235. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  236. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  237. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  238. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  239. package/dist/field/features/lists/checklist/plugin/index.js +3 -4
  240. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  241. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  242. package/dist/field/features/lists/htmlConverter.js +13 -6
  243. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  244. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  245. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  246. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  247. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  248. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  249. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +7 -7
  250. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  251. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  252. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  253. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  254. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  255. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  256. package/dist/field/features/lists/plugin/index.js +3 -4
  257. package/dist/field/features/lists/plugin/index.js.map +1 -1
  258. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  259. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  260. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  261. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  262. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  263. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  264. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  265. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  266. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +7 -7
  267. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  268. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  269. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  270. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  271. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  272. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  273. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  274. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  275. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  276. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  277. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  278. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  279. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  280. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  281. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  282. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  283. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  284. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  285. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  286. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  287. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  288. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  289. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  290. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  291. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  292. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  293. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  294. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  295. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  296. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  297. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  298. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  299. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  300. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  301. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  302. package/dist/field/features/paragraph/feature.client.js +45 -33
  303. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  304. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  305. package/dist/field/features/relationship/drawer/commands.js +1 -2
  306. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  307. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  308. package/dist/field/features/relationship/drawer/index.js +7 -13
  309. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  310. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  311. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  312. package/dist/field/features/relationship/feature.client.js +37 -15
  313. package/dist/field/features/relationship/feature.client.js.map +1 -1
  314. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  315. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  316. package/dist/field/features/relationship/feature.server.js +5 -4
  317. package/dist/field/features/relationship/feature.server.js.map +1 -1
  318. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  319. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  320. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  321. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  322. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  323. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +56 -7
  324. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  325. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  326. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  327. package/dist/field/features/relationship/plugins/index.js +9 -12
  328. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  329. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  330. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  331. package/dist/field/features/relationship/populationPromise.js +25 -19
  332. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  333. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  334. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  335. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  336. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  337. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  338. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  339. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  340. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  341. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  342. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  343. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  344. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  345. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
  346. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  347. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  348. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  349. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +91 -0
  350. package/dist/field/features/toolbars/fixed/feature.client.d.ts +6 -0
  351. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  352. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  353. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  354. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  355. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  356. package/dist/field/features/toolbars/fixed/feature.server.js +15 -0
  357. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  358. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  359. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  360. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +112 -70
  361. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  362. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  363. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  364. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  365. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  366. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  367. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  368. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  369. package/dist/field/features/toolbars/inline/feature.server.js +15 -0
  370. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  371. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  372. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  373. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +29 -19
  374. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  375. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  376. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  377. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  378. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +27 -72
  379. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  380. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  381. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  382. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  383. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  384. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  385. package/dist/field/features/toolbars/types.d.ts +48 -0
  386. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  387. package/dist/field/features/toolbars/types.js.map +1 -0
  388. package/dist/field/features/typeUtilities.d.ts +8 -0
  389. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  390. package/dist/field/features/typeUtilities.js +8 -0
  391. package/dist/field/features/typeUtilities.js.map +1 -0
  392. package/dist/field/features/types.d.ts +136 -62
  393. package/dist/field/features/types.d.ts.map +1 -1
  394. package/dist/field/features/types.js.map +1 -1
  395. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  396. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  397. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  398. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  399. package/dist/field/features/upload/component/index.js +59 -9
  400. package/dist/field/features/upload/component/index.js.map +1 -1
  401. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  402. package/dist/field/features/upload/drawer/commands.js +1 -2
  403. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  404. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  405. package/dist/field/features/upload/drawer/index.js +8 -12
  406. package/dist/field/features/upload/drawer/index.js.map +1 -1
  407. package/dist/field/features/upload/feature.client.d.ts +4 -1
  408. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  409. package/dist/field/features/upload/feature.client.js +35 -10
  410. package/dist/field/features/upload/feature.client.js.map +1 -1
  411. package/dist/field/features/upload/feature.server.d.ts +10 -3
  412. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  413. package/dist/field/features/upload/feature.server.js +39 -11
  414. package/dist/field/features/upload/feature.server.js.map +1 -1
  415. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  416. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  417. package/dist/field/features/upload/nodes/UploadNode.js +24 -11
  418. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  419. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  420. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  421. package/dist/field/features/upload/plugin/index.js +6 -11
  422. package/dist/field/features/upload/plugin/index.js.map +1 -1
  423. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  424. package/dist/field/features/upload/populationPromise.js +15 -9
  425. package/dist/field/features/upload/populationPromise.js.map +1 -1
  426. package/dist/field/features/upload/validate.d.ts +2 -1
  427. package/dist/field/features/upload/validate.d.ts.map +1 -1
  428. package/dist/field/features/upload/validate.js +37 -12
  429. package/dist/field/features/upload/validate.js.map +1 -1
  430. package/dist/field/index.d.ts +1 -1
  431. package/dist/field/index.d.ts.map +1 -1
  432. package/dist/field/index.js.map +1 -1
  433. package/dist/field/index.scss +4 -0
  434. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  435. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  436. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  437. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  438. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  439. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  440. package/dist/field/lexical/EditorPlugin.js +6 -3
  441. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  442. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  443. package/dist/field/lexical/LexicalEditor.js +31 -15
  444. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  445. package/dist/field/lexical/LexicalEditor.scss +3 -19
  446. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  447. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  448. package/dist/field/lexical/LexicalProvider.js +4 -4
  449. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  450. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  451. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  452. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  453. package/dist/field/lexical/config/client/default.d.ts +1 -1
  454. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  455. package/dist/field/lexical/config/client/default.js.map +1 -1
  456. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  457. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  458. package/dist/field/lexical/config/client/sanitize.js +81 -32
  459. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  460. package/dist/field/lexical/config/server/default.d.ts +2 -3
  461. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  462. package/dist/field/lexical/config/server/default.js +12 -10
  463. package/dist/field/lexical/config/server/default.js.map +1 -1
  464. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  465. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  466. package/dist/field/lexical/config/server/loader.js +4 -2
  467. package/dist/field/lexical/config/server/loader.js.map +1 -1
  468. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  469. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  470. package/dist/field/lexical/config/server/sanitize.js +23 -8
  471. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  472. package/dist/field/lexical/config/types.d.ts +1 -1
  473. package/dist/field/lexical/config/types.d.ts.map +1 -1
  474. package/dist/field/lexical/config/types.js.map +1 -1
  475. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  476. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  477. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  478. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  479. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  480. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  481. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  482. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  483. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  484. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +6 -9
  485. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  486. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  487. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  488. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  489. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  490. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  491. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  492. package/dist/field/lexical/plugins/SlashMenu/index.js +72 -67
  493. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  494. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  495. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
  496. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  497. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  498. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  499. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +3 -4
  500. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  501. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  502. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -10
  503. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  504. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  505. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  506. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  507. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  508. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  509. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  510. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  511. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  512. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  513. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  514. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  515. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  516. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  517. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  518. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  519. package/dist/field/lexical/theme/EditorTheme.scss +13 -14
  520. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  521. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  522. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  523. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  524. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  525. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  526. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  527. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  528. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  529. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  530. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  531. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  532. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  533. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  534. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  535. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  536. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  537. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  538. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  539. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  540. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  541. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  542. package/dist/field/lexical/utils/url.js +3 -0
  543. package/dist/field/lexical/utils/url.js.map +1 -1
  544. package/dist/forEachNodeRecursively.d.ts +10 -0
  545. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  546. package/dist/forEachNodeRecursively.js +24 -0
  547. package/dist/forEachNodeRecursively.js.map +1 -0
  548. package/dist/generateComponentMap.d.ts.map +1 -1
  549. package/dist/generateComponentMap.js +16 -22
  550. package/dist/generateComponentMap.js.map +1 -1
  551. package/dist/generateSchemaMap.d.ts.map +1 -1
  552. package/dist/generateSchemaMap.js +4 -12
  553. package/dist/generateSchemaMap.js.map +1 -1
  554. package/dist/index.d.ts +24 -20
  555. package/dist/index.d.ts.map +1 -1
  556. package/dist/index.js +275 -184
  557. package/dist/index.js.map +1 -1
  558. package/dist/populate/defaultValue.d.ts.map +1 -1
  559. package/dist/populate/defaultValue.js +1 -0
  560. package/dist/populate/defaultValue.js.map +1 -1
  561. package/dist/populate/populate.d.ts +5 -4
  562. package/dist/populate/populate.d.ts.map +1 -1
  563. package/dist/populate/populate.js +13 -11
  564. package/dist/populate/populate.js.map +1 -1
  565. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  566. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  567. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  568. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  569. package/dist/populate/recurseNestedFields.d.ts +8 -4
  570. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  571. package/dist/populate/recurseNestedFields.js +4 -5
  572. package/dist/populate/recurseNestedFields.js.map +1 -1
  573. package/dist/scss/app.scss +2 -3
  574. package/dist/scss/vars.scss +0 -7
  575. package/dist/types.d.ts +12 -5
  576. package/dist/types.d.ts.map +1 -1
  577. package/dist/types.js.map +1 -1
  578. package/dist/validate/index.d.ts +1 -1
  579. package/dist/validate/index.d.ts.map +1 -1
  580. package/package.json +48 -47
  581. package/components.d.ts +0 -6
  582. package/components.js +0 -7
  583. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  584. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  585. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  586. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  587. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  588. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  589. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  590. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  591. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  592. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  593. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  594. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  595. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  596. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  597. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  598. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  599. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  600. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  601. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  602. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  603. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  604. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  605. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  606. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  607. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  608. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  609. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  610. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  611. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  612. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  613. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  614. package/dist/field/features/indent/index.scss +0 -4
  615. package/dist/field/features/lists/common/markdown.js.map +0 -1
  616. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  617. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  618. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  619. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  620. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  621. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  622. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  623. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  624. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  625. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  626. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  627. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  628. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  629. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  630. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  631. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  632. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  633. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  634. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  635. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  636. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  637. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  638. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  639. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  640. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  641. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  642. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  643. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  644. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  645. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  646. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  647. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  648. package/dist/populate/richTextRelationshipPromise.js +0 -68
  649. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  650. package/dist/scss/fonts.scss +0 -75
  651. package/src/index.ts +0 -423
  652. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  653. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  654. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  655. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  656. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  657. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  658. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  659. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  660. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  661. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  662. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  663. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  664. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  665. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  666. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/ui/ContentEditable.tsx"],"sourcesContent":["import lexicalContentEditableImport from '@lexical/react/LexicalContentEditable.js'\nconst { ContentEditable } = lexicalContentEditableImport\n\nimport * as React from 'react'\n\nimport './ContentEditable.scss'\n\nexport function LexicalContentEditable({ className }: { className?: string }): JSX.Element {\n return <ContentEditable className={className ?? 'ContentEditable__root'} />\n}\n"],"names":["lexicalContentEditableImport","ContentEditable","React","LexicalContentEditable","className"],"rangeMappings":";;;;;;;;","mappings":"AAAA,OAAOA,kCAAkC,2CAA0C;AACnF,MAAM,EAAEC,eAAe,EAAE,GAAGD;AAE5B,YAAYE,WAAW,QAAO;AAE9B,OAAO,yBAAwB;AAE/B,OAAO,SAASC,uBAAuB,EAAEC,SAAS,EAA0B;IAC1E,qBAAO,oBAACH;QAAgBG,WAAWA,aAAa;;AAClD"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/ui/ContentEditable.tsx"],"sourcesContent":["import { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport * as React from 'react'\n\nimport './ContentEditable.scss'\n\nexport function LexicalContentEditable({ className }: { className?: string }): JSX.Element {\n return <ContentEditable className={className ?? 'ContentEditable__root'} />\n}\n"],"names":["ContentEditable","React","LexicalContentEditable","className"],"rangeMappings":";;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,YAAYC,WAAW,QAAO;AAE9B,OAAO,yBAAwB;AAE/B,OAAO,SAASC,uBAAuB,EAAEC,SAAS,EAA0B;IAC1E,qBAAO,oBAACH;QAAgBG,WAAWA,aAAa;;AAClD"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const AddIcon: React.FC;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/ui/icons/Add/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAK3B,CAAA"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export const AddIcon = ()=>/*#__PURE__*/ React.createElement("svg", {
3
+ fill: "none",
4
+ height: "20",
5
+ viewBox: "0 0 20 20",
6
+ width: "20",
7
+ xmlns: "http://www.w3.org/2000/svg"
8
+ }, /*#__PURE__*/ React.createElement("path", {
9
+ d: "M5 10h10",
10
+ stroke: "currentColor"
11
+ }), /*#__PURE__*/ React.createElement("path", {
12
+ d: "M10 15V5",
13
+ stroke: "currentColor"
14
+ }));
15
+
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/field/lexical/ui/icons/Add/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const AddIcon: React.FC = () => (\n <svg fill=\"none\" height=\"20\" viewBox=\"0 0 20 20\" width=\"20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 10h10\" stroke=\"currentColor\" />\n <path d=\"M10 15V5\" stroke=\"currentColor\" />\n </svg>\n)\n"],"names":["React","AddIcon","svg","fill","height","viewBox","width","xmlns","path","d","stroke"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,UAAoB,kBAC/B,oBAACC;QAAIC,MAAK;QAAOC,QAAO;QAAKC,SAAQ;QAAYC,OAAM;QAAKC,OAAM;qBAChE,oBAACC;QAAKC,GAAE;QAAWC,QAAO;sBAC1B,oBAACF;QAAKC,GAAE;QAAWC,QAAO;QAE7B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const HorizontalRuleIcon: React.FC;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/lexical/ui/icons/HorizontalRule/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAatC,CAAA"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export const HorizontalRuleIcon = ()=>/*#__PURE__*/ React.createElement("svg", {
3
+ "aria-hidden": "true",
4
+ className: "icon",
5
+ fill: "none",
6
+ focusable: "false",
7
+ height: "20",
8
+ viewBox: "0 0 20 20",
9
+ width: "20",
10
+ xmlns: "http://www.w3.org/2000/svg"
11
+ }, /*#__PURE__*/ React.createElement("rect", {
12
+ fill: "currentColor",
13
+ height: "1",
14
+ width: "12",
15
+ x: "4",
16
+ y: "9.5"
17
+ }));
18
+
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/field/lexical/ui/icons/HorizontalRule/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const HorizontalRuleIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect fill=\"currentColor\" height=\"1\" width=\"12\" x=\"4\" y=\"9.5\" />\n </svg>\n)\n"],"names":["React","HorizontalRuleIcon","svg","aria-hidden","className","fill","focusable","height","viewBox","width","xmlns","rect","x","y"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,qBAA+B,kBAC1C,oBAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,QAAO;QACPC,SAAQ;QACRC,OAAM;QACNC,OAAM;qBAEN,oBAACC;QAAKN,MAAK;QAAeE,QAAO;QAAIE,OAAM;QAAKG,GAAE;QAAIC,GAAE;QAE3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSelectedNode.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/getSelectedNode.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEpE,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,WAAW,GAAG,QAAQ,CAajF"}
1
+ {"version":3,"file":"getSelectedNode.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/getSelectedNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAIpE,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,WAAW,GAAG,QAAQ,CAajF"}
@@ -1,5 +1,4 @@
1
- import lexicalSelectionImport from '@lexical/selection';
2
- const { $isAtNodeEnd } = lexicalSelectionImport;
1
+ import { $isAtNodeEnd } from '@lexical/selection';
3
2
  export function getSelectedNode(selection) {
4
3
  const { anchor } = selection;
5
4
  const { focus } = selection;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/utils/getSelectedNode.ts"],"sourcesContent":["import lexicalSelectionImport from '@lexical/selection'\nconst { $isAtNodeEnd } = lexicalSelectionImport\n\nimport type { ElementNode, RangeSelection, TextNode } from 'lexical'\n\nexport function getSelectedNode(selection: RangeSelection): ElementNode | TextNode {\n const { anchor } = selection\n const { focus } = selection\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n if (anchorNode === focusNode) {\n return anchorNode\n }\n const isBackward = selection.isBackward()\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode\n }\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode\n}\n"],"names":["lexicalSelectionImport","$isAtNodeEnd","getSelectedNode","selection","anchor","focus","anchorNode","getNode","focusNode","isBackward"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,OAAOA,4BAA4B,qBAAoB;AACvD,MAAM,EAAEC,YAAY,EAAE,GAAGD;AAIzB,OAAO,SAASE,gBAAgBC,SAAyB;IACvD,MAAM,EAAEC,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,KAAK,EAAE,GAAGF;IAClB,MAAMG,aAAaH,UAAUC,MAAM,CAACG,OAAO;IAC3C,MAAMC,YAAYL,UAAUE,KAAK,CAACE,OAAO;IACzC,IAAID,eAAeE,WAAW;QAC5B,OAAOF;IACT;IACA,MAAMG,aAAaN,UAAUM,UAAU;IACvC,IAAIA,YAAY;QACd,OAAOR,aAAaI,SAASC,aAAaE;IAC5C;IACA,OAAOP,aAAaG,UAAUE,aAAaE;AAC7C"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/utils/getSelectedNode.ts"],"sourcesContent":["import type { ElementNode, RangeSelection, TextNode } from 'lexical'\n\nimport { $isAtNodeEnd } from '@lexical/selection'\n\nexport function getSelectedNode(selection: RangeSelection): ElementNode | TextNode {\n const { anchor } = selection\n const { focus } = selection\n const anchorNode = selection.anchor.getNode()\n const focusNode = selection.focus.getNode()\n if (anchorNode === focusNode) {\n return anchorNode\n }\n const isBackward = selection.isBackward()\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode\n }\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode\n}\n"],"names":["$isAtNodeEnd","getSelectedNode","selection","anchor","focus","anchorNode","getNode","focusNode","isBackward"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAEA,SAASA,YAAY,QAAQ,qBAAoB;AAEjD,OAAO,SAASC,gBAAgBC,SAAyB;IACvD,MAAM,EAAEC,MAAM,EAAE,GAAGD;IACnB,MAAM,EAAEE,KAAK,EAAE,GAAGF;IAClB,MAAMG,aAAaH,UAAUC,MAAM,CAACG,OAAO;IAC3C,MAAMC,YAAYL,UAAUE,KAAK,CAACE,OAAO;IACzC,IAAID,eAAeE,WAAW;QAC5B,OAAOF;IACT;IACA,MAAMG,aAAaN,UAAUM,UAAU;IACvC,IAAIA,YAAY;QACd,OAAOR,aAAaI,SAASC,aAAaE;IAC5C;IACA,OAAOP,aAAaG,UAAUE,aAAaE;AAC7C"}
@@ -1,5 +1,6 @@
1
1
  import type { ElementFormatType, TextFormatType } from 'lexical';
2
- import type { TextDetailType, TextModeType } from 'lexical/nodes/LexicalTextNode.js';
2
+ export type TextDetailType = 'directionless' | 'unmergable';
3
+ import type { TextModeType } from 'lexical';
3
4
  export declare const NodeFormat: {
4
5
  readonly DOM_ELEMENT_TYPE: 1;
5
6
  readonly DOM_TEXT_TYPE: 3;
@@ -1 +1 @@
1
- {"version":3,"file":"nodeFormat.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/nodeFormat.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGpF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Bb,CAAA;AAEV,eAAO,MAAM,iBAAiB,QAQL,CAAA;AAGzB,eAAO,MAAM,kBAAkB,WAAW,CAAA;AAE1C,eAAO,MAAM,iBAAiB,SAAS,CAAA;AAYvC,eAAO,MAAM,SAAS,QAA8C,CAAA;AAEpE,eAAO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GAAG,MAAM,EAAE,MAAM,CAGzE,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE,MAAM,CAOjF,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAOpE,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAI7D,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAI1D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/utils/nodeFormat.ts"],"sourcesContent":["/* eslint-disable perfectionist/sort-objects */\n/* eslint-disable regexp/no-obscure-range */\n/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n//This copy-and-pasted from lexical here: https://github.com/facebook/lexical/blob/c2ceee223f46543d12c574e62155e619f9a18a5d/packages/lexical/src/LexicalConstants.ts\n\nimport type { ElementFormatType, TextFormatType } from 'lexical'\nimport type { TextDetailType, TextModeType } from 'lexical/nodes/LexicalTextNode.js'\n\n// DOM\nexport const NodeFormat = {\n DOM_ELEMENT_TYPE: 1,\n DOM_TEXT_TYPE: 3,\n // Reconciling\n NO_DIRTY_NODES: 0,\n HAS_DIRTY_NODES: 1,\n FULL_RECONCILE: 2,\n // Text node modes\n IS_NORMAL: 0,\n IS_TOKEN: 1,\n IS_SEGMENTED: 2,\n IS_INERT: 3,\n // Text node formatting\n IS_BOLD: 1,\n IS_ITALIC: 1 << 1,\n IS_STRIKETHROUGH: 1 << 2,\n IS_UNDERLINE: 1 << 3,\n IS_CODE: 1 << 4,\n IS_SUBSCRIPT: 1 << 5,\n IS_SUPERSCRIPT: 1 << 6,\n IS_HIGHLIGHT: 1 << 7,\n // Text node details\n IS_DIRECTIONLESS: 1,\n IS_UNMERGEABLE: 1 << 1,\n // Element node formatting\n IS_ALIGN_LEFT: 1,\n IS_ALIGN_CENTER: 2,\n IS_ALIGN_RIGHT: 3,\n IS_ALIGN_JUSTIFY: 4,\n IS_ALIGN_START: 5,\n IS_ALIGN_END: 6,\n} as const\n\nexport const IS_ALL_FORMATTING =\n NodeFormat.IS_BOLD |\n NodeFormat.IS_ITALIC |\n NodeFormat.IS_STRIKETHROUGH |\n NodeFormat.IS_UNDERLINE |\n NodeFormat.IS_CODE |\n NodeFormat.IS_SUBSCRIPT |\n NodeFormat.IS_SUPERSCRIPT |\n NodeFormat.IS_HIGHLIGHT\n\n// Reconciliation\nexport const NON_BREAKING_SPACE = '\\u00A0'\n\nexport const DOUBLE_LINE_BREAK = '\\n\\n'\n\n// For FF, we need to use a non-breaking space, or it gets composition\n// in a stuck state.\n\nconst RTL = '\\u0591-\\u07FF\\uFB1D-\\uFDFD\\uFE70-\\uFEFC'\nconst LTR =\n 'A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6' +\n '\\u00F8-\\u02B8\\u0300-\\u0590\\u0800-\\u1FFF\\u200E\\u2C00-\\uFB1C' +\n '\\uFE00-\\uFE6F\\uFEFD-\\uFFFF'\n\n// eslint-disable-next-line no-misleading-character-class\nexport const RTL_REGEX = new RegExp('^[^' + LTR + ']*[' + RTL + ']')\n// eslint-disable-next-line no-misleading-character-class\nexport const LTR_REGEX = new RegExp('^[^' + RTL + ']*[' + LTR + ']')\n\nexport const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number> = {\n bold: NodeFormat.IS_BOLD,\n code: NodeFormat.IS_CODE,\n highlight: NodeFormat.IS_HIGHLIGHT,\n italic: NodeFormat.IS_ITALIC,\n strikethrough: NodeFormat.IS_STRIKETHROUGH,\n subscript: NodeFormat.IS_SUBSCRIPT,\n superscript: NodeFormat.IS_SUPERSCRIPT,\n underline: NodeFormat.IS_UNDERLINE,\n}\n\nexport const DETAIL_TYPE_TO_DETAIL: Record<TextDetailType | string, number> = {\n directionless: NodeFormat.IS_DIRECTIONLESS,\n unmergeable: NodeFormat.IS_UNMERGEABLE,\n}\n\nexport const ELEMENT_TYPE_TO_FORMAT: Record<Exclude<ElementFormatType, ''>, number> = {\n center: NodeFormat.IS_ALIGN_CENTER,\n end: NodeFormat.IS_ALIGN_END,\n justify: NodeFormat.IS_ALIGN_JUSTIFY,\n left: NodeFormat.IS_ALIGN_LEFT,\n right: NodeFormat.IS_ALIGN_RIGHT,\n start: NodeFormat.IS_ALIGN_START,\n}\n\nexport const ELEMENT_FORMAT_TO_TYPE: Record<number, ElementFormatType> = {\n [NodeFormat.IS_ALIGN_CENTER]: 'center',\n [NodeFormat.IS_ALIGN_END]: 'end',\n [NodeFormat.IS_ALIGN_JUSTIFY]: 'justify',\n [NodeFormat.IS_ALIGN_LEFT]: 'left',\n [NodeFormat.IS_ALIGN_RIGHT]: 'right',\n [NodeFormat.IS_ALIGN_START]: 'start',\n}\n\nexport const TEXT_MODE_TO_TYPE: Record<TextModeType, 0 | 1 | 2> = {\n normal: NodeFormat.IS_NORMAL,\n segmented: NodeFormat.IS_SEGMENTED,\n token: NodeFormat.IS_TOKEN,\n}\n\nexport const TEXT_TYPE_TO_MODE: Record<number, TextModeType> = {\n [NodeFormat.IS_NORMAL]: 'normal',\n [NodeFormat.IS_SEGMENTED]: 'segmented',\n [NodeFormat.IS_TOKEN]: 'token',\n}\n"],"names":["NodeFormat","DOM_ELEMENT_TYPE","DOM_TEXT_TYPE","NO_DIRTY_NODES","HAS_DIRTY_NODES","FULL_RECONCILE","IS_NORMAL","IS_TOKEN","IS_SEGMENTED","IS_INERT","IS_BOLD","IS_ITALIC","IS_STRIKETHROUGH","IS_UNDERLINE","IS_CODE","IS_SUBSCRIPT","IS_SUPERSCRIPT","IS_HIGHLIGHT","IS_DIRECTIONLESS","IS_UNMERGEABLE","IS_ALIGN_LEFT","IS_ALIGN_CENTER","IS_ALIGN_RIGHT","IS_ALIGN_JUSTIFY","IS_ALIGN_START","IS_ALIGN_END","IS_ALL_FORMATTING","NON_BREAKING_SPACE","DOUBLE_LINE_BREAK","RTL","LTR","RTL_REGEX","RegExp","LTR_REGEX","TEXT_TYPE_TO_FORMAT","bold","code","highlight","italic","strikethrough","subscript","superscript","underline","DETAIL_TYPE_TO_DETAIL","directionless","unmergeable","ELEMENT_TYPE_TO_FORMAT","center","end","justify","left","right","start","ELEMENT_FORMAT_TO_TYPE","TEXT_MODE_TO_TYPE","normal","segmented","token","TEXT_TYPE_TO_MODE"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,6CAA6C,GAC7C,0CAA0C,GAC1C,oEAAoE,GACpE,oKAAoK;AAKpK,MAAM;AACN,OAAO,MAAMA,aAAa;IACxBC,kBAAkB;IAClBC,eAAe;IACf,cAAc;IACdC,gBAAgB;IAChBC,iBAAiB;IACjBC,gBAAgB;IAChB,kBAAkB;IAClBC,WAAW;IACXC,UAAU;IACVC,cAAc;IACdC,UAAU;IACV,uBAAuB;IACvBC,SAAS;IACTC,WAAW,KAAK;IAChBC,kBAAkB,KAAK;IACvBC,cAAc,KAAK;IACnBC,SAAS,KAAK;IACdC,cAAc,KAAK;IACnBC,gBAAgB,KAAK;IACrBC,cAAc,KAAK;IACnB,oBAAoB;IACpBC,kBAAkB;IAClBC,gBAAgB,KAAK;IACrB,0BAA0B;IAC1BC,eAAe;IACfC,iBAAiB;IACjBC,gBAAgB;IAChBC,kBAAkB;IAClBC,gBAAgB;IAChBC,cAAc;AAChB,EAAU;AAEV,OAAO,MAAMC,oBACX1B,WAAWU,OAAO,GAClBV,WAAWW,SAAS,GACpBX,WAAWY,gBAAgB,GAC3BZ,WAAWa,YAAY,GACvBb,WAAWc,OAAO,GAClBd,WAAWe,YAAY,GACvBf,WAAWgB,cAAc,GACzBhB,WAAWiB,YAAY,CAAA;AAEzB,iBAAiB;AACjB,OAAO,MAAMU,qBAAqB,SAAQ;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QAAQvD,WAAWM,SAAS;IAC5BkD,WAAWxD,WAAWQ,YAAY;IAClCiD,OAAOzD,WAAWO,QAAQ;AAC5B,EAAC;AAED,OAAO,MAAMmD,oBAAkD;IAC7D,CAAC1D,WAAWM,SAAS,CAAC,EAAE;IACxB,CAACN,WAAWQ,YAAY,CAAC,EAAE;IAC3B,CAACR,WAAWO,QAAQ,CAAC,EAAE;AACzB,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/utils/nodeFormat.ts"],"sourcesContent":["/* eslint-disable perfectionist/sort-objects */\n/* eslint-disable regexp/no-obscure-range */\n/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\n//This copy-and-pasted from lexical here: https://github.com/facebook/lexical/blob/c2ceee223f46543d12c574e62155e619f9a18a5d/packages/lexical/src/LexicalConstants.ts\n\nimport type { ElementFormatType, TextFormatType } from 'lexical'\nexport type TextDetailType = 'directionless' | 'unmergable'\nimport type { TextModeType } from 'lexical'\n\n// DOM\nexport const NodeFormat = {\n DOM_ELEMENT_TYPE: 1,\n DOM_TEXT_TYPE: 3,\n // Reconciling\n NO_DIRTY_NODES: 0,\n HAS_DIRTY_NODES: 1,\n FULL_RECONCILE: 2,\n // Text node modes\n IS_NORMAL: 0,\n IS_TOKEN: 1,\n IS_SEGMENTED: 2,\n IS_INERT: 3,\n // Text node formatting\n IS_BOLD: 1,\n IS_ITALIC: 1 << 1,\n IS_STRIKETHROUGH: 1 << 2,\n IS_UNDERLINE: 1 << 3,\n IS_CODE: 1 << 4,\n IS_SUBSCRIPT: 1 << 5,\n IS_SUPERSCRIPT: 1 << 6,\n IS_HIGHLIGHT: 1 << 7,\n // Text node details\n IS_DIRECTIONLESS: 1,\n IS_UNMERGEABLE: 1 << 1,\n // Element node formatting\n IS_ALIGN_LEFT: 1,\n IS_ALIGN_CENTER: 2,\n IS_ALIGN_RIGHT: 3,\n IS_ALIGN_JUSTIFY: 4,\n IS_ALIGN_START: 5,\n IS_ALIGN_END: 6,\n} as const\n\nexport const IS_ALL_FORMATTING =\n NodeFormat.IS_BOLD |\n NodeFormat.IS_ITALIC |\n NodeFormat.IS_STRIKETHROUGH |\n NodeFormat.IS_UNDERLINE |\n NodeFormat.IS_CODE |\n NodeFormat.IS_SUBSCRIPT |\n NodeFormat.IS_SUPERSCRIPT |\n NodeFormat.IS_HIGHLIGHT\n\n// Reconciliation\nexport const NON_BREAKING_SPACE = '\\u00A0'\n\nexport const DOUBLE_LINE_BREAK = '\\n\\n'\n\n// For FF, we need to use a non-breaking space, or it gets composition\n// in a stuck state.\n\nconst RTL = '\\u0591-\\u07FF\\uFB1D-\\uFDFD\\uFE70-\\uFEFC'\nconst LTR =\n 'A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6' +\n '\\u00F8-\\u02B8\\u0300-\\u0590\\u0800-\\u1FFF\\u200E\\u2C00-\\uFB1C' +\n '\\uFE00-\\uFE6F\\uFEFD-\\uFFFF'\n\n// eslint-disable-next-line no-misleading-character-class\nexport const RTL_REGEX = new RegExp('^[^' + LTR + ']*[' + RTL + ']')\n// eslint-disable-next-line no-misleading-character-class\nexport const LTR_REGEX = new RegExp('^[^' + RTL + ']*[' + LTR + ']')\n\nexport const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number> = {\n bold: NodeFormat.IS_BOLD,\n code: NodeFormat.IS_CODE,\n highlight: NodeFormat.IS_HIGHLIGHT,\n italic: NodeFormat.IS_ITALIC,\n strikethrough: NodeFormat.IS_STRIKETHROUGH,\n subscript: NodeFormat.IS_SUBSCRIPT,\n superscript: NodeFormat.IS_SUPERSCRIPT,\n underline: NodeFormat.IS_UNDERLINE,\n}\n\nexport const DETAIL_TYPE_TO_DETAIL: Record<TextDetailType | string, number> = {\n directionless: NodeFormat.IS_DIRECTIONLESS,\n unmergeable: NodeFormat.IS_UNMERGEABLE,\n}\n\nexport const ELEMENT_TYPE_TO_FORMAT: Record<Exclude<ElementFormatType, ''>, number> = {\n center: NodeFormat.IS_ALIGN_CENTER,\n end: NodeFormat.IS_ALIGN_END,\n justify: NodeFormat.IS_ALIGN_JUSTIFY,\n left: NodeFormat.IS_ALIGN_LEFT,\n right: NodeFormat.IS_ALIGN_RIGHT,\n start: NodeFormat.IS_ALIGN_START,\n}\n\nexport const ELEMENT_FORMAT_TO_TYPE: Record<number, ElementFormatType> = {\n [NodeFormat.IS_ALIGN_CENTER]: 'center',\n [NodeFormat.IS_ALIGN_END]: 'end',\n [NodeFormat.IS_ALIGN_JUSTIFY]: 'justify',\n [NodeFormat.IS_ALIGN_LEFT]: 'left',\n [NodeFormat.IS_ALIGN_RIGHT]: 'right',\n [NodeFormat.IS_ALIGN_START]: 'start',\n}\n\nexport const TEXT_MODE_TO_TYPE: Record<TextModeType, 0 | 1 | 2> = {\n normal: NodeFormat.IS_NORMAL,\n segmented: NodeFormat.IS_SEGMENTED,\n token: NodeFormat.IS_TOKEN,\n}\n\nexport const TEXT_TYPE_TO_MODE: Record<number, TextModeType> = {\n [NodeFormat.IS_NORMAL]: 'normal',\n [NodeFormat.IS_SEGMENTED]: 'segmented',\n [NodeFormat.IS_TOKEN]: 'token',\n}\n"],"names":["NodeFormat","DOM_ELEMENT_TYPE","DOM_TEXT_TYPE","NO_DIRTY_NODES","HAS_DIRTY_NODES","FULL_RECONCILE","IS_NORMAL","IS_TOKEN","IS_SEGMENTED","IS_INERT","IS_BOLD","IS_ITALIC","IS_STRIKETHROUGH","IS_UNDERLINE","IS_CODE","IS_SUBSCRIPT","IS_SUPERSCRIPT","IS_HIGHLIGHT","IS_DIRECTIONLESS","IS_UNMERGEABLE","IS_ALIGN_LEFT","IS_ALIGN_CENTER","IS_ALIGN_RIGHT","IS_ALIGN_JUSTIFY","IS_ALIGN_START","IS_ALIGN_END","IS_ALL_FORMATTING","NON_BREAKING_SPACE","DOUBLE_LINE_BREAK","RTL","LTR","RTL_REGEX","RegExp","LTR_REGEX","TEXT_TYPE_TO_FORMAT","bold","code","highlight","italic","strikethrough","subscript","superscript","underline","DETAIL_TYPE_TO_DETAIL","directionless","unmergeable","ELEMENT_TYPE_TO_FORMAT","center","end","justify","left","right","start","ELEMENT_FORMAT_TO_TYPE","TEXT_MODE_TO_TYPE","normal","segmented","token","TEXT_TYPE_TO_MODE"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,6CAA6C,GAC7C,0CAA0C,GAC1C,oEAAoE,GACpE,oKAAoK;AAMpK,MAAM;AACN,OAAO,MAAMA,aAAa;IACxBC,kBAAkB;IAClBC,eAAe;IACf,cAAc;IACdC,gBAAgB;IAChBC,iBAAiB;IACjBC,gBAAgB;IAChB,kBAAkB;IAClBC,WAAW;IACXC,UAAU;IACVC,cAAc;IACdC,UAAU;IACV,uBAAuB;IACvBC,SAAS;IACTC,WAAW,KAAK;IAChBC,kBAAkB,KAAK;IACvBC,cAAc,KAAK;IACnBC,SAAS,KAAK;IACdC,cAAc,KAAK;IACnBC,gBAAgB,KAAK;IACrBC,cAAc,KAAK;IACnB,oBAAoB;IACpBC,kBAAkB;IAClBC,gBAAgB,KAAK;IACrB,0BAA0B;IAC1BC,eAAe;IACfC,iBAAiB;IACjBC,gBAAgB;IAChBC,kBAAkB;IAClBC,gBAAgB;IAChBC,cAAc;AAChB,EAAU;AAEV,OAAO,MAAMC,oBACX1B,WAAWU,OAAO,GAClBV,WAAWW,SAAS,GACpBX,WAAWY,gBAAgB,GAC3BZ,WAAWa,YAAY,GACvBb,WAAWc,OAAO,GAClBd,WAAWe,YAAY,GACvBf,WAAWgB,cAAc,GACzBhB,WAAWiB,YAAY,CAAA;AAEzB,iBAAiB;AACjB,OAAO,MAAMU,qBAAqB,SAAQ;AAE1C,OAAO,MAAMC,oBAAoB,OAAM;AAEvC,sEAAsE;AACtE,oBAAoB;AAEpB,MAAMC,MAAM;AACZ,MAAMC,MACJ,qCACA,+DACA;AAEF,yDAAyD;AACzD,OAAO,MA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WM,SAAS,CAAC,EAAE;IACxB,CAACN,WAAWQ,YAAY,CAAC,EAAE;IAC3B,CAACR,WAAWO,QAAQ,CAAC,EAAE;AACzB,EAAC"}
@@ -1,2 +1,12 @@
1
- export declare function setFloatingElemPosition(targetRect: ClientRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, horizontalPosition?: 'center' | 'left', verticalGap?: number, horizontalOffset?: number, specialHandlingForCaret?: boolean): void;
1
+ export declare function setFloatingElemPosition(args: {
2
+ alwaysDisplayOnTop?: boolean;
3
+ anchorElem: HTMLElement;
4
+ anchorFlippedOffset?: number;
5
+ floatingElem: HTMLElement;
6
+ horizontalOffset?: number;
7
+ horizontalPosition?: 'center' | 'left';
8
+ specialHandlingForCaret?: boolean;
9
+ targetRect: ClientRect | null;
10
+ verticalGap?: number;
11
+ }): number;
2
12
  //# sourceMappingURL=setFloatingElemPosition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setFloatingElemPosition.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/setFloatingElemPosition.ts"],"names":[],"mappings":"AAMA,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,UAAU,GAAG,IAAI,EAC7B,YAAY,EAAE,WAAW,EACzB,UAAU,EAAE,WAAW,EACvB,kBAAkB,GAAE,QAAQ,GAAG,MAAe,EAC9C,WAAW,GAAE,MAAqB,EAClC,gBAAgB,GAAE,MAA0B,EAC5C,uBAAuB,UAAQ,GAC9B,IAAI,CAuDN"}
1
+ {"version":3,"file":"setFloatingElemPosition.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/setFloatingElemPosition.ts"],"names":[],"mappings":"AAOA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,UAAU,EAAE,WAAW,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,WAAW,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kBAAkB,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAA;IACtC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,MAAM,CAqET"}
@@ -1,9 +1,12 @@
1
1
  const VERTICAL_GAP = 10;
2
2
  const HORIZONTAL_OFFSET = 5;
3
- // TODO: This works fine with some dirty fixes (looking at you, specialHandlingForCaret). But this definitely needs refactoring and documentation, to be easier to understand and maintain.
3
+ // TODO: needs refactoring
4
4
  // This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.
5
5
  // So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).
6
- export function setFloatingElemPosition(targetRect, floatingElem, anchorElem, horizontalPosition = 'left', verticalGap = VERTICAL_GAP, horizontalOffset = HORIZONTAL_OFFSET, specialHandlingForCaret = false) {
6
+ // This is used for positioning the floating toolbar (anchor: richtext editor) and its caret (anchor: floating toolbar)
7
+ export function setFloatingElemPosition(args) {
8
+ const { alwaysDisplayOnTop = false, anchorElem, anchorFlippedOffset = 0, floatingElem, horizontalOffset = HORIZONTAL_OFFSET, horizontalPosition = 'left', specialHandlingForCaret = false, targetRect, verticalGap = VERTICAL_GAP } = args;
9
+ // Returns the top offset if the target was flipped
7
10
  const scrollerElem = anchorElem.parentElement;
8
11
  if (targetRect === null || scrollerElem == null) {
9
12
  floatingElem.style.opacity = '0';
@@ -19,8 +22,10 @@ export function setFloatingElemPosition(targetRect, floatingElem, anchorElem, ho
19
22
  // Calculate left to position floatingElem to the horizontal middle of targetRect
20
23
  left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2;
21
24
  }
22
- if (top < editorScrollerRect.top) {
23
- top += floatingElemRect.height + targetRect.height + verticalGap * 2;
25
+ let addedToTop = 0;
26
+ if (!alwaysDisplayOnTop && top < editorScrollerRect.top && !specialHandlingForCaret) {
27
+ addedToTop = floatingElemRect.height + targetRect.height + verticalGap * 2;
28
+ top += addedToTop;
24
29
  }
25
30
  if (horizontalPosition === 'center') {
26
31
  if (left + floatingElemRect.width > editorScrollerRect.right) {
@@ -33,21 +38,19 @@ export function setFloatingElemPosition(targetRect, floatingElem, anchorElem, ho
33
38
  left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;
34
39
  }
35
40
  }
36
- top -= anchorElementRect.top;
37
41
  left -= anchorElementRect.left;
38
42
  floatingElem.style.opacity = '1';
39
- if (specialHandlingForCaret && top == 0 /* 0 Happens when selecting 1st line */ ) {
40
- top -= 44 // Especially this arbitrary number needs refactoring (this is for the caret)
41
- ;
42
- // rotate too
43
- floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`;
44
- } else if (specialHandlingForCaret && top === -63 /* -63 Happens when selecting 2nd line in multi-line paragraph */ ) {
45
- top += 18 // Especially this arbitrary number needs refactoring (this is for the caret)
46
- ;
43
+ if (specialHandlingForCaret && anchorFlippedOffset !== 0) {
44
+ // Floating select toolbar was flipped (positioned below text rather than above). Thus, the caret now needs to be positioned
45
+ // on the other side and rotated.
46
+ top -= anchorElementRect.bottom - anchorFlippedOffset + floatingElemRect.height - 3;
47
+ // top += anchorFlippedOffset - anchorElementRect.height - floatingElemRect.height + 2
47
48
  floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`;
48
49
  } else {
50
+ top -= anchorElementRect.top;
49
51
  floatingElem.style.transform = `translate(${left}px, ${top}px)`;
50
52
  }
53
+ return addedToTop;
51
54
  }
52
55
 
53
56
  //# sourceMappingURL=setFloatingElemPosition.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/utils/setFloatingElemPosition.ts"],"sourcesContent":["const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\n// TODO: This works fine with some dirty fixes (looking at you, specialHandlingForCaret). But this definitely needs refactoring and documentation, to be easier to understand and maintain.\n// This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.\n// So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).\nexport function setFloatingElemPosition(\n targetRect: ClientRect | null,\n floatingElem: HTMLElement,\n anchorElem: HTMLElement,\n horizontalPosition: 'center' | 'left' = 'left',\n verticalGap: number = VERTICAL_GAP,\n horizontalOffset: number = HORIZONTAL_OFFSET,\n specialHandlingForCaret = false,\n): void {\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - floatingElemRect.height - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (horizontalPosition === 'center') {\n // Calculate left to position floatingElem to the horizontal middle of targetRect\n left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2\n }\n\n if (top < editorScrollerRect.top) {\n top += floatingElemRect.height + targetRect.height + verticalGap * 2\n }\n\n if (horizontalPosition === 'center') {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n } else if (left < editorScrollerRect.left) {\n left = editorScrollerRect.left + horizontalOffset\n }\n } else {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n }\n\n top -= anchorElementRect.top\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n\n if (specialHandlingForCaret && top == 0 /* 0 Happens when selecting 1st line */) {\n top -= 44 // Especially this arbitrary number needs refactoring (this is for the caret)\n // rotate too\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else if (\n specialHandlingForCaret &&\n top === -63 /* -63 Happens when selecting 2nd line in multi-line paragraph */\n ) {\n top += 18 // Especially this arbitrary number needs refactoring (this is for the caret)\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else {\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n }\n}\n"],"names":["VERTICAL_GAP","HORIZONTAL_OFFSET","setFloatingElemPosition","targetRect","floatingElem","anchorElem","horizontalPosition","verticalGap","horizontalOffset","specialHandlingForCaret","scrollerElem","parentElement","style","opacity","transform","floatingElemRect","getBoundingClientRect","anchorElementRect","editorScrollerRect","top","height","left","width","right"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,MAAMA,eAAe;AACrB,MAAMC,oBAAoB;AAE1B,2LAA2L;AAC3L,iJAAiJ;AACjJ,4JAA4J;AAC5J,OAAO,SAASC,wBACdC,UAA6B,EAC7BC,YAAyB,EACzBC,UAAuB,EACvBC,qBAAwC,MAAM,EAC9CC,cAAsBP,YAAY,EAClCQ,mBAA2BP,iBAAiB,EAC5CQ,0BAA0B,KAAK;IAE/B,MAAMC,eAAeL,WAAWM,aAAa;IAE7C,IAAIR,eAAe,QAAQO,gBAAgB,MAAM;QAC/CN,aAAaQ,KAAK,CAACC,OAAO,GAAG;QAC7BT,aAAaQ,KAAK,CAACE,SAAS,GAAG;QAC/B;IACF;IAEA,MAAMC,mBAAmBX,aAAaY,qBAAqB;IAC3D,MAAMC,oBAAoBZ,WAAWW,qBAAqB;IAC1D,MAAME,qBAAqBR,aAAaM,qBAAqB;IAE7D,IAAIG,MAAMhB,WAAWgB,GAAG,GAAGJ,iBAAiBK,MAAM,GAAGb;IACrD,IAAIc,OAAOlB,WAAWkB,IAAI,GAAGb;IAE7B,IAAIF,uBAAuB,UAAU;QACnC,iFAAiF;QACjFe,OAAOlB,WAAWkB,IAAI,GAAGlB,WAAWmB,KAAK,GAAG,IAAIP,iBAAiBO,KAAK,GAAG;IAC3E;IAEA,IAAIH,MAAMD,mBAAmBC,GAAG,EAAE;QAChCA,OAAOJ,iBAAiBK,MAAM,GAAGjB,WAAWiB,MAAM,GAAGb,cAAc;IACrE;IAEA,IAAID,uBAAuB,UAAU;QACnC,IAAIe,OAAON,iBAAiBO,KAAK,GAAGJ,mBAAmBK,KAAK,EAAE;YAC5DF,OAAOH,mBAAmBK,KAAK,GAAGR,iBAAiBO,KAAK,GAAGd;QAC7D,OAAO,IAAIa,OAAOH,mBAAmBG,IAAI,EAAE;YACzCA,OAAOH,mBAAmBG,IAAI,GAAGb;QACnC;IACF,OAAO;QACL,IAAIa,OAAON,iBAAiBO,KAAK,GAAGJ,mBAAmBK,KAAK,EAAE;YAC5DF,OAAOH,mBAAmBK,KAAK,GAAGR,iBAAiBO,KAAK,GAAGd;QAC7D;IACF;IAEAW,OAAOF,kBAAkBE,GAAG;IAC5BE,QAAQJ,kBAAkBI,IAAI;IAE9BjB,aAAaQ,KAAK,CAACC,OAAO,GAAG;IAE7B,IAAIJ,2BAA2BU,OAAO,EAAE,qCAAqC,KAAI;QAC/EA,OAAO,GAAG,6EAA6E;;QACvF,aAAa;QACbf,aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,kBAAkB,CAAC;IAChF,OAAO,IACLV,2BACAU,QAAQ,CAAC,GAAG,+DAA+D,KAC3E;QACAA,OAAO,GAAG,6EAA6E;;QACvFf,aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,kBAAkB,CAAC;IAChF,OAAO;QACLf,aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,GAAG,CAAC;IACjE;AACF"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/utils/setFloatingElemPosition.ts"],"sourcesContent":["const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\n// TODO: needs refactoring\n// This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.\n// So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).\n// This is used for positioning the floating toolbar (anchor: richtext editor) and its caret (anchor: floating toolbar)\nexport function setFloatingElemPosition(args: {\n alwaysDisplayOnTop?: boolean\n anchorElem: HTMLElement\n anchorFlippedOffset?: number // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem: HTMLElement\n horizontalOffset?: number\n horizontalPosition?: 'center' | 'left'\n specialHandlingForCaret?: boolean\n targetRect: ClientRect | null\n verticalGap?: number\n}): number {\n const {\n alwaysDisplayOnTop = false,\n anchorElem,\n anchorFlippedOffset = 0, // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem,\n horizontalOffset = HORIZONTAL_OFFSET,\n horizontalPosition = 'left',\n specialHandlingForCaret = false,\n targetRect,\n verticalGap = VERTICAL_GAP,\n } = args\n // Returns the top offset if the target was flipped\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - floatingElemRect.height - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (horizontalPosition === 'center') {\n // Calculate left to position floatingElem to the horizontal middle of targetRect\n left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2\n }\n\n let addedToTop = 0\n if (!alwaysDisplayOnTop && top < editorScrollerRect.top && !specialHandlingForCaret) {\n addedToTop = floatingElemRect.height + targetRect.height + verticalGap * 2\n\n top += addedToTop\n }\n\n if (horizontalPosition === 'center') {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n } else if (left < editorScrollerRect.left) {\n left = editorScrollerRect.left + horizontalOffset\n }\n } else {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n }\n\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n\n if (specialHandlingForCaret && anchorFlippedOffset !== 0) {\n // Floating select toolbar was flipped (positioned below text rather than above). Thus, the caret now needs to be positioned\n // on the other side and rotated.\n top -= anchorElementRect.bottom - anchorFlippedOffset + floatingElemRect.height - 3\n // top += anchorFlippedOffset - anchorElementRect.height - floatingElemRect.height + 2\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else {\n top -= anchorElementRect.top\n\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n }\n\n return addedToTop\n}\n"],"names":["VERTICAL_GAP","HORIZONTAL_OFFSET","setFloatingElemPosition","args","alwaysDisplayOnTop","anchorElem","anchorFlippedOffset","floatingElem","horizontalOffset","horizontalPosition","specialHandlingForCaret","targetRect","verticalGap","scrollerElem","parentElement","style","opacity","transform","floatingElemRect","getBoundingClientRect","anchorElementRect","editorScrollerRect","top","height","left","width","addedToTop","right","bottom"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,MAAMA,eAAe;AACrB,MAAMC,oBAAoB;AAE1B,0BAA0B;AAC1B,iJAAiJ;AACjJ,4JAA4J;AAC5J,uHAAuH;AACvH,OAAO,SAASC,wBAAwBC,IAUvC;IACC,MAAM,EACJC,qBAAqB,KAAK,EAC1BC,UAAU,EACVC,sBAAsB,CAAC,EACvBC,YAAY,EACZC,mBAAmBP,iBAAiB,EACpCQ,qBAAqB,MAAM,EAC3BC,0BAA0B,KAAK,EAC/BC,UAAU,EACVC,cAAcZ,YAAY,EAC3B,GAAGG;IACJ,mDAAmD;IACnD,MAAMU,eAAeR,WAAWS,aAAa;IAE7C,IAAIH,eAAe,QAAQE,gBAAgB,MAAM;QAC/CN,aAAaQ,KAAK,CAACC,OAAO,GAAG;Q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aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,kBAAkB,CAAC;IAChF,OAAO;QACLA,OAAOF,kBAAkBE,GAAG;QAE5Bf,aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,GAAG,CAAC;IACjE;IAEA,OAAOI;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/url.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAa/C;AAMD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAkBhD"}
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/field/lexical/utils/url.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAa/C;AAQD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAoBhD"}
@@ -7,9 +7,12 @@ export function sanitizeUrl(url) {
7
7
  }
8
8
  // Source: https://stackoverflow.com/a/8234912/2013580
9
9
  const urlRegExp = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z\d.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z\d.-]+)((?:\/[+~%/.\w-]*)?\??[-+=&;%@.\w]*#?\w*)?)/;
10
+ // Do not keep validateUrl function too loose. This is run when pasting in text, to determine if links are in that text and if it should create AutoLinkNodes.
11
+ // This is why we do not allow stuff like anchors here, as we don't want copied anchors to be turned into AutoLinkNodes.
10
12
  export function validateUrl(url) {
11
13
  // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.
12
14
  // Maybe show a dialog where they user can type the URL before inserting it.
15
+ if (!url) return false;
13
16
  if (url === 'https://') return true;
14
17
  // This makes sure URLs starting with www. instead of https are valid too
15
18
  if (urlRegExp.test(url)) return true;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/utils/url.ts"],"sourcesContent":["export function sanitizeUrl(url: string): string {\n /** A pattern that matches safe URLs. */\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi\n\n /** A pattern that matches safe data URLs. */\n const DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z\\d+/]+=*$/i\n\n url = String(url).trim()\n\n if (url.match(SAFE_URL_PATTERN) != null || url.match(DATA_URL_PATTERN) != null) return url\n\n return 'https://'\n}\n\n// Source: https://stackoverflow.com/a/8234912/2013580\nconst urlRegExp =\n /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z\\d.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z\\d.-]+)((?:\\/[+~%/.\\w-]*)?\\??[-+=&;%@.\\w]*#?\\w*)?)/\n\nexport function validateUrl(url: string): boolean {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n\n if (url === 'https://') return true\n\n // This makes sure URLs starting with www. instead of https are valid too\n if (urlRegExp.test(url)) return true\n\n // While this doesn't allow URLs starting with www (which is why we use the regex above), it does properly handle tel: URLs\n try {\n new URL(url)\n return true\n } catch {\n /* empty */\n }\n\n return false\n}\n"],"names":["sanitizeUrl","url","SAFE_URL_PATTERN","DATA_URL_PATTERN","String","trim","match","urlRegExp","validateUrl","test","URL"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAO,SAASA,YAAYC,GAAW;IACrC,uCAAuC,GACvC,MAAMC,mBAAmB;IAEzB,2CAA2C,GAC3C,MAAMC,mBACJ;IAEFF,MAAMG,OAAOH,KAAKI,IAAI;IAEtB,IAAIJ,IAAIK,KAAK,CAACJ,qBAAqB,QAAQD,IAAIK,KAAK,CAACH,qBAAqB,MAAM,OAAOF;IAEvF,OAAO;AACT;AAEA,sDAAsD;AACtD,MAAMM,YACJ;AAEF,OAAO,SAASC,YAAYP,GAAW;IACrC,8FAA8F;IAC9F,4EAA4E;IAE5E,IAAIA,QAAQ,YAAY,OAAO;IAE/B,yEAAyE;IACzE,IAAIM,UAAUE,IAAI,CAACR,MAAM,OAAO;IAEhC,2HAA2H;IAC3H,IAAI;QACF,IAAIS,IAAIT;QACR,OAAO;IACT,EAAE,OAAM;IACN,SAAS,GACX;IAEA,OAAO;AACT"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/utils/url.ts"],"sourcesContent":["export function sanitizeUrl(url: string): string {\n /** A pattern that matches safe URLs. */\n const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi\n\n /** A pattern that matches safe data URLs. */\n const DATA_URL_PATTERN =\n /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z\\d+/]+=*$/i\n\n url = String(url).trim()\n\n if (url.match(SAFE_URL_PATTERN) != null || url.match(DATA_URL_PATTERN) != null) return url\n\n return 'https://'\n}\n\n// Source: https://stackoverflow.com/a/8234912/2013580\nconst urlRegExp =\n /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z\\d.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z\\d.-]+)((?:\\/[+~%/.\\w-]*)?\\??[-+=&;%@.\\w]*#?\\w*)?)/\n\n// Do not keep validateUrl function too loose. This is run when pasting in text, to determine if links are in that text and if it should create AutoLinkNodes.\n// This is why we do not allow stuff like anchors here, as we don't want copied anchors to be turned into AutoLinkNodes.\nexport function validateUrl(url: string): boolean {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n\n if (!url) return false\n\n if (url === 'https://') return true\n\n // This makes sure URLs starting with www. instead of https are valid too\n if (urlRegExp.test(url)) return true\n\n // While this doesn't allow URLs starting with www (which is why we use the regex above), it does properly handle tel: URLs\n try {\n new URL(url)\n return true\n } catch {\n /* empty */\n }\n\n return false\n}\n"],"names":["sanitizeUrl","url","SAFE_URL_PATTERN","DATA_URL_PATTERN","String","trim","match","urlRegExp","validateUrl","test","URL"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,OAAO,SAASA,YAAYC,GAAW;IACrC,uCAAuC,GACvC,MAAMC,mBAAmB;IAEzB,2CAA2C,GAC3C,MAAMC,mBACJ;IAEFF,MAAMG,OAAOH,KAAKI,IAAI;IAEtB,IAAIJ,IAAIK,KAAK,CAACJ,qBAAqB,QAAQD,IAAIK,KAAK,CAACH,qBAAqB,MAAM,OAAOF;IAEvF,OAAO;AACT;AAEA,sDAAsD;AACtD,MAAMM,YACJ;AAEF,8JAA8J;AAC9J,wHAAwH;AACxH,OAAO,SAASC,YAAYP,GAAW;IACrC,8FAA8F;IAC9F,4EAA4E;IAE5E,IAAI,CAACA,KAAK,OAAO;IAEjB,IAAIA,QAAQ,YAAY,OAAO;IAE/B,yEAAyE;IACzE,IAAIM,UAAUE,IAAI,CAACR,MAAM,OAAO;IAEhC,2HAA2H;IAC3H,IAAI;QACF,IAAIS,IAAIT;QACR,OAAO;IACT,EAAE,OAAM;IACN,SAAS,GACX;IAEA,OAAO;AACT"}
@@ -0,0 +1,10 @@
1
+ import type { SerializedLexicalNode } from 'lexical';
2
+ export declare function recurseNodes({ callback, nodes, }: {
3
+ callback: (node: SerializedLexicalNode) => void;
4
+ nodes: SerializedLexicalNode[];
5
+ }): void;
6
+ export declare function recurseNodesAsync({ callback, nodes, }: {
7
+ callback: (node: SerializedLexicalNode) => Promise<void>;
8
+ nodes: SerializedLexicalNode[];
9
+ }): Promise<void>;
10
+ //# sourceMappingURL=forEachNodeRecursively.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forEachNodeRecursively.d.ts","sourceRoot":"","sources":["../src/forEachNodeRecursively.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAC/C,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,QAQA;AAED,wBAAsB,iBAAiB,CAAC,EACtC,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxD,KAAK,EAAE,qBAAqB,EAAE,CAAA;CAC/B,iBAQA"}
@@ -0,0 +1,24 @@
1
+ export function recurseNodes({ callback, nodes }) {
2
+ for (const node of nodes){
3
+ callback(node);
4
+ if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {
5
+ recurseNodes({
6
+ callback,
7
+ nodes: node.children
8
+ });
9
+ }
10
+ }
11
+ }
12
+ export async function recurseNodesAsync({ callback, nodes }) {
13
+ for (const node of nodes){
14
+ await callback(node);
15
+ if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {
16
+ await recurseNodesAsync({
17
+ callback,
18
+ nodes: node.children
19
+ });
20
+ }
21
+ }
22
+ }
23
+
24
+ //# sourceMappingURL=forEachNodeRecursively.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/forEachNodeRecursively.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nexport function recurseNodes({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => void\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodes({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n\nexport async function recurseNodesAsync({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => Promise<void>\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n await callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n await recurseNodesAsync({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n"],"names":["recurseNodes","callback","nodes","node","Array","isArray","children","length","recurseNodesAsync"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,SAASA,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EAIN;IACC,KAAK,MAAMC,QAAQD,MAAO;QACxBD,SAASE;QAET,IAAI,cAAcA,QAAQC,MAAMC,OAAO,CAACF,MAAMG,aAAaH,MAAMG,UAAUC,QAAQ;YACjFP,aAAa;gBAAEC;gBAAUC,OAAOC,KAAKG,QAAQ;YAA4B;QAC3E;IACF;AACF;AAEA,OAAO,eAAeE,kBAAkB,EACtCP,QAAQ,EACRC,KAAK,EAIN;IACC,KAAK,MAAMC,QAAQD,MAAO;QACxB,MAAMD,SAASE;QAEf,IAAI,cAAcA,QAAQC,MAAMC,OAAO,CAACF,MAAMG,aAAaH,MAAMG,UAAUC,QAAQ;YACjF,MAAMC,kBAAkB;gBAAEP;gBAAUC,OAAOC,KAAKG,QAAQ;YAA4B;QACtF;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAMpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAKzE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CAkHzC,CAAA"}
1
+ {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAKpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAGzE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CA2GzC,CAAA"}
@@ -1,9 +1,6 @@
1
1
  import { mapFields } from '@payloadcms/ui/utilities/buildComponentMap';
2
- import { sanitizeFields } from 'payload/config';
3
2
  import React from 'react';
4
- import { cloneDeep } from './field/lexical/utils/cloneDeep.js';
5
- export const getGenerateComponentMap = (args)=>({ config, i18n, schemaPath })=>{
6
- const validRelationships = config.collections.map((c)=>c.slug) || [];
3
+ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n, schemaPath })=>{
7
4
  const componentMap = new Map();
8
5
  // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:
9
6
  const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort((a, b)=>a[1].order - b[1].order);
@@ -22,7 +19,8 @@ export const getGenerateComponentMap = (args)=>({ config, i18n, schemaPath })=>{
22
19
  for(const componentKey in components){
23
20
  const Component = components[componentKey];
24
21
  if (Component) {
25
- componentMap.set(`feature.${featureKey}.components.${componentKey}`, /*#__PURE__*/ React.createElement(Component, {
22
+ componentMap.set(`feature.${featureKey}.components.${componentKey}`, /*#__PURE__*/ React.createElement(WithServerSideProps, {
23
+ Component: Component,
26
24
  componentKey: componentKey,
27
25
  featureKey: resolvedFeature.key,
28
26
  key: `${resolvedFeature.key}-${componentKey}`
@@ -40,23 +38,19 @@ export const getGenerateComponentMap = (args)=>({ config, i18n, schemaPath })=>{
40
38
  schemaMap: new Map(),
41
39
  schemaPath
42
40
  });
43
- for(const schemaKey in schemas){
44
- const fields = schemas[schemaKey];
45
- const sanitizedFields = sanitizeFields({
46
- config,
47
- fields: cloneDeep(fields),
48
- requireFieldLevelRichTextEditor: true,
49
- validRelationships
50
- });
51
- const mappedFields = mapFields({
52
- config,
53
- disableAddingID: true,
54
- fieldSchema: sanitizedFields,
55
- i18n,
56
- parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,
57
- readOnly: false
58
- });
59
- componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields);
41
+ if (schemas) {
42
+ for (const [schemaKey, fields] of schemas.entries()){
43
+ const mappedFields = mapFields({
44
+ WithServerSideProps,
45
+ config,
46
+ disableAddingID: true,
47
+ fieldSchema: fields,
48
+ i18n,
49
+ parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,
50
+ readOnly: false
51
+ });
52
+ componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields);
53
+ }
60
54
  }
61
55
  }
62
56
  if (!ClientComponent) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport { sanitizeFields } from 'payload/config'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { GeneratedFeatureProviderComponent } from './types.js'\n\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ config, i18n, schemaPath }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientComponent\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <Component\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n for (const schemaKey in schemas) {\n const fields = schemas[schemaKey]\n\n const sanitizedFields = sanitizeFields({\n config,\n fields: cloneDeep(fields),\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n\n const mappedFields = mapFields({\n config,\n disableAddingID: true,\n fieldSchema: sanitizedFields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientComponent:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","sanitizeFields","React","cloneDeep","getGenerateComponentMap","args","config","i18n","schemaPath","validRelationships","collections","map","c","slug","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","featureKey","resolvedFeature","ClientComponent","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","serverFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","sanitizedFields","requireFieldLevelRichTextEditor","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,SAASC,cAAc,QAAQ,iBAAgB;AAC/C,OAAOC,WAAW,QAAO;AAKzB,SAASC,SAAS,QAAQ,qCAAoC;AAE9D,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC3B,MAAMC,qBAAqBH,OAAOI,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAEtE,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACb,KAAKc,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;QAGnCV,aAAaW,GAAG,CACd,CAAC,QAAQ,CAAC,EACVT,wBACGL,GAAG,CAAC,CAAC,CAACe,YAAYC,gBAAgB;YACjC,MAAMC,kBAAkBD,gBAAgBC,eAAe;YACvD,MAAMC,uBAAuBF,gBAAgBG,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OAAO;YACT;YAEA,OAAO;gBACLA,iBACEC,wBAAwB,OAAOA,yBAAyB,yBACtD,oBAACD;oBACE,GAAGC,oBAAoB;oBACxBH,YAAYC,gBAAgBU,GAAG;oBAC/BA,KAAKV,gBAAgBU,GAAG;oBACxBb,OAAOG,gBAAgBH,KAAK;mCAG9B,oBAACI;oBACCF,YAAYC,gBAAgBU,GAAG;oBAC/BA,KAAKV,gBAAgBU,GAAG;oBACxBb,OAAOG,gBAAgBH,KAAK;;gBAGlCa,KAAKV,gBAAgBU,GAAG;gBACxBb,OAAOG,gBAAgBH,KAAK;YAC9B;QACF,GACC0B,MAAM,CAAC,CAACC,UAAYA,YAAY;QAGrC,OAAOrC;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { GeneratedFeatureProviderComponent } from './types.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n, schemaPath }) => {\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientComponent\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <WithServerSideProps\n Component={Component}\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n disableAddingID: true,\n fieldSchema: fields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientComponent:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","React","getGenerateComponentMap","args","WithServerSideProps","config","i18n","schemaPath","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","map","featureKey","resolvedFeature","ClientComponent","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","serverFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rang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E,MAAM,2BAA2B,CAAA;AAIzE,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAkC5F,CAAA"}
1
+ {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../src/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAyB5F,CAAA"}
@@ -1,7 +1,4 @@
1
- import { sanitizeFields } from 'payload/config';
2
- import { cloneDeep } from './field/lexical/utils/cloneDeep.js';
3
1
  export const getGenerateSchemaMap = (args)=>({ config, i18n, schemaMap, schemaPath })=>{
4
- const validRelationships = config.collections.map((c)=>c.slug) || [];
5
2
  for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()){
6
3
  if (!('generateSchemaMap' in resolvedFeature) || typeof resolvedFeature.generateSchemaMap !== 'function') {
7
4
  continue;
@@ -13,15 +10,10 @@ export const getGenerateSchemaMap = (args)=>({ config, i18n, schemaMap, schemaPa
13
10
  schemaMap,
14
11
  schemaPath
15
12
  });
16
- for(const schemaKey in schemas){
17
- const fields = schemas[schemaKey];
18
- const sanitizedFields = sanitizeFields({
19
- config,
20
- fields: cloneDeep(fields),
21
- requireFieldLevelRichTextEditor: true,
22
- validRelationships
23
- });
24
- schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, sanitizedFields);
13
+ if (schemas) {
14
+ for (const [schemaKey, fields] of schemas.entries()){
15
+ schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, fields);
16
+ }
25
17
  }
26
18
  }
27
19
  return schemaMap;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { sanitizeFields } from 'payload/config'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\n\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, i18n, schemaMap, schemaPath }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n for (const schemaKey in schemas) {\n const fields = schemas[schemaKey]\n\n const sanitizedFields = sanitizeFields({\n config,\n fields: cloneDeep(fields),\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n\n schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, sanitizedFields)\n }\n }\n\n return schemaMap\n }\n"],"names":["sanitizeFields","cloneDeep","getGenerateSchemaMap","args","config","i18n","schemaMap","schemaPath","validRelationships","collections","map","c","slug","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","serverFeatureProps","schemaKey","fields","sanitizedFields","requireFieldLevelRichTextEditor","set"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,cAAc,QAAQ,iBAAgB;AAI/C,SAASC,SAAS,QAAQ,qCAAoC;AAE9D,OAAO,MAAMC,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAE;QACtC,MAAMC,qBAAqBJ,OAAOK,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAEtE,KAAK,MAAM,CAACC,YAAYC,gBAAgB,IAAIX,KAAKY,kBAAkB,CAACC,OAAO,GAAI;YAC7E,IACE,CAAE,CAAA,uBAAuBF,eAAc,KACvC,OAAOA,gBAAgBG,iBAAiB,KAAK,YAC7C;gBACA;YACF;YACA,MAAMC,UAAUJ,gBAAgBG,iBAAiB,CAAC;gBAChDb;gBACAC;gBACAc,OAAOL,gBAAgBM,kBAAkB;gBACzCd;gBACAC;YACF;YAEA,IAAK,MAAMc,aAAaH,QAAS;gBAC/B,MAAMI,SAASJ,OAAO,CAACG,UAAU;gBAEjC,MAAME,kBAAkBvB,eAAe;oBACrCI;oBACAkB,QAAQrB,UAAUqB;oBAClBE,iCAAiC;oBACjChB;gBACF;gBAEAF,UAAUmB,GAAG,CAAC,CAAC,EAAElB,WAAW,SAAS,EAAEM,WAAW,CAAC,EAAEQ,UAAU,CAAC,EAAEE;YACpE;QACF;QAEA,OAAOjB;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"names":["getGenerateSchemaMap","args","config","i18n","schemaMap","schemaPath","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","serverFeatureProps","schemaKey","fields","set"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAIA,OAAO,MAAMA,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAE;QACtC,KAAK,MAAM,CAACC,YAAYC,gBAAgB,IAAIN,KAAKO,kBAAkB,CAACC,OAAO,GAAI;YAC7E,IACE,CAAE,CAAA,uBAAuBF,eAAc,KACvC,OAAOA,gBAAgBG,iBAAiB,KAAK,YAC7C;gBACA;YACF;YACA,MAAMC,UAAUJ,gBAAgBG,iBAAiB,CAAC;gBAChDR;gBACAC;gBACAS,OAAOL,gBAAgBM,kBAAkB;gBACzCT;gBACAC;YACF;YAEA,IAAIM,SAAS;gBACX,KAAK,MAAM,CAACG,WAAWC,OAAO,IAAIJ,QAAQF,OAAO,GAAI;oBACnDL,UAAUY,GAAG,CAAC,CAAC,EAAEX,WAAW,SAAS,EAAEC,WAAW,CAAC,EAAEQ,UAAU,CAAC,EAAEC;gBACpE;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}