@payloadcms/richtext-lexical 3.86.0-internal.ac46214 → 4.0.0-internal.183b315

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 (1073) hide show
  1. package/dist/@types/assets.d.js +2 -0
  2. package/dist/@types/assets.d.js.map +1 -0
  3. package/dist/cell/rscEntry.d.ts +1 -1
  4. package/dist/cell/rscEntry.d.ts.map +1 -1
  5. package/dist/cell/rscEntry.js +5 -5
  6. package/dist/cell/rscEntry.js.map +1 -1
  7. package/dist/exports/client/Field-VYBSMSRY.js +2 -0
  8. package/dist/exports/client/Field-VYBSMSRY.js.map +7 -0
  9. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js +2 -0
  10. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  11. package/dist/exports/client/bundled.css +1 -1
  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-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  15. package/dist/exports/client/chunk-LH634DPU.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-UD4DQ4AK.js +2 -0
  19. package/dist/exports/client/chunk-UD4DQ4AK.js.map +7 -0
  20. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  21. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  22. package/dist/exports/client/chunk-ZYXHC5CY.js +2 -0
  23. package/dist/exports/client/chunk-ZYXHC5CY.js.map +7 -0
  24. package/dist/exports/client/component-PHZQBOJE.js +2 -0
  25. package/dist/exports/client/component-PHZQBOJE.js.map +7 -0
  26. package/dist/exports/client/componentInline-R3EPNYWF.js +2 -0
  27. package/dist/exports/client/index.d.ts +1 -2
  28. package/dist/exports/client/index.d.ts.map +1 -1
  29. package/dist/exports/client/index.js +33 -33
  30. package/dist/exports/client/index.js.map +4 -4
  31. package/dist/exports/react/index.d.ts +1 -1
  32. package/dist/exports/react/index.d.ts.map +1 -1
  33. package/dist/exports/react/index.js.map +1 -1
  34. package/dist/exports/server/rsc.browser.d.ts +11 -0
  35. package/dist/exports/server/rsc.browser.d.ts.map +1 -0
  36. package/dist/exports/server/rsc.browser.js +10 -0
  37. package/dist/exports/server/rsc.browser.js.map +1 -0
  38. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  39. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  40. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  41. package/dist/features/blockquote/server/index.d.ts +1 -4
  42. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  43. package/dist/features/blockquote/server/index.js +2 -39
  44. package/dist/features/blockquote/server/index.js.map +1 -1
  45. package/dist/features/blockquote/server/schema.d.ts +8 -0
  46. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  47. package/dist/features/blockquote/server/schema.js +15 -0
  48. package/dist/features/blockquote/server/schema.js.map +1 -0
  49. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  50. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  51. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  52. package/dist/features/blocks/client/component/index.css +178 -0
  53. package/dist/features/blocks/client/component/index.d.ts +4 -3
  54. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  55. package/dist/features/blocks/client/component/index.js +89 -25
  56. package/dist/features/blocks/client/component/index.js.map +1 -1
  57. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  58. package/dist/features/blocks/client/componentInline/index.css +85 -0
  59. package/dist/features/blocks/client/componentInline/index.d.ts +4 -3
  60. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  61. package/dist/features/blocks/client/componentInline/index.js +34 -14
  62. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  63. package/dist/features/blocks/client/index.d.ts.map +1 -1
  64. package/dist/features/blocks/client/index.js +0 -2
  65. package/dist/features/blocks/client/index.js.map +1 -1
  66. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  67. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  68. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  69. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  70. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  71. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  72. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  73. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  74. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  75. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  76. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  77. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  78. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  79. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  80. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +4 -0
  81. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  82. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  83. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  84. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  85. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  86. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  87. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  88. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  89. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  90. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  91. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  92. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  93. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  94. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  95. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  96. package/dist/features/blocks/server/index.d.ts +1 -0
  97. package/dist/features/blocks/server/index.d.ts.map +1 -1
  98. package/dist/features/blocks/server/index.js +20 -66
  99. package/dist/features/blocks/server/index.js.map +1 -1
  100. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  101. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  102. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  103. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  104. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  105. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  106. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  107. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  108. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  109. package/dist/features/blocks/server/schema.d.ts +45 -0
  110. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  111. package/dist/features/blocks/server/schema.js +139 -0
  112. package/dist/features/blocks/server/schema.js.map +1 -0
  113. package/dist/features/blocks/server/validate.d.ts +1 -2
  114. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  115. package/dist/features/blocks/server/validate.js.map +1 -1
  116. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  117. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  118. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  123. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  129. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  131. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  132. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  134. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  135. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  137. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  138. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  140. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  141. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  143. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  144. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  146. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  147. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  148. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  149. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  151. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  152. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  154. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  155. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
  157. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  159. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  165. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  170. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  171. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  173. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  174. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  175. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  176. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  177. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  178. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  179. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  180. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  182. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  183. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  185. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  186. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  188. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  189. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  190. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  191. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  192. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  193. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  194. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  195. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  196. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  197. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  198. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
  199. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  200. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  201. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
  202. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
  204. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  207. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  209. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  211. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  215. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  216. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  217. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  218. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  219. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  220. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  221. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  222. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  223. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  224. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  225. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  226. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  227. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  228. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  229. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  230. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  231. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  232. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  233. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  234. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  235. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  236. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  237. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  238. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  239. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  240. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  241. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  242. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  243. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  244. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
  245. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  246. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  247. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  248. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  249. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  250. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
  251. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  252. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  253. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  254. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  255. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  256. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  257. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  258. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  259. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  260. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  261. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  262. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  263. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  264. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  265. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  266. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  267. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  268. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  269. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  270. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  271. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  272. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  273. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  274. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  275. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  276. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  277. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  278. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  279. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  280. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  281. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  282. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  283. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  284. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  285. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  286. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  287. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  288. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  289. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  290. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  291. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  292. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  293. package/dist/features/experimental_table/server/index.d.ts +1 -6
  294. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  295. package/dist/features/experimental_table/server/index.js +4 -102
  296. package/dist/features/experimental_table/server/index.js.map +1 -1
  297. package/dist/features/experimental_table/server/schema.d.ts +27 -0
  298. package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
  299. package/dist/features/experimental_table/server/schema.js +107 -0
  300. package/dist/features/experimental_table/server/schema.js.map +1 -0
  301. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  302. package/dist/features/heading/server/index.d.ts +2 -4
  303. package/dist/features/heading/server/index.d.ts.map +1 -1
  304. package/dist/features/heading/server/index.js +2 -39
  305. package/dist/features/heading/server/index.js.map +1 -1
  306. package/dist/features/heading/server/schema.d.ts +10 -0
  307. package/dist/features/heading/server/schema.d.ts.map +1 -0
  308. package/dist/features/heading/server/schema.js +37 -0
  309. package/dist/features/heading/server/schema.js.map +1 -0
  310. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  311. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  312. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  313. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  314. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  315. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  316. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  317. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  318. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  319. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  320. package/dist/features/horizontalRule/server/index.js +2 -8
  321. package/dist/features/horizontalRule/server/index.js.map +1 -1
  322. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
  323. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  324. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  325. package/dist/features/horizontalRule/server/schema.d.ts +7 -0
  326. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  327. package/dist/features/horizontalRule/server/schema.js +25 -0
  328. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  329. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  330. package/dist/features/link/client/index.d.ts.map +1 -1
  331. package/dist/features/link/client/index.js.map +1 -1
  332. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  333. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  334. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  335. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  336. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  337. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  338. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  339. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  340. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  341. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  342. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  343. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  344. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  345. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  346. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  347. package/dist/features/link/markdownTransformer.d.ts +1 -1
  348. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  349. package/dist/features/link/markdownTransformer.js.map +1 -1
  350. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  351. package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
  352. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  353. package/dist/features/link/nodes/AutoLinkNode.js +2 -1
  354. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  355. package/dist/features/link/nodes/LinkNode.d.ts +3 -3
  356. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  357. package/dist/features/link/nodes/LinkNode.js +2 -1
  358. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  359. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  360. package/dist/features/link/server/baseFields.js.map +1 -1
  361. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  362. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  363. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  364. package/dist/features/link/server/index.d.ts +2 -1
  365. package/dist/features/link/server/index.d.ts.map +1 -1
  366. package/dist/features/link/server/index.js +3 -71
  367. package/dist/features/link/server/index.js.map +1 -1
  368. package/dist/features/link/server/schema.d.ts +32 -0
  369. package/dist/features/link/server/schema.d.ts.map +1 -0
  370. package/dist/features/link/server/schema.js +169 -0
  371. package/dist/features/link/server/schema.js.map +1 -0
  372. package/dist/features/link/server/validate.d.ts +1 -1
  373. package/dist/features/link/server/validate.d.ts.map +1 -1
  374. package/dist/features/link/server/validate.js.map +1 -1
  375. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  376. package/dist/features/lists/checklist/server/index.js +3 -7
  377. package/dist/features/lists/checklist/server/index.js.map +1 -1
  378. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  379. package/dist/features/lists/orderedList/server/index.js +3 -7
  380. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  381. package/dist/features/lists/plugin/index.d.ts +0 -9
  382. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  383. package/dist/features/lists/plugin/index.js.map +1 -1
  384. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  385. package/dist/features/lists/shared/schema.d.ts +18 -0
  386. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  387. package/dist/features/lists/shared/schema.js +62 -0
  388. package/dist/features/lists/shared/schema.js.map +1 -0
  389. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  390. package/dist/features/lists/unorderedList/server/index.js +3 -7
  391. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  392. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
  393. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  394. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  395. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  396. package/dist/features/relationship/client/components/index.css +112 -0
  397. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  398. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  399. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  400. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  401. package/dist/features/relationship/client/plugins/index.d.ts +1 -1
  402. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  403. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  404. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  405. package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
  406. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  407. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
  408. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  409. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  410. package/dist/features/relationship/server/index.d.ts +1 -0
  411. package/dist/features/relationship/server/index.d.ts.map +1 -1
  412. package/dist/features/relationship/server/index.js +2 -0
  413. package/dist/features/relationship/server/index.js.map +1 -1
  414. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  415. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  416. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  417. package/dist/features/relationship/server/schema.d.ts +28 -0
  418. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  419. package/dist/features/relationship/server/schema.js +80 -0
  420. package/dist/features/relationship/server/schema.js.map +1 -0
  421. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
  422. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  423. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
  424. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  425. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  426. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  427. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  428. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  429. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  430. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  431. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  432. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  433. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  434. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  435. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  436. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  437. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  438. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  439. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  440. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  441. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  442. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  443. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  444. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  445. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  446. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  447. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  448. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  449. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  450. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  451. package/dist/features/toolbars/types.d.ts +5 -1
  452. package/dist/features/toolbars/types.d.ts.map +1 -1
  453. package/dist/features/toolbars/types.js.map +1 -1
  454. package/dist/features/typesClient.d.ts +1 -1
  455. package/dist/features/typesClient.d.ts.map +1 -1
  456. package/dist/features/typesClient.js.map +1 -1
  457. package/dist/features/typesServer.d.ts +18 -58
  458. package/dist/features/typesServer.d.ts.map +1 -1
  459. package/dist/features/typesServer.js.map +1 -1
  460. package/dist/features/upload/client/component/index.css +214 -0
  461. package/dist/features/upload/client/component/index.d.ts +2 -2
  462. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  463. package/dist/features/upload/client/component/index.js +86 -63
  464. package/dist/features/upload/client/component/index.js.map +1 -1
  465. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  466. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  467. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  468. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  469. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  470. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  471. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  472. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  473. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  474. package/dist/features/upload/client/plugin/index.js.map +1 -1
  475. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
  476. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  477. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  478. package/dist/features/upload/server/index.d.ts +1 -0
  479. package/dist/features/upload/server/index.d.ts.map +1 -1
  480. package/dist/features/upload/server/index.js +3 -80
  481. package/dist/features/upload/server/index.js.map +1 -1
  482. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  483. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  484. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  485. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  486. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  487. package/dist/features/upload/server/schema.d.ts +52 -0
  488. package/dist/features/upload/server/schema.d.ts.map +1 -0
  489. package/dist/features/upload/server/schema.js +129 -0
  490. package/dist/features/upload/server/schema.js.map +1 -0
  491. package/dist/features/upload/server/validate.d.ts +1 -1
  492. package/dist/features/upload/server/validate.d.ts.map +1 -1
  493. package/dist/features/upload/server/validate.js.map +1 -1
  494. package/dist/field/Diff/converters/link.d.ts +1 -1
  495. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  496. package/dist/field/Diff/converters/link.js.map +1 -1
  497. package/dist/field/Diff/converters/listitem/index.css +80 -0
  498. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  499. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  500. package/dist/field/Diff/converters/listitem/index.js +1 -0
  501. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  502. package/dist/field/Diff/converters/relationship/index.css +108 -0
  503. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  504. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  505. package/dist/field/Diff/converters/relationship/index.js +11 -28
  506. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  507. package/dist/field/Diff/converters/unknown/index.css +37 -0
  508. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  509. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  510. package/dist/field/Diff/converters/unknown/index.js +1 -0
  511. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  512. package/dist/field/Diff/converters/upload/index.css +175 -0
  513. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  514. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  515. package/dist/field/Diff/converters/upload/index.js +7 -2
  516. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  517. package/dist/field/Diff/index.css +156 -0
  518. package/dist/field/Diff/index.d.ts +1 -1
  519. package/dist/field/Diff/index.d.ts.map +1 -1
  520. package/dist/field/Diff/index.js +1 -0
  521. package/dist/field/Diff/index.js.map +1 -1
  522. package/dist/field/Field.d.ts +3 -3
  523. package/dist/field/Field.d.ts.map +1 -1
  524. package/dist/field/Field.js +12 -11
  525. package/dist/field/Field.js.map +1 -1
  526. package/dist/field/RenderLexical/index.d.ts +2 -2
  527. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  528. package/dist/field/RenderLexical/index.js.map +1 -1
  529. package/dist/field/RichTextViewProvider.d.ts +1 -1
  530. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  531. package/dist/field/RichTextViewProvider.js.map +1 -1
  532. package/dist/field/ViewSelector.css +32 -0
  533. package/dist/field/ViewSelector.d.ts +1 -1
  534. package/dist/field/ViewSelector.d.ts.map +1 -1
  535. package/dist/field/ViewSelector.js +1 -0
  536. package/dist/field/ViewSelector.js.map +1 -1
  537. package/dist/field/bundled.css +1 -1
  538. package/dist/field/clientEntry.d.ts +29 -0
  539. package/dist/field/clientEntry.d.ts.map +1 -0
  540. package/dist/field/clientEntry.js +86 -0
  541. package/dist/field/clientEntry.js.map +1 -0
  542. package/dist/field/index.css +57 -0
  543. package/dist/field/index.d.ts +1 -1
  544. package/dist/field/index.d.ts.map +1 -1
  545. package/dist/field/index.js +1 -1
  546. package/dist/field/index.js.map +1 -1
  547. package/dist/field/rscEntry.d.ts +1 -1
  548. package/dist/field/rscEntry.d.ts.map +1 -1
  549. package/dist/field/rscEntry.js +2 -0
  550. package/dist/field/rscEntry.js.map +1 -1
  551. package/dist/hooks.d.ts +6 -0
  552. package/dist/hooks.d.ts.map +1 -0
  553. package/dist/hooks.js +548 -0
  554. package/dist/hooks.js.map +1 -0
  555. package/dist/index.d.ts +11 -18
  556. package/dist/index.d.ts.map +1 -1
  557. package/dist/index.js +67 -632
  558. package/dist/index.js.map +1 -1
  559. package/dist/lexical/LexicalEditor.css +50 -0
  560. package/dist/lexical/LexicalEditor.d.ts +1 -1
  561. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  562. package/dist/lexical/LexicalEditor.js +37 -2
  563. package/dist/lexical/LexicalEditor.js.map +1 -1
  564. package/dist/lexical/LexicalProvider.d.ts +1 -1
  565. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  566. package/dist/lexical/LexicalProvider.js +22 -7
  567. package/dist/lexical/LexicalProvider.js.map +1 -1
  568. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  569. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  570. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  571. package/dist/lexical/config/client/loader.d.ts +1 -1
  572. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  573. package/dist/lexical/config/client/loader.js +5 -1
  574. package/dist/lexical/config/client/loader.js.map +1 -1
  575. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  576. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  577. package/dist/lexical/config/client/sanitize.js.map +1 -1
  578. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  579. package/dist/lexical/config/server/loader.js +12 -9
  580. package/dist/lexical/config/server/loader.js.map +1 -1
  581. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  582. package/dist/lexical/config/server/sanitize.js +9 -17
  583. package/dist/lexical/config/server/sanitize.js.map +1 -1
  584. package/dist/lexical/config/types.d.ts +1 -1
  585. package/dist/lexical/config/types.d.ts.map +1 -1
  586. package/dist/lexical/config/types.js.map +1 -1
  587. package/dist/lexical/nodes/index.d.ts +1 -1
  588. package/dist/lexical/nodes/index.d.ts.map +1 -1
  589. package/dist/lexical/nodes/index.js.map +1 -1
  590. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  591. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  592. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  593. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  594. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  595. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  596. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  597. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  598. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  599. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  600. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  601. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  602. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  603. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  604. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  605. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  606. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  607. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  608. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  609. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  610. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  611. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  612. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  613. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  614. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  615. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  616. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  617. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  618. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  619. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  620. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  621. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  622. package/dist/lexical/theme/EditorTheme.css +359 -0
  623. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  624. package/dist/lexical/theme/EditorTheme.js +1 -0
  625. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  626. package/dist/lexical/ui/ContentEditable.css +95 -0
  627. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  628. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  629. package/dist/lexical/ui/ContentEditable.js +1 -0
  630. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  631. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  632. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  633. package/dist/lexical/ui/icons/Add/index.js +19 -12
  634. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  636. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  637. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  638. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  639. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  640. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  641. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  642. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  643. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  644. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  645. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  646. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  647. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  648. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  649. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  650. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  651. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  652. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  653. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  654. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  655. package/dist/lexical/ui/icons/Block/index.js +13 -28
  656. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  657. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  658. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  659. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  660. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  661. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  662. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  663. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  664. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  665. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  666. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  667. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  668. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  669. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  670. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  671. package/dist/lexical/ui/icons/Code/index.js +15 -13
  672. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  673. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  674. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  675. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  676. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  677. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  678. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  679. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  680. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  681. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  682. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  683. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  684. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  685. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  686. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  687. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  688. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  689. package/dist/lexical/ui/icons/H1/index.js +9 -6
  690. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  691. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  692. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  693. package/dist/lexical/ui/icons/H2/index.js +9 -6
  694. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  695. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  696. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  697. package/dist/lexical/ui/icons/H3/index.js +9 -6
  698. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  699. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  700. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  701. package/dist/lexical/ui/icons/H4/index.js +9 -6
  702. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  703. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  704. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  705. package/dist/lexical/ui/icons/H5/index.js +9 -6
  706. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  707. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  708. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  709. package/dist/lexical/ui/icons/H6/index.js +9 -6
  710. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  711. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  712. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  713. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  714. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  715. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  716. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  717. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  718. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  719. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  720. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  721. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  722. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  723. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  724. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  725. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  726. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  727. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  728. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  729. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  730. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  731. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  732. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  733. package/dist/lexical/ui/icons/Link/index.js +14 -9
  734. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  735. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  736. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  737. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  738. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  739. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  740. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  741. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  742. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  743. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  744. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  745. package/dist/lexical/ui/icons/Page/index.js +21 -0
  746. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  747. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  748. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  749. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  750. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  751. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  752. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  753. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  754. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  755. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  756. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  757. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  758. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  759. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  760. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  761. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  762. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  763. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  764. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  765. package/dist/lexical/ui/icons/Table/index.js +20 -15
  766. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  767. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  768. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  769. package/dist/lexical/ui/icons/Text/index.js +17 -8
  770. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  771. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  772. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  773. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  774. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  775. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  776. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  777. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  778. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  779. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  780. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  781. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  782. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  783. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  784. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  785. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  786. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  787. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  788. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  789. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  790. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  791. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  792. package/dist/types/builtInNodes.d.ts +14 -0
  793. package/dist/types/builtInNodes.d.ts.map +1 -0
  794. package/dist/types/builtInNodes.js +203 -0
  795. package/dist/types/builtInNodes.js.map +1 -0
  796. package/dist/{types.d.ts → types/index.d.ts} +25 -26
  797. package/dist/types/index.d.ts.map +1 -0
  798. package/dist/types/index.js +2 -0
  799. package/dist/types/index.js.map +1 -0
  800. package/dist/types/jsonSchemaHelpers.d.ts +30 -0
  801. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  802. package/dist/types/jsonSchemaHelpers.js +58 -0
  803. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  804. package/dist/types/nodeTypes.d.ts +128 -0
  805. package/dist/types/nodeTypes.d.ts.map +1 -0
  806. package/dist/types/nodeTypes.js +6 -0
  807. package/dist/types/nodeTypes.js.map +1 -0
  808. package/dist/types/schema.d.ts +6 -0
  809. package/dist/types/schema.d.ts.map +1 -0
  810. package/dist/types/schema.js +83 -0
  811. package/dist/types/schema.js.map +1 -0
  812. package/dist/utilities/buildEditorState.d.ts +18 -4
  813. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  814. package/dist/utilities/buildEditorState.js +21 -0
  815. package/dist/utilities/buildEditorState.js.map +1 -1
  816. package/dist/utilities/buildInitialState.d.ts +2 -1
  817. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  818. package/dist/utilities/buildInitialState.js.map +1 -1
  819. package/dist/utilities/createClientFeature.d.ts +1 -1
  820. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  821. package/dist/utilities/createClientFeature.js.map +1 -1
  822. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  823. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  824. package/dist/utilities/editorConfigFactory.js.map +1 -1
  825. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  826. package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
  827. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  828. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  829. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  830. package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
  831. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  832. package/dist/utilities/fieldsDrawer/index.css +12 -0
  833. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  834. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  835. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  836. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  837. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  838. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  839. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  840. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  841. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  842. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  843. package/dist/utilities/generateImportMap.d.ts +1 -1
  844. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  845. package/dist/utilities/generateImportMap.js +7 -3
  846. package/dist/utilities/generateImportMap.js.map +1 -1
  847. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  848. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  849. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  850. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  851. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  852. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  853. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  854. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  855. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  856. package/dist/validate/index.d.ts.map +1 -1
  857. package/package.json +18 -22
  858. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  859. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  860. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  861. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  862. package/dist/exports/client/Field-OVF2FPGD.js +0 -2
  863. package/dist/exports/client/Field-OVF2FPGD.js.map +0 -7
  864. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  865. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  866. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  867. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  868. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  869. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  870. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  871. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  872. package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
  873. package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
  874. package/dist/exports/client/chunk-XFA5M7FY.js +0 -2
  875. package/dist/exports/client/chunk-XFA5M7FY.js.map +0 -7
  876. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  877. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  878. package/dist/exports/client/componentInline-A4H3EY3L.js +0 -2
  879. package/dist/exports/server/migrate.d.ts +0 -16
  880. package/dist/exports/server/migrate.d.ts.map +0 -1
  881. package/dist/exports/server/migrate.js +0 -16
  882. package/dist/exports/server/migrate.js.map +0 -1
  883. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  884. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  885. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  886. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  887. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  888. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  889. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  890. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  891. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  892. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  893. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  894. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  895. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  896. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  897. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  898. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  899. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  900. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  901. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  902. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  903. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  904. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  905. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  906. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  907. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  908. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  909. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  910. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  911. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  912. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  913. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  914. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  915. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  916. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  917. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  918. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  919. package/dist/features/link/nodes/types.d.ts +0 -27
  920. package/dist/features/link/nodes/types.d.ts.map +0 -1
  921. package/dist/features/link/nodes/types.js +0 -2
  922. package/dist/features/link/nodes/types.js.map +0 -1
  923. package/dist/features/lists/htmlConverter.d.ts +0 -5
  924. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  925. package/dist/features/lists/htmlConverter.js +0 -81
  926. package/dist/features/lists/htmlConverter.js.map +0 -1
  927. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  928. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  929. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  930. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  931. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  932. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  933. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  934. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  935. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  936. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  937. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  938. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  939. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  940. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  941. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  942. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  943. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  944. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  945. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  946. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  947. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  948. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  949. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  950. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  951. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  952. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  953. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  954. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  955. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  956. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  957. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  958. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  959. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  960. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  961. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  962. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  963. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  964. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  965. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  966. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  967. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  968. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  969. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  970. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  971. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  972. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  973. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  974. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  975. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  976. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  977. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  978. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  979. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  980. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  981. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  982. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  983. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  984. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  985. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  986. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  987. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  988. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  989. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  990. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  991. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  992. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  993. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  994. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  995. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  996. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  997. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  998. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  999. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  1000. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  1001. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  1002. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  1003. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  1004. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  1005. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  1006. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  1007. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  1008. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  1009. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  1010. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  1011. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  1012. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  1013. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  1014. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  1015. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  1016. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  1017. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  1018. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  1019. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  1020. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  1021. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  1022. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  1023. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  1024. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  1025. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  1026. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  1027. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  1028. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  1029. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  1030. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  1031. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  1032. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  1033. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  1034. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  1035. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  1036. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  1037. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  1038. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  1039. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  1040. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  1041. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  1042. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  1043. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  1044. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  1045. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  1046. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  1047. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  1048. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  1049. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  1050. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  1051. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  1052. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  1053. package/dist/lexical/ui/icons/AI/index.js +0 -34
  1054. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  1055. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  1056. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  1057. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  1058. package/dist/nodeTypes.d.ts +0 -74
  1059. package/dist/nodeTypes.d.ts.map +0 -1
  1060. package/dist/nodeTypes.js +0 -5
  1061. package/dist/nodeTypes.js.map +0 -1
  1062. package/dist/types.d.ts.map +0 -1
  1063. package/dist/types.js +0 -2
  1064. package/dist/types.js.map +0 -1
  1065. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  1066. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  1067. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  1068. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  1069. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  1070. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  1071. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  1072. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  1073. /package/dist/exports/client/{componentInline-A4H3EY3L.js.map → componentInline-R3EPNYWF.js.map} +0 -0
@@ -1,16 +1,19 @@
1
1
  'use client';
2
2
 
3
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
5
5
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
6
6
  import { getTranslation } from '@payloadcms/translations';
7
- import { Button, Collapsible, Drawer, EditDepthProvider, ErrorPill, Form, formatDrawerSlug, FormSubmit, Pill, RenderFields, SectionTitle, useConfig, useDocumentForm, useDocumentInfo, useEditDepth, useFormSubmitted, useServerFunctions, useTranslation } from '@payloadcms/ui';
7
+ import { Button, Collapsible, Drawer, EditDepthProvider, ErrorPill, Form, formatDrawerSlug, MoreIcon, Pill, Popup, PopupList, RenderFields, SectionTitle, useConfig, useDocumentForm, useDocumentInfo, useEditDepth, useFormSubmitted, useServerFunctions, useTranslation, XIcon } from '@payloadcms/ui';
8
8
  import { abortAndIgnore } from '@payloadcms/ui/shared';
9
- import { $getNodeByKey, SKIP_DOM_SELECTION_TAG } from 'lexical';
9
+ import { $getNodeByKey, $getRoot, SKIP_DOM_SELECTION_TAG } from 'lexical';
10
10
  import { deepCopyObjectSimpleWithoutReactComponents, reduceFieldsToValues } from 'payload/shared';
11
11
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
12
12
  import { v4 as uuid } from 'uuid';
13
+ import './index.css';
14
+ import '../../../../utilities/fieldsDrawer/index.css';
13
15
  import { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js';
16
+ import { RegisterFormSubmit, useDrawerSubmit } from '../../../../utilities/fieldsDrawer/useDrawerSubmit.js';
14
17
  import { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js';
15
18
  import { $isBlockNode } from '../nodes/BlocksNode.js';
16
19
  import { BlockContent, useBlockComponentContext } from './BlockContent.js';
@@ -225,7 +228,7 @@ export const BlockComponent = props => {
225
228
  const componentMapRenderedBlockPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockType}`;
226
229
  const clientSchemaMap = featureClientSchemaMap['blocks'];
227
230
  const blocksField = clientSchemaMap?.[componentMapRenderedBlockPath]?.[0];
228
- const clientBlock = blocksField.blockReferences ? typeof blocksField?.blockReferences?.[0] === 'string' ? config.blocksMap[blocksField?.blockReferences?.[0]] : blocksField?.blockReferences?.[0] : blocksField?.blocks?.[0];
231
+ const clientBlock = blocksField?.blockReferences ? typeof blocksField?.blockReferences?.[0] === 'string' ? config.blocksMap[blocksField?.blockReferences?.[0]] : blocksField?.blockReferences?.[0] : blocksField?.blocks?.[0];
229
232
  const {
230
233
  i18n,
231
234
  t
@@ -311,6 +314,29 @@ export const BlockComponent = props => {
311
314
  $getNodeByKey(nodeKey)?.remove();
312
315
  });
313
316
  }, [editor, nodeKey]);
317
+ const [rowIndex, setRowIndex] = React.useState(0);
318
+ useEffect(() => {
319
+ const updateIndex = () => {
320
+ editor.getEditorState().read(() => {
321
+ const root = $getRoot();
322
+ const children = root.getChildren();
323
+ let blockCount = 0;
324
+ for (const child of children) {
325
+ if ($isBlockNode(child)) {
326
+ if (child.getKey() === nodeKey) {
327
+ setRowIndex(blockCount);
328
+ return;
329
+ }
330
+ blockCount++;
331
+ }
332
+ }
333
+ });
334
+ };
335
+ updateIndex();
336
+ return editor.registerUpdateListener(() => {
337
+ updateIndex();
338
+ });
339
+ }, [editor, nodeKey]);
314
340
  const blockDisplayName = clientBlock?.labels?.singular ? getTranslation(clientBlock.labels.singular, i18n) : clientBlock?.slug;
315
341
  const onCollapsedChange = useCallback(changedCollapsed => {
316
342
  void getDocPreferences().then(currentDocPreferences => {
@@ -333,7 +359,7 @@ export const BlockComponent = props => {
333
359
  });
334
360
  }, [getDocPreferences, parentLexicalRichTextField.name, setDocFieldPreferences, formData.id]);
335
361
  const EditButton = useMemo(() => () => /*#__PURE__*/_jsx(Button, {
336
- buttonStyle: "icon-label",
362
+ buttonStyle: "ghost",
337
363
  className: `${baseClass}__editButton`,
338
364
  disabled: !isEditable,
339
365
  el: "button",
@@ -350,13 +376,13 @@ export const BlockComponent = props => {
350
376
  e_0.preventDefault();
351
377
  },
352
378
  round: true,
353
- size: "small",
379
+ size: "medium",
354
380
  tooltip: t('lexical:blocks:inlineBlocks:edit', {
355
381
  label: blockDisplayName
356
382
  })
357
383
  }), [baseClass, isEditable, t, blockDisplayName, toggleDrawer]);
358
384
  const RemoveButton = useMemo(() => () => /*#__PURE__*/_jsx(Button, {
359
- buttonStyle: "icon-label",
385
+ buttonStyle: "ghost",
360
386
  className: `${baseClass}__removeButton`,
361
387
  disabled: !isEditable,
362
388
  icon: "x",
@@ -369,7 +395,7 @@ export const BlockComponent = props => {
369
395
  }), [baseClass, isEditable, removeBlock]);
370
396
  const BlockCollapsible = useMemo(() => ({
371
397
  Actions,
372
- children,
398
+ children: children_0,
373
399
  className,
374
400
  collapsibleProps,
375
401
  disableBlockName,
@@ -378,18 +404,56 @@ export const BlockComponent = props => {
378
404
  fieldHasErrors,
379
405
  Label,
380
406
  Pill: CustomPill,
381
- removeButton
407
+ removeButton,
408
+ showDragHandle = true,
409
+ showRowNumber = true
382
410
  }) => {
383
411
  return /*#__PURE__*/_jsx("div", {
384
412
  className: `${baseClass}__container ${baseClass}-${blockType}`,
385
413
  children: /*#__PURE__*/_jsx(Collapsible, {
414
+ actions: typeof Actions !== 'undefined' ? Actions : isEditable ? /*#__PURE__*/_jsx(Popup, {
415
+ button: /*#__PURE__*/_jsx(MoreIcon, {}),
416
+ buttonClassName: `${baseClass}__actions-button`,
417
+ caret: false,
418
+ horizontalAlign: "right",
419
+ render: ({
420
+ close
421
+ }) => /*#__PURE__*/_jsxs(PopupList.ButtonGroup, {
422
+ buttonSize: "medium",
423
+ children: [(resolvedCustomBlock && editButton !== false || !resolvedCustomBlock && editButton) && /*#__PURE__*/_jsx(PopupList.Button, {
424
+ onClick: () => {
425
+ toggleDrawer();
426
+ close();
427
+ },
428
+ children: t('general:edit')
429
+ }), removeButton !== false && /*#__PURE__*/_jsxs(PopupList.Button, {
430
+ onClick: () => {
431
+ removeBlock();
432
+ close();
433
+ },
434
+ children: [/*#__PURE__*/_jsx(XIcon, {}), t('general:remove')]
435
+ })]
436
+ }),
437
+ size: "large"
438
+ }) : null,
386
439
  className: [`${baseClass}__row`, fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`, className].filter(Boolean).join(' '),
387
440
  collapsibleStyle: fieldHasErrors ? 'error' : 'default',
388
- header: /*#__PURE__*/_jsxs("div", {
441
+ dragHandleProps: showDragHandle ? {
442
+ id: nodeKey,
443
+ attributes: {
444
+ role: 'button',
445
+ tabIndex: 0
446
+ },
447
+ listeners: {}
448
+ } : undefined,
449
+ header: /*#__PURE__*/_jsx("div", {
389
450
  className: `${baseClass}__block-header`,
390
- children: [typeof Label !== 'undefined' ? Label : typeof resolvedCustomLabel !== 'undefined' ? resolvedCustomLabel : /*#__PURE__*/_jsxs("div", {
451
+ children: typeof Label !== 'undefined' ? Label : typeof resolvedCustomLabel !== 'undefined' ? resolvedCustomLabel : /*#__PURE__*/_jsxs("div", {
391
452
  className: `${baseClass}__block-label`,
392
- children: [typeof CustomPill !== 'undefined' ? CustomPill : /*#__PURE__*/_jsx(Pill, {
453
+ children: [showRowNumber && /*#__PURE__*/_jsx("span", {
454
+ className: `${baseClass}__block-number`,
455
+ children: String(rowIndex + 1).padStart(2, '0')
456
+ }), typeof CustomPill !== 'undefined' ? CustomPill : /*#__PURE__*/_jsx(Pill, {
393
457
  className: `${baseClass}__block-pill ${baseClass}__block-pill-${blockType}`,
394
458
  pillStyle: "white",
395
459
  size: "small",
@@ -402,12 +466,7 @@ export const BlockComponent = props => {
402
466
  i18n: i18n,
403
467
  withMessage: true
404
468
  })]
405
- }), /*#__PURE__*/_jsx("div", {
406
- className: `${baseClass}__block-actions`,
407
- children: typeof Actions !== 'undefined' ? Actions : /*#__PURE__*/_jsxs(_Fragment, {
408
- children: [resolvedCustomBlock && editButton !== false || !resolvedCustomBlock && editButton ? /*#__PURE__*/_jsx(EditButton, {}) : null, removeButton !== false && isEditable ? /*#__PURE__*/_jsx(RemoveButton, {}) : null]
409
- })
410
- })]
469
+ })
411
470
  }),
412
471
  isCollapsed: isCollapsed,
413
472
  onToggle: incomingCollapsedState => {
@@ -415,19 +474,25 @@ export const BlockComponent = props => {
415
474
  setIsCollapsed(incomingCollapsedState);
416
475
  },
417
476
  ...(collapsibleProps || {}),
418
- children: children
477
+ children: children_0
419
478
  }, 0)
420
479
  });
421
- }, [resolvedCustomBlock, resolvedCustomLabel, EditButton, RemoveButton, blockDisplayName, baseClass, clientBlock?.admin?.disableBlockName, blockType, i18n, isCollapsed, onCollapsedChange, isEditable]);
480
+ }, [resolvedCustomBlock, resolvedCustomLabel, blockDisplayName, baseClass, clientBlock?.admin?.disableBlockName, blockType, i18n, isCollapsed, onCollapsedChange, isEditable, nodeKey, removeBlock, rowIndex, t, toggleDrawer]);
422
481
  const blockID = formData?.id;
482
+ const {
483
+ headerActions,
484
+ submitRef
485
+ } = useDrawerSubmit();
423
486
  const BlockDrawer = useMemo(() => () => /*#__PURE__*/_jsx(EditDepthProvider, {
424
487
  children: /*#__PURE__*/_jsx(Drawer, {
425
488
  className: '',
489
+ headerActions: headerActions,
426
490
  slug: drawerSlug,
427
491
  title: t(`lexical:blocks:inlineBlocks:${blockID ? 'edit' : 'create'}`, {
428
492
  label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label')
429
493
  }),
430
- children: initialState ? /*#__PURE__*/_jsxs(_Fragment, {
494
+ children: initialState ? /*#__PURE__*/_jsxs("div", {
495
+ className: "fields-drawer",
431
496
  children: [/*#__PURE__*/_jsx(RenderFields, {
432
497
  fields: clientBlock?.fields ?? [],
433
498
  forceRender: true,
@@ -436,13 +501,12 @@ export const BlockComponent = props => {
436
501
  parentSchemaPath: schemaFieldsPath,
437
502
  permissions: true,
438
503
  readOnly: !isEditable
439
- }), /*#__PURE__*/_jsx(FormSubmit, {
440
- programmaticSubmit: true,
441
- children: t('fields:saveChanges')
504
+ }), /*#__PURE__*/_jsx(RegisterFormSubmit, {
505
+ submitRef: submitRef
442
506
  })]
443
507
  }) : null
444
508
  })
445
- }), [initialState, drawerSlug, blockID, blockDisplayName, t, isEditable, clientBlock?.fields, schemaFieldsPath]);
509
+ }), [initialState, drawerSlug, blockID, blockDisplayName, t, isEditable, clientBlock?.fields, schemaFieldsPath, headerActions, submitRef]);
446
510
  // Memoized Form JSX
447
511
  const Block = useMemo(() => {
448
512
  if (!initialState) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","Collapsible","Drawer","EditDepthProvider","ErrorPill","Form","formatDrawerSlug","FormSubmit","Pill","RenderFields","SectionTitle","useConfig","useDocumentForm","useDocumentInfo","useEditDepth","useFormSubmitted","useServerFunctions","useTranslation","abortAndIgnore","$getNodeByKey","SKIP_DOM_SELECTION_TAG","deepCopyObjectSimpleWithoutReactComponents","reduceFieldsToValues","React","useCallback","useEffect","useMemo","useRef","v4","uuid","useEditorConfigContext","useLexicalDrawer","$isBlockNode","BlockContent","useBlockComponentContext","removeEmptyArrayValues","BlockComponent","props","cacheBuster","className","baseClass","CustomBlock","CustomBlockFromProps","CustomLabel","CustomLabelFromProps","formData","nodeKey","submitted","id","collectionSlug","globalSlug","fieldProps","featureClientSchemaMap","field","parentLexicalRichTextField","initialLexicalFormState","schemaPath","uuidFromContext","fields","parentDocumentFields","onChangeAbortControllerRef","AbortController","editDepth","errorCount","setErrorCount","useState","config","drawerSlug","slug","depth","toggleDrawer","getDocPreferences","setDocFieldPreferences","editor","isEditable","blockType","getFormState","schemaFieldsPath","initialState","setInitialState","cachedFormState","formState","mergedState","Object","fromEntries","entries","map","fieldName","fieldState","initialValue","value","blockName","passesCondition","valid","hasMounted","prevCacheBuster","current","formUuid","setCustomLabel","undefined","customComponents","BlockLabel","setCustomBlock","Block","resolvedCustomBlock","_jsx","isEditor","isJSXConverter","resolvedCustomLabel","abortController","awaitInitialState","state","data","docPermissions","docPreferences","documentFormState","excludeFiles","initialBlockData","operation","readOnly","renderAllFields","signal","newFormStateData","update","node","newData","setFields","tag","_components","isCollapsed","setIsCollapsed","collapsed","componentMapRenderedBlockPath","clientSchemaMap","blocksField","clientBlock","blockReferences","blocksMap","blocks","i18n","t","onChange","prevFormState","submit","controller","newFormState","initialBlockFormState","setTimeout","rowErrorCount","formField","values","removeBlock","remove","blockDisplayName","labels","singular","onCollapsedChange","changedCollapsed","then","currentDocPreferences","currentFieldPreferences","name","collapsedArray","newCollapsed","length","includes","push","splice","indexOf","hello","EditButton","buttonStyle","disabled","el","icon","onClick","e","preventDefault","stopPropagation","onMouseDown","round","size","tooltip","label","RemoveButton","BlockCollapsible","Actions","children","collapsibleProps","disableBlockName","editButton","fieldHasErrors","Label","CustomPill","removeButton","filter","Boolean","join","collapsibleStyle","header","_jsxs","pillStyle","admin","path","count","withMessage","_Fragment","onToggle","incomingCollapsedState","blockID","BlockDrawer","title","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","programmaticSubmit","style","display","beforeSubmit","onSubmit","formSchema"],"sources":["../../../../../src/features/blocks/client/component/index.tsx"],"sourcesContent":["'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n Drawer,\n EditDepthProvider,\n ErrorPill,\n Form,\n formatDrawerSlug,\n FormSubmit,\n Pill,\n RenderFields,\n SectionTitle,\n useConfig,\n useDocumentForm,\n useDocumentInfo,\n useEditDepth,\n useFormSubmitted,\n useServerFunctions,\n useTranslation,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { $getNodeByKey, SKIP_DOM_SELECTION_TAG } from 'lexical'\nimport {\n type BlocksFieldClient,\n type ClientBlock,\n type CollapsedPreferences,\n type FormState,\n} from 'payload'\nimport { deepCopyObjectSimpleWithoutReactComponents, reduceFieldsToValues } from 'payload/shared'\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { ViewMapBlockComponentProps } from '../../../../types.js'\nimport type { BlockFields } from '../../server/nodes/BlocksNode.js'\n\nimport './index.scss'\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { $isBlockNode } from '../nodes/BlocksNode.js'\nimport {\n type BlockCollapsibleWithErrorProps,\n BlockContent,\n useBlockComponentContext,\n} from './BlockContent.js'\nimport { removeEmptyArrayValues } from './removeEmptyArrayValues.js'\n\nexport type BlockComponentProps<TFormData extends Record<string, unknown> = BlockFields> = {\n /**\n * Can be modified by the node in order to trigger the re-fetch of the initial state based on the\n * formData. This is useful when node.setFields() is explicitly called from outside of the form - in\n * this case, the new field state is likely not reflected in the form state, so we need to re-fetch\n */\n readonly cacheBuster: number\n readonly className: string\n /**\n * Custom block component from view map\n * Will be rendered with useBlockComponentContext hook.\n */\n readonly CustomBlock?: React.FC<ViewMapBlockComponentProps>\n /**\n * Custom block label from view map\n * Will be rendered with useBlockComponentContext hook.\n */\n readonly CustomLabel?: React.FC<ViewMapBlockComponentProps>\n /**\n * The block's form data (field values).\n */\n readonly formData: TFormData\n /**\n * The unique key identifying this block node in the current editor instance.\n */\n readonly nodeKey: string\n}\n\nexport const BlockComponent: React.FC<BlockComponentProps> = (props) => {\n const {\n cacheBuster,\n className: baseClass,\n CustomBlock: CustomBlockFromProps,\n CustomLabel: CustomLabelFromProps,\n formData,\n nodeKey,\n } = props\n\n const submitted = useFormSubmitted()\n const { id, collectionSlug, globalSlug } = useDocumentInfo()\n const {\n fieldProps: {\n featureClientSchemaMap,\n field: parentLexicalRichTextField,\n initialLexicalFormState,\n schemaPath,\n },\n uuid: uuidFromContext,\n } = useEditorConfigContext()\n\n const { fields: parentDocumentFields } = useDocumentForm()\n const onChangeAbortControllerRef = useRef(new AbortController())\n const editDepth = useEditDepth()\n const [errorCount, setErrorCount] = React.useState(0)\n\n const { config } = useConfig()\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-blocks-create-${uuidFromContext}-${formData.id}`,\n depth: editDepth,\n })\n const { toggleDrawer } = useLexicalDrawer(drawerSlug)\n\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n\n const blockType = formData.blockType\n\n const { getFormState } = useServerFunctions()\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockType}.fields`\n\n const [initialState, setInitialState] = React.useState<false | FormState | undefined>(() => {\n // Initial form state that was calculated server-side. May have stale values\n const cachedFormState = initialLexicalFormState?.[formData.id]?.formState\n if (!cachedFormState) {\n return false\n }\n\n // Merge current formData values into the cached form state\n // This ensures that when the component remounts (e.g., due to view changes), we don't lose user edits\n const mergedState = Object.fromEntries(\n Object.entries(cachedFormState).map(([fieldName, fieldState]) => [\n fieldName,\n fieldName in formData\n ? {\n ...fieldState,\n initialValue: formData[fieldName],\n value: formData[fieldName],\n }\n : fieldState,\n ]),\n )\n\n // Manually add blockName, as it's not part of cachedFormState\n mergedState.blockName = {\n initialValue: formData.blockName,\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n return mergedState\n })\n\n const hasMounted = useRef(false)\n const prevCacheBuster = useRef(cacheBuster)\n useEffect(() => {\n if (hasMounted.current) {\n if (prevCacheBuster.current !== cacheBuster) {\n setInitialState(false)\n }\n prevCacheBuster.current = cacheBuster\n } else {\n hasMounted.current = true\n }\n }, [cacheBuster])\n\n const [formUuid] = React.useState(() => uuid())\n\n // Server-rendered custom components (from admin.components, NOT viewMap).\n // When viewMap components exist (CustomBlockFromProps/CustomLabelFromProps),\n // we render them directly with formData instead, so these states are unused.\n const [CustomLabel, setCustomLabel] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomLabelFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.BlockLabel ?? undefined\n })\n\n const [CustomBlock, setCustomBlock] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomBlockFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.Block ?? undefined\n })\n\n // When viewMap components exist, render directly with formData (always current from\n // the lexical node). When they don't, fall back to server-rendered state.\n const resolvedCustomBlock = useMemo(() => {\n if (CustomBlockFromProps) {\n return (\n <CustomBlockFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useBlockComponentContext={useBlockComponentContext}\n />\n )\n }\n return CustomBlock\n }, [CustomBlockFromProps, baseClass, formData, nodeKey, CustomBlock])\n\n const resolvedCustomLabel = useMemo(() => {\n if (CustomLabelFromProps) {\n return (\n <CustomLabelFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useBlockComponentContext={useBlockComponentContext}\n />\n )\n }\n return CustomLabel\n }, [CustomLabelFromProps, baseClass, formData, nodeKey, CustomLabel])\n\n // Initial state for newly created blocks\n useEffect(() => {\n const abortController = new AbortController()\n\n const awaitInitialState = async () => {\n /*\n * This will only run if a new block is created. For all existing blocks that are loaded when the document is loaded, or when the form is saved,\n * this is not run, as the lexical field RSC will fetch the state server-side and pass it to the client. That way, we avoid unnecessary client-side\n * requests. Though for newly created blocks, we need to fetch the state client-side, as the server doesn't know about the block yet.\n */\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: formData,\n docPermissions: { fields: true },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n globalSlug,\n initialBlockData: formData,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: abortController.signal,\n })\n\n if (state) {\n state.blockName = {\n initialValue: formData.blockName,\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n const newFormStateData: BlockFields = reduceFieldsToValues(\n deepCopyObjectSimpleWithoutReactComponents(state, { excludeFiles: true }),\n true,\n ) as BlockFields\n\n // Things like default values may come back from the server => update the node with the new data\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n const newData = newFormStateData\n newData.blockType = blockType\n\n node.setFields(newData, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n\n setInitialState(state)\n if (!CustomLabelFromProps) {\n setCustomLabel(state._components?.customComponents?.BlockLabel ?? undefined)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(state._components?.customComponents?.Block ?? undefined)\n }\n }\n }\n\n if (formData && !initialState) {\n void awaitInitialState()\n }\n\n return () => {\n abortAndIgnore(abortController)\n }\n }, [\n getFormState,\n schemaFieldsPath,\n isEditable,\n id,\n CustomLabelFromProps,\n CustomBlockFromProps,\n formData,\n editor,\n nodeKey,\n initialState,\n collectionSlug,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n blockType,\n ])\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(\n initialLexicalFormState?.[formData.id]?.collapsed ?? false,\n )\n\n const componentMapRenderedBlockPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockType}`\n\n const clientSchemaMap = featureClientSchemaMap['blocks']\n\n const blocksField: BlocksFieldClient | undefined = clientSchemaMap?.[\n componentMapRenderedBlockPath\n ]?.[0] as BlocksFieldClient\n\n const clientBlock: ClientBlock | undefined = blocksField.blockReferences\n ? typeof blocksField?.blockReferences?.[0] === 'string'\n ? config.blocksMap[blocksField?.blockReferences?.[0]]\n : blocksField?.blockReferences?.[0]\n : blocksField?.blocks?.[0]\n\n const { i18n, t } = useTranslation<object, string>()\n\n const onChange = useCallback(\n async ({ formState: prevFormState, submit }: { formState: FormState; submit?: boolean }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state: newFormState } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: submit ? true : false,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!newFormState) {\n return prevFormState\n }\n\n if (prevFormState.blockName) {\n newFormState.blockName = prevFormState.blockName\n }\n\n const newFormStateData: BlockFields = reduceFieldsToValues(\n removeEmptyArrayValues({\n fields: deepCopyObjectSimpleWithoutReactComponents(newFormState, { excludeFiles: true }),\n }),\n true,\n ) as BlockFields\n\n setTimeout(() => {\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n const newData = newFormStateData\n newData.blockType = blockType\n node.setFields(newData, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n }, 0)\n\n if (submit) {\n if (!CustomLabelFromProps) {\n setCustomLabel(newFormState._components?.customComponents?.BlockLabel ?? undefined)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(newFormState._components?.customComponents?.Block ?? undefined)\n }\n\n let rowErrorCount = 0\n for (const formField of Object.values(newFormState)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n\n return newFormState\n },\n\n [\n getFormState,\n id,\n collectionSlug,\n getDocPreferences,\n globalSlug,\n schemaFieldsPath,\n blockType,\n parentDocumentFields,\n isEditable,\n editor,\n nodeKey,\n CustomBlockFromProps,\n CustomLabelFromProps,\n ],\n )\n\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const blockDisplayName = clientBlock?.labels?.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock?.slug\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences =\n currentDocPreferences?.fields?.[parentLexicalRichTextField.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(parentLexicalRichTextField.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, parentLexicalRichTextField.name, setDocFieldPreferences, formData.id],\n )\n\n const EditButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__editButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={(e) => {\n e.preventDefault()\n e.stopPropagation()\n toggleDrawer()\n return false\n }}\n onMouseDown={(e) => {\n // Needed to preserve lexical selection for toggleDrawer lexical selection restore.\n // I believe this is needed due to this button (usually) being inside of a collapsible.\n e.preventDefault()\n }}\n round\n size=\"small\"\n tooltip={t('lexical:blocks:inlineBlocks:edit', { label: blockDisplayName })}\n />\n ),\n [baseClass, isEditable, t, blockDisplayName, toggleDrawer],\n )\n\n const RemoveButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n ),\n [baseClass, isEditable, removeBlock],\n )\n\n const BlockCollapsible = useMemo(\n () =>\n ({\n Actions,\n children,\n className,\n collapsibleProps,\n disableBlockName,\n editButton,\n errorCount,\n fieldHasErrors,\n Label,\n Pill: CustomPill,\n removeButton,\n }: BlockCollapsibleWithErrorProps) => {\n return (\n <div className={`${baseClass}__container ${baseClass}-${blockType}`}>\n <Collapsible\n className={[\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n <div className={`${baseClass}__block-header`}>\n {typeof Label !== 'undefined' ? (\n Label\n ) : typeof resolvedCustomLabel !== 'undefined' ? (\n resolvedCustomLabel\n ) : (\n <div className={`${baseClass}__block-label`}>\n {typeof CustomPill !== 'undefined' ? (\n CustomPill\n ) : (\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${blockType}`}\n pillStyle=\"white\"\n size=\"small\"\n >\n {blockDisplayName ?? blockType}\n </Pill>\n )}\n {!disableBlockName && !clientBlock?.admin?.disableBlockName && (\n <SectionTitle path=\"blockName\" readOnly={!isEditable} />\n )}\n\n {fieldHasErrors && (\n <ErrorPill count={errorCount ?? 0} i18n={i18n} withMessage />\n )}\n </div>\n )}\n\n <div className={`${baseClass}__block-actions`}>\n {typeof Actions !== 'undefined' ? (\n Actions\n ) : (\n <>\n {(resolvedCustomBlock && editButton !== false) ||\n (!resolvedCustomBlock && editButton) ? (\n <EditButton />\n ) : null}\n {removeButton !== false && isEditable ? <RemoveButton /> : null}\n </>\n )}\n </div>\n </div>\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n {...(collapsibleProps || {})}\n >\n {children}\n </Collapsible>\n </div>\n )\n },\n [\n resolvedCustomBlock,\n resolvedCustomLabel,\n EditButton,\n RemoveButton,\n blockDisplayName,\n baseClass,\n clientBlock?.admin?.disableBlockName,\n blockType,\n i18n,\n isCollapsed,\n onCollapsedChange,\n isEditable,\n ],\n )\n\n const blockID = formData?.id\n\n const BlockDrawer = useMemo(\n () => () => (\n <EditDepthProvider>\n <Drawer\n className={''}\n slug={drawerSlug}\n title={t(`lexical:blocks:inlineBlocks:${blockID ? 'edit' : 'create'}`, {\n label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label'),\n })}\n >\n {initialState ? (\n <>\n <RenderFields\n fields={clientBlock?.fields ?? []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <FormSubmit programmaticSubmit={true}>{t('fields:saveChanges')}</FormSubmit>\n </>\n ) : null}\n </Drawer>\n </EditDepthProvider>\n ),\n [\n initialState,\n drawerSlug,\n blockID,\n blockDisplayName,\n t,\n isEditable,\n clientBlock?.fields,\n schemaFieldsPath,\n // DO NOT ADD FORMDATA HERE! Adding formData will kick you out of sub block editors while writing.\n ],\n )\n\n // Memoized Form JSX\n const Block = useMemo(() => {\n if (!initialState) {\n return null\n }\n return (\n <div data-block-drawer-slug={drawerSlug} style={{ display: 'contents' }}>\n <Form\n beforeSubmit={[\n async ({ formState }) => {\n // This is only called when form is submitted from drawer - usually only the case if the block has a custom Block component\n return await onChange({ formState, submit: true })\n },\n ]}\n el=\"div\"\n fields={clientBlock?.fields ?? []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={(formState, newData) => {\n // This is only called when form is submitted from drawer - usually only the case if the block has a custom Block component\n newData.blockType = blockType\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n node.setFields(newData as BlockFields, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n toggleDrawer()\n }}\n submitted={submitted}\n uuid={formUuid}\n >\n <BlockContent\n baseClass={baseClass}\n BlockDrawer={BlockDrawer}\n Collapsible={BlockCollapsible}\n CustomBlock={resolvedCustomBlock}\n CustomLabel={resolvedCustomLabel}\n EditButton={EditButton}\n errorCount={errorCount}\n formSchema={clientBlock?.fields ?? []}\n initialState={initialState}\n nodeKey={nodeKey}\n RemoveButton={RemoveButton}\n />\n </Form>\n </div>\n )\n }, [\n BlockCollapsible,\n BlockDrawer,\n resolvedCustomBlock,\n resolvedCustomLabel,\n blockType,\n drawerSlug,\n RemoveButton,\n EditButton,\n baseClass,\n editor,\n errorCount,\n toggleDrawer,\n clientBlock?.fields,\n formUuid,\n initialState,\n nodeKey,\n onChange,\n submitted,\n ])\n\n if (!clientBlock) {\n return (\n <BlockCollapsible disableBlockName={true} fieldHasErrors={true}>\n <div className={`${baseClass}-not-found`}>\n Error: Block '{blockType}' not found in the config but exists in the lexical data\n </div>\n </BlockCollapsible>\n )\n }\n\n return Block\n}\n"],"mappings":"AAAA;;;AAEA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SACEC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,iBAAiB,EACjBC,SAAS,EACTC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,IAAI,EACJC,YAAY,EACZC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,eAAe,EACfC,YAAY,EACZC,gBAAgB,EAChBC,kBAAkB,EAClBC,cAAc,QACT;AACP,SAASC,cAAc,QAAQ;AAC/B,SAASC,aAAa,EAAEC,sBAAsB,QAAQ;AAOtD,SAASC,0CAA0C,EAAEC,oBAAoB,QAAQ;AACjF,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ;AAC/D,S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Ad,UAAA,EACAlI,SAAA,EACAiC,MAAA,EACAV,UAAA,EACAO,YAAA,EACAiE,WAAA,EAAa7E,MAAA,EACbuC,QAAA,EACAnB,YAAA,EACAhC,OAAA,EACA+F,QAAA,EACA9F,SAAA,CACD;EAED,IAAI,CAACwF,WAAA,EAAa;IAChB,oBACE9B,IAAA,CAACgF,gBAAA;MAAiBI,gBAAA,EAAkB;MAAME,cAAA,EAAgB;gBACxD,aAAAS,KAAA,CAAC;QAAIjK,SAAA,EAAW,GAAGC,SAAA,YAAqB;mBAAE,kBACzBmC,SAAA,EAAU;;;EAIjC;EAEA,OAAO4B,KAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","Collapsible","Drawer","EditDepthProvider","ErrorPill","Form","formatDrawerSlug","MoreIcon","Pill","Popup","PopupList","RenderFields","SectionTitle","useConfig","useDocumentForm","useDocumentInfo","useEditDepth","useFormSubmitted","useServerFunctions","useTranslation","XIcon","abortAndIgnore","$getNodeByKey","$getRoot","SKIP_DOM_SELECTION_TAG","deepCopyObjectSimpleWithoutReactComponents","reduceFieldsToValues","React","useCallback","useEffect","useMemo","useRef","v4","uuid","useEditorConfigContext","RegisterFormSubmit","useDrawerSubmit","useLexicalDrawer","$isBlockNode","BlockContent","useBlockComponentContext","removeEmptyArrayValues","BlockComponent","props","cacheBuster","className","baseClass","CustomBlock","CustomBlockFromProps","CustomLabel","CustomLabelFromProps","formData","nodeKey","submitted","id","collectionSlug","globalSlug","fieldProps","featureClientSchemaMap","field","parentLexicalRichTextField","initialLexicalFormState","schemaPath","uuidFromContext","fields","parentDocumentFields","onChangeAbortControllerRef","AbortController","editDepth","errorCount","setErrorCount","useState","config","drawerSlug","slug","depth","toggleDrawer","getDocPreferences","setDocFieldPreferences","editor","isEditable","blockType","getFormState","schemaFieldsPath","initialState","setInitialState","cachedFormState","formState","mergedState","Object","fromEntries","entries","map","fieldName","fieldState","initialValue","value","blockName","passesCondition","valid","hasMounted","prevCacheBuster","current","formUuid","setCustomLabel","undefined","customComponents","BlockLabel","setCustomBlock","Block","resolvedCustomBlock","_jsx","isEditor","isJSXConverter","resolvedCustomLabel","abortController","awaitInitialState","state","data","docPermissions","docPreferences","documentFormState","excludeFiles","initialBlockData","operation","readOnly","renderAllFields","signal","newFormStateData","update","node","newData","setFields","tag","_components","isCollapsed","setIsCollapsed","collapsed","componentMapRenderedBlockPath","clientSchemaMap","blocksField","clientBlock","blockReferences","blocksMap","blocks","i18n","t","onChange","prevFormState","submit","controller","newFormState","initialBlockFormState","setTimeout","rowErrorCount","formField","values","removeBlock","remove","rowIndex","setRowIndex","updateIndex","getEditorState","read","root","children","getChildren","blockCount","child","getKey","registerUpdateListener","blockDisplayName","labels","singular","onCollapsedChange","changedCollapsed","then","currentDocPreferences","currentFieldPreferences","name","collapsedArray","newCollapsed","length","includes","push","splice","indexOf","hello","EditButton","buttonStyle","disabled","el","icon","onClick","e","preventDefault","stopPropagation","onMouseDown","round","size","tooltip","label","RemoveButton","BlockCollapsible","Actions","collapsibleProps","disableBlockName","editButton","fieldHasErrors","Label","CustomPill","removeButton","showDragHandle","showRowNumber","actions","button","buttonClassName","caret","horizontalAlign","render","close","_jsxs","ButtonGroup","buttonSize","filter","Boolean","join","collapsibleStyle","dragHandleProps","attributes","role","tabIndex","listeners","header","String","padStart","pillStyle","admin","path","count","withMessage","onToggle","incomingCollapsedState","blockID","headerActions","submitRef","BlockDrawer","title","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","style","display","beforeSubmit","onSubmit","formSchema"],"sources":["../../../../../src/features/blocks/client/component/index.tsx"],"sourcesContent":["'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n Drawer,\n EditDepthProvider,\n ErrorPill,\n Form,\n formatDrawerSlug,\n MoreIcon,\n Pill,\n Popup,\n PopupList,\n RenderFields,\n SectionTitle,\n useConfig,\n useDocumentForm,\n useDocumentInfo,\n useEditDepth,\n useFormSubmitted,\n useServerFunctions,\n useTranslation,\n XIcon,\n} from '@payloadcms/ui'\nimport { abortAndIgnore } from '@payloadcms/ui/shared'\nimport { $getNodeByKey, $getRoot, SKIP_DOM_SELECTION_TAG } from 'lexical'\nimport {\n type BlocksFieldClient,\n type ClientBlock,\n type CollapsedPreferences,\n type FormState,\n} from 'payload'\nimport { deepCopyObjectSimpleWithoutReactComponents, reduceFieldsToValues } from 'payload/shared'\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { ViewMapBlockComponentProps } from '../../../../types/index.js'\nimport type { BlockFields } from '../../server/schema.js'\n\nimport './index.css'\nimport '../../../../utilities/fieldsDrawer/index.css'\nimport { useEditorConfigContext } from '../../../../lexical/config/client/EditorConfigProvider.js'\nimport {\n RegisterFormSubmit,\n useDrawerSubmit,\n} from '../../../../utilities/fieldsDrawer/useDrawerSubmit.js'\nimport { useLexicalDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDrawer.js'\nimport { $isBlockNode } from '../nodes/BlocksNode.js'\nimport {\n type BlockCollapsibleWithErrorProps,\n BlockContent,\n useBlockComponentContext,\n} from './BlockContent.js'\nimport { removeEmptyArrayValues } from './removeEmptyArrayValues.js'\n\nexport type BlockComponentProps<TFormData extends Record<string, unknown> = BlockFields> = {\n /**\n * Can be modified by the node in order to trigger the re-fetch of the initial state based on the\n * formData. This is useful when node.setFields() is explicitly called from outside of the form - in\n * this case, the new field state is likely not reflected in the form state, so we need to re-fetch\n */\n readonly cacheBuster: number\n readonly className: string\n /**\n * Custom block component from view map\n * Will be rendered with useBlockComponentContext hook.\n */\n readonly CustomBlock?: React.FC<ViewMapBlockComponentProps>\n /**\n * Custom block label from view map\n * Will be rendered with useBlockComponentContext hook.\n */\n readonly CustomLabel?: React.FC<ViewMapBlockComponentProps>\n /**\n * The block's form data (field values).\n */\n readonly formData: TFormData\n /**\n * The unique key identifying this block node in the current editor instance.\n */\n readonly nodeKey: string\n}\n\nexport const BlockComponent: React.FC<BlockComponentProps> = (props) => {\n const {\n cacheBuster,\n className: baseClass,\n CustomBlock: CustomBlockFromProps,\n CustomLabel: CustomLabelFromProps,\n formData,\n nodeKey,\n } = props\n\n const submitted = useFormSubmitted()\n const { id, collectionSlug, globalSlug } = useDocumentInfo()\n const {\n fieldProps: {\n featureClientSchemaMap,\n field: parentLexicalRichTextField,\n initialLexicalFormState,\n schemaPath,\n },\n uuid: uuidFromContext,\n } = useEditorConfigContext()\n\n const { fields: parentDocumentFields } = useDocumentForm()\n const onChangeAbortControllerRef = useRef(new AbortController())\n const editDepth = useEditDepth()\n const [errorCount, setErrorCount] = React.useState(0)\n\n const { config } = useConfig()\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-blocks-create-${uuidFromContext}-${formData.id}`,\n depth: editDepth,\n })\n const { toggleDrawer } = useLexicalDrawer(drawerSlug)\n\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n\n const blockType = formData.blockType\n\n const { getFormState } = useServerFunctions()\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockType}.fields`\n\n const [initialState, setInitialState] = React.useState<false | FormState | undefined>(() => {\n // Initial form state that was calculated server-side. May have stale values\n const cachedFormState = initialLexicalFormState?.[formData.id]?.formState\n if (!cachedFormState) {\n return false\n }\n\n // Merge current formData values into the cached form state\n // This ensures that when the component remounts (e.g., due to view changes), we don't lose user edits\n const mergedState = Object.fromEntries(\n Object.entries(cachedFormState).map(([fieldName, fieldState]) => [\n fieldName,\n fieldName in formData\n ? {\n ...fieldState,\n initialValue: formData[fieldName],\n value: formData[fieldName],\n }\n : fieldState,\n ]),\n )\n\n // Manually add blockName, as it's not part of cachedFormState\n mergedState.blockName = {\n initialValue: formData.blockName,\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n return mergedState\n })\n\n const hasMounted = useRef(false)\n const prevCacheBuster = useRef(cacheBuster)\n useEffect(() => {\n if (hasMounted.current) {\n if (prevCacheBuster.current !== cacheBuster) {\n setInitialState(false)\n }\n prevCacheBuster.current = cacheBuster\n } else {\n hasMounted.current = true\n }\n }, [cacheBuster])\n\n const [formUuid] = React.useState(() => uuid())\n\n // Server-rendered custom components (from admin.components, NOT viewMap).\n // When viewMap components exist (CustomBlockFromProps/CustomLabelFromProps),\n // we render them directly with formData instead, so these states are unused.\n const [CustomLabel, setCustomLabel] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomLabelFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.BlockLabel ?? undefined\n })\n\n const [CustomBlock, setCustomBlock] = React.useState<React.ReactNode | undefined>(() => {\n if (CustomBlockFromProps) {\n return undefined\n }\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n return initialState?.['_components']?.customComponents?.Block ?? undefined\n })\n\n // When viewMap components exist, render directly with formData (always current from\n // the lexical node). When they don't, fall back to server-rendered state.\n const resolvedCustomBlock = useMemo(() => {\n if (CustomBlockFromProps) {\n return (\n <CustomBlockFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useBlockComponentContext={useBlockComponentContext}\n />\n )\n }\n return CustomBlock\n }, [CustomBlockFromProps, baseClass, formData, nodeKey, CustomBlock])\n\n const resolvedCustomLabel = useMemo(() => {\n if (CustomLabelFromProps) {\n return (\n <CustomLabelFromProps\n className={baseClass}\n formData={formData}\n isEditor={true}\n isJSXConverter={false}\n nodeKey={nodeKey}\n // eslint-disable-next-line react-compiler/react-compiler -- intentionally passed as a prop for custom block components to call\n useBlockComponentContext={useBlockComponentContext}\n />\n )\n }\n return CustomLabel\n }, [CustomLabelFromProps, baseClass, formData, nodeKey, CustomLabel])\n\n // Initial state for newly created blocks\n useEffect(() => {\n const abortController = new AbortController()\n\n const awaitInitialState = async () => {\n /*\n * This will only run if a new block is created. For all existing blocks that are loaded when the document is loaded, or when the form is saved,\n * this is not run, as the lexical field RSC will fetch the state server-side and pass it to the client. That way, we avoid unnecessary client-side\n * requests. Though for newly created blocks, we need to fetch the state client-side, as the server doesn't know about the block yet.\n */\n const { state } = await getFormState({\n id,\n collectionSlug,\n data: formData,\n docPermissions: { fields: true },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n globalSlug,\n initialBlockData: formData,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: true,\n schemaPath: schemaFieldsPath,\n signal: abortController.signal,\n })\n\n if (state) {\n state.blockName = {\n initialValue: formData.blockName,\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n }\n\n const newFormStateData: BlockFields = reduceFieldsToValues(\n deepCopyObjectSimpleWithoutReactComponents(state, { excludeFiles: true }),\n true,\n ) as BlockFields\n\n // Things like default values may come back from the server => update the node with the new data\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n const newData = newFormStateData\n newData.blockType = blockType\n\n node.setFields(newData, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n\n setInitialState(state)\n if (!CustomLabelFromProps) {\n setCustomLabel(state._components?.customComponents?.BlockLabel ?? undefined)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(state._components?.customComponents?.Block ?? undefined)\n }\n }\n }\n\n if (formData && !initialState) {\n void awaitInitialState()\n }\n\n return () => {\n abortAndIgnore(abortController)\n }\n }, [\n getFormState,\n schemaFieldsPath,\n isEditable,\n id,\n CustomLabelFromProps,\n CustomBlockFromProps,\n formData,\n editor,\n nodeKey,\n initialState,\n collectionSlug,\n globalSlug,\n getDocPreferences,\n parentDocumentFields,\n blockType,\n ])\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(\n initialLexicalFormState?.[formData.id]?.collapsed ?? false,\n )\n\n const componentMapRenderedBlockPath = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks.${blockType}`\n\n const clientSchemaMap = featureClientSchemaMap['blocks']\n\n const blocksField: BlocksFieldClient | undefined = clientSchemaMap?.[\n componentMapRenderedBlockPath\n ]?.[0] as BlocksFieldClient | undefined\n\n const clientBlock: ClientBlock | undefined = blocksField?.blockReferences\n ? typeof blocksField?.blockReferences?.[0] === 'string'\n ? config.blocksMap[blocksField?.blockReferences?.[0]]\n : blocksField?.blockReferences?.[0]\n : blocksField?.blocks?.[0]\n\n const { i18n, t } = useTranslation<object, string>()\n\n const onChange = useCallback(\n async ({ formState: prevFormState, submit }: { formState: FormState; submit?: boolean }) => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n\n const controller = new AbortController()\n onChangeAbortControllerRef.current = controller\n\n const { state: newFormState } = await getFormState({\n id,\n collectionSlug,\n docPermissions: {\n fields: true,\n },\n docPreferences: await getDocPreferences(),\n documentFormState: deepCopyObjectSimpleWithoutReactComponents(parentDocumentFields, {\n excludeFiles: true,\n }),\n formState: prevFormState,\n globalSlug,\n initialBlockFormState: prevFormState,\n operation: 'update',\n readOnly: !isEditable,\n renderAllFields: submit ? true : false,\n schemaPath: schemaFieldsPath,\n signal: controller.signal,\n })\n\n if (!newFormState) {\n return prevFormState\n }\n\n if (prevFormState.blockName) {\n newFormState.blockName = prevFormState.blockName\n }\n\n const newFormStateData: BlockFields = reduceFieldsToValues(\n removeEmptyArrayValues({\n fields: deepCopyObjectSimpleWithoutReactComponents(newFormState, { excludeFiles: true }),\n }),\n true,\n ) as BlockFields\n\n setTimeout(() => {\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n const newData = newFormStateData\n newData.blockType = blockType\n node.setFields(newData, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n }, 0)\n\n if (submit) {\n if (!CustomLabelFromProps) {\n setCustomLabel(newFormState._components?.customComponents?.BlockLabel ?? undefined)\n }\n if (!CustomBlockFromProps) {\n setCustomBlock(newFormState._components?.customComponents?.Block ?? undefined)\n }\n\n let rowErrorCount = 0\n for (const formField of Object.values(newFormState)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n\n return newFormState\n },\n\n [\n getFormState,\n id,\n collectionSlug,\n getDocPreferences,\n globalSlug,\n schemaFieldsPath,\n blockType,\n parentDocumentFields,\n isEditable,\n editor,\n nodeKey,\n CustomBlockFromProps,\n CustomLabelFromProps,\n ],\n )\n\n useEffect(() => {\n return () => {\n abortAndIgnore(onChangeAbortControllerRef.current)\n }\n }, [])\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey)?.remove()\n })\n }, [editor, nodeKey])\n\n const [rowIndex, setRowIndex] = React.useState<number>(0)\n\n useEffect(() => {\n const updateIndex = () => {\n editor.getEditorState().read(() => {\n const root = $getRoot()\n const children = root.getChildren()\n let blockCount = 0\n for (const child of children) {\n if ($isBlockNode(child)) {\n if (child.getKey() === nodeKey) {\n setRowIndex(blockCount)\n return\n }\n blockCount++\n }\n }\n })\n }\n updateIndex()\n return editor.registerUpdateListener(() => {\n updateIndex()\n })\n }, [editor, nodeKey])\n\n const blockDisplayName = clientBlock?.labels?.singular\n ? getTranslation(clientBlock.labels.singular, i18n)\n : clientBlock?.slug\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences =\n currentDocPreferences?.fields?.[parentLexicalRichTextField.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(parentLexicalRichTextField.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, parentLexicalRichTextField.name, setDocFieldPreferences, formData.id],\n )\n\n const EditButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__editButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"edit\"\n onClick={(e) => {\n e.preventDefault()\n e.stopPropagation()\n toggleDrawer()\n return false\n }}\n onMouseDown={(e) => {\n // Needed to preserve lexical selection for toggleDrawer lexical selection restore.\n // I believe this is needed due to this button (usually) being inside of a collapsible.\n e.preventDefault()\n }}\n round\n size=\"medium\"\n tooltip={t('lexical:blocks:inlineBlocks:edit', { label: blockDisplayName })}\n />\n ),\n [baseClass, isEditable, t, blockDisplayName, toggleDrawer],\n )\n\n const RemoveButton = useMemo(\n () => () => (\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n ),\n [baseClass, isEditable, removeBlock],\n )\n\n const BlockCollapsible = useMemo(\n () =>\n ({\n Actions,\n children,\n className,\n collapsibleProps,\n disableBlockName,\n editButton,\n errorCount,\n fieldHasErrors,\n Label,\n Pill: CustomPill,\n removeButton,\n showDragHandle = true,\n showRowNumber = true,\n }: BlockCollapsibleWithErrorProps) => {\n return (\n <div className={`${baseClass}__container ${baseClass}-${blockType}`}>\n <Collapsible\n actions={\n typeof Actions !== 'undefined' ? (\n Actions\n ) : isEditable ? (\n <Popup\n button={<MoreIcon />}\n buttonClassName={`${baseClass}__actions-button`}\n caret={false}\n horizontalAlign=\"right\"\n render={({ close }) => (\n <PopupList.ButtonGroup buttonSize=\"medium\">\n {((resolvedCustomBlock && editButton !== false) ||\n (!resolvedCustomBlock && editButton)) && (\n <PopupList.Button\n onClick={() => {\n toggleDrawer()\n close()\n }}\n >\n {t('general:edit')}\n </PopupList.Button>\n )}\n {removeButton !== false && (\n <PopupList.Button\n onClick={() => {\n removeBlock()\n close()\n }}\n >\n <XIcon />\n {t('general:remove')}\n </PopupList.Button>\n )}\n </PopupList.ButtonGroup>\n )}\n size=\"large\"\n />\n ) : null\n }\n className={[\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n dragHandleProps={\n showDragHandle\n ? {\n id: nodeKey,\n attributes: { role: 'button', tabIndex: 0 },\n listeners: {},\n }\n : undefined\n }\n header={\n <div className={`${baseClass}__block-header`}>\n {typeof Label !== 'undefined' ? (\n Label\n ) : typeof resolvedCustomLabel !== 'undefined' ? (\n resolvedCustomLabel\n ) : (\n <div className={`${baseClass}__block-label`}>\n {showRowNumber && (\n <span className={`${baseClass}__block-number`}>\n {String(rowIndex + 1).padStart(2, '0')}\n </span>\n )}\n {typeof CustomPill !== 'undefined' ? (\n CustomPill\n ) : (\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${blockType}`}\n pillStyle=\"white\"\n size=\"small\"\n >\n {blockDisplayName ?? blockType}\n </Pill>\n )}\n {!disableBlockName && !clientBlock?.admin?.disableBlockName && (\n <SectionTitle path=\"blockName\" readOnly={!isEditable} />\n )}\n\n {fieldHasErrors && (\n <ErrorPill count={errorCount ?? 0} i18n={i18n} withMessage />\n )}\n </div>\n )}\n </div>\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n {...(collapsibleProps || {})}\n >\n {children}\n </Collapsible>\n </div>\n )\n },\n [\n resolvedCustomBlock,\n resolvedCustomLabel,\n blockDisplayName,\n baseClass,\n clientBlock?.admin?.disableBlockName,\n blockType,\n i18n,\n isCollapsed,\n onCollapsedChange,\n isEditable,\n nodeKey,\n removeBlock,\n rowIndex,\n t,\n toggleDrawer,\n ],\n )\n\n const blockID = formData?.id\n\n const { headerActions, submitRef } = useDrawerSubmit()\n\n const BlockDrawer = useMemo(\n () => () => (\n <EditDepthProvider>\n <Drawer\n className={''}\n headerActions={headerActions}\n slug={drawerSlug}\n title={t(`lexical:blocks:inlineBlocks:${blockID ? 'edit' : 'create'}`, {\n label: blockDisplayName ?? t('lexical:blocks:inlineBlocks:label'),\n })}\n >\n {initialState ? (\n <div className=\"fields-drawer\">\n <RenderFields\n fields={clientBlock?.fields ?? []}\n forceRender\n parentIndexPath=\"\"\n parentPath=\"\" // See Blocks feature path for details as for why this is empty\n parentSchemaPath={schemaFieldsPath}\n permissions={true}\n readOnly={!isEditable}\n />\n <RegisterFormSubmit submitRef={submitRef} />\n </div>\n ) : null}\n </Drawer>\n </EditDepthProvider>\n ),\n [\n initialState,\n drawerSlug,\n blockID,\n blockDisplayName,\n t,\n isEditable,\n clientBlock?.fields,\n schemaFieldsPath,\n headerActions,\n submitRef,\n // DO NOT ADD FORMDATA HERE! Adding formData will kick you out of sub block editors while writing.\n ],\n )\n\n // Memoized Form JSX\n const Block = useMemo(() => {\n if (!initialState) {\n return null\n }\n return (\n <div data-block-drawer-slug={drawerSlug} style={{ display: 'contents' }}>\n <Form\n beforeSubmit={[\n async ({ formState }) => {\n // This is only called when form is submitted from drawer - usually only the case if the block has a custom Block component\n return await onChange({ formState, submit: true })\n },\n ]}\n el=\"div\"\n fields={clientBlock?.fields ?? []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={(formState, newData) => {\n // This is only called when form is submitted from drawer - usually only the case if the block has a custom Block component\n newData.blockType = blockType\n editor.update(\n () => {\n const node = $getNodeByKey(nodeKey)\n if (node && $isBlockNode(node)) {\n node.setFields(newData as BlockFields, true)\n }\n },\n // Without this, the outer editor's reconciler resets DOM selection\n // back into its own root, kicking focus out of any nested richText.\n { tag: SKIP_DOM_SELECTION_TAG },\n )\n toggleDrawer()\n }}\n submitted={submitted}\n uuid={formUuid}\n >\n <BlockContent\n baseClass={baseClass}\n BlockDrawer={BlockDrawer}\n Collapsible={BlockCollapsible}\n CustomBlock={resolvedCustomBlock}\n CustomLabel={resolvedCustomLabel}\n EditButton={EditButton}\n errorCount={errorCount}\n formSchema={clientBlock?.fields ?? []}\n initialState={initialState}\n nodeKey={nodeKey}\n RemoveButton={RemoveButton}\n />\n </Form>\n </div>\n )\n }, [\n BlockCollapsible,\n BlockDrawer,\n resolvedCustomBlock,\n resolvedCustomLabel,\n blockType,\n drawerSlug,\n RemoveButton,\n EditButton,\n baseClass,\n editor,\n errorCount,\n toggleDrawer,\n clientBlock?.fields,\n formUuid,\n initialState,\n nodeKey,\n onChange,\n submitted,\n ])\n\n if (!clientBlock) {\n return (\n <BlockCollapsible disableBlockName={true} fieldHasErrors={true}>\n <div className={`${baseClass}-not-found`}>\n Error: Block '{blockType}' not found in the config but exists in the lexical data\n </div>\n </BlockCollapsible>\n )\n }\n\n return Block\n}\n"],"mappings":"AAAA;;;AAEA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SACEC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,iBAAiB,EACjBC,SAAS,EACTC,IAAI,EACJC,gBAAgB,EAChBC,QAAQ,EACRC,IAAI,EACJC,KAAK,EACLC,SAAS,EACTC,YAAY,EACZC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,eAAe,EACfC,Y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YAAA,CAAa4F,MAAA,GAAO;cAC9BA,MAAA,CAAKE,SAAS,CAACD,SAAA,EAAwB;YACzC;UACF;UACA;UACA;UACA;YAAEE,GAAA,EAAK7G;UAAuB;UAEhCoD,YAAA;QACF;QACAvB,SAAA,EAAWA,SAAA;QACXpB,IAAA,EAAMsE,QAAA;kBAEN,aAAAQ,IAAA,CAACxE,YAAA;UACCO,SAAA,EAAWA,SAAA;UACXwM,WAAA,EAAaA,WAAA;UACbrP,WAAA,EAAa0M,gBAAA;UACb5J,WAAA,EAAa+D,mBAAA;UACb7D,WAAA,EAAaiE,mBAAA;UACb0E,UAAA,EAAYA,UAAA;UACZvH,UAAA,EAAYA,UAAA;UACZ4L,UAAA,EAAYpH,WAAA,EAAa7E,MAAA,IAAU,EAAE;UACrCoB,YAAA,EAAcA,YAAA;UACdhC,OAAA,EAASA,OAAA;UACTsJ,YAAA,EAAcA;;;;EAKxB,GAAG,CACDC,gBAAA,EACA2C,WAAA,EACAxI,mBAAA,EACAI,mBAAA,EACAjC,SAAA,EACAR,UAAA,EACAiI,YAAA,EACAd,UAAA,EACA9I,SAAA,EACAiC,MAAA,EACAV,UAAA,EACAO,YAAA,EACAiE,WAAA,EAAa7E,MAAA,EACbuC,QAAA,EACAnB,YAAA,EACAhC,OAAA,EACA+F,QAAA,EACA9F,SAAA,CACD;EAED,IAAI,CAACwF,WAAA,EAAa;IAChB,oBACE9B,IAAA,CAAC4F,gBAAA;MAAiBG,gBAAA,EAAkB;MAAME,cAAA,EAAgB;gBACxD,aAAAa,KAAA,CAAC;QAAIhL,SAAA,EAAW,GAAGC,SAAA,YAAqB;mBAAE,kBACzBmC,SAAA,EAAU;;;EAIjC;EAEA,OAAO4B,KAAA;AACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"InlineBlockContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/client/componentInline/components/InlineBlockContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,oBAAoB,iBAAkB;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,6BAI/E,CAAA"}
1
+ {"version":3,"file":"InlineBlockContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/client/componentInline/components/InlineBlockContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,oBAAoB,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,6BAI/E,CAAA"}
@@ -0,0 +1,85 @@
1
+ @layer payload-default {
2
+ .LexicalEditorTheme__inlineBlock {
3
+ --inline-block-max-width: 18rem;
4
+ --inline-block-not-found-max-width: 25rem;
5
+ display: inline-block;
6
+
7
+ &.decorator-selected {
8
+ box-shadow: unset !important;
9
+ outline: unset !important;
10
+
11
+ .LexicalEditorTheme__inlineBlock__container {
12
+ box-shadow: 0 0 0 2px var(--color-border-selected);
13
+ outline: none;
14
+ }
15
+ }
16
+
17
+ &::selection {
18
+ background: transparent;
19
+ }
20
+ }
21
+
22
+ .LexicalEditorTheme__inlineBlock__container {
23
+ box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
24
+ margin-right: var(--spacer-1);
25
+ margin-left: var(--spacer-1);
26
+ padding: 0;
27
+ padding-inline-start: var(--spacer-2);
28
+ background: var(--color-bg);
29
+ outline: var(--stroke-width-small) solid var(--color-border);
30
+ border-radius: var(--radius-medium);
31
+ max-width: var(--inline-block-max-width);
32
+ font-family: var(--font-body);
33
+ display: flex;
34
+ align-items: center;
35
+ cursor: pointer;
36
+
37
+ &:hover {
38
+ outline: var(--stroke-width-small) solid var(--color-border);
39
+ }
40
+ }
41
+
42
+ .LexicalEditorTheme__inlineBlock-not-found {
43
+ max-width: var(--inline-block-not-found-max-width);
44
+ color: var(--color-text-danger);
45
+ }
46
+
47
+ .LexicalEditorTheme__inlineBlock__wrap {
48
+ flex-grow: 1;
49
+ overflow: hidden;
50
+ }
51
+
52
+ .LexicalEditorTheme__inlineBlock__actions {
53
+ display: flex;
54
+ align-items: center;
55
+
56
+ & > .btn {
57
+ width: (var(--spacer-3));
58
+ height: (var(--spacer-3));
59
+ margin: 2px;
60
+
61
+ &:not(:disabled):hover {
62
+ background: var(--color-bg-hover);
63
+ }
64
+
65
+ & > * {
66
+ height: 100%;
67
+ }
68
+ }
69
+ }
70
+
71
+ .LexicalEditorTheme__inlineBlock__removeButton.btn {
72
+ padding: 0;
73
+ margin: 2px;
74
+ color: var(--color-icon-secondary);
75
+
76
+ line {
77
+ stroke-width: var(--stroke-width-small);
78
+ }
79
+
80
+ &:disabled {
81
+ color: var(--color-icon-tertiary);
82
+ pointer-events: none;
83
+ }
84
+ }
85
+ }
@@ -1,8 +1,9 @@
1
1
  import type { FormState } from 'payload';
2
- import './index.scss';
2
+ import './index.css';
3
+ import '../../../../utilities/fieldsDrawer/index.css';
3
4
  import React from 'react';
4
- import type { ViewMapInlineBlockComponentProps } from '../../../../types.js';
5
- import type { InlineBlockFields } from '../../server/nodes/InlineBlocksNode.js';
5
+ import type { ViewMapInlineBlockComponentProps } from '../../../../types/index.js';
6
+ import type { InlineBlockFields } from '../../server/schema.js';
6
7
  import type { BlockComponentProps } from '../component/index.js';
7
8
  export type InlineBlockComponentProps<TFormData extends Record<string, unknown> = InlineBlockFields> = {
8
9
  readonly CustomBlock?: React.FC<ViewMapInlineBlockComponentProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/client/componentInline/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwC,SAAS,EAAE,MAAM,SAAS,CAAA;AAwB9E,OAAO,cAAc,CAAA;AAGrB,OAAO,KAAiE,MAAM,OAAO,CAAA;AAGrF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,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