@payloadcms/richtext-lexical 3.85.0 → 4.0.0-internal.1f9ae9a

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 (916) hide show
  1. package/dist/cell/rscEntry.d.ts +1 -1
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js.map +1 -1
  4. package/dist/exports/client/Field-G5Z2HM5Y.js +2 -0
  5. package/dist/exports/client/Field-G5Z2HM5Y.js.map +7 -0
  6. package/dist/exports/client/RelationshipComponent-RZL743CS.js +2 -0
  7. package/dist/exports/client/RelationshipComponent-RZL743CS.js.map +7 -0
  8. package/dist/exports/client/bundled.css +1 -1
  9. package/dist/exports/client/{chunk-QJ5EETIB.js → chunk-6QWQ7JV4.js} +2 -2
  10. package/dist/exports/client/chunk-FEJXFRL7.js +2 -0
  11. package/dist/exports/client/chunk-FEJXFRL7.js.map +7 -0
  12. package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  13. package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
  14. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  15. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  16. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  17. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  18. package/dist/exports/client/component-CVM4OESA.js +2 -0
  19. package/dist/exports/client/component-CVM4OESA.js.map +7 -0
  20. package/dist/exports/client/componentInline-JJZ2NKW2.js +2 -0
  21. package/dist/exports/client/index.d.ts +0 -2
  22. package/dist/exports/client/index.d.ts.map +1 -1
  23. package/dist/exports/client/index.js +30 -30
  24. package/dist/exports/client/index.js.map +4 -4
  25. package/dist/exports/react/index.d.ts +1 -1
  26. package/dist/exports/react/index.d.ts.map +1 -1
  27. package/dist/exports/react/index.js.map +1 -1
  28. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  29. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  30. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  31. package/dist/features/blockquote/server/index.d.ts +1 -1
  32. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  33. package/dist/features/blockquote/server/index.js +0 -39
  34. package/dist/features/blockquote/server/index.js.map +1 -1
  35. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  36. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  37. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  38. package/dist/features/blocks/client/component/index.css +178 -0
  39. package/dist/features/blocks/client/component/index.d.ts +2 -2
  40. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  41. package/dist/features/blocks/client/component/index.js +75 -18
  42. package/dist/features/blocks/client/component/index.js.map +1 -1
  43. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  44. package/dist/features/blocks/client/componentInline/index.css +85 -0
  45. package/dist/features/blocks/client/componentInline/index.d.ts +2 -2
  46. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  47. package/dist/features/blocks/client/componentInline/index.js +20 -7
  48. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  49. package/dist/features/blocks/client/index.d.ts.map +1 -1
  50. package/dist/features/blocks/client/index.js +0 -2
  51. package/dist/features/blocks/client/index.js.map +1 -1
  52. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  53. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +1 -1
  54. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  55. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  56. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +1 -1
  57. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  58. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  59. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  60. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  61. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  62. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  63. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  64. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  65. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  66. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  67. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  68. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  69. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  70. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  71. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  72. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  73. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  74. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  75. package/dist/features/blocks/server/index.js +1 -1
  76. package/dist/features/blocks/server/index.js.map +1 -1
  77. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  78. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -1
  79. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  80. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  81. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +1 -1
  82. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  83. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  84. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  85. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  86. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  87. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  89. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  90. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  91. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  92. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  93. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  94. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  95. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  96. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  97. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  98. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  99. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  100. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  101. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  102. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  103. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  104. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  105. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  107. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  110. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  112. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  113. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  115. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  116. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  117. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  118. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  120. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  123. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/async/types.d.ts +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  129. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  131. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  132. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  134. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  135. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  137. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  138. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  140. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  141. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  143. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  144. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  146. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  147. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  149. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  151. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  152. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  155. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  157. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  159. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  162. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  164. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  165. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  170. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +2 -2
  171. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  172. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  173. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  174. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  175. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  176. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  177. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  178. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  179. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  180. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  181. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  182. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  183. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  184. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  185. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  186. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  187. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  188. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  189. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  190. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  191. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  192. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  193. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  194. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  195. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  196. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  197. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  198. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  199. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  200. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  201. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  202. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  204. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  207. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  209. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  210. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  211. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  215. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  216. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  217. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  218. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +1 -1
  219. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  220. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  221. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  222. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  223. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  224. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  225. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  226. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  227. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  228. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  229. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  230. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  231. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  232. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  233. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  234. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  235. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  236. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  237. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  238. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  239. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  240. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  241. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  242. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  243. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  244. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  245. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  246. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  247. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  248. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  249. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  250. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  251. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  252. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  253. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  254. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  255. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  256. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  257. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  258. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  259. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  260. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  261. package/dist/features/experimental_table/server/index.d.ts +1 -1
  262. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  263. package/dist/features/experimental_table/server/index.js +0 -102
  264. package/dist/features/experimental_table/server/index.js.map +1 -1
  265. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  266. package/dist/features/heading/server/index.d.ts +1 -1
  267. package/dist/features/heading/server/index.d.ts.map +1 -1
  268. package/dist/features/heading/server/index.js +0 -39
  269. package/dist/features/heading/server/index.js.map +1 -1
  270. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  271. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  272. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  273. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  274. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  275. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  276. package/dist/features/horizontalRule/server/index.js +0 -8
  277. package/dist/features/horizontalRule/server/index.js.map +1 -1
  278. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  279. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  280. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  281. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  282. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  283. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  284. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  285. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  286. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  287. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  288. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  289. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  290. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  291. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  292. package/dist/features/link/nodes/types.d.ts +1 -1
  293. package/dist/features/link/nodes/types.d.ts.map +1 -1
  294. package/dist/features/link/nodes/types.js.map +1 -1
  295. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  296. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  297. package/dist/features/link/server/index.d.ts.map +1 -1
  298. package/dist/features/link/server/index.js +0 -71
  299. package/dist/features/link/server/index.js.map +1 -1
  300. package/dist/features/link/server/validate.d.ts.map +1 -1
  301. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  302. package/dist/features/lists/checklist/server/index.js +0 -7
  303. package/dist/features/lists/checklist/server/index.js.map +1 -1
  304. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  305. package/dist/features/lists/orderedList/server/index.js +0 -7
  306. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  307. package/dist/features/lists/plugin/index.d.ts +1 -1
  308. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  309. package/dist/features/lists/plugin/index.js.map +1 -1
  310. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  311. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  312. package/dist/features/lists/unorderedList/server/index.js +0 -7
  313. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  314. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  315. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  316. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  317. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  318. package/dist/features/relationship/client/components/index.css +112 -0
  319. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  320. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  321. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  322. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -1
  323. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  324. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  325. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  326. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  327. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  328. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  329. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  330. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  331. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  332. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  333. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  334. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  335. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  336. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  337. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  338. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  339. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  340. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  341. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  342. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  343. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  344. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  345. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  346. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  347. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  348. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  349. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  350. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  351. package/dist/features/toolbars/types.d.ts +5 -1
  352. package/dist/features/toolbars/types.d.ts.map +1 -1
  353. package/dist/features/toolbars/types.js.map +1 -1
  354. package/dist/features/typesClient.d.ts +1 -1
  355. package/dist/features/typesClient.d.ts.map +1 -1
  356. package/dist/features/typesClient.js.map +1 -1
  357. package/dist/features/typesServer.d.ts +3 -20
  358. package/dist/features/typesServer.d.ts.map +1 -1
  359. package/dist/features/typesServer.js.map +1 -1
  360. package/dist/features/upload/client/component/index.css +214 -0
  361. package/dist/features/upload/client/component/index.d.ts +1 -1
  362. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  363. package/dist/features/upload/client/component/index.js +86 -63
  364. package/dist/features/upload/client/component/index.js.map +1 -1
  365. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  366. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  367. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  368. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  369. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  370. package/dist/features/upload/server/index.d.ts.map +1 -1
  371. package/dist/features/upload/server/index.js +0 -78
  372. package/dist/features/upload/server/index.js.map +1 -1
  373. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -1
  374. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  375. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  376. package/dist/features/upload/server/validate.d.ts.map +1 -1
  377. package/dist/field/Diff/converters/link.d.ts +1 -1
  378. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  379. package/dist/field/Diff/converters/link.js.map +1 -1
  380. package/dist/field/Diff/converters/listitem/index.css +80 -0
  381. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  382. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  383. package/dist/field/Diff/converters/listitem/index.js +1 -0
  384. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  385. package/dist/field/Diff/converters/relationship/index.css +108 -0
  386. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  387. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  388. package/dist/field/Diff/converters/relationship/index.js +11 -28
  389. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  390. package/dist/field/Diff/converters/unknown/index.css +37 -0
  391. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  392. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  393. package/dist/field/Diff/converters/unknown/index.js +1 -0
  394. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  395. package/dist/field/Diff/converters/upload/index.css +175 -0
  396. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  397. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  398. package/dist/field/Diff/converters/upload/index.js +7 -2
  399. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  400. package/dist/field/Diff/index.css +156 -0
  401. package/dist/field/Diff/index.d.ts +1 -1
  402. package/dist/field/Diff/index.d.ts.map +1 -1
  403. package/dist/field/Diff/index.js +1 -0
  404. package/dist/field/Diff/index.js.map +1 -1
  405. package/dist/field/Field.d.ts +3 -3
  406. package/dist/field/Field.d.ts.map +1 -1
  407. package/dist/field/Field.js +12 -11
  408. package/dist/field/Field.js.map +1 -1
  409. package/dist/field/RenderLexical/index.d.ts +2 -2
  410. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  411. package/dist/field/RenderLexical/index.js.map +1 -1
  412. package/dist/field/RichTextViewProvider.d.ts +1 -1
  413. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  414. package/dist/field/RichTextViewProvider.js.map +1 -1
  415. package/dist/field/ViewSelector.css +32 -0
  416. package/dist/field/ViewSelector.d.ts +1 -1
  417. package/dist/field/ViewSelector.d.ts.map +1 -1
  418. package/dist/field/ViewSelector.js +1 -0
  419. package/dist/field/ViewSelector.js.map +1 -1
  420. package/dist/field/bundled.css +1 -1
  421. package/dist/field/index.css +60 -0
  422. package/dist/field/index.d.ts +1 -1
  423. package/dist/field/index.d.ts.map +1 -1
  424. package/dist/field/index.js.map +1 -1
  425. package/dist/field/rscEntry.d.ts +1 -1
  426. package/dist/field/rscEntry.d.ts.map +1 -1
  427. package/dist/field/rscEntry.js.map +1 -1
  428. package/dist/hooks.d.ts +6 -0
  429. package/dist/hooks.d.ts.map +1 -0
  430. package/dist/hooks.js +548 -0
  431. package/dist/hooks.js.map +1 -0
  432. package/dist/index.d.ts +3 -13
  433. package/dist/index.d.ts.map +1 -1
  434. package/dist/index.js +20 -628
  435. package/dist/index.js.map +1 -1
  436. package/dist/lexical/LexicalEditor.css +50 -0
  437. package/dist/lexical/LexicalEditor.d.ts +1 -1
  438. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  439. package/dist/lexical/LexicalEditor.js +1 -0
  440. package/dist/lexical/LexicalEditor.js.map +1 -1
  441. package/dist/lexical/LexicalProvider.d.ts +1 -1
  442. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  443. package/dist/lexical/LexicalProvider.js.map +1 -1
  444. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  445. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  446. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  447. package/dist/lexical/config/client/loader.d.ts +1 -1
  448. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  449. package/dist/lexical/config/client/loader.js.map +1 -1
  450. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  451. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  452. package/dist/lexical/config/client/sanitize.js.map +1 -1
  453. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  454. package/dist/lexical/config/server/loader.js +12 -9
  455. package/dist/lexical/config/server/loader.js.map +1 -1
  456. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  457. package/dist/lexical/config/server/sanitize.js +3 -9
  458. package/dist/lexical/config/server/sanitize.js.map +1 -1
  459. package/dist/lexical/config/types.d.ts +1 -1
  460. package/dist/lexical/config/types.d.ts.map +1 -1
  461. package/dist/lexical/config/types.js.map +1 -1
  462. package/dist/lexical/nodes/index.d.ts +1 -1
  463. package/dist/lexical/nodes/index.d.ts.map +1 -1
  464. package/dist/lexical/nodes/index.js.map +1 -1
  465. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  466. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  467. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  468. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  469. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  470. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  471. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  472. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  473. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  474. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  475. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  476. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  477. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  478. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  479. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  480. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  481. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  482. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  483. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  484. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  485. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  486. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  487. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  488. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  489. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  490. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  491. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  492. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  493. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  494. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  495. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  496. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  497. package/dist/lexical/theme/EditorTheme.css +359 -0
  498. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  499. package/dist/lexical/theme/EditorTheme.js +1 -0
  500. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  501. package/dist/lexical/ui/ContentEditable.css +95 -0
  502. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  503. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  504. package/dist/lexical/ui/ContentEditable.js +1 -0
  505. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  506. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  507. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  508. package/dist/lexical/ui/icons/Add/index.js +19 -12
  509. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  510. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  511. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  512. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  513. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  514. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  515. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  516. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  517. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  518. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  519. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  520. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  521. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  522. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  523. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  524. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  525. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  526. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  527. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  528. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  529. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  530. package/dist/lexical/ui/icons/Block/index.js +13 -28
  531. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  532. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  533. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  534. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  535. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  536. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  537. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  538. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  539. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  540. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  541. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  542. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  543. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  544. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  545. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  546. package/dist/lexical/ui/icons/Code/index.js +15 -13
  547. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  548. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  549. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  550. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  551. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  552. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  553. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  554. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  555. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  556. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  557. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  558. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  559. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  560. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  561. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  562. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  563. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  564. package/dist/lexical/ui/icons/H1/index.js +9 -6
  565. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  566. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  567. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  568. package/dist/lexical/ui/icons/H2/index.js +9 -6
  569. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  570. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  571. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  572. package/dist/lexical/ui/icons/H3/index.js +9 -6
  573. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  574. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  575. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  576. package/dist/lexical/ui/icons/H4/index.js +9 -6
  577. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  579. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  580. package/dist/lexical/ui/icons/H5/index.js +9 -6
  581. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  582. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  583. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  584. package/dist/lexical/ui/icons/H6/index.js +9 -6
  585. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  587. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  588. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  589. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  591. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  592. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  593. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  594. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  595. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  596. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  597. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  598. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  599. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  600. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  601. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  603. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  604. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  605. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  606. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  607. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  608. package/dist/lexical/ui/icons/Link/index.js +14 -9
  609. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  611. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  612. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  613. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  615. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  616. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  617. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  618. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  619. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  620. package/dist/lexical/ui/icons/Page/index.js +21 -0
  621. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  622. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  623. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  624. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  625. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  627. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  628. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  629. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  630. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  631. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  632. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  633. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  634. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  635. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  636. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  637. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  639. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  640. package/dist/lexical/ui/icons/Table/index.js +20 -15
  641. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  642. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  643. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  644. package/dist/lexical/ui/icons/Text/index.js +17 -8
  645. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  646. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  647. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  648. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  649. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  650. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  651. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  652. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  653. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  654. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  655. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  656. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  657. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  658. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  659. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  660. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  661. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  662. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  663. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  664. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  665. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  666. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  667. package/dist/{types.d.ts → types/index.d.ts} +9 -9
  668. package/dist/types/index.d.ts.map +1 -0
  669. package/dist/types/index.js +2 -0
  670. package/dist/types/index.js.map +1 -0
  671. package/dist/{nodeTypes.d.ts → types/nodeTypes.d.ts} +10 -10
  672. package/dist/types/nodeTypes.d.ts.map +1 -0
  673. package/dist/types/nodeTypes.js.map +1 -0
  674. package/dist/types/schema.d.ts +6 -0
  675. package/dist/types/schema.d.ts.map +1 -0
  676. package/dist/types/schema.js +81 -0
  677. package/dist/types/schema.js.map +1 -0
  678. package/dist/utilities/buildEditorState.d.ts +1 -1
  679. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  680. package/dist/utilities/buildEditorState.js +13 -0
  681. package/dist/utilities/buildEditorState.js.map +1 -1
  682. package/dist/utilities/buildInitialState.js.map +1 -1
  683. package/dist/utilities/createClientFeature.d.ts +1 -1
  684. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  685. package/dist/utilities/createClientFeature.js.map +1 -1
  686. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  687. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  688. package/dist/utilities/editorConfigFactory.js.map +1 -1
  689. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  690. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  691. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  692. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  693. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  694. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  695. package/dist/utilities/generateImportMap.d.ts +1 -1
  696. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  697. package/dist/utilities/generateImportMap.js.map +1 -1
  698. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  699. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  700. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  701. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  702. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  703. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  704. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  705. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  706. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  707. package/dist/validate/index.d.ts.map +1 -1
  708. package/package.json +16 -21
  709. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  710. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  711. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  712. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  713. package/dist/exports/client/Field-OVF2FPGD.js +0 -2
  714. package/dist/exports/client/Field-OVF2FPGD.js.map +0 -7
  715. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  716. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  717. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  718. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  719. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  720. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  721. package/dist/exports/client/chunk-XFA5M7FY.js +0 -2
  722. package/dist/exports/client/chunk-XFA5M7FY.js.map +0 -7
  723. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  724. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  725. package/dist/exports/client/componentInline-A4H3EY3L.js +0 -2
  726. package/dist/exports/server/migrate.d.ts +0 -16
  727. package/dist/exports/server/migrate.d.ts.map +0 -1
  728. package/dist/exports/server/migrate.js +0 -16
  729. package/dist/exports/server/migrate.js.map +0 -1
  730. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  731. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  732. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  733. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  734. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  735. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  736. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  737. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  738. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  739. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  740. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  741. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  742. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  743. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  744. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  745. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  746. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  747. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  748. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  749. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  750. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  751. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  752. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  753. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  754. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  755. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  756. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  757. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  758. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  759. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  760. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  761. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  762. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  763. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  764. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  765. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  766. package/dist/features/lists/htmlConverter.d.ts +0 -5
  767. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  768. package/dist/features/lists/htmlConverter.js +0 -81
  769. package/dist/features/lists/htmlConverter.js.map +0 -1
  770. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  771. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  772. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  773. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  774. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  775. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  776. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  777. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  778. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  779. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  780. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  781. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  782. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  783. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  784. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  785. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  786. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  787. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  788. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  789. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  790. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  791. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  792. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  793. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  794. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  795. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  796. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  797. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  798. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  799. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  800. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  801. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  802. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  803. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  804. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  805. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  806. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  807. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  808. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  809. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  810. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  811. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  812. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  813. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  814. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  815. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  816. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  817. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  818. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  819. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  820. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  821. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  822. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  823. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  824. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  825. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  826. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  827. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  828. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  829. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  830. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  831. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  832. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  833. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  834. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  835. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  836. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  837. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  838. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  839. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  840. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  841. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  842. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  843. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  844. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  845. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  846. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  847. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  848. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  849. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  850. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  851. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  852. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  853. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  854. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  855. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  856. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  857. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  858. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  859. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  860. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  861. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  862. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  863. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  864. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  865. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  866. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  867. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  868. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  869. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  870. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  871. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  872. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  873. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  874. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  875. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  876. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  877. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  878. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  879. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  880. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  881. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  882. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  883. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  884. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  885. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  886. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  887. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  888. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  889. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  890. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  891. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  892. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  893. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  894. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  895. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  896. package/dist/lexical/ui/icons/AI/index.js +0 -34
  897. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  898. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  899. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  900. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  901. package/dist/nodeTypes.d.ts.map +0 -1
  902. package/dist/nodeTypes.js.map +0 -1
  903. package/dist/types.d.ts.map +0 -1
  904. package/dist/types.js +0 -2
  905. package/dist/types.js.map +0 -1
  906. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  907. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  908. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  909. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  910. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  911. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  912. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  913. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  914. /package/dist/exports/client/{chunk-QJ5EETIB.js.map → chunk-6QWQ7JV4.js.map} +0 -0
  915. /package/dist/exports/client/{componentInline-A4H3EY3L.js.map → componentInline-JJZ2NKW2.js.map} +0 -0
  916. /package/dist/{nodeTypes.js → types/nodeTypes.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"convertLexicalToPlaintext.spec.js","names":["describe","it","expect","convertLexicalToPlaintext","textNode","text","bold","type","detail","format","mode","style","version","linebreakNode","tabNode","paragraphNode","children","direction","indent","textFormat","headingNode","tag","listItemNode","checked","value","listNode","listType","start","tableNode","tableRowNode","tableCellNode","headerState","rootNode","nodes","root","data","plaintext","toBe"],"sources":["../../../../src/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\nimport type {\n DefaultNodeTypes,\n DefaultTypedEditorState,\n SerializedTabNode,\n SerializedParagraphNode,\n SerializedTextNode,\n SerializedLineBreakNode,\n SerializedHeadingNode,\n SerializedListItemNode,\n SerializedListNode,\n SerializedTableRowNode,\n SerializedTableNode,\n SerializedTableCellNode,\n} from '../../../nodeTypes.js'\nimport { convertLexicalToPlaintext } from './sync/index.js'\n\nfunction textNode(text: string, bold?: boolean): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: bold ? 1 : 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n }\n}\n\nfunction linebreakNode(): SerializedLineBreakNode {\n return {\n type: 'linebreak',\n version: 1,\n }\n}\n\nfunction tabNode(): SerializedTabNode {\n return {\n type: 'tab',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n }\n}\n\nfunction paragraphNode(children: DefaultNodeTypes[]): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\n\nfunction headingNode(children: DefaultNodeTypes[]): SerializedHeadingNode {\n return {\n type: 'heading',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n tag: 'h1',\n version: 1,\n }\n}\n\nfunction listItemNode(children: DefaultNodeTypes[]): SerializedListItemNode {\n return {\n type: 'listitem',\n children,\n checked: false,\n direction: 'ltr',\n format: '',\n indent: 0,\n value: 0,\n version: 1,\n }\n}\n\nfunction listNode(children: DefaultNodeTypes[]): SerializedListNode {\n return {\n type: 'list',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n listType: 'bullet',\n start: 0,\n tag: 'ul',\n version: 1,\n }\n}\n\nfunction tableNode(children: (DefaultNodeTypes | SerializedTableRowNode)[]): SerializedTableNode {\n return {\n type: 'table',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableRowNode(\n children: (DefaultNodeTypes | SerializedTableCellNode)[],\n): SerializedTableRowNode {\n return {\n type: 'tablerow',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableCellNode(children: DefaultNodeTypes[]): SerializedTableCellNode {\n return {\n type: 'tablecell',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n headerState: 0,\n version: 1,\n }\n}\n\nfunction rootNode(nodes: (DefaultNodeTypes | SerializedTableNode)[]): DefaultTypedEditorState {\n return {\n root: {\n type: 'root',\n children: nodes,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\ndescribe('convertLexicalToPlaintext', () => {\n it('ensure paragraph with text is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([paragraphNode([textNode('Basic Text')])])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text')\n })\n\n it('ensure paragraph with multiple text nodes is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), textNode(' Bold', true), textNode(' Text')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text Bold Text')\n })\n\n it('ensure linebreaks are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), linebreakNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\nNext Line')\n })\n\n it('ensure tabs are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), tabNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\tNext Line')\n })\n\n it('ensure new lines are added between paragraphs', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic text')]),\n paragraphNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between heading nodes', () => {\n const data: DefaultTypedEditorState = rootNode([\n headingNode([textNode('Basic text')]),\n headingNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between list items and lists', () => {\n const data: DefaultTypedEditorState = rootNode([\n listNode([listItemNode([textNode('First item')]), listItemNode([textNode('Second item')])]),\n listNode([listItemNode([textNode('Next list')])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('First item\\nSecond item\\n\\nNext list')\n })\n\n it('ensure new lines are added between tables, table rows, and table cells', () => {\n const data: DefaultTypedEditorState = rootNode([\n tableNode([\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 1')]),\n tableCellNode([textNode('Cell 2, Row 1')]),\n ]),\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 2')]),\n tableCellNode([textNode('Cell 2, Row 2')]),\n ]),\n ]),\n tableNode([tableRowNode([tableCellNode([textNode('Cell in Table 2')])])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe(\n 'Cell 1, Row 1 | Cell 2, Row 1\\nCell 1, Row 2 | Cell 2, Row 2\\n\\nCell in Table 2',\n )\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ;AAerC,SAASC,yBAAyB,QAAQ;AAE1C,SAASC,S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S,CAACH,YAAA,CAAa,CAAClB,QAAA,CAAS,aAAa,EAAE,EACjD;IAED,MAAMgC,SAAA,GAAYjC,yBAAA,CAA0B;MAC1CgC;IACF;IAEAjC,MAAA,CAAOkC,SAAA,EAAWC,IAAI,CAAC;EACzB;EAEApC,EAAA,CAAG,0EAA0E;IAC3E,MAAMkC,IAAA,GAAgCH,QAAA,CAAS,CAC7CJ,SAAA,CAAU,CACRC,YAAA,CAAa,CACXC,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,GACzC0B,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,EAC1C,GACDyB,YAAA,CAAa,CACXC,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,GACzC0B,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,EAC1C,EACF,GACDwB,SAAA,CAAU,CAACC,YAAA,CAAa,CAACC,aAAA,CAAc,CAAC1B,QAAA,CAAS,mBAAmB,EAAE,EAAE,EACzE;IAED,MAAMgC,SAAA,GAAYjC,yBAAA,CAA0B;MAC1CgC;IACF;IAEAjC,MAAA,CAAOkC,SAAA,EAAWC,IAAI,CACpB;EAEJ;AACF","ignoreList":[]}
1
+ {"version":3,"file":"convertLexicalToPlaintext.spec.js","names":["describe","it","expect","convertLexicalToPlaintext","textNode","text","bold","type","detail","format","mode","style","version","linebreakNode","tabNode","paragraphNode","children","direction","indent","textFormat","headingNode","tag","listItemNode","checked","value","listNode","listType","start","tableNode","tableRowNode","tableCellNode","headerState","rootNode","nodes","root","data","plaintext","toBe"],"sources":["../../../../src/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\nimport type {\n DefaultNodeTypes,\n DefaultTypedEditorState,\n SerializedTabNode,\n SerializedParagraphNode,\n SerializedTextNode,\n SerializedLineBreakNode,\n SerializedHeadingNode,\n SerializedListItemNode,\n SerializedListNode,\n SerializedTableRowNode,\n SerializedTableNode,\n SerializedTableCellNode,\n} from '../../../types/nodeTypes.js'\nimport { convertLexicalToPlaintext } from './sync/index.js'\n\nfunction textNode(text: string, bold?: boolean): SerializedTextNode {\n return {\n type: 'text',\n detail: 0,\n format: bold ? 1 : 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n }\n}\n\nfunction linebreakNode(): SerializedLineBreakNode {\n return {\n type: 'linebreak',\n version: 1,\n }\n}\n\nfunction tabNode(): SerializedTabNode {\n return {\n type: 'tab',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text: '',\n version: 1,\n }\n}\n\nfunction paragraphNode(children: DefaultNodeTypes[]): SerializedParagraphNode {\n return {\n type: 'paragraph',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n version: 1,\n }\n}\n\nfunction headingNode(children: DefaultNodeTypes[]): SerializedHeadingNode {\n return {\n type: 'heading',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n tag: 'h1',\n version: 1,\n }\n}\n\nfunction listItemNode(children: DefaultNodeTypes[]): SerializedListItemNode {\n return {\n type: 'listitem',\n children,\n checked: false,\n direction: 'ltr',\n format: '',\n indent: 0,\n value: 0,\n version: 1,\n }\n}\n\nfunction listNode(children: DefaultNodeTypes[]): SerializedListNode {\n return {\n type: 'list',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n listType: 'bullet',\n start: 0,\n tag: 'ul',\n version: 1,\n }\n}\n\nfunction tableNode(children: (DefaultNodeTypes | SerializedTableRowNode)[]): SerializedTableNode {\n return {\n type: 'table',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableRowNode(\n children: (DefaultNodeTypes | SerializedTableCellNode)[],\n): SerializedTableRowNode {\n return {\n type: 'tablerow',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n }\n}\n\nfunction tableCellNode(children: DefaultNodeTypes[]): SerializedTableCellNode {\n return {\n type: 'tablecell',\n children,\n direction: 'ltr',\n format: '',\n indent: 0,\n headerState: 0,\n version: 1,\n }\n}\n\nfunction rootNode(nodes: (DefaultNodeTypes | SerializedTableNode)[]): DefaultTypedEditorState {\n return {\n root: {\n type: 'root',\n children: nodes,\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n}\n\ndescribe('convertLexicalToPlaintext', () => {\n it('ensure paragraph with text is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([paragraphNode([textNode('Basic Text')])])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text')\n })\n\n it('ensure paragraph with multiple text nodes is correctly converted', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), textNode(' Bold', true), textNode(' Text')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text Bold Text')\n })\n\n it('ensure linebreaks are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), linebreakNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\nNext Line')\n })\n\n it('ensure tabs are converted correctly', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic Text'), tabNode(), textNode('Next Line')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic Text\\tNext Line')\n })\n\n it('ensure new lines are added between paragraphs', () => {\n const data: DefaultTypedEditorState = rootNode([\n paragraphNode([textNode('Basic text')]),\n paragraphNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between heading nodes', () => {\n const data: DefaultTypedEditorState = rootNode([\n headingNode([textNode('Basic text')]),\n headingNode([textNode('Next block-node')]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('Basic text\\n\\nNext block-node')\n })\n\n it('ensure new lines are added between list items and lists', () => {\n const data: DefaultTypedEditorState = rootNode([\n listNode([listItemNode([textNode('First item')]), listItemNode([textNode('Second item')])]),\n listNode([listItemNode([textNode('Next list')])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe('First item\\nSecond item\\n\\nNext list')\n })\n\n it('ensure new lines are added between tables, table rows, and table cells', () => {\n const data: DefaultTypedEditorState = rootNode([\n tableNode([\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 1')]),\n tableCellNode([textNode('Cell 2, Row 1')]),\n ]),\n tableRowNode([\n tableCellNode([textNode('Cell 1, Row 2')]),\n tableCellNode([textNode('Cell 2, Row 2')]),\n ]),\n ]),\n tableNode([tableRowNode([tableCellNode([textNode('Cell in Table 2')])])]),\n ])\n\n const plaintext = convertLexicalToPlaintext({\n data,\n })\n\n expect(plaintext).toBe(\n 'Cell 1, Row 1 | Cell 2, Row 1\\nCell 1, Row 2 | Cell 2, Row 2\\n\\nCell in Table 2',\n )\n })\n})\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ;AAerC,SAASC,yBAAyB,QAAQ;AAE1C,SAASC,SAASC,IAAY,EAAEC,IAAc;EAC5C,OAAO;IACLC,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQH,IAAA,GAAO,IAAI;IACnBI,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA;IACAO,OAAA,EAAS;EACX;AACF;AAEA,SAASC,cAAA;EACP,OAAO;IACLN,IAAA,EAAM;IACNK,OAAA,EAAS;EACX;AACF;AAEA,SAASE,QAAA;EACP,OAAO;IACLP,IAAA,EAAM;IACNC,MAAA,EAAQ;IACRC,MAAA,EAAQ;IACRC,IAAA,EAAM;IACNC,KAAA,EAAO;IACPN,IAAA,EAAM;IACNO,OAAA,EAAS;EACX;AACF;AAEA,SA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iBAAiB,GACzC0B,aAAA,CAAc,CAAC1B,QAAA,CAAS,iBAAiB,EAC1C,EACF,GACDwB,SAAA,CAAU,CAACC,YAAA,CAAa,CAACC,aAAA,CAAc,CAAC1B,QAAA,CAAS,mBAAmB,EAAE,EAAE,EACzE;IAED,MAAMgC,SAAA,GAAYjC,yBAAA,CAA0B;MAC1CgC;IACF;IAEAjC,MAAA,CAAOkC,SAAA,EAAWC,IAAI,CACpB;EAEJ;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"findConverterForNode.js","names":["findConverterForNode","converters","node","converterForNode","type","blocks","fields","blockType","inlineBlocks"],"sources":["../../../../../src/features/converters/lexicalToPlaintext/shared/findConverterForNode.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedBlockNode, SerializedInlineBlockNode } from '../../../../nodeTypes.js'\nimport type { PlaintextConverter, PlaintextConverters } from '../sync/types.js'\n\nexport function findConverterForNode<\n TConverters extends PlaintextConverters,\n TConverter extends PlaintextConverter<any>,\n>({\n converters,\n\n node,\n}: {\n converters: TConverters\n node: SerializedLexicalNode\n}): TConverter | undefined {\n let converterForNode: TConverter | undefined\n if (node.type === 'block') {\n converterForNode = converters?.blocks?.[\n (node as SerializedBlockNode)?.fields?.blockType\n ] as TConverter\n } else if (node.type === 'inlineBlock') {\n converterForNode = converters?.inlineBlocks?.[\n (node as SerializedInlineBlockNode)?.fields?.blockType\n ] as TConverter\n } else {\n converterForNode = converters[node.type] as TConverter\n }\n\n return converterForNode\n}\n"],"mappings":"AAKA,OAAO,SAASA,qBAGd;EACAC,UAAU;EAEVC;AAAI,CAIL;EACC,IAAIC,gBAAA;EACJ,IAAID,IAAA,CAAKE,IAAI,KAAK,SAAS;IACzBD,gBAAA,GAAmBF,UAAA,EAAYI,MAAA,GAC5BH,IAAA,EAA8BI,MAAA,EAAQC,SAAA,CACxC;EACH,OAAO,IAAIL,IAAA,CAAKE,IAAI,KAAK,eAAe;IACtCD,gBAAA,GAAmBF,UAAA,EAAYO,YAAA,GAC5BN,IAAA,EAAoCI,MAAA,EAAQC,SAAA,CAC9C;EACH,OAAO;IACLJ,gBAAA,GAAmBF,UAAU,CAACC,IAAA,CAAKE,IAAI,CAAC;EAC1C;EAEA,OAAOD,gBAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"findConverterForNode.js","names":["findConverterForNode","converters","node","converterForNode","type","blocks","fields","blockType","inlineBlocks"],"sources":["../../../../../src/features/converters/lexicalToPlaintext/shared/findConverterForNode.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedBlockNode, SerializedInlineBlockNode } from '../../../../types/nodeTypes.js'\nimport type { PlaintextConverter, PlaintextConverters } from '../sync/types.js'\n\nexport function findConverterForNode<\n TConverters extends PlaintextConverters,\n TConverter extends PlaintextConverter<any>,\n>({\n converters,\n\n node,\n}: {\n converters: TConverters\n node: SerializedLexicalNode\n}): TConverter | undefined {\n let converterForNode: TConverter | undefined\n if (node.type === 'block') {\n converterForNode = converters?.blocks?.[\n (node as SerializedBlockNode)?.fields?.blockType\n ] as TConverter\n } else if (node.type === 'inlineBlock') {\n converterForNode = converters?.inlineBlocks?.[\n (node as SerializedInlineBlockNode)?.fields?.blockType\n ] as TConverter\n } else {\n converterForNode = converters[node.type] as TConverter\n }\n\n return converterForNode\n}\n"],"mappings":"AAKA,OAAO,SAASA,qBAGd;EACAC,UAAU;EAEVC;AAAI,CAIL;EACC,IAAIC,gBAAA;EACJ,IAAID,IAAA,CAAKE,IAAI,KAAK,SAAS;IACzBD,gBAAA,GAAmBF,UAAA,EAAYI,MAAA,GAC5BH,IAAA,EAA8BI,MAAA,EAAQC,SAAA,CACxC;EACH,OAAO,IAAIL,IAAA,CAAKE,IAAI,KAAK,eAAe;IACtCD,gBAAA,GAAmBF,UAAA,EAAYO,YAAA,GAC5BN,IAAA,EAAoCI,MAAA,EAAQC,SAAA,CAC9C;EACH,OAAO;IACLJ,gBAAA,GAAmBF,UAAU,CAACC,IAAA,CAAKE,IAAI,CAAC;EAC1C;EAEA,OAAOD,gBAAA;AACT","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type { SerializedLexicalNode } from 'lexical';
2
- import type { DefaultNodeTypes, SerializedBlockNode, SerializedInlineBlockNode } from '../../../../nodeTypes.js';
2
+ import type { DefaultNodeTypes, SerializedBlockNode, SerializedInlineBlockNode } from '../../../../types/nodeTypes.js';
3
3
  import type { SerializedLexicalNodeWithParent } from '../shared/types.js';
4
4
  export type PlaintextConverter<T extends {
5
5
  [key: string]: any;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AAEzE,MAAM,MAAM,kBAAkB,CAC5B,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,IAErE,CAAC,CAAC,IAAI,EAAE;IACN,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,mBAAmB,CAAA;IAC/B,IAAI,EAAE,CAAC,CAAA;IACP,gBAAgB,EAAE,CAAC,IAAI,EAAE;QACvB,UAAU,CAAC,EAAE,mBAAmB,CAAA;QAChC,KAAK,EAAE,qBAAqB,EAAE,CAAA;QAC9B,MAAM,CAAC,EAAE,+BAA+B,CAAA;KACzC,KAAK,MAAM,EAAE,CAAA;IACd,MAAM,EAAE,+BAA+B,CAAA;CACxC,KAAK,MAAM,CAAC,GACb,MAAM,CAAA;AAEV,MAAM,MAAM,yBAAyB,GACjC,gBA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C,EAAE;YAAE,SAAS,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC,GACjD,mBAAmB,CACxB;KACF,CAAA;IACD,YAAY,CAAC,EAAE;SACZ,CAAC,IAAI,OAAO,CACX,OAAO,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,CAAC,SAAS,yBAAyB,CAAC,MAAM,CAAC,CAAC,GAC1E,CAAC,SAAS;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,GAC7B,CAAC,CAAC,WAAW,CAAC,GACd,KAAK,GACP,KAAK,EACT,MAAM,CACP,CAAC,CAAC,EAAE,kBAAkB,CACrB,OAAO,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,CAAC,SAAS,yBAAyB,CAAC,MAAM,CAAC,CAAC,GAC1E,yBAAyB,CAAC,OAAO,CAAC,CAAC,EAAE;YAAE,SAAS,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC,GACvD,yBAAyB,CAC9B;KACF,CAAA;CACF,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AAEzE,MAAM,MAAM,kBAAkB,CAC5B,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,qBAAqB,IAErE,CAAC,CAAC,IAAI,EAAE;IACN,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,mBAAmB,CAAA;IAC/B,IAAI,EAAE,CAAC,CAAA;IACP,gBAAgB,EA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AE,SAAS,EAAE,MAAM,CAAA;SAAE,GAC7B,CAAC,CAAC,WAAW,CAAC,GACd,KAAK,GACP,KAAK,EACT,MAAM,CACP,CAAC,CAAC,EAAE,kBAAkB,CACrB,OAAO,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,OAAO,CAAA;SAAE,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,CAAC,GAC9D,mBAAmB,CAAC,OAAO,CAAC,CAAC,EAAE;YAAE,SAAS,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC,GACjD,mBAAmB,CACxB;KACF,CAAA;IACD,YAAY,CAAC,EAAE;SACZ,CAAC,IAAI,OAAO,CACX,OAAO,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,CAAC,SAAS,yBAAyB,CAAC,MAAM,CAAC,CAAC,GAC1E,CAAC,SAAS;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,GAC7B,CAAC,CAAC,WAAW,CAAC,GACd,KAAK,GACP,KAAK,EACT,MAAM,CACP,CAAC,CAAC,EAAE,kBAAkB,CACrB,OAAO,CAAC,CAAC,EAAE;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,CAAC,SAAS,yBAAyB,CAAC,MAAM,CAAC,CAAC,GAC1E,yBAAyB,CAAC,OAAO,CAAC,CAAC,EAAE;YAAE,SAAS,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC,GACvD,yBAAyB,CAC9B;KACF,CAAA;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/types.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type {\n DefaultNodeTypes,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from '../../../../nodeTypes.js'\nimport type { SerializedLexicalNodeWithParent } from '../shared/types.js'\n\nexport type PlaintextConverter<\n T extends { [key: string]: any; type?: string } = SerializedLexicalNode,\n> =\n | ((args: {\n childIndex: number\n converters: PlaintextConverters\n node: T\n nodesToPlaintext: (args: {\n converters?: PlaintextConverters\n nodes: SerializedLexicalNode[]\n parent?: SerializedLexicalNodeWithParent\n }) => string[]\n parent: SerializedLexicalNodeWithParent\n }) => string)\n | string\n\nexport type DefaultPlaintextNodeTypes =\n | DefaultNodeTypes\n | SerializedBlockNode<{ blockName?: null | string; blockType: string }> // need these to ensure types for blocks and inlineBlocks work if no generics are provided\n | SerializedInlineBlockNode<{ blockName?: null | string; blockType: string }>\n\nexport type PlaintextConverters<\n T extends { [key: string]: any; type?: string } = DefaultPlaintextNodeTypes,\n> = {\n [key: string]:\n | {\n [blockSlug: string]: PlaintextConverter<any>\n }\n | PlaintextConverter<any>\n | undefined\n} & {\n [nodeType in Exclude<NonNullable<T['type']>, 'block' | 'inlineBlock'>]?: PlaintextConverter<\n Extract<T, { type: nodeType }>\n >\n} & {\n blocks?: {\n [K in Extract<\n Extract<T, { type: 'block' }> extends SerializedBlockNode<infer B>\n ? B extends { blockType: string }\n ? B['blockType']\n : never\n : never,\n string\n >]?: PlaintextConverter<\n Extract<T, { type: 'block' }> extends SerializedBlockNode<infer B>\n ? SerializedBlockNode<Extract<B, { blockType: K }>>\n : SerializedBlockNode\n >\n }\n inlineBlocks?: {\n [K in Extract<\n Extract<T, { type: 'inlineBlock' }> extends SerializedInlineBlockNode<infer B>\n ? B extends { blockType: string }\n ? B['blockType']\n : never\n : never,\n string\n >]?: PlaintextConverter<\n Extract<T, { type: 'inlineBlock' }> extends SerializedInlineBlockNode<infer B>\n ? SerializedInlineBlockNode<Extract<B, { blockType: K }>>\n : SerializedInlineBlockNode\n >\n }\n}\n"],"mappings":"AA8BA","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/features/converters/lexicalToPlaintext/sync/types.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type {\n DefaultNodeTypes,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from '../../../../types/nodeTypes.js'\nimport type { SerializedLexicalNodeWithParent } from '../shared/types.js'\n\nexport type PlaintextConverter<\n T extends { [key: string]: any; type?: string } = SerializedLexicalNode,\n> =\n | ((args: {\n childIndex: number\n converters: PlaintextConverters\n node: T\n nodesToPlaintext: (args: {\n converters?: PlaintextConverters\n nodes: SerializedLexicalNode[]\n parent?: SerializedLexicalNodeWithParent\n }) => string[]\n parent: SerializedLexicalNodeWithParent\n }) => string)\n | string\n\nexport type DefaultPlaintextNodeTypes =\n | DefaultNodeTypes\n | SerializedBlockNode<{ blockName?: null | string; blockType: string }> // need these to ensure types for blocks and inlineBlocks work if no generics are provided\n | SerializedInlineBlockNode<{ blockName?: null | string; blockType: string }>\n\nexport type PlaintextConverters<\n T extends { [key: string]: any; type?: string } = DefaultPlaintextNodeTypes,\n> = {\n [key: string]:\n | {\n [blockSlug: string]: PlaintextConverter<any>\n }\n | PlaintextConverter<any>\n | undefined\n} & {\n [nodeType in Exclude<NonNullable<T['type']>, 'block' | 'inlineBlock'>]?: PlaintextConverter<\n Extract<T, { type: nodeType }>\n >\n} & {\n blocks?: {\n [K in Extract<\n Extract<T, { type: 'block' }> extends SerializedBlockNode<infer B>\n ? B extends { blockType: string }\n ? B['blockType']\n : never\n : never,\n string\n >]?: PlaintextConverter<\n Extract<T, { type: 'block' }> extends SerializedBlockNode<infer B>\n ? SerializedBlockNode<Extract<B, { blockType: K }>>\n : SerializedBlockNode\n >\n }\n inlineBlocks?: {\n [K in Extract<\n Extract<T, { type: 'inlineBlock' }> extends SerializedInlineBlockNode<infer B>\n ? B extends { blockType: string }\n ? B['blockType']\n : never\n : never,\n string\n >]?: PlaintextConverter<\n Extract<T, { type: 'inlineBlock' }> extends SerializedInlineBlockNode<infer B>\n ? SerializedInlineBlockNode<Extract<B, { blockType: K }>>\n : SerializedInlineBlockNode\n >\n }\n}\n"],"mappings":"AA8BA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import type { SerializedLexicalNode } from 'lexical';
2
2
  import type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js';
3
- import type { DefaultNodeTypes, TypedEditorState } from '../../../nodeTypes.js';
3
+ import type { DefaultNodeTypes, TypedEditorState } from '../../../types/nodeTypes.js';
4
4
  export declare const convertMarkdownToLexical: <TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes>({ editorConfig, markdown, }: {
5
5
  editorConfig: SanitizedServerEditorConfig;
6
6
  markdown: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAK/E,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,kDAIvC;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CAiB9B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKrF,eAAO,MAAM,wBAAwB,GACnC,UAAU,SAAS,qBAAqB,GAAG,gBAAgB,EAC3D,6BAGC;IACD,YAAY,EAAE,2BAA2B,CAAA;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB,KAAG,gBAAgB,CAAC,UAAU,CAiB9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertFromMarkdownString","convertMarkdownToLexical","editorConfig","markdown","headlessEditor","nodes","update","features","markdownTransformers","discrete","editorJSON","getEditorState","toJSON"],"sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\nimport type { DefaultNodeTypes, TypedEditorState } from '../../../nodeTypes.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertFromMarkdownString } from '../../../packages/@lexical/markdown/index.js'\n\nexport const convertMarkdownToLexical = <\n TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes,\n>({\n editorConfig,\n markdown,\n}: {\n editorConfig: SanitizedServerEditorConfig\n markdown: string\n}): TypedEditorState<TNodeTypes> => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers)\n },\n { discrete: true },\n )\n\n const editorJSON = headlessEditor.getEditorState().toJSON()\n\n return editorJSON as TypedEditorState<TNodeTypes>\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAKrC,SAASC,eAAe,QAAQ;AAChC,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,wBAAA,GAA2BA,CAEtC;EACAC,YAAY;EACZC;AAAQ,CAIT;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAE,cAAA,CAAeE,MAAM,CACnB;IACEN,0BAAA,CAA2BG,QAAA,EAAUD,YAAA,CAAaK,QAAQ,CAACC,oBAAoB;EACjF,GACA;IAAEC,QAAA,EAAU;EAAK;EAGnB,MAAMC,UAAA,GAAaN,cAAA,CAAeO,cAAc,GAAGC,MAAM;EAEzD,OAAOF,UAAA;AACT","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["createHeadlessEditor","getEnabledNodes","$convertFromMarkdownString","convertMarkdownToLexical","editorConfig","markdown","headlessEditor","nodes","update","features","markdownTransformers","discrete","editorJSON","getEditorState","toJSON"],"sources":["../../../../src/features/converters/markdownToLexical/index.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport { createHeadlessEditor } from '@lexical/headless'\n\nimport type { SanitizedServerEditorConfig } from '../../../lexical/config/types.js'\nimport type { DefaultNodeTypes, TypedEditorState } from '../../../types/nodeTypes.js'\n\nimport { getEnabledNodes } from '../../../lexical/nodes/index.js'\nimport { $convertFromMarkdownString } from '../../../packages/@lexical/markdown/index.js'\n\nexport const convertMarkdownToLexical = <\n TNodeTypes extends SerializedLexicalNode = DefaultNodeTypes,\n>({\n editorConfig,\n markdown,\n}: {\n editorConfig: SanitizedServerEditorConfig\n markdown: string\n}): TypedEditorState<TNodeTypes> => {\n const headlessEditor = createHeadlessEditor({\n nodes: getEnabledNodes({\n editorConfig,\n }),\n })\n\n headlessEditor.update(\n () => {\n $convertFromMarkdownString(markdown, editorConfig.features.markdownTransformers)\n },\n { discrete: true },\n )\n\n const editorJSON = headlessEditor.getEditorState().toJSON()\n\n return editorJSON as TypedEditorState<TNodeTypes>\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAKrC,SAASC,eAAe,QAAQ;AAChC,SAASC,0BAA0B,QAAQ;AAE3C,OAAO,MAAMC,wBAAA,GAA2BA,CAEtC;EACAC,YAAY;EACZC;AAAQ,CAIT;EACC,MAAMC,cAAA,GAAiBN,oBAAA,CAAqB;IAC1CO,KAAA,EAAON,eAAA,CAAgB;MACrBG;IACF;EACF;EAEAE,cAAA,CAAeE,MAAM,CACnB;IACEN,0BAAA,CAA2BG,QAAA,EAAUD,YAAA,CAAaK,QAAQ,CAACC,oBAAoB;EACjF,GACA;IAAEC,QAAA,EAAU;EAAK;EAGnB,MAAMC,UAAA,GAAaN,cAAA,CAAeO,cAAc,GAAGC,MAAM;EAEzD,OAAOF,UAAA;AACT","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import './style.scss';
1
+ import './style.css';
2
2
  export declare function RichTextPlugin(): import("react").JSX.Element;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/debug/jsxConverter/client/plugin/index.tsx"],"names":[],"mappings":"AAOA,OAAO,cAAc,CAAA;AAErB,wBAAgB,cAAc,gCAe7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/debug/jsxConverter/client/plugin/index.tsx"],"names":[],"mappings":"AAOA,OAAO,aAAa,CAAA;AAEpB,wBAAgB,cAAc,gCAe7B"}
@@ -6,6 +6,7 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
6
6
  import { useEffect, useState } from 'react';
7
7
  // eslint-disable-next-line payload/no-imports-from-exports-dir
8
8
  import { defaultJSXConverters, RichText } from '../../../../../exports/react/index.js';
9
+ import './style.css';
9
10
  export function RichTextPlugin() {
10
11
  const $ = _c(7);
11
12
  const [editor] = useLexicalComposerContext();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","useEffect","useState","defaultJSXConverters","RichText","RichTextPlugin","$","editor","t0","getEditorState","toJSON","editorState","setEditorState","t1","t2","registerUpdateListener","t3","editorState_0","_jsx","className","children","converters","data"],"sources":["../../../../../../src/features/debug/jsxConverter/client/plugin/index.tsx"],"sourcesContent":["'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useEffect, useState } from 'react'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { defaultJSXConverters, RichText } from '../../../../../exports/react/index.js'\nimport './style.scss'\n\nexport function RichTextPlugin() {\n const [editor] = useLexicalComposerContext()\n const [editorState, setEditorState] = useState(() => editor.getEditorState().toJSON())\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n setEditorState(editorState.toJSON())\n })\n }, [editor])\n\n return (\n <div className=\"debug-jsx-converter\">\n <RichText converters={defaultJSXConverters} data={editorState} />\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,SAAS,EAAEC,QAAQ,QAAQ;AAEpC;AACA,SAASC,oBAAoB,EAAEC,QAAQ,QAAQ;AAG/C,OAAO,SAAAC,eAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EACL,OAAAQ,MAAA,IAAiBP,yBAAA;EAAA,IAAAQ,EAAA;EAAA,IAAAF,CAAA,QAAAC,MAAA;IAC8BC,EAAA,GAAAA,CAAA,KAAMD,MAAA,CAAAE,cAAA,CAAqB,EAAAC,MAAA,CAAS;IAAAJ,CAAA,MAAAC,MAAA;IAAAD,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAAnF,OAAAK,WAAA,EAAAC,cAAA,IAAsCV,QAAA,CAASM,EAAoC;EAAA,IAAAK,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAR,CAAA,QAAAC,MAAA;IAEzEM,EAAA,GAAAA,CAAA,KACDN,MAAA,CAAAQ,sBAAA,CAAAC,EAAA;MAA+B;QAAAL,WAAA,EAAAM;MAAA,IAAAD,EAAe;MACnDJ,cAAA,CAAeD,aAAA,CAAAD,MAAA,CAAkB;IAAA,CACnC;IACCI,EAAA,IAACP,MAAA;IAAOD,CAAA,MAAAC,MAAA;IAAAD,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAQ,EAAA;EAAA;IAAAD,EAAA,GAAAP,CAAA;IAAAQ,EAAA,GAAAR,CAAA;EAAA;EAJXL,SAAA,CAAUY,EAIV,EAAGC,EAAQ;EAAA,IAAAE,EAAA;EAAA,IAAAV,CAAA,QAAAK,WAAA;IAGTK,EAAA,GAAAE,IAAA,CAAC;MAAAC,SAAA,EAAc;MAAAC,QAAA,EACbF,IAAA,CAAAd,QAAA;QAAAiB,UAAA,EAAAlB,oBAAA;QAAAmB,IAAA,EAAkDX;MAAA,C;;;;;;;SADpDK,E","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","useEffect","useState","defaultJSXConverters","RichText","RichTextPlugin","$","editor","t0","getEditorState","toJSON","editorState","setEditorState","t1","t2","registerUpdateListener","t3","editorState_0","_jsx","className","children","converters","data"],"sources":["../../../../../../src/features/debug/jsxConverter/client/plugin/index.tsx"],"sourcesContent":["'use client'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'\nimport { useEffect, useState } from 'react'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { defaultJSXConverters, RichText } from '../../../../../exports/react/index.js'\nimport './style.css'\n\nexport function RichTextPlugin() {\n const [editor] = useLexicalComposerContext()\n const [editorState, setEditorState] = useState(() => editor.getEditorState().toJSON())\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n setEditorState(editorState.toJSON())\n })\n }, [editor])\n\n return (\n <div className=\"debug-jsx-converter\">\n <RichText converters={defaultJSXConverters} data={editorState} />\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAEA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,SAAS,EAAEC,QAAQ,QAAQ;AAEpC;AACA,SAASC,oBAAoB,EAAEC,QAAQ,QAAQ;AAC/C,OAAO;AAEP,OAAO,SAAAC,eAAA;EAAA,MAAAC,CAAA,GAAAP,EAAA;EACL,OAAAQ,MAAA,IAAiBP,yBAAA;EAAA,IAAAQ,EAAA;EAAA,IAAAF,CAAA,QAAAC,MAAA;IAC8BC,EAAA,GAAAA,CAAA,KAAMD,MAAA,CAAAE,cAAA,CAAqB,EAAAC,MAAA,CAAS;IAAAJ,CAAA,MAAAC,MAAA;IAAAD,CAAA,MAAAE,EAAA;EAAA;IAAAA,EAAA,GAAAF,CAAA;EAAA;EAAnF,OAAAK,WAAA,EAAAC,cAAA,IAAsCV,QAAA,CAASM,EAAoC;EAAA,IAAAK,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAR,CAAA,QAAAC,MAAA;IAEzEM,EAAA,GAAAA,CAAA,KACDN,MAAA,CAAAQ,sBAAA,CAAAC,EAAA;MAA+B;QAAAL,WAAA,EAAAM;MAAA,IAAAD,EAAe;MACnDJ,cAAA,CAAeD,aAAA,CAAAD,MAAA,CAAkB;IAAA,CACnC;IACCI,EAAA,IAACP,MAAA;IAAOD,CAAA,MAAAC,MAAA;IAAAD,CAAA,MAAAO,EAAA;IAAAP,CAAA,MAAAQ,EAAA;EAAA;IAAAD,EAAA,GAAAP,CAAA;IAAAQ,EAAA,GAAAR,CAAA;EAAA;EAJXL,SAAA,CAAUY,EAIV,EAAGC,EAAQ;EAAA,IAAAE,EAAA;EAAA,IAAAV,CAAA,QAAAK,WAAA;IAGTK,EAAA,GAAAE,IAAA,CAAC;MAAAC,SAAA,EAAc;MAAAC,QAAA,EACbF,IAAA,CAAAd,QAAA;QAAAiB,UAAA,EAAAlB,oBAAA;QAAAmB,IAAA,EAAkDX;MAAA,C;;;;;;;SADpDK,E","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ .debug-jsx-converter {
2
+ padding-left: var(--spacer-5);
3
+
4
+ ul,
5
+ ol {
6
+ padding-left: revert;
7
+ margin: revert;
8
+ }
9
+ }
@@ -0,0 +1,51 @@
1
+ @layer payload-default {
2
+ .test-recorder-output {
3
+ margin: var(--spacer-4) auto var(--spacer-4) auto;
4
+ width: 100%;
5
+ }
6
+ .test-recorder-toolbar {
7
+ display: flex;
8
+ }
9
+
10
+ .test-recorder-button {
11
+ position: relative;
12
+ display: block;
13
+ font-size: var(--text-body-small-font-size);
14
+ padding: var(--spacer-1);
15
+ border-radius: var(--radius-medium);
16
+ border: none;
17
+ cursor: pointer;
18
+ outline: none;
19
+ box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.4);
20
+ background-color: #222;
21
+ color: white;
22
+ transition: box-shadow 50ms ease-out;
23
+ }
24
+
25
+ .test-recorder-button:active {
26
+ box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.4);
27
+ }
28
+
29
+ .test-recorder-button + .test-recorder-button {
30
+ margin-left: var(--spacer-1);
31
+ }
32
+
33
+ .test-recorder-button::after {
34
+ content: '';
35
+ position: absolute;
36
+ top: var(--spacer-2);
37
+ right: var(--spacer-2);
38
+ bottom: var(--spacer-2);
39
+ left: var(--spacer-2);
40
+ display: block;
41
+ background-size: contain;
42
+ filter: invert(1);
43
+ }
44
+ #test-recorder-button {
45
+ position: relative;
46
+ }
47
+
48
+ #test-recorder-button-snapshot {
49
+ margin-right: auto;
50
+ }
51
+ }
@@ -1,5 +1,5 @@
1
1
  import type { PluginComponent } from '../../../../typesClient.js';
2
- import './index.scss';
2
+ import './index.css';
3
3
  export declare function isSelectAll(event: KeyboardEvent): boolean;
4
4
  export declare const TestRecorderPlugin: PluginComponent<undefined>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/debug/testRecorder/client/plugin/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,cAAc,CAAA;AA8ErB,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEzD;AAmWD,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAYzD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/debug/testRecorder/client/plugin/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,aAAa,CAAA;AA8EpB,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEzD;AAmWD,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAYzD,CAAA"}
@@ -7,6 +7,7 @@ import { $createParagraphNode, $createTextNode, $getRoot, getDOMSelection } from
7
7
  import * as React from 'react';
8
8
  import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
9
9
  import { IS_APPLE } from '../../../../../lexical/utils/environment.js';
10
+ import './index.css';
10
11
  const copy = text => {
11
12
  const textArea = document.createElement('textarea');
12
13
  textArea.value = text || '';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createParagraphNode","$createTextNode","$getRoot","getDOMSelection","React","useCallback","useEffect","useLayoutEffect","useRef","useState","IS_APPLE","copy","text","textArea","document","createElement","value","style","position","opacity","body","appendChild","focus","select","result","execCommand","console","log","error","removeChild","download","filename","a","setAttribute","encodeURIComponent","display","click","formatStep","step","formatOneStep","name","x","y","anchorPath","toString","anchorOffset","focusPath","focusOffset","formattedStep","count","join","isSelectAll","event","key","toLowerCase","metaKey","ctrlKey","sanitizeSelection","selection","anchorNode","focusNode","getPathFromNodeToEditor","node","rootElement","currentNode","path","undefined","unshift","Array","from","parentNode","childNodes","indexOf","keyPresses","Set","useTestRecorder","editor","steps","setSteps","isRecording","setIsRecording","setCurrentInnerHTML","templatedTest","setTemplatedTest","previousSelectionRef","skipNextSelectionChangeRef","preRef","getCurrentEditor","generateTestContent","getRootElement","browserSelection","_window","contains","map","pushStep","currentSteps","currentIndex","length","lastStep","slice","onKeyDown","has","onKeyUp","registerRootListener","prevRootElement","removeEventListener","addEventListener","current","scrollTo","scrollHeight","testContent","removeUpdateListener","registerUpdateListener","dirtyElements","dirtyLeaves","editorState","currentSelection","_selection","previousSelection","skipNextSelectionChange","size","innerHTML","toggleEditorSelection","currentEditor","update","root","clear","append","currentIsRecording","onSnapshotClick","onCopyClick","onDownloadClick","button","_jsx","className","id","onClick","e","preventDefault","title","type","output","_jsxs","ref","TestRecorderPlugin","$","testRecorderButton","testRecorderOutput","t0","Fragment","children"],"sources":["../../../../../../src/features/debug/testRecorder/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot, getDOMSelection } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport { IS_APPLE } from '../../../../../lexical/utils/environment.js'\nimport './index.scss'\n\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path: number[] = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'Backspace',\n 'Delete',\n 'Enter',\n 'Escape',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = getDOMSelection(editor._window)\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = getDOMSelection(editor._window)\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = getDOMSelection(editor._window)\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,EAAEC,eAAe,EAAEC,QAAQ,EAAEC,eAAe,QAAQ;AACjF,YAAYC,KAAA,MAAW;AACvB,SAAmBC,WAAW,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAIpF,SAASC,QAAQ,QAAQ;AAGzB,MAAMC,IAAA,GAAQC,IAAA;EACZ,MAAMC,QAAA,GAAWC,QAAA,CAASC,aAAa,CAAC;EACxCF,QAAA,CAASG,KAAK,GAAGJ,IAAA,IAAQ;EACzBC,QAAA,CAASI,KAAK,CAACC,QAAQ,GAAG;EAC1BL,QAAA,CAASI,KAAK,CAACE,OAAO,GAAG;EACzBL,QAAA,CAASM,IAAI,EAAEC,WAAA,CAAYR,QAAA;EAC3BA,QAAA,CAASS,KAAK;EACdT,QAAA,CAASU,MAAM;EACf,IAAI;IACF,MAAMC,MAAA,GAASV,QAAA,CAASW,WAAW,CAAC;IACpC;IACAC,OAAA,CAAQC,GAAG,CAACH,MAAA;EACd,EAAE,OAAOI,KAAA,EAAO;IACdF,O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AC;MAAIE,EAAA,EAAG;MAAgBQ,GAAA,EAAKzD,MAAA;gBAC1BJ;;OAGH;EAEJ,OAAO,CAACkD,MAAA,EAAQS,MAAA,CAAO;AACzB;AACA,OAAO,MAAMG,kBAAA,GAAiDA,CAAA;EAAA,MAAAC,CAAA,GAAAnJ,EAAA;EAC5D,OAAA8E,MAAA,IAAiB7E,yBAAA;EACjB,OAAAmJ,kBAAA,EAAAC,kBAAA,IAAiDxE,eAAA,CAAgBC,MAAA;EAAA,IAAAwE,EAAA;EAAA,IAAAH,CAAA,QAAAC,kBAAA,IAAAD,CAAA,QAAAE,kBAAA;IAG/DC,EAAA,GAAAN,KAAA,CAAA1I,KAAA,CAAAiJ,QAAA;MAAAC,QAAA,GACEjB,IAAA,CAAC;QAAAiB,QAAA,EAAE;MAAA,C,GACFJ,kBAAA,EACAC,kBAAA,EACDd,IAAA,CAAC;QAAAiB,QAAA,EAAE;MAAA,C;;;;;;;;SAJLF,E;CAOJ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","$createParagraphNode","$createTextNode","$getRoot","getDOMSelection","React","useCallback","useEffect","useLayoutEffect","useRef","useState","IS_APPLE","copy","text","textArea","document","createElement","value","style","position","opacity","body","appendChild","focus","select","result","execCommand","console","log","error","removeChild","download","filename","a","setAttribute","encodeURIComponent","display","click","formatStep","step","formatOneStep","name","x","y","anchorPath","toString","anchorOffset","focusPath","focusOffset","formattedStep","count","join","isSelectAll","event","key","toLowerCase","metaKey","ctrlKey","sanitizeSelection","selection","anchorNode","focusNode","getPathFromNodeToEditor","node","rootElement","currentNode","path","undefined","unshift","Array","from","parentNode","childNodes","indexOf","keyPresses","Set","useTestRecorder","editor","steps","setSteps","isRecording","setIsRecording","setCurrentInnerHTML","templatedTest","setTemplatedTest","previousSelectionRef","skipNextSelectionChangeRef","preRef","getCurrentEditor","generateTestContent","getRootElement","browserSelection","_window","contains","map","pushStep","currentSteps","currentIndex","length","lastStep","slice","onKeyDown","has","onKeyUp","registerRootListener","prevRootElement","removeEventListener","addEventListener","current","scrollTo","scrollHeight","testContent","removeUpdateListener","registerUpdateListener","dirtyElements","dirtyLeaves","editorState","currentSelection","_selection","previousSelection","skipNextSelectionChange","size","innerHTML","toggleEditorSelection","currentEditor","update","root","clear","append","currentIsRecording","onSnapshotClick","onCopyClick","onDownloadClick","button","_jsx","className","id","onClick","e","preventDefault","title","type","output","_jsxs","ref","TestRecorderPlugin","$","testRecorderButton","testRecorderOutput","t0","Fragment","children"],"sources":["../../../../../../src/features/debug/testRecorder/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot, getDOMSelection } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport { IS_APPLE } from '../../../../../lexical/utils/environment.js'\nimport './index.css'\n\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path: number[] = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'Backspace',\n 'Delete',\n 'Enter',\n 'Escape',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = getDOMSelection(editor._window)\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = getDOMSelection(editor._window)\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = getDOMSelection(editor._window)\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,oBAAoB,EAAEC,eAAe,EAAEC,QAAQ,EAAEC,eAAe,QAAQ;AACjF,YAAYC,KAAA,MAAW;AACvB,SAAmBC,WAAW,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAIpF,SAASC,QAAQ,QAAQ;AACzB,OAAO;AAEP,MAAMC,IAAA,GAAQC,IAAA;EACZ,MAAMC,QAAA,GAAWC,QAAA,CAASC,aAAa,CAAC;EACxCF,QAAA,CAASG,KAAK,GAAGJ,IAAA,IAAQ;EACzBC,QAAA,CAASI,KAAK,CAACC,QAAQ,GAAG;EAC1BL,QAAA,CAAS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RP,WAAA;UACAO,GAAA,CAAEC,cAAc;QAClB;QACAC,KAAA,EAAM;QACNC,IAAA,EAAK;kBACN;uBAGDP,IAAA,CAAC;QACCC,SAAA,EAAU;QACVC,EAAA,EAAG;QACHC,OAAA,EAAUC,GAAA;UACRN,eAAA;UACAM,GAAA,CAAEC,cAAc;QAClB;QACAC,KAAA,EAAM;QACNC,IAAA,EAAK;kBACN;;qBAIHP,IAAA,CAAC;MAAIE,EAAA,EAAG;MAAgBQ,GAAA,EAAKzD,MAAA;gBAC1BJ;;OAGH;EAEJ,OAAO,CAACkD,MAAA,EAAQS,MAAA,CAAO;AACzB;AACA,OAAO,MAAMG,kBAAA,GAAiDA,CAAA;EAAA,MAAAC,CAAA,GAAAnJ,EAAA;EAC5D,OAAA8E,MAAA,IAAiB7E,yBAAA;EACjB,OAAAmJ,kBAAA,EAAAC,kBAAA,IAAiDxE,eAAA,CAAgBC,MAAA;EAAA,IAAAwE,EAAA;EAAA,IAAAH,CAAA,QAAAC,kBAAA,IAAAD,CAAA,QAAAE,kBAAA;IAG/DC,EAAA,GAAAN,KAAA,CAAA1I,KAAA,CAAAiJ,QAAA;MAAAC,QAAA,GACEjB,IAAA,CAAC;QAAAiB,QAAA,EAAE;MAAA,C,GACFJ,kBAAA,EACAC,kBAAA,EACDd,IAAA,CAAC;QAAAiB,QAAA,EAAE;MAAA,C;;;;;;;;SAJLF,E;CAOJ","ignoreList":[]}
@@ -0,0 +1,81 @@
1
+ @layer payload-default {
2
+ .tree-view-output {
3
+ --tree-view-max-height: 25rem;
4
+ display: block;
5
+ background: #222;
6
+ color: #fff;
7
+ padding: 0;
8
+ font-size: var(--text-body-medium-font-size);
9
+ margin: 1px auto var(--spacer-2) auto;
10
+ position: relative;
11
+ overflow: hidden;
12
+ border-bottom-left-radius: var(--radius-medium);
13
+ border-bottom-right-radius: var(--radius-medium);
14
+
15
+ pre {
16
+ line-height: 1.1;
17
+ background: #222;
18
+ color: #fff;
19
+ margin: 0;
20
+ padding: var(--spacer-2);
21
+ font-size: var(--text-body-medium-font-size);
22
+ overflow: auto;
23
+ max-height: var(--tree-view-max-height);
24
+ }
25
+
26
+ .debug-treetype-button {
27
+ border: 0;
28
+ padding: 0;
29
+ font-size: var(--text-body-medium-font-size);
30
+ top: var(--spacer-2);
31
+ right: calc(var(--spacer-6) * 2);
32
+ position: absolute;
33
+ background: none;
34
+ color: #fff;
35
+
36
+ &:hover {
37
+ text-decoration: underline;
38
+ }
39
+ }
40
+
41
+ .debug-timetravel-button {
42
+ border: 0;
43
+ padding: 0;
44
+ font-size: var(--text-body-medium-font-size);
45
+ top: var(--spacer-2);
46
+ right: var(--spacer-3);
47
+ position: absolute;
48
+ background: none;
49
+ color: #fff;
50
+
51
+ &:hover {
52
+ text-decoration: underline;
53
+ }
54
+ }
55
+
56
+ .debug-timetravel-panel {
57
+ overflow: hidden;
58
+ padding: 0 0 var(--spacer-2);
59
+ margin: auto;
60
+ display: flex;
61
+ }
62
+
63
+ .debug-timetravel-panel-button {
64
+ padding: 0;
65
+ border: 0;
66
+ background: none;
67
+ flex: 1;
68
+ color: #fff;
69
+ font-size: var(--text-body-large-font-size);
70
+
71
+ &:hover {
72
+ text-decoration: underline;
73
+ }
74
+ }
75
+
76
+ .debug-timetravel-panel-slider {
77
+ padding: 0;
78
+ flex: 8;
79
+ }
80
+ }
81
+ }
@@ -1,4 +1,4 @@
1
1
  import type { PluginComponent } from '../../../../typesClient.js';
2
- import './index.scss';
2
+ import './index.css';
3
3
  export declare const TreeViewPlugin: PluginComponent<undefined>;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/debug/treeView/client/plugin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,SAAS,CAarD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/debug/treeView/client/plugin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAEjE,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,SAAS,CAarD,CAAA"}
@@ -5,6 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
6
6
  import { TreeView } from '@lexical/react/LexicalTreeView.js';
7
7
  import * as React from 'react';
8
+ import './index.css';
8
9
  export const TreeViewPlugin = () => {
9
10
  const $ = _c(2);
10
11
  const [editor] = useLexicalComposerContext();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","TreeView","React","TreeViewPlugin","$","editor","t0","_jsx","timeTravelButtonClassName","timeTravelPanelButtonClassName","timeTravelPanelClassName","timeTravelPanelSliderClassName","treeTypeButtonClassName","viewClassName"],"sources":["../../../../../../src/features/debug/treeView/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport './index.scss'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,QAAQ,QAAQ;AACzB,YAAYC,KAAA,MAAW;AAMvB,OAAO,MAAMC,cAAA,GAA6CA,CAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EACxD,OAAAM,MAAA,IAAiBL,yBAAA;EAAA,IAAAM,EAAA;EAAA,IAAAF,CAAA,QAAAC,MAAA;IAEfC,EAAA,GAAAC,IAAA,CAAAN,QAAA;MAAAI,MAAA;MAAAG,yBAAA,EAE4B;MAAAC,8BAAA,EACK;MAAAC,wBAAA,EACN;MAAAC,8BAAA,EACM;MAAAC,uBAAA,EACP;MAAAC,aAAA,EACV;IAAA,C;;;;;;SAPhBP,E;CAUJ","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","useLexicalComposerContext","TreeView","React","TreeViewPlugin","$","editor","t0","_jsx","timeTravelButtonClassName","timeTravelPanelButtonClassName","timeTravelPanelClassName","timeTravelPanelSliderClassName","treeTypeButtonClassName","viewClassName"],"sources":["../../../../../../src/features/debug/treeView/client/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../../typesClient.js'\n\nimport './index.css'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AACA,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,QAAQ,QAAQ;AACzB,YAAYC,KAAA,MAAW;AAIvB,OAAO;AAEP,OAAO,MAAMC,cAAA,GAA6CA,CAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EACxD,OAAAM,MAAA,IAAiBL,yBAAA;EAAA,IAAAM,EAAA;EAAA,IAAAF,CAAA,QAAAC,MAAA;IAEfC,EAAA,GAAAC,IAAA,CAAAN,QAAA;MAAAI,MAAA;MAAAG,yBAAA,EAE4B;MAAAC,8BAAA,EACK;MAAAC,wBAAA,EACN;MAAAC,8BAAA,EACM;MAAAC,uBAAA,EACP;MAAAC,aAAA,EACV;IAAA,C;;;;;;SAPhBP,E;CAUJ","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ @layer payload-default {
2
+ .table-cell-action-button-container {
3
+ position: absolute;
4
+ z-index: 3;
5
+ top: 0;
6
+ left: 0;
7
+ will-change: transform;
8
+ }
9
+
10
+ .table-cell-action-button-container.table-cell-action-button-container--active {
11
+ pointer-events: auto;
12
+ opacity: 1;
13
+ }
14
+ .table-cell-action-button-container.table-cell-action-button-container--inactive {
15
+ pointer-events: none;
16
+ opacity: 0;
17
+ }
18
+
19
+ .table-cell-action-button {
20
+ border: 0;
21
+ padding: 0;
22
+ position: absolute;
23
+ top: var(--spacer-2);
24
+ right: var(--spacer-2);
25
+ border-radius: var(--radius-medium);
26
+ color: var(--color-text-secondary);
27
+ background: transparent;
28
+ display: inline-block;
29
+ cursor: pointer;
30
+
31
+ &:hover {
32
+ background-color: var(--color-bg-secondary-hover);
33
+ }
34
+
35
+ &:active {
36
+ background-color: var(--color-bg-secondary-pressed);
37
+ }
38
+ }
39
+
40
+ .table-action-menu-dropdown {
41
+ --menu-min-width: 10rem;
42
+ z-index: 100;
43
+ display: flex;
44
+ flex-direction: column;
45
+ position: fixed;
46
+ background: var(--color-bg-menu);
47
+ min-width: var(--menu-min-width);
48
+ border-radius: var(--radius-large);
49
+ padding: var(--spacer-2);
50
+ overflow-y: auto;
51
+ box-shadow:
52
+ 0px 0px 0.5px 0px rgba(0, 0, 0, 0.18),
53
+ 0px 2px 6px 0px rgba(0, 0, 0, 0.12),
54
+ 0px 10px 16px 0px rgba(0, 0, 0, 0.08);
55
+
56
+ hr {
57
+ border: none;
58
+ height: var(--stroke-width-small);
59
+ margin: var(--spacer-2) calc(var(--spacer-2) * -1);
60
+ background-color: var(--ramp-white-200);
61
+ }
62
+
63
+ .item {
64
+ padding: var(--spacer-2);
65
+ color: var(--ramp-white-800);
66
+ background: transparent;
67
+ cursor: pointer;
68
+ font-family: var(--text-body-medium-font-family);
69
+ font-size: var(--text-body-medium-font-size);
70
+ font-weight: var(--text-body-medium-font-weight);
71
+ line-height: var(--text-body-medium-line-height);
72
+ display: flex;
73
+ align-items: center;
74
+ flex-shrink: 0;
75
+ border: 0;
76
+ border-radius: var(--radius-medium);
77
+ width: 100%;
78
+ text-align: left;
79
+
80
+ &:hover {
81
+ background: var(--color-bg-brand);
82
+ color: var(--ramp-white-1000);
83
+ }
84
+
85
+ &:active {
86
+ background: var(--color-bg-brand-pressed);
87
+ color: var(--ramp-white-1000);
88
+ }
89
+ }
90
+ }
91
+ }
@@ -1,4 +1,4 @@
1
1
  import type { PluginComponentWithAnchor } from '../../../../typesClient.js';
2
- import './index.scss';
2
+ import './index.css';
3
3
  export declare const TableActionMenuPlugin: PluginComponentWithAnchor;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,OAAO,cAAc,CAAA;AA6oBrB,eAAO,MAAM,qBAAqB,EAAE,yBAQnC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/experimental_table/client/plugins/TableActionMenuPlugin/index.tsx"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AAE3E,OAAO,aAAa,CAAA;AA6oBpB,eAAO,MAAM,qBAAqB,EAAE,yBAQnC,CAAA"}