@payloadcms/richtext-lexical 3.0.0-beta.53 → 3.0.0-beta.54

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 (677) hide show
  1. package/dist/cell/index.d.ts.map +1 -1
  2. package/dist/cell/index.js +1 -1
  3. package/dist/cell/index.js.map +1 -1
  4. package/dist/exports/client/Field-XBUN6QOM.js +2 -0
  5. package/dist/exports/client/Field-XBUN6QOM.js.map +7 -0
  6. package/dist/exports/client/chunk-JIP5PWU3.js +2 -0
  7. package/dist/exports/client/chunk-JIP5PWU3.js.map +7 -0
  8. package/dist/exports/client/{chunk-QU5MKT75.js → chunk-TZLHAUCW.js} +2 -2
  9. package/dist/exports/client/{component-E2NHAHBC.js → component-CEUVAHRO.js} +2 -2
  10. package/dist/exports/client/component-CEUVAHRO.js.map +7 -0
  11. package/dist/exports/client/component-PEFMKIXI.js +2 -0
  12. package/dist/exports/client/component-PEFMKIXI.js.map +7 -0
  13. package/dist/exports/client/index.d.ts +36 -27
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +7 -5
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/feature.client.d.ts +1 -2
  18. package/dist/features/align/feature.client.d.ts.map +1 -1
  19. package/dist/features/align/feature.client.js +9 -16
  20. package/dist/features/align/feature.client.js.map +1 -1
  21. package/dist/features/align/feature.server.d.ts +1 -2
  22. package/dist/features/align/feature.server.d.ts.map +1 -1
  23. package/dist/features/align/feature.server.js +9 -15
  24. package/dist/features/align/feature.server.js.map +1 -1
  25. package/dist/features/align/i18n.js.map +1 -1
  26. package/dist/features/align/toolbarAlignGroup.js.map +1 -1
  27. package/dist/features/blockquote/feature.client.d.ts +1 -2
  28. package/dist/features/blockquote/feature.client.d.ts.map +1 -1
  29. package/dist/features/blockquote/feature.client.js +37 -44
  30. package/dist/features/blockquote/feature.client.js.map +1 -1
  31. package/dist/features/blockquote/feature.server.d.ts +1 -2
  32. package/dist/features/blockquote/feature.server.d.ts.map +1 -1
  33. package/dist/features/blockquote/feature.server.js +35 -40
  34. package/dist/features/blockquote/feature.server.js.map +1 -1
  35. package/dist/features/blockquote/i18n.js.map +1 -1
  36. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  37. package/dist/features/blocks/component/BlockContent.js +2 -2
  38. package/dist/features/blocks/component/BlockContent.js.map +1 -1
  39. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
  40. package/dist/features/blocks/component/index.js +1 -1
  41. package/dist/features/blocks/component/index.js.map +1 -1
  42. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  43. package/dist/features/blocks/drawer/index.js +1 -1
  44. package/dist/features/blocks/drawer/index.js.map +1 -1
  45. package/dist/features/blocks/feature.client.d.ts +1 -2
  46. package/dist/features/blocks/feature.client.d.ts.map +1 -1
  47. package/dist/features/blocks/feature.client.js +74 -80
  48. package/dist/features/blocks/feature.client.js.map +1 -1
  49. package/dist/features/blocks/feature.server.d.ts +1 -2
  50. package/dist/features/blocks/feature.server.d.ts.map +1 -1
  51. package/dist/features/blocks/feature.server.js +88 -90
  52. package/dist/features/blocks/feature.server.js.map +1 -1
  53. package/dist/features/blocks/graphQLPopulationPromise.d.ts +1 -1
  54. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
  55. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
  56. package/dist/features/blocks/i18n.js.map +1 -1
  57. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
  58. package/dist/features/blocks/plugin/commands.js.map +1 -1
  59. package/dist/features/blocks/plugin/index.d.ts +1 -1
  60. package/dist/features/blocks/plugin/index.d.ts.map +1 -1
  61. package/dist/features/blocks/plugin/index.js.map +1 -1
  62. package/dist/features/blocks/validate.d.ts +1 -1
  63. package/dist/features/blocks/validate.d.ts.map +1 -1
  64. package/dist/features/blocks/validate.js.map +1 -1
  65. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  66. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  67. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  68. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  69. package/dist/features/converters/html/converter/index.js.map +1 -1
  70. package/dist/features/converters/html/converter/types.js.map +1 -1
  71. package/dist/features/converters/html/feature.server.d.ts +1 -2
  72. package/dist/features/converters/html/feature.server.d.ts.map +1 -1
  73. package/dist/features/converters/html/feature.server.js +6 -12
  74. package/dist/features/converters/html/feature.server.js.map +1 -1
  75. package/dist/features/converters/html/field/index.js +1 -1
  76. package/dist/features/converters/html/field/index.js.map +1 -1
  77. package/dist/features/createClientComponent.d.ts +3 -2
  78. package/dist/features/createClientComponent.d.ts.map +1 -1
  79. package/dist/features/createClientComponent.js.map +1 -1
  80. package/dist/features/createFeaturePropComponent.d.ts.map +1 -1
  81. package/dist/features/createFeaturePropComponent.js.map +1 -1
  82. package/dist/features/debug/testRecorder/feature.client.d.ts +1 -2
  83. package/dist/features/debug/testRecorder/feature.client.d.ts.map +1 -1
  84. package/dist/features/debug/testRecorder/feature.client.js +9 -16
  85. package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
  86. package/dist/features/debug/testRecorder/feature.server.d.ts +1 -2
  87. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  88. package/dist/features/debug/testRecorder/feature.server.js +8 -13
  89. package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
  90. package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
  91. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  92. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
  93. package/dist/features/debug/treeView/feature.client.d.ts +1 -2
  94. package/dist/features/debug/treeView/feature.client.d.ts.map +1 -1
  95. package/dist/features/debug/treeView/feature.client.js +9 -16
  96. package/dist/features/debug/treeView/feature.client.js.map +1 -1
  97. package/dist/features/debug/treeView/feature.server.d.ts +1 -2
  98. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
  99. package/dist/features/debug/treeView/feature.server.js +8 -13
  100. package/dist/features/debug/treeView/feature.server.js.map +1 -1
  101. package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
  102. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
  103. package/dist/features/debug/treeView/plugin/index.js.map +1 -1
  104. package/dist/features/format/bold/feature.client.d.ts +1 -2
  105. package/dist/features/format/bold/feature.client.d.ts.map +1 -1
  106. package/dist/features/format/bold/feature.client.js +16 -23
  107. package/dist/features/format/bold/feature.client.js.map +1 -1
  108. package/dist/features/format/bold/feature.server.d.ts +1 -2
  109. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  110. package/dist/features/format/bold/feature.server.js +21 -24
  111. package/dist/features/format/bold/feature.server.js.map +1 -1
  112. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  113. package/dist/features/format/inlineCode/feature.client.d.ts +1 -2
  114. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
  115. package/dist/features/format/inlineCode/feature.client.js +12 -21
  116. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  117. package/dist/features/format/inlineCode/feature.server.d.ts +1 -2
  118. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  119. package/dist/features/format/inlineCode/feature.server.js +11 -16
  120. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  121. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  122. package/dist/features/format/italic/feature.client.d.ts +1 -2
  123. package/dist/features/format/italic/feature.client.d.ts.map +1 -1
  124. package/dist/features/format/italic/feature.client.js +13 -22
  125. package/dist/features/format/italic/feature.client.js.map +1 -1
  126. package/dist/features/format/italic/feature.server.d.ts +1 -2
  127. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  128. package/dist/features/format/italic/feature.server.js +12 -17
  129. package/dist/features/format/italic/feature.server.js.map +1 -1
  130. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  131. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  132. package/dist/features/format/strikethrough/feature.client.d.ts +1 -2
  133. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
  134. package/dist/features/format/strikethrough/feature.client.js +12 -21
  135. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  136. package/dist/features/format/strikethrough/feature.server.d.ts +1 -2
  137. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  138. package/dist/features/format/strikethrough/feature.server.js +11 -16
  139. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  140. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  141. package/dist/features/format/subscript/feature.client.d.ts +1 -2
  142. package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
  143. package/dist/features/format/subscript/feature.client.js +9 -18
  144. package/dist/features/format/subscript/feature.client.js.map +1 -1
  145. package/dist/features/format/subscript/feature.server.d.ts +1 -2
  146. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  147. package/dist/features/format/subscript/feature.server.js +8 -13
  148. package/dist/features/format/subscript/feature.server.js.map +1 -1
  149. package/dist/features/format/superscript/feature.client.d.ts +1 -2
  150. package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
  151. package/dist/features/format/superscript/feature.client.js +9 -18
  152. package/dist/features/format/superscript/feature.client.js.map +1 -1
  153. package/dist/features/format/superscript/feature.server.d.ts +1 -2
  154. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  155. package/dist/features/format/superscript/feature.server.js +8 -13
  156. package/dist/features/format/superscript/feature.server.js.map +1 -1
  157. package/dist/features/format/underline/feature.client.d.ts +1 -2
  158. package/dist/features/format/underline/feature.client.d.ts.map +1 -1
  159. package/dist/features/format/underline/feature.client.js +9 -18
  160. package/dist/features/format/underline/feature.client.js.map +1 -1
  161. package/dist/features/format/underline/feature.server.d.ts +1 -2
  162. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  163. package/dist/features/format/underline/feature.server.js +8 -13
  164. package/dist/features/format/underline/feature.server.js.map +1 -1
  165. package/dist/features/heading/feature.client.d.ts +1 -2
  166. package/dist/features/heading/feature.client.d.ts.map +1 -1
  167. package/dist/features/heading/feature.client.js +70 -76
  168. package/dist/features/heading/feature.client.js.map +1 -1
  169. package/dist/features/heading/feature.server.d.ts +1 -2
  170. package/dist/features/heading/feature.server.d.ts.map +1 -1
  171. package/dist/features/heading/feature.server.js +51 -53
  172. package/dist/features/heading/feature.server.js.map +1 -1
  173. package/dist/features/heading/i18n.js.map +1 -1
  174. package/dist/features/heading/markdownTransformer.js.map +1 -1
  175. package/dist/features/horizontalRule/component/index.js.map +1 -1
  176. package/dist/features/horizontalRule/feature.client.d.ts +1 -2
  177. package/dist/features/horizontalRule/feature.client.d.ts.map +1 -1
  178. package/dist/features/horizontalRule/feature.client.js +58 -65
  179. package/dist/features/horizontalRule/feature.client.js.map +1 -1
  180. package/dist/features/horizontalRule/feature.server.d.ts +1 -2
  181. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
  182. package/dist/features/horizontalRule/feature.server.js +26 -31
  183. package/dist/features/horizontalRule/feature.server.js.map +1 -1
  184. package/dist/features/horizontalRule/i18n.js.map +1 -1
  185. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
  186. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
  187. package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
  188. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
  189. package/dist/features/horizontalRule/plugin/index.js.map +1 -1
  190. package/dist/features/indent/feature.client.d.ts +1 -2
  191. package/dist/features/indent/feature.client.d.ts.map +1 -1
  192. package/dist/features/indent/feature.client.js +9 -16
  193. package/dist/features/indent/feature.client.js.map +1 -1
  194. package/dist/features/indent/feature.server.d.ts +1 -2
  195. package/dist/features/indent/feature.server.d.ts.map +1 -1
  196. package/dist/features/indent/feature.server.js +9 -15
  197. package/dist/features/indent/feature.server.js.map +1 -1
  198. package/dist/features/indent/i18n.js.map +1 -1
  199. package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
  200. package/dist/features/link/drawer/baseFields.d.ts +2 -2
  201. package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
  202. package/dist/features/link/drawer/baseFields.js.map +1 -1
  203. package/dist/features/link/drawer/index.js.map +1 -1
  204. package/dist/features/link/drawer/types.js.map +1 -1
  205. package/dist/features/link/feature.client.d.ts +3 -4
  206. package/dist/features/link/feature.client.d.ts.map +1 -1
  207. package/dist/features/link/feature.client.js +34 -41
  208. package/dist/features/link/feature.client.js.map +1 -1
  209. package/dist/features/link/feature.server.d.ts +4 -6
  210. package/dist/features/link/feature.server.d.ts.map +1 -1
  211. package/dist/features/link/feature.server.js +123 -125
  212. package/dist/features/link/feature.server.js.map +1 -1
  213. package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
  214. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
  215. package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
  216. package/dist/features/link/i18n.js.map +1 -1
  217. package/dist/features/link/markdownTransformer.js.map +1 -1
  218. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  219. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  220. package/dist/features/link/nodes/types.js.map +1 -1
  221. package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
  222. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
  223. package/dist/features/link/plugins/autoLink/index.js.map +1 -1
  224. package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
  225. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  226. package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
  227. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  228. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  229. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
  230. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  231. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  232. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  233. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
  234. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  235. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  236. package/dist/features/link/plugins/link/index.d.ts +1 -1
  237. package/dist/features/link/plugins/link/index.d.ts.map +1 -1
  238. package/dist/features/link/plugins/link/index.js.map +1 -1
  239. package/dist/features/link/validate.d.ts +1 -1
  240. package/dist/features/link/validate.d.ts.map +1 -1
  241. package/dist/features/link/validate.js.map +1 -1
  242. package/dist/features/lists/checklist/feature.client.d.ts +1 -2
  243. package/dist/features/lists/checklist/feature.client.d.ts.map +1 -1
  244. package/dist/features/lists/checklist/feature.client.js +50 -57
  245. package/dist/features/lists/checklist/feature.client.js.map +1 -1
  246. package/dist/features/lists/checklist/feature.server.d.ts +1 -2
  247. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
  248. package/dist/features/lists/checklist/feature.server.js +28 -31
  249. package/dist/features/lists/checklist/feature.server.js.map +1 -1
  250. package/dist/features/lists/checklist/i18n.js.map +1 -1
  251. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  252. package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
  253. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
  254. package/dist/features/lists/checklist/plugin/index.js.map +1 -1
  255. package/dist/features/lists/htmlConverter.js.map +1 -1
  256. package/dist/features/lists/orderedList/feature.client.d.ts +1 -2
  257. package/dist/features/lists/orderedList/feature.client.d.ts.map +1 -1
  258. package/dist/features/lists/orderedList/feature.client.js +39 -46
  259. package/dist/features/lists/orderedList/feature.client.js.map +1 -1
  260. package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
  261. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
  262. package/dist/features/lists/orderedList/feature.server.js +28 -31
  263. package/dist/features/lists/orderedList/feature.server.js.map +1 -1
  264. package/dist/features/lists/orderedList/i18n.js.map +1 -1
  265. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  266. package/dist/features/lists/plugin/index.d.ts +1 -1
  267. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  268. package/dist/features/lists/plugin/index.js.map +1 -1
  269. package/dist/features/lists/shared/markdown.d.ts +1 -1
  270. package/dist/features/lists/shared/markdown.js.map +1 -1
  271. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  272. package/dist/features/lists/unorderedList/feature.client.d.ts +1 -2
  273. package/dist/features/lists/unorderedList/feature.client.d.ts.map +1 -1
  274. package/dist/features/lists/unorderedList/feature.client.js +40 -49
  275. package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
  276. package/dist/features/lists/unorderedList/feature.server.d.ts +1 -2
  277. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  278. package/dist/features/lists/unorderedList/feature.server.js +26 -31
  279. package/dist/features/lists/unorderedList/feature.server.js.map +1 -1
  280. package/dist/features/lists/unorderedList/i18n.js.map +1 -1
  281. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  282. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -1
  283. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -1
  284. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
  285. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  286. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +1 -1
  287. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  288. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -1
  289. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -1
  290. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  291. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  292. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +1 -1
  293. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  294. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -1
  295. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -1
  296. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  297. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  298. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +1 -1
  299. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  300. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -1
  301. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  302. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -1
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  314. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -1
  319. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  321. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  322. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +1 -1
  323. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  324. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  325. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  326. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -1
  327. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  328. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -2
  329. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  330. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +20 -27
  331. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  332. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -2
  333. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  334. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +39 -42
  335. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  336. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  337. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  338. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -1
  339. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  341. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +1 -1
  343. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -1
  345. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -1
  346. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  347. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +1 -1
  349. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -1
  351. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -1
  352. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  354. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +1 -1
  355. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  356. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -1
  357. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -1
  358. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  359. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  360. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +1 -1
  361. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  362. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -1
  363. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  364. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  365. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  366. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +1 -1
  367. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  368. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -1
  369. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -1
  370. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  371. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  372. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +1 -1
  373. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  374. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -1
  375. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -1
  376. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  377. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  378. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +1 -1
  379. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  380. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -1
  381. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  382. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  383. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  384. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +1 -1
  385. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  386. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -1
  387. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -1
  388. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  389. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  390. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +1 -1
  391. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  392. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -1
  393. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -1
  394. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  395. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  396. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +1 -1
  397. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  398. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  399. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  400. package/dist/features/migrations/slateToLexical/converter/types.d.ts +1 -1
  401. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  402. package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -2
  403. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  404. package/dist/features/migrations/slateToLexical/feature.client.js +20 -27
  405. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  406. package/dist/features/migrations/slateToLexical/feature.server.d.ts +1 -2
  407. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  408. package/dist/features/migrations/slateToLexical/feature.server.js +39 -42
  409. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  410. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  411. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  412. package/dist/features/paragraph/feature.client.d.ts +1 -2
  413. package/dist/features/paragraph/feature.client.d.ts.map +1 -1
  414. package/dist/features/paragraph/feature.client.js +33 -40
  415. package/dist/features/paragraph/feature.client.js.map +1 -1
  416. package/dist/features/paragraph/feature.server.d.ts +1 -2
  417. package/dist/features/paragraph/feature.server.d.ts.map +1 -1
  418. package/dist/features/paragraph/feature.server.js +10 -15
  419. package/dist/features/paragraph/feature.server.js.map +1 -1
  420. package/dist/features/paragraph/i18n.js.map +1 -1
  421. package/dist/features/relationship/drawer/commands.js.map +1 -1
  422. package/dist/features/relationship/drawer/index.d.ts.map +1 -1
  423. package/dist/features/relationship/drawer/index.js.map +1 -1
  424. package/dist/features/relationship/feature.client.d.ts +3 -4
  425. package/dist/features/relationship/feature.client.d.ts.map +1 -1
  426. package/dist/features/relationship/feature.client.js +60 -67
  427. package/dist/features/relationship/feature.client.js.map +1 -1
  428. package/dist/features/relationship/feature.server.d.ts +4 -4
  429. package/dist/features/relationship/feature.server.d.ts.map +1 -1
  430. package/dist/features/relationship/feature.server.js +45 -51
  431. package/dist/features/relationship/feature.server.js.map +1 -1
  432. package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
  433. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
  434. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
  435. package/dist/features/relationship/i18n.js.map +1 -1
  436. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
  437. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  438. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  439. package/dist/features/relationship/plugins/index.d.ts +1 -1
  440. package/dist/features/relationship/plugins/index.d.ts.map +1 -1
  441. package/dist/features/relationship/plugins/index.js.map +1 -1
  442. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  443. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  444. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  445. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  446. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  447. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
  448. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  449. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  450. package/dist/features/toolbars/fixed/feature.client.d.ts +1 -2
  451. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  452. package/dist/features/toolbars/fixed/feature.client.js +9 -16
  453. package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
  454. package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
  455. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  456. package/dist/features/toolbars/fixed/feature.server.js +16 -18
  457. package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
  458. package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
  459. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  460. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
  461. package/dist/features/toolbars/inline/feature.client.d.ts +1 -2
  462. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
  463. package/dist/features/toolbars/inline/feature.client.js +9 -16
  464. package/dist/features/toolbars/inline/feature.client.js.map +1 -1
  465. package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
  466. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
  467. package/dist/features/toolbars/inline/feature.server.js +8 -13
  468. package/dist/features/toolbars/inline/feature.server.js.map +1 -1
  469. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  470. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  471. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  472. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  473. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  474. package/dist/features/toolbars/types.d.ts +7 -2
  475. package/dist/features/toolbars/types.d.ts.map +1 -1
  476. package/dist/features/toolbars/types.js.map +1 -1
  477. package/dist/features/typeUtilities.d.ts +1 -1
  478. package/dist/features/typeUtilities.d.ts.map +1 -1
  479. package/dist/features/typeUtilities.js.map +1 -1
  480. package/dist/features/typesClient.d.ts +182 -0
  481. package/dist/features/typesClient.d.ts.map +1 -0
  482. package/dist/features/typesClient.js +3 -0
  483. package/dist/features/typesClient.js.map +1 -0
  484. package/dist/features/{types.d.ts → typesServer.d.ts} +15 -191
  485. package/dist/features/typesServer.d.ts.map +1 -0
  486. package/dist/features/typesServer.js +3 -0
  487. package/dist/features/typesServer.js.map +1 -0
  488. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  489. package/dist/features/upload/component/index.d.ts.map +1 -1
  490. package/dist/features/upload/component/index.js +1 -1
  491. package/dist/features/upload/component/index.js.map +1 -1
  492. package/dist/features/upload/drawer/commands.js.map +1 -1
  493. package/dist/features/upload/drawer/index.d.ts.map +1 -1
  494. package/dist/features/upload/drawer/index.js.map +1 -1
  495. package/dist/features/upload/feature.client.d.ts +1 -2
  496. package/dist/features/upload/feature.client.d.ts.map +1 -1
  497. package/dist/features/upload/feature.client.js +62 -69
  498. package/dist/features/upload/feature.client.js.map +1 -1
  499. package/dist/features/upload/feature.server.d.ts +3 -4
  500. package/dist/features/upload/feature.server.d.ts.map +1 -1
  501. package/dist/features/upload/feature.server.js +166 -168
  502. package/dist/features/upload/feature.server.js.map +1 -1
  503. package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
  504. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
  505. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
  506. package/dist/features/upload/i18n.js.map +1 -1
  507. package/dist/features/upload/nodes/UploadNode.js.map +1 -1
  508. package/dist/features/upload/plugin/index.d.ts +1 -1
  509. package/dist/features/upload/plugin/index.d.ts.map +1 -1
  510. package/dist/features/upload/plugin/index.js.map +1 -1
  511. package/dist/features/upload/validate.d.ts +1 -1
  512. package/dist/features/upload/validate.d.ts.map +1 -1
  513. package/dist/features/upload/validate.js.map +1 -1
  514. package/dist/field/Field.d.ts.map +1 -1
  515. package/dist/field/Field.js.map +1 -1
  516. package/dist/field/index.d.ts.map +1 -1
  517. package/dist/field/index.js +9 -7
  518. package/dist/field/index.js.map +1 -1
  519. package/dist/i18n.js.map +1 -1
  520. package/dist/index.d.ts +9 -7
  521. package/dist/index.d.ts.map +1 -1
  522. package/dist/index.js +17 -17
  523. package/dist/index.js.map +1 -1
  524. package/dist/lexical/EditorPlugin.d.ts +1 -1
  525. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  526. package/dist/lexical/EditorPlugin.js.map +1 -1
  527. package/dist/lexical/LexicalEditor.js.map +1 -1
  528. package/dist/lexical/LexicalProvider.js.map +1 -1
  529. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  530. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  531. package/dist/lexical/config/client/default.js.map +1 -1
  532. package/dist/lexical/config/client/loader.d.ts +1 -1
  533. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  534. package/dist/lexical/config/client/loader.js +2 -2
  535. package/dist/lexical/config/client/loader.js.map +1 -1
  536. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  537. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  538. package/dist/lexical/config/client/sanitize.js +1 -1
  539. package/dist/lexical/config/client/sanitize.js.map +1 -1
  540. package/dist/lexical/config/server/default.d.ts +2 -2
  541. package/dist/lexical/config/server/default.d.ts.map +1 -1
  542. package/dist/lexical/config/server/default.js.map +1 -1
  543. package/dist/lexical/config/server/loader.d.ts +2 -2
  544. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  545. package/dist/lexical/config/server/loader.js +2 -2
  546. package/dist/lexical/config/server/loader.js.map +1 -1
  547. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  548. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  549. package/dist/lexical/config/server/sanitize.js.map +1 -1
  550. package/dist/lexical/config/types.d.ts +4 -3
  551. package/dist/lexical/config/types.d.ts.map +1 -1
  552. package/dist/lexical/config/types.js.map +1 -1
  553. package/dist/lexical/nodes/index.js.map +1 -1
  554. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  555. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  556. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  557. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +9 -1
  558. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  559. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  560. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  561. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  562. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  563. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  564. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  565. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  566. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  567. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +0 -1
  568. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  569. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  570. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  571. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  572. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  573. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  574. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  575. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  576. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  577. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  578. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  579. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  580. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  582. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  583. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  585. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  588. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  589. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  591. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  592. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  593. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  594. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  595. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  597. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  598. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  599. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  600. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  601. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  603. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  604. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  606. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  607. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  608. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  609. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  611. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  612. package/dist/lexical/utils/cloneDeep.js.map +1 -1
  613. package/dist/lexical/utils/environment.js.map +1 -1
  614. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  615. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  616. package/dist/lexical/utils/guard.js.map +1 -1
  617. package/dist/lexical/utils/invariant.js.map +1 -1
  618. package/dist/lexical/utils/joinClasses.js.map +1 -1
  619. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  620. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  621. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  622. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  623. package/dist/lexical/utils/point.js.map +1 -1
  624. package/dist/lexical/utils/rect.js.map +1 -1
  625. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  626. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  627. package/dist/lexical/utils/swipe.js.map +1 -1
  628. package/dist/lexical/utils/url.js.map +1 -1
  629. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  630. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  631. package/dist/populateGraphQL/populate.js.map +1 -1
  632. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  633. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  634. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  635. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -1
  636. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  637. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  638. package/dist/types.d.ts +6 -6
  639. package/dist/types.d.ts.map +1 -1
  640. package/dist/types.js.map +1 -1
  641. package/dist/utilities/createClientFeature.d.ts +13 -0
  642. package/dist/utilities/createClientFeature.d.ts.map +1 -0
  643. package/dist/utilities/createClientFeature.js +30 -0
  644. package/dist/utilities/createClientFeature.js.map +1 -0
  645. package/dist/utilities/createServerFeature.d.ts +16 -0
  646. package/dist/utilities/createServerFeature.d.ts.map +1 -0
  647. package/dist/utilities/createServerFeature.js +34 -0
  648. package/dist/utilities/createServerFeature.js.map +1 -0
  649. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  650. package/dist/utilities/generateComponentMap.d.ts +2 -2
  651. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  652. package/dist/utilities/generateComponentMap.js +4 -4
  653. package/dist/utilities/generateComponentMap.js.map +1 -1
  654. package/dist/utilities/generateSchemaMap.d.ts +2 -2
  655. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  656. package/dist/utilities/generateSchemaMap.js +1 -1
  657. package/dist/utilities/generateSchemaMap.js.map +1 -1
  658. package/dist/utilities/recurseNodeTree.js.map +1 -1
  659. package/dist/utilities/useLexicalFeature.d.ts +1 -1
  660. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  661. package/dist/utilities/useLexicalFeature.js.map +1 -1
  662. package/dist/validate/index.js.map +1 -1
  663. package/dist/validate/validateNodes.d.ts +1 -1
  664. package/dist/validate/validateNodes.d.ts.map +1 -1
  665. package/dist/validate/validateNodes.js.map +1 -1
  666. package/package.json +10 -10
  667. package/dist/exports/client/Field-YMWNSE3A.js +0 -2
  668. package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
  669. package/dist/exports/client/chunk-ZITHDR53.js +0 -2
  670. package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
  671. package/dist/exports/client/component-E2NHAHBC.js.map +0 -7
  672. package/dist/exports/client/component-X4LSLSWF.js +0 -2
  673. package/dist/exports/client/component-X4LSLSWF.js.map +0 -7
  674. package/dist/features/types.d.ts.map +0 -1
  675. package/dist/features/types.js +0 -3
  676. package/dist/features/types.js.map +0 -1
  677. /package/dist/exports/client/{chunk-QU5MKT75.js.map → chunk-TZLHAUCW.js.map} +0 -0
@@ -1,5 +1,4 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const AlignFeatureClientComponent: import("react").FC<{
1
+ export declare const AlignFeatureClient: import("react").FC<{
3
2
  featureKey: string;
4
3
  order: number;
5
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../src/features/align/feature.client.tsx"],"names":[],"mappings":";AAsKA,eAAO,MAAM,2BAA2B;;;EAA4C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../src/features/align/feature.client.tsx"],"names":[],"mappings":"AAsJA,eAAO,MAAM,kBAAkB;;;EAO7B,CAAA"}
@@ -4,7 +4,7 @@ import { AlignCenterIcon } from '../../lexical/ui/icons/AlignCenter/index.js';
4
4
  import { AlignJustifyIcon } from '../../lexical/ui/icons/AlignJustify/index.js';
5
5
  import { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js';
6
6
  import { AlignRightIcon } from '../../lexical/ui/icons/AlignRight/index.js';
7
- import { createClientComponent } from '../createClientComponent.js';
7
+ import { createClientFeature } from '../../utilities/createClientFeature.js';
8
8
  import { toolbarAlignGroupWithItems } from './toolbarAlignGroup.js';
9
9
  const toolbarGroups = [
10
10
  toolbarAlignGroupWithItems([
@@ -134,20 +134,13 @@ const toolbarGroups = [
134
134
  }
135
135
  ])
136
136
  ];
137
- const AlignFeatureClient = (props)=>{
138
- return {
139
- clientFeatureProps: props,
140
- feature: ()=>({
141
- clientFeatureProps: props,
142
- toolbarFixed: {
143
- groups: toolbarGroups
144
- },
145
- toolbarInline: {
146
- groups: toolbarGroups
147
- }
148
- })
149
- };
150
- };
151
- export const AlignFeatureClientComponent = createClientComponent(AlignFeatureClient);
137
+ export const AlignFeatureClient = createClientFeature({
138
+ toolbarFixed: {
139
+ groups: toolbarGroups
140
+ },
141
+ toolbarInline: {
142
+ groups: toolbarGroups
143
+ }
144
+ });
152
145
 
153
146
  //# sourceMappingURL=feature.client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/align/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isElementNode, $isRangeSelection, FORMAT_ELEMENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { AlignCenterIcon } from '../../lexical/ui/icons/AlignCenter/index.js'\nimport { AlignJustifyIcon } from '../../lexical/ui/icons/AlignJustify/index.js'\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\nimport { AlignRightIcon } from '../../lexical/ui/icons/AlignRight/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { toolbarAlignGroupWithItems } from './toolbarAlignGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarAlignGroupWithItems([\n {\n ChildComponent: AlignLeftIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'left') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'left') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignLeft',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignLeftLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'left')\n },\n order: 1,\n },\n {\n ChildComponent: AlignCenterIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'center') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'center') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignCenter',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignCenterLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'center')\n },\n order: 2,\n },\n {\n ChildComponent: AlignRightIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'right') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'right') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignRight',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignRightLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'right')\n },\n order: 3,\n },\n {\n ChildComponent: AlignJustifyIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'justify') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'justify') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignJustify',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignJustifyLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'justify')\n },\n order: 4,\n },\n ]),\n]\n\nconst AlignFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const AlignFeatureClientComponent = createClientComponent(AlignFeatureClient)\n"],"names":["$isElementNode","$isRangeSelection","FORMAT_ELEMENT_COMMAND","AlignCenterIcon","AlignJustifyIcon","AlignLeftIcon","AlignRightIcon","createClientComponent","toolbarAlignGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getFormatType","parent","getParent","key","label","i18n","t","onSelect","editor","dispatchCommand","order","AlignFeatureClient","props","clientFeatureProps","feature","toolbarFixed","groups","toolbarInline","AlignFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,cAAc,EAAEC,iBAAiB,EAAEC,sBAAsB,QAAQ,UAAS;AAKnF,SAASC,eAAe,QAAQ,8CAA6C;AAC7E,SAASC,gBAAgB,QAAQ,+CAA8C;AAC/E,SAASC,aAAa,QAAQ,4CAA2C;AACzE,SAASC,cAAc,QAAQ,6CAA4C;AAC3E,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,0BAA0B,QAAQ,yBAAwB;AAEnE,MAAMC,gBAAgC;IACpCD,2BAA2B;QACzB;YACEE,gBAAgBL;YAChBM,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACX,kBAAkBW,YAAY;oBACjC,OA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AEA,OAAO,MAAMwB,8BAA8B1B,sBAAsBmB,oBAAmB"}
1
+ {"version":3,"sources":["../../../src/features/align/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isElementNode, $isRangeSelection, FORMAT_ELEMENT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\n\nimport { AlignCenterIcon } from '../../lexical/ui/icons/AlignCenter/index.js'\nimport { AlignJustifyIcon } from '../../lexical/ui/icons/AlignJustify/index.js'\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\nimport { AlignRightIcon } from '../../lexical/ui/icons/AlignRight/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { toolbarAlignGroupWithItems } from './toolbarAlignGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarAlignGroupWithItems([\n {\n ChildComponent: AlignLeftIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'left') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'left') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignLeft',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignLeftLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'left')\n },\n order: 1,\n },\n {\n ChildComponent: AlignCenterIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'center') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'center') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignCenter',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignCenterLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'center')\n },\n order: 2,\n },\n {\n ChildComponent: AlignRightIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'right') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'right') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignRight',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignRightLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'right')\n },\n order: 3,\n },\n {\n ChildComponent: AlignJustifyIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isElementNode(node)) {\n if (node.getFormatType() === 'justify') {\n continue\n }\n }\n\n const parent = node.getParent()\n if ($isElementNode(parent)) {\n if (parent.getFormatType() === 'justify') {\n continue\n }\n }\n\n return false\n }\n return true\n },\n key: 'alignJustify',\n label: ({ i18n }) => {\n return i18n.t('lexical:align:alignJustifyLabel')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_ELEMENT_COMMAND, 'justify')\n },\n order: 4,\n },\n ]),\n]\n\nexport const AlignFeatureClient = createClientFeature({\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"names":["$isElementNode","$isRangeSelection","FORMAT_ELEMENT_COMMAND","AlignCenterIcon","AlignJustifyIcon","AlignLeftIcon","AlignRightIcon","createClientFeature","toolbarAlignGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getFormatType","parent","getParent","key","label","i18n","t","onSelect","editor","dispatchCommand","order","AlignFeatureClient","toolbarFixed","groups","toolbarInline"],"mappings":"AAAA;AAEA,SAASA,cAAc,EAAEC,iBAAiB,EAAEC,sBAAsB,QA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OAAO,CAAC,EAAEC,IAAI,EAAE;gBACd,OAAOA,KAAKC,CAAC,CAAC;YAChB;YACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACtB,wBAAwB;YACjD;YACAuB,OAAO;QACT;KACD;CACF;AAED,OAAO,MAAMC,qBAAqBnB,oBAAoB;IACpDoB,cAAc;QACZC,QAAQnB;IACV;IACAoB,eAAe;QACbD,QAAQnB;IACV;AACF,GAAE"}
@@ -1,3 +1,2 @@
1
- import type { FeatureProviderProviderServer } from '../types.js';
2
- export declare const AlignFeature: FeatureProviderProviderServer<undefined, undefined>;
1
+ export declare const AlignFeature: import("../typesServer.js").FeatureProviderProviderServer<undefined, undefined, undefined>;
3
2
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../src/features/align/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAMhE,eAAO,MAAM,YAAY,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAa5E,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../src/features/align/feature.server.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,4FAMvB,CAAA"}
@@ -1,19 +1,13 @@
1
1
  // eslint-disable-next-line payload/no-imports-from-exports-dir
2
- import { AlignFeatureClientComponent } from '../../exports/client/index.js';
2
+ import { AlignFeatureClient } from '../../exports/client/index.js';
3
+ import { createServerFeature } from '../../utilities/createServerFeature.js';
3
4
  import { i18n } from './i18n.js';
4
- export const AlignFeature = (props)=>{
5
- return {
6
- feature: ()=>{
7
- return {
8
- ClientComponent: AlignFeatureClientComponent,
9
- clientFeatureProps: null,
10
- i18n,
11
- serverFeatureProps: props
12
- };
13
- },
14
- key: 'align',
15
- serverFeatureProps: props
16
- };
17
- };
5
+ export const AlignFeature = createServerFeature({
6
+ feature: {
7
+ ClientFeature: AlignFeatureClient,
8
+ i18n
9
+ },
10
+ key: 'align'
11
+ });
18
12
 
19
13
  //# sourceMappingURL=feature.server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/align/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { AlignFeatureClientComponent } from '../../exports/client/index.js'\nimport { i18n } from './i18n.js'\n\nexport const AlignFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: AlignFeatureClientComponent,\n clientFeatureProps: null,\n i18n,\n serverFeatureProps: props,\n }\n },\n key: 'align',\n serverFeatureProps: props,\n }\n}\n"],"names":["AlignFeatureClientComponent","i18n","AlignFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAEA,+DAA+D;AAC/D,SAASA,2BAA2B,QAAQ,gCAA+B;AAC3E,SAASC,IAAI,QAAQ,YAAW;AAEhC,OAAO,MAAMC,eAAoE,CAACC;IAChF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBL;gBACjBM,oBAAoB;gBACpBL;gBACAM,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/features/align/feature.server.ts"],"sourcesContent":["// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { AlignFeatureClient } from '../../exports/client/index.js'\nimport { createServerFeature } from '../../utilities/createServerFeature.js'\nimport { i18n } from './i18n.js'\n\nexport const AlignFeature = createServerFeature({\n feature: {\n ClientFeature: AlignFeatureClient,\n i18n,\n },\n key: 'align',\n})\n"],"names":["AlignFeatureClient","createServerFeature","i18n","AlignFeature","feature","ClientFeature","key"],"mappings":"AAAA,+DAA+D;AAC/D,SAASA,kBAAkB,QAAQ,gCAA+B;AAClE,SAASC,mBAAmB,QAAQ,yCAAwC;AAC5E,SAASC,IAAI,QAAQ,YAAW;AAEhC,OAAO,MAAMC,eAAeF,oBAAoB;IAC9CG,SAAS;QACPC,eAAeL;QACfE;IACF;IACAI,KAAK;AACP,GAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/align/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n alignCenterLabel: 'محاذاة في الوسط',\n alignJustifyLabel: 'محاذاة التبرير',\n alignLeftLabel: 'محاذاة إلى اليسار',\n alignRightLabel: 'محاذاة إلى اليمين',\n },\n az: {\n alignCenterLabel: 'Mərkəzə Düzəlt',\n alignJustifyLabel: 'Düzəldin Səsləndirin',\n alignLeftLabel: 'Sola Doğru Hizalama',\n alignRightLabel: 'Sağa Doğru Hizalama',\n },\n bg: {\n alignCenterLabel: 'Центрирай',\n alignJustifyLabel: 'Подравняване по двата края',\n alignLeftLabel: 'Подравняване отляво',\n alignRightLabel: 'Подравняване вдясно',\n },\n cs: {\n alignCenterLabel: 'Zarovnat na střed',\n alignJustifyLabel: 'Zarovnat do bloku',\n alignLeftLabel: 'Zarovnat vlevo',\n alignRightLabel: 'Zarovnat vpravo',\n },\n de: {\n alignCenterLabel: 'Zentrieren',\n alignJustifyLabel: 'Blocksatz',\n alignLeftLabel: 'Linksbündig',\n alignRightLabel: 'Rechtsbündig',\n },\n en: {\n alignCenterLabel: 'Align Center',\n alignJustifyLabel: 'Align Justify',\n alignLeftLabel: 'Align Left',\n alignRightLabel: 'Align Right',\n },\n es: {\n alignCenterLabel: 'Alinear al centro',\n alignJustifyLabel: 'Alinear Justificar',\n alignLeftLabel: 'Alinear a la izquierda',\n alignRightLabel: 'Alinear a la derecha',\n },\n fa: {\n alignCenterLabel: 'تراز در مرکز',\n alignJustifyLabel: 'تراز کردن از دو طرف',\n alignLeftLabel: 'چپ تراز',\n alignRightLabel: 'راست چین',\n },\n fr: {\n alignCenterLabel: 'Aligner au centre',\n alignJustifyLabel: 'Aligner Justifier',\n alignLeftLabel: 'Aligner à gauche',\n alignRightLabel: 'Aligner à droite',\n },\n he: {\n alignCenterLabel: 'ממורכז',\n alignJustifyLabel: 'יישור דו-צדדי',\n alignLeftLabel: 'הסב לשמאל',\n alignRightLabel: 'יישור לימין',\n },\n hr: {\n alignCenterLabel: 'Poravnaj središnje',\n alignJustifyLabel: 'Poravnaj opravdaj',\n alignLeftLabel: 'Poravnaj lijevo',\n alignRightLabel: 'Poravnaj desno',\n },\n hu: {\n alignCenterLabel: 'Középre igazítás',\n alignJustifyLabel: 'Igazítás Sorkizárás',\n alignLeftLabel: 'Igazítás balra',\n alignRightLabel: 'Igazítás jobbra',\n },\n it: {\n alignCenterLabel: 'Allinea al centro',\n alignJustifyLabel: 'Allinea Giustifica',\n alignLeftLabel: 'Allinea a sinistra',\n alignRightLabel: 'Allinea a destra',\n },\n ja: {\n alignCenterLabel: '中央揃え',\n alignJustifyLabel: '両端揃え',\n alignLeftLabel: '左揃え',\n alignRightLabel: '右揃え',\n },\n ko: {\n alignCenterLabel: '중앙 정렬',\n alignJustifyLabel: '정렬 맞춤',\n alignLeftLabel: '왼쪽 정렬',\n alignRightLabel: '오른쪽 정렬',\n },\n my: {\n alignCenterLabel: 'Pusat Selaras',\n alignJustifyLabel: 'Penjajaran Justify',\n alignLeftLabel: 'ဘယ်ဘက်ဦးတည်ခြင်း',\n alignRightLabel: 'Penjajaran Kanan',\n },\n nb: {\n alignCenterLabel: 'Sentrer tekst',\n alignJustifyLabel: 'Juster linje',\n alignLeftLabel: 'Juster til venstre',\n alignRightLabel: 'Juster til høyre',\n },\n nl: {\n alignCenterLabel: 'Centreer uitlijnen',\n alignJustifyLabel: 'Uitlijnen Rechtvaardigen',\n alignLeftLabel: 'Links uitlijnen',\n alignRightLabel: 'Rechts uitlijnen',\n },\n pl: {\n alignCenterLabel: 'Wyśrodkuj',\n alignJustifyLabel: 'Wyjustuj wyrównanie',\n alignLeftLabel: 'Wyrównaj do lewej',\n alignRightLabel: 'Wyrównaj do prawej',\n },\n pt: {\n alignCenterLabel: 'Alinhar ao Centro',\n alignJustifyLabel: 'Alinhar Justificar',\n alignLeftLabel: 'Alinhar à Esquerda',\n alignRightLabel: 'Alinhar à Direita',\n },\n ro: {\n alignCenterLabel: 'Aliniați Centrul',\n alignJustifyLabel: 'Aliniaza Justifica',\n alignLeftLabel: 'Aliniați la stânga',\n alignRightLabel: 'Aliniați la dreapta',\n },\n rs: {\n alignCenterLabel: 'Centriraj',\n alignJustifyLabel: 'Poravnaj opravdaj',\n alignLeftLabel: 'Poravnaj levo',\n alignRightLabel: 'Poravnaj desno',\n },\n 'rs-latin': {\n alignCenterLabel: 'Poravnaj centar',\n alignJustifyLabel: 'Poravnaj opravdanje',\n alignLeftLabel: 'Poravnaj levo',\n alignRightLabel: 'Poravnaj desno',\n },\n ru: {\n alignCenterLabel: 'Выровнять по центру',\n alignJustifyLabel: 'Выровнять по ширине',\n alignLeftLabel: 'Выровнять по левому краю',\n alignRightLabel: 'Выровнять по правому краю',\n },\n sk: {\n alignCenterLabel: 'Vycentrovať',\n alignJustifyLabel: 'Zarovnať do bloku',\n alignLeftLabel: 'Zarovnať doľava',\n alignRightLabel: 'Zarovnať doprava',\n },\n sv: {\n alignCenterLabel: 'Centrera',\n alignJustifyLabel: 'Justera Justify',\n alignLeftLabel: 'Justera till vänster',\n alignRightLabel: 'Justera till höger',\n },\n th: {\n alignCenterLabel: 'จัดแนวกึ่งกลาง',\n alignJustifyLabel: 'จัดแนวตรง',\n alignLeftLabel: 'จัดชิดซ้าย',\n alignRightLabel: 'จัดชิดขวา',\n },\n tr: {\n alignCenterLabel: 'Ortaya Hizala',\n alignJustifyLabel: 'Hizala Yasla',\n alignLeftLabel: 'Sola Hizala',\n alignRightLabel: 'Sağa Hizala',\n },\n uk: {\n alignCenterLabel: 'Вирівняти по центру',\n alignJustifyLabel: 'Вирівняти за шириною',\n alignLeftLabel: 'Вирівняти по лівому краю',\n alignRightLabel: 'Вирівняти по правому краю',\n },\n vi: {\n alignCenterLabel: 'Căn giữa',\n alignJustifyLabel: 'Căn đều',\n alignLeftLabel: 'Căn lề trái',\n alignRightLabel: 'Căn phải',\n },\n zh: {\n alignCenterLabel: '居中对齐',\n alignJustifyLabel: '对齐调整',\n alignLeftLabel: '向左对齐',\n alignRightLabel: '向右对齐',\n },\n 'zh-TW': {\n alignCenterLabel: '對齊中心',\n alignJustifyLabel: '對齊並排列',\n alignLeftLabel: '向左對齊',\n alignRightLabel: '向右對齊',\n },\n}\n"],"names":["i18n","ar","alignCenterLabel","alignJustifyLabel","alignLeftLabel","alignRightLabel","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAC,IAAI;QACFJ,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAE,IAAI;QACFL,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAG,IAAI;QACFN,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAI,IAAI;QACFP,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAK,IAAI;QACFR,kBAAkB;QAClB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gB;QAChBC,iBAAiB;IACnB;IACAqB,IAAI;QACFxB,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA,YAAY;QACVH,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAsB,IAAI;QACFzB,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAuB,IAAI;QACF1B,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAwB,IAAI;QACF3B,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAyB,IAAI;QACF5B,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA0B,IAAI;QACF7B,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA2B,IAAI;QACF9B,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA4B,IAAI;QACF/B,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA6B,IAAI;QACFhC,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA,SAAS;QACPH,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/features/align/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n alignCenterLabel: 'محاذاة في الوسط',\n alignJustifyLabel: 'محاذاة التبرير',\n alignLeftLabel: 'محاذاة إلى اليسار',\n alignRightLabel: 'محاذاة إلى اليمين',\n },\n az: {\n alignCenterLabel: 'Mərkəzə Düzəlt',\n alignJustifyLabel: 'Düzəldin Səsləndirin',\n alignLeftLabel: 'Sola Doğru Hizalama',\n alignRightLabel: 'Sağa Doğru Hizalama',\n },\n bg: {\n alignCenterLabel: 'Центрирай',\n alignJustifyLabel: 'Подравняване по двата края',\n alignLeftLabel: 'Подравняване отляво',\n alignRightLabel: 'Подравняване вдясно',\n },\n cs: {\n alignCenterLabel: 'Zarovnat na střed',\n alignJustifyLabel: 'Zarovnat do bloku',\n alignLeftLabel: 'Zarovnat vlevo',\n alignRightLabel: 'Zarovnat vpravo',\n },\n de: {\n alignCenterLabel: 'Zentrieren',\n alignJustifyLabel: 'Blocksatz',\n alignLeftLabel: 'Linksbündig',\n alignRightLabel: 'Rechtsbündig',\n },\n en: {\n alignCenterLabel: 'Align Center',\n alignJustifyLabel: 'Align Justify',\n alignLeftLabel: 'Align Left',\n alignRightLabel: 'Align Right',\n },\n es: {\n alignCenterLabel: 'Alinear al centro',\n alignJustifyLabel: 'Alinear Justificar',\n alignLeftLabel: 'Alinear a la izquierda',\n alignRightLabel: 'Alinear a la derecha',\n },\n fa: {\n alignCenterLabel: 'تراز در مرکز',\n alignJustifyLabel: 'تراز کردن از دو طرف',\n alignLeftLabel: 'چپ تراز',\n alignRightLabel: 'راست چین',\n },\n fr: {\n alignCenterLabel: 'Aligner au centre',\n alignJustifyLabel: 'Aligner Justifier',\n alignLeftLabel: 'Aligner à gauche',\n alignRightLabel: 'Aligner à droite',\n },\n he: {\n alignCenterLabel: 'ממורכז',\n alignJustifyLabel: 'יישור דו-צדדי',\n alignLeftLabel: 'הסב לשמאל',\n alignRightLabel: 'יישור לימין',\n },\n hr: {\n alignCenterLabel: 'Poravnaj središnje',\n alignJustifyLabel: 'Poravnaj opravdaj',\n alignLeftLabel: 'Poravnaj lijevo',\n alignRightLabel: 'Poravnaj desno',\n },\n hu: {\n alignCenterLabel: 'Középre igazítás',\n alignJustifyLabel: 'Igazítás Sorkizárás',\n alignLeftLabel: 'Igazítás balra',\n alignRightLabel: 'Igazítás jobbra',\n },\n it: {\n alignCenterLabel: 'Allinea al centro',\n alignJustifyLabel: 'Allinea Giustifica',\n alignLeftLabel: 'Allinea a sinistra',\n alignRightLabel: 'Allinea a destra',\n },\n ja: {\n alignCenterLabel: '中央揃え',\n alignJustifyLabel: '両端揃え',\n alignLeftLabel: '左揃え',\n alignRightLabel: '右揃え',\n },\n ko: {\n alignCenterLabel: '중앙 정렬',\n alignJustifyLabel: '정렬 맞춤',\n alignLeftLabel: '왼쪽 정렬',\n alignRightLabel: '오른쪽 정렬',\n },\n my: {\n alignCenterLabel: 'Pusat Selaras',\n alignJustifyLabel: 'Penjajaran Justify',\n alignLeftLabel: 'ဘယ်ဘက်ဦးတည်ခြင်း',\n alignRightLabel: 'Penjajaran Kanan',\n },\n nb: {\n alignCenterLabel: 'Sentrer tekst',\n alignJustifyLabel: 'Juster linje',\n alignLeftLabel: 'Juster til venstre',\n alignRightLabel: 'Juster til høyre',\n },\n nl: {\n alignCenterLabel: 'Centreer uitlijnen',\n alignJustifyLabel: 'Uitlijnen Rechtvaardigen',\n alignLeftLabel: 'Links uitlijnen',\n alignRightLabel: 'Rechts uitlijnen',\n },\n pl: {\n alignCenterLabel: 'Wyśrodkuj',\n alignJustifyLabel: 'Wyjustuj wyrównanie',\n alignLeftLabel: 'Wyrównaj do lewej',\n alignRightLabel: 'Wyrównaj do prawej',\n },\n pt: {\n alignCenterLabel: 'Alinhar ao Centro',\n alignJustifyLabel: 'Alinhar Justificar',\n alignLeftLabel: 'Alinhar à Esquerda',\n alignRightLabel: 'Alinhar à Direita',\n },\n ro: {\n alignCenterLabel: 'Aliniați Centrul',\n alignJustifyLabel: 'Aliniaza Justifica',\n alignLeftLabel: 'Aliniați la stânga',\n alignRightLabel: 'Aliniați la dreapta',\n },\n rs: {\n alignCenterLabel: 'Centriraj',\n alignJustifyLabel: 'Poravnaj opravdaj',\n alignLeftLabel: 'Poravnaj levo',\n alignRightLabel: 'Poravnaj desno',\n },\n 'rs-latin': {\n alignCenterLabel: 'Poravnaj centar',\n alignJustifyLabel: 'Poravnaj opravdanje',\n alignLeftLabel: 'Poravnaj levo',\n alignRightLabel: 'Poravnaj desno',\n },\n ru: {\n alignCenterLabel: 'Выровнять по центру',\n alignJustifyLabel: 'Выровнять по ширине',\n alignLeftLabel: 'Выровнять по левому краю',\n alignRightLabel: 'Выровнять по правому краю',\n },\n sk: {\n alignCenterLabel: 'Vycentrovať',\n alignJustifyLabel: 'Zarovnať do bloku',\n alignLeftLabel: 'Zarovnať doľava',\n alignRightLabel: 'Zarovnať doprava',\n },\n sv: {\n alignCenterLabel: 'Centrera',\n alignJustifyLabel: 'Justera Justify',\n alignLeftLabel: 'Justera till vänster',\n alignRightLabel: 'Justera till höger',\n },\n th: {\n alignCenterLabel: 'จัดแนวกึ่งกลาง',\n alignJustifyLabel: 'จัดแนวตรง',\n alignLeftLabel: 'จัดชิดซ้าย',\n alignRightLabel: 'จัดชิดขวา',\n },\n tr: {\n alignCenterLabel: 'Ortaya Hizala',\n alignJustifyLabel: 'Hizala Yasla',\n alignLeftLabel: 'Sola Hizala',\n alignRightLabel: 'Sağa Hizala',\n },\n uk: {\n alignCenterLabel: 'Вирівняти по центру',\n alignJustifyLabel: 'Вирівняти за шириною',\n alignLeftLabel: 'Вирівняти по лівому краю',\n alignRightLabel: 'Вирівняти по правому краю',\n },\n vi: {\n alignCenterLabel: 'Căn giữa',\n alignJustifyLabel: 'Căn đều',\n alignLeftLabel: 'Căn lề trái',\n alignRightLabel: 'Căn phải',\n },\n zh: {\n alignCenterLabel: '居中对齐',\n alignJustifyLabel: '对齐调整',\n alignLeftLabel: '向左对齐',\n alignRightLabel: '向右对齐',\n },\n 'zh-TW': {\n alignCenterLabel: '對齊中心',\n alignJustifyLabel: '對齊並排列',\n alignLeftLabel: '向左對齊',\n alignRightLabel: '向右對齊',\n },\n}\n"],"names":["i18n","ar","alignCenterLabel","alignJustifyLabel","alignLeftLabel","alignRightLabel","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAC,IAAI;QACFJ,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAE,IAAI;QACFL,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAG,IAAI;QACFN,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAI,IAAI;QACFP,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAK,IAAI;QACFR,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAM,IAAI;QACFT,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAO,IAAI;QACFV,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAQ,IAAI;QACFX,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAS,IAAI;QACFZ,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAU,IAAI;QACFb,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAW,IAAI;QACFd,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAY,IAAI;QACFf,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAa,IAAI;QACFhB,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACAc,IAAI;QACFjB,kBAAkB;QACl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B;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA6B,IAAI;QACFhC,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;IACA,SAAS;QACPH,kBAAkB;QAClBC,mBAAmB;QACnBC,gBAAgB;QAChBC,iBAAiB;IACnB;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/align/toolbarAlignGroup.ts"],"sourcesContent":["import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\n\nexport const toolbarAlignGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AlignLeftIcon,\n items,\n key: 'align',\n order: 30,\n }\n}\n"],"names":["AlignLeftIcon","toolbarAlignGroupWithItems","items","type","ChildComponent","key","order"],"rangeMappings":";;;;;;;;;","mappings":"AAEA,SAASA,aAAa,QAAQ,4CAA2C;AAEzE,OAAO,MAAMC,6BAA6B,CAACC;IACzC,OAAO;QACLC,MAAM;QACNC,gBAAgBJ;QAChBE;QACAG,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/features/align/toolbarAlignGroup.ts"],"sourcesContent":["import type { ToolbarGroup, ToolbarGroupItem } from '../toolbars/types.js'\n\nimport { AlignLeftIcon } from '../../lexical/ui/icons/AlignLeft/index.js'\n\nexport const toolbarAlignGroupWithItems = (items: ToolbarGroupItem[]): ToolbarGroup => {\n return {\n type: 'dropdown',\n ChildComponent: AlignLeftIcon,\n items,\n key: 'align',\n order: 30,\n }\n}\n"],"names":["AlignLeftIcon","toolbarAlignGroupWithItems","items","type","ChildComponent","key","order"],"mappings":"AAEA,SAASA,aAAa,QAAQ,4CAA2C;AAEzE,OAAO,MAAMC,6BAA6B,CAACC;IACzC,OAAO;QACLC,MAAM;QACNC,gBAAgBJ;QAChBE;QACAG,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const BlockquoteFeatureClientComponent: import("react").FC<{
1
+ export declare const BlockquoteFeatureClient: import("react").FC<{
3
2
  featureKey: string;
4
3
  order: number;
5
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../src/features/blockquote/feature.client.tsx"],"names":[],"mappings":";AAmFA,eAAO,MAAM,gCAAgC;;;EAAiD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../src/features/blockquote/feature.client.tsx"],"names":[],"mappings":"AA4CA,eAAO,MAAM,uBAAuB;;;EA8BlC,CAAA"}
@@ -3,7 +3,7 @@ import { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text';
3
3
  import { $setBlocksType } from '@lexical/selection';
4
4
  import { $getSelection, $isRangeSelection } from 'lexical';
5
5
  import { BlockquoteIcon } from '../../lexical/ui/icons/Blockquote/index.js';
6
- import { createClientComponent } from '../createClientComponent.js';
6
+ import { createClientFeature } from '../../utilities/createClientFeature.js';
7
7
  import { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js';
8
8
  import { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js';
9
9
  import { MarkdownTransformer } from './markdownTransformer.js';
@@ -36,49 +36,42 @@ const toolbarGroups = [
36
36
  }
37
37
  ])
38
38
  ];
39
- const BlockquoteFeatureClient = (props)=>{
40
- return {
41
- clientFeatureProps: props,
42
- feature: ()=>({
43
- clientFeatureProps: props,
44
- markdownTransformers: [
45
- MarkdownTransformer
46
- ],
47
- nodes: [
48
- QuoteNode
49
- ],
50
- slashMenu: {
51
- groups: [
52
- slashMenuBasicGroupWithItems([
53
- {
54
- Icon: BlockquoteIcon,
55
- key: 'blockquote',
56
- keywords: [
57
- 'quote',
58
- 'blockquote'
59
- ],
60
- label: ({ i18n })=>{
61
- return i18n.t('lexical:blockquote:label');
62
- },
63
- onSelect: ({ editor })=>{
64
- editor.update(()=>{
65
- const selection = $getSelection();
66
- $setBlocksType(selection, ()=>$createQuoteNode());
67
- });
68
- }
69
- }
70
- ])
71
- ]
72
- },
73
- toolbarFixed: {
74
- groups: toolbarGroups
75
- },
76
- toolbarInline: {
77
- groups: toolbarGroups
39
+ export const BlockquoteFeatureClient = createClientFeature({
40
+ markdownTransformers: [
41
+ MarkdownTransformer
42
+ ],
43
+ nodes: [
44
+ QuoteNode
45
+ ],
46
+ slashMenu: {
47
+ groups: [
48
+ slashMenuBasicGroupWithItems([
49
+ {
50
+ Icon: BlockquoteIcon,
51
+ key: 'blockquote',
52
+ keywords: [
53
+ 'quote',
54
+ 'blockquote'
55
+ ],
56
+ label: ({ i18n })=>{
57
+ return i18n.t('lexical:blockquote:label');
58
+ },
59
+ onSelect: ({ editor })=>{
60
+ editor.update(()=>{
61
+ const selection = $getSelection();
62
+ $setBlocksType(selection, ()=>$createQuoteNode());
63
+ });
64
+ }
78
65
  }
79
- })
80
- };
81
- };
82
- export const BlockquoteFeatureClientComponent = createClientComponent(BlockquoteFeatureClient);
66
+ ])
67
+ ]
68
+ },
69
+ toolbarFixed: {
70
+ groups: toolbarGroups
71
+ },
72
+ toolbarInline: {
73
+ groups: toolbarGroups
74
+ }
75
+ });
83
76
 
84
77
  //# sourceMappingURL=feature.client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/blockquote/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { BlockquoteIcon } from '../../lexical/ui/icons/Blockquote/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: BlockquoteIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isQuoteNode(node) && !$isQuoteNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'blockquote',\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n order: 20,\n },\n ]),\n]\n\nconst BlockquoteFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer],\n nodes: [QuoteNode],\n\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: BlockquoteIcon,\n key: 'blockquote',\n keywords: ['quote', 'blockquote'],\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }),\n }\n}\n\nexport const BlockquoteFeatureClientComponent = createClientComponent(BlockquoteFeatureClient)\n"],"names":["$createQuoteNode","$isQuoteNode","QuoteNode","$setBlocksType","$getSelection","$isRangeSelection","BlockquoteIcon","createClientComponent","slashMenuBasicGroupWithItems","toolbarTextDropdownGroupWithItems","MarkdownTransformer","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getParent","key","label","i18n","t","onSelect","editor","update","order","BlockquoteFeatureClient","props","clientFeatureProps","feature","markdownTransformers","nodes","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline","BlockquoteFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ,qBAAoB;AAC9E,SAASC,cAAc,QAAQ,qBAAoB;AACnD,SAASC,aAAa,EAAEC,iBAAiB,QAAQ,UAAS;AAK1D,SAASC,cAAc,QAAQ,6CAA4C;AAC3E,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,4BAA4B,QAAQ,oCAAmC;AAChF,SAASC,iCAAiC,QAAQ,yCAAwC;AAC1F,SAASC,mBAAmB,QAAQ,2BAA0B;AAE9D,MAAMC,gBAAgC;IACpCF,kCAAkC;QAChC;YACEG,gBAAgBN;YAChBO,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACT,kBAAkBS,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAI,CAACf,aAAac,SAAS,CAACd,aAAac,KAAKE,SAAS,KAAK;wBAC1D,OAAO;oBACT;gBACF;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,OAAO,CAAC,EAAEC,IAAI,EAAE;gBACd,OAAOA,KAAKC,CAAC,CAAC;YAChB;YACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,MAAM,CAAC;oBACZ,MAAMV,YAAYV;oBAClBD,eAAeW,WAAW,IAAMd;gBAClC;YACF;YACAyB,OAAO;QACT;KACD;CACF;AAED,MAAMC,0BAAoE,CAACC;IACzE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,sBAAsB;oBAACpB;iBAAoB;gBAC3CqB,OAAO;oBAAC7B;iBAAU;gBAElB8B,WAAW;oBACTC,QAAQ;wBACNzB,6BAA6B;4BAC3B;gCACE0B,MAAM5B;gCACNY,KAAK;gCACLiB,UAAU;oCAAC;oCAAS;iCAAa;gCACjChB,OAAO,CAAC,EAAEC,IAAI,EAAE;oCACd,OAAOA,KAAKC,CAAC,CAAC;gCAChB;gCACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;oCACnBA,OAAOC,MAAM,CAAC;wCACZ,MAAMV,YAAYV;wCAClBD,eAAeW,WAAW,IAAMd;oCAClC;gCACF;4BACF;yBACD;qBACF;gBACH;gBACAoC,cAAc;oBACZH,QAAQtB;gBACV;gBACA0B,eAAe;oBACbJ,QAAQtB;gBACV;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAM2B,mCAAmC/B,sBAAsBmB,yBAAwB"}
1
+ {"version":3,"sources":["../../../src/features/blockquote/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $setBlocksType } from '@lexical/selection'\nimport { $getSelection, $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../toolbars/types.js'\n\nimport { BlockquoteIcon } from '../../lexical/ui/icons/Blockquote/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../shared/slashMenu/basicGroup.js'\nimport { toolbarTextDropdownGroupWithItems } from '../shared/toolbar/textDropdownGroup.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: BlockquoteIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if (!$isQuoteNode(node) && !$isQuoteNode(node.getParent())) {\n return false\n }\n }\n return true\n },\n key: 'blockquote',\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n order: 20,\n },\n ]),\n]\n\nexport const BlockquoteFeatureClient = createClientFeature({\n markdownTransformers: [MarkdownTransformer],\n nodes: [QuoteNode],\n\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: BlockquoteIcon,\n key: 'blockquote',\n keywords: ['quote', 'blockquote'],\n label: ({ i18n }) => {\n return i18n.t('lexical:blockquote:label')\n },\n onSelect: ({ editor }) => {\n editor.update(() => {\n const selection = $getSelection()\n $setBlocksType(selection, () => $createQuoteNode())\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"names":["$createQuoteNode","$isQuoteNode","QuoteNode","$setBlocksType","$getSelection","$isRangeSelection","BlockquoteIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarTextDropdownGroupWithItems","MarkdownTransformer","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getParent","key","label","i18n","t","onSelect","editor","update","order","BlockquoteFeatureClient","markdownTransformers","nodes","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"mappings":"AAAA;AAEA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ,qBAAoB;AAC9E,SAASC,cAAc,QAAQ,qBAAoB;AACnD,SAASC,aAAa,EAAEC,iBAAiB,QAAQ,UAAS;AAI1D,SAASC,cAAc,QAAQ,6CAA4C;AAC3E,SAASC,mBAAmB,QAAQ,yCAAwC;AAC5E,SAASC,4BAA4B,QAAQ,oCAAmC;AAChF,SAASC,iCAAiC,QAAQ,yCAAwC;AAC1F,SAASC,mBAAmB,QAAQ,2BAA0B;AAE9D,MAAMC,gBAAgC;IACpCF,kCAAkC;QAChC;YACEG,gBAAgBN;YAChBO,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAI,CAACT,kBAAkBS,YAAY;oBACjC,OAAO;gBACT;gBACA,KAAK,MAAMC,QAAQD,UAAUE,QAAQ,GAAI;oBACvC,IAAI,CAACf,aAAac,SAAS,CAACd,aAAac,KAAKE,SAAS,KAAK;wBAC1D,OAAO;oBACT;gBACF;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,OAAO,CAAC,EAAEC,IAAI,EAAE;gBACd,OAAOA,KAAKC,CAAC,CAAC;YAChB;YACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,MAAM,CAAC;oBACZ,MAAMV,YAAYV;oBAClBD,eAAeW,WAAW,IAAMd;gBAClC;YACF;YACAyB,OAAO;QACT;KACD;CACF;AAED,OAAO,MAAMC,0BAA0BnB,oBAAoB;IACzDoB,sBAAsB;QAACjB;KAAoB;IAC3CkB,OAAO;QAAC1B;KAAU;IAElB2B,WAAW;QACTC,QAAQ;YACNtB,6BAA6B;gBAC3B;oBACEuB,MAAMzB;oBACNY,KAAK;oBACLc,UAAU;wBAAC;wBAAS;qBAAa;oBACjCb,OAAO,CAAC,EAAEC,IAAI,EAAE;wBACd,OAAOA,KAAKC,CAAC,CAAC;oBAChB;oBACAC,UAAU,CAAC,EAAEC,MAAM,EAAE;wBACnBA,OAAOC,MAAM,CAAC;4BACZ,MAAMV,YAAYV;4BAClBD,eAAeW,WAAW,IAAMd;wBAClC;oBACF;gBACF;aACD;SACF;IACH;IACAiC,cAAc;QACZH,QAAQnB;IACV;IACAuB,eAAe;QACbJ,QAAQnB;IACV;AACF,GAAE"}
@@ -1,3 +1,2 @@
1
- import type { FeatureProviderProviderServer } from '../types.js';
2
- export declare const BlockquoteFeature: FeatureProviderProviderServer<undefined, undefined>;
1
+ export declare const BlockquoteFeature: import("../typesServer.js").FeatureProviderProviderServer<undefined, undefined, any>;
3
2
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../src/features/blockquote/feature.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAShE,eAAO,MAAM,iBAAiB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAqCjF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../src/features/blockquote/feature.server.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,sFA+B5B,CAAA"}
@@ -1,50 +1,45 @@
1
1
  import { QuoteNode } from '@lexical/rich-text';
2
2
  // eslint-disable-next-line payload/no-imports-from-exports-dir
3
- import { BlockquoteFeatureClientComponent } from '../../exports/client/index.js';
3
+ import { BlockquoteFeatureClient } from '../../exports/client/index.js';
4
+ import { createServerFeature } from '../../utilities/createServerFeature.js';
4
5
  import { convertLexicalNodesToHTML } from '../converters/html/converter/index.js';
5
6
  import { createNode } from '../typeUtilities.js';
6
7
  import { i18n } from './i18n.js';
7
8
  import { MarkdownTransformer } from './markdownTransformer.js';
8
- export const BlockquoteFeature = (props)=>{
9
- return {
10
- feature: ()=>{
11
- return {
12
- ClientComponent: BlockquoteFeatureClientComponent,
13
- clientFeatureProps: null,
14
- i18n,
15
- markdownTransformers: [
16
- MarkdownTransformer
17
- ],
18
- nodes: [
19
- createNode({
20
- converters: {
21
- html: {
22
- converter: async ({ converters, node, parent, req })=>{
23
- const childrenText = await convertLexicalNodesToHTML({
24
- converters,
25
- lexicalNodes: node.children,
26
- parent: {
27
- ...node,
28
- parent
29
- },
30
- req
31
- });
32
- return `<blockquote>${childrenText}</blockquote>`;
9
+ export const BlockquoteFeature = createServerFeature({
10
+ feature: {
11
+ ClientFeature: BlockquoteFeatureClient,
12
+ clientFeatureProps: null,
13
+ i18n,
14
+ markdownTransformers: [
15
+ MarkdownTransformer
16
+ ],
17
+ nodes: [
18
+ createNode({
19
+ converters: {
20
+ html: {
21
+ converter: async ({ converters, node, parent, req })=>{
22
+ const childrenText = await convertLexicalNodesToHTML({
23
+ converters,
24
+ lexicalNodes: node.children,
25
+ parent: {
26
+ ...node,
27
+ parent
33
28
  },
34
- nodeTypes: [
35
- QuoteNode.getType()
36
- ]
37
- }
29
+ req
30
+ });
31
+ return `<blockquote>${childrenText}</blockquote>`;
38
32
  },
39
- node: QuoteNode
40
- })
41
- ],
42
- serverFeatureProps: props
43
- };
44
- },
45
- key: 'blockquote',
46
- serverFeatureProps: props
47
- };
48
- };
33
+ nodeTypes: [
34
+ QuoteNode.getType()
35
+ ]
36
+ }
37
+ },
38
+ node: QuoteNode
39
+ })
40
+ ]
41
+ },
42
+ key: 'blockquote'
43
+ });
49
44
 
50
45
  //# sourceMappingURL=feature.server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/blockquote/feature.server.ts"],"sourcesContent":["import { QuoteNode } from '@lexical/rich-text'\n\nimport type { FeatureProviderProviderServer } from '../types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { BlockquoteFeatureClientComponent } from '../../exports/client/index.js'\nimport { convertLexicalNodesToHTML } from '../converters/html/converter/index.js'\nimport { createNode } from '../typeUtilities.js'\nimport { i18n } from './i18n.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nexport const BlockquoteFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: BlockquoteFeatureClientComponent,\n clientFeatureProps: null,\n i18n,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({ converters, node, parent, req }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n req,\n })\n\n return `<blockquote>${childrenText}</blockquote>`\n },\n nodeTypes: [QuoteNode.getType()],\n },\n },\n node: QuoteNode,\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'blockquote',\n serverFeatureProps: props,\n }\n}\n"],"names":["QuoteNode","BlockquoteFeatureClientComponent","convertLexicalNodesToHTML","createNode","i18n","MarkdownTransformer","BlockquoteFeature","props","feature","ClientComponent","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","node","parent","req","childrenText","lexicalNodes","children","nodeTypes","getType","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,SAAS,QAAQ,qBAAoB;AAI9C,+DAA+D;AAC/D,SAASC,gCAAgC,QAAQ,gCAA+B;AAChF,SAASC,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,UAAU,QAAQ,sBAAqB;AAChD,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,mBAAmB,QAAQ,2BAA0B;AAE9D,OAAO,MAAMC,oBAAyE,CAACC;IACrF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBR;gBACjBS,oBAAoB;gBACpBN;gBACAO,sBAAsB;oBAACN;iBAAoB;gBAC3CO,OAAO;oBACLT,WAAW;wBACTU,YAAY;4BACVC,MAAM;gCACJC,WAAW,OAAO,EAAEF,UAAU,EAAEG,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAE;oCACjD,MAAMC,eAAe,MAAMjB,0BAA0B;wCACnDW;wCACAO,cAAcJ,KAAKK,QAAQ;wCAC3BJ,QAAQ;4CACN,GAAGD,IAAI;4CACPC;wCACF;wCACAC;oCACF;oCAEA,OAAO,CAAC,YAAY,EAAEC,aAAa,aAAa,CAAC;gCACnD;gCACAG,WAAW;oCAACtB,UAAUuB,OAAO;iCAAG;4BAClC;wBACF;wBACAP,MAAMhB;oBACR;iBACD;gBACDwB,oBAAoBjB;YACtB;QACF;QACAkB,KAAK;QACLD,oBAAoBjB;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/features/blockquote/feature.server.ts"],"sourcesContent":["import { QuoteNode } from '@lexical/rich-text'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { BlockquoteFeatureClient } from '../../exports/client/index.js'\nimport { createServerFeature } from '../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../converters/html/converter/index.js'\nimport { createNode } from '../typeUtilities.js'\nimport { i18n } from './i18n.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\n\nexport const BlockquoteFeature = createServerFeature({\n feature: {\n ClientFeature: BlockquoteFeatureClient,\n clientFeatureProps: null,\n i18n,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n createNode({\n converters: {\n html: {\n converter: async ({ converters, node, parent, req }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n lexicalNodes: node.children,\n parent: {\n ...node,\n parent,\n },\n req,\n })\n\n return `<blockquote>${childrenText}</blockquote>`\n },\n nodeTypes: [QuoteNode.getType()],\n },\n },\n node: QuoteNode,\n }),\n ],\n },\n key: 'blockquote',\n})\n"],"names":["QuoteNode","BlockquoteFeatureClient","createServerFeature","convertLexicalNodesToHTML","createNode","i18n","MarkdownTransformer","BlockquoteFeature","feature","ClientFeature","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","node","parent","req","childrenText","lexicalNodes","children","nodeTypes","getType","key"],"mappings":"AAAA,SAASA,SAAS,QAAQ,qBAAoB;AAE9C,+DAA+D;AAC/D,SAASC,uBAAuB,QAAQ,gCAA+B;AACvE,SAASC,mBAAmB,QAAQ,yCAAwC;AAC5E,SAASC,yBAAyB,QAAQ,wCAAuC;AACjF,SAASC,UAAU,QAAQ,sBAAqB;AAChD,SAASC,IAAI,QAAQ,YAAW;AAChC,SAASC,mBAAmB,QAAQ,2BAA0B;AAE9D,OAAO,MAAMC,oBAAoBL,oBAAoB;IACnDM,SAAS;QACPC,eAAeR;QACfS,oBAAoB;QACpBL;QACAM,sBAAsB;YAACL;SAAoB;QAC3CM,OAAO;YACLR,WAAW;gBACTS,YAAY;oBACVC,MAAM;wBACJC,WAAW,OAAO,EAAEF,UAAU,EAAEG,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAE;4BACjD,MAAMC,eAAe,MAAMhB,0BAA0B;gCACnDU;gCACAO,cAAcJ,KAAKK,QAAQ;gCAC3BJ,QAAQ;oCACN,GAAGD,IAAI;oCACPC;gCACF;gCACAC;4BACF;4BAEA,OAAO,CAAC,YAAY,EAAEC,aAAa,aAAa,CAAC;wBACnD;wBACAG,WAAW;4BAACtB,UAAUuB,OAAO;yBAAG;oBAClC;gBACF;gBACAP,MAAMhB;YACR;SACD;IACH;IACAwB,KAAK;AACP,GAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/blockquote/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'اقتباس',\n },\n az: {\n label: 'Blokkvota',\n },\n bg: {\n label: 'Цитат',\n },\n cs: {\n label: 'Citace',\n },\n de: {\n label: 'Blockzitat',\n },\n en: {\n label: 'Blockquote',\n },\n es: {\n label: 'Cita en bloque',\n },\n fa: {\n label: 'نقل قول بلوکی',\n },\n fr: {\n label: 'Citation',\n },\n he: {\n label: 'בלוק ציטוט',\n },\n hr: {\n label: 'Blok citat',\n },\n hu: {\n label: 'Idézetblokk',\n },\n it: {\n label: 'Citazione',\n },\n ja: {\n label: 'ブロッククォート',\n },\n ko: {\n label: '인용구',\n },\n my: {\n label: 'ဒေါင်းချီးခြင်း',\n },\n nb: {\n label: 'Blokksitat',\n },\n nl: {\n label: 'Citaat',\n },\n pl: {\n label: 'Cytat blokowy',\n },\n pt: {\n label: 'Citação em bloco',\n },\n ro: {\n label: 'Citat',\n },\n rs: {\n label: 'Blok citat',\n },\n 'rs-latin': {\n label: 'Blok citata',\n },\n ru: {\n label: 'Цитата',\n },\n sk: {\n label: 'Citát',\n },\n sv: {\n label: 'Blockcitat',\n },\n th: {\n label: '[SKIPPED]',\n },\n tr: {\n label: 'Alıntı',\n },\n uk: {\n label: 'Блокцитата',\n },\n vi: {\n label: 'Trích dẫn',\n },\n zh: {\n label: '块引用',\n },\n 'zh-TW': {\n label: '引用塊',\n },\n}\n"],"names":["i18n","ar","label","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,OAAO;IACT;IACAC,IAAI;QACFD,OAAO;IACT;IACAE,IAAI;QACFF,OAAO;IACT;IACAG,IAAI;QACFH,OAAO;IACT;IACAI,IAAI;QACFJ,OAAO;IACT;IACAK,IAAI;QACFL,OAAO;IACT;IACAM,IAAI;QACFN,OAAO;IACT;IACAO,IAAI;QACFP,OAAO;IACT;IACAQ,IAAI;QACFR,OAAO;IACT;IACAS,IAAI;QACFT,OAAO;IACT;IACAU,IAAI;QACFV,OAAO;IACT;IACAW,IAAI;QACFX,OAAO;IACT;IACAY,IAAI;QACFZ,OAAO;IACT;IACAa,IAAI;QACFb,OAAO;IACT;IACAc,IAAI;QACFd,OAAO;IACT;IACAe,IAAI;QACFf,OAAO;IACT;IACAgB,IAAI;QACFhB,OAAO;IACT;IACAiB,IAAI;QACFjB,OAAO;IACT;IACAkB,IAAI;QACFlB,OAAO;IACT;IACAmB,IAAI;QACFnB,OAAO;IACT;IACAoB,IAAI;QACFpB,OAAO;IACT;IACAqB,IAAI;QACFrB,OAAO;IACT;IACA,YAAY;QACVA,OAAO;IACT;IACAsB,IAAI;QACFtB,OAAO;IACT;IACAuB,IAAI;QACFvB,OAAO;IACT;IACAwB,IAAI;QACFxB,OAAO;IACT;IACAyB,IAAI;QACFzB,OAAO;IACT;IACA0B,IAAI;QACF1B,OAAO;IACT;IACA2B,IAAI;QACF3B,OAAO;IACT;IACA4B,IAAI;QACF5B,OAAO;IACT;IACA6B,IAAI;QACF7B,OAAO;IACT;IACA,SAAS;QACPA,OAAO;IACT;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/features/blockquote/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'اقتباس',\n },\n az: {\n label: 'Blokkvota',\n },\n bg: {\n label: 'Цитат',\n },\n cs: {\n label: 'Citace',\n },\n de: {\n label: 'Blockzitat',\n },\n en: {\n label: 'Blockquote',\n },\n es: {\n label: 'Cita en bloque',\n },\n fa: {\n label: 'نقل قول بلوکی',\n },\n fr: {\n label: 'Citation',\n },\n he: {\n label: 'בלוק ציטוט',\n },\n hr: {\n label: 'Blok citat',\n },\n hu: {\n label: 'Idézetblokk',\n },\n it: {\n label: 'Citazione',\n },\n ja: {\n label: 'ブロッククォート',\n },\n ko: {\n label: '인용구',\n },\n my: {\n label: 'ဒေါင်းချီးခြင်း',\n },\n nb: {\n label: 'Blokksitat',\n },\n nl: {\n label: 'Citaat',\n },\n pl: {\n label: 'Cytat blokowy',\n },\n pt: {\n label: 'Citação em bloco',\n },\n ro: {\n label: 'Citat',\n },\n rs: {\n label: 'Blok citat',\n },\n 'rs-latin': {\n label: 'Blok citata',\n },\n ru: {\n label: 'Цитата',\n },\n sk: {\n label: 'Citát',\n },\n sv: {\n label: 'Blockcitat',\n },\n th: {\n label: '[SKIPPED]',\n },\n tr: {\n label: 'Alıntı',\n },\n uk: {\n label: 'Блокцитата',\n },\n vi: {\n label: 'Trích dẫn',\n },\n zh: {\n label: '块引用',\n },\n 'zh-TW': {\n label: '引用塊',\n },\n}\n"],"names":["i18n","ar","label","az","bg","cs","de","en","es","fa","fr","he","hr","hu","it","ja","ko","my","nb","nl","pl","pt","ro","rs","ru","sk","sv","th","tr","uk","vi","zh"],"mappings":"AAEA,OAAO,MAAMA,OAAkC;IAC7CC,IAAI;QACFC,OAAO;IACT;IACAC,IAAI;QACFD,OAAO;IACT;IACAE,IAAI;QACFF,OAAO;IACT;IACAG,IAAI;QACFH,OAAO;IACT;IACAI,IAAI;QACFJ,OAAO;IACT;IACAK,IAAI;QACFL,OAAO;IACT;IACAM,IAAI;QACFN,OAAO;IACT;IACAO,IAAI;QACFP,OAAO;IACT;IACAQ,IAAI;QACFR,OAAO;IACT;IACAS,IAAI;QACFT,OAAO;IACT;IACAU,IAAI;QACFV,OAAO;IACT;IACAW,IAAI;QACFX,OAAO;IACT;IACAY,IAAI;QACFZ,OAAO;IACT;IACAa,IAAI;QACFb,OAAO;IACT;IACAc,IAAI;QACFd,OAAO;IACT;IACAe,IAAI;QACFf,OAAO;IACT;IACAgB,IAAI;QACFhB,OAAO;IACT;IACAiB,IAAI;QACFjB,OAAO;IACT;IACAkB,IAAI;QACFlB,OAAO;IACT;IACAmB,IAAI;QACFnB,OAAO;IACT;IACAoB,IAAI;QACFpB,OAAO;IACT;IACAqB,IAAI;QACFrB,OAAO;IACT;IACA,YAAY;QACVA,OAAO;IACT;IACAsB,IAAI;QACFtB,OAAO;IACT;IACAuB,IAAI;QACFvB,OAAO;IACT;IACAwB,IAAI;QACFxB,OAAO;IACT;IACAyB,IAAI;QACFzB,OAAO;IACT;IACA0B,IAAI;QACF1B,OAAO;IACT;IACA2B,IAAI;QACF3B,OAAO;IACT;IACA4B,IAAI;QACF5B,OAAO;IACT;IACA6B,IAAI;QACF7B,OAAO;IACT;IACA,SAAS;QACPA,OAAO;IACT;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/blockquote/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n"],"names":["$createQuoteNode","$isQuoteNode","QuoteNode","$createLineBreakNode","MarkdownTransformer","type","dependencies","export","node","exportChildren","lines","split","output","line","push","join","regExp","replace","parentNode","children","_match","isImport","previousNode","getPreviousSibling","splice","getChildrenSize","select","remove","append"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ,qBAAoB;AAC9E,SAASC,oBAAoB,QAAQ,UAAS;AAE9C,OAAO,MAAMC,sBAA0C;IACrDC,MAAM;IACNC,cAAc;QAACJ;KAAU;IACzBK,QAAQ,CAACC,MAAMC;QACb,IAAI,CAACR,aAAaO,OAAO;YACvB,OAAO;QACT;QAEA,MAAME,QAAQD,eAAeD,MAAMG,KAAK,CAAC;QACzC,MAAMC,SAAS,EAAE;QACjB,KAAK,MAAMC,QAAQH,MAAO;YACxBE,OAAOE,IAAI,CAAC,OAAOD;QACrB;QACA,OAAOD,OAAOG,IAAI,CAAC;IACrB;IACAC,QAAQ;IACRC,SAAS,CAACC,YAAYC,UAAUC,QAAQC;QACtC,IAAIA,UAAU;YACZ,MAAMC,eAAeJ,WAAWK,kBAAkB;YAClD,IAAItB,aAAaqB,eAAe;gBAC9BA,aAAaE,MAAM,CAACF,aAAaG,eAAe,IAAI,GAAG;oBACrDtB;uBACGgB;iBACJ;gBACDG,aAAaI,MAAM,CAAC,GAAG;gBACvBR,WAAWS,MAAM;gBACjB;YACF;QACF;QAEA,MAAMnB,OAAOR;QACbQ,KAAKoB,MAAM,IAAIT;QACfD,WAAWD,OAAO,CAACT;QACnBA,KAAKkB,MAAM,CAAC,GAAG;IACjB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/features/blockquote/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport { $createQuoteNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text'\nimport { $createLineBreakNode } from 'lexical'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [QuoteNode],\n export: (node, exportChildren) => {\n if (!$isQuoteNode(node)) {\n return null\n }\n\n const lines = exportChildren(node).split('\\n')\n const output = []\n for (const line of lines) {\n output.push('> ' + line)\n }\n return output.join('\\n')\n },\n regExp: /^>\\s/,\n replace: (parentNode, children, _match, isImport) => {\n if (isImport) {\n const previousNode = parentNode.getPreviousSibling()\n if ($isQuoteNode(previousNode)) {\n previousNode.splice(previousNode.getChildrenSize(), 0, [\n $createLineBreakNode(),\n ...children,\n ])\n previousNode.select(0, 0)\n parentNode.remove()\n return\n }\n }\n\n const node = $createQuoteNode()\n node.append(...children)\n parentNode.replace(node)\n node.select(0, 0)\n },\n}\n"],"names":["$createQuoteNode","$isQuoteNode","QuoteNode","$createLineBreakNode","MarkdownTransformer","type","dependencies","export","node","exportChildren","lines","split","output","line","push","join","regExp","replace","parentNode","children","_match","isImport","previousNode","getPreviousSibling","splice","getChildrenSize","select","remove","append"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,QAAQ,qBAAoB;AAC9E,SAASC,oBAAoB,QAAQ,UAAS;AAE9C,OAAO,MAAMC,sBAA0C;IACrDC,MAAM;IACNC,cAAc;QAACJ;KAAU;IACzBK,QAAQ,CAACC,MAAMC;QACb,IAAI,CAACR,aAAaO,OAAO;YACvB,OAAO;QACT;QAEA,MAAME,QAAQD,eAAeD,MAAMG,KAAK,CAAC;QACzC,MAAMC,SAAS,EAAE;QACjB,KAAK,MAAMC,QAAQH,MAAO;YACxBE,OAAOE,IAAI,CAAC,OAAOD;QACrB;QACA,OAAOD,OAAOG,IAAI,CAAC;IACrB;IACAC,QAAQ;IACRC,SAAS,CAACC,YAAYC,UAAUC,QAAQC;QACtC,IAAIA,UAAU;YACZ,MAAMC,eAAeJ,WAAWK,kBAAkB;YAClD,IAAItB,aAAaqB,eAAe;gBAC9BA,aAAaE,MAAM,CAACF,aAAaG,eAAe,IAAI,GAAG;oBACrDtB;uBACGgB;iBACJ;gBACDG,aAAaI,MAAM,CAAC,GAAG;gBACvBR,WAAWS,MAAM;gBACjB;YACF;QACF;QAEA,MAAMnB,OAAOR;QACbQ,KAAKoB,MAAM,IAAIT;QACfD,WAAWD,OAAO,CAACT;QACnBA,KAAKkB,MAAM,CAAC,GAAG;IACjB;AACF,EAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
3
3
  import { getTranslation } from '@payloadcms/translations';
4
4
  import { Button, Collapsible, ErrorPill, Pill, RenderFields, SectionTitle, useDocumentInfo, useFormSubmitted, useTranslation } from '@payloadcms/ui';
5
- import isDeepEqual from 'deep-equal';
5
+ import { dequal } from 'dequal/lite'; // lite: no need for Map and Set support
6
6
  import { $getNodeByKey } from 'lexical';
7
7
  import React, { useCallback } from 'react';
8
8
  import { FormSavePlugin } from './FormSavePlugin.js';
@@ -64,7 +64,7 @@ import { FormSavePlugin } from './FormSavePlugin.js';
64
64
  removeUndefinedAndNullAndEmptyArraysRecursively(formData);
65
65
  // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,
66
66
  // which would trigger the "Leave without saving" dialog unnecessarily
67
- if (!isDeepEqual(formData, newFormData)) {
67
+ if (!dequal(formData, newFormData)) {
68
68
  // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108
69
69
  // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.
70
70
  // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/component/BlockContent.tsx"],"sourcesContent":["import type { FormFieldBase } from '@payloadcms/ui'\nimport type { FieldMap, ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\nimport type { CollapsedPreferences, Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport isDeepEqual from 'deep-equal'\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback } from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../../../lexical/config/types.js'\nimport type { BlockFields, BlockNode } from '../nodes/BlocksNode.js'\n\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n field: FormFieldBase & {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n formData: BlockFields\n formSchema: FieldMap\n nodeKey: string\n path: string\n reducedBlock: ReducedBlock\n schemaPath: string\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const {\n baseClass,\n field,\n formData,\n formSchema,\n nodeKey,\n reducedBlock: { labels },\n schemaPath,\n } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(() => {\n let initialState = false\n\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n if (collapsedArray && collapsedArray.includes(formData.id)) {\n initialState = true\n setIsCollapsed(true)\n }\n })\n return initialState\n })\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => {\n newFormData = {\n ...newFormData,\n id: formData.id,\n blockType: formData.blockType,\n }\n\n // Recursively remove all undefined values from even being present in formData, as they will\n // cause isDeepEqual to return false if, for example, formData has a key that fields.data\n // does not have, even if it's undefined.\n // Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n // Inside of fields.data however, that sub-blocks blockName property does not exist at all.\n function removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n }\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!isDeepEqual(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node: BlockNode = $getNodeByKey(nodeKey)\n if (node) {\n node.setFields(newFormData as BlockFields)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof labels.singular === 'string'\n ? getTranslation(labels.singular, i18n)\n : '[Singular Label]'}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.readOnly} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n className={`${baseClass}__fields`}\n fieldMap={Array.isArray(formSchema) ? formSchema : []}\n forceRender\n margins=\"small\"\n path=\"\" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access \"myField\" instead of \"someLexicalField.feature.blocks.someArrayB\" // TODO: Could there be any implications leaving path different than schemaPath?\n readOnly={false}\n schemaPath={schemaPath} // Having the correct schemaPath here allows sub-fields (like array > addRow) to run correct form-state calls and retrieve their needed form state from the server\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","getTranslation","Button","Collapsible","ErrorPill","Pill","RenderFields","SectionTitle","useDocumentInfo","useFormSubmitted","useTranslation","isDeepEqual","$getNodeByKey","React","useCallback","FormSavePlugin","BlockContent","props","baseClass","field","formData","formSchema","nodeKey","reducedBlock","labels","schemaPath","i18n","editor","getDocPreferences","setDocFieldPreferences","isCollapsed","setIsCollapsed","useState","initialState","then","currentDocPreferences","currentFieldPreferences","fields","name","collapsedArray","collapsed","includes","id","hasSubmitted","errorCount","setErrorCount","fieldHasErrors","classNames","filter","Boolean","join","onFormChange","fullFieldsWithValues","newFormData","blockType","removeUndefinedAndNullAndEmptyArraysRecursively","obj","key","value","Array","isArray","length","undefined","setTimeout","update","node","setFields","rowErrorCount","formField","Object","values","valid","onCollapsedChange","changedCollapsed","newCollapsed","push","splice","indexOf","hello","removeBlock","remove","Fragment","className","collapsibleStyle","header","div","pillStyle","singular","path","readOnly","count","withMessage","isEditable","buttonStyle","disabled","icon","onClick","e","preventDefault","round","tooltip","onToggle","incomingCollapsedState","fieldMap","forceRender","margins","onChange"],"rang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EAAEhE,UAAU,cAAc,CAAC;;sCAC1C,MAACmE;;8CACC,KAAChF;oCACC6E,WAAW,CAAC,EAAEhE,UAAU,aAAa,EAAEA,UAAU,aAAa,EAAEE,UAAUkC,UAAU,CAAC;oCACrFgC,WAAU;8CAET,OAAO9D,OAAO+D,QAAQ,KAAK,WACxBtF,eAAeuB,OAAO+D,QAAQ,EAAE7D,QAChC;;8CAEN,KAACnB;oCAAaiF,MAAK;oCAAYC,UAAUtE,OAAOsE;;gCAC/C3C,gCAAkB,KAAC1C;oCAAUsF,OAAO9C;oCAAYlB,MAAMA;oCAAMiE,WAAW;;;;wBAEzEhE,OAAOiE,UAAU,oBAChB,KAAC1F;4BACC2F,aAAY;4BACZX,WAAW,CAAC,EAAEhE,UAAU,cAAc,CAAC;4BACvC4E,UAAU3E,OAAOsE;4BACjBM,MAAK;4BACLC,SAAS,CAACC;gCACRA,EAAEC,cAAc;gCAChBnB;4BACF;4BACAoB,KAAK;4BACLC,SAAQ;;;;gBAKhBtE,aAAaA;gBAEbuE,UAAU,CAACC;oBACT9B,kBAAkB8B;oBAClBvE,eAAeuE;gBACjB;0BAEA,cAAA,KAAChG;oBACC4E,WAAW,CAAC,EAAEhE,UAAU,QAAQ,CAAC;oBACjCqF,UAAU5C,MAAMC,OAAO,CAACvC,cAAcA,aAAa,EAAE;oBACrDmF,WAAW;oBACXC,SAAQ;oBACRjB,MAAK,GAAG,wQAAwQ;;oBAChRC,UAAU;oBACVhE,YAAYA;;eAbT;0BAiBP,KAACV;gBAAe2F,UAAUvD;;;;AAGhC,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/blocks/component/BlockContent.tsx"],"sourcesContent":["import type { FormFieldBase } from '@payloadcms/ui'\nimport type { FieldMap, ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\nimport type { CollapsedPreferences, Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport { dequal } from 'dequal/lite' // lite: no need for Map and Set support\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback } from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../../../lexical/config/types.js'\nimport type { BlockFields, BlockNode } from '../nodes/BlocksNode.js'\n\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n field: FormFieldBase & {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n formData: BlockFields\n formSchema: FieldMap\n nodeKey: string\n path: string\n reducedBlock: ReducedBlock\n schemaPath: string\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const {\n baseClass,\n field,\n formData,\n formSchema,\n nodeKey,\n reducedBlock: { labels },\n schemaPath,\n } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(() => {\n let initialState = false\n\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n if (collapsedArray && collapsedArray.includes(formData.id)) {\n initialState = true\n setIsCollapsed(true)\n }\n })\n return initialState\n })\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => {\n newFormData = {\n ...newFormData,\n id: formData.id,\n blockType: formData.blockType,\n }\n\n // Recursively remove all undefined values from even being present in formData, as they will\n // cause isDeepEqual to return false if, for example, formData has a key that fields.data\n // does not have, even if it's undefined.\n // Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n // Inside of fields.data however, that sub-blocks blockName property does not exist at all.\n function removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n }\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!dequal(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node: BlockNode = $getNodeByKey(nodeKey)\n if (node) {\n node.setFields(newFormData as BlockFields)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof labels.singular === 'string'\n ? getTranslation(labels.singular, i18n)\n : '[Singular Label]'}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.readOnly} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n className={`${baseClass}__fields`}\n fieldMap={Array.isArray(formSchema) ? formSchema : []}\n forceRender\n margins=\"small\"\n path=\"\" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access \"myField\" instead of \"someLexicalField.feature.blocks.someArrayB\" // TODO: Could there be any implications leaving path different than schemaPath?\n readOnly={false}\n schemaPath={schemaPath} // Having the correct schemaPath here allows sub-fields (like array > addRow) to run correct form-state calls and retrieve their needed form state from the server\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","getTranslation","Button","Collapsible","ErrorPill","Pill","RenderFields","SectionTitle","useDocumentInfo","useFormSubmitted","useTranslation","dequal","$getNodeByKey","React","useCallback","FormSavePlugin","BlockContent","props","baseClass","field","formData","formSchema","nodeKey","reducedBlock","labels","schemaPath","i18n","editor","getDocPreferences","setDocFieldPreferences","isCollapsed","setIsCollapsed","useState","initialState","then","currentDocPreferences","currentFieldPreferences","fields","name","collapsedArray","collapsed","includes","id","hasSubmitted","errorCount","setErrorCount","fieldHasErrors","classNames","filter","Boolean","join","onFormChange","fullFieldsWithValues","newFormData","blockType","removeUndefinedAndNullAndEmptyArraysRecursively","obj","key","value","Array","isArray","length","undefined","setTimeout","update","node","setFields","rowErrorCount","formField","Object","values","valid","onCollapsedChange","changedCollapsed","newCollapsed","push","splice","indexOf","hello","removeBlock","remove","Fragment","className","collapsibleStyle","header","div","pillStyle","singular","path","readOnly","count","withMessage","isEditable","buttonStyle","disabled","icon","onClick","e","preventDefault","round","tooltip","onToggle","incomingCollapsedState","fieldMap","forceRender","margins","onChange"],"mappings":";AAIA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,cAAc,QAAQ,2BAA0B;AACzD,SACEC,MAAM,EACNC,WAAW,EACXC,SAAS,EACTC,IAAI,EACJC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,QACT,iBAAgB;AACvB,SAASC,MAAM,QAAQ,cAAa,CAAC,wCAAwC;AAC7E,SAASC,aAAa,QAAQ,UAAS;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