@payloadcms/richtext-lexical 3.84.0 → 4.0.0-internal.38b7f1d

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 (619) hide show
  1. package/dist/exports/client/Field-PJW7KUJG.js +2 -0
  2. package/dist/exports/client/Field-PJW7KUJG.js.map +7 -0
  3. package/dist/exports/client/RelationshipComponent-5RONAYJM.js +2 -0
  4. package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +7 -0
  5. package/dist/exports/client/bundled.css +1 -1
  6. package/dist/exports/client/chunk-44G3K3W7.js +2 -0
  7. package/dist/exports/client/chunk-44G3K3W7.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-53Y3RYR5.js +2 -0
  11. package/dist/exports/client/component-53Y3RYR5.js.map +7 -0
  12. package/dist/exports/client/componentInline-PM4PLNUK.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 +88 -16
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/componentInline/index.css +85 -0
  32. package/dist/features/blocks/client/componentInline/index.d.ts +1 -1
  33. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  34. package/dist/features/blocks/client/componentInline/index.js +29 -6
  35. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  36. package/dist/features/blocks/client/index.d.ts.map +1 -1
  37. package/dist/features/blocks/client/index.js +0 -2
  38. package/dist/features/blocks/client/index.js.map +1 -1
  39. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  40. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  41. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  42. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  43. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  44. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  46. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  47. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  48. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  49. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  50. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  51. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  52. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  53. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  54. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  55. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  56. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  57. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  58. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  59. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  60. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  61. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  62. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  63. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  64. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  65. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  66. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  67. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  68. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  69. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  70. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  71. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  72. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  73. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  74. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  75. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  76. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  77. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  78. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  79. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  80. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  81. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  82. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  83. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  84. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  85. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  86. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  87. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  88. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  89. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  90. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  91. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  92. package/dist/features/experimental_table/server/index.js +0 -102
  93. package/dist/features/experimental_table/server/index.js.map +1 -1
  94. package/dist/features/heading/server/index.d.ts.map +1 -1
  95. package/dist/features/heading/server/index.js +0 -39
  96. package/dist/features/heading/server/index.js.map +1 -1
  97. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  98. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  99. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  100. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  101. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  102. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  103. package/dist/features/horizontalRule/server/index.js +0 -8
  104. package/dist/features/horizontalRule/server/index.js.map +1 -1
  105. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  106. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  107. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  108. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  109. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  110. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  111. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  112. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  113. package/dist/features/link/server/index.d.ts.map +1 -1
  114. package/dist/features/link/server/index.js +0 -71
  115. package/dist/features/link/server/index.js.map +1 -1
  116. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  117. package/dist/features/lists/checklist/server/index.js +0 -7
  118. package/dist/features/lists/checklist/server/index.js.map +1 -1
  119. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  120. package/dist/features/lists/orderedList/server/index.js +0 -7
  121. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  122. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  123. package/dist/features/lists/unorderedList/server/index.js +0 -7
  124. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  125. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  126. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  127. package/dist/features/relationship/client/components/RelationshipComponent.js +27 -2
  128. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  129. package/dist/features/relationship/client/components/index.css +112 -0
  130. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  131. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  132. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  133. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  134. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  135. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  136. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  137. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  138. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  139. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  140. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  141. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  142. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  143. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  144. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  145. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  146. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +4 -0
  147. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  148. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  149. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  150. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  151. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  152. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  153. package/dist/features/toolbars/types.d.ts +4 -0
  154. package/dist/features/toolbars/types.d.ts.map +1 -1
  155. package/dist/features/toolbars/types.js.map +1 -1
  156. package/dist/features/typesServer.d.ts +0 -17
  157. package/dist/features/typesServer.d.ts.map +1 -1
  158. package/dist/features/typesServer.js.map +1 -1
  159. package/dist/features/upload/client/component/index.css +218 -0
  160. package/dist/features/upload/client/component/index.d.ts +1 -1
  161. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  162. package/dist/features/upload/client/component/index.js +86 -63
  163. package/dist/features/upload/client/component/index.js.map +1 -1
  164. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  165. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  166. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  167. package/dist/features/upload/server/index.d.ts.map +1 -1
  168. package/dist/features/upload/server/index.js +0 -78
  169. package/dist/features/upload/server/index.js.map +1 -1
  170. package/dist/field/Diff/converters/listitem/index.css +44 -0
  171. package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
  172. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  173. package/dist/field/Diff/converters/listitem/index.js +1 -0
  174. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  175. package/dist/field/Diff/converters/relationship/index.css +68 -0
  176. package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
  177. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  178. package/dist/field/Diff/converters/relationship/index.js +1 -0
  179. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  180. package/dist/field/Diff/converters/unknown/index.css +37 -0
  181. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  182. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  183. package/dist/field/Diff/converters/unknown/index.js +1 -0
  184. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  185. package/dist/field/Diff/converters/upload/index.css +112 -0
  186. package/dist/field/Diff/converters/upload/index.d.ts +1 -1
  187. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  188. package/dist/field/Diff/converters/upload/index.js +1 -0
  189. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  190. package/dist/field/Diff/index.css +101 -0
  191. package/dist/field/Diff/index.d.ts +1 -1
  192. package/dist/field/Diff/index.d.ts.map +1 -1
  193. package/dist/field/Diff/index.js +1 -0
  194. package/dist/field/Diff/index.js.map +1 -1
  195. package/dist/field/Field.d.ts +2 -2
  196. package/dist/field/Field.d.ts.map +1 -1
  197. package/dist/field/Field.js +11 -9
  198. package/dist/field/Field.js.map +1 -1
  199. package/dist/field/ViewSelector.css +32 -0
  200. package/dist/field/ViewSelector.d.ts +1 -1
  201. package/dist/field/ViewSelector.d.ts.map +1 -1
  202. package/dist/field/ViewSelector.js +1 -0
  203. package/dist/field/ViewSelector.js.map +1 -1
  204. package/dist/field/bundled.css +1 -1
  205. package/dist/field/index.css +60 -0
  206. package/dist/index.d.ts +0 -10
  207. package/dist/index.d.ts.map +1 -1
  208. package/dist/index.js +11 -10
  209. package/dist/index.js.map +1 -1
  210. package/dist/lexical/LexicalEditor.css +50 -0
  211. package/dist/lexical/LexicalEditor.d.ts +1 -1
  212. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  213. package/dist/lexical/LexicalEditor.js +1 -0
  214. package/dist/lexical/LexicalEditor.js.map +1 -1
  215. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  216. package/dist/lexical/config/server/loader.js +12 -9
  217. package/dist/lexical/config/server/loader.js.map +1 -1
  218. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  219. package/dist/lexical/config/server/sanitize.js +0 -6
  220. package/dist/lexical/config/server/sanitize.js.map +1 -1
  221. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  222. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  223. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  224. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  225. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  226. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  227. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  228. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  229. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  230. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  231. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  232. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  233. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  234. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  235. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  236. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  237. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  238. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  239. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  240. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  241. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  242. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  243. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  244. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  245. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  246. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  247. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  248. package/dist/lexical/theme/EditorTheme.css +359 -0
  249. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  250. package/dist/lexical/theme/EditorTheme.js +1 -0
  251. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  252. package/dist/lexical/ui/ContentEditable.css +95 -0
  253. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  254. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  255. package/dist/lexical/ui/ContentEditable.js +1 -0
  256. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  257. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  258. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  259. package/dist/lexical/ui/icons/Add/index.js +19 -12
  260. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  261. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  262. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  263. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  264. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  265. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  266. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  267. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  268. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  269. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  270. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  271. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  272. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  273. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  274. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  275. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  276. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  277. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  278. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  279. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  280. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  281. package/dist/lexical/ui/icons/Block/index.js +13 -28
  282. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  283. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  284. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  285. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  286. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  287. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  288. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  289. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  290. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  291. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  292. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  293. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  294. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  295. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  296. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  297. package/dist/lexical/ui/icons/Code/index.js +15 -13
  298. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  299. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  300. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  301. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  302. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  303. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  304. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  305. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  306. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  307. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  308. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  309. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  310. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  311. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  312. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  313. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  314. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  315. package/dist/lexical/ui/icons/H1/index.js +9 -6
  316. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  317. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  318. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  319. package/dist/lexical/ui/icons/H2/index.js +9 -6
  320. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  321. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  322. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  323. package/dist/lexical/ui/icons/H3/index.js +9 -6
  324. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  325. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  326. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  327. package/dist/lexical/ui/icons/H4/index.js +9 -6
  328. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  329. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  330. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  331. package/dist/lexical/ui/icons/H5/index.js +9 -6
  332. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  333. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  334. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  335. package/dist/lexical/ui/icons/H6/index.js +9 -6
  336. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  337. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  338. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  339. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  340. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  341. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  342. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  343. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  344. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  345. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  346. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  347. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  348. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  349. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  350. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  351. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  352. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  353. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  354. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  355. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  356. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  357. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  358. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  359. package/dist/lexical/ui/icons/Link/index.js +14 -9
  360. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  361. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  362. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  363. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  364. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  365. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  366. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  367. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  368. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  369. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  370. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  371. package/dist/lexical/ui/icons/Page/index.js +21 -0
  372. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  373. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  374. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  375. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  376. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  377. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  378. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  379. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  380. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  381. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  382. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  383. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  384. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  385. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  386. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  387. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  388. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  389. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  390. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  391. package/dist/lexical/ui/icons/Table/index.js +20 -15
  392. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  393. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  394. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  395. package/dist/lexical/ui/icons/Text/index.js +17 -8
  396. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  397. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  398. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  399. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  400. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  401. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  402. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  403. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  404. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  405. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  406. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  407. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  408. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  409. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  410. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  411. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  412. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  413. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  414. package/dist/utilities/buildEditorState.js +13 -0
  415. package/dist/utilities/buildEditorState.js.map +1 -1
  416. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  417. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  418. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  419. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  420. package/package.json +11 -16
  421. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  422. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  423. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  424. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  425. package/dist/exports/client/Field-4UEGQMIN.js +0 -2
  426. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  427. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  428. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  429. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  430. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  431. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  432. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  433. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  434. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  435. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  436. package/dist/exports/server/migrate.d.ts +0 -16
  437. package/dist/exports/server/migrate.d.ts.map +0 -1
  438. package/dist/exports/server/migrate.js +0 -16
  439. package/dist/exports/server/migrate.js.map +0 -1
  440. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  441. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  442. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  443. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  444. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  445. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  446. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  447. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  448. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  449. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  450. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  451. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  452. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  453. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  454. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  455. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  456. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  457. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  458. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  459. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  460. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  461. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  462. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  463. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  464. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  465. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  466. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  467. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  468. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  469. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  470. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  471. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  472. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  473. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  474. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  475. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  476. package/dist/features/lists/htmlConverter.d.ts +0 -5
  477. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  478. package/dist/features/lists/htmlConverter.js +0 -81
  479. package/dist/features/lists/htmlConverter.js.map +0 -1
  480. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  481. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  482. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  483. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  484. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  485. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  486. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  487. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  488. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  489. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  490. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  491. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  492. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  493. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  494. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  495. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  496. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  497. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  498. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  499. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  500. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  501. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  502. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  503. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  504. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  505. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  506. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  507. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  508. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  509. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  510. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  511. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  512. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  513. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  514. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  515. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  516. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  517. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  518. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  519. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  520. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  521. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  522. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  523. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  524. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  525. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  526. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  527. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  528. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  529. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  530. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  531. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  532. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  533. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  534. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  535. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  536. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  537. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  538. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  539. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  540. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  541. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  542. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  543. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  544. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  545. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  546. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  547. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  548. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  549. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  550. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  551. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  552. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  553. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  554. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  555. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  556. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  557. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  558. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  559. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  560. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  561. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  562. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  563. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  564. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  565. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  566. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  567. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  568. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  569. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  570. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  571. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  572. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  573. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  574. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  575. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  576. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  577. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  578. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  579. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  580. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  581. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  582. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  583. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  584. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  585. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  586. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  587. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  588. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  589. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  590. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  591. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  592. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  593. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  594. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  595. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  596. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  597. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  598. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  599. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  600. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  601. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  602. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  603. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  604. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  605. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  606. package/dist/lexical/ui/icons/AI/index.js +0 -34
  607. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  608. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  609. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  610. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  611. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  612. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  613. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  614. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  615. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  616. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  617. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  618. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  619. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-PM4PLNUK.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getTranslation","BlockIcon","InlineBlocksIcon","createClientFeature","getBlockImageComponent","getBlockMarkdownTransformers","BlockNode","InlineBlockNode","INSERT_BLOCK_COMMAND","INSERT_INLINE_BLOCK_COMMAND","BlocksPlugin","BlocksFeatureClient","config","featureClientSchemaMap","props","schemaPath","schemaMapRenderedBlockPathPrefix","schemaMapRenderedInlineBlockPathPrefix","clientSchema","blocksFields","Object","entries","filter","key","startsWith","replace","includes","map","value","inlineBlocksFields","clientBlocks","field","blockReferences","blocksMap","blocks","block","undefined","clientInlineBlocks","markdownTransformers","inlineBlocks","nodes","plugins","Component","position","sanitizedClientFeatureProps","slashMenu","groups","length","items","Icon","slug","keywords","label","i18n","blockDisplayName","labels","singular","onSelect","editor","dispatchCommand","blockName","blockType","t","inlineBlock","Boolean","toolbarFixed","type","ChildComponent","index","isActive","order"],"sources":["../../../../src/features/blocks/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { I18nClient } from '@payloadcms/translations'\nimport type { BlocksFieldClient, ClientBlock } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { BlockIcon } from '../../../lexical/ui/icons/Block/index.js'\nimport { InlineBlocksIcon } from '../../../lexical/ui/icons/InlineBlocks/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { getBlockImageComponent } from './getBlockImageComponent.js'\nimport { getBlockMarkdownTransformers } from './markdown/markdownTransformer.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { InlineBlockNode } from './nodes/InlineBlocksNode.js'\nimport { INSERT_BLOCK_COMMAND, INSERT_INLINE_BLOCK_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\nexport const BlocksFeatureClient = createClientFeature(\n ({ config, featureClientSchemaMap, props, schemaPath }) => {\n const schemaMapRenderedBlockPathPrefix = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks`\n const schemaMapRenderedInlineBlockPathPrefix = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks`\n const clientSchema = featureClientSchemaMap['blocks']\n\n if (!clientSchema) {\n return {}\n }\n\n const blocksFields: BlocksFieldClient[] = Object.entries(clientSchema)\n .filter(\n ([key]) =>\n key.startsWith(schemaMapRenderedBlockPathPrefix + '.') &&\n !key.replace(schemaMapRenderedBlockPathPrefix + '.', '').includes('.'),\n )\n .map(([, value]) => value[0] as BlocksFieldClient)\n\n const inlineBlocksFields: BlocksFieldClient[] = Object.entries(clientSchema)\n .filter(\n ([key]) =>\n key.startsWith(schemaMapRenderedInlineBlockPathPrefix + '.') &&\n !key.replace(schemaMapRenderedInlineBlockPathPrefix + '.', '').includes('.'),\n )\n .map(([, value]) => value[0] as BlocksFieldClient)\n\n const clientBlocks: ClientBlock[] = blocksFields\n .map((field) => {\n return field.blockReferences\n ? typeof field.blockReferences[0] === 'string'\n ? config.blocksMap[field.blockReferences[0]]\n : field.blockReferences[0]\n : field.blocks[0]\n })\n .filter((block) => block !== undefined)\n\n const clientInlineBlocks: ClientBlock[] = inlineBlocksFields\n .map((field) => {\n return field.blockReferences\n ? typeof field.blockReferences[0] === 'string'\n ? config.blocksMap[field.blockReferences[0]]\n : field.blockReferences[0]\n : field.blocks[0]\n })\n .filter((block) => block !== undefined)\n\n return {\n markdownTransformers: getBlockMarkdownTransformers({\n blocks: clientBlocks,\n inlineBlocks: clientInlineBlocks,\n }),\n nodes: [BlockNode, InlineBlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: [\n clientBlocks?.length\n ? {\n items: clientBlocks.map((block) => {\n return {\n Icon: getBlockImageComponent(block, BlockIcon),\n key: 'block-' + block.slug,\n keywords: ['block', 'blocks', block.slug],\n label: ({ i18n }) => {\n const blockDisplayName = block?.labels?.singular\n ? getTranslation(block.labels.singular, i18n)\n : block?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n blockName: '',\n blockType: block.slug,\n })\n },\n } as SlashMenuItem\n }),\n key: 'blocks',\n label: ({ i18n }: { i18n: I18nClient<object, 'lexical:blocks:label'> }) => {\n return i18n.t('lexical:blocks:label')\n },\n }\n : null,\n clientInlineBlocks?.length\n ? {\n items: clientInlineBlocks.map((inlineBlock) => {\n return {\n Icon: InlineBlocksIcon,\n key: 'inlineBlocks-' + inlineBlock.slug,\n keywords: ['inlineBlock', 'inline block', inlineBlock.slug],\n label: ({ i18n }) => {\n const blockDisplayName = inlineBlock?.labels?.singular\n ? getTranslation(inlineBlock.labels.singular, i18n)\n : inlineBlock?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_INLINE_BLOCK_COMMAND, {\n blockName: '',\n blockType: inlineBlock.slug,\n })\n },\n } as SlashMenuItem\n }),\n key: 'inlineBlocks',\n label: ({\n i18n,\n }: {\n i18n: I18nClient<object, 'lexical:blocks:inlineBlocks:label'>\n }) => {\n return i18n.t('lexical:blocks:inlineBlocks:label')\n },\n }\n : null,\n ].filter(Boolean) as SlashMenuGroup[],\n },\n toolbarFixed: {\n groups: [\n clientBlocks.length\n ? {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: clientBlocks.map((block, index) => {\n return {\n ChildComponent: getBlockImageComponent(block, BlockIcon),\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + block.slug,\n label: ({ i18n }) => {\n const blockDisplayName = block?.labels?.singular\n ? getTranslation(block.labels.singular, i18n)\n : block?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n blockName: '',\n blockType: block.slug,\n })\n },\n order: index,\n } as ToolbarGroupItem\n }),\n key: 'blocks',\n order: 20,\n }\n : null,\n clientInlineBlocks?.length\n ? {\n type: 'dropdown',\n ChildComponent: InlineBlocksIcon,\n items: clientInlineBlocks.map((inlineBlock, index) => {\n return {\n ChildComponent: getBlockImageComponent(inlineBlock, InlineBlocksIcon),\n isActive: undefined,\n key: 'inlineBlock-' + inlineBlock.slug,\n label: ({ i18n }) => {\n const blockDisplayName = inlineBlock?.labels?.singular\n ? getTranslation(inlineBlock.labels.singular, i18n)\n : inlineBlock?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_INLINE_BLOCK_COMMAND, {\n blockName: '',\n blockType: inlineBlock.slug,\n })\n },\n order: index,\n } as ToolbarGroupItem\n }),\n key: 'inlineBlocks',\n order: 25,\n }\n : null,\n ].filter(Boolean) as ToolbarGroup[],\n },\n }\n },\n)\n"],"mappings":"AAAA;;AAKA,SAASA,cAAc,QAAQ;AAQ/B,SAASC,SAAS,QAAQ;AAC1B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,SAAS,QAAQ;AAC1B,SAASC,eAAe,QAAQ;AA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YACAG,QAAA,EAAUA,CAAC;cAAEC;YAAM,CAAE;cACnBA,MAAA,CAAOC,eAAe,CAAClD,2BAAA,EAA6B;gBAClDmD,SAAA,EAAW;gBACXC,SAAA,EAAWE,WAAA,CAAYb;cACzB;YACF;YACAoB,KAAA,EAAOF;UACT;QACF;QACA7C,GAAA,EAAK;QACL+C,KAAA,EAAO;MACT,IACA,KACL,CAAChD,MAAM,CAAC0C,OAAA;IACX;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["getTranslation","BlockIcon","InlineBlocksIcon","createClientFeature","getBlockImageComponent","getBlockMarkdownTransformers","BlockNode","InlineBlockNode","INSERT_BLOCK_COMMAND","INSERT_INLINE_BLOCK_COMMAND","BlocksPlugin","BlocksFeatureClient","config","featureClientSchemaMap","props","schemaPath","schemaMapRenderedBlockPathPrefix","schemaMapRenderedInlineBlockPathPrefix","clientSchema","blocksFields","Object","entries","filter","key","startsWith","replace","includes","map","value","inlineBlocksFields","clientBlocks","field","blockReferences","blocksMap","blocks","block","undefined","clientInlineBlocks","markdownTransformers","inlineBlocks","nodes","plugins","Component","position","sanitizedClientFeatureProps","slashMenu","groups","length","items","Icon","slug","keywords","label","i18n","blockDisplayName","labels","singular","onSelect","editor","dispatchCommand","blockName","blockType","t","inlineBlock","Boolean","toolbarFixed","type","ChildComponent","index","isActive","order"],"sources":["../../../../src/features/blocks/client/index.tsx"],"sourcesContent":["'use client'\n\nimport type { I18nClient } from '@payloadcms/translations'\nimport type { BlocksFieldClient, ClientBlock } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from '../../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { ToolbarGroup, ToolbarGroupItem } from '../../toolbars/types.js'\n\nimport { BlockIcon } from '../../../lexical/ui/icons/Block/index.js'\nimport { InlineBlocksIcon } from '../../../lexical/ui/icons/InlineBlocks/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { getBlockImageComponent } from './getBlockImageComponent.js'\nimport { getBlockMarkdownTransformers } from './markdown/markdownTransformer.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { InlineBlockNode } from './nodes/InlineBlocksNode.js'\nimport { INSERT_BLOCK_COMMAND, INSERT_INLINE_BLOCK_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\nexport const BlocksFeatureClient = createClientFeature(\n ({ config, featureClientSchemaMap, props, schemaPath }) => {\n const schemaMapRenderedBlockPathPrefix = `${schemaPath}.lexical_internal_feature.blocks.lexical_blocks`\n const schemaMapRenderedInlineBlockPathPrefix = `${schemaPath}.lexical_internal_feature.blocks.lexical_inline_blocks`\n const clientSchema = featureClientSchemaMap['blocks']\n\n if (!clientSchema) {\n return {}\n }\n\n const blocksFields: BlocksFieldClient[] = Object.entries(clientSchema)\n .filter(\n ([key]) =>\n key.startsWith(schemaMapRenderedBlockPathPrefix + '.') &&\n !key.replace(schemaMapRenderedBlockPathPrefix + '.', '').includes('.'),\n )\n .map(([, value]) => value[0] as BlocksFieldClient)\n\n const inlineBlocksFields: BlocksFieldClient[] = Object.entries(clientSchema)\n .filter(\n ([key]) =>\n key.startsWith(schemaMapRenderedInlineBlockPathPrefix + '.') &&\n !key.replace(schemaMapRenderedInlineBlockPathPrefix + '.', '').includes('.'),\n )\n .map(([, value]) => value[0] as BlocksFieldClient)\n\n const clientBlocks: ClientBlock[] = blocksFields\n .map((field) => {\n return field.blockReferences\n ? typeof field.blockReferences[0] === 'string'\n ? config.blocksMap[field.blockReferences[0]]\n : field.blockReferences[0]\n : field.blocks[0]\n })\n .filter((block) => block !== undefined)\n\n const clientInlineBlocks: ClientBlock[] = inlineBlocksFields\n .map((field) => {\n return field.blockReferences\n ? typeof field.blockReferences[0] === 'string'\n ? config.blocksMap[field.blockReferences[0]]\n : field.blockReferences[0]\n : field.blocks[0]\n })\n .filter((block) => block !== undefined)\n\n return {\n markdownTransformers: getBlockMarkdownTransformers({\n blocks: clientBlocks,\n inlineBlocks: clientInlineBlocks,\n }),\n nodes: [BlockNode, InlineBlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: [\n clientBlocks?.length\n ? {\n items: clientBlocks.map((block) => {\n return {\n Icon: getBlockImageComponent(block, BlockIcon),\n key: 'block-' + block.slug,\n keywords: ['block', 'blocks', block.slug],\n label: ({ i18n }) => {\n const blockDisplayName = block?.labels?.singular\n ? getTranslation(block.labels.singular, i18n)\n : block?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n blockName: '',\n blockType: block.slug,\n })\n },\n } as SlashMenuItem\n }),\n key: 'blocks',\n label: ({ i18n }: { i18n: I18nClient<object, 'lexical:blocks:label'> }) => {\n return i18n.t('lexical:blocks:label')\n },\n }\n : null,\n clientInlineBlocks?.length\n ? {\n items: clientInlineBlocks.map((inlineBlock) => {\n return {\n Icon: InlineBlocksIcon,\n key: 'inlineBlocks-' + inlineBlock.slug,\n keywords: ['inlineBlock', 'inline block', inlineBlock.slug],\n label: ({ i18n }) => {\n const blockDisplayName = inlineBlock?.labels?.singular\n ? getTranslation(inlineBlock.labels.singular, i18n)\n : inlineBlock?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_INLINE_BLOCK_COMMAND, {\n blockName: '',\n blockType: inlineBlock.slug,\n })\n },\n } as SlashMenuItem\n }),\n key: 'inlineBlocks',\n label: ({\n i18n,\n }: {\n i18n: I18nClient<object, 'lexical:blocks:inlineBlocks:label'>\n }) => {\n return i18n.t('lexical:blocks:inlineBlocks:label')\n },\n }\n : null,\n ].filter(Boolean) as SlashMenuGroup[],\n },\n toolbarFixed: {\n groups: [\n clientBlocks.length\n ? {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: clientBlocks.map((block, index) => {\n return {\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + block.slug,\n label: ({ i18n }) => {\n const blockDisplayName = block?.labels?.singular\n ? getTranslation(block.labels.singular, i18n)\n : block?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n blockName: '',\n blockType: block.slug,\n })\n },\n order: index,\n } as ToolbarGroupItem\n }),\n key: 'blocks',\n order: 20,\n }\n : null,\n clientInlineBlocks?.length\n ? {\n type: 'dropdown',\n ChildComponent: InlineBlocksIcon,\n items: clientInlineBlocks.map((inlineBlock, index) => {\n return {\n isActive: undefined,\n key: 'inlineBlock-' + inlineBlock.slug,\n label: ({ i18n }) => {\n const blockDisplayName = inlineBlock?.labels?.singular\n ? getTranslation(inlineBlock.labels.singular, i18n)\n : inlineBlock?.slug\n\n return blockDisplayName\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_INLINE_BLOCK_COMMAND, {\n blockName: '',\n blockType: inlineBlock.slug,\n })\n },\n order: index,\n } as ToolbarGroupItem\n }),\n key: 'inlineBlocks',\n order: 25,\n }\n : null,\n ].filter(Boolean) as ToolbarGroup[],\n },\n }\n },\n)\n"],"mappings":"AAAA;;AAKA,SAASA,cAAc,QAAQ;AAQ/B,SAASC,SAAS,QAAQ;AAC1B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,SAAS,QAAQ;AAC1B,SAASC,eAAe,QAAQ;AAChC,SAASC,oBAAoB,EAAEC,2BAA2B,QAAQ;AAClE,SAASC,YAAY,QAAQ;AAC7B,OAAO,MAAMC,mBAAA,GAAsBR,mBAAA,CACjC,CAAC;EAAES,MAAM;EAAEC,sBAAsB;EAAEC,KAAK;EAAEC;AAAU,CAAE;EACp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 @@
1
- import './index.scss';
1
+ import './index.css';
2
2
  import React from 'react';
3
3
  import type { AdditionalCodeComponentProps } from './Code.js';
4
4
  export declare const CodeBlockBlockComponent: React.FC<Pick<AdditionalCodeComponentProps, 'languages'>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Block.tsx"],"names":[],"mappings":"AAIA,OAAO,cAAc,CAAA;AAarB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAA;AAS7D,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,WAAW,CAAC,CAuG7F,CAAA"}
1
+ {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Block.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAA;AAapB,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAA;AAS7D,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,4BAA4B,EAAE,WAAW,CAAC,CAyG7F,CAAA"}
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ import './index.css';
4
5
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
5
6
  import { ChevronIcon, Combobox, CopyToClipboard, PopupList, RenderFields, useForm, useFormFields, useTranslation } from '@payloadcms/ui';
6
7
  import React from 'react';
@@ -100,6 +101,8 @@ export const CodeBlockBlockComponent = args => {
100
101
  className: `${baseClass}__pill`,
101
102
  children: /*#__PURE__*/_jsx(CodeBlockIcon, {})
102
103
  }),
104
+ showDragHandle: false,
105
+ showRowNumber: false,
103
106
  children: /*#__PURE__*/_jsx(RenderFields, {
104
107
  fields: formSchema,
105
108
  forceRender: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Block.js","names":["useLexicalEditable","ChevronIcon","Combobox","CopyToClipboard","PopupList","RenderFields","useForm","useFormFields","useTranslation","React","CodeBlockIcon","useBlockComponentContext","Collapse","defaultLanguages","FloatingCollapse","baseClass","CodeBlockBlockComponent","args","languages","languagesFromProps","BlockCollapsible","formSchema","RemoveButton","setModified","t","codeField","fields","code","selectedLanguageField","setSelectedLanguage","dispatch","language","type","path","value","selectedLanguageLabel","isEditable","languageEntries","useMemo","Object","entries","map","languageCode","languageLabel","name","Component","_jsx","Button","active","disabled","onClick","className","Actions","_jsxs","button","buttonType","horizontalAlign","minEntriesForSearch","searchPlaceholder","showScrollbar","size","collapsibleProps","AfterCollapsible","disableHeaderToggle","disableToggleIndicator","Pill","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Block.tsx"],"sourcesContent":["'use client'\nimport type { ComboboxEntry } from '@payloadcms/ui'\nimport type {} from 'payload'\n\nimport './index.scss'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n ChevronIcon,\n Combobox,\n CopyToClipboard,\n PopupList,\n RenderFields,\n useForm,\n useFormFields,\n useTranslation,\n} from '@payloadcms/ui'\nimport React from 'react'\n\nimport type { AdditionalCodeComponentProps } from './Code.js'\n\nimport { CodeBlockIcon } from '../../../../../lexical/ui/icons/CodeBlock/index.js'\nimport { useBlockComponentContext } from '../../../client/component/BlockContent.js'\nimport { Collapse } from './Collapse/index.js'\nimport { defaultLanguages } from './defaultLanguages.js'\nimport { FloatingCollapse } from './FloatingCollapse/index.js'\n\nconst baseClass = 'payload-richtext-code-block'\nexport const CodeBlockBlockComponent: React.FC<Pick<AdditionalCodeComponentProps, 'languages'>> = (\n args,\n) => {\n const { languages: languagesFromProps } = args\n const languages = languagesFromProps || defaultLanguages\n\n const { BlockCollapsible, formSchema, RemoveButton } = useBlockComponentContext()\n const { setModified } = useForm()\n const { t } = useTranslation()\n\n const { codeField } = useFormFields(([fields]) => ({\n codeField: fields?.code,\n }))\n\n const { selectedLanguageField, setSelectedLanguage } = useFormFields(([fields, dispatch]) => ({\n selectedLanguageField: fields?.language,\n setSelectedLanguage: (language: string) => {\n dispatch({\n type: 'UPDATE',\n path: 'language',\n value: language,\n })\n setModified(true)\n },\n }))\n\n const selectedLanguageLabel = languages[selectedLanguageField?.value as keyof typeof languages]\n\n const isEditable = useLexicalEditable()\n\n const languageEntries = React.useMemo<ComboboxEntry[]>(() => {\n return Object.entries(languages).map(([languageCode, languageLabel]) => ({\n name: `${languageCode} ${languageLabel}`,\n Component: (\n <PopupList.Button\n active={false}\n disabled={false}\n onClick={() => {\n setSelectedLanguage(languageCode)\n }}\n >\n <span className={`${baseClass}__language-code`} data-language={languageCode}>\n {languageLabel}\n </span>\n </PopupList.Button>\n ),\n }))\n }, [languages, setSelectedLanguage])\n\n return (\n <BlockCollapsible\n Actions={\n <div className={`${baseClass}__actions`}>\n <Combobox\n button={\n <div\n className={`${baseClass}__language-selector-button`}\n data-selected-language={selectedLanguageField?.value}\n >\n <span>{selectedLanguageLabel}</span>\n <ChevronIcon className={`${baseClass}__chevron`} />\n </div>\n }\n buttonType=\"custom\"\n className={`${baseClass}__language-selector`}\n disabled={!isEditable}\n entries={languageEntries}\n horizontalAlign=\"right\"\n minEntriesForSearch={8}\n searchPlaceholder={t('fields:searchForLanguage')}\n showScrollbar\n size=\"large\"\n />\n <CopyToClipboard value={(codeField?.value as string) ?? ''} />\n\n <Collapse />\n\n {isEditable && <RemoveButton />}\n </div>\n }\n className={baseClass}\n collapsibleProps={{\n AfterCollapsible: <FloatingCollapse />,\n disableHeaderToggle: true,\n disableToggleIndicator: true,\n }}\n Pill={\n <div className={`${baseClass}__pill`}>\n <CodeBlockIcon />\n </div>\n }\n >\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"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AA,OAEAwB,UAAA,iBAAcU,IAAA,CAACxB,YAAA;;IAGpB6B,SAAA,EAAWpC,SAAA;IACX8C,gBAAA,EAAkB;MAChBC,gBAAA,eAAkBhB,IAAA,CAAChC,gBAAA;MACnBiD,mBAAA,EAAqB;MACrBC,sBAAA,EAAwB;IAC1B;IACAC,IAAA,eACEnB,IAAA,CAAC;MAAIK,SAAA,EAAW,GAAGpC,SAAA,QAAiB;gBAClC,aAAA+B,IAAA,CAACpC,aAAA;;cAIL,aAAAoC,IAAA,CAACzC,YAAA;MACCqB,MAAA,EAAQL,UAAA;MACR6C,WAAA,EAAa;MACbC,eAAA,EAAgB;MAChBC,UAAA,EAAY;MACZC,gBAAA,EAAiB;MACjBC,WAAA,EAAa;MACbC,QAAA,EAAU,CAACnC;;;AAInB","ignoreList":[]}
1
+ {"version":3,"file":"Block.js","names":["useLexicalEditable","ChevronIcon","Combobox","CopyToClipboard","PopupList","RenderFields","useForm","useFormFields","useTranslation","React","CodeBlockIcon","useBlockComponentContext","Collapse","defaultLanguages","FloatingCollapse","baseClass","CodeBlockBlockComponent","args","languages","languagesFromProps","BlockCollapsible","formSchema","RemoveButton","setModified","t","codeField","fields","code","selectedLanguageField","setSelectedLanguage","dispatch","language","type","path","value","selectedLanguageLabel","isEditable","languageEntries","useMemo","Object","entries","map","languageCode","languageLabel","name","Component","_jsx","Button","active","disabled","onClick","className","Actions","_jsxs","button","buttonType","horizontalAlign","minEntriesForSearch","searchPlaceholder","showScrollbar","size","collapsibleProps","AfterCollapsible","disableHeaderToggle","disableToggleIndicator","Pill","showDragHandle","showRowNumber","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Block.tsx"],"sourcesContent":["'use client'\nimport type { ComboboxEntry } from '@payloadcms/ui'\nimport type {} from 'payload'\n\nimport './index.css'\n\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport {\n ChevronIcon,\n Combobox,\n CopyToClipboard,\n PopupList,\n RenderFields,\n useForm,\n useFormFields,\n useTranslation,\n} from '@payloadcms/ui'\nimport React from 'react'\n\nimport type { AdditionalCodeComponentProps } from './Code.js'\n\nimport { CodeBlockIcon } from '../../../../../lexical/ui/icons/CodeBlock/index.js'\nimport { useBlockComponentContext } from '../../../client/component/BlockContent.js'\nimport { Collapse } from './Collapse/index.js'\nimport { defaultLanguages } from './defaultLanguages.js'\nimport { FloatingCollapse } from './FloatingCollapse/index.js'\n\nconst baseClass = 'payload-richtext-code-block'\nexport const CodeBlockBlockComponent: React.FC<Pick<AdditionalCodeComponentProps, 'languages'>> = (\n args,\n) => {\n const { languages: languagesFromProps } = args\n const languages = languagesFromProps || defaultLanguages\n\n const { BlockCollapsible, formSchema, RemoveButton } = useBlockComponentContext()\n const { setModified } = useForm()\n const { t } = useTranslation()\n\n const { codeField } = useFormFields(([fields]) => ({\n codeField: fields?.code,\n }))\n\n const { selectedLanguageField, setSelectedLanguage } = useFormFields(([fields, dispatch]) => ({\n selectedLanguageField: fields?.language,\n setSelectedLanguage: (language: string) => {\n dispatch({\n type: 'UPDATE',\n path: 'language',\n value: language,\n })\n setModified(true)\n },\n }))\n\n const selectedLanguageLabel = languages[selectedLanguageField?.value as keyof typeof languages]\n\n const isEditable = useLexicalEditable()\n\n const languageEntries = React.useMemo<ComboboxEntry[]>(() => {\n return Object.entries(languages).map(([languageCode, languageLabel]) => ({\n name: `${languageCode} ${languageLabel}`,\n Component: (\n <PopupList.Button\n active={false}\n disabled={false}\n onClick={() => {\n setSelectedLanguage(languageCode)\n }}\n >\n <span className={`${baseClass}__language-code`} data-language={languageCode}>\n {languageLabel}\n </span>\n </PopupList.Button>\n ),\n }))\n }, [languages, setSelectedLanguage])\n\n return (\n <BlockCollapsible\n Actions={\n <div className={`${baseClass}__actions`}>\n <Combobox\n button={\n <div\n className={`${baseClass}__language-selector-button`}\n data-selected-language={selectedLanguageField?.value}\n >\n <span>{selectedLanguageLabel}</span>\n <ChevronIcon className={`${baseClass}__chevron`} />\n </div>\n }\n buttonType=\"custom\"\n className={`${baseClass}__language-selector`}\n disabled={!isEditable}\n entries={languageEntries}\n horizontalAlign=\"right\"\n minEntriesForSearch={8}\n searchPlaceholder={t('fields:searchForLanguage')}\n showScrollbar\n size=\"large\"\n />\n <CopyToClipboard value={(codeField?.value as string) ?? ''} />\n\n <Collapse />\n\n {isEditable && <RemoveButton />}\n </div>\n }\n className={baseClass}\n collapsibleProps={{\n AfterCollapsible: <FloatingCollapse />,\n disableHeaderToggle: true,\n disableToggleIndicator: true,\n }}\n Pill={\n <div className={`${baseClass}__pill`}>\n <CodeBlockIcon />\n </div>\n }\n showDragHandle={false}\n showRowNumber={false}\n >\n <RenderFields\n fields={formSchema}\n forceRender={true}\n parentIndexPath=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </BlockCollapsible>\n )\n}\n"],"mappings":"AAAA;;;AAIA,OAAO;AAEP,SAASA,kBAAkB,QAAQ;AACnC,SACEC,WAAW,EACXC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,cAAc,QACT;AACP,OAAOC,KAAA,MAAW;AAIlB,SAASC,aAAa,QAAQ;AAC9B,SAASC,wBAAwB,QAAQ;AACzC,SAASC,QAAQ,QAAQ;AACzB,SAASC,gBAAgB,QAAQ;AACjC,SAASC,gBAAgB,QAAQ;AAEjC,MAAMC,SAAA,GAAY;AAClB,OAAO,MAAMC,uBAAA,GACXC,IAAA;EAEA,MAAM;IAAEC,SAAA,EAAWC;EAAkB,CAAE,GAAGF,IAAA;EAC1C,MAAMC,SAAA,GAAYC,kBAAA,IAAsBN,gBAAA;EAExC,MAAM;IAAEO,gBAAgB;IAAEC,UAAU;IAAEC;EAAY,CAAE,GAAGX,wBAAA;EACvD,MAAM;IAAEY;EAAW,CAAE,GAAGjB,OAAA;EACxB,MAAM;IAAEkB;EAAC,CAAE,GAAGhB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AAA,EAAW,GAAGpC,SAAA,4BAAqC;UACnD,0BAAwBa,qBAAA,EAAuBM,KAAA;kCAE/CY,IAAA,CAAC;sBAAMX;2BACPW,IAAA,CAAC7C,WAAA;YAAYkD,SAAA,EAAW,GAAGpC,SAAA;;;QAG/BwC,UAAA,EAAW;QACXJ,SAAA,EAAW,GAAGpC,SAAA,qBAA8B;QAC5CkC,QAAA,EAAU,CAACb,UAAA;QACXI,OAAA,EAASH,eAAA;QACTmB,eAAA,EAAgB;QAChBC,mBAAA,EAAqB;QACrBC,iBAAA,EAAmBlC,CAAA,CAAE;QACrBmC,aAAa;QACbC,IAAA,EAAK;uBAEPd,IAAA,CAAC3C,eAAA;QAAgB+B,KAAA,EAAOT,SAAC,EAAWS,KAAA,IAAoB;uBAExDY,IAAA,CAAClC,QAAA,OAEAwB,UAAA,iBAAcU,IAAA,CAACxB,YAAA;;IAGpB6B,SAAA,EAAWpC,SAAA;IACX8C,gBAAA,EAAkB;MAChBC,gBAAA,eAAkBhB,IAAA,CAAChC,gBAAA;MACnBiD,mBAAA,EAAqB;MACrBC,sBAAA,EAAwB;IAC1B;IACAC,IAAA,eACEnB,IAAA,CAAC;MAAIK,SAAA,EAAW,GAAGpC,SAAA,QAAiB;gBAClC,aAAA+B,IAAA,CAACpC,aAAA;;IAGLwD,cAAA,EAAgB;IAChBC,aAAA,EAAe;cAEf,aAAArB,IAAA,CAACzC,YAAA;MACCqB,MAAA,EAAQL,UAAA;MACR+C,WAAA,EAAa;MACbC,eAAA,EAAgB;MAChBC,UAAA,EAAY;MACZC,gBAAA,EAAiB;MACjBC,WAAA,EAAa;MACbC,QAAA,EAAU,CAACrC;;;AAInB","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ .code-block-collapse-button {
2
+ all: unset;
3
+ cursor: pointer;
4
+ min-width: var(--spacer-4);
5
+ min-height: var(--spacer-4);
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ border-radius: var(--radius-medium);
10
+ color: var(--color-icon-secondary);
11
+ box-sizing: border-box;
12
+
13
+ &:hover {
14
+ color: var(--color-icon);
15
+ background-color: var(--color-bg-transparent-hover);
16
+ }
17
+
18
+ &:active {
19
+ background-color: var(--color-bg-transparent-pressed);
20
+ }
21
+
22
+ &:focus-visible {
23
+ outline: 1px solid var(--color-border-brand-strong);
24
+ outline-offset: calc(var(--stroke-width-small) / -1);
25
+ }
26
+ }
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import './index.scss';
2
+ import './index.css';
3
3
  export declare const Collapse: React.FC;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/Collapse/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAOrB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAO5B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/Collapse/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,aAAa,CAAA;AAQpB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAO5B,CAAA"}
@@ -1,17 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import './index.css';
3
4
  const baseClass = 'code-block-collapse-button';
4
5
  import { useCollapsible } from '@payloadcms/ui';
5
6
  import { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js';
7
+ import { ExpandIcon } from '../../../../../../lexical/ui/icons/Expand/index.js';
6
8
  export const Collapse = () => {
7
9
  const {
10
+ isCollapsed,
8
11
  toggle
9
12
  } = useCollapsible();
10
13
  return /*#__PURE__*/_jsx("button", {
11
14
  className: baseClass,
12
15
  onClick: toggle,
13
16
  type: "button",
14
- children: /*#__PURE__*/_jsx(CollapseIcon, {})
17
+ children: isCollapsed ? /*#__PURE__*/_jsx(ExpandIcon, {}) : /*#__PURE__*/_jsx(CollapseIcon, {})
15
18
  });
16
19
  };
17
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","baseClass","useCollapsible","CollapseIcon","Collapse","toggle","_jsx","className","onClick","type"],"sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/Collapse/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nconst baseClass = 'code-block-collapse-button'\nimport { useCollapsible } from '@payloadcms/ui'\n\nimport { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js'\n\nexport const Collapse: React.FC = () => {\n const { toggle } = useCollapsible()\n return (\n <button className={baseClass} onClick={toggle} type=\"button\">\n <CollapseIcon />\n </button>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAIlB,MAAMC,SAAA,GAAY;AAClB,SAASC,cAAc,QAAQ;AAE/B,SAASC,YAAY,QAAQ;AAE7B,OAAO,MAAMC,QAAA,GAAqBA,CAAA;EAChC,MAAM;IAAEC;EAAM,CAAE,GAAGH,cAAA;EACnB,oBACEI,IAAA,CAAC;IAAOC,SAAA,EAAWN,SAAA;IAAWO,OAAA,EAASH,MAAA;IAAQI,IAAA,EAAK;cAClD,aAAAH,IAAA,CAACH,YAAA;;AAGP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","baseClass","useCollapsible","CollapseIcon","ExpandIcon","Collapse","isCollapsed","toggle","_jsx","className","onClick","type"],"sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/Collapse/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.css'\n\nconst baseClass = 'code-block-collapse-button'\nimport { useCollapsible } from '@payloadcms/ui'\n\nimport { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js'\nimport { ExpandIcon } from '../../../../../../lexical/ui/icons/Expand/index.js'\n\nexport const Collapse: React.FC = () => {\n const { isCollapsed, toggle } = useCollapsible()\n return (\n <button className={baseClass} onClick={toggle} type=\"button\">\n {isCollapsed ? <ExpandIcon /> : <CollapseIcon />}\n </button>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAEP,MAAMC,SAAA,GAAY;AAClB,SAASC,cAAc,QAAQ;AAE/B,SAASC,YAAY,QAAQ;AAC7B,SAASC,UAAU,QAAQ;AAE3B,OAAO,MAAMC,QAAA,GAAqBA,CAAA;EAChC,MAAM;IAAEC,WAAW;IAAEC;EAAM,CAAE,GAAGL,cAAA;EAChC,oBACEM,IAAA,CAAC;IAAOC,SAAA,EAAWR,SAAA;IAAWS,OAAA,EAASH,MAAA;IAAQI,IAAA,EAAK;cACjDL,WAAA,gBAAcE,IAAA,CAACJ,UAAA,qBAAgBI,IAAA,CAACL,YAAA;;AAGvC","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ .code-block-floating-collapse-button {
2
+ all: unset;
3
+ cursor: pointer;
4
+
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ box-sizing: border-box;
9
+ position: absolute;
10
+ left: 50%;
11
+ transform: translateX(-50%);
12
+ height: var(--spacer-4);
13
+ bottom: calc(var(--spacer-2-5) * -1);
14
+ padding: var(--spacer-1) var(--spacer-2) var(--spacer-1) var(--spacer-1);
15
+ border-radius: var(--radius-medium);
16
+
17
+ background: var(--color-bg);
18
+ color: var(--color-text);
19
+ font-size: var(--text-body-medium-font-size);
20
+ line-height: var(--text-body-medium-line-height);
21
+ white-space: nowrap;
22
+
23
+ box-shadow:
24
+ 0px 0px 0.5px 0px rgba(0, 0, 0, 0.18),
25
+ 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
26
+
27
+ &:hover {
28
+ background: var(--color-bg-secondary-hover);
29
+ color: var(--color-text);
30
+ }
31
+
32
+ &:active {
33
+ background: var(--color-bg-secondary-pressed);
34
+ }
35
+
36
+ &:focus-visible {
37
+ outline: var(--stroke-width-small) solid var(--color-border-brand-strong);
38
+ outline-offset: calc(var(--stroke-width-small) / -1);
39
+ }
40
+ }
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import './index.scss';
2
+ import './index.css';
3
3
  export declare const FloatingCollapse: React.FC;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAOrB,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAcpC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,aAAa,CAAA;AAIpB,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAUpC,CAAA"}
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React from 'react';
3
- const baseClass = 'code-block-floating-collapse-button';
4
2
  import { useCollapsible, useTranslation } from '@payloadcms/ui';
3
+ import React from 'react';
5
4
  import { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js';
5
+ import { ExpandIcon } from '../../../../../../lexical/ui/icons/Expand/index.js';
6
+ import './index.css';
7
+ const baseClass = 'code-block-floating-collapse-button';
6
8
  export const FloatingCollapse = () => {
7
9
  const {
8
10
  isCollapsed,
@@ -11,16 +13,13 @@ export const FloatingCollapse = () => {
11
13
  const {
12
14
  t
13
15
  } = useTranslation();
14
- if (!isCollapsed) {
15
- return null;
16
- }
17
16
  return /*#__PURE__*/_jsxs("button", {
18
17
  className: baseClass,
19
18
  onClick: toggle,
20
19
  type: "button",
21
- children: [/*#__PURE__*/_jsx("span", {
22
- children: t('general:collapse')
23
- }), /*#__PURE__*/_jsx(CollapseIcon, {})]
20
+ children: [isCollapsed ? /*#__PURE__*/_jsx(ExpandIcon, {}) : /*#__PURE__*/_jsx(CollapseIcon, {}), /*#__PURE__*/_jsx("span", {
21
+ children: isCollapsed ? t('general:expand') : t('general:collapse')
22
+ })]
24
23
  });
25
24
  };
26
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","baseClass","useCollapsible","useTranslation","CollapseIcon","FloatingCollapse","isCollapsed","toggle","t","_jsxs","className","onClick","type","_jsx"],"sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nconst baseClass = 'code-block-floating-collapse-button'\nimport { useCollapsible, useTranslation } from '@payloadcms/ui'\n\nimport { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js'\n\nexport const FloatingCollapse: React.FC = () => {\n const { isCollapsed, toggle } = useCollapsible()\n const { t } = useTranslation()\n\n if (!isCollapsed) {\n return null\n }\n\n return (\n <button className={baseClass} onClick={toggle} type=\"button\">\n <span>{t('general:collapse')}</span>\n <CollapseIcon />\n </button>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAIlB,MAAMC,SAAA,GAAY;AAClB,SAASC,cAAc,EAAEC,cAAc,QAAQ;AAE/C,SAASC,YAAY,QAAQ;AAE7B,OAAO,MAAMC,gBAAA,GAA6BA,CAAA;EACxC,MAAM;IAAEC,WAAW;IAAEC;EAAM,CAAE,GAAGL,cAAA;EAChC,MAAM;IAAEM;EAAC,CAAE,GAAGL,cAAA;EAEd,IAAI,CAACG,WAAA,EAAa;IAChB,OAAO;EACT;EAEA,oBACEG,KAAA,CAAC;IAAOC,SAAA,EAAWT,SAAA;IAAWU,OAAA,EAASJ,MAAA;IAAQK,IAAA,EAAK;4BAClDC,IAAA,CAAC;gBAAML,CAAA,CAAE;qBACTK,IAAA,CAACT,YAAA;;AAGP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["useCollapsible","useTranslation","React","CollapseIcon","ExpandIcon","baseClass","FloatingCollapse","isCollapsed","toggle","t","_jsxs","className","onClick","type","_jsx"],"sources":["../../../../../../../src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx"],"sourcesContent":["import { useCollapsible, useTranslation } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js'\nimport { ExpandIcon } from '../../../../../../lexical/ui/icons/Expand/index.js'\nimport './index.css'\n\nconst baseClass = 'code-block-floating-collapse-button'\n\nexport const FloatingCollapse: React.FC = () => {\n const { isCollapsed, toggle } = useCollapsible()\n const { t } = useTranslation()\n\n return (\n <button className={baseClass} onClick={toggle} type=\"button\">\n {isCollapsed ? <ExpandIcon /> : <CollapseIcon />}\n <span>{isCollapsed ? t('general:expand') : t('general:collapse')}</span>\n </button>\n )\n}\n"],"mappings":";AAAA,SAASA,cAAc,EAAEC,cAAc,QAAQ;AAC/C,OAAOC,KAAA,MAAW;AAElB,SAASC,YAAY,QAAQ;AAC7B,SAASC,UAAU,QAAQ;AAC3B,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,gBAAA,GAA6BA,CAAA;EACxC,MAAM;IAAEC,WAAW;IAAEC;EAAM,CAAE,GAAGR,cAAA;EAChC,MAAM;IAAES;EAAC,CAAE,GAAGR,cAAA;EAEd,oBACES,KAAA,CAAC;IAAOC,SAAA,EAAWN,SAAA;IAAWO,OAAA,EAASJ,MAAA;IAAQK,IAAA,EAAK;eACjDN,WAAA,gBAAcO,IAAA,CAACV,UAAA,qBAAgBU,IAAA,CAACX,YAAA,O,aACjCW,IAAA,CAAC;gBAAMP,WAAA,GAAcE,CAAA,CAAE,oBAAoBA,CAAA,CAAE;;;AAGnD","ignoreList":[]}
@@ -0,0 +1,171 @@
1
+ @layer payload-default {
2
+ .payload-richtext-code-block.collapsible--collapsed {
3
+ .rah-static {
4
+ height: unset !important;
5
+ max-height: 150px !important;
6
+ position: relative;
7
+ border-radius: var(--radius-medium);
8
+
9
+ &::after {
10
+ content: '';
11
+ pointer-events: none;
12
+ background: linear-gradient(
13
+ to bottom,
14
+ rgb(0 0 0 / 0%) 0%,
15
+ var(--color-bg) 90%,
16
+ var(--color-bg) 100%
17
+ );
18
+ position: absolute;
19
+ height: 100px;
20
+ top: 50px;
21
+ left: 0;
22
+ right: 0;
23
+ }
24
+
25
+ > div {
26
+ display: unset !important;
27
+ }
28
+ }
29
+ }
30
+
31
+ .payload-richtext-code-block {
32
+ .collapsible__toggle-wrap {
33
+ background: var(--color-bg);
34
+ border: none;
35
+ border-radius: var(--radius-medium);
36
+ height: auto;
37
+ padding: var(--spacer-1) var(--spacer-2-5);
38
+ overflow: visible;
39
+
40
+ &:not(.toggle-disabled):hover {
41
+ background: var(--color-bg);
42
+ }
43
+ }
44
+
45
+ .collapsible__header-wrap {
46
+ overflow: visible;
47
+ padding: 0;
48
+ }
49
+
50
+ .popup__caret {
51
+ display: none;
52
+ }
53
+
54
+ .collapsible__content {
55
+ padding: 0;
56
+ border: none;
57
+ }
58
+
59
+ .LexicalEditorTheme__block__block-header {
60
+ overflow: visible;
61
+ }
62
+
63
+ .code-editor,
64
+ .monaco-editor,
65
+ .overflow-guard {
66
+ border-width: 0;
67
+ border-radius: 0 0 var(--radius-medium) var(--radius-medium);
68
+ background: var(--color-bg);
69
+ }
70
+
71
+ .popup-button {
72
+ padding: 0 0 0 var(--spacer-1);
73
+ }
74
+
75
+ .copy-to-clipboard,
76
+ .code-block-collapse-button,
77
+ .popup-button,
78
+ .LexicalEditorTheme__block__removeButton.btn {
79
+ border-radius: var(--radius-medium);
80
+ color: var(--color-icon-secondary);
81
+ min-width: var(--spacer-4);
82
+ min-height: var(--spacer-4);
83
+ padding: 0;
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+
88
+ &:hover {
89
+ color: var(--color-icon);
90
+ background-color: var(--color-bg-transparent-hover);
91
+ }
92
+
93
+ &:active {
94
+ background-color: var(--color-bg-transparent-pressed);
95
+ }
96
+
97
+ &:focus-visible {
98
+ outline: var(--stroke-width-small) solid var(--color-border-brand-strong);
99
+ outline-offset: calc(var(--stroke-width-small) / -1);
100
+ }
101
+ }
102
+ }
103
+
104
+ .payload-richtext-code-block__pill {
105
+ display: flex;
106
+ align-items: center;
107
+ justify-content: center;
108
+ min-width: var(--spacer-4);
109
+ color: var(--color-icon-tertiary);
110
+ }
111
+
112
+ .payload-richtext-code-block__actions {
113
+ display: flex;
114
+ flex-direction: row;
115
+ align-items: center;
116
+ gap: var(--spacer-2);
117
+ }
118
+
119
+ .payload-richtext-code-block__language-selector {
120
+ pointer-events: all;
121
+ }
122
+
123
+ .payload-richtext-code-block__language-selector-button {
124
+ display: flex;
125
+ flex-direction: row;
126
+ width: max-content;
127
+ align-items: center;
128
+ color: var(--color-text-secondary);
129
+ font-size: var(--text-body-medium-font-size);
130
+ line-height: var(--text-body-medium-line-height);
131
+ padding-left: var(--spacer-1);
132
+
133
+ & path {
134
+ fill-opacity: 1;
135
+ }
136
+
137
+ &:hover {
138
+ color: var(--color-text);
139
+
140
+ & path {
141
+ fill: var(--color-text);
142
+ }
143
+ }
144
+ }
145
+
146
+ .payload-richtext-code-block__chevron {
147
+ color: var(--color-icon-secondary);
148
+ width: var(--spacer-3);
149
+ height: var(--spacer-4);
150
+ display: flex;
151
+ align-items: center;
152
+ justify-content: center;
153
+ flex-shrink: 0;
154
+ }
155
+ }
156
+
157
+ /* Override the collapsible container to use a simple border wrapper */
158
+ .payload-richtext-code-block {
159
+ border: var(--stroke-width-small) solid var(--color-border);
160
+ border-radius: var(--radius-medium);
161
+
162
+ &:focus-within {
163
+ outline: var(--stroke-width-small) solid var(--color-border-brand-strong);
164
+ outline-offset: calc(var(--stroke-width-small) / -1);
165
+ }
166
+ }
167
+
168
+ /* Add left padding to Monaco line numbers area */
169
+ .payload-richtext-code-block .monaco-editor .margin {
170
+ padding-left: var(--spacer-2);
171
+ }
@@ -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 || '';