@payloadcms/richtext-lexical 3.0.0-beta.84 → 3.0.0-beta.86

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 (757) hide show
  1. package/dist/cell/index.js +117 -127
  2. package/dist/cell/index.js.map +1 -1
  3. package/dist/exports/client/Component-DOSSWC76.js +2 -0
  4. package/dist/exports/client/Component-DOSSWC76.js.map +7 -0
  5. package/dist/exports/client/Component-MBLHTKDK.js +2 -0
  6. package/dist/exports/client/Component-MBLHTKDK.js.map +7 -0
  7. package/dist/exports/client/Field-KUSPHC7Q.js +2 -0
  8. package/dist/exports/client/Field-KUSPHC7Q.js.map +7 -0
  9. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js +2 -0
  10. package/dist/exports/client/RelationshipComponent-3QWBV4GT.js.map +7 -0
  11. package/dist/exports/client/bundled.css +1 -1
  12. package/dist/exports/client/chunk-G5DTIOPI.js +2 -0
  13. package/dist/exports/client/chunk-G5DTIOPI.js.map +7 -0
  14. package/dist/exports/client/chunk-LGUXX2QH.js +2 -0
  15. package/dist/exports/client/chunk-LGUXX2QH.js.map +7 -0
  16. package/dist/exports/client/chunk-NI6Z4GBD.js +2 -0
  17. package/dist/exports/client/{chunk-SQHN3N6E.js.map → chunk-NI6Z4GBD.js.map} +2 -2
  18. package/dist/exports/client/chunk-OKMIHD2R.js +2 -0
  19. package/dist/exports/client/chunk-OKMIHD2R.js.map +7 -0
  20. package/dist/exports/client/chunk-TO2W7Q2G.js +2 -0
  21. package/dist/exports/client/chunk-TO2W7Q2G.js.map +7 -0
  22. package/dist/exports/client/chunk-V2LKLT2F.js +3 -0
  23. package/dist/exports/client/chunk-V2LKLT2F.js.map +7 -0
  24. package/dist/exports/client/component-3OFD6Q4Z.js +2 -0
  25. package/dist/exports/client/component-3OFD6Q4Z.js.map +7 -0
  26. package/dist/exports/client/component-LCAAX56T.js +2 -0
  27. package/dist/exports/client/component-LCAAX56T.js.map +7 -0
  28. package/dist/exports/client/component-LLWMZU6K.js +2 -0
  29. package/dist/exports/client/component-LLWMZU6K.js.map +7 -0
  30. package/dist/exports/client/componentInline-72VZAAHP.js +2 -0
  31. package/dist/exports/client/componentInline-72VZAAHP.js.map +7 -0
  32. package/dist/exports/client/index.js +9 -9
  33. package/dist/exports/client/index.js.map +3 -3
  34. package/dist/exports/server/migrate.js +0 -1
  35. package/dist/exports/server/migrate.js.map +1 -1
  36. package/dist/features/align/client/index.js +151 -134
  37. package/dist/features/align/client/index.js.map +1 -1
  38. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  39. package/dist/features/align/client/toolbarAlignGroup.js +10 -9
  40. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  41. package/dist/features/align/server/i18n.js +192 -193
  42. package/dist/features/align/server/i18n.js.map +1 -1
  43. package/dist/features/align/server/index.js +5 -6
  44. package/dist/features/align/server/index.js.map +1 -1
  45. package/dist/features/blockquote/client/index.js +60 -65
  46. package/dist/features/blockquote/client/index.js.map +1 -1
  47. package/dist/features/blockquote/markdownTransformer.js +28 -34
  48. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  49. package/dist/features/blockquote/server/i18n.js +96 -97
  50. package/dist/features/blockquote/server/i18n.js.map +1 -1
  51. package/dist/features/blockquote/server/index.js +38 -37
  52. package/dist/features/blockquote/server/index.js.map +1 -1
  53. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  54. package/dist/features/blocks/client/component/BlockContent.js +166 -172
  55. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  56. package/dist/features/blocks/client/component/FormSavePlugin.d.ts.map +1 -1
  57. package/dist/features/blocks/client/component/FormSavePlugin.js +46 -22
  58. package/dist/features/blocks/client/component/FormSavePlugin.js.map +1 -1
  59. package/dist/features/blocks/client/component/index.js +130 -142
  60. package/dist/features/blocks/client/component/index.js.map +1 -1
  61. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +1 -1
  62. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +12 -8
  63. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +1 -1
  64. package/dist/features/blocks/client/componentInline/index.js +106 -122
  65. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  66. package/dist/features/blocks/client/index.js +149 -142
  67. package/dist/features/blocks/client/index.js.map +1 -1
  68. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  69. package/dist/features/blocks/client/nodes/BlocksNode.js +41 -40
  70. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  71. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  72. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +31 -30
  73. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  74. package/dist/features/blocks/client/plugin/commands.d.ts.map +1 -1
  75. package/dist/features/blocks/client/plugin/commands.js +2 -1
  76. package/dist/features/blocks/client/plugin/commands.js.map +1 -1
  77. package/dist/features/blocks/client/plugin/index.js +179 -106
  78. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  79. package/dist/features/blocks/server/graphQLPopulationPromise.js +41 -28
  80. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  81. package/dist/features/blocks/server/i18n.js +288 -289
  82. package/dist/features/blocks/server/i18n.js.map +1 -1
  83. package/dist/features/blocks/server/index.js +149 -151
  84. package/dist/features/blocks/server/index.js.map +1 -1
  85. package/dist/features/blocks/server/nodes/BlocksNode.js +76 -73
  86. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  87. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +78 -76
  88. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  89. package/dist/features/blocks/server/validate.js +45 -34
  90. package/dist/features/blocks/server/validate.js.map +1 -1
  91. package/dist/features/converters/html/converter/converters/linebreak.js +4 -7
  92. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  93. package/dist/features/converters/html/converter/converters/paragraph.js +24 -19
  94. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  95. package/dist/features/converters/html/converter/converters/text.js +28 -29
  96. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  97. package/dist/features/converters/html/converter/defaultConverters.js +1 -6
  98. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  99. package/dist/features/converters/html/converter/index.js +66 -51
  100. package/dist/features/converters/html/converter/index.js.map +1 -1
  101. package/dist/features/converters/html/converter/types.js +1 -2
  102. package/dist/features/converters/html/converter/types.js.map +1 -1
  103. package/dist/features/converters/html/field/index.js +134 -139
  104. package/dist/features/converters/html/field/index.js.map +1 -1
  105. package/dist/features/converters/html/index.js +2 -3
  106. package/dist/features/converters/html/index.js.map +1 -1
  107. package/dist/features/createClientComponent.js +7 -6
  108. package/dist/features/createClientComponent.js.map +1 -1
  109. package/dist/features/createFeaturePropComponent.js +14 -13
  110. package/dist/features/createFeaturePropComponent.js.map +1 -1
  111. package/dist/features/debug/testRecorder/client/index.js +5 -7
  112. package/dist/features/debug/testRecorder/client/index.js.map +1 -1
  113. package/dist/features/debug/testRecorder/client/plugin/index.js +518 -402
  114. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  115. package/dist/features/debug/testRecorder/server/index.js +4 -5
  116. package/dist/features/debug/testRecorder/server/index.js.map +1 -1
  117. package/dist/features/debug/treeView/client/index.js +5 -7
  118. package/dist/features/debug/treeView/client/index.js.map +1 -1
  119. package/dist/features/debug/treeView/client/plugin/index.js +21 -11
  120. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  121. package/dist/features/debug/treeView/server/index.js +4 -5
  122. package/dist/features/debug/treeView/server/index.js.map +1 -1
  123. package/dist/features/experimental_table/client/index.js +41 -58
  124. package/dist/features/experimental_table/client/index.js.map +1 -1
  125. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +714 -560
  126. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  127. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +295 -301
  128. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  129. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -7
  130. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -1
  131. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +228 -159
  132. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  133. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  134. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  135. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +129 -82
  136. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  137. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +1 -1
  138. package/dist/features/experimental_table/client/utils/debounce.js +108 -89
  139. package/dist/features/experimental_table/client/utils/debounce.js.map +1 -1
  140. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +1 -1
  141. package/dist/features/experimental_table/client/utils/useDebounce.js +11 -13
  142. package/dist/features/experimental_table/client/utils/useDebounce.js.map +1 -1
  143. package/dist/features/experimental_table/server/index.js +127 -114
  144. package/dist/features/experimental_table/server/index.js.map +1 -1
  145. package/dist/features/format/bold/feature.client.js +34 -35
  146. package/dist/features/format/bold/feature.client.js.map +1 -1
  147. package/dist/features/format/bold/feature.server.js +14 -18
  148. package/dist/features/format/bold/feature.server.js.map +1 -1
  149. package/dist/features/format/bold/markdownTransformers.js +14 -25
  150. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  151. package/dist/features/format/inlineCode/feature.client.js +26 -28
  152. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  153. package/dist/features/format/inlineCode/feature.server.js +5 -8
  154. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  155. package/dist/features/format/inlineCode/markdownTransformers.js +3 -6
  156. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  157. package/dist/features/format/italic/feature.client.js +26 -29
  158. package/dist/features/format/italic/feature.client.js.map +1 -1
  159. package/dist/features/format/italic/feature.server.js +5 -9
  160. package/dist/features/format/italic/feature.server.js.map +1 -1
  161. package/dist/features/format/italic/markdownTransformers.js +7 -12
  162. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  163. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  164. package/dist/features/format/shared/toolbarFormatGroup.js +9 -8
  165. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  166. package/dist/features/format/strikethrough/feature.client.js +26 -28
  167. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  168. package/dist/features/format/strikethrough/feature.server.js +5 -8
  169. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  170. package/dist/features/format/strikethrough/markdownTransformers.js +3 -6
  171. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  172. package/dist/features/format/subscript/feature.client.js +25 -25
  173. package/dist/features/format/subscript/feature.client.js.map +1 -1
  174. package/dist/features/format/subscript/feature.server.js +4 -5
  175. package/dist/features/format/subscript/feature.server.js.map +1 -1
  176. package/dist/features/format/superscript/feature.client.js +25 -25
  177. package/dist/features/format/superscript/feature.client.js.map +1 -1
  178. package/dist/features/format/superscript/feature.server.js +4 -5
  179. package/dist/features/format/superscript/feature.server.js.map +1 -1
  180. package/dist/features/format/underline/feature.client.js +25 -25
  181. package/dist/features/format/underline/feature.client.js.map +1 -1
  182. package/dist/features/format/underline/feature.server.js +4 -5
  183. package/dist/features/format/underline/feature.server.js.map +1 -1
  184. package/dist/features/heading/client/index.js +86 -90
  185. package/dist/features/heading/client/index.js.map +1 -1
  186. package/dist/features/heading/markdownTransformer.js +22 -25
  187. package/dist/features/heading/markdownTransformer.js.map +1 -1
  188. package/dist/features/heading/server/i18n.js +96 -97
  189. package/dist/features/heading/server/i18n.js.map +1 -1
  190. package/dist/features/heading/server/index.js +49 -51
  191. package/dist/features/heading/server/index.js.map +1 -1
  192. package/dist/features/horizontalRule/client/component/index.js +81 -51
  193. package/dist/features/horizontalRule/client/component/index.js.map +1 -1
  194. package/dist/features/horizontalRule/client/index.js +48 -57
  195. package/dist/features/horizontalRule/client/index.js.map +1 -1
  196. package/dist/features/horizontalRule/client/markdownTransformer.js +15 -18
  197. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  198. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  199. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +33 -30
  200. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  201. package/dist/features/horizontalRule/client/plugin/index.js +31 -20
  202. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  203. package/dist/features/horizontalRule/server/i18n.js +96 -97
  204. package/dist/features/horizontalRule/server/i18n.js.map +1 -1
  205. package/dist/features/horizontalRule/server/index.js +17 -24
  206. package/dist/features/horizontalRule/server/index.js.map +1 -1
  207. package/dist/features/horizontalRule/server/markdownTransformer.js +15 -18
  208. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  209. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +71 -66
  210. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  211. package/dist/features/indent/client/index.js +52 -47
  212. package/dist/features/indent/client/index.js.map +1 -1
  213. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  214. package/dist/features/indent/client/toolbarIndentGroup.js +9 -8
  215. package/dist/features/indent/client/toolbarIndentGroup.js.map +1 -1
  216. package/dist/features/indent/server/i18n.js +128 -129
  217. package/dist/features/indent/server/i18n.js.map +1 -1
  218. package/dist/features/indent/server/index.js +5 -6
  219. package/dist/features/indent/server/index.js.map +1 -1
  220. package/dist/features/link/client/index.js +78 -83
  221. package/dist/features/link/client/index.js.map +1 -1
  222. package/dist/features/link/client/plugins/autoLink/index.js +267 -271
  223. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  224. package/dist/features/link/client/plugins/clickableLink/index.js +3 -3
  225. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  226. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  227. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js +2 -1
  228. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  229. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +254 -276
  230. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  231. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +8 -6
  232. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  233. package/dist/features/link/client/plugins/floatingLinkEditor/types.js +1 -2
  234. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  235. package/dist/features/link/client/plugins/link/index.js +50 -41
  236. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  237. package/dist/features/link/markdownTransformer.js +38 -39
  238. package/dist/features/link/markdownTransformer.js.map +1 -1
  239. package/dist/features/link/nodes/AutoLinkNode.js +57 -56
  240. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  241. package/dist/features/link/nodes/LinkNode.js +277 -276
  242. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  243. package/dist/features/link/nodes/types.js +1 -2
  244. package/dist/features/link/nodes/types.js.map +1 -1
  245. package/dist/features/link/server/baseFields.js +118 -88
  246. package/dist/features/link/server/baseFields.js.map +1 -1
  247. package/dist/features/link/server/graphQLPopulationPromise.js +42 -28
  248. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  249. package/dist/features/link/server/i18n.js +96 -97
  250. package/dist/features/link/server/i18n.js.map +1 -1
  251. package/dist/features/link/server/index.js +120 -114
  252. package/dist/features/link/server/index.js.map +1 -1
  253. package/dist/features/link/server/transformExtraFields.js +15 -15
  254. package/dist/features/link/server/transformExtraFields.js.map +1 -1
  255. package/dist/features/link/server/validate.js +37 -26
  256. package/dist/features/link/server/validate.js.map +1 -1
  257. package/dist/features/lists/checklist/client/index.js +77 -85
  258. package/dist/features/lists/checklist/client/index.js.map +1 -1
  259. package/dist/features/lists/checklist/client/plugin/index.js +3 -3
  260. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  261. package/dist/features/lists/checklist/markdownTransformers.js +7 -11
  262. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  263. package/dist/features/lists/checklist/server/i18n.js +96 -97
  264. package/dist/features/lists/checklist/server/i18n.js.map +1 -1
  265. package/dist/features/lists/checklist/server/index.js +21 -25
  266. package/dist/features/lists/checklist/server/index.js.map +1 -1
  267. package/dist/features/lists/htmlConverter.js +54 -43
  268. package/dist/features/lists/htmlConverter.js.map +1 -1
  269. package/dist/features/lists/orderedList/client/index.js +71 -77
  270. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  271. package/dist/features/lists/orderedList/markdownTransformer.js +7 -11
  272. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  273. package/dist/features/lists/orderedList/server/i18n.js +96 -97
  274. package/dist/features/lists/orderedList/server/i18n.js.map +1 -1
  275. package/dist/features/lists/orderedList/server/index.js +21 -25
  276. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  277. package/dist/features/lists/plugin/index.js +3 -3
  278. package/dist/features/lists/plugin/index.js.map +1 -1
  279. package/dist/features/lists/shared/markdown.js +48 -49
  280. package/dist/features/lists/shared/markdown.js.map +1 -1
  281. package/dist/features/lists/shared/slashMenuListGroup.js +9 -8
  282. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  283. package/dist/features/lists/unorderedList/client/index.js +68 -76
  284. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  285. package/dist/features/lists/unorderedList/markdownTransformer.js +7 -11
  286. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  287. package/dist/features/lists/unorderedList/server/i18n.js +96 -97
  288. package/dist/features/lists/unorderedList/server/i18n.js.map +1 -1
  289. package/dist/features/lists/unorderedList/server/index.js +17 -23
  290. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  291. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +18 -17
  292. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  293. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +30 -29
  294. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  295. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +21 -20
  296. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  297. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +21 -19
  298. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  299. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +18 -17
  300. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  301. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +24 -23
  302. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +20 -21
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +1 -10
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +69 -61
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +1 -2
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +5 -7
  312. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +42 -43
  314. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  317. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +64 -59
  319. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  320. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +19 -19
  321. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  322. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +20 -25
  323. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  324. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +28 -30
  325. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  326. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +26 -26
  327. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  328. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +22 -21
  329. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  330. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +22 -22
  331. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  332. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +12 -13
  333. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  334. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +23 -23
  335. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  336. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +22 -22
  337. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  338. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +15 -16
  339. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +1 -13
  341. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/index.js +105 -98
  343. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/types.js +1 -2
  345. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  346. package/dist/features/migrations/slateToLexical/feature.client.js +7 -7
  347. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/feature.server.js +43 -44
  349. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +1 -1
  351. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +11 -11
  352. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +64 -59
  354. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  355. package/dist/features/paragraph/client/index.js +58 -61
  356. package/dist/features/paragraph/client/index.js.map +1 -1
  357. package/dist/features/paragraph/server/i18n.js +128 -129
  358. package/dist/features/paragraph/server/i18n.js.map +1 -1
  359. package/dist/features/paragraph/server/index.js +6 -7
  360. package/dist/features/paragraph/server/index.js.map +1 -1
  361. package/dist/features/relationship/client/components/RelationshipComponent.js +141 -149
  362. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  363. package/dist/features/relationship/client/drawer/commands.js +0 -1
  364. package/dist/features/relationship/client/drawer/commands.js.map +1 -1
  365. package/dist/features/relationship/client/drawer/index.js +138 -67
  366. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  367. package/dist/features/relationship/client/index.js +53 -59
  368. package/dist/features/relationship/client/index.js.map +1 -1
  369. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  370. package/dist/features/relationship/client/nodes/RelationshipNode.js +60 -59
  371. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  372. package/dist/features/relationship/client/plugins/index.js +90 -35
  373. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  374. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  375. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js +97 -26
  376. package/dist/features/relationship/client/utils/EnabledRelationshipsCondition.js.map +1 -1
  377. package/dist/features/relationship/server/graphQLPopulationPromise.js +34 -26
  378. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  379. package/dist/features/relationship/server/i18n.js +96 -97
  380. package/dist/features/relationship/server/i18n.js.map +1 -1
  381. package/dist/features/relationship/server/index.js +48 -44
  382. package/dist/features/relationship/server/index.js.map +1 -1
  383. package/dist/features/relationship/server/nodes/RelationshipNode.js +90 -87
  384. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  385. package/dist/features/shared/slashMenu/basicGroup.js +9 -8
  386. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  387. package/dist/features/shared/toolbar/addDropdownGroup.js +8 -9
  388. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  389. package/dist/features/shared/toolbar/featureButtonsGroup.js +7 -8
  390. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  391. package/dist/features/shared/toolbar/textDropdownGroup.js +8 -9
  392. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  393. package/dist/features/toolbars/fixed/client/Toolbar/index.js +264 -187
  394. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  395. package/dist/features/toolbars/fixed/client/index.js +5 -7
  396. package/dist/features/toolbars/fixed/client/index.js.map +1 -1
  397. package/dist/features/toolbars/fixed/server/index.js +14 -13
  398. package/dist/features/toolbars/fixed/server/index.js.map +1 -1
  399. package/dist/features/toolbars/inline/client/Toolbar/index.js +374 -286
  400. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  401. package/dist/features/toolbars/inline/client/index.js +5 -7
  402. package/dist/features/toolbars/inline/client/index.js.map +1 -1
  403. package/dist/features/toolbars/inline/server/index.js +4 -5
  404. package/dist/features/toolbars/inline/server/index.js.map +1 -1
  405. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  406. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  407. package/dist/features/toolbars/shared/ToolbarButton/index.js +75 -97
  408. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  409. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +190 -211
  410. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  411. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  412. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  413. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +289 -124
  414. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  415. package/dist/features/toolbars/types.js +1 -2
  416. package/dist/features/toolbars/types.js.map +1 -1
  417. package/dist/features/typeUtilities.js +2 -3
  418. package/dist/features/typeUtilities.js.map +1 -1
  419. package/dist/features/typesClient.js +1 -2
  420. package/dist/features/typesClient.js.map +1 -1
  421. package/dist/features/typesServer.js +1 -2
  422. package/dist/features/typesServer.js.map +1 -1
  423. package/dist/features/upload/client/component/index.js +208 -224
  424. package/dist/features/upload/client/component/index.js.map +1 -1
  425. package/dist/features/upload/client/drawer/commands.js +1 -1
  426. package/dist/features/upload/client/drawer/commands.js.map +1 -1
  427. package/dist/features/upload/client/drawer/index.js +107 -58
  428. package/dist/features/upload/client/drawer/index.js.map +1 -1
  429. package/dist/features/upload/client/feature.client.js +51 -61
  430. package/dist/features/upload/client/feature.client.js.map +1 -1
  431. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  432. package/dist/features/upload/client/nodes/UploadNode.js +76 -73
  433. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  434. package/dist/features/upload/client/plugin/index.js +67 -39
  435. package/dist/features/upload/client/plugin/index.js.map +1 -1
  436. package/dist/features/upload/server/feature.server.js +190 -171
  437. package/dist/features/upload/server/feature.server.js.map +1 -1
  438. package/dist/features/upload/server/graphQLPopulationPromise.js +60 -47
  439. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  440. package/dist/features/upload/server/i18n.js +96 -97
  441. package/dist/features/upload/server/i18n.js.map +1 -1
  442. package/dist/features/upload/server/nodes/UploadNode.js +113 -108
  443. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  444. package/dist/features/upload/server/validate.js +53 -40
  445. package/dist/features/upload/server/validate.js.map +1 -1
  446. package/dist/field/Field.js +124 -105
  447. package/dist/field/Field.js.map +1 -1
  448. package/dist/field/bundled.css +1 -0
  449. package/dist/field/index.js +92 -36
  450. package/dist/field/index.js.map +1 -1
  451. package/dist/i18n.js +160 -161
  452. package/dist/i18n.js.map +1 -1
  453. package/dist/index.d.ts.map +1 -1
  454. package/dist/index.js +670 -623
  455. package/dist/index.js.map +1 -1
  456. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  457. package/dist/lexical/EditorPlugin.js +15 -10
  458. package/dist/lexical/EditorPlugin.js.map +1 -1
  459. package/dist/lexical/LexicalEditor.js +206 -161
  460. package/dist/lexical/LexicalEditor.js.map +1 -1
  461. package/dist/lexical/LexicalProvider.js +83 -82
  462. package/dist/lexical/LexicalProvider.js.map +1 -1
  463. package/dist/lexical/config/client/EditorConfigProvider.js +76 -79
  464. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  465. package/dist/lexical/config/client/default.js +3 -3
  466. package/dist/lexical/config/client/default.js.map +1 -1
  467. package/dist/lexical/config/client/loader.js +42 -39
  468. package/dist/lexical/config/client/loader.js.map +1 -1
  469. package/dist/lexical/config/client/sanitize.js +165 -165
  470. package/dist/lexical/config/client/sanitize.js.map +1 -1
  471. package/dist/lexical/config/server/default.js +5 -27
  472. package/dist/lexical/config/server/default.js.map +1 -1
  473. package/dist/lexical/config/server/loader.js +103 -103
  474. package/dist/lexical/config/server/loader.js.map +1 -1
  475. package/dist/lexical/config/server/sanitize.js +98 -99
  476. package/dist/lexical/config/server/sanitize.js.map +1 -1
  477. package/dist/lexical/config/types.js +1 -2
  478. package/dist/lexical/config/types.js.map +1 -1
  479. package/dist/lexical/nodes/index.js +9 -8
  480. package/dist/lexical/nodes/index.js.map +1 -1
  481. package/dist/lexical/plugins/MarkdownShortcut/index.js +17 -5
  482. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  483. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +384 -361
  484. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  485. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +223 -160
  486. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  487. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -2
  488. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  489. package/dist/lexical/plugins/SlashMenu/index.js +191 -179
  490. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  491. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.d.ts.map +1 -1
  492. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js +41 -26
  493. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  494. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +164 -129
  495. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  496. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  497. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js +11 -10
  498. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  499. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.d.ts.map +1 -1
  500. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js +11 -10
  501. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  502. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  503. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js +27 -23
  504. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  505. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +331 -300
  506. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  507. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +110 -97
  508. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  509. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  510. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +23 -16
  511. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  512. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -1
  513. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +18 -27
  514. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  515. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.d.ts.map +1 -1
  516. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js +15 -11
  517. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  518. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -1
  519. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js +133 -118
  520. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  521. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  522. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +3 -2
  523. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  524. package/dist/lexical/plugins/handles/utils/isOnHandleElement.d.ts.map +1 -1
  525. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js +3 -2
  526. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  527. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  528. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +26 -25
  529. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  530. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  531. package/dist/lexical/theme/EditorTheme.js +97 -102
  532. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  533. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  534. package/dist/lexical/ui/ContentEditable.js +27 -10
  535. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  536. package/dist/lexical/ui/icons/AI/index.d.ts.map +1 -1
  537. package/dist/lexical/ui/icons/AI/index.js +31 -33
  538. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  539. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  540. package/dist/lexical/ui/icons/Add/index.js +16 -18
  541. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  542. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  543. package/dist/lexical/ui/icons/AlignCenter/index.js +25 -28
  544. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  545. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  546. package/dist/lexical/ui/icons/AlignJustify/index.js +25 -28
  547. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  548. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  549. package/dist/lexical/ui/icons/AlignLeft/index.js +25 -28
  550. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  551. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  552. package/dist/lexical/ui/icons/AlignRight/index.js +25 -28
  553. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  554. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  555. package/dist/lexical/ui/icons/Block/index.js +34 -37
  556. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  557. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  558. package/dist/lexical/ui/icons/Blockquote/index.js +16 -15
  559. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  560. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  561. package/dist/lexical/ui/icons/Bold/index.js +16 -15
  562. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  563. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  564. package/dist/lexical/ui/icons/Checklist/index.js +24 -26
  565. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  566. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  567. package/dist/lexical/ui/icons/Code/index.js +19 -21
  568. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  569. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  570. package/dist/lexical/ui/icons/CodeBlock/index.js +19 -21
  571. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  572. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  573. package/dist/lexical/ui/icons/H1/index.js +16 -15
  574. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  575. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  576. package/dist/lexical/ui/icons/H2/index.js +16 -15
  577. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  579. package/dist/lexical/ui/icons/H3/index.js +16 -15
  580. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  582. package/dist/lexical/ui/icons/H4/index.js +16 -15
  583. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  585. package/dist/lexical/ui/icons/H5/index.js +16 -15
  586. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  588. package/dist/lexical/ui/icons/H6/index.js +16 -15
  589. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  591. package/dist/lexical/ui/icons/HorizontalRule/index.js +19 -18
  592. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  593. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  594. package/dist/lexical/ui/icons/IndentDecrease/index.js +28 -32
  595. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  597. package/dist/lexical/ui/icons/IndentIncrease/index.js +28 -32
  598. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  599. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  600. package/dist/lexical/ui/icons/InlineBlocks/index.js +18 -17
  601. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  603. package/dist/lexical/ui/icons/Italic/index.js +16 -15
  604. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  606. package/dist/lexical/ui/icons/Link/index.js +17 -16
  607. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  608. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  609. package/dist/lexical/ui/icons/Meatballs/index.js +19 -22
  610. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  611. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  612. package/dist/lexical/ui/icons/OrderedList/index.js +31 -36
  613. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  615. package/dist/lexical/ui/icons/Relationship/index.js +31 -33
  616. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  617. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  618. package/dist/lexical/ui/icons/Strikethrough/index.js +19 -21
  619. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  620. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  621. package/dist/lexical/ui/icons/Subscript/index.js +16 -15
  622. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  623. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  624. package/dist/lexical/ui/icons/Superscript/index.js +16 -15
  625. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  627. package/dist/lexical/ui/icons/Table/index.js +17 -16
  628. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  629. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  630. package/dist/lexical/ui/icons/Text/index.js +16 -15
  631. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  632. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  633. package/dist/lexical/ui/icons/Underline/index.js +19 -21
  634. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  636. package/dist/lexical/ui/icons/UnorderedList/index.js +46 -52
  637. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  639. package/dist/lexical/ui/icons/Upload/index.js +28 -31
  640. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  641. package/dist/lexical/utils/canUseDOM.d.ts.map +1 -1
  642. package/dist/lexical/utils/canUseDOM.js +2 -1
  643. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  644. package/dist/lexical/utils/environment.d.ts.map +1 -1
  645. package/dist/lexical/utils/environment.js +2 -1
  646. package/dist/lexical/utils/environment.js.map +1 -1
  647. package/dist/lexical/utils/getDOMRangeRect.d.ts.map +1 -1
  648. package/dist/lexical/utils/getDOMRangeRect.js +13 -12
  649. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  650. package/dist/lexical/utils/getSelectedNode.d.ts.map +1 -1
  651. package/dist/lexical/utils/getSelectedNode.js +18 -13
  652. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  653. package/dist/lexical/utils/guard.d.ts.map +1 -1
  654. package/dist/lexical/utils/guard.js +3 -2
  655. package/dist/lexical/utils/guard.js.map +1 -1
  656. package/dist/lexical/utils/joinClasses.d.ts.map +1 -1
  657. package/dist/lexical/utils/joinClasses.js +3 -2
  658. package/dist/lexical/utils/joinClasses.js.map +1 -1
  659. package/dist/lexical/utils/markdown/createBlockNode.js +9 -10
  660. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  661. package/dist/lexical/utils/nodeFormat.js +58 -59
  662. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  663. package/dist/lexical/utils/point.d.ts.map +1 -1
  664. package/dist/lexical/utils/point.js +40 -32
  665. package/dist/lexical/utils/point.js.map +1 -1
  666. package/dist/lexical/utils/rect.d.ts.map +1 -1
  667. package/dist/lexical/utils/rect.js +167 -134
  668. package/dist/lexical/utils/rect.js.map +1 -1
  669. package/dist/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  670. package/dist/lexical/utils/setFloatingElemPosition.js +56 -45
  671. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  672. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -1
  673. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js +23 -22
  674. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  675. package/dist/lexical/utils/swipe.d.ts.map +1 -1
  676. package/dist/lexical/utils/swipe.js +82 -83
  677. package/dist/lexical/utils/swipe.js.map +1 -1
  678. package/dist/lexical/utils/url.js +23 -22
  679. package/dist/lexical/utils/url.js.map +1 -1
  680. package/dist/nodeTypes.js +1 -2
  681. package/dist/nodeTypes.js.map +1 -1
  682. package/dist/populateGraphQL/defaultValue.js +24 -29
  683. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  684. package/dist/populateGraphQL/populate.js +35 -25
  685. package/dist/populateGraphQL/populate.js.map +1 -1
  686. package/dist/populateGraphQL/populateLexicalPopulationPromises.js +47 -32
  687. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  688. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +39 -25
  689. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  690. package/dist/types.js +1 -2
  691. package/dist/types.js.map +1 -1
  692. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  693. package/dist/utilities/createClientFeature.js +40 -26
  694. package/dist/utilities/createClientFeature.js.map +1 -1
  695. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  696. package/dist/utilities/createServerFeature.js +46 -31
  697. package/dist/utilities/createServerFeature.js.map +1 -1
  698. package/dist/utilities/fieldsDrawer/Drawer.js +28 -17
  699. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  700. package/dist/utilities/fieldsDrawer/DrawerContent.js +149 -78
  701. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  702. package/dist/utilities/forEachNodeRecursively.js +24 -19
  703. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  704. package/dist/utilities/generateComponentMap.js +90 -82
  705. package/dist/utilities/generateComponentMap.js.map +1 -1
  706. package/dist/utilities/generateImportMap.js +53 -47
  707. package/dist/utilities/generateImportMap.js.map +1 -1
  708. package/dist/utilities/generateSchemaMap.js +35 -30
  709. package/dist/utilities/generateSchemaMap.js.map +1 -1
  710. package/dist/utilities/migrateSlateToLexical/index.js +99 -86
  711. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -1
  712. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +73 -66
  713. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -1
  714. package/dist/utilities/recurseNodeTree.js +25 -22
  715. package/dist/utilities/recurseNodeTree.js.map +1 -1
  716. package/dist/utilities/upgradeLexicalData/index.js +99 -86
  717. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  718. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +71 -66
  719. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  720. package/dist/utilities/useLexicalFeature.js +9 -8
  721. package/dist/utilities/useLexicalFeature.js.map +1 -1
  722. package/dist/validate/index.js +32 -26
  723. package/dist/validate/index.js.map +1 -1
  724. package/dist/validate/validateNodes.js +31 -28
  725. package/dist/validate/validateNodes.js.map +1 -1
  726. package/package.json +22 -11
  727. package/dist/exports/client/Component-7HS6FEJS.js +0 -2
  728. package/dist/exports/client/Component-7HS6FEJS.js.map +0 -7
  729. package/dist/exports/client/Component-LAKSCIDX.js +0 -2
  730. package/dist/exports/client/Component-LAKSCIDX.js.map +0 -7
  731. package/dist/exports/client/Field-BYB3WX7J.js +0 -2
  732. package/dist/exports/client/Field-BYB3WX7J.js.map +0 -7
  733. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js +0 -2
  734. package/dist/exports/client/RelationshipComponent-GYUTPDNG.js.map +0 -7
  735. package/dist/exports/client/chunk-4EX7W4UX.js +0 -2
  736. package/dist/exports/client/chunk-4EX7W4UX.js.map +0 -7
  737. package/dist/exports/client/chunk-E4HH5PS6.js +0 -2
  738. package/dist/exports/client/chunk-E4HH5PS6.js.map +0 -7
  739. package/dist/exports/client/chunk-EBB2CEB6.js +0 -2
  740. package/dist/exports/client/chunk-EBB2CEB6.js.map +0 -7
  741. package/dist/exports/client/chunk-LTR7V74A.js +0 -2
  742. package/dist/exports/client/chunk-LTR7V74A.js.map +0 -7
  743. package/dist/exports/client/chunk-SQHN3N6E.js +0 -2
  744. package/dist/exports/client/chunk-VMCQSR3T.js +0 -3
  745. package/dist/exports/client/chunk-VMCQSR3T.js.map +0 -7
  746. package/dist/exports/client/component-6C5JERGA.js +0 -2
  747. package/dist/exports/client/component-6C5JERGA.js.map +0 -7
  748. package/dist/exports/client/component-GUWIGB77.js +0 -2
  749. package/dist/exports/client/component-GUWIGB77.js.map +0 -7
  750. package/dist/exports/client/component-UQ2BKD5X.js +0 -2
  751. package/dist/exports/client/component-UQ2BKD5X.js.map +0 -7
  752. package/dist/exports/client/componentInline-C2XIK5VZ.js +0 -2
  753. package/dist/exports/client/componentInline-C2XIK5VZ.js.map +0 -7
  754. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +0 -12
  755. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  756. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +0 -181
  757. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +0 -1
@@ -1,4 +1,6 @@
1
1
  'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
2
4
  import { jsx as _jsx } from "react/jsx-runtime";
3
5
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
4
6
  import { $insertNodeToNearestRoot } from '@lexical/utils';
@@ -8,43 +10,96 @@ import { useEffect } from 'react';
8
10
  import { RelationshipDrawer } from '../drawer/index.js';
9
11
  import { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js';
10
12
  export const INSERT_RELATIONSHIP_COMMAND = createCommand('INSERT_RELATIONSHIP_COMMAND');
11
- export const RelationshipPlugin = ({ clientProps })=>{
12
- const [editor] = useLexicalComposerContext();
13
- const { config: { collections } } = useConfig();
14
- let enabledRelations = null;
15
- if (clientProps?.enabledCollections) {
16
- enabledRelations = clientProps?.enabledCollections;
17
- } else if (clientProps?.disabledCollections) {
18
- enabledRelations = collections.filter(({ slug })=>!clientProps?.disabledCollections?.includes(slug)).map(({ slug })=>slug);
13
+ export const RelationshipPlugin = t0 => {
14
+ const $ = _c(10);
15
+ const {
16
+ clientProps
17
+ } = t0;
18
+ const [editor] = useLexicalComposerContext();
19
+ const {
20
+ config: t1
21
+ } = useConfig();
22
+ const {
23
+ collections
24
+ } = t1;
25
+ let enabledRelations = null;
26
+ if (clientProps?.enabledCollections) {
27
+ enabledRelations = clientProps?.enabledCollections;
28
+ } else {
29
+ if (clientProps?.disabledCollections) {
30
+ let t2;
31
+ if ($[0] !== clientProps || $[1] !== collections) {
32
+ let t3;
33
+ if ($[3] !== clientProps) {
34
+ t3 = t4 => {
35
+ const {
36
+ slug
37
+ } = t4;
38
+ return !clientProps?.disabledCollections?.includes(slug);
39
+ };
40
+ $[3] = clientProps;
41
+ $[4] = t3;
42
+ } else {
43
+ t3 = $[4];
44
+ }
45
+ t2 = collections.filter(t3).map(_temp);
46
+ $[0] = clientProps;
47
+ $[1] = collections;
48
+ $[2] = t2;
49
+ } else {
50
+ t2 = $[2];
51
+ }
52
+ enabledRelations = t2;
19
53
  }
20
- useEffect(()=>{
21
- if (!editor.hasNodes([
22
- RelationshipNode
23
- ])) {
24
- throw new Error('RelationshipPlugin: RelationshipNode not registered on editor');
54
+ }
55
+ let t2;
56
+ let t3;
57
+ if ($[5] !== editor) {
58
+ t2 = () => {
59
+ if (!editor.hasNodes([RelationshipNode])) {
60
+ throw new Error("RelationshipPlugin: RelationshipNode not registered on editor");
61
+ }
62
+ return editor.registerCommand(INSERT_RELATIONSHIP_COMMAND, payload => {
63
+ const selection = $getSelection() || $getPreviousSelection();
64
+ if ($isRangeSelection(selection)) {
65
+ const relationshipNode = $createRelationshipNode(payload);
66
+ $insertNodeToNearestRoot(relationshipNode);
67
+ const {
68
+ focus
69
+ } = selection;
70
+ const focusNode = focus.getNode();
71
+ if ($isParagraphNode(focusNode) && focusNode.getTextContentSize() === 0 && focusNode.getParent().getChildren().filter(node => $isParagraphNode(node)).length > 1) {
72
+ focusNode.remove();
73
+ }
25
74
  }
26
- return editor.registerCommand(INSERT_RELATIONSHIP_COMMAND, (payload)=>{
27
- const selection = $getSelection() || $getPreviousSelection();
28
- if ($isRangeSelection(selection)) {
29
- const relationshipNode = $createRelationshipNode(payload);
30
- // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist
31
- $insertNodeToNearestRoot(relationshipNode);
32
- const { focus } = selection;
33
- const focusNode = focus.getNode();
34
- // First, delete currently selected node if it's an empty paragraph and if there are sufficient
35
- // paragraph nodes (more than 1) left in the parent node, so that we don't "trap" the user
36
- if ($isParagraphNode(focusNode) && focusNode.getTextContentSize() === 0 && focusNode.getParent().getChildren().filter((node)=>$isParagraphNode(node)).length > 1) {
37
- focusNode.remove();
38
- }
39
- }
40
- return true;
41
- }, COMMAND_PRIORITY_EDITOR);
42
- }, [
43
- editor
44
- ]);
45
- return /*#__PURE__*/ _jsx(RelationshipDrawer, {
46
- enabledCollectionSlugs: enabledRelations
75
+ return true;
76
+ }, COMMAND_PRIORITY_EDITOR);
77
+ };
78
+ t3 = [editor];
79
+ $[5] = editor;
80
+ $[6] = t2;
81
+ $[7] = t3;
82
+ } else {
83
+ t2 = $[6];
84
+ t3 = $[7];
85
+ }
86
+ useEffect(t2, t3);
87
+ let t4;
88
+ if ($[8] !== enabledRelations) {
89
+ t4 = _jsx(RelationshipDrawer, {
90
+ enabledCollectionSlugs: enabledRelations
47
91
  });
92
+ $[8] = enabledRelations;
93
+ $[9] = t4;
94
+ } else {
95
+ t4 = $[9];
96
+ }
97
+ return t4;
48
98
  };
49
-
99
+ function _temp(t0) {
100
+ const {
101
+ slug: slug_0
102
+ } = t0;
103
+ return slug_0;
104
+ }
50
105
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { RelationshipFeatureProps } from '../../server/index.js'\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport { RelationshipDrawer } from '../drawer/index.js'\nimport { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js'\n\nexport const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData> = createCommand(\n 'INSERT_RELATIONSHIP_COMMAND',\n)\n\nexport const RelationshipPlugin: PluginComponent<RelationshipFeatureProps> = ({ clientProps }) => {\n const [editor] = useLexicalComposerContext()\n const {\n config: { collections },\n } = useConfig()\n\n let enabledRelations: string[] = null\n\n if (clientProps?.enabledCollections) {\n enabledRelations = clientProps?.enabledCollections\n } else if (clientProps?.disabledCollections) {\n enabledRelations = collections\n .filter(({ slug }) => !clientProps?.disabledCollections?.includes(slug))\n .map(({ slug }) => slug)\n }\n\n useEffect(() => {\n if (!editor.hasNodes([RelationshipNode])) {\n throw new Error('RelationshipPlugin: RelationshipNode not registered on editor')\n }\n\n return editor.registerCommand<RelationshipData>(\n INSERT_RELATIONSHIP_COMMAND,\n (payload) => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const relationshipNode = $createRelationshipNode(payload)\n // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(relationshipNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return <RelationshipDrawer enabledCollectionSlugs={enabledRelations} />\n}\n"],"names":["useLexicalComposerContext","$insertNodeToNearestRoot","useConfig","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","createCommand","useEffect","RelationshipDrawer","$createRelationshipNode","RelationshipNode","INSERT_RELATIONSHIP_COMMAND","RelationshipPlugin","clientProps","editor","config","collections","enabledRelations","enabledCollections","disabledCollections","filter","slug","includes","map","hasNodes","Error","registerCommand","payload","selection","relationshipNode","focus","focusNode","getNode","getTextContentSize","getParent","getChildren","node","length","remove","enabledCollectionSlugs"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,wBAAwB,QAAQ,iBAAgB;AACzD,SAASC,SAAS,QAAQ,iBAAgB;AAC1C,SACEC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,EACvBC,aAAa,QACR,UAAS;AAChB,SAASC,SAAS,QAAQ,QAAO;AAMjC,SAASC,kBAAkB,QAAQ,qBAAoB;AACvD,SAASC,uBAAuB,EAAEC,gBAAgB,QAAQ,+BAA8B;AAExF,OAAO,MAAMC,8BAAgEL,cAC3E,+BACD;AAED,OAAO,MAAMM,qBAAgE,CAAC,EAAEC,WAAW,EAAE;IAC3F,MAAM,CAACC,OAAO,GAAGhB;IACjB,MAAM,EACJiB,QAAQ,EAAEC,WAAW,EAAE,EACxB,GAAGhB;IAEJ,IAAIiB,mBAA6B;IAEjC,IAAIJ,aAAaK,oBAAoB;QACnCD,mBAAmBJ,aAAaK;IAClC,OAAO,IAAIL,aAAaM,qBAAqB;QAC3CF,mBAAmBD,YAChBI,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAK,CAACR,aAAaM,qBAAqBG,SAASD,OACjEE,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB;IAEAd,UAAU;QACR,IAAI,CAACO,OAAOU,QAAQ,CAAC;YAACd;SAAiB,GAAG;YACxC,MAAM,IAAIe,MAAM;QAClB;QAEA,OAAOX,OAAOY,eAAe,CAC3Bf,6BACA,CAACgB;YACC,MAAMC,YAAY1B,mBAAmBD;YAErC,IAAIG,kBAAkBwB,YAAY;gBAChC,MAAMC,mBAAmBpB,wBAAwBkB;gBACjD,oIAAoI;gBACpI5B,yBAAyB8B;gBAEzB,MAAM,EAAEC,KAAK,EAAE,GAAGF;gBAClB,MAAMG,YAAYD,MAAME,OAAO;gBAE/B,+FAA+F;gBAC/F,0FAA0F;gBAC1F,IACE7B,iBAAiB4B,cACjBA,UAAUE,kBAAkB,OAAO,KACnCF,UACGG,SAAS,GACTC,WAAW,GACXf,MAAM,CAAC,CAACgB,OAASjC,iBAAiBiC,OAAOC,MAAM,GAAG,GACrD;oBACAN,UAAUO,MAAM;gBAClB;YACF;YAEA,OAAO;QACT,GACAjC;IAEJ,GAAG;QAACS;KAAO;IAEX,qBAAO,KAACN;QAAmB+B,wBAAwBtB;;AACrD,EAAC"}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$insertNodeToNearestRoot","useConfig","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","createCommand","useEffect","RelationshipDrawer","$createRelationshipNode","RelationshipNode","INSERT_RELATIONSHIP_COMMAND","RelationshipPlugin","t0","$","clientProps","editor","config","t1","collections","enabledRelations","enabledCollections","disabledCollections","t2","t3","t4","slug","includes","filter","map","_temp","hasNodes","Error","registerCommand","payload","selection","relationshipNode","focus","focusNode","getNode","getTextContentSize","getParent","getChildren","node","length","remove","_jsx","enabledCollectionSlugs","slug_0"],"sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot } from '@lexical/utils'\nimport { useConfig } from '@payloadcms/ui'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n createCommand,\n} from 'lexical'\nimport { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\nimport type { RelationshipFeatureProps } from '../../server/index.js'\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport { RelationshipDrawer } from '../drawer/index.js'\nimport { $createRelationshipNode, RelationshipNode } from '../nodes/RelationshipNode.js'\n\nexport const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData> = createCommand(\n 'INSERT_RELATIONSHIP_COMMAND',\n)\n\nexport const RelationshipPlugin: PluginComponent<RelationshipFeatureProps> = ({ clientProps }) => {\n const [editor] = useLexicalComposerContext()\n const {\n config: { collections },\n } = useConfig()\n\n let enabledRelations: string[] = null\n\n if (clientProps?.enabledCollections) {\n enabledRelations = clientProps?.enabledCollections\n } else if (clientProps?.disabledCollections) {\n enabledRelations = collections\n .filter(({ slug }) => !clientProps?.disabledCollections?.includes(slug))\n .map(({ slug }) => slug)\n }\n\n useEffect(() => {\n if (!editor.hasNodes([RelationshipNode])) {\n throw new Error('RelationshipPlugin: RelationshipNode not registered on editor')\n }\n\n return editor.registerCommand<RelationshipData>(\n INSERT_RELATIONSHIP_COMMAND,\n (payload) => {\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const relationshipNode = $createRelationshipNode(payload)\n // Insert relationship node BEFORE potentially removing focusNode, as $insertNodeToNearestRoot errors if the focusNode doesn't exist\n $insertNodeToNearestRoot(relationshipNode)\n\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return <RelationshipDrawer enabledCollectionSlugs={enabledRelations} />\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"EnabledRelationshipsCondition.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/utils/EnabledRelationshipsCondition.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2B9B,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAmBvD,CAAA"}
1
+ {"version":3,"file":"EnabledRelationshipsCondition.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/utils/EnabledRelationshipsCondition.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2B9B,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAmBvD,CAAA"}
@@ -1,33 +1,104 @@
1
+ 'use client';
2
+
3
+ import { c as _c } from "react/compiler-runtime";
1
4
  import { useAuth, useConfig, useEntityVisibility } from '@payloadcms/ui';
2
5
  import * as React from 'react';
3
- const filterRichTextCollections = (collections, options)=>{
4
- return collections.filter(({ slug, admin: { enableRichTextRelationship }, upload })=>{
5
- if (!options.visibleEntities.collections.includes(slug)) {
6
- return false;
7
- }
8
- if (options?.uploads) {
9
- return enableRichTextRelationship && Boolean(upload) === true;
10
- }
11
- return upload ? false : enableRichTextRelationship;
12
- });
13
- };
14
- export const EnabledRelationshipsCondition = (props)=>{
15
- const { children, uploads = false, ...rest } = props;
16
- const { config: { collections } } = useConfig();
17
- const { user } = useAuth();
18
- const { visibleEntities } = useEntityVisibility();
19
- const [enabledCollectionSlugs] = React.useState(()=>filterRichTextCollections(collections, {
20
- uploads,
21
- user,
22
- visibleEntities
23
- }).map(({ slug })=>slug));
24
- if (!enabledCollectionSlugs.length) {
25
- return null;
6
+ const filterRichTextCollections = (collections, options) => {
7
+ return collections.filter(({
8
+ slug,
9
+ admin: {
10
+ enableRichTextRelationship
11
+ },
12
+ upload
13
+ }) => {
14
+ if (!options.visibleEntities.collections.includes(slug)) {
15
+ return false;
26
16
  }
27
- return /*#__PURE__*/ React.cloneElement(children, {
17
+ if (options?.uploads) {
18
+ return enableRichTextRelationship && Boolean(upload) === true;
19
+ }
20
+ return upload ? false : enableRichTextRelationship;
21
+ });
22
+ };
23
+ export const EnabledRelationshipsCondition = props => {
24
+ const $ = _c(16);
25
+ let t0;
26
+ let rest;
27
+ let children;
28
+ if ($[0] !== props) {
29
+ ({
30
+ children,
31
+ uploads: t0,
32
+ ...rest
33
+ } = props);
34
+ $[0] = props;
35
+ $[1] = t0;
36
+ $[2] = rest;
37
+ $[3] = children;
38
+ } else {
39
+ t0 = $[1];
40
+ rest = $[2];
41
+ children = $[3];
42
+ }
43
+ const uploads = t0 === undefined ? false : t0;
44
+ const {
45
+ config: t1
46
+ } = useConfig();
47
+ const {
48
+ collections
49
+ } = t1;
50
+ const {
51
+ user
52
+ } = useAuth();
53
+ const {
54
+ visibleEntities
55
+ } = useEntityVisibility();
56
+ let t2;
57
+ if ($[4] !== collections || $[5] !== uploads || $[6] !== user || $[7] !== visibleEntities) {
58
+ t2 = () => filterRichTextCollections(collections, {
59
+ uploads,
60
+ user,
61
+ visibleEntities
62
+ }).map(t3 => {
63
+ const {
64
+ slug
65
+ } = t3;
66
+ return slug;
67
+ });
68
+ $[4] = collections;
69
+ $[5] = uploads;
70
+ $[6] = user;
71
+ $[7] = visibleEntities;
72
+ $[8] = t2;
73
+ } else {
74
+ t2 = $[8];
75
+ }
76
+ const [enabledCollectionSlugs] = React.useState(t2);
77
+ if (!enabledCollectionSlugs.length) {
78
+ return null;
79
+ }
80
+ let t3;
81
+ if ($[9] !== rest || $[10] !== enabledCollectionSlugs || $[11] !== children) {
82
+ let t4;
83
+ if ($[13] !== rest || $[14] !== enabledCollectionSlugs) {
84
+ t4 = {
28
85
  ...rest,
29
86
  enabledCollectionSlugs
30
- });
87
+ };
88
+ $[13] = rest;
89
+ $[14] = enabledCollectionSlugs;
90
+ $[15] = t4;
91
+ } else {
92
+ t4 = $[15];
93
+ }
94
+ t3 = React.cloneElement(children, t4);
95
+ $[9] = rest;
96
+ $[10] = enabledCollectionSlugs;
97
+ $[11] = children;
98
+ $[12] = t3;
99
+ } else {
100
+ t3 = $[12];
101
+ }
102
+ return t3;
31
103
  };
32
-
33
104
  //# sourceMappingURL=EnabledRelationshipsCondition.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/relationship/client/utils/EnabledRelationshipsCondition.tsx"],"sourcesContent":["import type { ClientCollectionConfig, ClientUser, VisibleEntities } from 'payload'\n\nimport { useAuth, useConfig, useEntityVisibility } from '@payloadcms/ui'\nimport * as React from 'react'\n\ntype Options = {\n uploads: boolean\n user: ClientUser\n visibleEntities: VisibleEntities\n}\n\ntype FilteredCollectionsT = (\n collections: ClientCollectionConfig[],\n options?: Options,\n) => ClientCollectionConfig[]\n\nconst filterRichTextCollections: FilteredCollectionsT = (collections, options) => {\n return collections.filter(({ slug, admin: { enableRichTextRelationship }, upload }) => {\n if (!options.visibleEntities.collections.includes(slug)) {\n return false\n }\n\n if (options?.uploads) {\n return enableRichTextRelationship && Boolean(upload) === true\n }\n\n return upload ? false : enableRichTextRelationship\n })\n}\n\nexport const EnabledRelationshipsCondition: React.FC<any> = (props) => {\n const { children, uploads = false, ...rest } = props\n const {\n config: { collections },\n } = useConfig()\n const { user } = useAuth()\n const { visibleEntities } = useEntityVisibility()\n\n const [enabledCollectionSlugs] = React.useState(() =>\n filterRichTextCollections(collections, { uploads, user, visibleEntities }).map(\n ({ slug }) => slug,\n ),\n )\n\n if (!enabledCollectionSlugs.length) {\n return null\n }\n\n return React.cloneElement(children, { ...rest, enabledCollectionSlugs })\n}\n"],"names":["useAuth","useConfig","useEntityVisibility","React","filterRichTextCollections","collections","options","filter","slug","admin","enableRichTextRelationship","upload","visibleEntities","includes","uploads","Boolean","EnabledRelationshipsCondition","props","children","rest","config","user","enabledCollectionSlugs","useState","map","length","cloneElement"],"mappings":"AAEA,SAASA,OAAO,EAAEC,SAAS,EAAEC,mBAAmB,QAAQ,iBAAgB;AACxE,YAAYC,WAAW,QAAO;AAa9B,MAAMC,4BAAkD,CAACC,aAAaC;IACpE,OAAOD,YAAYE,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAEC,OAAO,EAAEC,0BAA0B,EAAE,EAAEC,MAAM,EAAE;QAChF,IAAI,CAACL,QAAQM,eAAe,CAACP,WAAW,CAACQ,QAAQ,CAACL,OAAO;YACvD,OAAO;QACT;QAEA,IAAIF,SAASQ,SAAS;YACpB,OAAOJ,8BAA8BK,QAAQJ,YAAY;QAC3D;QAEA,OAAOA,SAAS,QAAQD;IAC1B;AACF;AAEA,OAAO,MAAMM,gCAA+C,CAACC;IAC3D,MAAM,EAAEC,QAAQ,EAAEJ,UAAU,KAAK,EAAE,GAAGK,MAAM,GAAGF;IAC/C,MAAM,EACJG,QAAQ,EAAEf,WAAW,EAAE,EACxB,GAAGJ;IACJ,MAAM,EAAEoB,IAAI,EAAE,GAAGrB;IACjB,MAAM,EAAEY,eAAe,EAAE,GAAGV;IAE5B,MAAM,CAACoB,uBAAuB,GAAGnB,MAAMoB,QAAQ,CAAC,IAC9CnB,0BAA0BC,aAAa;YAAES;YAASO;YAAMT;QAAgB,GAAGY,GAAG,CAC5E,CAAC,EAAEhB,IAAI,EAAE,GAAKA;IAIlB,IAAI,CAACc,uBAAuBG,MAAM,EAAE;QAClC,OAAO;IACT;IAEA,qBAAOtB,MAAMuB,YAAY,CAACR,UAAU;QAAE,GAAGC,IAAI;QAAEG;IAAuB;AACxE,EAAC"}
1
+ {"version":3,"file":"EnabledRelationshipsCondition.js","names":["c","_c","useAuth","useConfig","useEntityVisibility","React","filterRichTextCollections","collections","options","filter","slug","admin","enableRichTextRelationship","upload","visibleEntities","includes","uploads","Boolean","EnabledRelationshipsCondition","props","$","t0","rest","children","undefined","config","t1","user","t2","map","t3","enabledCollectionSlugs","useState","length","t4","cloneElement"],"sources":["../../../../../src/features/relationship/client/utils/EnabledRelationshipsCondition.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, ClientUser, VisibleEntities } from 'payload'\n\nimport { useAuth, useConfig, useEntityVisibility } from '@payloadcms/ui'\nimport * as React from 'react'\n\ntype Options = {\n uploads: boolean\n user: ClientUser\n visibleEntities: VisibleEntities\n}\n\ntype FilteredCollectionsT = (\n collections: ClientCollectionConfig[],\n options?: Options,\n) => ClientCollectionConfig[]\n\nconst filterRichTextCollections: FilteredCollectionsT = (collections, options) => {\n return collections.filter(({ slug, admin: { enableRichTextRelationship }, upload }) => {\n if (!options.visibleEntities.collections.includes(slug)) {\n return false\n }\n\n if (options?.uploads) {\n return enableRichTextRelationship && Boolean(upload) === true\n }\n\n return upload ? false : enableRichTextRelationship\n })\n}\n\nexport const EnabledRelationshipsCondition: React.FC<any> = (props) => {\n const { children, uploads = false, ...rest } = props\n const {\n config: { collections },\n } = useConfig()\n const { user } = useAuth()\n const { visibleEntities } = useEntityVisibility()\n\n const [enabledCollectionSlugs] = React.useState(() =>\n filterRichTextCollections(collections, { uploads, user, visibleEntities }).map(\n ({ slug }) => slug,\n ),\n )\n\n if (!enabledCollectionSlugs.length) {\n return null\n }\n\n return React.cloneElement(children, { ...rest, enabledCollectionSlugs })\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,29 +1,37 @@
1
1
  import { populate } from '../../../populateGraphQL/populate.js';
2
- export const relationshipPopulationPromiseHOC = (props)=>{
3
- const relationshipPopulationPromise = ({ currentDepth, depth, draft, node, overrideAccess, populationPromises, req, showHiddenFields })=>{
4
- if (node?.value) {
5
- // @ts-expect-error
6
- const id = node?.value?.id || node?.value // for backwards-compatibility
7
- ;
8
- const collection = req.payload.collections[node?.relationTo];
9
- if (collection) {
10
- const populateDepth = props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth;
11
- populationPromises.push(populate({
12
- id,
13
- collectionSlug: collection.config.slug,
14
- currentDepth,
15
- data: node,
16
- depth: populateDepth,
17
- draft,
18
- key: 'value',
19
- overrideAccess,
20
- req,
21
- showHiddenFields
22
- }));
23
- }
24
- }
25
- };
26
- return relationshipPopulationPromise;
2
+ export const relationshipPopulationPromiseHOC = props => {
3
+ const relationshipPopulationPromise = ({
4
+ currentDepth,
5
+ depth,
6
+ draft,
7
+ node,
8
+ overrideAccess,
9
+ populationPromises,
10
+ req,
11
+ showHiddenFields
12
+ }) => {
13
+ if (node?.value) {
14
+ // @ts-expect-error
15
+ const id = node?.value?.id || node?.value // for backwards-compatibility
16
+ ;
17
+ const collection = req.payload.collections[node?.relationTo];
18
+ if (collection) {
19
+ const populateDepth = props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth;
20
+ populationPromises.push(populate({
21
+ id,
22
+ collectionSlug: collection.config.slug,
23
+ currentDepth,
24
+ data: node,
25
+ depth: populateDepth,
26
+ draft,
27
+ key: 'value',
28
+ overrideAccess,
29
+ req,
30
+ showHiddenFields
31
+ }));
32
+ }
33
+ }
34
+ };
35
+ return relationshipPopulationPromise;
27
36
  };
28
-
29
37
  //# sourceMappingURL=graphQLPopulationPromise.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../../typesServer.js'\nimport type { RelationshipFeatureProps } from './index.js'\nimport type { SerializedRelationshipNode } from './nodes/RelationshipNode.js'\n\nimport { populate } from '../../../populateGraphQL/populate.js'\n\nexport const relationshipPopulationPromiseHOC = (\n props: RelationshipFeatureProps,\n): PopulationPromise<SerializedRelationshipNode> => {\n const relationshipPopulationPromise: PopulationPromise<SerializedRelationshipNode> = ({\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (node?.value) {\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n const collection = req.payload.collections[node?.relationTo]\n\n if (collection) {\n const populateDepth =\n props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth\n\n populationPromises.push(\n populate({\n id,\n collectionSlug: collection.config.slug,\n currentDepth,\n data: node,\n depth: populateDepth,\n draft,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n }\n }\n }\n\n return relationshipPopulationPromise\n}\n"],"names":["populate","relationshipPopulationPromiseHOC","props","relationshipPopulationPromise","currentDepth","depth","draft","node","overrideAccess","populationPromises","req","showHiddenFields","value","id","collection","payload","collections","relationTo","populateDepth","maxDepth","undefined","push","collectionSlug","config","slug","data","key"],"mappings":"AAIA,SAASA,QAAQ,QAAQ,uCAAsC;AAE/D,OAAO,MAAMC,mCAAmC,CAC9CC;IAEA,MAAMC,gCAA+E,CAAC,EACpFC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EACjB;QACC,IAAIJ,MAAMK,OAAO;YACf,mBAAmB;YACnB,MAAMC,KAAKN,MAAMK,OAAOC,MAAMN,MAAMK,MAAM,8BAA8B;;YAExE,MAAME,aAAaJ,IAAIK,OAAO,CAACC,WAAW,CAACT,MAAMU,WAAW;YAE5D,IAAIH,YAAY;gBACd,MAAMI,gBACJhB,OAAOiB,aAAaC,aAAalB,OAAOiB,WAAWd,QAAQH,OAAOiB,WAAWd;gBAE/EI,mBAAmBY,IAAI,CACrBrB,SAAS;oBACPa;oBACAS,gBAAgBR,WAAWS,MAAM,CAACC,IAAI;oBACtCpB;oBACAqB,MAAMlB;oBACNF,OAAOa;oBACPZ;oBACAoB,KAAK;oBACLlB;oBACAE;oBACAC;gBACF;YAEJ;QACF;IACF;IAEA,OAAOR;AACT,EAAC"}
1
+ {"version":3,"file":"graphQLPopulationPromise.js","names":["populate","relationshipPopulationPromiseHOC","props","relationshipPopulationPromise","currentDepth","depth","draft","node","overrideAccess","populationPromises","req","showHiddenFields","value","id","collection","payload","collections","relationTo","populateDepth","maxDepth","undefined","push","collectionSlug","config","slug","data","key"],"sources":["../../../../src/features/relationship/server/graphQLPopulationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../../typesServer.js'\nimport type { RelationshipFeatureProps } from './index.js'\nimport type { SerializedRelationshipNode } from './nodes/RelationshipNode.js'\n\nimport { populate } from '../../../populateGraphQL/populate.js'\n\nexport const relationshipPopulationPromiseHOC = (\n props: RelationshipFeatureProps,\n): PopulationPromise<SerializedRelationshipNode> => {\n const relationshipPopulationPromise: PopulationPromise<SerializedRelationshipNode> = ({\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n }) => {\n if (node?.value) {\n // @ts-expect-error\n const id = node?.value?.id || node?.value // for backwards-compatibility\n\n const collection = req.payload.collections[node?.relationTo]\n\n if (collection) {\n const populateDepth =\n props?.maxDepth !== undefined && props?.maxDepth < depth ? props?.maxDepth : depth\n\n populationPromises.push(\n populate({\n id,\n collectionSlug: collection.config.slug,\n currentDepth,\n data: node,\n depth: populateDepth,\n draft,\n key: 'value',\n overrideAccess,\n req,\n showHiddenFields,\n }),\n )\n }\n }\n }\n\n return relationshipPopulationPromise\n}\n"],"mappings":"AAIA,SAASA,QAAQ,QAAQ;AAEzB,OAAO,MAAMC,gCAAA,GACXC,KAAA;EAEA,MAAMC,6BAAA,GAA+EA,CAAC;IACpFC,YAAY;IACZC,KAAK;IACLC,KAAK;IACLC,IAAI;IACJC,cAAc;IACdC,kBAAkB;IAClBC,GAAG;IACHC;EAAgB,CACjB;IACC,IAAIJ,IAAA,EAAMK,KAAA,EAAO;MACf;MACA,MAAMC,EAAA,GAAKN,IAAA,EAAMK,KAAA,EAAOC,EAAA,IAAMN,IAAA,EAAMK,KAAA,CAAM;MAAA;MAE1C,MAAME,UAAA,GAAaJ,GAAA,CAAIK,OAAO,CAACC,WAAW,CAACT,IAAA,EAAMU,UAAA,CAAW;MAE5D,IAAIH,UAAA,EAAY;QACd,MAAMI,aAAA,GACJhB,KAAA,EAAOiB,QAAA,KAAaC,SAAA,IAAalB,KAAA,EAAOiB,QAAA,GAAWd,KAAA,GAAQH,KAAA,EAAOiB,QAAA,GAAWd,KAAA;QAE/EI,kBAAA,CAAmBY,IAAI,CACrBrB,QAAA,CAAS;UACPa,EAAA;UACAS,cAAA,EAAgBR,UAAA,CAAWS,MAAM,CAACC,IAAI;UACtCpB,YAAA;UACAqB,IAAA,EAAMlB,IAAA;UACNF,KAAA,EAAOa,aAAA;UACPZ,KAAA;UACAoB,GAAA,EAAK;UACLlB,cAAA;UACAE,GAAA;UACAC;QACF;MAEJ;IACF;EACF;EAEA,OAAOR,6BAAA;AACT","ignoreList":[]}
@@ -1,100 +1,99 @@
1
1
  export const i18n = {
2
- ar: {
3
- label: 'العلاقة'
4
- },
5
- az: {
6
- label: 'Münasibət'
7
- },
8
- bg: {
9
- label: 'Връзка'
10
- },
11
- cs: {
12
- label: 'Vztah'
13
- },
14
- de: {
15
- label: 'Beziehung'
16
- },
17
- en: {
18
- label: 'Relationship'
19
- },
20
- es: {
21
- label: 'Relación'
22
- },
23
- fa: {
24
- label: 'روابط'
25
- },
26
- fr: {
27
- label: 'Relation'
28
- },
29
- he: {
30
- label: 'יחסים'
31
- },
32
- hr: {
33
- label: 'Odnos'
34
- },
35
- hu: {
36
- label: 'Kapcsolat'
37
- },
38
- it: {
39
- label: 'Relazione'
40
- },
41
- ja: {
42
- label: '関係性'
43
- },
44
- ko: {
45
- label: '관계'
46
- },
47
- my: {
48
- label: 'Hubungan'
49
- },
50
- nb: {
51
- label: 'Forhold'
52
- },
53
- nl: {
54
- label: 'Relatie'
55
- },
56
- pl: {
57
- label: 'Relacja'
58
- },
59
- pt: {
60
- label: 'Relacionamento'
61
- },
62
- ro: {
63
- label: 'Relație'
64
- },
65
- rs: {
66
- label: 'Veza'
67
- },
68
- 'rs-latin': {
69
- label: 'Odnos'
70
- },
71
- ru: {
72
- label: 'Отношения'
73
- },
74
- sk: {
75
- label: 'Vzťah'
76
- },
77
- sv: {
78
- label: 'Relation'
79
- },
80
- th: {
81
- label: 'ความสัมพันธ์'
82
- },
83
- tr: {
84
- label: 'İlişki'
85
- },
86
- uk: {
87
- label: 'Стосунки'
88
- },
89
- vi: {
90
- label: 'Mối quan hệ'
91
- },
92
- zh: {
93
- label: '关系'
94
- },
95
- 'zh-TW': {
96
- label: '關係'
97
- }
2
+ ar: {
3
+ label: 'العلاقة'
4
+ },
5
+ az: {
6
+ label: 'Münasibət'
7
+ },
8
+ bg: {
9
+ label: 'Връзка'
10
+ },
11
+ cs: {
12
+ label: 'Vztah'
13
+ },
14
+ de: {
15
+ label: 'Beziehung'
16
+ },
17
+ en: {
18
+ label: 'Relationship'
19
+ },
20
+ es: {
21
+ label: 'Relación'
22
+ },
23
+ fa: {
24
+ label: 'روابط'
25
+ },
26
+ fr: {
27
+ label: 'Relation'
28
+ },
29
+ he: {
30
+ label: 'יחסים'
31
+ },
32
+ hr: {
33
+ label: 'Odnos'
34
+ },
35
+ hu: {
36
+ label: 'Kapcsolat'
37
+ },
38
+ it: {
39
+ label: 'Relazione'
40
+ },
41
+ ja: {
42
+ label: '関係性'
43
+ },
44
+ ko: {
45
+ label: '관계'
46
+ },
47
+ my: {
48
+ label: 'Hubungan'
49
+ },
50
+ nb: {
51
+ label: 'Forhold'
52
+ },
53
+ nl: {
54
+ label: 'Relatie'
55
+ },
56
+ pl: {
57
+ label: 'Relacja'
58
+ },
59
+ pt: {
60
+ label: 'Relacionamento'
61
+ },
62
+ ro: {
63
+ label: 'Relație'
64
+ },
65
+ rs: {
66
+ label: 'Veza'
67
+ },
68
+ 'rs-latin': {
69
+ label: 'Odnos'
70
+ },
71
+ ru: {
72
+ label: 'Отношения'
73
+ },
74
+ sk: {
75
+ label: 'Vzťah'
76
+ },
77
+ sv: {
78
+ label: 'Relation'
79
+ },
80
+ th: {
81
+ label: 'ความสัมพันธ์'
82
+ },
83
+ tr: {
84
+ label: 'İlişki'
85
+ },
86
+ uk: {
87
+ label: 'Стосунки'
88
+ },
89
+ vi: {
90
+ label: 'Mối quan hệ'
91
+ },
92
+ zh: {
93
+ label: '关系'
94
+ },
95
+ 'zh-TW': {
96
+ label: '關係'
97
+ }
98
98
  };
99
-
100
99
  //# sourceMappingURL=i18n.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/relationship/server/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'العلاقة',\n },\n az: {\n label: 'Münasibət',\n },\n bg: {\n label: 'Връзка',\n },\n cs: {\n label: 'Vztah',\n },\n de: {\n label: 'Beziehung',\n },\n en: {\n label: 'Relationship',\n },\n es: {\n label: 'Relación',\n },\n fa: {\n label: 'روابط',\n },\n fr: {\n label: 'Relation',\n },\n he: {\n label: 'יחסים',\n },\n hr: {\n label: 'Odnos',\n },\n hu: {\n label: 'Kapcsolat',\n },\n it: {\n label: 'Relazione',\n },\n ja: {\n label: '関係性',\n },\n ko: {\n label: '관계',\n },\n my: {\n label: 'Hubungan',\n },\n nb: {\n label: 'Forhold',\n },\n nl: {\n label: 'Relatie',\n },\n pl: {\n label: 'Relacja',\n },\n pt: {\n label: 'Relacionamento',\n },\n ro: {\n label: 'Relație',\n },\n rs: {\n label: 'Veza',\n },\n 'rs-latin': {\n label: 'Odnos',\n },\n ru: {\n label: 'Отношения',\n },\n sk: {\n label: 'Vzťah',\n },\n sv: {\n label: 'Relation',\n },\n th: {\n label: 'ความสัมพันธ์',\n },\n tr: {\n label: 'İlişki',\n },\n uk: {\n label: 'Стосунки',\n },\n vi: {\n label: 'Mối quan hệ',\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
+ {"version":3,"file":"i18n.js","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"],"sources":["../../../../src/features/relationship/server/i18n.ts"],"sourcesContent":["import type { GenericLanguages } from '@payloadcms/translations'\n\nexport const i18n: Partial<GenericLanguages> = {\n ar: {\n label: 'العلاقة',\n },\n az: {\n label: 'Münasibət',\n },\n bg: {\n label: 'Връзка',\n },\n cs: {\n label: 'Vztah',\n },\n de: {\n label: 'Beziehung',\n },\n en: {\n label: 'Relationship',\n },\n es: {\n label: 'Relación',\n },\n fa: {\n label: 'روابط',\n },\n fr: {\n label: 'Relation',\n },\n he: {\n label: 'יחסים',\n },\n hr: {\n label: 'Odnos',\n },\n hu: {\n label: 'Kapcsolat',\n },\n it: {\n label: 'Relazione',\n },\n ja: {\n label: '関係性',\n },\n ko: {\n label: '관계',\n },\n my: {\n label: 'Hubungan',\n },\n nb: {\n label: 'Forhold',\n },\n nl: {\n label: 'Relatie',\n },\n pl: {\n label: 'Relacja',\n },\n pt: {\n label: 'Relacionamento',\n },\n ro: {\n label: 'Relație',\n },\n rs: {\n label: 'Veza',\n },\n 'rs-latin': {\n label: 'Odnos',\n },\n ru: {\n label: 'Отношения',\n },\n sk: {\n label: 'Vzťah',\n },\n sv: {\n label: 'Relation',\n },\n th: {\n label: 'ความสัมพันธ์',\n },\n tr: {\n label: 'İlişki',\n },\n uk: {\n label: 'Стосунки',\n },\n vi: {\n label: 'Mối quan hệ',\n },\n zh: {\n label: '关系',\n },\n 'zh-TW': {\n label: '關係',\n },\n}\n"],"mappings":"AAEA,OAAO,MAAMA,IAAA,GAAkC;EAC7CC,EAAA,EAAI;IACFC,KAAA,EAAO;EACT;EACAC,EAAA,EAAI;IACFD,KAAA,EAAO;EACT;EACAE,EAAA,EAAI;IACFF,KAAA,EAAO;EACT;EACAG,EAAA,EAAI;IACFH,KAAA,EAAO;EACT;EACAI,EAAA,EAAI;IACFJ,KAAA,EAAO;EACT;EACAK,EAAA,EAAI;IACFL,KAAA,EAAO;EACT;EACAM,EAAA,EAAI;IACFN,KAAA,EAAO;EACT;EACAO,EAAA,EAAI;IACFP,KAAA,EAAO;EACT;EACAQ,EAAA,EAAI;IACFR,KAAA,EAAO;EACT;EACAS,EAAA,EAAI;IACFT,KAAA,EAAO;EACT;EACAU,EAAA,EAAI;IACFV,KAAA,EAAO;EACT;EACAW,EAAA,EAAI;IACFX,KAAA,EAAO;EACT;EACAY,EAAA,EAAI;IACFZ,KAAA,EAAO;EACT;EACAa,EAAA,EAAI;IACFb,KAAA,EAAO;EACT;EACAc,EAAA,EAAI;IACFd,KAAA,EAAO;EACT;EACAe,EAAA,EAAI;IACFf,KAAA,EAAO;EACT;EACAgB,EAAA,EAAI;IACFhB,KAAA,EAAO;EACT;EACAiB,EAAA,EAAI;IACFjB,KAAA,EAAO;EACT;EACAkB,EAAA,EAAI;IACFlB,KAAA,EAAO;EACT;EACAmB,EAAA,EAAI;IACFnB,KAAA,EAAO;EACT;EACAoB,EAAA,EAAI;IACFpB,KAAA,EAAO;EACT;EACAqB,EAAA,EAAI;IACFrB,KAAA,EAAO;EACT;EACA,YAAY;IACVA,KAAA,EAAO;EACT;EACAsB,EAAA,EAAI;IACFtB,KAAA,EAAO;EACT;EACAuB,EAAA,EAAI;IACFvB,KAAA,EAAO;EACT;EACAwB,EAAA,EAAI;IACFxB,KAAA,EAAO;EACT;EACAyB,EAAA,EAAI;IACFzB,KAAA,EAAO;EACT;EACA0B,EAAA,EAAI;IACF1B,KAAA,EAAO;EACT;EACA2B,EAAA,EAAI;IACF3B,KAAA,EAAO;EACT;EACA4B,EAAA,EAAI;IACF5B,KAAA,EAAO;EACT;EACA6B,EAAA,EAAI;IACF7B,KAAA,EAAO;EACT;EACA,SAAS;IACPA,KAAA,EAAO;EACT;AACF","ignoreList":[]}