@payloadcms/richtext-lexical 4.0.0-internal.9496957 → 4.0.0-internal.94ef095

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 (470) hide show
  1. package/dist/exports/client/Field-334JNLRF.js +2 -0
  2. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  3. package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
  4. package/dist/exports/client/chunk-3V7KW5XF.js +2 -0
  5. package/dist/exports/client/chunk-3V7KW5XF.js.map +7 -0
  6. package/dist/exports/client/chunk-A7DZCL6D.js +2 -0
  7. package/dist/exports/client/chunk-A7DZCL6D.js.map +7 -0
  8. package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
  9. package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
  10. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  11. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  12. package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
  13. package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
  14. package/dist/exports/client/{component-D5QLYS7W.js → component-FCCSBBZG.js} +2 -2
  15. package/dist/exports/client/componentInline-7FQV2X7Z.js +2 -0
  16. package/dist/exports/client/index.js +28 -28
  17. package/dist/exports/client/index.js.map +4 -4
  18. package/dist/features/align/client/index.js.map +1 -1
  19. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  20. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  21. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  22. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  23. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  24. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  25. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  26. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  27. package/dist/features/blocks/client/component/index.d.ts +0 -6
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +209 -164
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  32. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  33. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  34. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  35. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  36. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  37. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  38. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  39. package/dist/features/blocks/client/componentInline/index.css +0 -1
  40. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  41. package/dist/features/blocks/client/componentInline/index.js +37 -76
  42. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  43. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +8 -0
  44. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  45. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +72 -0
  46. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  47. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  48. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  49. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  50. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  51. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
  52. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  53. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  54. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  55. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  56. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  57. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  58. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  59. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  60. package/dist/features/blocks/server/schema.d.ts +2 -0
  61. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  62. package/dist/features/blocks/server/schema.js +7 -9
  63. package/dist/features/blocks/server/schema.js.map +1 -1
  64. package/dist/features/blocks/server/validate.js +1 -1
  65. package/dist/features/blocks/server/validate.js.map +1 -1
  66. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  67. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  68. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  69. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  70. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  71. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  72. package/dist/features/converters/lexicalToHtml/async/converters/table.js +6 -4
  73. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  74. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  75. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +5 -4
  76. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  77. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  78. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  79. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  80. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  81. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  82. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +6 -4
  84. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  85. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  86. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +5 -4
  87. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  89. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  90. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  91. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  92. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  93. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  94. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  95. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  96. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  97. package/dist/features/converters/lexicalToJSX/converter/converters/table.js +3 -2
  98. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  99. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  100. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  101. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  102. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  103. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  104. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  105. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  106. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  107. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  108. package/dist/features/heading/client/index.js.map +1 -1
  109. package/dist/features/heading/constants.d.ts +2 -0
  110. package/dist/features/heading/constants.d.ts.map +1 -0
  111. package/dist/features/heading/constants.js +2 -0
  112. package/dist/features/heading/constants.js.map +1 -0
  113. package/dist/features/heading/server/index.d.ts.map +1 -1
  114. package/dist/features/heading/server/index.js +5 -1
  115. package/dist/features/heading/server/index.js.map +1 -1
  116. package/dist/features/heading/server/validate.d.ts +6 -0
  117. package/dist/features/heading/server/validate.d.ts.map +1 -0
  118. package/dist/features/heading/server/validate.js +15 -0
  119. package/dist/features/heading/server/validate.js.map +1 -0
  120. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +11 -1
  121. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  122. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +17 -0
  123. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  124. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  125. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +2 -2
  126. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  127. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  128. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  129. package/dist/features/horizontalRule/server/schema.js +6 -5
  130. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  131. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  132. package/dist/features/indent/client/IndentPlugin.js +122 -1
  133. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  134. package/dist/features/indent/client/index.d.ts.map +1 -1
  135. package/dist/features/indent/client/index.js +0 -2
  136. package/dist/features/indent/client/index.js.map +1 -1
  137. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  138. package/dist/features/indent/server/i18n.js +74 -37
  139. package/dist/features/indent/server/i18n.js.map +1 -1
  140. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  141. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  142. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +20 -9
  143. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  144. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +0 -1
  145. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  146. package/dist/features/link/markdownTransformer.js +2 -2
  147. package/dist/features/link/markdownTransformer.js.map +1 -1
  148. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  149. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  150. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  151. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  152. package/dist/features/link/nodes/LinkNode.js +2 -15
  153. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  154. package/dist/features/link/server/baseFields.js.map +1 -1
  155. package/dist/features/link/server/validate.js +1 -1
  156. package/dist/features/link/server/validate.js.map +1 -1
  157. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  158. package/dist/features/lists/checklist/server/index.js +5 -2
  159. package/dist/features/lists/checklist/server/index.js.map +1 -1
  160. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  161. package/dist/features/lists/orderedList/server/index.js +5 -2
  162. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  163. package/dist/features/lists/shared/constants.d.ts +2 -0
  164. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  165. package/dist/features/lists/shared/constants.js +2 -0
  166. package/dist/features/lists/shared/constants.js.map +1 -0
  167. package/dist/features/lists/shared/schema.d.ts.map +1 -1
  168. package/dist/features/lists/shared/schema.js.map +1 -1
  169. package/dist/features/lists/shared/validate.d.ts +5 -0
  170. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  171. package/dist/features/lists/shared/validate.js +15 -0
  172. package/dist/features/lists/shared/validate.js.map +1 -0
  173. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  174. package/dist/features/lists/unorderedList/server/index.js +5 -2
  175. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  176. package/dist/features/relationship/client/components/index.css +3 -6
  177. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  178. package/dist/features/relationship/client/index.d.ts +2 -2
  179. package/dist/features/relationship/client/index.d.ts.map +1 -1
  180. package/dist/features/relationship/client/index.js.map +1 -1
  181. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  182. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  183. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  184. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  185. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  186. package/dist/features/relationship/client/plugins/index.js +27 -31
  187. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  188. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  189. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  190. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  191. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  192. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  193. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  194. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  195. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  196. package/dist/features/relationship/server/index.d.ts +8 -1
  197. package/dist/features/relationship/server/index.d.ts.map +1 -1
  198. package/dist/features/relationship/server/index.js +28 -11
  199. package/dist/features/relationship/server/index.js.map +1 -1
  200. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  201. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  202. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  203. package/dist/features/relationship/server/schema.d.ts +3 -2
  204. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  205. package/dist/features/relationship/server/schema.js +9 -12
  206. package/dist/features/relationship/server/schema.js.map +1 -1
  207. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  208. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  209. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  210. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  211. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  212. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  213. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  214. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  215. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.css +1 -2
  216. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  217. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js +17 -44
  218. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  219. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  220. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js +48 -25
  221. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  222. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  223. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  224. package/dist/features/table/client/plugins/TablePlugin/index.js +54 -18
  225. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -1
  226. package/dist/features/table/client/utils/useDebounce.js.map +1 -1
  227. package/dist/features/table/server/index.d.ts.map +1 -1
  228. package/dist/features/table/server/index.js +3 -1
  229. package/dist/features/table/server/index.js.map +1 -1
  230. package/dist/features/table/server/validate.d.ts +4 -0
  231. package/dist/features/table/server/validate.d.ts.map +1 -0
  232. package/dist/features/table/server/validate.js +15 -0
  233. package/dist/features/table/server/validate.js.map +1 -0
  234. package/dist/features/textState/defaultColors.js +1 -1
  235. package/dist/features/textState/defaultColors.js.map +1 -1
  236. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -1
  237. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  238. package/dist/features/toolbars/fixed/client/Toolbar/index.js +141 -70
  239. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  240. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  241. package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
  242. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  243. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  244. package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
  245. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  246. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  247. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
  248. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  249. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +16 -12
  250. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  251. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
  252. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  253. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  254. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  255. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  256. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  257. package/dist/features/typesServer.d.ts +16 -11
  258. package/dist/features/typesServer.d.ts.map +1 -1
  259. package/dist/features/typesServer.js.map +1 -1
  260. package/dist/features/upload/client/component/index.css +0 -2
  261. package/dist/features/upload/client/drawer/index.js.map +1 -1
  262. package/dist/features/upload/client/index.d.ts +3 -2
  263. package/dist/features/upload/client/index.d.ts.map +1 -1
  264. package/dist/features/upload/client/index.js.map +1 -1
  265. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  266. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  267. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  268. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  269. package/dist/features/upload/client/plugin/index.js +50 -53
  270. package/dist/features/upload/client/plugin/index.js.map +1 -1
  271. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  272. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  273. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  274. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  275. package/dist/features/upload/server/index.d.ts +7 -3
  276. package/dist/features/upload/server/index.d.ts.map +1 -1
  277. package/dist/features/upload/server/index.js +18 -14
  278. package/dist/features/upload/server/index.js.map +1 -1
  279. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  280. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  281. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  282. package/dist/features/upload/server/schema.d.ts +4 -16
  283. package/dist/features/upload/server/schema.d.ts.map +1 -1
  284. package/dist/features/upload/server/schema.js +8 -10
  285. package/dist/features/upload/server/schema.js.map +1 -1
  286. package/dist/features/upload/server/validate.d.ts +2 -2
  287. package/dist/features/upload/server/validate.d.ts.map +1 -1
  288. package/dist/features/upload/server/validate.js +4 -1
  289. package/dist/features/upload/server/validate.js.map +1 -1
  290. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  291. package/dist/field/Diff/converters/listitem/index.js +2 -1
  292. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  293. package/dist/field/Diff/converters/relationship/index.css +0 -1
  294. package/dist/field/Diff/converters/unknown/index.css +0 -1
  295. package/dist/field/Diff/converters/upload/index.css +0 -1
  296. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  297. package/dist/field/Diff/converters/upload/index.js +8 -7
  298. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  299. package/dist/field/Diff/index.css +0 -2
  300. package/dist/field/Diff/index.d.ts +3 -2
  301. package/dist/field/Diff/index.d.ts.map +1 -1
  302. package/dist/field/Diff/index.js +4 -2
  303. package/dist/field/Diff/index.js.map +1 -1
  304. package/dist/field/Field.d.ts.map +1 -1
  305. package/dist/field/Field.js +8 -1
  306. package/dist/field/Field.js.map +1 -1
  307. package/dist/field/RenderLexical/index.d.ts +3 -1
  308. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  309. package/dist/field/RenderLexical/index.js +23 -23
  310. package/dist/field/RenderLexical/index.js.map +1 -1
  311. package/dist/field/ViewSelector.d.ts.map +1 -1
  312. package/dist/field/ViewSelector.js +13 -4
  313. package/dist/field/ViewSelector.js.map +1 -1
  314. package/dist/field/bundled.css +1 -1
  315. package/dist/field/index.css +0 -1
  316. package/dist/field/index.js.map +1 -1
  317. package/dist/field/rscEntry.d.ts +2 -2
  318. package/dist/field/rscEntry.d.ts.map +1 -1
  319. package/dist/field/rscEntry.js.map +1 -1
  320. package/dist/i18n.d.ts.map +1 -1
  321. package/dist/i18n.js +44 -0
  322. package/dist/i18n.js.map +1 -1
  323. package/dist/index.d.ts +4 -4
  324. package/dist/index.d.ts.map +1 -1
  325. package/dist/index.js +23 -1
  326. package/dist/index.js.map +1 -1
  327. package/dist/lexical/LexicalEditor.css +21 -10
  328. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  329. package/dist/lexical/LexicalEditor.js +61 -64
  330. package/dist/lexical/LexicalEditor.js.map +1 -1
  331. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  332. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  333. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  334. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  335. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +2 -1
  336. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  337. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  338. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  339. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +235 -88
  340. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  341. package/dist/lexical/plugins/SlashMenu/index.css +0 -1
  342. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  343. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  344. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +1 -0
  345. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  346. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  347. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +17 -0
  348. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  349. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +139 -37
  350. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  351. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  352. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  353. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  354. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  355. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  356. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  357. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  358. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  359. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  360. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  361. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  362. package/dist/lexical/theme/EditorTheme.css +0 -2
  363. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  364. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  365. package/dist/lexical/ui/ContentEditable.js +32 -11
  366. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  367. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  368. package/dist/lexical/ui/icons/H3/index.js +13 -6
  369. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  370. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  371. package/dist/lexical/ui/icons/H4/index.js +13 -6
  372. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  373. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  374. package/dist/lexical/ui/icons/H5/index.js +13 -6
  375. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  376. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  377. package/dist/lexical/ui/icons/H6/index.js +13 -6
  378. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  379. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  380. package/dist/lexical/utils/nodeFormat.js +0 -2
  381. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  382. package/dist/lexical/utils/url.d.ts.map +1 -1
  383. package/dist/lexical/utils/url.js +1 -1
  384. package/dist/lexical/utils/url.js.map +1 -1
  385. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  386. package/dist/populateGraphQL/populate.js +4 -1
  387. package/dist/populateGraphQL/populate.js.map +1 -1
  388. package/dist/presets/llmInstructions.d.ts +2 -0
  389. package/dist/presets/llmInstructions.d.ts.map +1 -0
  390. package/dist/presets/llmInstructions.js +13 -0
  391. package/dist/presets/llmInstructions.js.map +1 -0
  392. package/dist/types/builtInNodes.d.ts +1 -1
  393. package/dist/types/builtInNodes.d.ts.map +1 -1
  394. package/dist/types/builtInNodes.js +8 -3
  395. package/dist/types/builtInNodes.js.map +1 -1
  396. package/dist/types/index.d.ts +3 -6
  397. package/dist/types/index.d.ts.map +1 -1
  398. package/dist/types/index.js.map +1 -1
  399. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  400. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  401. package/dist/types/jsonSchemaHelpers.js +7 -2
  402. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  403. package/dist/types/nodeTypes.d.ts +5 -0
  404. package/dist/types/nodeTypes.d.ts.map +1 -1
  405. package/dist/types/nodeTypes.js.map +1 -1
  406. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  407. package/dist/utilities/buildEditorState.js.map +1 -1
  408. package/dist/utilities/buildInitialState.d.ts +3 -2
  409. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  410. package/dist/utilities/buildInitialState.js +1 -0
  411. package/dist/utilities/buildInitialState.js.map +1 -1
  412. package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
  413. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  414. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  415. package/dist/utilities/fieldsDrawer/DrawerContent.js +127 -107
  416. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  417. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
  418. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  419. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  420. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  421. package/dist/utilities/generateImportMap.d.ts +2 -2
  422. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  423. package/dist/utilities/generateImportMap.js.map +1 -1
  424. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  425. package/dist/utilities/initLexicalFeatures.js +38 -4
  426. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  427. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  428. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  429. package/dist/utilities/useLexicalFeature.js +15 -6
  430. package/dist/utilities/useLexicalFeature.js.map +1 -1
  431. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  432. package/dist/validate/hasText.d.ts +2 -2
  433. package/dist/validate/hasText.d.ts.map +1 -1
  434. package/dist/validate/hasText.js.map +1 -1
  435. package/dist/validate/index.d.ts +1 -1
  436. package/dist/validate/index.d.ts.map +1 -1
  437. package/package.json +51 -54
  438. package/dist/dependencyChecker.spec.js +0 -16
  439. package/dist/dependencyChecker.spec.js.map +0 -1
  440. package/dist/exports/client/Field-F22V5L4V.js +0 -2
  441. package/dist/exports/client/Field-F22V5L4V.js.map +0 -7
  442. package/dist/exports/client/bundled.css +0 -1
  443. package/dist/exports/client/chunk-43E5QYAA.js +0 -2
  444. package/dist/exports/client/chunk-43E5QYAA.js.map +0 -7
  445. package/dist/exports/client/chunk-ESITTE3C.js +0 -2
  446. package/dist/exports/client/chunk-ESITTE3C.js.map +0 -7
  447. package/dist/exports/client/chunk-LN6VX25I.js +0 -2
  448. package/dist/exports/client/chunk-LN6VX25I.js.map +0 -7
  449. package/dist/exports/client/componentInline-H24N7GUG.js +0 -2
  450. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  451. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  452. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  453. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  454. package/dist/features/converters/lexicalToHtml/sync/alignment.spec.js +0 -92
  455. package/dist/features/converters/lexicalToHtml/sync/alignment.spec.js.map +0 -1
  456. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  457. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  458. package/dist/features/link/markdownTransformer.spec.js +0 -195
  459. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  460. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.js +0 -65
  461. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.spec.js.map +0 -1
  462. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +0 -88
  463. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +0 -1
  464. package/dist/lexical/utils/url.spec.js +0 -114
  465. package/dist/lexical/utils/url.spec.js.map +0 -1
  466. package/dist/utilities/jsx/jsx.spec.js +0 -178
  467. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  468. /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
  469. /package/dist/exports/client/{component-D5QLYS7W.js.map → component-FCCSBBZG.js.map} +0 -0
  470. /package/dist/exports/client/{componentInline-H24N7GUG.js.map → componentInline-7FQV2X7Z.js.map} +0 -0
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utilities/fieldsDrawer/useDrawerSubmit.ts", "../../../src/utilities/fieldsDrawer/useLexicalDrawer.tsx"],
4
4
  "sourcesContent": ["'use client'\nimport type { FC } from 'react'\nimport type React from 'react'\n\nimport { useForm, useTranslation } from '@payloadcms/ui'\nimport { useEffect, useMemo, useRef } from 'react'\n\n/**\n * Shared logic for drawers that render their submit button in the drawer header.\n *\n * The header's `onClick` is defined outside the `Form` provider, so it cannot call\n * `useForm().submit()` directly. This hook owns a ref to the form's `submit` function,\n * which is populated from inside the form via `<RegisterFormSubmit submitRef={submitRef} />`.\n *\n * Returns the `headerActions` array to spread onto a `Drawer` and the `submitRef`\n * to pass to `RegisterFormSubmit`.\n */\nexport const useDrawerSubmit = () => {\n const { t } = useTranslation()\n const submitRef = useRef<(() => void) | null>(null)\n\n const headerActions = useMemo(\n () => [\n {\n label: t('fields:saveChanges'),\n onClick: () => submitRef.current?.(),\n style: 'primary' as const,\n },\n ],\n [t],\n )\n\n return { headerActions, submitRef }\n}\n\n/**\n * Mounts inside a `<Form>` to populate `submitRef` (from `useDrawerSubmit`) with the form's\n * `submit` function, allowing drawer header actions rendered outside the form's React tree\n * to trigger submission.\n */\nexport const RegisterFormSubmit: FC<{\n submitRef: React.RefObject<(() => void) | null>\n}> = ({ submitRef }) => {\n const { submit } = useForm()\n\n useEffect(() => {\n submitRef.current = () => void submit()\n return () => {\n submitRef.current = null\n }\n }, [submit, submitRef])\n\n return null\n}\n", "'use client'\nimport type { BaseSelection } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useModal } from '@payloadcms/ui'\nimport { $getPreviousSelection, $getSelection, $setSelection } from 'lexical'\nimport { useCallback, useEffect, useState } from 'react'\n\n/**\n *\n * Wrapper around useModal that restores and saves selection state (cursor position) when opening and closing the drawer.\n * By default, the lexical cursor position may be lost when opening a drawer and clicking somewhere on that drawer.\n */\nexport const useLexicalDrawer = (slug: string, restoreLate?: boolean) => {\n const [editor] = useLexicalComposerContext()\n const [selectionState, setSelectionState] = useState<BaseSelection | null>(null)\n const [wasOpen, setWasOpen] = useState<boolean>(false)\n\n const { closeModal: closeBaseModal, modalState, toggleModal: toggleBaseModal } = useModal()\n\n const storeSelection = useCallback(() => {\n editor.read(() => {\n const selection = $getSelection() ?? $getPreviousSelection()\n setSelectionState(selection)\n })\n }, [editor])\n\n const restoreSelection = useCallback(() => {\n if (selectionState) {\n editor.update(\n () => {\n $setSelection(selectionState.clone())\n },\n { discrete: true, skipTransforms: true },\n )\n }\n }, [editor, selectionState])\n\n const closeDrawer = useCallback(() => {\n //restoreSelection() // Should already be stored by the useEffect below\n closeBaseModal(slug)\n }, [closeBaseModal, slug])\n const isModalOpen = modalState?.[slug]?.isOpen\n\n const toggleDrawer = useCallback(() => {\n if (!isModalOpen) {\n storeSelection()\n } else {\n restoreSelection()\n }\n setWasOpen(true)\n toggleBaseModal(slug)\n }, [slug, storeSelection, toggleBaseModal, restoreSelection, isModalOpen])\n\n // We need to handle drawer closing via a useEffect, as toggleDrawer / closeDrawer will not be triggered if the drawer\n // is closed by clicking outside of the drawer. This useEffect will handle everything.\n useEffect(() => {\n if (!wasOpen) {\n return\n }\n\n const thisModalState = modalState[slug]\n // Exists in modalState (thus has opened at least once before) and is closed\n if (thisModalState && !thisModalState?.isOpen) {\n setWasOpen(false)\n\n if (restoreLate) {\n // restoreLate is used for upload extra field drawers. For some reason, the selection is not restored if we call restoreSelection immediately.\n setTimeout(() => {\n restoreSelection()\n }, 0)\n } else {\n restoreSelection()\n }\n }\n }, [modalState, slug, restoreSelection, wasOpen, restoreLate])\n\n return {\n closeDrawer,\n toggleDrawer,\n }\n}\n"],
5
- "mappings": "AAAA,OAAAA,KAAAC,MAAA,yBAIA,OAASC,WAAAA,EAASC,kBAAAA,MAAsB,iBACxC,OAASC,aAAAA,EAAoBC,UAAAA,MAAc,QAYpC,IAAMC,EAAkBA,IAAA,CAAA,IAAAC,EAAAN,EAAA,CAAA,EAC7B,CAAAO,EAAAA,CAAA,EAAcL,EAAA,EACdM,EAAkBJ,EAAA,IAA4B,EAAAK,EAAAH,EAAA,CAAA,IAAAC,GAKjCE,EAAAF,EAAE,oBAAA,EAAAD,EAAA,CAAA,EAAAC,EAAAD,EAAA,CAAA,EAAAG,GAAAA,EAAAH,EAAA,CAAA,EAAA,IAAAI,EAAAJ,EAAA,CAAA,IAAAK,OAAAC,IAAA,2BAAA,GACAF,EAAAA,IAAMF,EAAAK,UAAA,EAAiBP,EAAA,CAAA,EAAAI,GAAAA,EAAAJ,EAAA,CA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CAACpB,EAAYV,EAAMsB,EAAkBhB,EAASL,CAAA,EAAYC,EAAA,EAAA,EAAAQ,EAAAR,EAAA,EAAA,EAAAD,EAAAC,EAAA,EAAA,EAAAoB,EAAApB,EAAA,EAAA,EAAAF,EAAAE,EAAA,EAAA,EAAAI,EAAAJ,EAAA,EAAA,EAAA2B,EAAA3B,EAAA,EAAA,EAAA4B,IAAAD,EAAA3B,EAAA,EAAA,EAAA4B,EAAA5B,EAAA,EAAA,GAnB7DL,EAAUgC,EAmBPC,CAA0D,EAAA,IAAAG,EAAA,OAAA/B,EAAA,EAAA,IAAAsB,GAAAtB,EAAA,EAAA,IAAA0B,GAEtDK,EAAA,CAAAT,YAAAA,EAAAI,aAAAA,CAGP,EAAA1B,EAAA,EAAA,EAAAsB,EAAAtB,EAAA,EAAA,EAAA0B,EAAA1B,EAAA,EAAA,EAAA+B,GAAAA,EAAA/B,EAAA,EAAA,EAHO+B,CAGP",
6
6
  "names": ["c", "_c", "useForm", "useTranslation", "useEffect", "useRef", "useDrawerSubmit", "$", "t", "submitRef", "t0", "t1", "Symbol", "for", "current", "t2", "label", "onClick", "style", "headerActions", "t3", "RegisterFormSubmit", "submit", "c", "_c", "useLexicalComposerContext", "useModal", "$getPreviousSelection", "$getSelection", "$setSelection", "useEffect", "useState", "useLexicalDrawer", "slug", "restoreLate", "$", "editor", "selectionState", "setSelectionState", "wasOpen", "setWasOpen", "closeModal", "closeBaseModal", "modalState", "toggleModal", "toggleBaseModal", "t0", "read", "selection", "storeSelection", "t1", "update", "clone", "discrete", "skipTransforms", "restoreSelection", "t2", "closeDrawer", "isModalOpen", "isOpen", "t3", "toggleDrawer", "t4", "t5", "thisModalState", "setTimeout", "t6"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{a as E,b as U,e as P}from"./chunk-43E5QYAA.js";import{c as y}from"./chunk-5VIL27GI.js";import{a as L}from"./chunk-WSAPGI3Z.js";import{b as f}from"./chunk-RJ5MAOKZ.js";import{jsx as o,jsxs as g}from"react/jsx-runtime";import{useLexicalComposerContext as ae}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as le}from"@lexical/react/useLexicalEditable";import{getTranslation as T}from"@payloadcms/translations";import{Button as h,formatDrawerSlug as se,Pill as ie,Thumbnail as re,useConfig as ne,useEditDepth as de,usePayloadAPI as ce,useTranslation as ue}from"@payloadcms/ui";import{$getNodeByKey as F,$getSelection as me,$isNodeSelection as pe,$isRangeSelection as fe}from"lexical";import{formatAdminURL as ge,isImage as he}from"payload/shared";import{useCallback as _,useEffect as I,useId as _e,useReducer as we,useRef as be,useState as j}from"react";var k={depth:0},Ie=z=>{let{className:e,data:{fields:A,relationTo:w,value:c},format:B,nodeKey:l}=z;if(typeof c=="object")throw new Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:K},serverURL:M},getEntityConfig:O}=ne(),b=be(null),{uuid:W}=f(),H=de(),[s]=ae(),{editorConfig:q,fieldProps:{schemaPath:G}}=f(),u=le(),{i18n:D,t:n}=ue(),[S,m]=j(!1),[$,J]=we(a=>a+1,0),[i]=j(()=>O({collectionSlug:w})),Q=_e(),x=se({slug:"lexical-upload-drawer-"+W+Q,depth:H}),{toggleDrawer:V}=y(x,!0),{closeDocumentDrawer:C,DocumentDrawer:X,DocumentDrawerToggler:Y}=L({id:c,collectionSlug:i.slug}),[{data:t},{setParams:N}]=ce(ge({apiRoute:K,path:`/${i.slug}/${c}`,serverURL:M}),{initialParams:k}),v=t?.thumbnailURL||t?.url;I(()=>s.registerUpdateListener(({editorState:a})=>{a.read(()=>{let r=me();if(pe(r))m(r.has(l));else if(fe(r)){let d=r.getNodes();m(d.some(p=>p.getKey()===l))}else m(!1)})}),[s,l]),I(()=>{let a=b.current?.closest(`.${e}`);a&&a.classList.toggle(`${e}--selected`,S)},[S,e]);let Z=_(()=>{s.update(()=>{F(l)?.remove()})},[s,l]),ee=_(a=>{N({...k,cacheBust:$}),J(),C()},[N,$,C]),R=q?.resolvedFeatureMap?.get("upload")?.sanitizedClientFeatureProps.collections?.[i.slug]?.hasExtraFields,te=_((a,r)=>{s.update(()=>{let d=F(l);if(P(d)){let p={...d.getData(),fields:r};d.setData(p)}})},[s,l]),oe=v&&t?.width&&t?.height?t.width>t.height?"landscape":"portrait":"landscape";return g("div",{className:`${e}__contents ${e}__contents--${oe}`,"data-align":B||void 0,"data-filename":t?.filename,ref:b,children:[o("div",{className:`${e}__card`,children:g("div",{className:`${e}__media`,children:[o(re,{collectionSlug:w,fileSrc:he(t?.mimeType)?v:null,height:t?.height,size:"none",width:t?.width}),u&&g("div",{className:`${e}__floater`,"data-theme":"dark",children:[o(ie,{className:`${e}__collectionLabel`,pillStyle:"dark",size:"small",children:T(i.labels.singular,D)}),o(Y,{className:`${e}__doc-drawer-toggler`,children:o("span",{className:`${e}__filename`,children:t?.filename||n("general:untitled")})}),R?o(h,{buttonStyle:"ghost",className:`${e}__upload-drawer-toggler`,disabled:!u,el:"button",icon:"write",onClick:V,round:!0,size:"medium",tooltip:n("fields:editRelationship")}):null,o("div",{className:`${e}__divider`}),o(h,{buttonStyle:"ghost",className:`${e}__swap-drawer-toggler`,disabled:!u,el:"button",icon:"swap",onClick:()=>{s.dispatchCommand(U,{replace:{nodeKey:l}})},round:!0,size:"medium",tooltip:n("fields:swapUpload")}),o(h,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!u,icon:"x",onClick:a=>{a.preventDefault(),Z()},round:!0,size:"medium",tooltip:n("fields:removeUpload")})]})]})}),c?o(X,{onSave:ee}):null,R?o(E,{data:A,drawerSlug:x,drawerTitle:n("general:editLabel",{label:T(i.labels.singular,D)}),featureKey:"upload",handleDrawerSubmit:te,schemaPath:G,schemaPathSuffix:i.slug}):null]})};export{Ie as UploadComponent};
2
- //# sourceMappingURL=component-D5QLYS7W.js.map
1
+ "use client";import{a as E,b as U,e as P}from"./chunk-A7DZCL6D.js";import{c as y}from"./chunk-IYBYNEKX.js";import{a as L}from"./chunk-EA5BHQ2T.js";import{b as f}from"./chunk-RJ5MAOKZ.js";import{jsx as o,jsxs as g}from"react/jsx-runtime";import{useLexicalComposerContext as ae}from"@lexical/react/LexicalComposerContext.js";import{useLexicalEditable as le}from"@lexical/react/useLexicalEditable";import{getTranslation as T}from"@payloadcms/translations";import{Button as h,formatDrawerSlug as se,Pill as ie,Thumbnail as re,useConfig as ne,useEditDepth as de,usePayloadAPI as ce,useTranslation as ue}from"@payloadcms/ui";import{$getNodeByKey as F,$getSelection as me,$isNodeSelection as pe,$isRangeSelection as fe}from"lexical";import{formatAdminURL as ge,isImage as he}from"payload/shared";import{useCallback as _,useEffect as I,useId as _e,useReducer as we,useRef as be,useState as j}from"react";var k={depth:0},Ie=z=>{let{className:e,data:{fields:A,relationTo:w,value:c},format:B,nodeKey:l}=z;if(typeof c=="object")throw new Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:K},serverURL:M},getEntityConfig:O}=ne(),b=be(null),{uuid:W}=f(),H=de(),[s]=ae(),{editorConfig:q,fieldProps:{schemaPath:G}}=f(),u=le(),{i18n:D,t:n}=ue(),[S,m]=j(!1),[$,J]=we(a=>a+1,0),[i]=j(()=>O({collectionSlug:w})),Q=_e(),x=se({slug:"lexical-upload-drawer-"+W+Q,depth:H}),{toggleDrawer:V}=y(x,!0),{closeDocumentDrawer:C,DocumentDrawer:X,DocumentDrawerToggler:Y}=L({id:c,collectionSlug:i.slug}),[{data:t},{setParams:N}]=ce(ge({apiRoute:K,path:`/${i.slug}/${c}`,serverURL:M}),{initialParams:k}),v=t?.thumbnailURL||t?.url;I(()=>s.registerUpdateListener(({editorState:a})=>{a.read(()=>{let r=me();if(pe(r))m(r.has(l));else if(fe(r)){let d=r.getNodes();m(d.some(p=>p.getKey()===l))}else m(!1)})}),[s,l]),I(()=>{let a=b.current?.closest(`.${e}`);a&&a.classList.toggle(`${e}--selected`,S)},[S,e]);let Z=_(()=>{s.update(()=>{F(l)?.remove()})},[s,l]),ee=_(a=>{N({...k,cacheBust:$}),J(),C()},[N,$,C]),R=q?.resolvedFeatureMap?.get("upload")?.sanitizedClientFeatureProps.collections?.[i.slug]?.hasExtraFields,te=_((a,r)=>{s.update(()=>{let d=F(l);if(P(d)){let p={...d.getData(),fields:r};d.setData(p)}})},[s,l]),oe=v&&t?.width&&t?.height?t.width>t.height?"landscape":"portrait":"landscape";return g("div",{className:`${e}__contents ${e}__contents--${oe}`,"data-align":B||void 0,"data-filename":t?.filename,ref:b,children:[o("div",{className:`${e}__card`,children:g("div",{className:`${e}__media`,children:[o(re,{collectionSlug:w,fileSrc:he(t?.mimeType)?v:null,height:t?.height,size:"none",width:t?.width}),u&&g("div",{className:`${e}__floater`,"data-theme":"dark",children:[o(ie,{className:`${e}__collectionLabel`,pillStyle:"dark",size:"small",children:T(i.labels.singular,D)}),o(Y,{className:`${e}__doc-drawer-toggler`,children:o("span",{className:`${e}__filename`,children:t?.filename||n("general:untitled")})}),R?o(h,{buttonStyle:"ghost",className:`${e}__upload-drawer-toggler`,disabled:!u,el:"button",icon:"write",onClick:V,round:!0,size:"medium",tooltip:n("fields:editRelationship")}):null,o("div",{className:`${e}__divider`}),o(h,{buttonStyle:"ghost",className:`${e}__swap-drawer-toggler`,disabled:!u,el:"button",icon:"swap",onClick:()=>{s.dispatchCommand(U,{replace:{nodeKey:l}})},round:!0,size:"medium",tooltip:n("fields:swapUpload")}),o(h,{buttonStyle:"ghost",className:`${e}__removeButton`,disabled:!u,icon:"x",onClick:a=>{a.preventDefault(),Z()},round:!0,size:"medium",tooltip:n("fields:removeUpload")})]})]})}),c?o(X,{onSave:ee}):null,R?o(E,{data:A,drawerSlug:x,drawerTitle:n("general:editLabel",{label:T(i.labels.singular,D)}),featureKey:"upload",handleDrawerSubmit:te,schemaPath:G,schemaPathSuffix:i.slug}):null]})};export{Ie as UploadComponent};
2
+ //# sourceMappingURL=component-FCCSBBZG.js.map
@@ -0,0 +1,2 @@
1
+ "use client";import{b as a,c as b}from"./chunk-3V7KW5XF.js";import"./chunk-IYBYNEKX.js";import"./chunk-RJ5MAOKZ.js";export{b as InlineBlockComponent,a as useInlineBlockComponentContext};
2
+ //# sourceMappingURL=componentInline-7FQV2X7Z.js.map