@payloadcms/richtext-lexical 3.68.0-internal-debug.185cc5f → 3.68.0-internal-debug.dafc24d

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 (280) hide show
  1. package/dist/cell/rscEntry.js +13 -5
  2. package/dist/cell/rscEntry.js.map +1 -1
  3. package/dist/features/blocks/client/component/BlockContent.js +29 -9
  4. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  5. package/dist/features/blocks/client/component/components/BlockCollapsible.js +7 -3
  6. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  7. package/dist/features/blocks/client/component/components/BlockEditButton.js +6 -2
  8. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  9. package/dist/features/blocks/client/component/components/BlockRemoveButton.js +6 -2
  10. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  11. package/dist/features/blocks/client/component/index.js +123 -43
  12. package/dist/features/blocks/client/component/index.js.map +1 -1
  13. package/dist/features/blocks/client/component/index.scss +188 -0
  14. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +7 -3
  15. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  16. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +6 -2
  17. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  18. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +6 -2
  19. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  20. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +6 -2
  21. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  22. package/dist/features/blocks/client/componentInline/index.js +117 -37
  23. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  24. package/dist/features/blocks/client/componentInline/index.scss +90 -0
  25. package/dist/features/blocks/client/getBlockImageComponent.js +7 -3
  26. package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
  27. package/dist/features/blocks/client/nodes/BlocksNode.js +7 -3
  28. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  29. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +7 -3
  30. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  31. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +87 -27
  32. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  33. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +7 -3
  34. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  35. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +12 -4
  36. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  37. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.scss +6 -0
  38. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +18 -6
  39. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  40. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.scss +29 -0
  41. package/dist/features/blocks/premade/CodeBlock/Component/index.scss +97 -0
  42. package/dist/features/converters/lexicalToJSX/Component/index.js +9 -5
  43. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  44. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +7 -3
  45. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  46. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +7 -3
  47. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  48. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +6 -2
  49. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  50. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +6 -2
  51. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  52. package/dist/features/converters/lexicalToJSX/converter/converters/link.js +13 -5
  53. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  54. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +38 -14
  55. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  56. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +18 -6
  57. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  58. package/dist/features/converters/lexicalToJSX/converter/converters/table.js +31 -11
  59. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  60. package/dist/features/converters/lexicalToJSX/converter/converters/text.js +43 -15
  61. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  62. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +31 -11
  63. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  64. package/dist/features/converters/lexicalToJSX/converter/index.js +8 -4
  65. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  66. package/dist/features/debug/jsxConverter/client/plugin/index.js +13 -5
  67. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  68. package/dist/features/debug/jsxConverter/client/plugin/style.scss +12 -0
  69. package/dist/features/debug/testRecorder/client/plugin/index.js +61 -21
  70. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  71. package/dist/features/debug/testRecorder/client/plugin/index.scss +53 -0
  72. package/dist/features/debug/treeView/client/plugin/index.js +7 -3
  73. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  74. package/dist/features/debug/treeView/client/plugin/index.scss +80 -0
  75. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +224 -72
  76. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  77. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.scss +87 -0
  78. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +31 -11
  79. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  80. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.scss +11 -0
  81. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +21 -9
  82. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  83. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +25 -9
  84. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  85. package/dist/features/experimental_table/client/plugins/TablePlugin/index.scss +233 -0
  86. package/dist/features/horizontalRule/client/plugin/index.scss +23 -0
  87. package/dist/features/indent/client/IndentPlugin.js +6 -2
  88. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  89. package/dist/features/link/client/plugins/clickableLink/index.js +6 -2
  90. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  91. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +76 -24
  92. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  93. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +7 -3
  94. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  95. package/dist/features/link/client/plugins/floatingLinkEditor/index.scss +92 -0
  96. package/dist/features/lists/checklist/client/plugin/index.js +6 -2
  97. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  98. package/dist/features/lists/plugin/index.js +6 -2
  99. package/dist/features/lists/plugin/index.js.map +1 -1
  100. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +13 -5
  101. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  102. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +7 -3
  103. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  104. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +16 -0
  105. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +13 -5
  106. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  107. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +7 -3
  108. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  109. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +16 -0
  110. package/dist/features/relationship/client/components/RelationshipComponent.js +55 -19
  111. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  112. package/dist/features/relationship/client/components/index.scss +95 -0
  113. package/dist/features/relationship/client/drawer/index.js +18 -6
  114. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  115. package/dist/features/relationship/client/nodes/RelationshipNode.js +7 -3
  116. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  117. package/dist/features/relationship/client/plugins/index.js +7 -3
  118. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  119. package/dist/features/textState/feature.client.js +18 -6
  120. package/dist/features/textState/feature.client.js.map +1 -1
  121. package/dist/features/toolbars/fixed/client/Toolbar/index.js +71 -23
  122. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  123. package/dist/features/toolbars/fixed/client/Toolbar/index.scss +113 -0
  124. package/dist/features/toolbars/inline/client/Toolbar/index.js +71 -23
  125. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  126. package/dist/features/toolbars/inline/client/Toolbar/index.scss +58 -0
  127. package/dist/features/toolbars/shared/ToolbarButton/index.js +7 -3
  128. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  129. package/dist/features/toolbars/shared/ToolbarButton/index.scss +46 -0
  130. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +60 -20
  131. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  132. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +36 -12
  133. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  134. package/dist/features/toolbars/shared/ToolbarDropdown/index.scss +129 -0
  135. package/dist/features/upload/client/component/index.js +91 -31
  136. package/dist/features/upload/client/component/index.js.map +1 -1
  137. package/dist/features/upload/client/component/index.scss +191 -0
  138. package/dist/features/upload/client/component/pending/index.js +13 -5
  139. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  140. package/dist/features/upload/client/drawer/index.js +18 -6
  141. package/dist/features/upload/client/drawer/index.js.map +1 -1
  142. package/dist/features/upload/client/nodes/UploadNode.js +12 -4
  143. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  144. package/dist/features/upload/client/plugin/index.js +7 -3
  145. package/dist/features/upload/client/plugin/index.js.map +1 -1
  146. package/dist/field/Diff/converters/listitem/index.js +36 -12
  147. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  148. package/dist/field/Diff/converters/listitem/index.scss +47 -0
  149. package/dist/field/Diff/converters/relationship/index.js +36 -12
  150. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  151. package/dist/field/Diff/converters/relationship/index.scss +73 -0
  152. package/dist/field/Diff/converters/unknown/index.js +30 -10
  153. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  154. package/dist/field/Diff/converters/unknown/index.scss +40 -0
  155. package/dist/field/Diff/converters/upload/index.js +59 -19
  156. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  157. package/dist/field/Diff/converters/upload/index.scss +115 -0
  158. package/dist/field/Diff/index.js +7 -3
  159. package/dist/field/Diff/index.js.map +1 -1
  160. package/dist/field/Diff/index.scss +102 -0
  161. package/dist/field/Field.js +79 -27
  162. package/dist/field/Field.js.map +1 -1
  163. package/dist/field/RenderLexical/index.js +36 -12
  164. package/dist/field/RenderLexical/index.js.map +1 -1
  165. package/dist/field/index.js +19 -7
  166. package/dist/field/index.js.map +1 -1
  167. package/dist/field/index.scss +41 -0
  168. package/dist/field/rscEntry.js +7 -3
  169. package/dist/field/rscEntry.js.map +1 -1
  170. package/dist/lexical/EditorPlugin.js +13 -5
  171. package/dist/lexical/EditorPlugin.js.map +1 -1
  172. package/dist/lexical/LexicalEditor.js +162 -50
  173. package/dist/lexical/LexicalEditor.js.map +1 -1
  174. package/dist/lexical/LexicalEditor.scss +54 -0
  175. package/dist/lexical/LexicalProvider.js +49 -17
  176. package/dist/lexical/LexicalProvider.js.map +1 -1
  177. package/dist/lexical/config/client/EditorConfigProvider.js +7 -3
  178. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  179. package/dist/lexical/plugins/DecoratorPlugin/index.scss +13 -0
  180. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +19 -7
  181. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  182. package/dist/lexical/plugins/InsertParagraphAtEnd/index.scss +54 -0
  183. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +7 -3
  184. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  185. package/dist/lexical/plugins/SlashMenu/index.js +48 -16
  186. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  187. package/dist/lexical/plugins/SlashMenu/index.scss +68 -0
  188. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +19 -7
  189. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  190. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +35 -0
  191. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +31 -11
  192. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  193. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.scss +80 -0
  194. package/dist/lexical/theme/EditorTheme.scss +357 -0
  195. package/dist/lexical/ui/ContentEditable.js +13 -5
  196. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  197. package/dist/lexical/ui/ContentEditable.scss +105 -0
  198. package/dist/lexical/ui/icons/AI/index.js +37 -13
  199. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  200. package/dist/lexical/ui/icons/Add/index.js +19 -7
  201. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  202. package/dist/lexical/ui/icons/AlignCenter/index.js +25 -9
  203. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  204. package/dist/lexical/ui/icons/AlignJustify/index.js +25 -9
  205. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  206. package/dist/lexical/ui/icons/AlignLeft/index.js +25 -9
  207. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  208. package/dist/lexical/ui/icons/AlignRight/index.js +25 -9
  209. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  210. package/dist/lexical/ui/icons/Block/index.js +25 -9
  211. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  212. package/dist/lexical/ui/icons/Blockquote/index.js +13 -5
  213. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  214. package/dist/lexical/ui/icons/Bold/index.js +13 -5
  215. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  216. package/dist/lexical/ui/icons/Checklist/index.js +19 -7
  217. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  218. package/dist/lexical/ui/icons/Code/index.js +19 -7
  219. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  220. package/dist/lexical/ui/icons/CodeBlock/index.js +13 -5
  221. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  222. package/dist/lexical/ui/icons/Collapse/index.js +13 -5
  223. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  224. package/dist/lexical/ui/icons/H1/index.js +13 -5
  225. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  226. package/dist/lexical/ui/icons/H2/index.js +13 -5
  227. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  228. package/dist/lexical/ui/icons/H3/index.js +13 -5
  229. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  230. package/dist/lexical/ui/icons/H4/index.js +13 -5
  231. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  232. package/dist/lexical/ui/icons/H5/index.js +13 -5
  233. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  234. package/dist/lexical/ui/icons/H6/index.js +13 -5
  235. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  236. package/dist/lexical/ui/icons/HorizontalRule/index.js +13 -5
  237. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  238. package/dist/lexical/ui/icons/IndentDecrease/index.js +31 -11
  239. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  240. package/dist/lexical/ui/icons/IndentIncrease/index.js +31 -11
  241. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  242. package/dist/lexical/ui/icons/InlineBlocks/index.js +13 -5
  243. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  244. package/dist/lexical/ui/icons/Italic/index.js +13 -5
  245. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  246. package/dist/lexical/ui/icons/Link/index.js +13 -5
  247. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  248. package/dist/lexical/ui/icons/Meatballs/index.js +25 -9
  249. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  250. package/dist/lexical/ui/icons/OrderedList/index.js +37 -13
  251. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  252. package/dist/lexical/ui/icons/Relationship/index.js +37 -13
  253. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  254. package/dist/lexical/ui/icons/Strikethrough/index.js +19 -7
  255. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  256. package/dist/lexical/ui/icons/Subscript/index.js +13 -5
  257. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  258. package/dist/lexical/ui/icons/Superscript/index.js +13 -5
  259. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  260. package/dist/lexical/ui/icons/Table/index.js +13 -5
  261. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  262. package/dist/lexical/ui/icons/Text/index.js +13 -5
  263. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  264. package/dist/lexical/ui/icons/TextState/index.js +7 -3
  265. package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
  266. package/dist/lexical/ui/icons/Underline/index.js +19 -7
  267. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  268. package/dist/lexical/ui/icons/UnorderedList/index.js +43 -15
  269. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  270. package/dist/lexical/ui/icons/Upload/index.js +25 -9
  271. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  272. package/dist/utilities/fieldsDrawer/Drawer.js +19 -7
  273. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  274. package/dist/utilities/fieldsDrawer/DrawerContent.js +19 -7
  275. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  276. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +7 -3
  277. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  278. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +7 -3
  279. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  280. package/package.json +9 -8
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
3
3
  import './index.scss';
4
4
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
5
5
  import { ChevronIcon, Combobox, CopyToClipboard, PopupList, RenderFields, useForm, useFormFields, useTranslation } from '@payloadcms/ui';
@@ -35,40 +35,60 @@ export const CodeBlockBlockComponent = (args)=>{
35
35
  const languageEntries = React.useMemo(()=>{
36
36
  return Object.entries(languages).map(([languageCode, languageLabel])=>({
37
37
  name: `${languageCode} ${languageLabel}`,
38
- Component: /*#__PURE__*/ _jsx(PopupList.Button, {
38
+ Component: /*#__PURE__*/ _jsxDEV(PopupList.Button, {
39
39
  active: false,
40
40
  disabled: false,
41
41
  onClick: ()=>{
42
42
  setSelectedLanguage(languageCode);
43
43
  },
44
- children: /*#__PURE__*/ _jsx("span", {
44
+ children: /*#__PURE__*/ _jsxDEV("span", {
45
45
  className: `${baseClass}__language-code`,
46
46
  "data-language": languageCode,
47
47
  children: languageLabel
48
- })
49
- })
48
+ }, void 0, false, {
49
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
50
+ lineNumber: 70,
51
+ columnNumber: 11
52
+ }, this)
53
+ }, void 0, false, {
54
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
55
+ lineNumber: 63,
56
+ columnNumber: 9
57
+ }, this)
50
58
  }));
51
59
  }, [
52
60
  languages,
53
61
  setSelectedLanguage
54
62
  ]);
55
- return /*#__PURE__*/ _jsx(BlockCollapsible, {
56
- Actions: /*#__PURE__*/ _jsxs("div", {
63
+ return /*#__PURE__*/ _jsxDEV(BlockCollapsible, {
64
+ Actions: /*#__PURE__*/ _jsxDEV("div", {
57
65
  className: `${baseClass}__actions`,
58
66
  children: [
59
- /*#__PURE__*/ _jsx(Combobox, {
60
- button: /*#__PURE__*/ _jsxs("div", {
67
+ /*#__PURE__*/ _jsxDEV(Combobox, {
68
+ button: /*#__PURE__*/ _jsxDEV("div", {
61
69
  className: `${baseClass}__language-selector-button`,
62
70
  "data-selected-language": selectedLanguageField?.value,
63
71
  children: [
64
- /*#__PURE__*/ _jsx("span", {
72
+ /*#__PURE__*/ _jsxDEV("span", {
65
73
  children: selectedLanguageLabel
66
- }),
67
- /*#__PURE__*/ _jsx(ChevronIcon, {
74
+ }, void 0, false, {
75
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
76
+ lineNumber: 88,
77
+ columnNumber: 17
78
+ }, void 0),
79
+ /*#__PURE__*/ _jsxDEV(ChevronIcon, {
68
80
  className: `${baseClass}__chevron`
69
- })
81
+ }, void 0, false, {
82
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
83
+ lineNumber: 89,
84
+ columnNumber: 17
85
+ }, void 0)
70
86
  ]
71
- }),
87
+ }, void 0, true, {
88
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
89
+ lineNumber: 84,
90
+ columnNumber: 15
91
+ }, void 0),
72
92
  buttonType: "custom",
73
93
  className: `${baseClass}__language-selector`,
74
94
  disabled: !isEditable,
@@ -78,25 +98,57 @@ export const CodeBlockBlockComponent = (args)=>{
78
98
  searchPlaceholder: t('fields:searchForLanguage'),
79
99
  showScrollbar: true,
80
100
  size: "large"
81
- }),
82
- /*#__PURE__*/ _jsx(CopyToClipboard, {
101
+ }, void 0, false, {
102
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
103
+ lineNumber: 82,
104
+ columnNumber: 11
105
+ }, void 0),
106
+ /*#__PURE__*/ _jsxDEV(CopyToClipboard, {
83
107
  value: codeField?.value ?? ''
84
- }),
85
- /*#__PURE__*/ _jsx(Collapse, {}),
86
- isEditable && /*#__PURE__*/ _jsx(RemoveButton, {})
108
+ }, void 0, false, {
109
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
110
+ lineNumber: 102,
111
+ columnNumber: 11
112
+ }, void 0),
113
+ /*#__PURE__*/ _jsxDEV(Collapse, {}, void 0, false, {
114
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
115
+ lineNumber: 104,
116
+ columnNumber: 11
117
+ }, void 0),
118
+ isEditable && /*#__PURE__*/ _jsxDEV(RemoveButton, {}, void 0, false, {
119
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
120
+ lineNumber: 106,
121
+ columnNumber: 26
122
+ }, void 0)
87
123
  ]
88
- }),
124
+ }, void 0, true, {
125
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
126
+ lineNumber: 81,
127
+ columnNumber: 9
128
+ }, void 0),
89
129
  className: baseClass,
90
130
  collapsibleProps: {
91
- AfterCollapsible: /*#__PURE__*/ _jsx(FloatingCollapse, {}),
131
+ AfterCollapsible: /*#__PURE__*/ _jsxDEV(FloatingCollapse, {}, void 0, false, {
132
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
133
+ lineNumber: 111,
134
+ columnNumber: 27
135
+ }, void 0),
92
136
  disableHeaderToggle: true,
93
137
  disableToggleIndicator: true
94
138
  },
95
- Pill: /*#__PURE__*/ _jsx("div", {
139
+ Pill: /*#__PURE__*/ _jsxDEV("div", {
96
140
  className: `${baseClass}__pill`,
97
- children: /*#__PURE__*/ _jsx(CodeBlockIcon, {})
98
- }),
99
- children: /*#__PURE__*/ _jsx(RenderFields, {
141
+ children: /*#__PURE__*/ _jsxDEV(CodeBlockIcon, {}, void 0, false, {
142
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
143
+ lineNumber: 117,
144
+ columnNumber: 11
145
+ }, void 0)
146
+ }, void 0, false, {
147
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
148
+ lineNumber: 116,
149
+ columnNumber: 9
150
+ }, void 0),
151
+ children: /*#__PURE__*/ _jsxDEV(RenderFields, {
100
152
  fields: formSchema,
101
153
  forceRender: true,
102
154
  parentIndexPath: "",
@@ -104,8 +156,16 @@ export const CodeBlockBlockComponent = (args)=>{
104
156
  parentSchemaPath: "",
105
157
  permissions: true,
106
158
  readOnly: !isEditable
107
- })
108
- });
159
+ }, void 0, false, {
160
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
161
+ lineNumber: 121,
162
+ columnNumber: 7
163
+ }, this)
164
+ }, void 0, false, {
165
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Block.tsx",
166
+ lineNumber: 79,
167
+ columnNumber: 5
168
+ }, this);
109
169
  };
110
170
 
111
171
  //# sourceMappingURL=Block.js.map
@@ -1 +1 @@
1
- {"version":3,"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=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </BlockCollapsible>\n )\n}\n"],"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","Button","active","disabled","onClick","span","className","data-language","Actions","div","button","data-selected-language","buttonType","horizontalAlign","minEntriesForSearch","searchPlaceholder","showScrollbar","size","collapsibleProps","AfterCollapsible","disableHeaderToggle","disableToggleIndicator","Pill","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOn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AM,CAAA;gBACvEC,MAAM,GAAGF,aAAa,CAAC,EAAEC,eAAe;gBACxCE,yBACE,KAACzC,UAAU0C,MAAM;oBACfC,QAAQ;oBACRC,UAAU;oBACVC,SAAS;wBACPpB,oBAAoBa;oBACtB;8BAEA,cAAA,KAACQ;wBAAKC,WAAW,GAAGpC,UAAU,eAAe,CAAC;wBAAEqC,iBAAeV;kCAC5DC;;;YAIT,CAAA;IACF,GAAG;QAACzB;QAAWW;KAAoB;IAEnC,qBACE,KAACT;QACCiC,uBACE,MAACC;YAAIH,WAAW,GAAGpC,UAAU,SAAS,CAAC;;8BACrC,KAACb;oBACCqD,sBACE,MAACD;wBACCH,WAAW,GAAGpC,UAAU,0BAA0B,CAAC;wBACnDyC,0BAAwB5B,uBAAuBM;;0CAE/C,KAACgB;0CAAMf;;0CACP,KAAClC;gCAAYkD,WAAW,GAAGpC,UAAU,SAAS,CAAC;;;;oBAGnD0C,YAAW;oBACXN,WAAW,GAAGpC,UAAU,mBAAmB,CAAC;oBAC5CiC,UAAU,CAACZ;oBACXI,SAASH;oBACTqB,iBAAgB;oBAChBC,qBAAqB;oBACrBC,mBAAmBpC,EAAE;oBACrBqC,aAAa;oBACbC,MAAK;;8BAEP,KAAC3D;oBAAgB+B,OAAO,AAACT,WAAWS,SAAoB;;8BAExD,KAACtB;gBAEAwB,4BAAc,KAACd;;;QAGpB6B,WAAWpC;QACXgD,kBAAkB;YAChBC,gCAAkB,KAAClD;YACnBmD,qBAAqB;YACrBC,wBAAwB;QAC1B;QACAC,oBACE,KAACb;YAAIH,WAAW,GAAGpC,UAAU,MAAM,CAAC;sBAClC,cAAA,KAACL;;kBAIL,cAAA,KAACL;YACCqB,QAAQL;YACR+C,aAAa;YACbC,iBAAgB;YAChBC,YAAY;YACZC,kBAAiB;YACjBC,aAAa;YACbC,UAAU,CAACrC;;;AAInB,EAAC"}
1
+ {"version":3,"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=\"\"\n parentPath={''}\n parentSchemaPath=\"\"\n permissions={true}\n readOnly={!isEditable}\n />\n </BlockCollapsible>\n )\n}\n"],"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","Button","active","disabled","onClick","span","className","data-language","Actions","div","button","data-selected-language","buttonType","horizontalAlign","minEntriesForSearch","searchPlaceholder","showScrollbar","size","collapsibleProps","AfterCollapsible","disableHeaderToggle","disableToggleIndicator","Pill","forceRender","parentIndexPath","parentPath","parentSchemaPath","permissions","readOnly"],"mappings":"AAAA;;AAIA,OAAO,eAAc;AAErB,SAASA,kBAAkB,QA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";
2
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
3
3
  import { CodeField, useFormFields } from '@payloadcms/ui';
4
4
  import React, { useId, useMemo } from 'react';
5
5
  import { defaultLanguages } from './defaultLanguages.js';
@@ -58,7 +58,7 @@ import { defaultLanguages } from './defaultLanguages.js';
58
58
  instanceId
59
59
  ]);
60
60
  const key = `${field.name}-${language}-${label}`;
61
- return props && /*#__PURE__*/ _jsx(CodeField, {
61
+ return props && /*#__PURE__*/ _jsxDEV(CodeField, {
62
62
  autoComplete: autoComplete,
63
63
  field: props,
64
64
  forceRender: forceRender,
@@ -116,7 +116,11 @@ import { defaultLanguages } from './defaultLanguages.js';
116
116
  renderedBlocks: renderedBlocks,
117
117
  schemaPath: schemaPath,
118
118
  validate: validate
119
- }, key);
119
+ }, key, false, {
120
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Code.tsx",
121
+ lineNumber: 110,
122
+ columnNumber: 7
123
+ }, this);
120
124
  };
121
125
 
122
126
  //# sourceMappingURL=Code.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Code.tsx"],"sourcesContent":["'use client'\n\nimport type { CodeFieldClient, CodeFieldClientProps } from 'payload'\n\nimport { CodeField, useFormFields } from '@payloadcms/ui'\nimport React, { useId, useMemo } from 'react'\n\nimport { defaultLanguages } from './defaultLanguages.js'\n\nexport type AdditionalCodeComponentProps = {\n /**\n * @default first key of the `languages` prop\n */\n defaultLanguage?: string\n /**\n * @default all languages supported by Monaco Editor\n */\n languages?: Record<string, string>\n /**\n * Override the name of the block.\n *\n * @default 'Code'\n */\n slug?: string\n /**\n * Configure typescript settings for the editor\n */\n typescript?: {\n /**\n * By default, the editor will not perform semantic validation. This means that\n * while syntax errors will be highlighted, other issues like missing imports or incorrect\n * types will not be.\n *\n * @default false\n */\n enableSemanticValidation?: boolean\n /**\n * Additional types to fetch and include in the editor for autocompletion.\n *\n * For example, to include types for payload, you would set this to\n *\n * [{ url: 'https://unpkg.com/payload@latest/dist/index.d.ts', filePath: 'file:///node_modules/payload/index.d.ts' }]\n */\n fetchTypes?: Array<{\n filePath: string\n url: string\n }>\n /**\n * @default undefined\n */\n paths?: Record<string, string[]>\n /**\n * @default \"ESNext\"\n */\n target?: string\n /**\n * @default ['node_modules/@types']\n */\n typeRoots?: string[]\n }\n}\n\nexport const CodeComponent: React.FC<AdditionalCodeComponentProps & CodeFieldClientProps> = ({\n autoComplete,\n field,\n forceRender,\n languages = defaultLanguages,\n path,\n permissions,\n readOnly,\n renderedBlocks,\n schemaPath,\n typescript,\n validate,\n}) => {\n const languageField = useFormFields(([fields]) => fields['language'])\n\n const language: string =\n (languageField?.value as string) || (languageField?.initialValue as string) || 'typescript'\n\n // unique id per component instance to ensure Monaco creates a distinct model\n // for each TypeScript code block. Using React's useId is SSR-safe and builtin.\n const instanceId = useId()\n\n const label = languages[language]\n\n const props: CodeFieldClient = useMemo<CodeFieldClient>(\n () => ({\n ...field,\n type: 'code',\n admin: {\n ...field.admin,\n editorOptions: {},\n editorProps: {\n // If typescript is set, @monaco-editor/react needs to set the URI to a .ts or .tsx file when it calls createModel().\n // Provide a unique defaultPath per instance so Monaco doesn't reuse the same model\n // across multiple code block instances. We use field.name + instanceId for debugability.\n defaultPath: language === 'ts' ? `file-${field.name}-${instanceId}.tsx` : undefined,\n },\n language,\n },\n }),\n [field, language, instanceId],\n )\n\n const key = `${field.name}-${language}-${label}`\n\n return (\n props && (\n <CodeField\n autoComplete={autoComplete}\n field={props}\n forceRender={forceRender}\n key={key}\n onMount={(_editor, monaco) => {\n monaco.editor.defineTheme('vs-dark', {\n base: 'vs-dark',\n colors: {\n 'editor.background': '#222222',\n },\n inherit: true,\n rules: [],\n })\n\n monaco.editor.defineTheme('vs', {\n base: 'vs',\n colors: {\n 'editor.background': '#f5f5f5',\n },\n inherit: true,\n rules: [],\n })\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n allowNonTsExtensions: true,\n // Set module resolution to NodeJs to enable autocompletion\n allowJs: true,\n allowSyntheticDefaultImports: true,\n esModuleInterop: true,\n jsx: monaco.languages.typescript.JsxEmit.React,\n moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,\n noEmit: true,\n paths: typescript?.paths,\n reactNamespace: 'React',\n target: monaco.languages.typescript.ScriptTarget[\n typescript?.target ?? ('ESNext' as any)\n ] as any,\n typeRoots: typescript?.typeRoots ?? ['node_modules/@types'],\n })\n\n monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({\n noSemanticValidation: typescript?.enableSemanticValidation ? false : true,\n noSyntaxValidation: false,\n })\n\n const run = async () => {\n if (\n typescript?.fetchTypes &&\n Array.isArray(typescript.fetchTypes) &&\n typescript.fetchTypes.length > 0\n ) {\n await Promise.all(\n typescript.fetchTypes.map(async (type) => {\n const types = await fetch(type.url)\n const typesText = await types.text()\n monaco.languages.typescript.typescriptDefaults.addExtraLib(\n typesText,\n type.filePath,\n )\n }),\n )\n }\n }\n void run()\n }}\n path={path}\n permissions={permissions}\n readOnly={readOnly}\n renderedBlocks={renderedBlocks}\n schemaPath={schemaPath}\n validate={validate}\n />\n )\n )\n}\n"],"names":["CodeField","useFormFields","React","useId","useMemo","defaultLanguages","CodeComponent","autoComplete","field","forceRender","languages","path","permissions","readOnly","renderedBlocks","schemaPath","typescript","validate","languageField","fields","language","value","initialValue","instanceId","label","props","type","admin","editorOptions","editorProps","defaultPath","name","undefined","key","onMount","_editor","monaco","editor","defineTheme","base","colors","inherit","rules","typescriptDefaults","setCompilerOptions","allowNonTsExtensions","allowJs","allowSyntheticDefaultImports","esModuleInterop","jsx","JsxEmit","moduleResolution","ModuleResolutionKind","NodeJs","noEmit","paths","reactNamespace","target","ScriptTarget","typeRoots","setDiagnosticsOptions","noSemanticValidation","enableSemanticValidation","noSyntaxValidation","run","fetchTypes","Array","isArray","length","Promise","all","map","types","fetch","url","typesText","text","addExtraLib","filePath"],"mappings":"AAAA;;AAIA,SAASA,SAAS,EAA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ACxDF,WACAjD,KAAKoD,QAAQ;oBAEjB;gBAEJ;YACF;YACA,KAAKd;QACP;QACArD,MAAMA;QACNC,aAAaA;QACbC,UAAUA;QACVC,gBAAgBA;QAChBC,YAAYA;QACZE,UAAUA;OAlELgB;AAsEb,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Code.tsx"],"sourcesContent":["'use client'\n\nimport type { CodeFieldClient, CodeFieldClientProps } from 'payload'\n\nimport { CodeField, useFormFields } from '@payloadcms/ui'\nimport React, { useId, useMemo } from 'react'\n\nimport { defaultLanguages } from './defaultLanguages.js'\n\nexport type AdditionalCodeComponentProps = {\n /**\n * @default first key of the `languages` prop\n */\n defaultLanguage?: string\n /**\n * @default all languages supported by Monaco Editor\n */\n languages?: Record<string, string>\n /**\n * Override the name of the block.\n *\n * @default 'Code'\n */\n slug?: string\n /**\n * Configure typescript settings for the editor\n */\n typescript?: {\n /**\n * By default, the editor will not perform semantic validation. This means that\n * while syntax errors will be highlighted, other issues like missing imports or incorrect\n * types will not be.\n *\n * @default false\n */\n enableSemanticValidation?: boolean\n /**\n * Additional types to fetch and include in the editor for autocompletion.\n *\n * For example, to include types for payload, you would set this to\n *\n * [{ url: 'https://unpkg.com/payload@latest/dist/index.d.ts', filePath: 'file:///node_modules/payload/index.d.ts' }]\n */\n fetchTypes?: Array<{\n filePath: string\n url: string\n }>\n /**\n * @default undefined\n */\n paths?: Record<string, string[]>\n /**\n * @default \"ESNext\"\n */\n target?: string\n /**\n * @default ['node_modules/@types']\n */\n typeRoots?: string[]\n }\n}\n\nexport const CodeComponent: React.FC<AdditionalCodeComponentProps & CodeFieldClientProps> = ({\n autoComplete,\n field,\n forceRender,\n languages = defaultLanguages,\n path,\n permissions,\n readOnly,\n renderedBlocks,\n schemaPath,\n typescript,\n validate,\n}) => {\n const languageField = useFormFields(([fields]) => fields['language'])\n\n const language: string =\n (languageField?.value as string) || (languageField?.initialValue as string) || 'typescript'\n\n // unique id per component instance to ensure Monaco creates a distinct model\n // for each TypeScript code block. Using React's useId is SSR-safe and builtin.\n const instanceId = useId()\n\n const label = languages[language]\n\n const props: CodeFieldClient = useMemo<CodeFieldClient>(\n () => ({\n ...field,\n type: 'code',\n admin: {\n ...field.admin,\n editorOptions: {},\n editorProps: {\n // If typescript is set, @monaco-editor/react needs to set the URI to a .ts or .tsx file when it calls createModel().\n // Provide a unique defaultPath per instance so Monaco doesn't reuse the same model\n // across multiple code block instances. We use field.name + instanceId for debugability.\n defaultPath: language === 'ts' ? `file-${field.name}-${instanceId}.tsx` : undefined,\n },\n language,\n },\n }),\n [field, language, instanceId],\n )\n\n const key = `${field.name}-${language}-${label}`\n\n return (\n props && (\n <CodeField\n autoComplete={autoComplete}\n field={props}\n forceRender={forceRender}\n key={key}\n onMount={(_editor, monaco) => {\n monaco.editor.defineTheme('vs-dark', {\n base: 'vs-dark',\n colors: {\n 'editor.background': '#222222',\n },\n inherit: true,\n rules: [],\n })\n\n monaco.editor.defineTheme('vs', {\n base: 'vs',\n colors: {\n 'editor.background': '#f5f5f5',\n },\n inherit: true,\n rules: [],\n })\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n allowNonTsExtensions: true,\n // Set module resolution to NodeJs to enable autocompletion\n allowJs: true,\n allowSyntheticDefaultImports: true,\n esModuleInterop: true,\n jsx: monaco.languages.typescript.JsxEmit.React,\n moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,\n noEmit: true,\n paths: typescript?.paths,\n reactNamespace: 'React',\n target: monaco.languages.typescript.ScriptTarget[\n typescript?.target ?? ('ESNext' as any)\n ] as any,\n typeRoots: typescript?.typeRoots ?? ['node_modules/@types'],\n })\n\n monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({\n noSemanticValidation: typescript?.enableSemanticValidation ? false : true,\n noSyntaxValidation: false,\n })\n\n const run = async () => {\n if (\n typescript?.fetchTypes &&\n Array.isArray(typescript.fetchTypes) &&\n typescript.fetchTypes.length > 0\n ) {\n await Promise.all(\n typescript.fetchTypes.map(async (type) => {\n const types = await fetch(type.url)\n const typesText = await types.text()\n monaco.languages.typescript.typescriptDefaults.addExtraLib(\n typesText,\n type.filePath,\n )\n }),\n )\n }\n }\n void run()\n }}\n path={path}\n permissions={permissions}\n readOnly={readOnly}\n renderedBlocks={renderedBlocks}\n schemaPath={schemaPath}\n validate={validate}\n />\n )\n )\n}\n"],"names":["CodeField","useFormFields","React","useId","useMemo","defaultLanguages","CodeComponent","autoComplete","field","forceRender","languages","path","permissions","readOnly","renderedBlocks","schemaPath","typescript","validate","languageField","fields","language","value","initialValue","instanceId","label","props","type","admin","editorOptions","editorProps","defaultPath","name","undefined","key","onMount","_editor","monaco","editor","defineTheme","base","colors","inherit","rules","typescriptDefaults","setCompilerOptions","allowNonTsExtensions","allowJs","allowSyntheticDefaultImports","esModuleInterop","jsx","JsxEmit","moduleResolution","ModuleResolutionKind","NodeJs","noEmit","paths","reactNamespace","target","ScriptTarget","typeRoots","setDiagnosticsOptions","noSemanticValidation","enableSemanticValidation","noSyntaxValidation","run","fetchTypes","Array","isArray","length","Promise","all","map","types","fetch","url","typesText","text","addExtraLib","filePath"],"mappings":"AAAA;;AAIA,SAASA,SAAS,EAAEC,aAAa,QAAQ,iBAAgB;AACzD,OAAOC,SAASC,KAAK,EAAEC,OAAO,QAAQ,QAAO;AAE7C,SAASC,gBAAgB,QAAQ,wBAAuB;AAGtD;;GAEC,GAED;;GAEC,GAED;;;;GAIC,GAED;;GAEC,GAEC;;;;;;KAMC,GAED;;;;;;KAMC,GAKD;;KAEC,GAED;;KAEC,GAED;;KAEC,GAKL,OAAO,MAAMC,gBAA+E,CAAC,EAC3FC,YAAY,EACZC,KAAK,EACLC,WAAW,EACXC,YAAYL,gBAAgB,EAC5BM,IAAI,EACJC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,UAAU,EACVC,UAAU,EACVC,QAAQ,EACT;IACC,MAAMC,gBAAgBjB,cAAc,CAAC,CAACkB,OAAO,G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AAO1B,SAAS,CAACM,UAAU,CAACoC,oBAAoB,CAACC,MAAM;gBACzEC,QAAQ;gBACRC,OAAOvC,YAAYuC;gBACnBC,gBAAgB;gBAChBC,QAAQrB,OAAO1B,SAAS,CAACM,UAAU,CAAC0C,YAAY,CAC9C1C,YAAYyC,UAAW,SACxB;gBACDE,WAAW3C,YAAY2C,aAAa;oBAAC;iBAAsB;YAC7D;YAEAvB,OAAO1B,SAAS,CAACM,UAAU,CAAC2B,kBAAkB,CAACiB,qBAAqB,CAAC;gBACnEC,sBAAsB7C,YAAY8C,2BAA2B,QAAQ;gBACrEC,oBAAoB;YACtB;YAEA,MAAMC,MAAM;gBACV,IACEhD,YAAYiD,cACZC,MAAMC,OAAO,CAACnD,WAAWiD,UAAU,KACnCjD,WAAWiD,UAAU,CAACG,MAAM,GAAG,GAC/B;oBACA,MAAMC,QAAQC,GAAG,CACftD,WAAWiD,UAAU,CAACM,GAAG,CAAC,OAAO7C;wBAC/B,MAAM8C,QAAQ,MAAMC,MAAM/C,KAAKgD,GAAG;wBAClC,MAAMC,YAAY,MAAMH,MAAMI,IAAI;wBAClCxC,OAAO1B,SAAS,CAACM,UAAU,CAAC2B,kBAAkB,CAACkC,WAAW,CACxDF,WACAjD,KAAKoD,QAAQ;oBAEjB;gBAEJ;YACF;YACA,KAAKd;QACP;QACArD,MAAMA;QACNC,aAAaA;QACbC,UAAUA;QACVC,gBAAgBA;QAChBC,YAAYA;QACZE,UAAUA;OAlELgB;;;;;AAsEb,EAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
2
2
  import React from 'react';
3
3
  import './index.scss';
4
4
  const baseClass = 'code-block-collapse-button';
@@ -6,12 +6,20 @@ import { useCollapsible } from '@payloadcms/ui';
6
6
  import { CollapseIcon } from '../../../../../../lexical/ui/icons/Collapse/index.js';
7
7
  export const Collapse = ()=>{
8
8
  const { toggle } = useCollapsible();
9
- return /*#__PURE__*/ _jsx("button", {
9
+ return /*#__PURE__*/ _jsxDEV("button", {
10
10
  className: baseClass,
11
11
  onClick: toggle,
12
12
  type: "button",
13
- children: /*#__PURE__*/ _jsx(CollapseIcon, {})
14
- });
13
+ children: /*#__PURE__*/ _jsxDEV(CollapseIcon, {}, void 0, false, {
14
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Collapse/index.tsx",
15
+ lineNumber: 14,
16
+ columnNumber: 7
17
+ }, this)
18
+ }, void 0, false, {
19
+ fileName: "src/features/blocks/premade/CodeBlock/Component/Collapse/index.tsx",
20
+ lineNumber: 13,
21
+ columnNumber: 5
22
+ }, this);
15
23
  };
16
24
 
17
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"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"],"names":["React","baseClass","useCollapsible","CollapseIcon","Collapse","toggle","button","className","onClick","type"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,MAAMC,YAAY;AAClB,SAASC,cAAc,QAAQ,iBAAgB;AAE/C,SAASC,YAAY,QAAQ,uDAAsD;AAEnF,OAAO,MAAMC,WAAqB;IAChC,MAAM,EAAEC,MAAM,EAAE,GAAGH;IACnB,qBACE,KAACI;QAAOC,WAAWN;QAAWO,SAASH;QAAQI,MAAK;kBAClD,cAAA,KAACN;;AAGP,EAAC"}
1
+ {"version":3,"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"],"names":["React","baseClass","useCollapsible","CollapseIcon","Collapse","toggle","button","className","onClick","type"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,MAAMC,YAAY;AAClB,SAASC,cAAc,QAAQ,iBAAgB;AAE/C,SAASC,YAAY,QAAQ,uDAAsD;AAEnF,OAAO,MAAMC,WAAqB;IAChC,MAAM,EAAEC,MAAM,EAAE,GAAGH;IACnB,qBACE,QAACI;QAAOC,WAAWN;QAAWO,SAASH;QAAQI,MAAK;kBAClD,cAAA,QAACN;;;;;;;;;;AAGP,EAAC"}
@@ -0,0 +1,6 @@
1
+ @import '~@payloadcms/ui/scss';
2
+
3
+ .code-block-collapse-button {
4
+ all: unset;
5
+ cursor: pointer;
6
+ }
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
2
2
  import React from 'react';
3
3
  import './index.scss';
4
4
  const baseClass = 'code-block-floating-collapse-button';
@@ -10,17 +10,29 @@ export const FloatingCollapse = ()=>{
10
10
  if (!isCollapsed) {
11
11
  return null;
12
12
  }
13
- return /*#__PURE__*/ _jsxs("button", {
13
+ return /*#__PURE__*/ _jsxDEV("button", {
14
14
  className: baseClass,
15
15
  onClick: toggle,
16
16
  type: "button",
17
17
  children: [
18
- /*#__PURE__*/ _jsx("span", {
18
+ /*#__PURE__*/ _jsxDEV("span", {
19
19
  children: t('general:collapse')
20
- }),
21
- /*#__PURE__*/ _jsx(CollapseIcon, {})
20
+ }, void 0, false, {
21
+ fileName: "src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx",
22
+ lineNumber: 20,
23
+ columnNumber: 7
24
+ }, this),
25
+ /*#__PURE__*/ _jsxDEV(CollapseIcon, {}, void 0, false, {
26
+ fileName: "src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx",
27
+ lineNumber: 21,
28
+ columnNumber: 7
29
+ }, this)
22
30
  ]
23
- });
31
+ }, void 0, true, {
32
+ fileName: "src/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.tsx",
33
+ lineNumber: 19,
34
+ columnNumber: 5
35
+ }, this);
24
36
  };
25
37
 
26
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"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"],"names":["React","baseClass","useCollapsible","useTranslation","CollapseIcon","FloatingCollapse","isCollapsed","toggle","t","button","className","onClick","type","span"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,MAAMC,YAAY;AAClB,SAASC,cAAc,EAAEC,cAAc,QAAQ,iBAAgB;AAE/D,SAASC,YAAY,QAAQ,uDAAsD;AAEnF,OAAO,MAAMC,mBAA6B;IACxC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAE,GAAGL;IAChC,MAAM,EAAEM,CAAC,EAAE,GAAGL;IAEd,IAAI,CAACG,aAAa;QAChB,OAAO;IACT;IAEA,qBACE,MAACG;QAAOC,WAAWT;QAAWU,SAASJ;QAAQK,MAAK;;0BAClD,KAACC;0BAAML,EAAE;;0BACT,KAACJ;;;AAGP,EAAC"}
1
+ {"version":3,"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"],"names":["React","baseClass","useCollapsible","useTranslation","CollapseIcon","FloatingCollapse","isCollapsed","toggle","t","button","className","onClick","type","span"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,MAAMC,YAAY;AAClB,SAASC,cAAc,EAAEC,cAAc,QAAQ,iBAAgB;AAE/D,SAASC,YAAY,QAAQ,uDAAsD;AAEnF,OAAO,MAAMC,mBAA6B;IACxC,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAE,GAAGL;IAChC,MAAM,EAAEM,CAAC,EAAE,GAAGL;IAEd,IAAI,CAACG,aAAa;QAChB,OAAO;IACT;IAEA,qBACE,QAACG;QAAOC,WAAWT;QAAWU,SAASJ;QAAQK,MAAK;;0BAClD,QAACC;0BAAML,EAAE;;;;;;0BACT,QAACJ;;;;;;;;;;;AAGP,EAAC"}
@@ -0,0 +1,29 @@
1
+ @import '~@payloadcms/ui/scss';
2
+
3
+ .code-block-floating-collapse-button {
4
+ all: unset;
5
+ cursor: pointer;
6
+
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ box-sizing: border-box;
11
+ gap: base(0.5);
12
+
13
+ position: absolute;
14
+ left: 50%;
15
+ transform: translateX(-50%);
16
+ height: 24px;
17
+ bottom: -12px;
18
+
19
+ padding: base(0.2) base(0.4);
20
+ border-radius: $style-radius-s;
21
+
22
+ background: var(--theme-elevation-150);
23
+ color: var(--theme-elevation-600);
24
+
25
+ &:hover {
26
+ background: var(--theme-elevation-200);
27
+ color: var(--theme-elevation-800);
28
+ }
29
+ }
@@ -0,0 +1,97 @@
1
+ @import '~@payloadcms/ui/scss';
2
+
3
+ .payload-richtext-code-block.collapsible--collapsed {
4
+ .rah-static {
5
+ height: unset !important;
6
+ max-height: 150px !important;
7
+ position: relative;
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(--theme-elevation-50) 90%,
16
+ var(--theme-elevation-50) 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
+ &__pill {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ margin-right: base(0.4);
37
+ margin-left: base(0.4);
38
+ color: var(--theme-elevation-500);
39
+ }
40
+
41
+ .collapsible__header-wrap {
42
+ overflow: visible;
43
+ }
44
+ .collapsible__content {
45
+ padding: 0;
46
+ }
47
+
48
+ .LexicalEditorTheme__block {
49
+ &__block-header {
50
+ overflow: visible;
51
+ }
52
+ }
53
+
54
+ .code-editor,
55
+ .monaco-editor,
56
+ .overflow-guard {
57
+ border-width: 0;
58
+ border-radius: 0 0 $style-radius-s $style-radius-s;
59
+ }
60
+
61
+ &__actions {
62
+ display: flex;
63
+ flex-direction: row;
64
+ gap: calc(var(--base) * 0.4);
65
+ }
66
+
67
+ .popup-button {
68
+ padding: 0 0 0 calc(var(--base) * 0.2);
69
+ }
70
+
71
+ .copy-to-clipboard,
72
+ .code-block-collapse-button,
73
+ .popup-button {
74
+ border-radius: $style-radius-s;
75
+ color: var(--theme-elevation-500);
76
+ min-width: 24px;
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+
81
+ &:hover {
82
+ color: var(--theme-elevation-800);
83
+ background-color: var(--theme-elevation-200);
84
+ }
85
+ }
86
+
87
+ &__language-selector {
88
+ pointer-events: all;
89
+
90
+ &-button {
91
+ display: flex;
92
+ flex-direction: row;
93
+ width: max-content;
94
+ align-items: center;
95
+ }
96
+ }
97
+ }
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsxDEV as _jsxDEV, Fragment as _Fragment } from "react/jsx-dev-runtime";
2
2
  import React from 'react';
3
3
  import { defaultJSXConverters } from '../converter/defaultConverters.js';
4
4
  import { convertLexicalToJSX } from '../converter/index.js';
@@ -37,14 +37,18 @@ import { convertLexicalToJSX } from '../converter/index.js';
37
37
  disableTextAlign
38
38
  });
39
39
  if (disableContainer) {
40
- return /*#__PURE__*/ _jsx(_Fragment, {
40
+ return /*#__PURE__*/ _jsxDEV(_Fragment, {
41
41
  children: content
42
- });
42
+ }, void 0, false);
43
43
  }
44
- return /*#__PURE__*/ _jsx("div", {
44
+ return /*#__PURE__*/ _jsxDEV("div", {
45
45
  className: className ?? 'payload-richtext',
46
46
  children: content
47
- });
47
+ }, void 0, false, {
48
+ fileName: "src/features/converters/lexicalToJSX/Component/index.tsx",
49
+ lineNumber: 88,
50
+ columnNumber: 10
51
+ }, this);
48
52
  };
49
53
 
50
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/converters/lexicalToJSX/Component/index.tsx"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport React from 'react'\n\nimport type {\n DefaultNodeTypes,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from '../../../../nodeTypes.js'\nimport type { JSXConverters } from '../converter/types.js'\n\nimport { defaultJSXConverters } from '../converter/defaultConverters.js'\nimport { convertLexicalToJSX } from '../converter/index.js'\n\nexport type JSXConvertersFunction<\n T extends { [key: string]: any; type?: string } =\n | DefaultNodeTypes\n | SerializedBlockNode<{ blockName?: null | string }>\n | SerializedInlineBlockNode<{ blockName?: null | string }>,\n> = (args: { defaultConverters: JSXConverters<DefaultNodeTypes> }) => JSXConverters<T>\n\ntype RichTextProps = {\n /**\n * Override class names for the container.\n */\n className?: string\n /**\n * Custom converters to transform your nodes to JSX. Can be an object or a function that receives the default converters.\n */\n converters?: JSXConverters | JSXConvertersFunction\n /**\n * Serialized editor state to render.\n */\n data: SerializedEditorState\n /**\n * If true, removes the container div wrapper.\n */\n disableContainer?: boolean\n /**\n * If true, disables indentation globally. If an array, disables for specific node `type` values.\n */\n disableIndent?: boolean | string[]\n /**\n * If true, disables text alignment globally. If an array, disables for specific node `type` values.\n */\n disableTextAlign?: boolean | string[]\n}\n\nexport const RichText: React.FC<RichTextProps> = ({\n className,\n converters,\n data: editorState,\n disableContainer,\n disableIndent,\n disableTextAlign,\n}) => {\n if (!editorState) {\n return null\n }\n\n let finalConverters: JSXConverters = {}\n if (converters) {\n if (typeof converters === 'function') {\n finalConverters = converters({ defaultConverters: defaultJSXConverters })\n } else {\n finalConverters = converters\n }\n } else {\n finalConverters = defaultJSXConverters\n }\n\n const content =\n editorState &&\n !Array.isArray(editorState) &&\n typeof editorState === 'object' &&\n 'root' in editorState &&\n convertLexicalToJSX({\n converters: finalConverters,\n data: editorState,\n disableIndent,\n disableTextAlign,\n })\n\n if (disableContainer) {\n return <>{content}</>\n }\n\n return <div className={className ?? 'payload-richtext'}>{content}</div>\n}\n"],"names":["React","defaultJSXConverters","convertLexicalToJSX","RichText","className","converters","data","editorState","disableContainer","disableIndent","disableTextAlign","finalConverters","defaultConverters","content","Array","isArray","div"],"mappings":";AAEA,OAAOA,WAAW,QAAO;AASzB,SAASC,oBAAoB,QAAQ,oCAAmC;AACxE,SAASC,mBAAmB,QAAQ,wBAAuB;AAUzD;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAIH,OAAO,MAAMC,WAAoC,CAAC,EAChDC,SAAS,EACTC,UAAU,EACVC,MAAMC,WAAW,EACjBC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,EACjB;IACC,IAAI,CAACH,aAAa;QAChB,OAAO;IACT;IAEA,IAAII,kBAAiC,CAAC;IACtC,IAAIN,YAAY;QACd,IAAI,OAAOA,eAAe,YAAY;YACpCM,kBAAkBN,WAAW;gBAAEO,mBAAmBX;YAAqB;QACzE,OAAO;YACLU,kBAAkBN;QACpB;IACF,OAAO;QACLM,kBAAkBV;IACpB;IAEA,MAAMY,UACJN,eACA,CAACO,MAAMC,OAAO,CAACR,gBACf,OAAOA,gBAAgB,YACvB,UAAUA,eACVL,oBAAoB;QAClBG,YAAYM;QACZL,MAAMC;QACNE;QACAC;IACF;IAEF,IAAIF,kBAAkB;QACpB,qBAAO;sBAAGK;;IACZ;IAEA,qBAAO,KAACG;QAAIZ,WAAWA,aAAa;kBAAqBS;;AAC3D,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/features/converters/lexicalToJSX/Component/index.tsx"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport React from 'react'\n\nimport type {\n DefaultNodeTypes,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from '../../../../nodeTypes.js'\nimport type { JSXConverters } from '../converter/types.js'\n\nimport { defaultJSXConverters } from '../converter/defaultConverters.js'\nimport { convertLexicalToJSX } from '../converter/index.js'\n\nexport type JSXConvertersFunction<\n T extends { [key: string]: any; type?: string } =\n | DefaultNodeTypes\n | SerializedBlockNode<{ blockName?: null | string }>\n | SerializedInlineBlockNode<{ blockName?: null | string }>,\n> = (args: { defaultConverters: JSXConverters<DefaultNodeTypes> }) => JSXConverters<T>\n\ntype RichTextProps = {\n /**\n * Override class names for the container.\n */\n className?: string\n /**\n * Custom converters to transform your nodes to JSX. Can be an object or a function that receives the default converters.\n */\n converters?: JSXConverters | JSXConvertersFunction\n /**\n * Serialized editor state to render.\n */\n data: SerializedEditorState\n /**\n * If true, removes the container div wrapper.\n */\n disableContainer?: boolean\n /**\n * If true, disables indentation globally. If an array, disables for specific node `type` values.\n */\n disableIndent?: boolean | string[]\n /**\n * If true, disables text alignment globally. If an array, disables for specific node `type` values.\n */\n disableTextAlign?: boolean | string[]\n}\n\nexport const RichText: React.FC<RichTextProps> = ({\n className,\n converters,\n data: editorState,\n disableContainer,\n disableIndent,\n disableTextAlign,\n}) => {\n if (!editorState) {\n return null\n }\n\n let finalConverters: JSXConverters = {}\n if (converters) {\n if (typeof converters === 'function') {\n finalConverters = converters({ defaultConverters: defaultJSXConverters })\n } else {\n finalConverters = converters\n }\n } else {\n finalConverters = defaultJSXConverters\n }\n\n const content =\n editorState &&\n !Array.isArray(editorState) &&\n typeof editorState === 'object' &&\n 'root' in editorState &&\n convertLexicalToJSX({\n converters: finalConverters,\n data: editorState,\n disableIndent,\n disableTextAlign,\n })\n\n if (disableContainer) {\n return <>{content}</>\n }\n\n return <div className={className ?? 'payload-richtext'}>{content}</div>\n}\n"],"names":["React","defaultJSXConverters","convertLexicalToJSX","RichText","className","converters","data","editorState","disableContainer","disableIndent","disableTextAlign","finalConverters","defaultConverters","content","Array","isArray","div"],"mappings":";AAEA,OAAOA,WAAW,QAAO;AASzB,SAASC,oBAAoB,QAAQ,oCAAmC;AACxE,SAASC,mBAAmB,QAAQ,wBAAuB;AAUzD;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAIH,OAAO,MAAMC,WAAoC,CAAC,EAChDC,SAAS,EACTC,UAAU,EACVC,MAAMC,WAAW,EACjBC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,EACjB;IACC,IAAI,CAACH,aAAa;QAChB,OAAO;IACT;IAEA,IAAII,kBAAiC,CAAC;IACtC,IAAIN,YAAY;QACd,IAAI,OAAOA,eAAe,YAAY;YACpCM,kBAAkBN,WAAW;gBAAEO,mBAAmBX;YAAqB;QACzE,OAAO;YACLU,kBAAkBN;QACpB;IACF,OAAO;QACLM,kBAAkBV;IACpB;IAEA,MAAMY,UACJN,eACA,CAACO,MAAMC,OAAO,CAACR,gBACf,OAAOA,gBAAgB,YACvB,UAAUA,eACVL,oBAAoB;QAClBG,YAAYM;QACZL,MAAMC;QACNE;QACAC;IACF;IAEF,IAAIF,kBAAkB;QACpB,qBAAO;sBAAGK;;IACZ;IAEA,qBAAO,QAACG;QAAIZ,WAAWA,aAAa;kBAAqBS;;;;;;AAC3D,EAAC"}
@@ -1,12 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
2
2
  export const BlockquoteJSXConverter = {
3
3
  quote: ({ node, nodesToJSX })=>{
4
4
  const children = nodesToJSX({
5
5
  nodes: node.children
6
6
  });
7
- return /*#__PURE__*/ _jsx("blockquote", {
7
+ return /*#__PURE__*/ _jsxDEV("blockquote", {
8
8
  children: children
9
- });
9
+ }, void 0, false, {
10
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/blockquote.tsx",
11
+ lineNumber: 10,
12
+ columnNumber: 12
13
+ }, this);
10
14
  }
11
15
  };
12
16
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/blockquote.tsx"],"sourcesContent":["import type { SerializedQuoteNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const BlockquoteJSXConverter: JSXConverters<SerializedQuoteNode> = {\n quote: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n return <blockquote>{children}</blockquote>\n },\n}\n"],"names":["BlockquoteJSXConverter","quote","node","nodesToJSX","children","nodes","blockquote"],"mappings":";AAGA,OAAO,MAAMA,yBAA6D;IACxEC,OAAO,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC1B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,qBAAO,KAACE;sBAAYF;;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/blockquote.tsx"],"sourcesContent":["import type { SerializedQuoteNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const BlockquoteJSXConverter: JSXConverters<SerializedQuoteNode> = {\n quote: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n return <blockquote>{children}</blockquote>\n },\n}\n"],"names":["BlockquoteJSXConverter","quote","node","nodesToJSX","children","nodes","blockquote"],"mappings":";AAGA,OAAO,MAAMA,yBAA6D;IACxEC,OAAO,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC1B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,qBAAO,QAACE;sBAAYF;;;;;;IACtB;AACF,EAAC"}
@@ -1,13 +1,17 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
2
2
  export const HeadingJSXConverter = {
3
3
  heading: ({ node, nodesToJSX })=>{
4
4
  const children = nodesToJSX({
5
5
  nodes: node.children
6
6
  });
7
7
  const NodeTag = node.tag;
8
- return /*#__PURE__*/ _jsx(NodeTag, {
8
+ return /*#__PURE__*/ _jsxDEV(NodeTag, {
9
9
  children: children
10
- });
10
+ }, void 0, false, {
11
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/heading.tsx",
12
+ lineNumber: 12,
13
+ columnNumber: 12
14
+ }, this);
11
15
  }
12
16
  };
13
17
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const HeadingJSXConverter: JSXConverters<SerializedHeadingNode> = {\n heading: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag>{children}</NodeTag>\n },\n}\n"],"names":["HeadingJSXConverter","heading","node","nodesToJSX","children","nodes","NodeTag","tag"],"mappings":";AAGA,OAAO,MAAMA,sBAA4D;IACvEC,SAAS,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC5B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAME,UAAUJ,KAAKK,GAAG;QAExB,qBAAO,KAACD;sBAASF;;IACnB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const HeadingJSXConverter: JSXConverters<SerializedHeadingNode> = {\n heading: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag>{children}</NodeTag>\n },\n}\n"],"names":["HeadingJSXConverter","heading","node","nodesToJSX","children","nodes","NodeTag","tag"],"mappings":";AAGA,OAAO,MAAMA,sBAA4D;IACvEC,SAAS,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC5B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAME,UAAUJ,KAAKK,GAAG;QAExB,qBAAO,QAACD;sBAASF;;;;;;IACnB;AACF,EAAC"}