@intlayer/design-system 3.5.4 → 3.5.6

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 (486) hide show
  1. package/dist/.vite/manifest.json +351 -60
  2. package/dist/CodeBlockShiki-BlmZyrr7.cjs +29 -0
  3. package/dist/CodeBlockShiki-BlmZyrr7.cjs.map +1 -0
  4. package/dist/CodeBlockShiki-CcpV9SVi.js +29 -0
  5. package/dist/CodeBlockShiki-CcpV9SVi.js.map +1 -0
  6. package/dist/CopyButton-Cxu3goRg.cjs +59 -0
  7. package/dist/CopyButton-Cxu3goRg.cjs.map +1 -0
  8. package/dist/CopyButton-DlcDlf6U.js +60 -0
  9. package/dist/CopyButton-DlcDlf6U.js.map +1 -0
  10. package/dist/Form-BB0kpER9.cjs +301 -0
  11. package/dist/Form-BB0kpER9.cjs.map +1 -0
  12. package/dist/Form-BDcoNTLV.cjs.map +1 -1
  13. package/dist/Form-DGLgTAdY.js +302 -0
  14. package/dist/Form-DGLgTAdY.js.map +1 -0
  15. package/dist/Form-DhsgC7kB.js.map +1 -1
  16. package/dist/components/Auth/useAuth/useSession.cjs +1 -0
  17. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  18. package/dist/components/Auth/useAuth/useSession.mjs +1 -0
  19. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  20. package/dist/components/Breadcrumb/breadcrumb.content.cjs +26 -0
  21. package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -0
  22. package/dist/components/Breadcrumb/breadcrumb.content.d.ts +8 -0
  23. package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -0
  24. package/dist/components/Breadcrumb/breadcrumb.content.mjs +26 -0
  25. package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -0
  26. package/dist/components/Breadcrumb/index.cjs +106 -34
  27. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  28. package/dist/components/Breadcrumb/index.d.ts +6 -2
  29. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  30. package/dist/components/Breadcrumb/index.mjs +106 -34
  31. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  32. package/dist/components/Button/Button.cjs +7 -8
  33. package/dist/components/Button/Button.cjs.map +1 -1
  34. package/dist/components/Button/Button.d.ts.map +1 -1
  35. package/dist/components/Button/Button.mjs +7 -8
  36. package/dist/components/Button/Button.mjs.map +1 -1
  37. package/dist/components/ClickOutsideDiv/index.cjs +26 -0
  38. package/dist/components/ClickOutsideDiv/index.cjs.map +1 -0
  39. package/dist/components/ClickOutsideDiv/index.d.ts +6 -0
  40. package/dist/components/ClickOutsideDiv/index.d.ts.map +1 -0
  41. package/dist/components/ClickOutsideDiv/index.mjs +26 -0
  42. package/dist/components/ClickOutsideDiv/index.mjs.map +1 -0
  43. package/dist/components/Container/index.cjs +2 -2
  44. package/dist/components/Container/index.cjs.map +1 -1
  45. package/dist/components/Container/index.mjs +2 -2
  46. package/dist/components/Container/index.mjs.map +1 -1
  47. package/dist/components/ContentEditor/ContentEditorCode.cjs +78 -0
  48. package/dist/components/ContentEditor/ContentEditorCode.cjs.map +1 -0
  49. package/dist/components/ContentEditor/ContentEditorCode.d.ts +11 -0
  50. package/dist/components/ContentEditor/ContentEditorCode.d.ts.map +1 -0
  51. package/dist/components/ContentEditor/ContentEditorCode.mjs +78 -0
  52. package/dist/components/ContentEditor/ContentEditorCode.mjs.map +1 -0
  53. package/dist/components/ContentEditor/ContentEditorTextArea.cjs +30 -26
  54. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  55. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts +2 -1
  56. package/dist/components/ContentEditor/ContentEditorTextArea.d.ts.map +1 -1
  57. package/dist/components/ContentEditor/ContentEditorTextArea.mjs +30 -26
  58. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  59. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +3 -3
  60. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  61. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +3 -3
  62. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  63. package/dist/components/DictionaryEditor/index.cjs +4 -0
  64. package/dist/components/DictionaryEditor/index.cjs.map +1 -1
  65. package/dist/components/DictionaryEditor/index.mjs +4 -0
  66. package/dist/components/DictionaryEditor/index.mjs.map +1 -1
  67. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +3 -0
  68. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  69. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +2 -2
  70. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
  71. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +3 -0
  72. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  73. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
  74. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +1 -1
  75. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +1 -1
  76. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
  77. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +9 -5
  78. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  79. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +3 -0
  80. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  81. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +9 -5
  82. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  83. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +161 -69
  84. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  85. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  86. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +163 -71
  87. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  88. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +123 -0
  89. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  90. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +14 -0
  91. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  92. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +123 -0
  93. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  94. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +9 -2
  95. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +15 -0
  97. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +1 -0
  99. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +15 -0
  101. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +6 -0
  103. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +9 -2
  105. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  106. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +17 -6
  107. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  108. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +3 -0
  109. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  110. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +17 -6
  111. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  112. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs +7 -5
  113. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.cjs.map +1 -1
  114. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts +2 -0
  115. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.d.ts.map +1 -1
  116. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +7 -5
  117. package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs.map +1 -1
  118. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +117 -55
  119. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  120. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts +4 -2
  121. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.d.ts.map +1 -1
  122. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +115 -53
  123. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  124. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +20 -18
  125. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  126. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +1 -0
  127. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  128. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +20 -18
  129. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  130. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +10 -2
  131. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  132. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +2 -0
  133. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts.map +1 -1
  134. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +10 -2
  135. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  136. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts +8 -0
  137. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelector.d.ts.map +1 -0
  138. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts +13 -0
  139. package/dist/components/DictionaryFieldEditor/LocaleSelector/LocaleSelectorContext.d.ts.map +1 -0
  140. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts +9 -0
  141. package/dist/components/DictionaryFieldEditor/LocaleSelector/localeSelector.content.d.ts.map +1 -0
  142. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +10 -10
  143. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  144. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +10 -10
  145. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  146. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +32 -23
  147. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  148. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts +2 -0
  149. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  150. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +32 -23
  151. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  152. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -1
  153. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  154. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +1 -1
  155. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  156. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +59 -18
  157. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  158. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  159. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +62 -21
  160. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  161. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -0
  162. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  163. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +4 -0
  164. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  165. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -0
  166. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  167. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +73 -0
  168. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -0
  169. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts +7 -0
  170. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -0
  171. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +73 -0
  172. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -0
  173. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs +37 -0
  174. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -0
  175. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts +14 -0
  176. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.d.ts.map +1 -0
  177. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs +37 -0
  178. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -0
  179. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs +8 -0
  180. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.cjs.map +1 -0
  181. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts +3 -0
  182. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.d.ts.map +1 -0
  183. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs +8 -0
  184. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/index.mjs.map +1 -0
  185. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs +54 -0
  186. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -0
  187. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +10 -0
  188. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts.map +1 -0
  189. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs +55 -0
  190. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -0
  191. package/dist/components/DictionaryFieldEditor/index.cjs +5 -0
  192. package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
  193. package/dist/components/DictionaryFieldEditor/index.d.ts +1 -0
  194. package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
  195. package/dist/components/DictionaryFieldEditor/index.mjs +6 -1
  196. package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
  197. package/dist/components/DropDown/index.cjs.map +1 -1
  198. package/dist/components/DropDown/index.d.ts +18 -1
  199. package/dist/components/DropDown/index.d.ts.map +1 -1
  200. package/dist/components/DropDown/index.mjs.map +1 -1
  201. package/dist/components/EditableField/EditableFieldInput.cjs +5 -1
  202. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  203. package/dist/components/EditableField/EditableFieldInput.d.ts.map +1 -1
  204. package/dist/components/EditableField/EditableFieldInput.mjs +6 -2
  205. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  206. package/dist/components/EditableField/EditableFieldTextArea.cjs +2 -8
  207. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  208. package/dist/components/EditableField/EditableFieldTextArea.d.ts.map +1 -1
  209. package/dist/components/EditableField/EditableFieldTextArea.mjs +2 -8
  210. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  211. package/dist/components/Form/FormLabel.cjs +6 -2
  212. package/dist/components/Form/FormLabel.cjs.map +1 -1
  213. package/dist/components/Form/FormLabel.d.ts.map +1 -1
  214. package/dist/components/Form/FormLabel.mjs +6 -2
  215. package/dist/components/Form/FormLabel.mjs.map +1 -1
  216. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +1 -1
  217. package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  218. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +1 -1
  219. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
  220. package/dist/components/Form/elements/SelectElement.d.ts.map +1 -1
  221. package/dist/components/Headers/index.cjs +1 -1
  222. package/dist/components/Headers/index.cjs.map +1 -1
  223. package/dist/components/Headers/index.mjs +1 -1
  224. package/dist/components/Headers/index.mjs.map +1 -1
  225. package/dist/components/IDE/Code.cjs +77 -0
  226. package/dist/components/IDE/Code.cjs.map +1 -0
  227. package/dist/components/IDE/Code.d.ts +18 -0
  228. package/dist/components/IDE/Code.d.ts.map +1 -0
  229. package/dist/components/IDE/Code.mjs +77 -0
  230. package/dist/components/IDE/Code.mjs.map +1 -0
  231. package/dist/components/IDE/CodeBlock.cjs +54 -0
  232. package/dist/components/IDE/CodeBlock.cjs.map +1 -0
  233. package/dist/components/IDE/CodeBlock.d.ts +12 -0
  234. package/dist/components/IDE/CodeBlock.d.ts.map +1 -0
  235. package/dist/components/IDE/CodeBlock.mjs +54 -0
  236. package/dist/components/IDE/CodeBlock.mjs.map +1 -0
  237. package/dist/components/IDE/CodeBlockClient.cjs +55 -0
  238. package/dist/components/IDE/CodeBlockClient.cjs.map +1 -0
  239. package/dist/components/IDE/CodeBlockClient.mjs +55 -0
  240. package/dist/components/IDE/CodeBlockClient.mjs.map +1 -0
  241. package/dist/components/IDE/CodeBlockLoader.cjs +28 -0
  242. package/dist/components/IDE/CodeBlockLoader.cjs.map +1 -0
  243. package/dist/components/IDE/CodeBlockLoader.d.ts +4 -0
  244. package/dist/components/IDE/CodeBlockLoader.d.ts.map +1 -0
  245. package/dist/components/IDE/CodeBlockLoader.mjs +28 -0
  246. package/dist/components/IDE/CodeBlockLoader.mjs.map +1 -0
  247. package/dist/components/IDE/CodeBlockServer.cjs +53 -0
  248. package/dist/components/IDE/CodeBlockServer.cjs.map +1 -0
  249. package/dist/components/IDE/CodeBlockServer.d.ts +12 -0
  250. package/dist/components/IDE/CodeBlockServer.d.ts.map +1 -0
  251. package/dist/components/IDE/CodeBlockServer.mjs +53 -0
  252. package/dist/components/IDE/CodeBlockServer.mjs.map +1 -0
  253. package/dist/components/IDE/CodeBlockShiki.d.ts +3 -0
  254. package/dist/components/IDE/CodeBlockShiki.d.ts.map +1 -0
  255. package/dist/components/IDE/CodeBlockclient.d.ts +12 -0
  256. package/dist/components/IDE/CodeBlockclient.d.ts.map +1 -0
  257. package/dist/components/IDE/CodeConditionalRenderer.cjs +20 -0
  258. package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -0
  259. package/dist/components/IDE/CodeConditionalRenderer.d.ts +4 -0
  260. package/dist/components/IDE/CodeConditionalRenderer.d.ts.map +1 -0
  261. package/dist/components/IDE/CodeConditionalRenderer.mjs +20 -0
  262. package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -0
  263. package/dist/components/IDE/CodeContext.cjs +57 -0
  264. package/dist/components/IDE/CodeContext.cjs.map +1 -0
  265. package/dist/components/IDE/CodeContext.d.ts +26 -0
  266. package/dist/components/IDE/CodeContext.d.ts.map +1 -0
  267. package/dist/components/IDE/CodeContext.mjs +57 -0
  268. package/dist/components/IDE/CodeContext.mjs.map +1 -0
  269. package/dist/components/IDE/CodeFormatSelector.cjs +30 -0
  270. package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -0
  271. package/dist/components/IDE/CodeFormatSelector.d.ts +3 -0
  272. package/dist/components/IDE/CodeFormatSelector.d.ts.map +1 -0
  273. package/dist/components/IDE/CodeFormatSelector.mjs +30 -0
  274. package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -0
  275. package/dist/components/IDE/CodeRender copy.cjs +141 -0
  276. package/dist/components/IDE/CodeRender copy.cjs.map +1 -0
  277. package/dist/components/IDE/CodeRender copy.d.ts +14 -0
  278. package/dist/components/IDE/CodeRender copy.d.ts.map +1 -0
  279. package/dist/components/IDE/CodeRender copy.mjs +141 -0
  280. package/dist/components/IDE/CodeRender copy.mjs.map +1 -0
  281. package/dist/components/IDE/CodeRender.cjs +39 -625
  282. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  283. package/dist/components/IDE/CodeRender.d.ts +4 -5
  284. package/dist/components/IDE/CodeRender.d.ts.map +1 -1
  285. package/dist/components/IDE/CodeRender.mjs +40 -604
  286. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  287. package/dist/components/IDE/CodeRenderer.cjs +27 -0
  288. package/dist/components/IDE/CodeRenderer.cjs.map +1 -0
  289. package/dist/components/IDE/CodeRenderer.d.ts +5 -0
  290. package/dist/components/IDE/CodeRenderer.d.ts.map +1 -0
  291. package/dist/components/IDE/CodeRenderer.mjs +27 -0
  292. package/dist/components/IDE/CodeRenderer.mjs.map +1 -0
  293. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs +28 -0
  294. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -0
  295. package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts +3 -0
  296. package/dist/components/IDE/ContentDeclarationFormatSelector.d.ts.map +1 -0
  297. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs +28 -0
  298. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -0
  299. package/dist/components/IDE/CopyButton.cjs +40 -0
  300. package/dist/components/IDE/CopyButton.cjs.map +1 -0
  301. package/dist/components/IDE/CopyButton.content.cjs +26 -0
  302. package/dist/components/IDE/CopyButton.content.cjs.map +1 -0
  303. package/dist/components/IDE/CopyButton.content.d.ts +8 -0
  304. package/dist/components/IDE/CopyButton.content.d.ts.map +1 -0
  305. package/dist/components/IDE/CopyButton.content.mjs +26 -0
  306. package/dist/components/IDE/CopyButton.content.mjs.map +1 -0
  307. package/dist/components/IDE/CopyButton.d.ts +7 -0
  308. package/dist/components/IDE/CopyButton.d.ts.map +1 -0
  309. package/dist/components/IDE/CopyButton.mjs +40 -0
  310. package/dist/components/IDE/CopyButton.mjs.map +1 -0
  311. package/dist/components/IDE/EditableCodeBlock.d.ts +9 -0
  312. package/dist/components/IDE/EditableCodeBlock.d.ts.map +1 -0
  313. package/dist/components/IDE/IDE.cjs +1 -1
  314. package/dist/components/IDE/IDE.cjs.map +1 -1
  315. package/dist/components/IDE/IDE.mjs +1 -1
  316. package/dist/components/IDE/IDE.mjs.map +1 -1
  317. package/dist/components/IDE/MarkDownRender.cjs +11 -4
  318. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  319. package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
  320. package/dist/components/IDE/MarkDownRender.mjs +11 -4
  321. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  322. package/dist/components/IDE/MonacoCode.cjs +129 -0
  323. package/dist/components/IDE/MonacoCode.cjs.map +1 -0
  324. package/dist/components/IDE/MonacoCode.d.ts +14 -0
  325. package/dist/components/IDE/MonacoCode.d.ts.map +1 -0
  326. package/dist/components/IDE/MonacoCode.mjs +129 -0
  327. package/dist/components/IDE/MonacoCode.mjs.map +1 -0
  328. package/dist/components/IDE/PackageManagerSelector.cjs +20 -0
  329. package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -0
  330. package/dist/components/IDE/PackageManagerSelector.d.ts +3 -0
  331. package/dist/components/IDE/PackageManagerSelector.d.ts.map +1 -0
  332. package/dist/components/IDE/PackageManagerSelector.mjs +20 -0
  333. package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -0
  334. package/dist/components/IDE/index.cjs +2 -2
  335. package/dist/components/IDE/index.d.ts +1 -1
  336. package/dist/components/IDE/index.d.ts.map +1 -1
  337. package/dist/components/IDE/index.mjs +1 -1
  338. package/dist/components/Link/Link.cjs +50 -31
  339. package/dist/components/Link/Link.cjs.map +1 -1
  340. package/dist/components/Link/Link.d.ts +3 -0
  341. package/dist/components/Link/Link.d.ts.map +1 -1
  342. package/dist/components/Link/Link.mjs +51 -32
  343. package/dist/components/Link/Link.mjs.map +1 -1
  344. package/dist/components/Link/index.cjs +1 -0
  345. package/dist/components/Link/index.cjs.map +1 -1
  346. package/dist/components/Link/index.mjs +3 -2
  347. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts +13 -0
  348. package/dist/components/LocaleSwitcherContentDropDown/LocaleSelectorContext.d.ts.map +1 -0
  349. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +218 -0
  350. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -0
  351. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts +8 -0
  352. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -0
  353. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +218 -0
  354. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -0
  355. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs +42 -0
  356. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -0
  357. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts +15 -0
  358. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.d.ts.map +1 -0
  359. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs +42 -0
  360. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -0
  361. package/dist/components/LocaleSwitcherContentDropDown/index.cjs +8 -0
  362. package/dist/components/LocaleSwitcherContentDropDown/index.cjs.map +1 -0
  363. package/dist/components/LocaleSwitcherContentDropDown/index.d.ts +3 -0
  364. package/dist/components/LocaleSwitcherContentDropDown/index.d.ts.map +1 -0
  365. package/dist/components/LocaleSwitcherContentDropDown/index.mjs +8 -0
  366. package/dist/components/LocaleSwitcherContentDropDown/index.mjs.map +1 -0
  367. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +118 -0
  368. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -0
  369. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +18 -0
  370. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -0
  371. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +119 -0
  372. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -0
  373. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +110 -34
  374. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  375. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +2 -0
  376. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  377. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +111 -35
  378. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  379. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +63 -1
  380. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
  381. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +6 -0
  382. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
  383. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +63 -1
  384. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
  385. package/dist/components/MarkDownRender/index.cjs +22 -26
  386. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  387. package/dist/components/MarkDownRender/index.d.ts +5 -1
  388. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  389. package/dist/components/MarkDownRender/index.mjs +22 -26
  390. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  391. package/dist/components/Modal/Modal.cjs +11 -13
  392. package/dist/components/Modal/Modal.cjs.map +1 -1
  393. package/dist/components/Modal/Modal.d.ts +1 -1
  394. package/dist/components/Modal/Modal.d.ts.map +1 -1
  395. package/dist/components/Modal/Modal.mjs +11 -13
  396. package/dist/components/Modal/Modal.mjs.map +1 -1
  397. package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
  398. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  399. package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
  400. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  401. package/dist/components/SwitchSelector/index.cjs +4 -0
  402. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  403. package/dist/components/SwitchSelector/index.d.ts.map +1 -1
  404. package/dist/components/SwitchSelector/index.mjs +5 -1
  405. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  406. package/dist/components/index.cjs +21 -4
  407. package/dist/components/index.cjs.map +1 -1
  408. package/dist/components/index.d.ts +3 -1
  409. package/dist/components/index.d.ts.map +1 -1
  410. package/dist/components/index.mjs +21 -4
  411. package/dist/components/index.mjs.map +1 -1
  412. package/dist/design-system.css +235 -0
  413. package/dist/hooks/index.cjs +13 -0
  414. package/dist/hooks/index.cjs.map +1 -1
  415. package/dist/hooks/index.d.ts +1 -0
  416. package/dist/hooks/index.d.ts.map +1 -1
  417. package/dist/hooks/index.mjs +14 -1
  418. package/dist/hooks/index.mjs.map +1 -1
  419. package/dist/hooks/intlayerAPIHooks.cjs +86 -5
  420. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  421. package/dist/hooks/intlayerAPIHooks.d.ts +15 -1
  422. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  423. package/dist/hooks/intlayerAPIHooks.mjs +86 -5
  424. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  425. package/dist/hooks/useAsync/index.cjs +3 -0
  426. package/dist/hooks/useAsync/index.cjs.map +1 -1
  427. package/dist/hooks/useAsync/index.d.ts +1 -0
  428. package/dist/hooks/useAsync/index.d.ts.map +1 -1
  429. package/dist/hooks/useAsync/index.mjs +4 -1
  430. package/dist/hooks/useAsync/index.mjs.map +1 -1
  431. package/dist/hooks/useAsync/useAsync.cjs +2 -9
  432. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  433. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  434. package/dist/hooks/useAsync/useAsync.mjs +3 -10
  435. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  436. package/dist/hooks/useAsync/useAsyncStateStore.cjs +123 -73
  437. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  438. package/dist/hooks/useAsync/useAsyncStateStore.d.ts +35 -11
  439. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  440. package/dist/hooks/useAsync/useAsyncStateStore.mjs +123 -73
  441. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  442. package/dist/hooks/useGetAllDictionaries.cjs +4 -2
  443. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  444. package/dist/hooks/useGetAllDictionaries.d.ts +4 -1
  445. package/dist/hooks/useGetAllDictionaries.d.ts.map +1 -1
  446. package/dist/hooks/useGetAllDictionaries.mjs +4 -2
  447. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  448. package/dist/hooks/useIntlayerAPI.d.ts +13 -1
  449. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  450. package/dist/hooks/useIsDarkMode.cjs +15 -0
  451. package/dist/hooks/useIsDarkMode.cjs.map +1 -0
  452. package/dist/hooks/useIsDarkMode.d.ts +2 -0
  453. package/dist/hooks/useIsDarkMode.d.ts.map +1 -0
  454. package/dist/hooks/useIsDarkMode.mjs +15 -0
  455. package/dist/hooks/useIsDarkMode.mjs.map +1 -0
  456. package/dist/hooks/usePersistedStore.cjs +17 -5
  457. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  458. package/dist/hooks/usePersistedStore.d.ts.map +1 -1
  459. package/dist/hooks/usePersistedStore.mjs +17 -5
  460. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  461. package/dist/libs/intlayer-api/ai.cjs +54 -0
  462. package/dist/libs/intlayer-api/ai.cjs.map +1 -0
  463. package/dist/libs/intlayer-api/ai.d.ts +16 -0
  464. package/dist/libs/intlayer-api/ai.d.ts.map +1 -0
  465. package/dist/libs/intlayer-api/ai.mjs +54 -0
  466. package/dist/libs/intlayer-api/ai.mjs.map +1 -0
  467. package/dist/libs/intlayer-api/dictionary.cjs +2 -2
  468. package/dist/libs/intlayer-api/dictionary.cjs.map +1 -1
  469. package/dist/libs/intlayer-api/dictionary.d.ts +3 -3
  470. package/dist/libs/intlayer-api/dictionary.d.ts.map +1 -1
  471. package/dist/libs/intlayer-api/dictionary.mjs +2 -2
  472. package/dist/libs/intlayer-api/dictionary.mjs.map +1 -1
  473. package/dist/libs/intlayer-api/index.cjs +5 -1
  474. package/dist/libs/intlayer-api/index.cjs.map +1 -1
  475. package/dist/libs/intlayer-api/index.d.ts +26 -2
  476. package/dist/libs/intlayer-api/index.d.ts.map +1 -1
  477. package/dist/libs/intlayer-api/index.mjs +5 -1
  478. package/dist/libs/intlayer-api/index.mjs.map +1 -1
  479. package/dist/libs/intlayer-api/tag.cjs +52 -0
  480. package/dist/libs/intlayer-api/tag.cjs.map +1 -0
  481. package/dist/libs/intlayer-api/tag.d.ts +16 -0
  482. package/dist/libs/intlayer-api/tag.d.ts.map +1 -0
  483. package/dist/libs/intlayer-api/tag.mjs +52 -0
  484. package/dist/libs/intlayer-api/tag.mjs.map +1 -0
  485. package/dist/tailwind.css +1 -1
  486. package/package.json +20 -18
@@ -1,612 +1,48 @@
1
1
  "use client";
2
2
  import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
- import { CopyCheckIcon, CopyIcon } from "lucide-react";
4
- import { lazy, useState, useEffect, Suspense } from "react";
5
- import CopyToClipboard from "react-copy-to-clipboard";
3
+ import highlight from "highlight.js";
4
+ import { forwardRef, useRef, useEffect } from "react";
6
5
  import { cn } from "../../utils/cn.mjs";
7
- import { Loader } from "../Loader/index.mjs";
8
- const okaidia = {
9
- 'code[class*="language-"]': {
10
- "color": "#f8f8f2",
11
- "background": "none",
12
- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
13
- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
14
- "fontSize": "1em",
15
- "textAlign": "left",
16
- "whiteSpace": "pre",
17
- "wordSpacing": "normal",
18
- "wordBreak": "normal",
19
- "wordWrap": "normal",
20
- "lineHeight": "1.5",
21
- "MozTabSize": "4",
22
- "OTabSize": "4",
23
- "tabSize": "4",
24
- "WebkitHyphens": "none",
25
- "MozHyphens": "none",
26
- "msHyphens": "none",
27
- "hyphens": "none"
28
- },
29
- 'pre[class*="language-"]': {
30
- "color": "#f8f8f2",
31
- "background": "#272822",
32
- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
33
- "fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
34
- "fontSize": "1em",
35
- "textAlign": "left",
36
- "whiteSpace": "pre",
37
- "wordSpacing": "normal",
38
- "wordBreak": "normal",
39
- "wordWrap": "normal",
40
- "lineHeight": "1.5",
41
- "MozTabSize": "4",
42
- "OTabSize": "4",
43
- "tabSize": "4",
44
- "WebkitHyphens": "none",
45
- "MozHyphens": "none",
46
- "msHyphens": "none",
47
- "hyphens": "none",
48
- "padding": "1em",
49
- "margin": ".5em 0",
50
- "overflow": "auto",
51
- "borderRadius": "0.3em"
52
- },
53
- ':not(pre) > code[class*="language-"]': {
54
- "background": "#272822",
55
- "padding": ".1em",
56
- "borderRadius": ".3em",
57
- "whiteSpace": "normal"
58
- },
59
- "comment": {
60
- "color": "#8292a2"
61
- },
62
- "prolog": {
63
- "color": "#8292a2"
64
- },
65
- "doctype": {
66
- "color": "#8292a2"
67
- },
68
- "cdata": {
69
- "color": "#8292a2"
70
- },
71
- "punctuation": {
72
- "color": "#f8f8f2"
73
- },
74
- "namespace": {
75
- "Opacity": ".7"
76
- },
77
- "property": {
78
- "color": "#f92672"
79
- },
80
- "tag": {
81
- "color": "#f92672"
82
- },
83
- "constant": {
84
- "color": "#f92672"
85
- },
86
- "symbol": {
87
- "color": "#f92672"
88
- },
89
- "deleted": {
90
- "color": "#f92672"
91
- },
92
- "boolean": {
93
- "color": "#ae81ff"
94
- },
95
- "number": {
96
- "color": "#ae81ff"
97
- },
98
- "selector": {
99
- "color": "#a6e22e"
100
- },
101
- "attr-name": {
102
- "color": "#a6e22e"
103
- },
104
- "string": {
105
- "color": "#a6e22e"
106
- },
107
- "char": {
108
- "color": "#a6e22e"
109
- },
110
- "builtin": {
111
- "color": "#a6e22e"
112
- },
113
- "inserted": {
114
- "color": "#a6e22e"
115
- },
116
- "operator": {
117
- "color": "#f8f8f2"
118
- },
119
- "entity": {
120
- "color": "#f8f8f2",
121
- "cursor": "help"
122
- },
123
- "url": {
124
- "color": "#f8f8f2"
125
- },
126
- ".language-css .token.string": {
127
- "color": "#f8f8f2"
128
- },
129
- ".style .token.string": {
130
- "color": "#f8f8f2"
131
- },
132
- "variable": {
133
- "color": "#f8f8f2"
134
- },
135
- "atrule": {
136
- "color": "#e6db74"
137
- },
138
- "attr-value": {
139
- "color": "#e6db74"
140
- },
141
- "function": {
142
- "color": "#e6db74"
143
- },
144
- "class-name": {
145
- "color": "#e6db74"
146
- },
147
- "keyword": {
148
- "color": "#66d9ef"
149
- },
150
- "regex": {
151
- "color": "#fd971f"
152
- },
153
- "important": {
154
- "color": "#fd971f",
155
- "fontWeight": "bold"
156
- },
157
- "bold": {
158
- "fontWeight": "bold"
159
- },
160
- "italic": {
161
- "fontStyle": "italic"
6
+ import { CopyButton } from "./CopyButton.mjs";
7
+ const Code = forwardRef(
8
+ ({
9
+ children,
10
+ language,
11
+ isDarkMode,
12
+ showHeader = true,
13
+ showLineNumbers = true,
14
+ className,
15
+ ...props
16
+ }, ref) => {
17
+ const codeRef = useRef(null);
18
+ useEffect(() => {
19
+ if (codeRef && codeRef.current && !codeRef.current.hasAttribute("data-highlighted")) {
20
+ highlight.highlightElement(codeRef.current);
21
+ codeRef.current.setAttribute("data-highlighted", "true");
22
+ }
23
+ }, [children, showLineNumbers]);
24
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
25
+ "div",
26
+ {
27
+ className: cn(
28
+ "relative h-full w-full text-sm leading-6",
29
+ showLineNumbers && "ml-0",
30
+ className
31
+ ),
32
+ ref,
33
+ ...props,
34
+ children: [
35
+ showHeader && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
36
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-card dark:bg-card-dark text-neutral dark:text-neutral-dark flex h-9 w-full items-center rounded-t-xl pl-4 text-sm", children: language ?? "javascript" }),
37
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sticky top-28", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "absolute bottom-0 right-2 flex h-9 items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyButton, { content: children }) }) })
38
+ ] }),
39
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid size-full grid-cols-[0px] overflow-auto p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: `language-${language} w-fit`, ref: codeRef, children }) }) })
40
+ ]
41
+ }
42
+ );
162
43
  }
163
- };
164
- const coldarkCold = {
165
- 'code[class*="language-"]': {
166
- "color": "#111b27",
167
- "background": "none",
168
- "fontFamily": 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
169
- "textAlign": "left",
170
- "whiteSpace": "pre",
171
- "wordSpacing": "normal",
172
- "wordBreak": "normal",
173
- "wordWrap": "normal",
174
- "lineHeight": "1.5",
175
- "MozTabSize": "4",
176
- "OTabSize": "4",
177
- "tabSize": "4",
178
- "WebkitHyphens": "none",
179
- "MozHyphens": "none",
180
- "msHyphens": "none",
181
- "hyphens": "none"
182
- },
183
- 'pre[class*="language-"]': {
184
- "color": "#111b27",
185
- "background": "#e3eaf2",
186
- "fontFamily": 'Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace',
187
- "textAlign": "left",
188
- "whiteSpace": "pre",
189
- "wordSpacing": "normal",
190
- "wordBreak": "normal",
191
- "wordWrap": "normal",
192
- "lineHeight": "1.5",
193
- "MozTabSize": "4",
194
- "OTabSize": "4",
195
- "tabSize": "4",
196
- "WebkitHyphens": "none",
197
- "MozHyphens": "none",
198
- "msHyphens": "none",
199
- "hyphens": "none",
200
- "padding": "1em",
201
- "margin": "0.5em 0",
202
- "overflow": "auto"
203
- },
204
- 'pre[class*="language-"]::-moz-selection': {
205
- "background": "#8da1b9"
206
- },
207
- 'pre[class*="language-"] ::-moz-selection': {
208
- "background": "#8da1b9"
209
- },
210
- 'code[class*="language-"]::-moz-selection': {
211
- "background": "#8da1b9"
212
- },
213
- 'code[class*="language-"] ::-moz-selection': {
214
- "background": "#8da1b9"
215
- },
216
- 'pre[class*="language-"]::selection': {
217
- "background": "#8da1b9"
218
- },
219
- 'pre[class*="language-"] ::selection': {
220
- "background": "#8da1b9"
221
- },
222
- 'code[class*="language-"]::selection': {
223
- "background": "#8da1b9"
224
- },
225
- 'code[class*="language-"] ::selection': {
226
- "background": "#8da1b9"
227
- },
228
- ':not(pre) > code[class*="language-"]': {
229
- "background": "#e3eaf2",
230
- "padding": "0.1em 0.3em",
231
- "borderRadius": "0.3em",
232
- "whiteSpace": "normal"
233
- },
234
- "comment": {
235
- "color": "#3c526d"
236
- },
237
- "prolog": {
238
- "color": "#3c526d"
239
- },
240
- "doctype": {
241
- "color": "#3c526d"
242
- },
243
- "cdata": {
244
- "color": "#3c526d"
245
- },
246
- "punctuation": {
247
- "color": "#111b27"
248
- },
249
- "delimiter.important": {
250
- "color": "#006d6d",
251
- "fontWeight": "inherit"
252
- },
253
- "selector.parent": {
254
- "color": "#006d6d"
255
- },
256
- "tag": {
257
- "color": "#006d6d"
258
- },
259
- "tag.punctuation": {
260
- "color": "#006d6d"
261
- },
262
- "attr-name": {
263
- "color": "#755f00"
264
- },
265
- "boolean": {
266
- "color": "#755f00"
267
- },
268
- "boolean.important": {
269
- "color": "#755f00"
270
- },
271
- "number": {
272
- "color": "#755f00"
273
- },
274
- "constant": {
275
- "color": "#755f00"
276
- },
277
- "selector.attribute": {
278
- "color": "#755f00"
279
- },
280
- "class-name": {
281
- "color": "#005a8e"
282
- },
283
- "key": {
284
- "color": "#005a8e"
285
- },
286
- "parameter": {
287
- "color": "#005a8e"
288
- },
289
- "property": {
290
- "color": "#005a8e"
291
- },
292
- "property-access": {
293
- "color": "#005a8e"
294
- },
295
- "variable": {
296
- "color": "#005a8e"
297
- },
298
- "attr-value": {
299
- "color": "#116b00"
300
- },
301
- "inserted": {
302
- "color": "#116b00"
303
- },
304
- "color": {
305
- "color": "#116b00"
306
- },
307
- "selector.value": {
308
- "color": "#116b00"
309
- },
310
- "string": {
311
- "color": "#116b00"
312
- },
313
- "string.url-link": {
314
- "color": "#116b00"
315
- },
316
- "builtin": {
317
- "color": "#af00af"
318
- },
319
- "keyword-array": {
320
- "color": "#af00af"
321
- },
322
- "package": {
323
- "color": "#af00af"
324
- },
325
- "regex": {
326
- "color": "#af00af"
327
- },
328
- "function": {
329
- "color": "#7c00aa"
330
- },
331
- "selector.class": {
332
- "color": "#7c00aa"
333
- },
334
- "selector.id": {
335
- "color": "#7c00aa"
336
- },
337
- "atrule.rule": {
338
- "color": "#a04900"
339
- },
340
- "combinator": {
341
- "color": "#a04900"
342
- },
343
- "keyword": {
344
- "color": "#a04900"
345
- },
346
- "operator": {
347
- "color": "#a04900"
348
- },
349
- "pseudo-class": {
350
- "color": "#a04900"
351
- },
352
- "pseudo-element": {
353
- "color": "#a04900"
354
- },
355
- "selector": {
356
- "color": "#a04900"
357
- },
358
- "unit": {
359
- "color": "#a04900"
360
- },
361
- "deleted": {
362
- "color": "#c22f2e"
363
- },
364
- "important": {
365
- "color": "#c22f2e",
366
- "fontWeight": "bold"
367
- },
368
- "keyword-this": {
369
- "color": "#005a8e",
370
- "fontWeight": "bold"
371
- },
372
- "this": {
373
- "color": "#005a8e",
374
- "fontWeight": "bold"
375
- },
376
- "bold": {
377
- "fontWeight": "bold"
378
- },
379
- "italic": {
380
- "fontStyle": "italic"
381
- },
382
- "entity": {
383
- "cursor": "help"
384
- },
385
- ".language-markdown .token.title": {
386
- "color": "#005a8e",
387
- "fontWeight": "bold"
388
- },
389
- ".language-markdown .token.title .token.punctuation": {
390
- "color": "#005a8e",
391
- "fontWeight": "bold"
392
- },
393
- ".language-markdown .token.blockquote.punctuation": {
394
- "color": "#af00af"
395
- },
396
- ".language-markdown .token.code": {
397
- "color": "#006d6d"
398
- },
399
- ".language-markdown .token.hr.punctuation": {
400
- "color": "#005a8e"
401
- },
402
- ".language-markdown .token.url > .token.content": {
403
- "color": "#116b00"
404
- },
405
- ".language-markdown .token.url-link": {
406
- "color": "#755f00"
407
- },
408
- ".language-markdown .token.list.punctuation": {
409
- "color": "#af00af"
410
- },
411
- ".language-markdown .token.table-header": {
412
- "color": "#111b27"
413
- },
414
- ".language-json .token.operator": {
415
- "color": "#111b27"
416
- },
417
- ".language-scss .token.variable": {
418
- "color": "#006d6d"
419
- },
420
- "token.tab:not(:empty):before": {
421
- "color": "#3c526d"
422
- },
423
- "token.cr:before": {
424
- "color": "#3c526d"
425
- },
426
- "token.lf:before": {
427
- "color": "#3c526d"
428
- },
429
- "token.space:before": {
430
- "color": "#3c526d"
431
- },
432
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
433
- "color": "#e3eaf2",
434
- "background": "#005a8e"
435
- },
436
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
437
- "color": "#e3eaf2",
438
- "background": "#005a8e"
439
- },
440
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
441
- "color": "#e3eaf2",
442
- "background": "#005a8eda",
443
- "textDecoration": "none"
444
- },
445
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
446
- "color": "#e3eaf2",
447
- "background": "#005a8eda",
448
- "textDecoration": "none"
449
- },
450
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
451
- "color": "#e3eaf2",
452
- "background": "#005a8eda",
453
- "textDecoration": "none"
454
- },
455
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
456
- "color": "#e3eaf2",
457
- "background": "#005a8eda",
458
- "textDecoration": "none"
459
- },
460
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
461
- "color": "#e3eaf2",
462
- "background": "#3c526d"
463
- },
464
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
465
- "color": "#e3eaf2",
466
- "background": "#3c526d"
467
- },
468
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
469
- "color": "#e3eaf2",
470
- "background": "#3c526d"
471
- },
472
- ".line-highlight.line-highlight": {
473
- "background": "linear-gradient(to right, #8da1b92f 70%, #8da1b925)"
474
- },
475
- ".line-highlight.line-highlight:before": {
476
- "backgroundColor": "#3c526d",
477
- "color": "#e3eaf2",
478
- "boxShadow": "0 1px #8da1b9"
479
- },
480
- ".line-highlight.line-highlight[data-end]:after": {
481
- "backgroundColor": "#3c526d",
482
- "color": "#e3eaf2",
483
- "boxShadow": "0 1px #8da1b9"
484
- },
485
- "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": {
486
- "backgroundColor": "#3c526d1f"
487
- },
488
- ".line-numbers.line-numbers .line-numbers-rows": {
489
- "borderRight": "1px solid #8da1b97a",
490
- "background": "#d0dae77a"
491
- },
492
- ".line-numbers .line-numbers-rows > span:before": {
493
- "color": "#3c526dda"
494
- },
495
- ".rainbow-braces .token.token.punctuation.brace-level-1": {
496
- "color": "#755f00"
497
- },
498
- ".rainbow-braces .token.token.punctuation.brace-level-5": {
499
- "color": "#755f00"
500
- },
501
- ".rainbow-braces .token.token.punctuation.brace-level-9": {
502
- "color": "#755f00"
503
- },
504
- ".rainbow-braces .token.token.punctuation.brace-level-2": {
505
- "color": "#af00af"
506
- },
507
- ".rainbow-braces .token.token.punctuation.brace-level-6": {
508
- "color": "#af00af"
509
- },
510
- ".rainbow-braces .token.token.punctuation.brace-level-10": {
511
- "color": "#af00af"
512
- },
513
- ".rainbow-braces .token.token.punctuation.brace-level-3": {
514
- "color": "#005a8e"
515
- },
516
- ".rainbow-braces .token.token.punctuation.brace-level-7": {
517
- "color": "#005a8e"
518
- },
519
- ".rainbow-braces .token.token.punctuation.brace-level-11": {
520
- "color": "#005a8e"
521
- },
522
- ".rainbow-braces .token.token.punctuation.brace-level-4": {
523
- "color": "#7c00aa"
524
- },
525
- ".rainbow-braces .token.token.punctuation.brace-level-8": {
526
- "color": "#7c00aa"
527
- },
528
- ".rainbow-braces .token.token.punctuation.brace-level-12": {
529
- "color": "#7c00aa"
530
- },
531
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)": {
532
- "backgroundColor": "#c22f2e1f"
533
- },
534
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)": {
535
- "backgroundColor": "#c22f2e1f"
536
- },
537
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)": {
538
- "backgroundColor": "#116b001f"
539
- },
540
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)": {
541
- "backgroundColor": "#116b001f"
542
- },
543
- ".command-line .command-line-prompt": {
544
- "borderRight": "1px solid #8da1b97a"
545
- },
546
- ".command-line .command-line-prompt > span:before": {
547
- "color": "#3c526dda"
548
- }
549
- };
550
- const SyntaxHighlighter = lazy(
551
- () => import("react-syntax-highlighter").then((module) => ({
552
- default: module.Prism
553
- }))
554
44
  );
555
- const Code = ({
556
- children,
557
- language,
558
- isDarkMode,
559
- showLineNumbers = true,
560
- ...props
561
- }) => {
562
- const [isDarkModeState, setIsDarkModeState] = useState(false);
563
- const [copied, setCopied] = useState(false);
564
- useEffect(
565
- () => (
566
- // Necessary to fix first render bug
567
- setIsDarkModeState(isDarkMode ?? false)
568
- ),
569
- [isDarkMode]
570
- );
571
- useEffect(() => {
572
- const timer = setTimeout(() => {
573
- setCopied(false);
574
- }, 1e3);
575
- return () => clearTimeout(timer);
576
- }, [copied]);
577
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
578
- "div",
579
- {
580
- className: cn(
581
- "relative h-full w-full text-sm",
582
- showLineNumbers && "ml-0"
583
- ),
584
- children: [
585
- /* @__PURE__ */ jsxRuntimeExports.jsx(CopyToClipboard, { text: children, onCopy: () => setCopied(true), children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "absolute right-3 top-3", "aria-label": "Copy code", children: copied ? /* @__PURE__ */ jsxRuntimeExports.jsx(CopyCheckIcon, { className: "size-4" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CopyIcon, { className: "size-4" }) }) }),
586
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid size-full grid-cols-[0px] overflow-auto p-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
587
- SyntaxHighlighter,
588
- {
589
- customStyle: {
590
- display: void 0,
591
- overflowX: "auto",
592
- overflowY: "auto",
593
- padding: void 0,
594
- color: void 0,
595
- background: "inherit",
596
- margin: void 0
597
- },
598
- PreTag: (props2) => props2.children,
599
- language: language ?? "javascript",
600
- style: isDarkModeState ? okaidia : coldarkCold,
601
- showLineNumbers,
602
- ...props,
603
- children: String(children).replace(/\n$/, "")
604
- }
605
- ) }) })
606
- ]
607
- }
608
- );
609
- };
45
+ Code.displayName = "Code";
610
46
  export {
611
47
  Code
612
48
  };