@payloadcms/richtext-lexical 4.0.0-internal.c2b57ce → 4.0.0-internal.c6494b5

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 (1065) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts +1 -1
  3. package/dist/cell/rscEntry.d.ts.map +1 -1
  4. package/dist/cell/rscEntry.js +5 -5
  5. package/dist/cell/rscEntry.js.map +1 -1
  6. package/dist/exports/client/Field-W2ABOM7M.js +2 -0
  7. package/dist/exports/client/Field-W2ABOM7M.js.map +7 -0
  8. package/dist/exports/client/{RelationshipComponent-RZL743CS.js → RelationshipComponent-YCPAKOL7.js} +1 -1
  9. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  10. package/dist/exports/client/chunk-3LRZDIIG.js +2 -0
  11. package/dist/exports/client/chunk-3LRZDIIG.js.map +7 -0
  12. package/dist/exports/client/chunk-5VIL27GI.js +2 -0
  13. package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
  14. package/dist/exports/client/chunk-E6LSRRP2.js +2 -0
  15. package/dist/exports/client/chunk-E6LSRRP2.js.map +7 -0
  16. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  17. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  18. package/dist/exports/client/chunk-ZQX5HXUL.js +2 -0
  19. package/dist/exports/client/chunk-ZQX5HXUL.js.map +7 -0
  20. package/dist/exports/client/component-6DQLENIE.js +2 -0
  21. package/dist/exports/client/component-6DQLENIE.js.map +7 -0
  22. package/dist/exports/client/componentInline-HNE5G4TE.js +2 -0
  23. package/dist/exports/client/index.d.ts +1 -2
  24. package/dist/exports/client/index.d.ts.map +1 -1
  25. package/dist/exports/client/index.js +28 -29
  26. package/dist/exports/client/index.js.map +4 -4
  27. package/dist/exports/react/index.d.ts +1 -1
  28. package/dist/exports/react/index.d.ts.map +1 -1
  29. package/dist/exports/react/index.js.map +1 -1
  30. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  31. package/dist/features/blockquote/client/index.js +2 -2
  32. package/dist/features/blockquote/client/index.js.map +1 -1
  33. package/dist/features/blockquote/server/index.d.ts +1 -4
  34. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  35. package/dist/features/blockquote/server/index.js +4 -2
  36. package/dist/features/blockquote/server/index.js.map +1 -1
  37. package/dist/features/blockquote/server/schema.d.ts +8 -0
  38. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  39. package/dist/features/blockquote/server/schema.js +15 -0
  40. package/dist/features/blockquote/server/schema.js.map +1 -0
  41. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  42. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  43. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  44. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  45. package/dist/features/blocks/client/component/index.css +2 -2
  46. package/dist/features/blocks/client/component/index.d.ts +3 -8
  47. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  48. package/dist/features/blocks/client/component/index.js +181 -105
  49. package/dist/features/blocks/client/component/index.js.map +1 -1
  50. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  51. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  52. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  53. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  54. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  55. package/dist/features/blocks/client/componentInline/index.css +8 -9
  56. package/dist/features/blocks/client/componentInline/index.d.ts +3 -2
  57. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  58. package/dist/features/blocks/client/componentInline/index.js +45 -29
  59. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  60. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  61. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  62. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  63. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  64. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  65. package/dist/features/blocks/client/index.d.ts.map +1 -1
  66. package/dist/features/blocks/client/index.js +4 -2
  67. package/dist/features/blocks/client/index.js.map +1 -1
  68. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  69. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  70. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  71. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  72. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  73. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  74. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  75. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  76. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  77. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  78. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  79. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  80. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  81. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  82. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  83. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  84. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  85. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  86. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  87. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  88. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  89. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  90. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  91. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +1 -0
  92. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  93. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  94. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  95. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  96. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  97. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  98. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  99. package/dist/features/blocks/server/index.d.ts +1 -0
  100. package/dist/features/blocks/server/index.d.ts.map +1 -1
  101. package/dist/features/blocks/server/index.js +26 -74
  102. package/dist/features/blocks/server/index.js.map +1 -1
  103. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  104. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  105. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  106. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  107. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  108. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  109. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  110. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  111. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  112. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  113. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  114. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  115. package/dist/features/blocks/server/schema.d.ts +47 -0
  116. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  117. package/dist/features/blocks/server/schema.js +138 -0
  118. package/dist/features/blocks/server/schema.js.map +1 -0
  119. package/dist/features/blocks/server/validate.d.ts +1 -2
  120. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  121. package/dist/features/blocks/server/validate.js +1 -1
  122. package/dist/features/blocks/server/validate.js.map +1 -1
  123. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  124. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  125. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  129. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  131. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  132. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  134. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  135. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  137. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  138. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  140. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  141. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  143. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  144. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  145. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  146. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  147. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  149. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  150. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  151. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  152. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  153. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  155. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  156. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  157. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  159. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  161. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  162. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  163. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  165. package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
  166. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  168. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  170. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  171. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  173. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  174. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  175. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  176. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  177. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  178. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  179. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  180. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  182. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  183. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  185. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  186. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  188. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  189. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  190. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  191. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  192. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  193. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  194. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  195. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  196. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  197. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  198. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  199. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  200. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  201. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  202. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  203. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  204. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  205. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  206. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  207. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  208. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  209. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  210. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  211. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
  212. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  213. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
  215. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  216. package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
  217. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  218. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  219. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  220. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  221. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  222. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  223. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  224. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  225. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  226. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  227. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  228. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  229. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  230. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  231. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  232. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  233. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  234. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  235. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  236. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  237. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  238. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  239. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  240. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  241. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  242. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  243. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  244. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  245. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  246. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  247. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  248. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  249. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  250. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  251. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  252. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  253. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  254. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  255. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  256. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  257. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  258. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  259. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  260. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
  261. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  262. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  263. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  264. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  265. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  266. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  267. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
  268. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  269. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  270. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  271. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  272. package/dist/features/converters/markdownToLexical/index.js +5 -2
  273. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  274. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  275. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  276. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  277. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  278. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  279. package/dist/features/format/bold/feature.client.js +1 -1
  280. package/dist/features/format/bold/feature.client.js.map +1 -1
  281. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  282. package/dist/features/format/bold/feature.server.js +1 -1
  283. package/dist/features/format/bold/feature.server.js.map +1 -1
  284. package/dist/features/format/inlineCode/feature.client.js +1 -1
  285. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  286. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  287. package/dist/features/format/inlineCode/feature.server.js +1 -1
  288. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  289. package/dist/features/format/italic/feature.client.js +1 -1
  290. package/dist/features/format/italic/feature.client.js.map +1 -1
  291. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  292. package/dist/features/format/italic/feature.server.js +1 -1
  293. package/dist/features/format/italic/feature.server.js.map +1 -1
  294. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  295. package/dist/features/format/strikethrough/feature.client.js +1 -1
  296. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  297. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  298. package/dist/features/format/strikethrough/feature.server.js +1 -1
  299. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  300. package/dist/features/heading/client/index.js +2 -2
  301. package/dist/features/heading/client/index.js.map +1 -1
  302. package/dist/features/heading/constants.d.ts +2 -0
  303. package/dist/features/heading/constants.d.ts.map +1 -0
  304. package/dist/features/heading/constants.js +2 -0
  305. package/dist/features/heading/constants.js.map +1 -0
  306. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  307. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  308. package/dist/features/heading/markdownTransformer.js +6 -19
  309. package/dist/features/heading/markdownTransformer.js.map +1 -1
  310. package/dist/features/heading/server/index.d.ts +2 -4
  311. package/dist/features/heading/server/index.d.ts.map +1 -1
  312. package/dist/features/heading/server/index.js +9 -3
  313. package/dist/features/heading/server/index.js.map +1 -1
  314. package/dist/features/heading/server/schema.d.ts +10 -0
  315. package/dist/features/heading/server/schema.d.ts.map +1 -0
  316. package/dist/features/heading/server/schema.js +37 -0
  317. package/dist/features/heading/server/schema.js.map +1 -0
  318. package/dist/features/heading/server/validate.d.ts +6 -0
  319. package/dist/features/heading/server/validate.d.ts.map +1 -0
  320. package/dist/features/heading/server/validate.js +15 -0
  321. package/dist/features/heading/server/validate.js.map +1 -0
  322. package/dist/features/horizontalRule/client/index.js +2 -2
  323. package/dist/features/horizontalRule/client/index.js.map +1 -1
  324. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  325. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  326. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  327. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  328. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +13 -3
  329. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  330. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  331. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  332. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  333. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  334. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  335. package/dist/features/horizontalRule/server/index.js +4 -2
  336. package/dist/features/horizontalRule/server/index.js.map +1 -1
  337. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  338. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  339. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  340. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  341. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +2 -6
  342. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  343. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  344. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  345. package/dist/features/horizontalRule/server/schema.d.ts +8 -0
  346. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  347. package/dist/features/horizontalRule/server/schema.js +26 -0
  348. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  349. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  350. package/dist/features/indent/client/IndentPlugin.js +122 -1
  351. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  352. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  353. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  354. package/dist/features/indent/server/i18n.js +74 -37
  355. package/dist/features/indent/server/i18n.js.map +1 -1
  356. package/dist/features/link/client/index.d.ts.map +1 -1
  357. package/dist/features/link/client/index.js +2 -2
  358. package/dist/features/link/client/index.js.map +1 -1
  359. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  360. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  361. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  362. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  363. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +11 -8
  364. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  365. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -13
  366. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  367. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  368. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  369. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  370. package/dist/features/link/markdownTransformer.d.ts +5 -5
  371. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  372. package/dist/features/link/markdownTransformer.js +2 -2
  373. package/dist/features/link/markdownTransformer.js.map +1 -1
  374. package/dist/features/link/nodes/AutoLinkNode.d.ts +4 -4
  375. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  376. package/dist/features/link/nodes/AutoLinkNode.js +4 -11
  377. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  378. package/dist/features/link/nodes/LinkNode.d.ts +4 -4
  379. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  380. package/dist/features/link/nodes/LinkNode.js +4 -16
  381. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  382. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  383. package/dist/features/link/server/baseFields.js.map +1 -1
  384. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  385. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  386. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  387. package/dist/features/link/server/index.d.ts +2 -1
  388. package/dist/features/link/server/index.d.ts.map +1 -1
  389. package/dist/features/link/server/index.js +7 -4
  390. package/dist/features/link/server/index.js.map +1 -1
  391. package/dist/features/link/server/schema.d.ts +32 -0
  392. package/dist/features/link/server/schema.d.ts.map +1 -0
  393. package/dist/features/link/server/schema.js +171 -0
  394. package/dist/features/link/server/schema.js.map +1 -0
  395. package/dist/features/link/server/validate.d.ts +1 -1
  396. package/dist/features/link/server/validate.d.ts.map +1 -1
  397. package/dist/features/link/server/validate.js +1 -1
  398. package/dist/features/link/server/validate.js.map +1 -1
  399. package/dist/features/lists/checklist/client/index.js +1 -1
  400. package/dist/features/lists/checklist/client/index.js.map +1 -1
  401. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  402. package/dist/features/lists/checklist/server/index.js +9 -3
  403. package/dist/features/lists/checklist/server/index.js.map +1 -1
  404. package/dist/features/lists/orderedList/client/index.js +1 -1
  405. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  406. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  407. package/dist/features/lists/orderedList/server/index.js +9 -3
  408. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  409. package/dist/features/lists/plugin/index.d.ts +0 -9
  410. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  411. package/dist/features/lists/plugin/index.js.map +1 -1
  412. package/dist/features/lists/shared/constants.d.ts +2 -0
  413. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  414. package/dist/features/lists/shared/constants.js +2 -0
  415. package/dist/features/lists/shared/constants.js.map +1 -0
  416. package/dist/features/lists/shared/schema.d.ts +18 -0
  417. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  418. package/dist/features/lists/shared/schema.js +62 -0
  419. package/dist/features/lists/shared/schema.js.map +1 -0
  420. package/dist/features/lists/shared/validate.d.ts +5 -0
  421. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  422. package/dist/features/lists/shared/validate.js +15 -0
  423. package/dist/features/lists/shared/validate.js.map +1 -0
  424. package/dist/features/lists/unorderedList/client/index.js +1 -1
  425. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  426. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  427. package/dist/features/lists/unorderedList/server/index.js +9 -3
  428. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  429. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  430. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  431. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  432. package/dist/features/relationship/client/components/index.css +3 -6
  433. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  434. package/dist/features/relationship/client/index.d.ts +2 -2
  435. package/dist/features/relationship/client/index.d.ts.map +1 -1
  436. package/dist/features/relationship/client/index.js.map +1 -1
  437. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  438. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  439. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  440. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  441. package/dist/features/relationship/client/plugins/index.d.ts +3 -3
  442. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  443. package/dist/features/relationship/client/plugins/index.js +27 -31
  444. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  445. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  446. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  447. package/dist/features/relationship/client/utils/useEnabledRelationships.js +52 -50
  448. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  449. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +3 -3
  450. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  451. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  452. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  453. package/dist/features/relationship/server/index.d.ts +9 -1
  454. package/dist/features/relationship/server/index.d.ts.map +1 -1
  455. package/dist/features/relationship/server/index.js +30 -11
  456. package/dist/features/relationship/server/index.js.map +1 -1
  457. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  458. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  459. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  460. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  461. package/dist/features/relationship/server/schema.d.ts +29 -0
  462. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  463. package/dist/features/relationship/server/schema.js +94 -0
  464. package/dist/features/relationship/server/schema.js.map +1 -0
  465. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +18 -0
  466. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  467. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +30 -0
  468. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  469. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  470. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  471. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  472. package/dist/features/table/client/index.d.ts.map +1 -0
  473. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  474. package/dist/features/table/client/index.js.map +1 -0
  475. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  476. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  477. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  478. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  479. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +4 -5
  480. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  481. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  482. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  483. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  484. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +41 -18
  485. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  486. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  487. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  488. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +1 -4
  489. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  490. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  491. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  492. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  493. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  494. package/dist/features/table/client/utils/debounce.js.map +1 -0
  495. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  496. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  497. package/dist/features/table/markdownTransformer.d.ts +5 -0
  498. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  499. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  500. package/dist/features/table/markdownTransformer.js.map +1 -0
  501. package/dist/features/table/server/index.d.ts +3 -0
  502. package/dist/features/table/server/index.d.ts.map +1 -0
  503. package/dist/features/{experimental_table → table}/server/index.js +10 -6
  504. package/dist/features/table/server/index.js.map +1 -0
  505. package/dist/features/table/server/schema.d.ts +27 -0
  506. package/dist/features/table/server/schema.d.ts.map +1 -0
  507. package/dist/features/table/server/schema.js +107 -0
  508. package/dist/features/table/server/schema.js.map +1 -0
  509. package/dist/features/textState/feature.client.js +1 -1
  510. package/dist/features/textState/feature.client.js.map +1 -1
  511. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  512. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  513. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  514. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  515. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  516. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  517. package/dist/features/toolbars/fixed/client/Toolbar/index.js +19 -1
  518. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  519. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  520. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  521. package/dist/features/toolbars/inline/client/Toolbar/index.js +17 -2
  522. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  523. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  524. package/dist/features/toolbars/shared/ToolbarButton/index.js +1 -0
  525. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  526. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  527. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +85 -32
  528. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  529. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +23 -25
  530. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  531. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  532. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  533. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  534. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +79 -0
  535. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  536. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  537. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  538. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  539. package/dist/features/toolbars/types.d.ts +1 -1
  540. package/dist/features/toolbars/types.d.ts.map +1 -1
  541. package/dist/features/toolbars/types.js.map +1 -1
  542. package/dist/features/typesClient.d.ts +2 -2
  543. package/dist/features/typesClient.d.ts.map +1 -1
  544. package/dist/features/typesClient.js.map +1 -1
  545. package/dist/features/typesServer.d.ts +35 -53
  546. package/dist/features/typesServer.d.ts.map +1 -1
  547. package/dist/features/typesServer.js.map +1 -1
  548. package/dist/features/upload/client/component/index.css +18 -26
  549. package/dist/features/upload/client/component/index.d.ts +1 -1
  550. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  551. package/dist/features/upload/client/component/index.js +3 -2
  552. package/dist/features/upload/client/component/index.js.map +1 -1
  553. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  554. package/dist/features/upload/client/index.d.ts +3 -2
  555. package/dist/features/upload/client/index.d.ts.map +1 -1
  556. package/dist/features/upload/client/index.js.map +1 -1
  557. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  558. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  559. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  560. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  561. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  562. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  563. package/dist/features/upload/client/plugin/index.js +53 -56
  564. package/dist/features/upload/client/plugin/index.js.map +1 -1
  565. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +3 -3
  566. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  567. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  568. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  569. package/dist/features/upload/server/index.d.ts +7 -2
  570. package/dist/features/upload/server/index.d.ts.map +1 -1
  571. package/dist/features/upload/server/index.js +25 -20
  572. package/dist/features/upload/server/index.js.map +1 -1
  573. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  574. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  575. package/dist/features/upload/server/markdownTransformer.js +1 -1
  576. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  577. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  578. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  579. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  580. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  581. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  582. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  583. package/dist/features/upload/server/schema.d.ts +40 -0
  584. package/dist/features/upload/server/schema.d.ts.map +1 -0
  585. package/dist/features/upload/server/schema.js +147 -0
  586. package/dist/features/upload/server/schema.js.map +1 -0
  587. package/dist/features/upload/server/validate.d.ts +3 -3
  588. package/dist/features/upload/server/validate.d.ts.map +1 -1
  589. package/dist/features/upload/server/validate.js +4 -1
  590. package/dist/features/upload/server/validate.js.map +1 -1
  591. package/dist/field/Diff/converters/link.d.ts +1 -1
  592. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  593. package/dist/field/Diff/converters/link.js.map +1 -1
  594. package/dist/field/Diff/converters/listitem/index.css +44 -8
  595. package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
  596. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  597. package/dist/field/Diff/converters/listitem/index.js +2 -1
  598. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  599. package/dist/field/Diff/converters/relationship/index.css +75 -36
  600. package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
  601. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  602. package/dist/field/Diff/converters/relationship/index.js +10 -28
  603. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  604. package/dist/field/Diff/converters/unknown/index.css +1 -2
  605. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  606. package/dist/field/Diff/converters/upload/index.css +105 -43
  607. package/dist/field/Diff/converters/upload/index.d.ts +1 -1
  608. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  609. package/dist/field/Diff/converters/upload/index.js +6 -2
  610. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  611. package/dist/field/Diff/index.css +114 -61
  612. package/dist/field/Diff/index.d.ts +3 -2
  613. package/dist/field/Diff/index.d.ts.map +1 -1
  614. package/dist/field/Diff/index.js +3 -2
  615. package/dist/field/Diff/index.js.map +1 -1
  616. package/dist/field/Field.d.ts +1 -1
  617. package/dist/field/Field.d.ts.map +1 -1
  618. package/dist/field/Field.js +26 -16
  619. package/dist/field/Field.js.map +1 -1
  620. package/dist/field/RenderLexical/index.d.ts +5 -3
  621. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  622. package/dist/field/RenderLexical/index.js +23 -23
  623. package/dist/field/RenderLexical/index.js.map +1 -1
  624. package/dist/field/RichTextViewProvider.d.ts +1 -1
  625. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  626. package/dist/field/RichTextViewProvider.js.map +1 -1
  627. package/dist/field/ViewSelector.css +1 -1
  628. package/dist/field/ViewSelector.d.ts.map +1 -1
  629. package/dist/field/ViewSelector.js +1 -0
  630. package/dist/field/ViewSelector.js.map +1 -1
  631. package/dist/field/bundled.css +1 -1
  632. package/dist/field/index.css +15 -16
  633. package/dist/field/index.d.ts +1 -1
  634. package/dist/field/index.d.ts.map +1 -1
  635. package/dist/field/index.js +1 -1
  636. package/dist/field/index.js.map +1 -1
  637. package/dist/field/rscEntry.d.ts +2 -2
  638. package/dist/field/rscEntry.d.ts.map +1 -1
  639. package/dist/field/rscEntry.js +2 -0
  640. package/dist/field/rscEntry.js.map +1 -1
  641. package/dist/hooks.d.ts +6 -0
  642. package/dist/hooks.d.ts.map +1 -0
  643. package/dist/hooks.js +548 -0
  644. package/dist/hooks.js.map +1 -0
  645. package/dist/i18n.d.ts.map +1 -1
  646. package/dist/i18n.js +68 -0
  647. package/dist/i18n.js.map +1 -1
  648. package/dist/index.d.ts +15 -12
  649. package/dist/index.d.ts.map +1 -1
  650. package/dist/index.js +37 -624
  651. package/dist/index.js.map +1 -1
  652. package/dist/lexical/LexicalEditor.css +30 -19
  653. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  654. package/dist/lexical/LexicalEditor.js +61 -64
  655. package/dist/lexical/LexicalEditor.js.map +1 -1
  656. package/dist/lexical/LexicalProvider.d.ts +1 -1
  657. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  658. package/dist/lexical/LexicalProvider.js.map +1 -1
  659. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  660. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  661. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  662. package/dist/lexical/config/client/loader.d.ts +1 -1
  663. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  664. package/dist/lexical/config/client/loader.js +5 -1
  665. package/dist/lexical/config/client/loader.js.map +1 -1
  666. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  667. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  668. package/dist/lexical/config/client/sanitize.js.map +1 -1
  669. package/dist/lexical/config/server/loader.d.ts +1 -1
  670. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  671. package/dist/lexical/config/server/loader.js +2 -2
  672. package/dist/lexical/config/server/loader.js.map +1 -1
  673. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  674. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  675. package/dist/lexical/config/server/sanitize.js +11 -13
  676. package/dist/lexical/config/server/sanitize.js.map +1 -1
  677. package/dist/lexical/config/types.d.ts +1 -1
  678. package/dist/lexical/config/types.d.ts.map +1 -1
  679. package/dist/lexical/config/types.js.map +1 -1
  680. package/dist/lexical/nodes/index.d.ts +1 -1
  681. package/dist/lexical/nodes/index.d.ts.map +1 -1
  682. package/dist/lexical/nodes/index.js.map +1 -1
  683. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  684. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  685. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  686. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  687. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  688. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  689. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  690. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  691. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  692. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  693. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  694. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  695. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  696. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  697. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  698. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  699. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +2 -21
  700. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  701. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  702. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  703. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  704. package/dist/lexical/plugins/SlashMenu/index.css +1 -7
  705. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +2 -1
  706. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  707. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  708. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  709. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +5 -3
  710. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  711. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +17 -3
  712. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  713. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  714. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  715. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +65 -0
  716. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  717. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  718. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  719. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  720. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  721. package/dist/lexical/theme/EditorTheme.css +18 -21
  722. package/dist/lexical/ui/ContentEditable.css +22 -17
  723. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  724. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  725. package/dist/lexical/ui/ContentEditable.js +32 -11
  726. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  727. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  728. package/dist/lexical/ui/icons/H3/index.js +13 -6
  729. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  730. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  731. package/dist/lexical/ui/icons/H4/index.js +13 -6
  732. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  733. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  734. package/dist/lexical/ui/icons/H5/index.js +13 -6
  735. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  736. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  737. package/dist/lexical/ui/icons/H6/index.js +13 -6
  738. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  739. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  740. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  741. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  742. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  743. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  744. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  745. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  746. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  747. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  748. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  749. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  750. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  751. package/dist/lexical/utils/point.d.ts.map +1 -1
  752. package/dist/lexical/utils/rect.d.ts.map +1 -1
  753. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  754. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  755. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  756. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  757. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  758. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  759. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  760. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  761. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  762. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  763. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  764. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  765. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  766. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  767. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  768. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  769. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  770. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  771. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  772. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  773. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  774. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  775. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  776. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  777. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  778. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  779. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  780. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  781. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  782. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  783. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  784. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  785. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  786. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  787. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  788. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  789. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  790. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  791. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  792. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  793. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  794. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  795. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  796. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  797. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  798. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  799. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  800. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  801. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  802. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  803. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  804. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  805. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  806. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  807. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  808. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  809. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  810. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  811. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  812. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  813. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  814. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  815. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  816. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  817. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  818. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  819. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  820. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  821. package/dist/presets/llmInstructions.d.ts +2 -0
  822. package/dist/presets/llmInstructions.d.ts.map +1 -0
  823. package/dist/presets/llmInstructions.js +13 -0
  824. package/dist/presets/llmInstructions.js.map +1 -0
  825. package/dist/types/builtInNodes.d.ts +14 -0
  826. package/dist/types/builtInNodes.d.ts.map +1 -0
  827. package/dist/types/builtInNodes.js +208 -0
  828. package/dist/types/builtInNodes.js.map +1 -0
  829. package/dist/{types.d.ts → types/index.d.ts} +29 -33
  830. package/dist/types/index.d.ts.map +1 -0
  831. package/dist/types/index.js +2 -0
  832. package/dist/types/index.js.map +1 -0
  833. package/dist/types/jsonSchemaHelpers.d.ts +34 -0
  834. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  835. package/dist/types/jsonSchemaHelpers.js +63 -0
  836. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  837. package/dist/types/nodeTypes.d.ts +133 -0
  838. package/dist/types/nodeTypes.d.ts.map +1 -0
  839. package/dist/types/nodeTypes.js +6 -0
  840. package/dist/types/nodeTypes.js.map +1 -0
  841. package/dist/types/schema.d.ts +6 -0
  842. package/dist/types/schema.d.ts.map +1 -0
  843. package/dist/types/schema.js +90 -0
  844. package/dist/types/schema.js.map +1 -0
  845. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  846. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  847. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  848. package/dist/utilities/buildEditorState.d.ts +18 -4
  849. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  850. package/dist/utilities/buildEditorState.js +8 -0
  851. package/dist/utilities/buildEditorState.js.map +1 -1
  852. package/dist/utilities/buildInitialState.d.ts +4 -2
  853. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  854. package/dist/utilities/buildInitialState.js +1 -0
  855. package/dist/utilities/buildInitialState.js.map +1 -1
  856. package/dist/utilities/createClientFeature.d.ts +1 -1
  857. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  858. package/dist/utilities/createClientFeature.js.map +1 -1
  859. package/dist/utilities/createServerFeature.d.ts +1 -1
  860. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  861. package/dist/utilities/createServerFeature.js +2 -2
  862. package/dist/utilities/createServerFeature.js.map +1 -1
  863. package/dist/utilities/editorConfigFactory.d.ts +7 -7
  864. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  865. package/dist/utilities/editorConfigFactory.js +9 -9
  866. package/dist/utilities/editorConfigFactory.js.map +1 -1
  867. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  868. package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
  869. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  870. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  871. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  872. package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
  873. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  874. package/dist/utilities/fieldsDrawer/index.css +12 -0
  875. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  876. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  877. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  878. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  879. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  880. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  881. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  882. package/dist/utilities/generateImportMap.d.ts +3 -3
  883. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  884. package/dist/utilities/generateImportMap.js.map +1 -1
  885. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  886. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  887. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  888. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  889. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  890. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  891. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  892. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  893. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  894. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  895. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  896. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  897. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  898. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  899. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  900. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  901. package/dist/validate/hasText.d.ts +2 -2
  902. package/dist/validate/hasText.d.ts.map +1 -1
  903. package/dist/validate/hasText.js.map +1 -1
  904. package/dist/validate/index.d.ts +1 -1
  905. package/dist/validate/index.d.ts.map +1 -1
  906. package/package.json +99 -30
  907. package/dist/dependencyChecker.spec.js +0 -16
  908. package/dist/dependencyChecker.spec.js.map +0 -1
  909. package/dist/exports/client/Field-VMNLDBRS.js +0 -2
  910. package/dist/exports/client/Field-VMNLDBRS.js.map +0 -7
  911. package/dist/exports/client/RelationshipComponent-RZL743CS.js.map +0 -7
  912. package/dist/exports/client/bundled.css +0 -1
  913. package/dist/exports/client/chunk-74RUDY7K.js +0 -2
  914. package/dist/exports/client/chunk-74RUDY7K.js.map +0 -7
  915. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  916. package/dist/exports/client/chunk-FTT5KJ6W.js +0 -12
  917. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  918. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  919. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  920. package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
  921. package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
  922. package/dist/exports/client/component-2ZTDKRVK.js +0 -2
  923. package/dist/exports/client/component-2ZTDKRVK.js.map +0 -7
  924. package/dist/exports/client/componentInline-JYKBUUPZ.js +0 -2
  925. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  926. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  927. package/dist/features/blockquote/markdownTransformer.js +0 -33
  928. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  929. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  930. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  931. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  932. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  933. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  934. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  935. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  936. package/dist/features/experimental_table/client/index.js.map +0 -1
  937. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  938. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  939. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  940. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  941. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  942. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  943. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  944. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  945. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  946. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  947. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  948. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  949. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  950. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  951. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  952. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  953. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  954. package/dist/features/experimental_table/server/index.d.ts +0 -8
  955. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  956. package/dist/features/experimental_table/server/index.js.map +0 -1
  957. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  958. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  959. package/dist/features/format/bold/markdownTransformers.js +0 -23
  960. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  961. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  962. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  963. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  964. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  965. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  966. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  967. package/dist/features/format/italic/markdownTransformers.js +0 -12
  968. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  969. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  970. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  971. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  972. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  973. package/dist/features/link/markdownTransformer.spec.js +0 -195
  974. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  975. package/dist/features/link/nodes/types.d.ts +0 -27
  976. package/dist/features/link/nodes/types.d.ts.map +0 -1
  977. package/dist/features/link/nodes/types.js +0 -2
  978. package/dist/features/link/nodes/types.js.map +0 -1
  979. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  980. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  981. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  982. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  983. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  984. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  985. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  986. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  987. package/dist/features/lists/shared/markdown.d.ts +0 -6
  988. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  989. package/dist/features/lists/shared/markdown.js +0 -57
  990. package/dist/features/lists/shared/markdown.js.map +0 -1
  991. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  992. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  993. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  994. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  995. package/dist/lexical/utils/guard.d.ts +0 -5
  996. package/dist/lexical/utils/guard.d.ts.map +0 -1
  997. package/dist/lexical/utils/guard.js +0 -9
  998. package/dist/lexical/utils/guard.js.map +0 -1
  999. package/dist/lexical/utils/url.spec.js +0 -114
  1000. package/dist/lexical/utils/url.spec.js.map +0 -1
  1001. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  1002. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  1003. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  1004. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  1005. package/dist/nodeTypes.d.ts +0 -74
  1006. package/dist/nodeTypes.d.ts.map +0 -1
  1007. package/dist/nodeTypes.js +0 -5
  1008. package/dist/nodeTypes.js.map +0 -1
  1009. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  1010. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  1011. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  1012. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  1013. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  1014. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  1015. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  1016. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  1017. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  1018. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  1019. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  1020. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  1021. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  1022. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  1023. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  1024. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  1025. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  1026. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  1027. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  1028. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  1029. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  1030. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  1031. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  1032. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  1033. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  1034. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  1035. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  1036. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  1037. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  1038. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  1039. package/dist/packages/@lexical/markdown/index.js +0 -39
  1040. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  1041. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  1042. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  1043. package/dist/packages/@lexical/markdown/utils.js +0 -267
  1044. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  1045. package/dist/types.d.ts.map +0 -1
  1046. package/dist/types.js +0 -2
  1047. package/dist/types.js.map +0 -1
  1048. package/dist/utilities/jsx/jsx.spec.js +0 -178
  1049. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  1050. /package/dist/exports/client/{componentInline-JYKBUUPZ.js.map → componentInline-HNE5G4TE.js.map} +0 -0
  1051. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  1052. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  1053. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  1054. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  1055. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  1056. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  1057. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  1058. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  1059. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  1060. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  1061. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +0 -0
  1062. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  1063. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  1064. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  1065. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
@@ -1,10 +1,11 @@
1
- import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations';
1
+ import type { Transformer } from '@lexical/markdown';
2
+ import type { GenericLanguages, I18nClient } from '@payloadcms/translations';
2
3
  import type { JSONSchema4 } from 'json-schema';
3
4
  import type { Klass, LexicalNode, LexicalNodeReplacement, SerializedEditorState, SerializedLexicalNode } from 'lexical';
4
- import type { Field, FieldSchemaMap, ImportMapGenerators, JsonObject, PayloadComponent, PayloadRequest, PopulateType, ReplaceAny, RequestContext, RichTextField, RichTextHooks, SanitizedConfig, TypedFallbackLocale, ValidateOptions, ValidationFieldError } from 'payload';
5
+ import type { Field, FieldOperation, FieldSchemaMap, FieldsToJSONSchemaArgs, ImportMapGenerators, JsonObject, PayloadComponent, PayloadRequest, PopulateType, ReplaceAny, RequestContext, RichTextField, RichTextHooks, SanitizedConfig, TypedFallbackLocale, ValidateOptions, ValidationFieldError } from 'payload';
5
6
  import type { ServerEditorConfig } from '../lexical/config/types.js';
6
- import type { Transformer } from '../packages/@lexical/markdown/index.js';
7
- import type { LexicalRichTextField } from '../types.js';
7
+ import type { LexicalRichTextField } from '../types/index.js';
8
+ import type { ElementNodeSchemaFn } from '../types/jsonSchemaHelpers.js';
8
9
  import type { BaseClientFeatureProps } from './typesClient.js';
9
10
  export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = (args: {
10
11
  context: RequestContext;
@@ -57,7 +58,7 @@ export type FeatureProviderServer<UnSanitizedServerFeatureProps = undefined, Ser
57
58
  parentIsLocalized: boolean;
58
59
  resolvedFeatures: ResolvedServerFeatureMap;
59
60
  unSanitizedEditorConfig: ServerEditorConfig;
60
- }) => Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>> | ServerFeature<ServerFeatureProps, ClientFeatureProps>) | ServerFeature<ServerFeatureProps, ClientFeatureProps>;
61
+ }) => ServerFeature<ServerFeatureProps, ClientFeatureProps>) | ServerFeature<ServerFeatureProps, ClientFeatureProps>;
61
62
  key: string;
62
63
  /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */
63
64
  serverFeatureProps: UnSanitizedServerFeatureProps;
@@ -115,7 +116,7 @@ export type AfterChangeNodeHookArgs<T extends SerializedLexicalNode> = {
115
116
  };
116
117
  export type BeforeValidateNodeHookArgs<T extends SerializedLexicalNode> = {
117
118
  /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */
118
- operation: 'create' | 'delete' | 'read' | 'update';
119
+ operation: FieldOperation;
119
120
  /** The value of the node before any changes. Not available in afterRead hooks */
120
121
  originalNode: T;
121
122
  overrideAccess: boolean;
@@ -127,7 +128,7 @@ export type BeforeChangeNodeHookArgs<T extends SerializedLexicalNode> = {
127
128
  errors: ValidationFieldError[];
128
129
  mergeLocaleActions: (() => Promise<void> | void)[];
129
130
  /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */
130
- operation: 'create' | 'delete' | 'read' | 'update';
131
+ operation: FieldOperation;
131
132
  /** The value of the node before any changes. Not available in afterRead hooks */
132
133
  originalNode: T;
133
134
  /**
@@ -150,6 +151,18 @@ export type AfterReadNodeHook<T extends SerializedLexicalNode> = (args: AfterRea
150
151
  export type AfterChangeNodeHook<T extends SerializedLexicalNode> = (args: AfterChangeNodeHookArgs<T> & BaseNodeHookArgs<T>) => Promise<T> | T;
151
152
  export type BeforeChangeNodeHook<T extends SerializedLexicalNode> = (args: BaseNodeHookArgs<T> & BeforeChangeNodeHookArgs<T>) => Promise<T> | T;
152
153
  export type BeforeValidateNodeHook<T extends SerializedLexicalNode> = (args: BaseNodeHookArgs<T> & BeforeValidateNodeHookArgs<T>) => Promise<T> | T;
154
+ /** Arguments passed to each node's `jsonSchema` function. */
155
+ export type JSONSchemaArgs = {
156
+ elementNodeSchema: ElementNodeSchemaFn;
157
+ field: LexicalRichTextField;
158
+ /** TS name of the node union - use in `tsType` annotations. */
159
+ nodeUnionName: string;
160
+ } & Pick<FieldsToJSONSchemaArgs, 'collectionIDFieldTypes' | 'config' | 'i18n' | 'interfaceNameDefinitions' | 'typeStringDefinitions' | 'variant'>;
161
+ export type JSONSchemaFn = (args: JSONSchemaArgs) => JSONSchema4;
162
+ type SerializedNodeJSON<T extends LexicalNode> = T['exportJSON'] extends {
163
+ (compact?: false): infer Serialized extends SerializedLexicalNode;
164
+ (compact: boolean): unknown;
165
+ } ? Serialized : never;
153
166
  export type NodeWithHooks<T extends LexicalNode = any> = {
154
167
  /**
155
168
  * If a node includes sub-fields (e.g. block and link nodes), passing those subFields here will make payload
@@ -159,14 +172,14 @@ export type NodeWithHooks<T extends LexicalNode = any> = {
159
172
  /**
160
173
  * Optional. If not provided, all possible sub-fields should be returned.
161
174
  */
162
- node?: ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>;
175
+ node?: SerializedNodeJSON<ReplaceAny<T, LexicalNode>>;
163
176
  req?: PayloadRequest;
164
177
  }) => Field[] | null;
165
178
  /**
166
179
  * If a node includes sub-fields, the sub-fields data needs to be returned here, alongside `getSubFields` which returns their schema.
167
180
  */
168
181
  getSubFieldsData?: (args: {
169
- node: ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>;
182
+ node: SerializedNodeJSON<ReplaceAny<T, LexicalNode>>;
170
183
  req: PayloadRequest;
171
184
  }) => JsonObject;
172
185
  /**
@@ -175,16 +188,22 @@ export type NodeWithHooks<T extends LexicalNode = any> = {
175
188
  * This is because the Rest API hooks do not have access to the 'depth' property provided by graphQL.
176
189
  * In order for them to be populated correctly in graphQL, the population logic needs to be provided here.
177
190
  */
178
- graphQLPopulationPromises?: Array<PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
191
+ graphQLPopulationPromises?: Array<PopulationPromise<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>;
179
192
  /**
180
193
  * Just like payload fields, you can provide hooks which are run for this specific node. These are called Node Hooks.
181
194
  */
182
195
  hooks?: {
183
- afterChange?: Array<AfterChangeNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
184
- afterRead?: Array<AfterReadNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
185
- beforeChange?: Array<BeforeChangeNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
186
- beforeValidate?: Array<BeforeValidateNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
196
+ afterChange?: Array<AfterChangeNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>;
197
+ afterRead?: Array<AfterReadNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>;
198
+ beforeChange?: Array<BeforeChangeNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>;
199
+ beforeValidate?: Array<BeforeValidateNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>;
187
200
  };
201
+ /**
202
+ * Returns the JSON Schema for this node, plus optional standalone TS
203
+ * source for helper types its `tsType` annotations reference. Nodes
204
+ * without this function are omitted from the strictly-typed union.
205
+ */
206
+ jsonSchema?: JSONSchemaFn;
188
207
  /**
189
208
  * The actual lexical node needs to be provided here. This also supports [lexical node replacements](https://lexical.dev/docs/concepts/node-replacement).
190
209
  */
@@ -193,7 +212,7 @@ export type NodeWithHooks<T extends LexicalNode = any> = {
193
212
  * This allows you to provide node validations, which are run when your document is being validated, alongside other payload fields.
194
213
  * You can use it to throw a validation error for a specific node in case its data is incorrect.
195
214
  */
196
- validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
215
+ validations?: Array<NodeValidation<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>;
197
216
  };
198
217
  export type ServerFeature<ServerProps, ClientFeatureProps> = {
199
218
  ClientFeature?: PayloadComponent<never, BaseClientFeatureProps<ClientFeatureProps>>;
@@ -209,25 +228,6 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
209
228
  componentImports?: {
210
229
  [key: string]: PayloadComponent;
211
230
  } | ImportMapGenerators[0] | PayloadComponent[];
212
- generatedTypes?: {
213
- modifyOutputSchema: (args: {
214
- collectionIDFieldTypes: {
215
- [key: string]: 'number' | 'string';
216
- };
217
- config?: SanitizedConfig;
218
- /**
219
- * Current schema which will be modified by this function.
220
- */
221
- currentSchema: JSONSchema4;
222
- field: LexicalRichTextField;
223
- i18n?: I18n;
224
- /**
225
- * Allows you to define new top-level interfaces that can be re-used in the output schema.
226
- */
227
- interfaceNameDefinitions: Map<string, JSONSchema4>;
228
- isRequired: boolean;
229
- }) => JSONSchema4;
230
- };
231
231
  generateSchemaMap?: (args: {
232
232
  config: SanitizedConfig;
233
233
  field: RichTextField;
@@ -272,25 +272,6 @@ export type ServerFeatureProviderMap = Map<string, FeatureProviderServer<any, an
272
272
  export type SanitizedServerFeatures = {
273
273
  /** The keys of all enabled features */
274
274
  enabledFeatures: string[];
275
- generatedTypes: {
276
- modifyOutputSchemas: Array<(args: {
277
- collectionIDFieldTypes: {
278
- [key: string]: 'number' | 'string';
279
- };
280
- config?: SanitizedConfig;
281
- /**
282
- * Current schema which will be modified by this function.
283
- */
284
- currentSchema: JSONSchema4;
285
- field: LexicalRichTextField;
286
- i18n?: I18n;
287
- /**
288
- * Allows you to define new top-level interfaces that can be re-used in the output schema.
289
- */
290
- interfaceNameDefinitions: Map<string, JSONSchema4>;
291
- isRequired: boolean;
292
- }) => JSONSchema4>;
293
- };
294
275
  /** The node types mapped to their hooks */
295
276
  getSubFields?: Map<string, (args: {
296
277
  node: SerializedLexicalNode;
@@ -312,4 +293,5 @@ export type SanitizedServerFeatures = {
312
293
  /** The node types mapped to their validations */
313
294
  validations: Map<string, Array<NodeValidation>>;
314
295
  } & Required<Pick<ResolvedServerFeature<any, any>, 'i18n' | 'nodes'>>;
296
+ export {};
315
297
  //# sourceMappingURL=typesServer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typesServer.d.ts","sourceRoot":"","sources":["../../src/features/typesServer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,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qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"typesServer.js","names":[],"sources":["../../src/features/typesServer.ts"],"sourcesContent":["import type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type {\n Klass,\n LexicalNode,\n LexicalNodeReplacement,\n SerializedEditorState,\n SerializedLexicalNode,\n} from 'lexical'\nimport type {\n Field,\n FieldSchemaMap,\n ImportMapGenerators,\n JsonObject,\n PayloadComponent,\n PayloadRequest,\n PopulateType,\n ReplaceAny,\n RequestContext,\n RichTextField,\n RichTextHooks,\n SanitizedConfig,\n TypedFallbackLocale,\n ValidateOptions,\n ValidationFieldError,\n} from 'payload'\n\nimport type { ServerEditorConfig } from '../lexical/config/types.js'\nimport type { Transformer } from '../packages/@lexical/markdown/index.js'\nimport type { LexicalRichTextField } from '../types.js'\nimport type { BaseClientFeatureProps } from './typesClient.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = (args: {\n context: RequestContext\n currentDepth: number\n depth: number\n draft: boolean\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: LexicalRichTextField\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n parentIsLocalized: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: JsonObject\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField, SerializedEditorState>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<\n UnSanitizedServerFeatureProps = undefined,\n ServerFeatureProps = UnSanitizedServerFeatureProps,\n ClientFeatureProps = undefined,\n> = (\n props?: UnSanitizedServerFeatureProps,\n) => FeatureProviderServer<UnSanitizedServerFeatureProps, ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<\n UnSanitizedServerFeatureProps = undefined,\n ServerFeatureProps = UnSanitizedServerFeatureProps,\n ClientFeatureProps = undefined,\n> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first, but they have to exist, otherwise an error will be thrown. */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first AND have to exist, otherwise an error will be thrown. They will be available in the `feature` property. */\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. These are optional. Payload will attempt to load them before this feature, but doesn't throw an error if that's not possible. */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature:\n | ((props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n parentIsLocalized: boolean\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>>\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>)\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: UnSanitizedServerFeatureProps\n}\n\nexport type AfterReadNodeHookArgs<T extends SerializedLexicalNode> = {\n /**\n * Only available in `afterRead` hooks.\n */\n currentDepth: number\n /**\n * Only available in `afterRead` hooks.\n */\n depth: number\n draft: boolean\n fallbackLocale: TypedFallbackLocale\n /**\n * Only available in `afterRead` field hooks.\n */\n fieldPromises: Promise<void>[]\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany: boolean\n flattenLocales: boolean\n /**\n * The requested locale.\n */\n locale: string\n overrideAccess: boolean\n /**\n * Only available in `afterRead` hooks.\n */\n populateArg?: PopulateType\n /**\n * Only available in `afterRead` field hooks.\n */\n populationPromises: Promise<void>[]\n /**\n * Only available in `afterRead` hooks.\n */\n showHiddenFields: boolean\n /**\n * Only available in `afterRead` hooks.\n */\n triggerAccessControl: boolean\n /**\n * Only available in `afterRead` hooks.\n */\n triggerHooks: boolean\n}\n\nexport type AfterChangeNodeHookArgs<T extends SerializedLexicalNode> = {\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation: 'create' | 'delete' | 'read' | 'update'\n /** The value of the node before any changes. Not available in afterRead hooks */\n originalNode: T\n previousNode: T\n}\nexport type BeforeValidateNodeHookArgs<T extends SerializedLexicalNode> = {\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation: 'create' | 'delete' | 'read' | 'update'\n /** The value of the node before any changes. Not available in afterRead hooks */\n originalNode: T\n overrideAccess: boolean\n}\n\nexport type BeforeChangeNodeHookArgs<T extends SerializedLexicalNode> = {\n /**\n * Only available in `beforeChange` hooks.\n */\n errors: ValidationFieldError[]\n mergeLocaleActions: (() => Promise<void> | void)[]\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation: 'create' | 'delete' | 'read' | 'update'\n /** The value of the node before any changes. Not available in afterRead hooks */\n originalNode: T\n /**\n * The original node with locales (not modified by any hooks).\n */\n originalNodeWithLocales?: T\n previousNode: T\n\n skipValidation: boolean\n}\n\nexport type BaseNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** The value of the node. */\n node: T\n parentRichTextFieldPath: (number | string)[]\n parentRichTextFieldSchemaPath: string[]\n /** The payload request object. It is mocked for Local API operations. */\n req: PayloadRequest\n}\n\nexport type AfterReadNodeHook<T extends SerializedLexicalNode> = (\n args: AfterReadNodeHookArgs<T> & BaseNodeHookArgs<T>,\n) => Promise<T> | T\n\nexport type AfterChangeNodeHook<T extends SerializedLexicalNode> = (\n args: AfterChangeNodeHookArgs<T> & BaseNodeHookArgs<T>,\n) => Promise<T> | T\n\nexport type BeforeChangeNodeHook<T extends SerializedLexicalNode> = (\n args: BaseNodeHookArgs<T> & BeforeChangeNodeHookArgs<T>,\n) => Promise<T> | T\n\nexport type BeforeValidateNodeHook<T extends SerializedLexicalNode> = (\n args: BaseNodeHookArgs<T> & BeforeValidateNodeHookArgs<T>,\n) => Promise<T> | T\n\n// Define the node with hooks that use the node's exportJSON return type\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n /**\n * If a node includes sub-fields (e.g. block and link nodes), passing those subFields here will make payload\n * automatically populate, run hooks, and generate component import maps for them\n */\n getSubFields?: (args: {\n /**\n * Optional. If not provided, all possible sub-fields should be returned.\n */\n node?: ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>\n req?: PayloadRequest\n }) => Field[] | null\n /**\n * If a node includes sub-fields, the sub-fields data needs to be returned here, alongside `getSubFields` which returns their schema.\n */\n getSubFieldsData?: (args: {\n node: ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>\n req: PayloadRequest\n }) => JsonObject\n /**\n * Allows you to run population logic when a node's data was requested from graphQL.\n * While `getSubFields` and `getSubFieldsData` automatically handle populating sub-fields (since they run hooks on them), those are only populated in the Rest API.\n * This is because the Rest API hooks do not have access to the 'depth' property provided by graphQL.\n * In order for them to be populated correctly in graphQL, the population logic needs to be provided here.\n */\n graphQLPopulationPromises?: Array<\n PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n /**\n * Just like payload fields, you can provide hooks which are run for this specific node. These are called Node Hooks.\n */\n hooks?: {\n afterChange?: Array<AfterChangeNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n afterRead?: Array<AfterReadNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeChange?: Array<BeforeChangeNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeValidate?: Array<\n BeforeValidateNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n }\n /**\n * The actual lexical node needs to be provided here. This also supports [lexical node replacements](https://lexical.dev/docs/concepts/node-replacement).\n */\n node: Klass<T> | LexicalNodeReplacement\n /**\n * This allows you to provide node validations, which are run when your document is being validated, alongside other payload fields.\n * You can use it to throw a validation error for a specific node in case its data is incorrect.\n */\n validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientFeature?: PayloadComponent<never, BaseClientFeatureProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n /**\n * Adds payload components to the importMap.\n *\n * If an object is provided, the imported components will automatically be made available to the client feature, keyed by the object's keys.\n */\n componentImports?:\n | {\n [key: string]: PayloadComponent\n }\n | ImportMapGenerators[0]\n | PayloadComponent[]\n generatedTypes?: {\n modifyOutputSchema: (args: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: LexicalRichTextField\n i18n?: I18n\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n field: RichTextField\n i18n: I18nClient\n props: ServerProps\n schemaMap: FieldSchemaMap\n schemaPath: string\n }) => FieldSchemaMap | null\n hooks?: RichTextHooks\n /**\n * Here you can provide i18n translations for your feature. These will only be available on the server and client.\n *\n * Translations here are automatically scoped to `lexical.featureKey.yourKey`\n *\n * @Example\n * ```ts\n * i18n: {\n * en: {\n * label: 'Horizontal Rule',\n * },\n * de: {\n * label: 'Trennlinie',\n * },\n * }\n * ```\n * In order to access these translations, you would use `i18n.t('lexical:horizontalRule:label')`.\n */\n i18n?: Partial<GenericLanguages>\n markdownTransformers?: (\n | ((props: { allNodes: Array<NodeWithHooks>; allTransformers: Transformer[] }) => Transformer)\n | Transformer\n )[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n sanitizedServerFeatureProps?: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = {\n order: number\n} & Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n> &\n ServerFeature<ServerProps, ClientFeatureProps>\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<any, any>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<any, any, any>>\n\nexport type SanitizedServerFeatures = {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n (args: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: LexicalRichTextField\n i18n?: I18n\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n /** The node types mapped to their hooks */\n\n getSubFields?: Map<\n string,\n (args: { node: SerializedLexicalNode; req: PayloadRequest }) => Field[] | null\n >\n getSubFieldsData?: Map<\n string,\n (args: { node: SerializedLexicalNode; req: PayloadRequest }) => JsonObject\n >\n graphQLPopulationPromises: Map<string, Array<PopulationPromise>>\n hooks: RichTextHooks\n markdownTransformers: Transformer[]\n nodeHooks?: {\n afterChange?: Map<string, Array<AfterChangeNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<AfterReadNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<BeforeChangeNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<BeforeValidateNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n} & Required<Pick<ResolvedServerFeature<any, any>, 'i18n' | 'nodes'>>\n"],"mappings":"AAmWA","ignoreList":[]}
1
+ {"version":3,"file":"typesServer.js","names":[],"sources":["../../src/features/typesServer.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { GenericLanguages, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type {\n Klass,\n LexicalNode,\n LexicalNodeReplacement,\n SerializedEditorState,\n SerializedLexicalNode,\n} from 'lexical'\nimport type {\n Field,\n FieldOperation,\n FieldSchemaMap,\n FieldsToJSONSchemaArgs,\n ImportMapGenerators,\n JsonObject,\n PayloadComponent,\n PayloadRequest,\n PopulateType,\n ReplaceAny,\n RequestContext,\n RichTextField,\n RichTextHooks,\n SanitizedConfig,\n TypedFallbackLocale,\n ValidateOptions,\n ValidationFieldError,\n} from 'payload'\n\nimport type { ServerEditorConfig } from '../lexical/config/types.js'\nimport type { LexicalRichTextField } from '../types/index.js'\nimport type { ElementNodeSchemaFn } from '../types/jsonSchemaHelpers.js'\nimport type { BaseClientFeatureProps } from './typesClient.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = (args: {\n context: RequestContext\n currentDepth: number\n depth: number\n draft: boolean\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: LexicalRichTextField\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n parentIsLocalized: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: JsonObject\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField, SerializedEditorState>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<\n UnSanitizedServerFeatureProps = undefined,\n ServerFeatureProps = UnSanitizedServerFeatureProps,\n ClientFeatureProps = undefined,\n> = (\n props?: UnSanitizedServerFeatureProps,\n) => FeatureProviderServer<UnSanitizedServerFeatureProps, ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<\n UnSanitizedServerFeatureProps = undefined,\n ServerFeatureProps = UnSanitizedServerFeatureProps,\n ClientFeatureProps = undefined,\n> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first, but they have to exist, otherwise an error will be thrown. */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first AND have to exist, otherwise an error will be thrown. They will be available in the `feature` property. */\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. These are optional. Payload will attempt to load them before this feature, but doesn't throw an error if that's not possible. */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature:\n | ((props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n parentIsLocalized: boolean\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) => ServerFeature<ServerFeatureProps, ClientFeatureProps>)\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: UnSanitizedServerFeatureProps\n}\n\nexport type AfterReadNodeHookArgs<T extends SerializedLexicalNode> = {\n /**\n * Only available in `afterRead` hooks.\n */\n currentDepth: number\n /**\n * Only available in `afterRead` hooks.\n */\n depth: number\n draft: boolean\n fallbackLocale: TypedFallbackLocale\n /**\n * Only available in `afterRead` field hooks.\n */\n fieldPromises: Promise<void>[]\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany: boolean\n flattenLocales: boolean\n /**\n * The requested locale.\n */\n locale: string\n overrideAccess: boolean\n /**\n * Only available in `afterRead` hooks.\n */\n populateArg?: PopulateType\n /**\n * Only available in `afterRead` field hooks.\n */\n populationPromises: Promise<void>[]\n /**\n * Only available in `afterRead` hooks.\n */\n showHiddenFields: boolean\n /**\n * Only available in `afterRead` hooks.\n */\n triggerAccessControl: boolean\n /**\n * Only available in `afterRead` hooks.\n */\n triggerHooks: boolean\n}\n\nexport type AfterChangeNodeHookArgs<T extends SerializedLexicalNode> = {\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation: 'create' | 'delete' | 'read' | 'update'\n /** The value of the node before any changes. Not available in afterRead hooks */\n originalNode: T\n previousNode: T\n}\nexport type BeforeValidateNodeHookArgs<T extends SerializedLexicalNode> = {\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation: FieldOperation\n /** The value of the node before any changes. Not available in afterRead hooks */\n originalNode: T\n overrideAccess: boolean\n}\n\nexport type BeforeChangeNodeHookArgs<T extends SerializedLexicalNode> = {\n /**\n * Only available in `beforeChange` hooks.\n */\n errors: ValidationFieldError[]\n mergeLocaleActions: (() => Promise<void> | void)[]\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation: FieldOperation\n /** The value of the node before any changes. Not available in afterRead hooks */\n originalNode: T\n /**\n * The original node with locales (not modified by any hooks).\n */\n originalNodeWithLocales?: T\n previousNode: T\n\n skipValidation: boolean\n}\n\nexport type BaseNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** The value of the node. */\n node: T\n parentRichTextFieldPath: (number | string)[]\n parentRichTextFieldSchemaPath: string[]\n /** The payload request object. It is mocked for Local API operations. */\n req: PayloadRequest\n}\n\nexport type AfterReadNodeHook<T extends SerializedLexicalNode> = (\n args: AfterReadNodeHookArgs<T> & BaseNodeHookArgs<T>,\n) => Promise<T> | T\n\nexport type AfterChangeNodeHook<T extends SerializedLexicalNode> = (\n args: AfterChangeNodeHookArgs<T> & BaseNodeHookArgs<T>,\n) => Promise<T> | T\n\nexport type BeforeChangeNodeHook<T extends SerializedLexicalNode> = (\n args: BaseNodeHookArgs<T> & BeforeChangeNodeHookArgs<T>,\n) => Promise<T> | T\n\nexport type BeforeValidateNodeHook<T extends SerializedLexicalNode> = (\n args: BaseNodeHookArgs<T> & BeforeValidateNodeHookArgs<T>,\n) => Promise<T> | T\n\n/** Arguments passed to each node's `jsonSchema` function. */\nexport type JSONSchemaArgs = {\n elementNodeSchema: ElementNodeSchemaFn\n field: LexicalRichTextField\n /** TS name of the node union - use in `tsType` annotations. */\n nodeUnionName: string\n} & Pick<\n FieldsToJSONSchemaArgs,\n | 'collectionIDFieldTypes'\n | 'config'\n | 'i18n'\n | 'interfaceNameDefinitions'\n | 'typeStringDefinitions'\n | 'variant'\n>\n\nexport type JSONSchemaFn = (args: JSONSchemaArgs) => JSONSchema4\n\n// Match both overloads to infer the full JSON format. ReturnType selects the compact\n// overload, and LexicalExportJSON widens custom nodes' serialized type discriminants.\ntype SerializedNodeJSON<T extends LexicalNode> = T['exportJSON'] extends {\n (compact?: false): infer Serialized extends SerializedLexicalNode\n // eslint-disable-next-line perfectionist/sort-object-types -- Overload order determines inference.\n (compact: boolean): unknown\n}\n ? Serialized\n : never\n\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n /**\n * If a node includes sub-fields (e.g. block and link nodes), passing those subFields here will make payload\n * automatically populate, run hooks, and generate component import maps for them\n */\n getSubFields?: (args: {\n /**\n * Optional. If not provided, all possible sub-fields should be returned.\n */\n node?: SerializedNodeJSON<ReplaceAny<T, LexicalNode>>\n req?: PayloadRequest\n }) => Field[] | null\n /**\n * If a node includes sub-fields, the sub-fields data needs to be returned here, alongside `getSubFields` which returns their schema.\n */\n getSubFieldsData?: (args: {\n node: SerializedNodeJSON<ReplaceAny<T, LexicalNode>>\n req: PayloadRequest\n }) => JsonObject\n /**\n * Allows you to run population logic when a node's data was requested from graphQL.\n * While `getSubFields` and `getSubFieldsData` automatically handle populating sub-fields (since they run hooks on them), those are only populated in the Rest API.\n * This is because the Rest API hooks do not have access to the 'depth' property provided by graphQL.\n * In order for them to be populated correctly in graphQL, the population logic needs to be provided here.\n */\n graphQLPopulationPromises?: Array<\n PopulationPromise<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>\n >\n /**\n * Just like payload fields, you can provide hooks which are run for this specific node. These are called Node Hooks.\n */\n hooks?: {\n afterChange?: Array<AfterChangeNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>\n afterRead?: Array<AfterReadNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>\n beforeChange?: Array<BeforeChangeNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>\n beforeValidate?: Array<BeforeValidateNodeHook<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>\n }\n /**\n * Returns the JSON Schema for this node, plus optional standalone TS\n * source for helper types its `tsType` annotations reference. Nodes\n * without this function are omitted from the strictly-typed union.\n */\n jsonSchema?: JSONSchemaFn\n /**\n * The actual lexical node needs to be provided here. This also supports [lexical node replacements](https://lexical.dev/docs/concepts/node-replacement).\n */\n node: Klass<T> | LexicalNodeReplacement\n /**\n * This allows you to provide node validations, which are run when your document is being validated, alongside other payload fields.\n * You can use it to throw a validation error for a specific node in case its data is incorrect.\n */\n validations?: Array<NodeValidation<SerializedNodeJSON<ReplaceAny<T, LexicalNode>>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientFeature?: PayloadComponent<never, BaseClientFeatureProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n /**\n * Adds payload components to the importMap.\n *\n * If an object is provided, the imported components will automatically be made available to the client feature, keyed by the object's keys.\n */\n componentImports?:\n | {\n [key: string]: PayloadComponent\n }\n | ImportMapGenerators[0]\n | PayloadComponent[]\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n field: RichTextField\n i18n: I18nClient\n props: ServerProps\n schemaMap: FieldSchemaMap\n schemaPath: string\n }) => FieldSchemaMap | null\n hooks?: RichTextHooks\n /**\n * Here you can provide i18n translations for your feature. These will only be available on the server and client.\n *\n * Translations here are automatically scoped to `lexical.featureKey.yourKey`\n *\n * @Example\n * ```ts\n * i18n: {\n * en: {\n * label: 'Horizontal Rule',\n * },\n * de: {\n * label: 'Trennlinie',\n * },\n * }\n * ```\n * In order to access these translations, you would use `i18n.t('lexical:horizontalRule:label')`.\n */\n i18n?: Partial<GenericLanguages>\n markdownTransformers?: (\n | ((props: { allNodes: Array<NodeWithHooks>; allTransformers: Transformer[] }) => Transformer)\n | Transformer\n )[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n sanitizedServerFeatureProps?: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = {\n order: number\n} & Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n> &\n ServerFeature<ServerProps, ClientFeatureProps>\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<any, any>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<any, any, any>>\n\nexport type SanitizedServerFeatures = {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n /** The node types mapped to their hooks */\n\n getSubFields?: Map<\n string,\n (args: { node: SerializedLexicalNode; req: PayloadRequest }) => Field[] | null\n >\n getSubFieldsData?: Map<\n string,\n (args: { node: SerializedLexicalNode; req: PayloadRequest }) => JsonObject\n >\n graphQLPopulationPromises: Map<string, Array<PopulationPromise>>\n hooks: RichTextHooks\n markdownTransformers: Transformer[]\n nodeHooks?: {\n afterChange?: Map<string, Array<AfterChangeNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<AfterReadNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<BeforeChangeNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<BeforeValidateNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n} & Required<Pick<ResolvedServerFeature<any, any>, 'i18n' | 'nodes'>>\n"],"mappings":"AAkXA","ignoreList":[]}
@@ -5,28 +5,27 @@
5
5
  --upload-media-size: 28.125rem;
6
6
  border: var(--stroke-width-small) solid transparent;
7
7
  position: relative;
8
- font-family: var(--font-body);
9
8
  margin-block: var(--spacer-2);
10
9
  border-radius: 0;
11
10
 
12
11
  &:has([data-align='center']) {
13
12
  width: fit-content;
14
- margin-left: auto;
15
- margin-right: auto;
13
+ margin-inline-start: auto;
14
+ margin-inline-end: auto;
16
15
  }
17
16
 
18
17
  &:has([data-align='right']),
19
18
  &:has([data-align='end']) {
20
19
  width: fit-content;
21
- margin-left: auto;
22
- margin-right: 0;
20
+ margin-inline-start: auto;
21
+ margin-inline-end: 0;
23
22
  }
24
23
 
25
24
  &:has([data-align='left']),
26
25
  &:has([data-align='start']) {
27
26
  width: fit-content;
28
- margin-left: 0;
29
- margin-right: auto;
27
+ margin-inline-start: 0;
28
+ margin-inline-end: auto;
30
29
  }
31
30
 
32
31
  &:hover {
@@ -54,16 +53,16 @@
54
53
  }
55
54
 
56
55
  .LexicalEditorTheme__upload__contents--landscape {
57
- img,
58
- svg {
56
+ .thumbnail img,
57
+ .thumbnail svg {
59
58
  max-width: min(100%, var(--upload-media-size));
60
59
  min-width: min(100%, var(--upload-media-size));
61
60
  }
62
61
  }
63
62
 
64
63
  .LexicalEditorTheme__upload__contents--portrait {
65
- img,
66
- svg {
64
+ .thumbnail img,
65
+ .thumbnail svg {
67
66
  max-height: var(--upload-media-size);
68
67
  min-height: var(--upload-media-size);
69
68
  }
@@ -78,7 +77,7 @@
78
77
 
79
78
  .LexicalEditorTheme__upload__floater {
80
79
  position: absolute;
81
- left: 50%;
80
+ inset-inline-start: 50%;
82
81
  bottom: calc(100% + var(--spacer-2));
83
82
  transform: translateX(-50%);
84
83
  display: flex;
@@ -88,14 +87,8 @@
88
87
  padding: 0 var(--spacer-2);
89
88
  background: var(--color-bg-menu);
90
89
  border-radius: var(--radius-large);
91
- box-shadow:
92
- 0 3px 8px 0 rgba(0, 0, 0, 0.35),
93
- 0 1px 3px 0 rgba(0, 0, 0, 0.5),
94
- inset 0 0.5px 0 0 rgba(255, 255, 255, 0.08),
95
- inset 0 0 0.5px 0 rgba(255, 255, 255, 0.3);
96
- color: var(--color-white-800);
90
+ color: var(--color-text);
97
91
  opacity: 0;
98
- transition: opacity 0.15s ease;
99
92
  pointer-events: none;
100
93
  white-space: nowrap;
101
94
  z-index: 1;
@@ -103,14 +96,14 @@
103
96
  &::before {
104
97
  content: '';
105
98
  position: absolute;
106
- left: 0;
107
- right: 0;
99
+ inset-inline-start: 0;
100
+ inset-inline-end: 0;
108
101
  top: 100%;
109
102
  height: var(--spacer-2);
110
103
  }
111
104
 
112
105
  .btn {
113
- color: var(--color-white-800);
106
+ color: var(--color-text);
114
107
  width: var(--spacer-4);
115
108
  height: var(--spacer-4);
116
109
  min-width: var(--spacer-4);
@@ -121,11 +114,11 @@
121
114
  cursor: pointer;
122
115
 
123
116
  &:hover:not(.btn--disabled) {
124
- background: var(--color-bg-menu);
117
+ background: var(--color-bg-transparent-hover);
125
118
  }
126
119
 
127
120
  &:active:not(.btn--disabled) {
128
- background: var(--color-bg-menu);
121
+ background: var(--color-bg-transparent-pressed);
129
122
  }
130
123
  }
131
124
  }
@@ -141,7 +134,6 @@
141
134
  }
142
135
 
143
136
  .LexicalEditorTheme__upload__filename {
144
- font-family: var(--text-body-medium-font-family);
145
137
  font-size: var(--text-body-medium-font-size);
146
138
  font-weight: var(--text-body-medium-font-weight);
147
139
  line-height: var(--text-body-medium-line-height);
@@ -157,7 +149,7 @@
157
149
  .LexicalEditorTheme__upload__divider {
158
150
  width: var(--stroke-width-small);
159
151
  height: var(--spacer-6);
160
- background: var(--color-grey-700);
152
+ background: var(--color-border);
161
153
  flex-shrink: 0;
162
154
  }
163
155
 
@@ -1,6 +1,6 @@
1
1
  import { type ElementFormatType } from 'lexical';
2
2
  import React from 'react';
3
- import type { UploadData } from '../../server/nodes/UploadNode.js';
3
+ import type { UploadData } from '../../server/schema.js';
4
4
  import './index.css';
5
5
  export type ElementProps = {
6
6
  className: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/upload/client/component/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAsE,MAAM,OAAO,CAAA;AAG1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AASlE,OAAO,aAAa,CAAA;AAMpB,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAqOlD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/upload/client/component/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAsE,MAAM,OAAO,CAAA;AAG1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AASxD,OAAO,aAAa,CAAA;AAMpB,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAqOlD,CAAA"}
@@ -13,6 +13,7 @@ import { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js';
13
13
  import { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js';
14
14
  import { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js';
15
15
  import { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js';
16
+ import { $isUploadNode } from '../nodes/UploadNode.js';
16
17
  import './index.css';
17
18
  const initialParams = {
18
19
  depth: 0
@@ -133,7 +134,7 @@ export const UploadComponent = props => {
133
134
  // Update lexical node (with key nodeKey) with new data
134
135
  editor.update(() => {
135
136
  const uploadNode = $getNodeByKey(nodeKey);
136
- if (uploadNode) {
137
+ if ($isUploadNode(uploadNode)) {
137
138
  const newData = {
138
139
  ...uploadNode.getData(),
139
140
  fields: data_0
@@ -177,7 +178,7 @@ export const UploadComponent = props => {
177
178
  className: `${baseClass}__upload-drawer-toggler`,
178
179
  disabled: !isEditable,
179
180
  el: "button",
180
- icon: "edit",
181
+ icon: "write",
181
182
  onClick: toggleDrawer,
182
183
  round: true,
183
184
  size: "medium",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","formatDrawerSlug","Pill","Thumbnail","useConfig","useEditDepth","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","$isRangeSelection","formatAdminURL","isImage","React","useCallback","useEffect","useId","useReducer","useRef","useState","useEditorConfigContext","FieldsDrawer","useLexicalDocumentDrawer","useLexicalDrawer","INSERT_UPLOAD_WITH_DRAWER_COMMAND","initialParams","depth","UploadComponent","props","className","baseClass","data","fields","relationTo","value","format","nodeKey","Error","config","routes","api","serverURL","getEntityConfig","uploadRef","uuid","editDepth","editor","editorConfig","fieldProps","schemaPath","isEditable","i18n","t","isSelected","setIsSelected","cacheBust","dispatchCacheBust","state","relatedCollection","collectionSlug","componentID","extraFieldsDrawerSlug","slug","toggleDrawer","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","setParams","apiRoute","path","thumbnailSRC","thumbnailURL","url","registerUpdateListener","editorState","read","selection","has","nodes","getNodes","some","node","getKey","outerEl","current","closest","classList","toggle","removeUpload","update","remove","updateUpload","_data","hasExtraFields","resolvedFeatureMap","get","sanitizedClientFeatureProps","collections","onExtraFieldsDrawerSubmit","_","uploadNode","newData","getData","setData","aspectRatio","width","height","_jsxs","undefined","filename","ref","_jsx","fileSrc","mimeType","size","pillStyle","labels","singular","buttonStyle","disabled","el","icon","onClick","round","tooltip","dispatchCommand","replace","e","preventDefault","onSave","drawerSlug","drawerTitle","label","featureKey","handleDrawerSubmit","schemaPathSuffix"],"sources":["../../../../../src/features/upload/client/component/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, Data, FormState, JsonObject } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n formatDrawerSlug,\n Pill,\n Thumbnail,\n useConfig,\n useEditDepth,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n $isRangeSelection,\n type ElementFormatType,\n} from 'lexical'\nimport { formatAdminURL, isImage } from 'payload/shared'\nimport React, { useCallback, useEffect, useId, useReducer, useRef, useState } from 'react'\n\nimport type { BaseClientFeatureProps } from '../../../typesClient.js'\nimport type { UploadData } from '../../server/nodes/UploadNode.js'\nimport type { UploadFeaturePropsClient } from '../index.js'\nimport type { UploadNode } from '../nodes/UploadNode.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport './index.css'\n\nconst initialParams = {\n depth: 0,\n}\n\nexport type ElementProps = {\n className: string\n data: UploadData\n format?: ElementFormatType\n nodeKey: string\n}\n\nexport const UploadComponent: React.FC<ElementProps> = (props) => {\n const {\n className: baseClass,\n data: { fields, relationTo, value },\n format,\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.',\n )\n }\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n const uploadRef = useRef<HTMLDivElement | null>(null)\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n const [editor] = useLexicalComposerContext()\n\n const {\n editorConfig,\n fieldProps: { schemaPath },\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation()\n const [isSelected, setIsSelected] = useState(false)\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [relatedCollection] = useState<ClientCollectionConfig>(() =>\n getEntityConfig({ collectionSlug: relationTo }),\n )\n\n const componentID = useId()\n\n const extraFieldsDrawerSlug = formatDrawerSlug({\n slug: `lexical-upload-drawer-` + uuid + componentID, // There can be multiple upload components, each with their own drawer, in one single editor => separate them by componentID\n depth: editDepth,\n })\n\n // Need to use hook to initialize useEffect that restores cursor position\n const { toggleDrawer } = useLexicalDrawer(extraFieldsDrawerSlug, true)\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n // Get the referenced document\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const thumbnailSRC = data?.thumbnailURL || data?.url\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = uploadRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeUpload = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateUpload = useCallback(\n (_data: Data) => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n dispatchCacheBust()\n closeDocumentDrawer()\n },\n [setParams, cacheBust, closeDocumentDrawer],\n )\n\n const hasExtraFields = (\n editorConfig?.resolvedFeatureMap?.get('upload')\n ?.sanitizedClientFeatureProps as BaseClientFeatureProps<UploadFeaturePropsClient>\n ).collections?.[relatedCollection.slug]?.hasExtraFields\n\n const onExtraFieldsDrawerSubmit = useCallback(\n (_: FormState, data: JsonObject) => {\n // Update lexical node (with key nodeKey) with new data\n editor.update(() => {\n const uploadNode: null | UploadNode = $getNodeByKey(nodeKey)\n if (uploadNode) {\n const newData: UploadData = {\n ...uploadNode.getData(),\n fields: data,\n }\n uploadNode.setData(newData)\n }\n })\n },\n [editor, nodeKey],\n )\n\n const aspectRatio =\n thumbnailSRC && data?.width && data?.height\n ? data.width > data.height\n ? 'landscape'\n : 'portrait'\n : 'landscape'\n\n return (\n <div\n className={`${baseClass}__contents ${baseClass}__contents--${aspectRatio}`}\n data-align={format || undefined}\n data-filename={data?.filename}\n ref={uploadRef}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__media`}>\n <Thumbnail\n collectionSlug={relationTo}\n fileSrc={isImage(data?.mimeType) ? thumbnailSRC : null}\n height={data?.height}\n size=\"none\"\n width={data?.width}\n />\n\n {isEditable && (\n <div className={`${baseClass}__floater`} data-theme=\"dark\">\n <Pill className={`${baseClass}__collectionLabel`} pillStyle=\"dark\" size=\"small\">\n {getTranslation(relatedCollection.labels.singular, i18n)}\n </Pill>\n\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <span className={`${baseClass}__filename`}>\n {data?.filename || t('general:untitled')}\n </span>\n </DocumentDrawerToggler>\n\n {hasExtraFields ? (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__upload-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={toggleDrawer}\n round\n size=\"medium\"\n tooltip={t('fields:editRelationship')}\n />\n ) : null}\n\n <div className={`${baseClass}__divider`} />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swap-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }}\n round\n size=\"medium\"\n tooltip={t('fields:swapUpload')}\n />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeUpload()\n }}\n round\n size=\"medium\"\n tooltip={t('fields:removeUpload')}\n />\n </div>\n )}\n </div>\n </div>\n\n {value ? <DocumentDrawer onSave={updateUpload} /> : null}\n {hasExtraFields ? (\n <FieldsDrawer\n data={fields}\n drawerSlug={extraFieldsDrawerSlug}\n drawerTitle={t('general:editLabel', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n featureKey=\"upload\"\n handleDrawerSubmit={onExtraFieldsDrawerSubmit}\n schemaPath={schemaPath}\n schemaPathSuffix={relatedCollection.slug}\n />\n ) : null}\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SACEC,MAAM,EACNC,gBAAgB,EAChBC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,YAAY,EACZC,aAAa,EACbC,cAAc,QACT;AACP,SACEC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,QAEZ;AACP,SAASC,cAAc,EAAEC,OAAO,QAAQ;AACxC,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAOnF,SAASC,sBAAsB,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAC7B,SAASC,wBAAwB,QAAQ;AACzC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,iCAAiC,QAAQ;AAClD,OAAO;AAEP,MAAMC,aAAA,GAAgB;EACpBC,KAAA,EAAO;AACT;AASA,OAAO,MAAMC,eAAA,GAA2CC,KAAA;EACtD,MAAM;IACJC,SAAA,EAAWC,SA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A,EAAW,GAAGC,SAAA,uBAAgC;YAC9C0F,QAAA,EAAU,CAACtE,UAAA;YACXuE,EAAA,EAAG;YACHC,IAAA,EAAK;YACLC,OAAA,EAASA,CAAA;cACP7E,MAAA,CAAOgF,eAAe,CAACtG,iCAAA,EAAmC;gBACxDuG,OAAA,EAAS;kBAAE3F;gBAAQ;cACrB;YACF;YACAwF,KAAK;YACLT,IAAA,EAAK;YACLU,OAAA,EAASzE,CAAA,CAAE;2BAGb4D,IAAA,CAACjH,MAAA;YACCwH,WAAA,EAAY;YACZ1F,SAAA,EAAW,GAAGC,SAAA,gBAAyB;YACvC0F,QAAA,EAAU,CAACtE,UAAA;YACXwE,IAAA,EAAK;YACLC,OAAA,EAAUK,CAAA;cACRA,CAAA,CAAEC,cAAc;cAChBxC,YAAA;YACF;YACAmC,KAAK;YACLT,IAAA,EAAK;YACLU,OAAA,EAASzE,CAAA,CAAE;;;;QAOpBlB,KAAA,gBAAQ8E,IAAA,CAAC/C,cAAA;MAAeiE,MAAA,EAAQtC;SAAmB,MACnDE,cAAA,gBACCkB,IAAA,CAAC3F,YAAA;MACCU,IAAA,EAAMC,MAAA;MACNmG,UAAA,EAAYtE,qBAAA;MACZuE,WAAA,EAAahF,CAAA,CAAE,qBAAqB;QAClCiF,KAAA,EAAOvI,cAAA,CAAe4D,iBAAA,CAAkB2D,MAAM,CAACC,QAAQ,EAAEnE,IAAA;MAC3D;MACAmF,UAAA,EAAW;MACXC,kBAAA,EAAoBpC,yBAAA;MACpBlD,UAAA,EAAYA,UAAA;MACZuF,gBAAA,EAAkB9E,iBAAA,CAAkBI;SAEpC;;AAGV","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","formatDrawerSlug","Pill","Thumbnail","useConfig","useEditDepth","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","$isRangeSelection","formatAdminURL","isImage","React","useCallback","useEffect","useId","useReducer","useRef","useState","useEditorConfigContext","FieldsDrawer","useLexicalDocumentDrawer","useLexicalDrawer","INSERT_UPLOAD_WITH_DRAWER_COMMAND","$isUploadNode","initialParams","depth","UploadComponent","props","className","baseClass","data","fields","relationTo","value","format","nodeKey","Error","config","routes","api","serverURL","getEntityConfig","uploadRef","uuid","editDepth","editor","editorConfig","fieldProps","schemaPath","isEditable","i18n","t","isSelected","setIsSelected","cacheBust","dispatchCacheBust","state","relatedCollection","collectionSlug","componentID","extraFieldsDrawerSlug","slug","toggleDrawer","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","setParams","apiRoute","path","thumbnailSRC","thumbnailURL","url","registerUpdateListener","editorState","read","selection","has","nodes","getNodes","some","node","getKey","outerEl","current","closest","classList","toggle","removeUpload","update","remove","updateUpload","_data","hasExtraFields","resolvedFeatureMap","get","sanitizedClientFeatureProps","collections","onExtraFieldsDrawerSubmit","_","uploadNode","newData","getData","setData","aspectRatio","width","height","_jsxs","undefined","filename","ref","_jsx","fileSrc","mimeType","size","pillStyle","labels","singular","buttonStyle","disabled","el","icon","onClick","round","tooltip","dispatchCommand","replace","e","preventDefault","onSave","drawerSlug","drawerTitle","label","featureKey","handleDrawerSubmit","schemaPathSuffix"],"sources":["../../../../../src/features/upload/client/component/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, Data, FormState, JsonObject } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n formatDrawerSlug,\n Pill,\n Thumbnail,\n useConfig,\n useEditDepth,\n usePayloadAPI,\n useTranslation,\n} from '@payloadcms/ui'\nimport {\n $getNodeByKey,\n $getSelection,\n $isNodeSelection,\n $isRangeSelection,\n type ElementFormatType,\n} from 'lexical'\nimport { formatAdminURL, isImage } from 'payload/shared'\nimport React, { useCallback, useEffect, useId, useReducer, useRef, useState } from 'react'\n\nimport type { BaseClientFeatureProps } from '../../../typesClient.js'\nimport type { UploadData } from '../../server/schema.js'\nimport type { UploadFeaturePropsClient } from '../index.js'\n\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { FieldsDrawer } from '../../../../utilities/fieldsDrawer/Drawer.js'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\nimport { $isUploadNode } from '../nodes/UploadNode.js'\nimport './index.css'\n\nconst initialParams = {\n depth: 0,\n}\n\nexport type ElementProps = {\n className: string\n data: UploadData\n format?: ElementFormatType\n nodeKey: string\n}\n\nexport const UploadComponent: React.FC<ElementProps> = (props) => {\n const {\n className: baseClass,\n data: { fields, relationTo, value },\n format,\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.',\n )\n }\n\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n const uploadRef = useRef<HTMLDivElement | null>(null)\n const { uuid } = useEditorConfigContext()\n const editDepth = useEditDepth()\n const [editor] = useLexicalComposerContext()\n\n const {\n editorConfig,\n fieldProps: { schemaPath },\n } = useEditorConfigContext()\n const isEditable = useLexicalEditable()\n const { i18n, t } = useTranslation()\n const [isSelected, setIsSelected] = useState(false)\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [relatedCollection] = useState<ClientCollectionConfig>(() =>\n getEntityConfig({ collectionSlug: relationTo }),\n )\n\n const componentID = useId()\n\n const extraFieldsDrawerSlug = formatDrawerSlug({\n slug: `lexical-upload-drawer-` + uuid + componentID, // There can be multiple upload components, each with their own drawer, in one single editor => separate them by componentID\n depth: editDepth,\n })\n\n // Need to use hook to initialize useEffect that restores cursor position\n const { toggleDrawer } = useLexicalDrawer(extraFieldsDrawerSlug, true)\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n // Get the referenced document\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const thumbnailSRC = data?.thumbnailURL || data?.url\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = uploadRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeUpload = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateUpload = useCallback(\n (_data: Data) => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n dispatchCacheBust()\n closeDocumentDrawer()\n },\n [setParams, cacheBust, closeDocumentDrawer],\n )\n\n const hasExtraFields = (\n editorConfig?.resolvedFeatureMap?.get('upload')\n ?.sanitizedClientFeatureProps as BaseClientFeatureProps<UploadFeaturePropsClient>\n ).collections?.[relatedCollection.slug]?.hasExtraFields\n\n const onExtraFieldsDrawerSubmit = useCallback(\n (_: FormState, data: JsonObject) => {\n // Update lexical node (with key nodeKey) with new data\n editor.update(() => {\n const uploadNode = $getNodeByKey(nodeKey)\n if ($isUploadNode(uploadNode)) {\n const newData: UploadData = {\n ...uploadNode.getData(),\n fields: data,\n }\n uploadNode.setData(newData)\n }\n })\n },\n [editor, nodeKey],\n )\n\n const aspectRatio =\n thumbnailSRC && data?.width && data?.height\n ? data.width > data.height\n ? 'landscape'\n : 'portrait'\n : 'landscape'\n\n return (\n <div\n className={`${baseClass}__contents ${baseClass}__contents--${aspectRatio}`}\n data-align={format || undefined}\n data-filename={data?.filename}\n ref={uploadRef}\n >\n <div className={`${baseClass}__card`}>\n <div className={`${baseClass}__media`}>\n <Thumbnail\n collectionSlug={relationTo}\n fileSrc={isImage(data?.mimeType) ? thumbnailSRC : null}\n height={data?.height}\n size=\"none\"\n width={data?.width}\n />\n\n {isEditable && (\n <div className={`${baseClass}__floater`} data-theme=\"dark\">\n <Pill className={`${baseClass}__collectionLabel`} pillStyle=\"dark\" size=\"small\">\n {getTranslation(relatedCollection.labels.singular, i18n)}\n </Pill>\n\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <span className={`${baseClass}__filename`}>\n {data?.filename || t('general:untitled')}\n </span>\n </DocumentDrawerToggler>\n\n {hasExtraFields ? (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__upload-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"write\"\n onClick={toggleDrawer}\n round\n size=\"medium\"\n tooltip={t('fields:editRelationship')}\n />\n ) : null}\n\n <div className={`${baseClass}__divider`} />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swap-drawer-toggler`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }}\n round\n size=\"medium\"\n tooltip={t('fields:swapUpload')}\n />\n\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeUpload()\n }}\n round\n size=\"medium\"\n tooltip={t('fields:removeUpload')}\n />\n </div>\n )}\n </div>\n </div>\n\n {value ? <DocumentDrawer onSave={updateUpload} /> : null}\n {hasExtraFields ? (\n <FieldsDrawer\n data={fields}\n drawerSlug={extraFieldsDrawerSlug}\n drawerTitle={t('general:editLabel', {\n label: getTranslation(relatedCollection.labels.singular, i18n),\n })}\n featureKey=\"upload\"\n handleDrawerSubmit={onExtraFieldsDrawerSubmit}\n schemaPath={schemaPath}\n schemaPathSuffix={relatedCollection.slug}\n />\n ) : null}\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SACEC,MAAM,EACNC,gBAAgB,EAChBC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,YAAY,EACZC,aAAa,EACbC,cAAc,QACT;AACP,SACEC,aAAa,EACbC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,QAEZ;AACP,SAASC,cAAc,EAAEC,OAAO,QAAQ;AACxC,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,KAAK,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAMnF,SAASC,sBAAsB,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAC7B,SAASC,wBAAwB,QAAQ;AACzC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,aAAa,QAAQ;AAC9B,OAAO;AAEP,MAAMC,aAAA,GAAgB;EACpBC,KAAA,EAAO;AACT;AASA,OAAO,MAAMC,eAAA,GAA2CC,KAAA;EACtD,MAAM;IACJC,SAAA,EAAWC,SAAS;IACpBC,IAAA,EAAM;MAAEC,MAAM;MAAEC,UAAU;MAAEC;IAAK,CAAE;IACnCC,MAAM;IACNC;EAAO,CACR,GAAGR,KAAA;EAEJ,IAAI,OAAOM,KAAA,KAAU,UAAU;IAC7B,MAAM,IAAIG,KAAA,CACR;EAEJ;EAEA,MAAM;IACJC,MAAA,EAAQ;MACNC,MAAA,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rB;YACF;YACAwF,KAAK;YACLT,IAAA,EAAK;YACLU,OAAA,EAASzE,CAAA,CAAE;2BAGb4D,IAAA,CAAClH,MAAA;YACCyH,WAAA,EAAY;YACZ1F,SAAA,EAAW,GAAGC,SAAA,gBAAyB;YACvC0F,QAAA,EAAU,CAACtE,UAAA;YACXwE,IAAA,EAAK;YACLC,OAAA,EAAUK,CAAA;cACRA,CAAA,CAAEC,cAAc;cAChBxC,YAAA;YACF;YACAmC,KAAK;YACLT,IAAA,EAAK;YACLU,OAAA,EAASzE,CAAA,CAAE;;;;QAOpBlB,KAAA,gBAAQ8E,IAAA,CAAC/C,cAAA;MAAeiE,MAAA,EAAQtC;SAAmB,MACnDE,cAAA,gBACCkB,IAAA,CAAC5F,YAAA;MACCW,IAAA,EAAMC,MAAA;MACNmG,UAAA,EAAYtE,qBAAA;MACZuE,WAAA,EAAahF,CAAA,CAAE,qBAAqB;QAClCiF,KAAA,EAAOxI,cAAA,CAAe6D,iBAAA,CAAkB2D,MAAM,CAACC,QAAQ,EAAEnE,IAAA;MAC3D;MACAmF,UAAA,EAAW;MACXC,kBAAA,EAAoBpC,yBAAA;MACpBlD,UAAA,EAAYA,UAAA;MACZuF,gBAAA,EAAkB9E,iBAAA,CAAkBI;SAEpC;;AAGV","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/upload/client/drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKnD,OAAO,KAA2C,MAAM,OAAO,CAAA;AA4C/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,oBAAoB,EAAE,CAAA;CAC/C,CAAA;AA6DD,eAAO,MAAM,YAAY,GAAI,4BAA4B,KAAK,KAAG,KAAK,CAAC,SAMtE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/upload/client/drawer/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKnD,OAAO,KAA2C,MAAM,OAAO,CAAA;AA4C/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,oBAAoB,EAAE,CAAA;CAC/C,CAAA;AA6DD,eAAO,MAAM,YAAY,+BAAgC,KAAK,KAAG,KAAK,CAAC,SAMtE,CAAA"}
@@ -1,10 +1,11 @@
1
- import type { ExclusiveUploadFeatureProps } from '../server/index.js';
1
+ import type { CollectionSlug } from 'payload';
2
2
  export type UploadFeaturePropsClient = {
3
3
  collections: {
4
4
  [collection: string]: {
5
5
  hasExtraFields: boolean;
6
6
  };
7
7
  };
8
- } & ExclusiveUploadFeatureProps;
8
+ enabledCollectionSlugs: CollectionSlug[];
9
+ };
9
10
  export declare const UploadFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<UploadFeaturePropsClient, UploadFeaturePropsClient>;
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/upload/client/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAUrE,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,cAAc,EAAE,OAAO,CAAA;SACxB,CAAA;KACF,CAAA;CACF,GAAG,2BAA2B,CAAA;AAE/B,eAAO,MAAM,mBAAmB,kHAqD9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/upload/client/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAY7C,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE;QACX,CAAC,UAAU,EAAE,MAAM,GAAG;YACpB,cAAc,EAAE,OAAO,CAAA;SACxB,CAAA;KACF,CAAA;IACD,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,mBAAmB,kHAqD9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isNodeSelection","UploadIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","INSERT_UPLOAD_WITH_DRAWER_COMMAND","$isUploadNode","UploadNode","UploadPlugin","UploadFeatureClient","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","replace","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode"],"sources":["../../../../src/features/upload/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport type { ExclusiveUploadFeatureProps } from '../server/index.js'\n\nimport { UploadIcon } from '../../../lexical/ui/icons/Upload/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isUploadNode, UploadNode } from './nodes/UploadNode.js'\nimport { UploadPlugin } from './plugin/index.js'\n\nexport type UploadFeaturePropsClient = {\n collections: {\n [collection: string]: {\n hasExtraFields: boolean\n }\n }\n} & ExclusiveUploadFeatureProps\n\nexport const UploadFeatureClient = createClientFeature<UploadFeaturePropsClient>({\n nodes: [UploadNode],\n plugins: [\n {\n Component: UploadPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: UploadIcon,\n key: 'upload',\n keywords: ['upload', 'image', 'file', 'img', 'picture', 'photo', 'media'],\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: UploadIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isUploadNode(firstNode)\n },\n key: 'upload',\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,gBAAgB,QAAQ;AAIjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,iCAAiC,QAAQ;AAClD,SAASC,aAAa,EAAEC,UAAU,QAAQ;AAC1C,SAASC,YAAY,QAAQ;AAU7B,OAAO,MAAMC,mBAAA,GAAsBP,mBAAA,CAA8C;EAC/EQ,KAAA,EAAO,CAACH,UAAA,CAAW;EACnBI,OAAA,EAAS,CACP;IACEC,SAAA,EAAWJ,YAAA;IACXK,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACNZ,4BAAA,CAA6B,CAC3B;MACEa,IAAA,EAAMf,UAAA;MACNgB,GAAA,EAAK;MACLC,QAAA,EAAU,CAAC,UAAU,SAAS,QAAQ,OAAO,WAAW,SAAS,QAAQ;MACzEC,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAACnB,iCAAA,EAAmC;UACxDoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;EACAC,YAAA,EAAc;IACZX,MAAA,EAAQ,CACNX,gCAAA,CAAiC,CAC/B;MACEuB,cAAA,EAAgB1B,UAAA;MAChB2B,QAAA,EAAUA,CAAC;QAAEC;MAAS,CAAE;QACtB,IAAI,CAAC7B,gBAAA,CAAiB6B,SAAA,KAAc,CAACA,SAAA,CAAUC,QAAQ,GAAGC,MAAM,EAAE;UAChE,OAAO;QACT;QAEA,MAAMC,SAAA,GAAYH,SAAA,CAAUC,QAAQ,EAAE,CAAC,EAAE;QACzC,OAAOxB,aAAA,CAAc0B,SAAA;MACvB;MACAf,GAAA,EAAK;MACLE,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAACnB,iCAAA,EAAmC;UACxDoB,OAAA,EAAS;QACX;MACF;IACF,EACD;EAEL;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isNodeSelection","UploadIcon","createClientFeature","slashMenuBasicGroupWithItems","toolbarAddDropdownGroupWithItems","INSERT_UPLOAD_WITH_DRAWER_COMMAND","$isUploadNode","UploadNode","UploadPlugin","UploadFeatureClient","nodes","plugins","Component","position","slashMenu","groups","Icon","key","keywords","label","i18n","t","onSelect","editor","dispatchCommand","replace","toolbarFixed","ChildComponent","isActive","selection","getNodes","length","firstNode"],"sources":["../../../../src/features/upload/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { CollectionSlug } from 'payload'\n\nimport { $isNodeSelection } from 'lexical'\n\nimport { UploadIcon } from '../../../lexical/ui/icons/Upload/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { slashMenuBasicGroupWithItems } from '../../shared/slashMenu/basicGroup.js'\nimport { toolbarAddDropdownGroupWithItems } from '../../shared/toolbar/addDropdownGroup.js'\nimport { INSERT_UPLOAD_WITH_DRAWER_COMMAND } from './drawer/commands.js'\nimport { $isUploadNode, UploadNode } from './nodes/UploadNode.js'\nimport { UploadPlugin } from './plugin/index.js'\n\nexport type UploadFeaturePropsClient = {\n collections: {\n [collection: string]: {\n hasExtraFields: boolean\n }\n }\n enabledCollectionSlugs: CollectionSlug[]\n}\n\nexport const UploadFeatureClient = createClientFeature<UploadFeaturePropsClient>({\n nodes: [UploadNode],\n plugins: [\n {\n Component: UploadPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuBasicGroupWithItems([\n {\n Icon: UploadIcon,\n key: 'upload',\n keywords: ['upload', 'image', 'file', 'img', 'picture', 'photo', 'media'],\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: [\n toolbarAddDropdownGroupWithItems([\n {\n ChildComponent: UploadIcon,\n isActive: ({ selection }) => {\n if (!$isNodeSelection(selection) || !selection.getNodes().length) {\n return false\n }\n\n const firstNode = selection.getNodes()[0]\n return $isUploadNode(firstNode)\n },\n key: 'upload',\n label: ({ i18n }) => {\n return i18n.t('lexical:upload:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UPLOAD_WITH_DRAWER_COMMAND, {\n replace: false,\n })\n },\n },\n ]),\n ],\n },\n})\n"],"mappings":"AAAA;;AAIA,SAASA,gBAAgB,QAAQ;AAEjC,SAASC,UAAU,QAAQ;AAC3B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,gCAAgC,QAAQ;AACjD,SAASC,iCAAiC,QAAQ;AAClD,SAASC,aAAa,EAAEC,UAAU,QAAQ;AAC1C,SAASC,YAAY,QAAQ;AAW7B,OAAO,MAAMC,mBAAA,GAAsBP,mBAAA,CAA8C;EAC/EQ,KAAA,EAAO,CAACH,UAAA,CAAW;EACnBI,OAAA,EAAS,CACP;IACEC,S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