@payloadcms/richtext-lexical 4.0.0-internal.5b1e7cd → 4.0.0-internal.c2b57ce

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 (669) hide show
  1. package/dist/exports/client/Field-VMNLDBRS.js +2 -0
  2. package/dist/exports/client/Field-VMNLDBRS.js.map +7 -0
  3. package/dist/exports/client/RelationshipComponent-RZL743CS.js +2 -0
  4. package/dist/exports/client/RelationshipComponent-RZL743CS.js.map +7 -0
  5. package/dist/exports/client/bundled.css +1 -1
  6. package/dist/exports/client/chunk-74RUDY7K.js +2 -0
  7. package/dist/exports/client/chunk-74RUDY7K.js.map +7 -0
  8. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  9. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  10. package/dist/exports/client/component-2ZTDKRVK.js +2 -0
  11. package/dist/exports/client/component-2ZTDKRVK.js.map +7 -0
  12. package/dist/exports/client/componentInline-JYKBUUPZ.js +2 -0
  13. package/dist/exports/client/index.d.ts +0 -2
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +30 -30
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  18. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  19. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  20. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  21. package/dist/features/blockquote/server/index.js +0 -39
  22. package/dist/features/blockquote/server/index.js.map +1 -1
  23. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  24. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  25. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  26. package/dist/features/blocks/client/component/index.css +178 -0
  27. package/dist/features/blocks/client/component/index.d.ts +1 -1
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +90 -18
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  32. package/dist/features/blocks/client/componentInline/index.css +85 -0
  33. package/dist/features/blocks/client/componentInline/index.d.ts +1 -1
  34. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  35. package/dist/features/blocks/client/componentInline/index.js +31 -8
  36. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  37. package/dist/features/blocks/client/index.d.ts.map +1 -1
  38. package/dist/features/blocks/client/index.js +0 -2
  39. package/dist/features/blocks/client/index.js.map +1 -1
  40. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  41. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  42. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  43. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  44. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  46. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  47. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  48. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  49. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  50. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  51. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  52. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  53. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  54. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  55. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  56. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  57. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  58. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  59. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  60. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  61. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  62. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  63. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  64. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  65. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  66. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  67. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  68. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  69. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  70. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  71. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  72. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  73. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  74. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  75. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  76. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  77. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  78. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  79. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  80. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  81. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  82. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  83. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  84. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  85. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  86. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  87. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  88. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  89. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  90. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  91. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  92. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  93. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  94. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  95. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  96. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  97. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  98. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  99. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  100. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  101. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  102. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  103. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  104. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  105. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  106. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  107. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  108. package/dist/features/experimental_table/server/index.js +0 -102
  109. package/dist/features/experimental_table/server/index.js.map +1 -1
  110. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  111. package/dist/features/heading/server/index.d.ts.map +1 -1
  112. package/dist/features/heading/server/index.js +0 -39
  113. package/dist/features/heading/server/index.js.map +1 -1
  114. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  115. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  116. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  117. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  118. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  119. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  120. package/dist/features/horizontalRule/server/index.js +0 -8
  121. package/dist/features/horizontalRule/server/index.js.map +1 -1
  122. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  123. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  124. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  125. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  126. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  127. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  128. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  129. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  130. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  131. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  132. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  133. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  134. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  135. package/dist/features/link/server/index.d.ts.map +1 -1
  136. package/dist/features/link/server/index.js +0 -71
  137. package/dist/features/link/server/index.js.map +1 -1
  138. package/dist/features/link/server/validate.d.ts.map +1 -1
  139. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  140. package/dist/features/lists/checklist/server/index.js +0 -7
  141. package/dist/features/lists/checklist/server/index.js.map +1 -1
  142. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  143. package/dist/features/lists/orderedList/server/index.js +0 -7
  144. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  145. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  146. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  147. package/dist/features/lists/unorderedList/server/index.js +0 -7
  148. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  149. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  150. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  151. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  152. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  153. package/dist/features/relationship/client/components/index.css +112 -0
  154. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  155. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  156. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  157. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  158. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  159. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  160. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  161. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  162. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  163. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  164. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  165. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  166. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  167. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  168. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  169. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  170. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  171. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  172. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  173. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  174. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  175. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  176. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  177. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  178. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  179. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  180. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  181. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  182. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  183. package/dist/features/toolbars/types.d.ts +4 -0
  184. package/dist/features/toolbars/types.d.ts.map +1 -1
  185. package/dist/features/toolbars/types.js.map +1 -1
  186. package/dist/features/typesServer.d.ts +0 -17
  187. package/dist/features/typesServer.d.ts.map +1 -1
  188. package/dist/features/typesServer.js.map +1 -1
  189. package/dist/features/upload/client/component/index.css +220 -0
  190. package/dist/features/upload/client/component/index.d.ts +1 -1
  191. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  192. package/dist/features/upload/client/component/index.js +86 -63
  193. package/dist/features/upload/client/component/index.js.map +1 -1
  194. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  195. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  196. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  197. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  198. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  199. package/dist/features/upload/server/index.d.ts.map +1 -1
  200. package/dist/features/upload/server/index.js +0 -78
  201. package/dist/features/upload/server/index.js.map +1 -1
  202. package/dist/features/upload/server/validate.d.ts.map +1 -1
  203. package/dist/field/Diff/converters/listitem/index.css +44 -0
  204. package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
  205. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  206. package/dist/field/Diff/converters/listitem/index.js +1 -0
  207. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  208. package/dist/field/Diff/converters/relationship/index.css +68 -0
  209. package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
  210. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  211. package/dist/field/Diff/converters/relationship/index.js +1 -0
  212. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  213. package/dist/field/Diff/converters/unknown/index.css +37 -0
  214. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  215. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  216. package/dist/field/Diff/converters/unknown/index.js +1 -0
  217. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  218. package/dist/field/Diff/converters/upload/index.css +112 -0
  219. package/dist/field/Diff/converters/upload/index.d.ts +1 -1
  220. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  221. package/dist/field/Diff/converters/upload/index.js +1 -0
  222. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  223. package/dist/field/Diff/index.css +101 -0
  224. package/dist/field/Diff/index.d.ts +1 -1
  225. package/dist/field/Diff/index.d.ts.map +1 -1
  226. package/dist/field/Diff/index.js +1 -0
  227. package/dist/field/Diff/index.js.map +1 -1
  228. package/dist/field/Field.d.ts +2 -2
  229. package/dist/field/Field.d.ts.map +1 -1
  230. package/dist/field/Field.js +13 -12
  231. package/dist/field/Field.js.map +1 -1
  232. package/dist/field/ViewSelector.css +32 -0
  233. package/dist/field/ViewSelector.d.ts +1 -1
  234. package/dist/field/ViewSelector.d.ts.map +1 -1
  235. package/dist/field/ViewSelector.js +1 -0
  236. package/dist/field/ViewSelector.js.map +1 -1
  237. package/dist/field/bundled.css +1 -1
  238. package/dist/field/index.css +60 -0
  239. package/dist/index.d.ts +0 -10
  240. package/dist/index.d.ts.map +1 -1
  241. package/dist/index.js +11 -10
  242. package/dist/index.js.map +1 -1
  243. package/dist/lexical/LexicalEditor.css +50 -0
  244. package/dist/lexical/LexicalEditor.d.ts +1 -1
  245. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  246. package/dist/lexical/LexicalEditor.js +1 -0
  247. package/dist/lexical/LexicalEditor.js.map +1 -1
  248. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  249. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  250. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  251. package/dist/lexical/config/server/loader.js +12 -9
  252. package/dist/lexical/config/server/loader.js.map +1 -1
  253. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  254. package/dist/lexical/config/server/sanitize.js +0 -6
  255. package/dist/lexical/config/server/sanitize.js.map +1 -1
  256. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  257. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  258. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  259. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  260. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  261. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  262. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  263. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  264. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  265. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  266. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  267. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  268. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  269. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  270. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  271. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  272. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  273. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  274. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  275. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  276. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  277. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  278. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  279. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  280. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  281. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  282. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  283. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  284. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  285. package/dist/lexical/theme/EditorTheme.css +359 -0
  286. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  287. package/dist/lexical/theme/EditorTheme.js +1 -0
  288. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  289. package/dist/lexical/ui/ContentEditable.css +95 -0
  290. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  291. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  292. package/dist/lexical/ui/ContentEditable.js +1 -0
  293. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  294. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  295. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  296. package/dist/lexical/ui/icons/Add/index.js +19 -12
  297. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  298. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  299. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  300. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  301. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  302. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  303. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  304. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  305. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  306. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  307. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  308. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  309. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  310. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  311. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  312. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  313. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  314. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  315. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  316. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  317. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  318. package/dist/lexical/ui/icons/Block/index.js +13 -28
  319. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  320. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  321. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  322. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  323. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  324. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  325. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  326. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  327. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  328. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  329. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  330. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  331. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  332. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  333. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  334. package/dist/lexical/ui/icons/Code/index.js +15 -13
  335. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  336. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  337. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  338. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  339. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  340. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  341. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  342. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  343. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  344. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  345. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  346. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  347. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  348. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  349. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  350. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  351. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  352. package/dist/lexical/ui/icons/H1/index.js +9 -6
  353. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  354. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  355. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  356. package/dist/lexical/ui/icons/H2/index.js +9 -6
  357. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  358. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  359. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  360. package/dist/lexical/ui/icons/H3/index.js +9 -6
  361. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  362. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  363. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  364. package/dist/lexical/ui/icons/H4/index.js +9 -6
  365. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  366. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  367. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  368. package/dist/lexical/ui/icons/H5/index.js +9 -6
  369. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  370. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  371. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  372. package/dist/lexical/ui/icons/H6/index.js +9 -6
  373. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  374. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  375. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  376. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  377. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  378. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  379. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  380. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  381. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  382. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  383. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  384. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  385. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  386. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  387. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  388. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  389. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  390. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  391. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  392. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  393. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  394. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  395. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  396. package/dist/lexical/ui/icons/Link/index.js +14 -9
  397. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  398. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  399. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  400. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  401. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  402. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  403. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  404. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  405. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  406. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  407. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  408. package/dist/lexical/ui/icons/Page/index.js +21 -0
  409. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  410. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  411. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  412. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  413. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  414. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  415. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  416. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  417. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  418. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  419. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  420. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  421. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  422. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  423. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  424. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  425. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  426. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  427. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  428. package/dist/lexical/ui/icons/Table/index.js +20 -15
  429. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  430. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  431. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  432. package/dist/lexical/ui/icons/Text/index.js +17 -8
  433. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  434. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  435. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  436. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  437. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  438. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  439. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  440. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  441. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  442. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  443. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  444. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  445. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  446. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  447. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  448. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  449. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  450. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  451. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  452. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  453. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  454. package/dist/utilities/buildEditorState.js +13 -0
  455. package/dist/utilities/buildEditorState.js.map +1 -1
  456. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  457. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  458. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  459. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  460. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  461. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  462. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  463. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  464. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  465. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  466. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  467. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  468. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  469. package/dist/validate/index.d.ts.map +1 -1
  470. package/package.json +16 -21
  471. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  472. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  473. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  474. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  475. package/dist/exports/client/Field-4UEGQMIN.js +0 -2
  476. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  477. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  478. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  479. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  480. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  481. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  482. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  483. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  484. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  485. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  486. package/dist/exports/server/migrate.d.ts +0 -16
  487. package/dist/exports/server/migrate.d.ts.map +0 -1
  488. package/dist/exports/server/migrate.js +0 -16
  489. package/dist/exports/server/migrate.js.map +0 -1
  490. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  491. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  492. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  493. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  494. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  495. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  496. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  497. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  498. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  499. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  500. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  501. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  502. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  503. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  504. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  505. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  506. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  507. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  508. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  509. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  510. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  511. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  512. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  513. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  514. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  515. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  516. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  517. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  518. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  519. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  520. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  521. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  522. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  523. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  524. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  525. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  526. package/dist/features/lists/htmlConverter.d.ts +0 -5
  527. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  528. package/dist/features/lists/htmlConverter.js +0 -81
  529. package/dist/features/lists/htmlConverter.js.map +0 -1
  530. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  531. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  532. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  533. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  534. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  535. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  536. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  537. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  538. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  539. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  540. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  541. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  542. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  543. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  544. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  545. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  546. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  547. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  548. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  549. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  550. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  551. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  552. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  553. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  554. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  555. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  556. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  557. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  558. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  559. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  560. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  561. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  562. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  563. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  564. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  565. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  566. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  567. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  568. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  569. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  570. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  571. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  572. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  573. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  574. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  575. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  576. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  577. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  578. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  579. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  580. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  581. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  582. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  583. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  584. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  585. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  586. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  587. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  588. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  589. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  590. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  591. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  592. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  593. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  594. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  595. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  596. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  597. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  598. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  599. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  600. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  601. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  602. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  603. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  604. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  605. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  606. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  607. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  608. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  609. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  610. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  611. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  612. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  613. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  614. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  615. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  616. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  617. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  618. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  619. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  620. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  621. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  622. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  623. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  624. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  625. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  626. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  627. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  628. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  629. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  630. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  631. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  632. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  633. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  634. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  635. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  636. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  637. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  638. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  639. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  640. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  641. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  642. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  643. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  644. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  645. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  646. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  647. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  648. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  649. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  650. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  651. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  652. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  653. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  654. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  655. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  656. package/dist/lexical/ui/icons/AI/index.js +0 -34
  657. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  658. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  659. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  660. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  661. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  662. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  663. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  664. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  665. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  666. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  667. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  668. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  669. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-JYKBUUPZ.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","names":["isSafeCssColor","TableHTMLConverter","table","node","nodesToHTML","providedStyleTag","children","nodes","join","tablecell","providedCSSString","TagName","headerState","headerStateClass","style","backgroundColor","colSpanAttr","colSpan","rowSpanAttr","rowSpan","tablerow"],"sources":["../../../../../../src/features/converters/lexicalToHtml/sync/converters/table.ts"],"sourcesContent":["import type {\n SerializedTableCellNode,\n SerializedTableNode,\n SerializedTableRowNode,\n} from '../../../../../nodeTypes.js'\nimport type { HTMLConverters } from '../types.js'\n\nimport { isSafeCssColor } from '../../shared/cssColors.js'\n\nexport const TableHTMLConverter: HTMLConverters<\n SerializedTableCellNode | SerializedTableNode | SerializedTableRowNode\n> = {\n table: ({ node, nodesToHTML, providedStyleTag }) => {\n const children = nodesToHTML({\n nodes: node.children,\n }).join('')\n\n return `<div${providedStyleTag} class=\"lexical-table-container\">\n <table class=\"lexical-table\" style=\"border-collapse: collapse;\">\n <tbody>${children}</tbody>\n </table>\n </div>`\n },\n\n tablecell: ({ node, nodesToHTML, providedCSSString }) => {\n const children = nodesToHTML({\n nodes: node.children,\n }).join('')\n\n const TagName = node.headerState > 0 ? 'th' : 'td'\n const headerStateClass = `lexical-table-cell-header-${node.headerState}`\n\n let style = 'border: 1px solid #ccc; padding: 8px;' + providedCSSString\n if (node.backgroundColor && isSafeCssColor(node.backgroundColor)) {\n style += ` background-color: ${node.backgroundColor};`\n }\n\n const colSpanAttr = node.colSpan && node.colSpan > 1 ? ` colspan=\"${node.colSpan}\"` : ''\n const rowSpanAttr = node.rowSpan && node.rowSpan > 1 ? ` rowspan=\"${node.rowSpan}\"` : ''\n\n return `<${TagName}\n class=\"lexical-table-cell ${headerStateClass}\"\n ${colSpanAttr}\n ${rowSpanAttr}\n style=\"${style}\"\n >\n ${children}\n </${TagName}>\n `\n },\n\n tablerow: ({ node, nodesToHTML, providedStyleTag }) => {\n const children = nodesToHTML({\n nodes: node.children,\n }).join('')\n\n return `<tr${providedStyleTag} class=\"lexical-table-row\">\n ${children}\n </tr>`\n },\n}\n"],"mappings":"AAOA,SAASA,cAAc,QAAQ;AAE/B,OAAO,MAAMC,kBAAA,GAET;EACFC,KAAA,EAAOA,CAAC;IAAEC,IAAI;IAAEC,WAAW;IAAEC;EAAgB,CAAE;IAC7C,MAAMC,QAAA,GAAWF,WAAA,CAAY;MAC3BG,KAAA,EAAOJ,IAAA,CAAKG;IACd,GAAGE,IAAI,CAAC;IAER,OAAO,OAAOH,gBAAA;;mBAECC,QAAA;;aAEN;EACX;EAEAG,SAAA,EAAWA,CAAC;IAAEN,IAAI;IAAEC,WAAW;IAAEM;EAAiB,CAAE;IAClD,MAAMJ,QAAA,GAAWF,WAAA,CAAY;MAC3BG,KAAA,EAAOJ,IAAA,CAAKG;IACd,GAAGE,IAAI,CAAC;IAER,MAAMG,OAAA,GAAUR,IAAA,CAAKS,WAAW,GAAG,IAAI,OAAO;IAC9C,MAAMC,gBAAA,GAAmB,6BAA6BV,IAAA,CAAKS,WAAW,EAAE;IAExE,IAAIE,KAAA,GAAQ,0CAA0CJ,iBAAA;IACtD,IAAIP,IAAA,CAAKY,eAAe,IAAIf,cAAA,CAAeG,IAAA,CAAKY,eAAe,GAAG;MAChED,KAAA,IAAS,sBAAsBX,IAAA,CAAKY,eAAe,GAAG;IACxD;IAEA,MAAMC,WAAA,GAAcb,IAAA,CAAKc,OAAO,IAAId,IAAA,CAAKc,OAAO,GAAG,IAAI,aAAad,IAAA,CAAKc,OAAO,GAAG,GAAG;IACtF,MAAMC,WAAA,GAAcf,IAAA,CAAKgB,OAAO,IAAIhB,IAAA,CAAKgB,OAAO,GAAG,IAAI,aAAahB,IAAA,CAAKgB,OAAO,GAAG,GAAG;IAEtF,OAAO,IAAIR,OAAA;oCACqBE,gBAAA;UAC1BG,WAAA;UACAE,WAAA;iBACOJ,KAAA;;UAEPR,QAAA;UACAK,OAAA;KACL;EACH;EAEAS,QAAA,EAAUA,CAAC;IAAEjB,IAAI;IAAEC,WAAW;IAAEC;EAAgB,CAAE;IAChD,MAAMC,QAAA,GAAWF,WAAA,CAAY;MAC3BG,KAAA,EAAOJ,IAAA,CAAKG;IACd,GAAGE,IAAI,CAAC;IAER,OAAO,MAAMH,gBAAA;UACPC,QAAA;YACE;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"file":"table.js","names":["isSafeCssColor","TableHTMLConverter","table","node","nodesToHTML","providedStyleTag","children","nodes","join","tablecell","providedCSSString","TagName","headerState","headerStateClass","style","backgroundColor","colSpanAttr","colSpan","rowSpanAttr","rowSpan","tablerow"],"sources":["../../../../../../src/features/converters/lexicalToHtml/sync/converters/table.ts"],"sourcesContent":["import type {\n SerializedTableCellNode,\n SerializedTableNode,\n SerializedTableRowNode,\n} from '../../../../../nodeTypes.js'\nimport type { HTMLConverters } from '../types.js'\n\nimport { isSafeCssColor } from '../../shared/cssColors.js'\n\nexport const TableHTMLConverter: HTMLConverters<\n SerializedTableCellNode | SerializedTableNode | SerializedTableRowNode\n> = {\n table: ({ node, nodesToHTML, providedStyleTag }) => {\n const children = nodesToHTML({\n nodes: node.children,\n }).join('')\n\n return `<div${providedStyleTag} class=\"lexical-table-container\">\n <table class=\"lexical-table\" style=\"border-collapse: collapse;\">\n <tbody>${children}</tbody>\n </table>\n </div>`\n },\n\n tablecell: ({ node, nodesToHTML, providedCSSString }) => {\n const children = nodesToHTML({\n nodes: node.children,\n }).join('')\n\n const TagName = node.headerState > 0 ? 'th' : 'td'\n const headerStateClass = `lexical-table-cell-header-${node.headerState}`\n\n let style = 'border: var(--stroke-width-small) solid #ccc; padding: 8px;' + providedCSSString\n if (node.backgroundColor && isSafeCssColor(node.backgroundColor)) {\n style += ` background-color: ${node.backgroundColor};`\n }\n\n const colSpanAttr = node.colSpan && node.colSpan > 1 ? ` colspan=\"${node.colSpan}\"` : ''\n const rowSpanAttr = node.rowSpan && node.rowSpan > 1 ? ` rowspan=\"${node.rowSpan}\"` : ''\n\n return `<${TagName}\n class=\"lexical-table-cell ${headerStateClass}\"\n ${colSpanAttr}\n ${rowSpanAttr}\n style=\"${style}\"\n >\n ${children}\n </${TagName}>\n `\n },\n\n tablerow: ({ node, nodesToHTML, providedStyleTag }) => {\n const children = nodesToHTML({\n nodes: node.children,\n }).join('')\n\n return `<tr${providedStyleTag} class=\"lexical-table-row\">\n ${children}\n </tr>`\n },\n}\n"],"mappings":"AAOA,SAASA,cAAc,QAAQ;AAE/B,OAAO,MAAMC,kBAAA,GAET;EACFC,KAAA,EAAOA,CAAC;IAAEC,IAAI;IAAEC,WAAW;IAAEC;EAAgB,CAAE;IAC7C,MAAMC,QAAA,GAAWF,WAAA,CAAY;MAC3BG,KAAA,EAAOJ,IAAA,CAAKG;IACd,GAAGE,IAAI,CAAC;IAER,OAAO,OAAOH,gBAAA;;mBAECC,QAAA;;aAEN;EACX;EAEAG,SAAA,EAAWA,CAAC;IAAEN,IAAI;IAAEC,WAAW;IAAEM;EAAiB,CAAE;IAClD,MAAMJ,QAAA,GAAWF,WAAA,CAAY;MAC3BG,KAAA,EAAOJ,IAAA,CAAKG;IACd,GAAGE,IAAI,CAAC;IAER,MAAMG,OAAA,GAAUR,IAAA,CAAKS,WAAW,GAAG,IAAI,OAAO;IAC9C,MAAMC,gBAAA,GAAmB,6BAA6BV,IAAA,CAAKS,WAAW,EAAE;IAExE,IAAIE,KAAA,GAAQ,gEAAgEJ,iBAAA;IAC5E,IAAIP,IAAA,CAAKY,eAAe,IAAIf,cAAA,CAAeG,IAAA,CAAKY,eAAe,GAAG;MAChED,KAAA,IAAS,sBAAsBX,IAAA,CAAKY,eAAe,GAAG;IACxD;IAEA,MAAMC,WAAA,GAAcb,IAAA,CAAKc,OAAO,IAAId,IAAA,CAAKc,OAAO,GAAG,IAAI,aAAad,IAAA,CAAKc,OAAO,GAAG,GAAG;IACtF,MAAMC,WAAA,GAAcf,IAAA,CAAKgB,OAAO,IAAIhB,IAAA,CAAKgB,OAAO,GAAG,IAAI,aAAahB,IAAA,CAAKgB,OAAO,GAAG,GAAG;IAEtF,OAAO,IAAIR,OAAA;oCACqBE,gBAAA;UAC1BG,WAAA;UACAE,WAAA;iBACOJ,KAAA;;UAEPR,QAAA;UACAK,OAAA;KACL;EACH;EAEAS,QAAA,EAAUA,CAAC;IAAEjB,IAAI;IAAEC,WAAW;IAAEC;EAAgB,CAAE;IAChD,MAAMC,QAAA,GAAWF,WAAA,CAAY;MAC3BG,KAAA,EAAOJ,IAAA,CAAKG;IACd,GAAGE,IAAI,CAAC;IAER,OAAO,MAAMH,gBAAA;UACPC,QAAA;YACE;EACV;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","names":["escapeHTML","UploadHTMLConverter","upload","node","providedStyleTag","uploadNode","uploadDoc","undefined","value","alt","fields","url","mimeType","startsWith","filename","sizes","Object","keys","length","String","height","width","pictureHTML","size","imageSize","filesize"],"sources":["../../../../../../src/features/converters/lexicalToHtml/sync/converters/upload.ts"],"sourcesContent":["import type { FileData, FileSizeImproved, TypeWithID } from 'payload'\n\nimport escapeHTML from 'escape-html'\n\nimport type { SerializedUploadNode } from '../../../../../nodeTypes.js'\nimport type { UploadDataImproved } from '../../../../upload/server/nodes/UploadNode.js'\nimport type { HTMLConverters } from '../types.js'\n\nexport const UploadHTMLConverter: HTMLConverters<SerializedUploadNode> = {\n upload: ({ node, providedStyleTag }) => {\n const uploadNode = node as UploadDataImproved\n\n let uploadDoc: (FileData & TypeWithID) | undefined = undefined\n\n // If there's no valid upload data, populate return an empty string\n if (typeof uploadNode.value !== 'object') {\n return ''\n } else {\n uploadDoc = uploadNode.value as unknown as FileData & TypeWithID\n }\n\n if (!uploadDoc) {\n return ''\n }\n\n const alt = escapeHTML(\n (node.fields?.alt as string) || (uploadDoc as { alt?: string })?.alt || '',\n )\n\n const url = escapeHTML(uploadDoc.url ?? '')\n\n // 1) If upload is NOT an image, return a link\n if (!uploadDoc.mimeType.startsWith('image')) {\n return `<a${providedStyleTag} href=\"${url}\" rel=\"noopener noreferrer\">${escapeHTML(uploadDoc.filename ?? '')}</a>`\n }\n\n // 2) If image has no different sizes, return a simple <img />\n if (!uploadDoc.sizes || !Object.keys(uploadDoc.sizes).length) {\n return `\n <img${providedStyleTag}\n alt=\"${alt}\"\n height=\"${escapeHTML(String(uploadDoc.height ?? ''))}\"\n src=\"${url}\"\n width=\"${escapeHTML(String(uploadDoc.width ?? ''))}\"\n />\n `\n }\n\n // 3) If image has different sizes, build a <picture> element with <source> tags\n let pictureHTML = ''\n\n for (const size in uploadDoc.sizes) {\n const imageSize = uploadDoc.sizes[size] as FileSizeImproved\n\n if (\n !imageSize ||\n !imageSize.width ||\n !imageSize.height ||\n !imageSize.mimeType ||\n !imageSize.filesize ||\n !imageSize.filename ||\n !imageSize.url\n ) {\n continue\n }\n\n pictureHTML += `\n <source\n media=\"(max-width: ${escapeHTML(String(imageSize.width))}px)\"\n srcset=\"${escapeHTML(imageSize.url)}\"\n type=\"${escapeHTML(imageSize.mimeType)}\"\n />\n `\n }\n\n pictureHTML += `\n <img\n alt=\"${alt}\"\n height=\"${escapeHTML(String(uploadDoc.height ?? ''))}\"\n src=\"${url}\"\n width=\"${escapeHTML(String(uploadDoc.width ?? ''))}\"\n />\n `\n\n return `<picture${providedStyleTag}>${pictureHTML}</picture>`\n },\n}\n"],"mappings":"AAEA,OAAOA,UAAA,MAAgB;AAMvB,OAAO,MAAMC,mBAAA,GAA4D;EACvEC,MAAA,EAAQA,CAAC;IAAEC,IAAI;IAAEC;EAAgB,CAAE;IACjC,MAAMC,UAAA,GAAaF,IAAA;IAEnB,IAAIG,SAAA,GAAiDC,SAAA;IAErD;IACA,IAAI,OAAOF,UAAA,CA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A,CAAUH,KAAK;oBAC5CrB,UAAA,CAAWwB,SAAA,CAAUb,GAAG;kBAC1BX,UAAA,CAAWwB,SAAA,CAAUZ,QAAQ;;OAExC;IACH;IAEAU,WAAA,IAAe;;eAEJb,GAAA;kBACGT,UAAA,CAAWmB,MAAA,CAAOb,SAAA,CAAUc,MAAM,IAAI;eACzCT,GAAA;iBACEX,UAAA,CAAWmB,MAAA,CAAOb,SAAA,CAAUe,KAAK,IAAI;;KAEjD;IAED,OAAO,WAAWjB,gBAAA,IAAoBkB,WAAA,YAAuB;EAC/D;AACF","ignoreList":[]}
1
+ {"version":3,"file":"upload.js","names":["escapeHTML","UploadHTMLConverter","upload","node","providedStyleTag","uploadNode","uploadDoc","undefined","value","alt","fields","url","mimeType","startsWith","filename","sizes","Object","keys","length","String","height","width","pictureHTML","size","imageSize","filesize"],"sources":["../../../../../../src/features/converters/lexicalToHtml/sync/converters/upload.ts"],"sourcesContent":["import type { FileData, FileSize, TypeWithID } from 'payload'\n\nimport escapeHTML from 'escape-html'\n\nimport type { SerializedUploadNode } from '../../../../../nodeTypes.js'\nimport type { UploadDataImproved } from '../../../../upload/server/nodes/UploadNode.js'\nimport type { HTMLConverters } from '../types.js'\n\nexport const UploadHTMLConverter: HTMLConverters<SerializedUploadNode> = {\n upload: ({ node, providedStyleTag }) => {\n const uploadNode = node as UploadDataImproved\n\n let uploadDoc: (FileData & TypeWithID) | undefined = undefined\n\n // If there's no valid upload data, populate return an empty string\n if (typeof uploadNode.value !== 'object') {\n return ''\n } else {\n uploadDoc = uploadNode.value as unknown as FileData & TypeWithID\n }\n\n if (!uploadDoc) {\n return ''\n }\n\n const alt = escapeHTML(\n (node.fields?.alt as string) || (uploadDoc as { alt?: string })?.alt || '',\n )\n\n const url = escapeHTML(uploadDoc.url ?? '')\n\n // 1) If upload is NOT an image, return a link\n if (!uploadDoc.mimeType.startsWith('image')) {\n return `<a${providedStyleTag} href=\"${url}\" rel=\"noopener noreferrer\">${escapeHTML(uploadDoc.filename ?? '')}</a>`\n }\n\n // 2) If image has no different sizes, return a simple <img />\n if (!uploadDoc.sizes || !Object.keys(uploadDoc.sizes).length) {\n return `\n <img${providedStyleTag}\n alt=\"${alt}\"\n height=\"${escapeHTML(String(uploadDoc.height ?? ''))}\"\n src=\"${url}\"\n width=\"${escapeHTML(String(uploadDoc.width ?? ''))}\"\n />\n `\n }\n\n // 3) If image has different sizes, build a <picture> element with <source> tags\n let pictureHTML = ''\n\n for (const size in uploadDoc.sizes) {\n const imageSize = uploadDoc.sizes[size] as FileSize\n\n if (\n !imageSize ||\n !imageSize.width ||\n !imageSize.height ||\n !imageSize.mimeType ||\n !imageSize.filesize ||\n !imageSize.filename ||\n !imageSize.url\n ) {\n continue\n }\n\n pictureHTML += `\n <source\n media=\"(max-width: ${escapeHTML(String(imageSize.width))}px)\"\n srcset=\"${escapeHTML(imageSize.url)}\"\n type=\"${escapeHTML(imageSize.mimeType)}\"\n />\n `\n }\n\n pictureHTML += `\n <img\n alt=\"${alt}\"\n height=\"${escapeHTML(String(uploadDoc.height ?? ''))}\"\n src=\"${url}\"\n width=\"${escapeHTML(String(uploadDoc.width ?? ''))}\"\n />\n `\n\n return `<picture${providedStyleTag}>${pictureHTML}</picture>`\n },\n}\n"],"mappings":"AAEA,OAAOA,UAAA,MAAgB;AAMvB,OAAO,MAAMC,mBAAA,GAA4D;EACvEC,MAAA,EAAQA,CAAC;IAAEC,IAAI;IAAEC;EAAgB,CAAE;IACjC,MAAMC,UAAA,GAAaF,IAAA;IAEnB,IAAIG,SAAA,GAAiDC,SAAA;IAErD;IACA,IAAI,OAAOF,UAAA,CAAWG,KAAK,KAAK,UAAU;MACxC,OAAO;IACT,OAAO;MACLF,SAAA,GAAYD,UAAA,CAAWG,KAAK;IAC9B;IAEA,IAAI,CAACF,SAAA,EAAW;MACd,OAAO;IACT;IAEA,MAAMG,GAAA,GAAMT,UAAA,CACVG,IAAC,CAAKO,MAAM,EAAED,GAAA,IAAmBH,SAAA,EAAgCG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EX,UAAA,CAAWmB,MAAA,CAAOb,SAAA,CAAUe,KAAK,IAAI;;KAEjD;IAED,OAAO,WAAWjB,gBAAA,IAAoBkB,WAAA,YAAuB;EAC/D;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","names":["UploadJSXConverter","upload","node","uploadNode","value","uploadDoc","alt","fields","url","mimeType","startsWith","_jsx","href","rel","filename","sizes","Object","keys","length","height","src","width","pictureJSX","size","imageSize","filesize","imageSizeURL","push","media","srcSet","type"],"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/upload.tsx"],"sourcesContent":["import type { FileData, FileSizeImproved, TypeWithID } from 'payload'\n\nimport type { SerializedUploadNode } from '../../../../../nodeTypes.js'\nimport type { UploadDataImproved } from '../../../../upload/server/nodes/UploadNode.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const UploadJSXConverter: JSXConverters<SerializedUploadNode> = {\n upload: ({ node }) => {\n // TO-DO (v4): SerializedUploadNode should use UploadData_P4\n const uploadNode = node as UploadDataImproved\n if (typeof uploadNode.value !== 'object') {\n return null\n }\n\n const uploadDoc = uploadNode.value as FileData & TypeWithID\n\n const alt = (uploadNode.fields?.alt as string) || (uploadDoc as { alt?: string })?.alt || ''\n\n const url = uploadDoc.url\n\n /**\n * If the upload is not an image, return a link to the upload\n */\n if (!uploadDoc.mimeType.startsWith('image')) {\n return (\n <a href={url} rel=\"noopener noreferrer\">\n {uploadDoc.filename}\n </a>\n )\n }\n\n /**\n * If the upload is a simple image with no different sizes, return a simple img tag\n */\n if (!uploadDoc.sizes || !Object.keys(uploadDoc.sizes).length) {\n return <img alt={alt} height={uploadDoc.height} src={url} width={uploadDoc.width} />\n }\n\n /**\n * If the upload is an image with different sizes, return a picture element\n */\n const pictureJSX: React.ReactNode[] = []\n\n // Iterate through each size in the data.sizes object\n for (const size in uploadDoc.sizes) {\n const imageSize = uploadDoc.sizes[size] as FileSizeImproved\n\n // Skip if any property of the size object is null\n if (\n !imageSize ||\n !imageSize.width ||\n !imageSize.height ||\n !imageSize.mimeType ||\n !imageSize.filesize ||\n !imageSize.filename ||\n !imageSize.url\n ) {\n continue\n }\n const imageSizeURL = imageSize?.url\n\n pictureJSX.push(\n <source\n key={size}\n media={`(max-width: ${imageSize.width}px)`}\n srcSet={imageSizeURL}\n type={imageSize.mimeType}\n />,\n )\n }\n\n // Add the default img tag\n pictureJSX.push(\n <img alt={alt} height={uploadDoc?.height} key={'image'} src={url} width={uploadDoc?.width} />,\n )\n return <picture>{pictureJSX}</picture>\n },\n}\n"],"mappings":";AAMA,OAAO,MAAMA,kBAAA,GAA0D;EACrEC,MAAA,EAAQA,CAAC;IAAEC;EAAI,CAAE;IACf;IACA,MAAMC,UAAA,GAAaD,IAAA;IACnB,IAAI,OAAOC,UAAA,CAAWC,KAAK,KAAK,UAAU;MACxC,OAAO;IACT;IAEA,MAAMC,SAAA,GAAYF,UAAA,CAAWC,KAAK;IAElC,MAAME,GAAA,GAAMH,UAAC,CAAWI,MAAM,EAAED,GAAA,IAAmBD,SAAA,EAAgCC,GAAA,IAAO;IAE1F,MAAME,GAAA,GAAMH,SAAA,CAAUG,GAAG;IAEzB;;;IAGA,IAAI,CAACH,SAAA,CAAUI,QAAQ,CAACC,UAAU,CAAC,UAAU;MAC3C,oBACEC,IAAA,CAAC;QAAEC,IAAA,EAAMJ,GAAA;QAAKK,GAAA,EAAI;kBACfR,SAAA,CAAUS;;IAGjB;IAEA;;;IAGA,IAAI,CAACT,SAAA,CAAUU,KAAK,IAAI,CAACC,MAAA,CAAOC,IAAI,CAACZ,SAAA,CAAUU,KAAK,EAAEG,MAAM,EAAE;MAC5D,oBAAOP,IAAA,CAAC;QAAIL,GAAA,EAAKA,GAAA;QAAKa,MAAA,EAAQd,SAAA,CAAUc,MAAM;QAAEC,GAAA,EAAKZ,GAAA;QAAKa,KAAA,EAAOhB,SAAA,CAAUgB;;IAC7E;IAEA;;;IAGA,MAAMC,UAAA,GAAgC,EAAE;IAExC;IACA,KAAK,MAAMC,IAAA,IAAQlB,SAAA,CAAUU,KAAK,EAAE;MAClC,MAAMS,SAAA,GAAYnB,SAAA,CAAUU,KAAK,CAACQ,IAAA,CAAK;MAEvC;MACA,IACE,CAACC,SAAA,IACD,CAACA,SAAA,CAAUH,KAAK,IAChB,CAACG,SAAA,CAAUL,MAAM,IACjB,CAACK,SAAA,CAAUf,QAAQ,IACnB,CAACe,SAAA,CAAUC,QAAQ,IACnB,CAACD,SAAA,CAAUV,QAAQ,IACnB,CAACU,SAAA,CAAUhB,GAAG,EACd;QACA;MACF;MACA,MAAMkB,YAAA,GAAeF,SAAA,EAAWhB,GAAA;MAEhCc,UAAA,CAAWK,IAAI,cACbhB,IAAA,CAAC;QAECiB,KAAA,EAAO,eAAeJ,SAAA,CAAUH,KAAK,KAAK;QAC1CQ,MAAA,EAAQH,YAAA;QACRI,IAAA,EAAMN,SAAA,CAAUf;SAHXc,IAAA;IAMX;IAEA;IACAD,UAAA,CAAWK,IAAI,cACbhB,IAAA,CAAC;MAAIL,GAAA,EAAKA,GAAA;MAAKa,MAAA,EAAQd,SAAA,EAAWc,MAAA;MAAsBC,GAAA,EAAKZ,GAAA;MAAKa,KAAA,EAAOhB,SAAA,EAAWgB;OAArC;IAEjD,oBAAOV,IAAA,CAAC;gBAASW;;EACnB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"upload.js","names":["UploadJSXConverter","upload","node","uploadNode","value","uploadDoc","alt","fields","url","mimeType","startsWith","_jsx","href","rel","filename","sizes","Object","keys","length","height","src","width","pictureJSX","size","imageSize","filesize","imageSizeURL","push","media","srcSet","type"],"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/upload.tsx"],"sourcesContent":["import type { FileData, FileSize, TypeWithID } from 'payload'\n\nimport type { SerializedUploadNode } from '../../../../../nodeTypes.js'\nimport type { UploadDataImproved } from '../../../../upload/server/nodes/UploadNode.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const UploadJSXConverter: JSXConverters<SerializedUploadNode> = {\n upload: ({ node }) => {\n // TO-DO (v4): SerializedUploadNode should use UploadData_P4\n const uploadNode = node as UploadDataImproved\n if (typeof uploadNode.value !== 'object') {\n return null\n }\n\n const uploadDoc = uploadNode.value as FileData & TypeWithID\n\n const alt = (uploadNode.fields?.alt as string) || (uploadDoc as { alt?: string })?.alt || ''\n\n const url = uploadDoc.url\n\n /**\n * If the upload is not an image, return a link to the upload\n */\n if (!uploadDoc.mimeType.startsWith('image')) {\n return (\n <a href={url} rel=\"noopener noreferrer\">\n {uploadDoc.filename}\n </a>\n )\n }\n\n /**\n * If the upload is a simple image with no different sizes, return a simple img tag\n */\n if (!uploadDoc.sizes || !Object.keys(uploadDoc.sizes).length) {\n return <img alt={alt} height={uploadDoc.height} src={url} width={uploadDoc.width} />\n }\n\n /**\n * If the upload is an image with different sizes, return a picture element\n */\n const pictureJSX: React.ReactNode[] = []\n\n // Iterate through each size in the data.sizes object\n for (const size in uploadDoc.sizes) {\n const imageSize = uploadDoc.sizes[size] as FileSize\n\n // Skip if any property of the size object is null\n if (\n !imageSize ||\n !imageSize.width ||\n !imageSize.height ||\n !imageSize.mimeType ||\n !imageSize.filesize ||\n !imageSize.filename ||\n !imageSize.url\n ) {\n continue\n }\n const imageSizeURL = imageSize?.url\n\n pictureJSX.push(\n <source\n key={size}\n media={`(max-width: ${imageSize.width}px)`}\n srcSet={imageSizeURL}\n type={imageSize.mimeType}\n />,\n )\n }\n\n // Add the default img tag\n pictureJSX.push(\n <img alt={alt} height={uploadDoc?.height} key={'image'} src={url} width={uploadDoc?.width} />,\n )\n return <picture>{pictureJSX}</picture>\n },\n}\n"],"mappings":";AAMA,OAAO,MAAMA,kBAAA,GAA0D;EACrEC,MAAA,EAAQA,CAAC;IAAEC;EAAI,CAAE;IACf;IACA,MAAMC,UAAA,GAAaD,IAAA;IACnB,IAAI,OAAOC,UAAA,CAAWC,KAAK,KAAK,UAAU;MACxC,OAAO;IACT;IAEA,MAAMC,SAAA,GAAYF,UAAA,CAA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AAA;IAMX;IAEA;IACAD,UAAA,CAAWK,IAAI,cACbhB,IAAA,CAAC;MAAIL,GAAA,EAAKA,GAAA;MAAKa,MAAA,EAAQd,SAAA,EAAWc,MAAA;MAAsBC,GAAA,EAAKZ,GAAA;MAAKa,KAAA,EAAOhB,SAAA,EAAWgB;OAArC;IAEjD,oBAAOV,IAAA,CAAC;gBAASW;;EACnB;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,wBAAwB,4BAGlC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/converters/lexicalToMarkdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAKnF,eAAO,MAAM,wBAAwB,GAAI,yBAGtC;IACD,IAAI,EAAE,qBAAqB,CAAA;IAC3B,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,MAoBH,CAAA"}
@@ -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,uBAAuB,CAAA;AAK/E,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,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,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extNode","$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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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(--color-white-200);
61
+ }
62
+
63
+ .item {
64
+ padding: var(--spacer-2);
65
+ color: var(--color-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(--color-white-1000);
83
+ }
84
+
85
+ &:active {
86
+ background: var(--color-bg-brand-pressed);
87
+ color: var(--color-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"}
@@ -11,6 +11,7 @@ import { $getSelection, $isElementNode, $isRangeSelection, $isTextNode, $setSele
11
11
  import * as React from 'react';
12
12
  import { useCallback, useEffect, useRef, useState } from 'react';
13
13
  import { createPortal } from 'react-dom';
14
+ import './index.css';
14
15
  import { MeatballsIcon } from '../../../../../lexical/ui/icons/Meatballs/index.js';
15
16
  function computeSelectionCount(selection) {
16
17
  const selectionShape = selection.getShape();
@@ -302,7 +303,7 @@ function TableActionMenu({
302
303
  type: "button",
303
304
  children: /*#__PURE__*/_jsx("span", {
304
305
  className: "text",
305
- children: "Toggle Row Striping"
306
+ children: "Toggle row striping"
306
307
  })
307
308
  }), /*#__PURE__*/_jsx("button", {
308
309
  className: "item",
@@ -311,7 +312,7 @@ function TableActionMenu({
311
312
  type: "button",
312
313
  children: /*#__PURE__*/_jsx("span", {
313
314
  className: "text",
314
- children: "Toggle First Column Freeze"
315
+ children: "Toggle first column freeze"
315
316
  })
316
317
  }), /*#__PURE__*/_jsx("button", {
317
318
  className: "item",