@intlayer/design-system 3.5.3 → 3.5.5

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 (492) hide show
  1. package/README.md +1 -1
  2. package/dist/.vite/manifest.json +274 -125
  3. package/dist/CopyButton-Cxu3goRg.cjs +59 -0
  4. package/dist/CopyButton-Cxu3goRg.cjs.map +1 -0
  5. package/dist/CopyButton-DlcDlf6U.js +60 -0
  6. package/dist/CopyButton-DlcDlf6U.js.map +1 -0
  7. package/dist/components/Auth/AuthModal/index.cjs +4 -0
  8. package/dist/components/Auth/AuthModal/index.cjs.map +1 -1
  9. package/dist/components/Auth/AuthModal/index.mjs +4 -0
  10. package/dist/components/Auth/AuthModal/index.mjs.map +1 -1
  11. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +5 -4
  12. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
  13. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts +1 -1
  14. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
  15. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +5 -4
  16. package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
  17. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs +170 -0
  18. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.cjs.map +1 -0
  19. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts +26 -0
  20. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.d.ts.map +1 -0
  21. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs +170 -0
  22. package/dist/components/Auth/ChangePasswordForm/changePasswordForm.content.mjs.map +1 -0
  23. package/dist/components/Auth/ChangePasswordForm/index.cjs +2 -2
  24. package/dist/components/Auth/ChangePasswordForm/index.d.ts +1 -1
  25. package/dist/components/Auth/ChangePasswordForm/index.d.ts.map +1 -1
  26. package/dist/components/Auth/ChangePasswordForm/index.mjs +2 -2
  27. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs +37 -0
  28. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.cjs.map +1 -0
  29. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs +131 -0
  30. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs.map +1 -0
  31. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts +15 -0
  32. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.d.ts.map +1 -0
  33. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs +131 -0
  34. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs.map +1 -0
  35. package/dist/components/Auth/ChangePasswordForm/{ChangePasswordSchema.d.ts → useChangePasswordSchema.d.ts} +3 -3
  36. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.d.ts.map +1 -0
  37. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs +37 -0
  38. package/dist/components/Auth/ChangePasswordForm/useChangePasswordSchema.mjs.map +1 -0
  39. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +11 -10
  40. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs.map +1 -1
  41. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.d.ts.map +1 -1
  42. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +12 -11
  43. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs.map +1 -1
  44. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs +86 -32
  45. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs.map +1 -1
  46. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts +13 -9
  47. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.d.ts.map +1 -1
  48. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs +85 -31
  49. package/dist/components/Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs.map +1 -1
  50. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs +5 -4
  51. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.cjs.map +1 -1
  52. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts +1 -1
  53. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.d.ts.map +1 -1
  54. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +5 -4
  55. package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs.map +1 -1
  56. package/dist/components/Auth/ResetPasswordForm/index.cjs +2 -2
  57. package/dist/components/Auth/ResetPasswordForm/index.d.ts +1 -1
  58. package/dist/components/Auth/ResetPasswordForm/index.d.ts.map +1 -1
  59. package/dist/components/Auth/ResetPasswordForm/index.mjs +2 -2
  60. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs +123 -0
  61. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.cjs.map +1 -0
  62. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts +21 -0
  63. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.d.ts.map +1 -0
  64. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs +123 -0
  65. package/dist/components/Auth/ResetPasswordForm/resetPasswordContent.content.mjs.map +1 -0
  66. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs +16 -0
  67. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.cjs.map +1 -0
  68. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs +56 -0
  69. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs.map +1 -0
  70. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts +10 -0
  71. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.d.ts.map +1 -0
  72. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs +56 -0
  73. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs.map +1 -0
  74. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts +10 -0
  75. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.d.ts.map +1 -0
  76. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs +16 -0
  77. package/dist/components/Auth/ResetPasswordForm/useResetPasswordSchema.mjs.map +1 -0
  78. package/dist/components/Auth/SignInForm/SignInForm.cjs +22 -15
  79. package/dist/components/Auth/SignInForm/SignInForm.cjs.map +1 -1
  80. package/dist/components/Auth/SignInForm/SignInForm.d.ts +1 -1
  81. package/dist/components/Auth/SignInForm/SignInForm.d.ts.map +1 -1
  82. package/dist/components/Auth/SignInForm/SignInForm.mjs +22 -15
  83. package/dist/components/Auth/SignInForm/SignInForm.mjs.map +1 -1
  84. package/dist/components/Auth/SignInForm/index.cjs +2 -2
  85. package/dist/components/Auth/SignInForm/index.d.ts +1 -1
  86. package/dist/components/Auth/SignInForm/index.d.ts.map +1 -1
  87. package/dist/components/Auth/SignInForm/index.mjs +2 -2
  88. package/dist/components/Auth/SignInForm/signIn.content.cjs +217 -0
  89. package/dist/components/Auth/SignInForm/signIn.content.cjs.map +1 -0
  90. package/dist/components/Auth/SignInForm/signIn.content.d.ts +31 -0
  91. package/dist/components/Auth/SignInForm/signIn.content.d.ts.map +1 -0
  92. package/dist/components/Auth/SignInForm/signIn.content.mjs +217 -0
  93. package/dist/components/Auth/SignInForm/signIn.content.mjs.map +1 -0
  94. package/dist/components/Auth/SignInForm/useSignInSchema.cjs +25 -0
  95. package/dist/components/Auth/SignInForm/useSignInSchema.cjs.map +1 -0
  96. package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs +71 -0
  97. package/dist/components/Auth/SignInForm/useSignInSchema.content.cjs.map +1 -0
  98. package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts +11 -0
  99. package/dist/components/Auth/SignInForm/useSignInSchema.content.d.ts.map +1 -0
  100. package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs +71 -0
  101. package/dist/components/Auth/SignInForm/useSignInSchema.content.mjs.map +1 -0
  102. package/dist/components/Auth/SignInForm/{SignInSchema.d.ts → useSignInSchema.d.ts} +3 -3
  103. package/dist/components/Auth/SignInForm/useSignInSchema.d.ts.map +1 -0
  104. package/dist/components/Auth/SignInForm/useSignInSchema.mjs +25 -0
  105. package/dist/components/Auth/SignInForm/useSignInSchema.mjs.map +1 -0
  106. package/dist/components/Auth/SignUpForm/SignUpForm.cjs +4 -4
  107. package/dist/components/Auth/SignUpForm/SignUpForm.cjs.map +1 -1
  108. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts +1 -1
  109. package/dist/components/Auth/SignUpForm/SignUpForm.d.ts.map +1 -1
  110. package/dist/components/Auth/SignUpForm/SignUpForm.mjs +3 -3
  111. package/dist/components/Auth/SignUpForm/SignUpForm.mjs.map +1 -1
  112. package/dist/components/Auth/SignUpForm/index.cjs +2 -2
  113. package/dist/components/Auth/SignUpForm/index.d.ts +1 -1
  114. package/dist/components/Auth/SignUpForm/index.d.ts.map +1 -1
  115. package/dist/components/Auth/SignUpForm/index.mjs +2 -2
  116. package/dist/components/Auth/SignUpForm/signUpForm.content.cjs +182 -0
  117. package/dist/components/Auth/SignUpForm/signUpForm.content.cjs.map +1 -0
  118. package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts +24 -0
  119. package/dist/components/Auth/SignUpForm/signUpForm.content.d.ts.map +1 -0
  120. package/dist/components/Auth/SignUpForm/signUpForm.content.mjs +182 -0
  121. package/dist/components/Auth/SignUpForm/signUpForm.content.mjs.map +1 -0
  122. package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs +36 -0
  123. package/dist/components/Auth/SignUpForm/useSignUpSchema.cjs.map +1 -0
  124. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs +116 -0
  125. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.cjs.map +1 -0
  126. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts +14 -0
  127. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.d.ts.map +1 -0
  128. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs +116 -0
  129. package/dist/components/Auth/SignUpForm/useSignUpSchema.content.mjs.map +1 -0
  130. package/dist/components/Auth/SignUpForm/{SignUpSchema.d.ts → useSignUpSchema.d.ts} +3 -3
  131. package/dist/components/Auth/SignUpForm/useSignUpSchema.d.ts.map +1 -0
  132. package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs +36 -0
  133. package/dist/components/Auth/SignUpForm/useSignUpSchema.mjs.map +1 -0
  134. package/dist/components/Auth/index.cjs +8 -8
  135. package/dist/components/Auth/index.mjs +8 -8
  136. package/dist/components/Auth/useAuth/useSession.cjs +1 -0
  137. package/dist/components/Auth/useAuth/useSession.cjs.map +1 -1
  138. package/dist/components/Auth/useAuth/useSession.mjs +1 -0
  139. package/dist/components/Auth/useAuth/useSession.mjs.map +1 -1
  140. package/dist/components/Breadcrumb/breadcrumb.content.cjs +26 -0
  141. package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -0
  142. package/dist/components/Breadcrumb/breadcrumb.content.d.ts +8 -0
  143. package/dist/components/Breadcrumb/breadcrumb.content.d.ts.map +1 -0
  144. package/dist/components/Breadcrumb/breadcrumb.content.mjs +26 -0
  145. package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -0
  146. package/dist/components/Breadcrumb/index.cjs +103 -34
  147. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  148. package/dist/components/Breadcrumb/index.d.ts +6 -2
  149. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  150. package/dist/components/Breadcrumb/index.mjs +103 -34
  151. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  152. package/dist/components/Button/Button.cjs +7 -8
  153. package/dist/components/Button/Button.cjs.map +1 -1
  154. package/dist/components/Button/Button.d.ts.map +1 -1
  155. package/dist/components/Button/Button.mjs +7 -8
  156. package/dist/components/Button/Button.mjs.map +1 -1
  157. package/dist/components/Container/index.cjs +2 -2
  158. package/dist/components/Container/index.cjs.map +1 -1
  159. package/dist/components/Container/index.mjs +2 -2
  160. package/dist/components/Container/index.mjs.map +1 -1
  161. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  162. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
  163. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  164. package/dist/components/DictionaryEditor/index.cjs +4 -0
  165. package/dist/components/DictionaryEditor/index.cjs.map +1 -1
  166. package/dist/components/DictionaryEditor/index.mjs +4 -0
  167. package/dist/components/DictionaryEditor/index.mjs.map +1 -1
  168. package/dist/components/DictionaryEditor/useEditedContentStore.cjs +3 -0
  169. package/dist/components/DictionaryEditor/useEditedContentStore.cjs.map +1 -1
  170. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts +2 -2
  171. package/dist/components/DictionaryEditor/useEditedContentStore.d.ts.map +1 -1
  172. package/dist/components/DictionaryEditor/useEditedContentStore.mjs +3 -0
  173. package/dist/components/DictionaryEditor/useEditedContentStore.mjs.map +1 -1
  174. package/dist/components/DictionaryEditor/useEditionPanelStore.cjs.map +1 -1
  175. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts +1 -1
  176. package/dist/components/DictionaryEditor/useEditionPanelStore.d.ts.map +1 -1
  177. package/dist/components/DictionaryEditor/useEditionPanelStore.mjs.map +1 -1
  178. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs +60 -6
  179. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.cjs.map +1 -1
  180. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.d.ts.map +1 -1
  181. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs +60 -6
  182. package/dist/components/DictionaryEditor/validDictionaryChangeButtons.content.mjs.map +1 -1
  183. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs +7 -5
  184. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  185. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +1 -0
  186. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  187. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +7 -5
  188. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  189. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs +22 -2
  190. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.cjs.map +1 -1
  191. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.d.ts.map +1 -1
  192. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs +22 -2
  193. package/dist/components/DictionaryFieldEditor/DictionariesSelector/dictionariesSelector.content.mjs.map +1 -1
  194. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +14 -6
  195. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  196. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +14 -6
  197. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  198. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs +151 -21
  199. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
  200. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts.map +1 -1
  201. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs +151 -21
  202. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
  203. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +27 -0
  204. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -0
  205. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs +71 -0
  206. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs.map +1 -0
  207. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +11 -0
  208. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -0
  209. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs +71 -0
  210. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -0
  211. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/{dictionaryFormSchema.d.ts → useDictionaryFormSchema.d.ts} +3 -3
  212. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -0
  213. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +27 -0
  214. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -0
  215. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +24 -16
  216. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  217. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +24 -16
  218. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  219. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +176 -16
  220. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  221. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  222. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +176 -16
  223. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  224. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +44 -0
  225. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -0
  226. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs +176 -0
  227. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -0
  228. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +17 -0
  229. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -0
  230. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +176 -0
  231. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -0
  232. package/dist/components/DictionaryFieldEditor/DictionaryDetails/{DictionaryDetailsSchema.d.ts → useDictionaryDetailsSchema.d.ts} +3 -3
  233. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -0
  234. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +44 -0
  235. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -0
  236. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +6 -3
  237. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  238. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
  239. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  240. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +6 -3
  241. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  242. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs +2 -2
  243. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.cjs.map +1 -1
  244. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +2 -2
  245. package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs.map +1 -1
  246. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs +20 -18
  247. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  248. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts +1 -0
  249. package/dist/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  250. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs +20 -18
  251. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  252. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs +10 -2
  253. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  254. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts +2 -0
  255. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.d.ts.map +1 -1
  256. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs +10 -2
  257. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  258. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +121 -11
  259. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  260. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
  261. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +121 -11
  262. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  263. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs +10 -14
  264. package/dist/components/DictionaryFieldEditor/NodeEditor.cjs.map +1 -1
  265. package/dist/components/DictionaryFieldEditor/NodeEditor.d.ts.map +1 -1
  266. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs +10 -14
  267. package/dist/components/DictionaryFieldEditor/NodeEditor.mjs.map +1 -1
  268. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +63 -20
  269. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  270. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  271. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +66 -23
  272. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  273. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +98 -6
  274. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  275. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +4 -0
  276. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  277. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +98 -6
  278. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  279. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs +44 -4
  280. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
  281. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts.map +1 -1
  282. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs +44 -4
  283. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
  284. package/dist/components/DictionaryFieldEditor/editorView.content.cjs +77 -7
  285. package/dist/components/DictionaryFieldEditor/editorView.content.cjs.map +1 -1
  286. package/dist/components/DictionaryFieldEditor/editorView.content.d.ts.map +1 -1
  287. package/dist/components/DictionaryFieldEditor/editorView.content.mjs +77 -7
  288. package/dist/components/DictionaryFieldEditor/editorView.content.mjs.map +1 -1
  289. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs +66 -6
  290. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
  291. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
  292. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs +66 -6
  293. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
  294. package/dist/components/DropDown/index.cjs.map +1 -1
  295. package/dist/components/DropDown/index.d.ts +18 -1
  296. package/dist/components/DropDown/index.d.ts.map +1 -1
  297. package/dist/components/DropDown/index.mjs.map +1 -1
  298. package/dist/components/Headers/index.cjs +1 -1
  299. package/dist/components/Headers/index.cjs.map +1 -1
  300. package/dist/components/Headers/index.mjs +1 -1
  301. package/dist/components/Headers/index.mjs.map +1 -1
  302. package/dist/components/IDE/CodeRender copy.cjs +141 -0
  303. package/dist/components/IDE/CodeRender copy.cjs.map +1 -0
  304. package/dist/components/IDE/CodeRender copy.d.ts +14 -0
  305. package/dist/components/IDE/CodeRender copy.d.ts.map +1 -0
  306. package/dist/components/IDE/CodeRender copy.mjs +141 -0
  307. package/dist/components/IDE/CodeRender copy.mjs.map +1 -0
  308. package/dist/components/IDE/CodeRender.cjs +39 -625
  309. package/dist/components/IDE/CodeRender.cjs.map +1 -1
  310. package/dist/components/IDE/CodeRender.d.ts +4 -5
  311. package/dist/components/IDE/CodeRender.d.ts.map +1 -1
  312. package/dist/components/IDE/CodeRender.mjs +40 -604
  313. package/dist/components/IDE/CodeRender.mjs.map +1 -1
  314. package/dist/components/IDE/CopyButton.cjs +40 -0
  315. package/dist/components/IDE/CopyButton.cjs.map +1 -0
  316. package/dist/components/IDE/CopyButton.content.cjs +26 -0
  317. package/dist/components/IDE/CopyButton.content.cjs.map +1 -0
  318. package/dist/components/IDE/CopyButton.content.d.ts +8 -0
  319. package/dist/components/IDE/CopyButton.content.d.ts.map +1 -0
  320. package/dist/components/IDE/CopyButton.content.mjs +26 -0
  321. package/dist/components/IDE/CopyButton.content.mjs.map +1 -0
  322. package/dist/components/IDE/CopyButton.d.ts +7 -0
  323. package/dist/components/IDE/CopyButton.d.ts.map +1 -0
  324. package/dist/components/IDE/CopyButton.mjs +40 -0
  325. package/dist/components/IDE/CopyButton.mjs.map +1 -0
  326. package/dist/components/IDE/IDE.cjs +1 -1
  327. package/dist/components/IDE/IDE.cjs.map +1 -1
  328. package/dist/components/IDE/IDE.mjs +1 -1
  329. package/dist/components/IDE/IDE.mjs.map +1 -1
  330. package/dist/components/IDE/MarkDownRender.cjs +10 -2
  331. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  332. package/dist/components/IDE/MarkDownRender.d.ts.map +1 -1
  333. package/dist/components/IDE/MarkDownRender.mjs +10 -2
  334. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  335. package/dist/components/IDE/MonacoCode.cjs +129 -0
  336. package/dist/components/IDE/MonacoCode.cjs.map +1 -0
  337. package/dist/components/IDE/MonacoCode.d.ts +14 -0
  338. package/dist/components/IDE/MonacoCode.d.ts.map +1 -0
  339. package/dist/components/IDE/MonacoCode.mjs +129 -0
  340. package/dist/components/IDE/MonacoCode.mjs.map +1 -0
  341. package/dist/components/Link/Link.cjs +50 -31
  342. package/dist/components/Link/Link.cjs.map +1 -1
  343. package/dist/components/Link/Link.d.ts +3 -0
  344. package/dist/components/Link/Link.d.ts.map +1 -1
  345. package/dist/components/Link/Link.mjs +51 -32
  346. package/dist/components/Link/Link.mjs.map +1 -1
  347. package/dist/components/Link/index.cjs +1 -0
  348. package/dist/components/Link/index.cjs.map +1 -1
  349. package/dist/components/Link/index.mjs +3 -2
  350. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +122 -42
  351. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  352. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts +2 -0
  353. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  354. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +123 -43
  355. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  356. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +86 -0
  357. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -0
  358. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +14 -0
  359. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -0
  360. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +87 -0
  361. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -0
  362. package/dist/components/MarkDownRender/index.cjs +4 -2
  363. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  364. package/dist/components/MarkDownRender/index.d.ts +3 -1
  365. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  366. package/dist/components/MarkDownRender/index.mjs +4 -2
  367. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  368. package/dist/components/Modal/Modal.cjs +8 -10
  369. package/dist/components/Modal/Modal.cjs.map +1 -1
  370. package/dist/components/Modal/Modal.d.ts.map +1 -1
  371. package/dist/components/Modal/Modal.mjs +8 -10
  372. package/dist/components/Modal/Modal.mjs.map +1 -1
  373. package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
  374. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  375. package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
  376. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  377. package/dist/components/index.cjs +13 -8
  378. package/dist/components/index.cjs.map +1 -1
  379. package/dist/components/index.mjs +14 -9
  380. package/dist/components/index.mjs.map +1 -1
  381. package/dist/design-system.css +235 -0
  382. package/dist/hooks/index.cjs +6 -0
  383. package/dist/hooks/index.cjs.map +1 -1
  384. package/dist/hooks/index.d.ts +1 -0
  385. package/dist/hooks/index.d.ts.map +1 -1
  386. package/dist/hooks/index.mjs +7 -1
  387. package/dist/hooks/index.mjs.map +1 -1
  388. package/dist/hooks/intlayerAPIHooks.cjs +8 -2
  389. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  390. package/dist/hooks/intlayerAPIHooks.d.ts +4 -0
  391. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  392. package/dist/hooks/intlayerAPIHooks.mjs +8 -2
  393. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  394. package/dist/hooks/useAsync/index.cjs +3 -0
  395. package/dist/hooks/useAsync/index.cjs.map +1 -1
  396. package/dist/hooks/useAsync/index.d.ts +1 -0
  397. package/dist/hooks/useAsync/index.d.ts.map +1 -1
  398. package/dist/hooks/useAsync/index.mjs +4 -1
  399. package/dist/hooks/useAsync/index.mjs.map +1 -1
  400. package/dist/hooks/useAsync/useAsync.cjs +2 -9
  401. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  402. package/dist/hooks/useAsync/useAsync.d.ts.map +1 -1
  403. package/dist/hooks/useAsync/useAsync.mjs +3 -10
  404. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  405. package/dist/hooks/useAsync/useAsyncStateStore.cjs +123 -69
  406. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  407. package/dist/hooks/useAsync/useAsyncStateStore.d.ts +35 -11
  408. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  409. package/dist/hooks/useAsync/useAsyncStateStore.mjs +123 -69
  410. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  411. package/dist/hooks/useIntlayerAPI.d.ts +3 -0
  412. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  413. package/dist/hooks/useIsDarkMode.cjs +15 -0
  414. package/dist/hooks/useIsDarkMode.cjs.map +1 -0
  415. package/dist/hooks/useIsDarkMode.d.ts +2 -0
  416. package/dist/hooks/useIsDarkMode.d.ts.map +1 -0
  417. package/dist/hooks/useIsDarkMode.mjs +15 -0
  418. package/dist/hooks/useIsDarkMode.mjs.map +1 -0
  419. package/dist/libs/intlayer-api/ai.cjs +24 -0
  420. package/dist/libs/intlayer-api/ai.cjs.map +1 -0
  421. package/dist/libs/intlayer-api/ai.d.ts +10 -0
  422. package/dist/libs/intlayer-api/ai.d.ts.map +1 -0
  423. package/dist/libs/intlayer-api/ai.mjs +24 -0
  424. package/dist/libs/intlayer-api/ai.mjs.map +1 -0
  425. package/dist/libs/intlayer-api/index.cjs +3 -1
  426. package/dist/libs/intlayer-api/index.cjs.map +1 -1
  427. package/dist/libs/intlayer-api/index.d.ts +6 -0
  428. package/dist/libs/intlayer-api/index.d.ts.map +1 -1
  429. package/dist/libs/intlayer-api/index.mjs +3 -1
  430. package/dist/libs/intlayer-api/index.mjs.map +1 -1
  431. package/dist/tailwind.css +1 -1
  432. package/package.json +19 -16
  433. package/dist/__vite-browser-external-SDi5tJh6.cjs +0 -4
  434. package/dist/__vite-browser-external-SDi5tJh6.cjs.map +0 -1
  435. package/dist/__vite-browser-external-r74dyCO2.js +0 -5
  436. package/dist/__vite-browser-external-r74dyCO2.js.map +0 -1
  437. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs +0 -66
  438. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.cjs.map +0 -1
  439. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.d.ts.map +0 -1
  440. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs +0 -66
  441. package/dist/components/Auth/ChangePasswordForm/ChangePasswordSchema.mjs.map +0 -1
  442. package/dist/components/Auth/ChangePasswordForm/index.content.cjs +0 -67
  443. package/dist/components/Auth/ChangePasswordForm/index.content.cjs.map +0 -1
  444. package/dist/components/Auth/ChangePasswordForm/index.content.d.ts +0 -23
  445. package/dist/components/Auth/ChangePasswordForm/index.content.d.ts.map +0 -1
  446. package/dist/components/Auth/ChangePasswordForm/index.content.mjs +0 -67
  447. package/dist/components/Auth/ChangePasswordForm/index.content.mjs.map +0 -1
  448. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs +0 -29
  449. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.cjs.map +0 -1
  450. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts +0 -10
  451. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.d.ts.map +0 -1
  452. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs +0 -29
  453. package/dist/components/Auth/ResetPasswordForm/ResetPasswordSchema.mjs.map +0 -1
  454. package/dist/components/Auth/ResetPasswordForm/index.content.cjs +0 -50
  455. package/dist/components/Auth/ResetPasswordForm/index.content.cjs.map +0 -1
  456. package/dist/components/Auth/ResetPasswordForm/index.content.d.ts +0 -18
  457. package/dist/components/Auth/ResetPasswordForm/index.content.d.ts.map +0 -1
  458. package/dist/components/Auth/ResetPasswordForm/index.content.mjs +0 -50
  459. package/dist/components/Auth/ResetPasswordForm/index.content.mjs.map +0 -1
  460. package/dist/components/Auth/SignInForm/SignInSchema.cjs +0 -38
  461. package/dist/components/Auth/SignInForm/SignInSchema.cjs.map +0 -1
  462. package/dist/components/Auth/SignInForm/SignInSchema.d.ts.map +0 -1
  463. package/dist/components/Auth/SignInForm/SignInSchema.mjs +0 -38
  464. package/dist/components/Auth/SignInForm/SignInSchema.mjs.map +0 -1
  465. package/dist/components/Auth/SignInForm/index.content.cjs +0 -84
  466. package/dist/components/Auth/SignInForm/index.content.cjs.map +0 -1
  467. package/dist/components/Auth/SignInForm/index.content.d.ts +0 -28
  468. package/dist/components/Auth/SignInForm/index.content.d.ts.map +0 -1
  469. package/dist/components/Auth/SignInForm/index.content.mjs +0 -84
  470. package/dist/components/Auth/SignInForm/index.content.mjs.map +0 -1
  471. package/dist/components/Auth/SignUpForm/SignUpSchema.cjs +0 -61
  472. package/dist/components/Auth/SignUpForm/SignUpSchema.cjs.map +0 -1
  473. package/dist/components/Auth/SignUpForm/SignUpSchema.d.ts.map +0 -1
  474. package/dist/components/Auth/SignUpForm/SignUpSchema.mjs +0 -61
  475. package/dist/components/Auth/SignUpForm/SignUpSchema.mjs.map +0 -1
  476. package/dist/components/Auth/SignUpForm/index.content.cjs +0 -72
  477. package/dist/components/Auth/SignUpForm/index.content.cjs.map +0 -1
  478. package/dist/components/Auth/SignUpForm/index.content.d.ts +0 -24
  479. package/dist/components/Auth/SignUpForm/index.content.d.ts.map +0 -1
  480. package/dist/components/Auth/SignUpForm/index.content.mjs +0 -72
  481. package/dist/components/Auth/SignUpForm/index.content.mjs.map +0 -1
  482. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs +0 -40
  483. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.cjs.map +0 -1
  484. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts.map +0 -1
  485. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs +0 -40
  486. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.mjs.map +0 -1
  487. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs +0 -85
  488. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.cjs.map +0 -1
  489. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts.map +0 -1
  490. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs +0 -85
  491. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.mjs.map +0 -1
  492. package/dist/tailwind.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CodeRender.mjs","sources":["../../../../../../node_modules/.pnpm/react-syntax-highlighter@15.6.1_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/styles/prism/okaidia.js","../../../../../../node_modules/.pnpm/react-syntax-highlighter@15.6.1_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/styles/prism/coldark-cold.js","../../../src/components/IDE/CodeRender.tsx"],"sourcesContent":["export default {\n \"code[class*=\\\"language-\\\"]\": {\n \"color\": \"#f8f8f2\",\n \"background\": \"none\",\n \"textShadow\": \"0 1px rgba(0, 0, 0, 0.3)\",\n \"fontFamily\": \"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace\",\n \"fontSize\": \"1em\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\"\n },\n \"pre[class*=\\\"language-\\\"]\": {\n \"color\": \"#f8f8f2\",\n \"background\": \"#272822\",\n \"textShadow\": \"0 1px rgba(0, 0, 0, 0.3)\",\n \"fontFamily\": \"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace\",\n \"fontSize\": \"1em\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\",\n \"padding\": \"1em\",\n \"margin\": \".5em 0\",\n \"overflow\": \"auto\",\n \"borderRadius\": \"0.3em\"\n },\n \":not(pre) > code[class*=\\\"language-\\\"]\": {\n \"background\": \"#272822\",\n \"padding\": \".1em\",\n \"borderRadius\": \".3em\",\n \"whiteSpace\": \"normal\"\n },\n \"comment\": {\n \"color\": \"#8292a2\"\n },\n \"prolog\": {\n \"color\": \"#8292a2\"\n },\n \"doctype\": {\n \"color\": \"#8292a2\"\n },\n \"cdata\": {\n \"color\": \"#8292a2\"\n },\n \"punctuation\": {\n \"color\": \"#f8f8f2\"\n },\n \"namespace\": {\n \"Opacity\": \".7\"\n },\n \"property\": {\n \"color\": \"#f92672\"\n },\n \"tag\": {\n \"color\": \"#f92672\"\n },\n \"constant\": {\n \"color\": \"#f92672\"\n },\n \"symbol\": {\n \"color\": \"#f92672\"\n },\n \"deleted\": {\n \"color\": \"#f92672\"\n },\n \"boolean\": {\n \"color\": \"#ae81ff\"\n },\n \"number\": {\n \"color\": \"#ae81ff\"\n },\n \"selector\": {\n \"color\": \"#a6e22e\"\n },\n \"attr-name\": {\n \"color\": \"#a6e22e\"\n },\n \"string\": {\n \"color\": \"#a6e22e\"\n },\n \"char\": {\n \"color\": \"#a6e22e\"\n },\n \"builtin\": {\n \"color\": \"#a6e22e\"\n },\n \"inserted\": {\n \"color\": \"#a6e22e\"\n },\n \"operator\": {\n \"color\": \"#f8f8f2\"\n },\n \"entity\": {\n \"color\": \"#f8f8f2\",\n \"cursor\": \"help\"\n },\n \"url\": {\n \"color\": \"#f8f8f2\"\n },\n \".language-css .token.string\": {\n \"color\": \"#f8f8f2\"\n },\n \".style .token.string\": {\n \"color\": \"#f8f8f2\"\n },\n \"variable\": {\n \"color\": \"#f8f8f2\"\n },\n \"atrule\": {\n \"color\": \"#e6db74\"\n },\n \"attr-value\": {\n \"color\": \"#e6db74\"\n },\n \"function\": {\n \"color\": \"#e6db74\"\n },\n \"class-name\": {\n \"color\": \"#e6db74\"\n },\n \"keyword\": {\n \"color\": \"#66d9ef\"\n },\n \"regex\": {\n \"color\": \"#fd971f\"\n },\n \"important\": {\n \"color\": \"#fd971f\",\n \"fontWeight\": \"bold\"\n },\n \"bold\": {\n \"fontWeight\": \"bold\"\n },\n \"italic\": {\n \"fontStyle\": \"italic\"\n }\n};","export default {\n \"code[class*=\\\"language-\\\"]\": {\n \"color\": \"#111b27\",\n \"background\": \"none\",\n \"fontFamily\": \"Consolas, Monaco, \\\"Andale Mono\\\", \\\"Ubuntu Mono\\\", monospace\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\"\n },\n \"pre[class*=\\\"language-\\\"]\": {\n \"color\": \"#111b27\",\n \"background\": \"#e3eaf2\",\n \"fontFamily\": \"Consolas, Monaco, \\\"Andale Mono\\\", \\\"Ubuntu Mono\\\", monospace\",\n \"textAlign\": \"left\",\n \"whiteSpace\": \"pre\",\n \"wordSpacing\": \"normal\",\n \"wordBreak\": \"normal\",\n \"wordWrap\": \"normal\",\n \"lineHeight\": \"1.5\",\n \"MozTabSize\": \"4\",\n \"OTabSize\": \"4\",\n \"tabSize\": \"4\",\n \"WebkitHyphens\": \"none\",\n \"MozHyphens\": \"none\",\n \"msHyphens\": \"none\",\n \"hyphens\": \"none\",\n \"padding\": \"1em\",\n \"margin\": \"0.5em 0\",\n \"overflow\": \"auto\"\n },\n \"pre[class*=\\\"language-\\\"]::-moz-selection\": {\n \"background\": \"#8da1b9\"\n },\n \"pre[class*=\\\"language-\\\"] ::-moz-selection\": {\n \"background\": \"#8da1b9\"\n },\n \"code[class*=\\\"language-\\\"]::-moz-selection\": {\n \"background\": \"#8da1b9\"\n },\n \"code[class*=\\\"language-\\\"] ::-moz-selection\": {\n \"background\": \"#8da1b9\"\n },\n \"pre[class*=\\\"language-\\\"]::selection\": {\n \"background\": \"#8da1b9\"\n },\n \"pre[class*=\\\"language-\\\"] ::selection\": {\n \"background\": \"#8da1b9\"\n },\n \"code[class*=\\\"language-\\\"]::selection\": {\n \"background\": \"#8da1b9\"\n },\n \"code[class*=\\\"language-\\\"] ::selection\": {\n \"background\": \"#8da1b9\"\n },\n \":not(pre) > code[class*=\\\"language-\\\"]\": {\n \"background\": \"#e3eaf2\",\n \"padding\": \"0.1em 0.3em\",\n \"borderRadius\": \"0.3em\",\n \"whiteSpace\": \"normal\"\n },\n \"comment\": {\n \"color\": \"#3c526d\"\n },\n \"prolog\": {\n \"color\": \"#3c526d\"\n },\n \"doctype\": {\n \"color\": \"#3c526d\"\n },\n \"cdata\": {\n \"color\": \"#3c526d\"\n },\n \"punctuation\": {\n \"color\": \"#111b27\"\n },\n \"delimiter.important\": {\n \"color\": \"#006d6d\",\n \"fontWeight\": \"inherit\"\n },\n \"selector.parent\": {\n \"color\": \"#006d6d\"\n },\n \"tag\": {\n \"color\": \"#006d6d\"\n },\n \"tag.punctuation\": {\n \"color\": \"#006d6d\"\n },\n \"attr-name\": {\n \"color\": \"#755f00\"\n },\n \"boolean\": {\n \"color\": \"#755f00\"\n },\n \"boolean.important\": {\n \"color\": \"#755f00\"\n },\n \"number\": {\n \"color\": \"#755f00\"\n },\n \"constant\": {\n \"color\": \"#755f00\"\n },\n \"selector.attribute\": {\n \"color\": \"#755f00\"\n },\n \"class-name\": {\n \"color\": \"#005a8e\"\n },\n \"key\": {\n \"color\": \"#005a8e\"\n },\n \"parameter\": {\n \"color\": \"#005a8e\"\n },\n \"property\": {\n \"color\": \"#005a8e\"\n },\n \"property-access\": {\n \"color\": \"#005a8e\"\n },\n \"variable\": {\n \"color\": \"#005a8e\"\n },\n \"attr-value\": {\n \"color\": \"#116b00\"\n },\n \"inserted\": {\n \"color\": \"#116b00\"\n },\n \"color\": {\n \"color\": \"#116b00\"\n },\n \"selector.value\": {\n \"color\": \"#116b00\"\n },\n \"string\": {\n \"color\": \"#116b00\"\n },\n \"string.url-link\": {\n \"color\": \"#116b00\"\n },\n \"builtin\": {\n \"color\": \"#af00af\"\n },\n \"keyword-array\": {\n \"color\": \"#af00af\"\n },\n \"package\": {\n \"color\": \"#af00af\"\n },\n \"regex\": {\n \"color\": \"#af00af\"\n },\n \"function\": {\n \"color\": \"#7c00aa\"\n },\n \"selector.class\": {\n \"color\": \"#7c00aa\"\n },\n \"selector.id\": {\n \"color\": \"#7c00aa\"\n },\n \"atrule.rule\": {\n \"color\": \"#a04900\"\n },\n \"combinator\": {\n \"color\": \"#a04900\"\n },\n \"keyword\": {\n \"color\": \"#a04900\"\n },\n \"operator\": {\n \"color\": \"#a04900\"\n },\n \"pseudo-class\": {\n \"color\": \"#a04900\"\n },\n \"pseudo-element\": {\n \"color\": \"#a04900\"\n },\n \"selector\": {\n \"color\": \"#a04900\"\n },\n \"unit\": {\n \"color\": \"#a04900\"\n },\n \"deleted\": {\n \"color\": \"#c22f2e\"\n },\n \"important\": {\n \"color\": \"#c22f2e\",\n \"fontWeight\": \"bold\"\n },\n \"keyword-this\": {\n \"color\": \"#005a8e\",\n \"fontWeight\": \"bold\"\n },\n \"this\": {\n \"color\": \"#005a8e\",\n \"fontWeight\": \"bold\"\n },\n \"bold\": {\n \"fontWeight\": \"bold\"\n },\n \"italic\": {\n \"fontStyle\": \"italic\"\n },\n \"entity\": {\n \"cursor\": \"help\"\n },\n \".language-markdown .token.title\": {\n \"color\": \"#005a8e\",\n \"fontWeight\": \"bold\"\n },\n \".language-markdown .token.title .token.punctuation\": {\n \"color\": \"#005a8e\",\n \"fontWeight\": \"bold\"\n },\n \".language-markdown .token.blockquote.punctuation\": {\n \"color\": \"#af00af\"\n },\n \".language-markdown .token.code\": {\n \"color\": \"#006d6d\"\n },\n \".language-markdown .token.hr.punctuation\": {\n \"color\": \"#005a8e\"\n },\n \".language-markdown .token.url > .token.content\": {\n \"color\": \"#116b00\"\n },\n \".language-markdown .token.url-link\": {\n \"color\": \"#755f00\"\n },\n \".language-markdown .token.list.punctuation\": {\n \"color\": \"#af00af\"\n },\n \".language-markdown .token.table-header\": {\n \"color\": \"#111b27\"\n },\n \".language-json .token.operator\": {\n \"color\": \"#111b27\"\n },\n \".language-scss .token.variable\": {\n \"color\": \"#006d6d\"\n },\n \"token.tab:not(:empty):before\": {\n \"color\": \"#3c526d\"\n },\n \"token.cr:before\": {\n \"color\": \"#3c526d\"\n },\n \"token.lf:before\": {\n \"color\": \"#3c526d\"\n },\n \"token.space:before\": {\n \"color\": \"#3c526d\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#005a8e\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#005a8e\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#005a8eda\",\n \"textDecoration\": \"none\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#005a8eda\",\n \"textDecoration\": \"none\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#005a8eda\",\n \"textDecoration\": \"none\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#005a8eda\",\n \"textDecoration\": \"none\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#3c526d\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#3c526d\"\n },\n \"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus\": {\n \"color\": \"#e3eaf2\",\n \"background\": \"#3c526d\"\n },\n \".line-highlight.line-highlight\": {\n \"background\": \"linear-gradient(to right, #8da1b92f 70%, #8da1b925)\"\n },\n \".line-highlight.line-highlight:before\": {\n \"backgroundColor\": \"#3c526d\",\n \"color\": \"#e3eaf2\",\n \"boxShadow\": \"0 1px #8da1b9\"\n },\n \".line-highlight.line-highlight[data-end]:after\": {\n \"backgroundColor\": \"#3c526d\",\n \"color\": \"#e3eaf2\",\n \"boxShadow\": \"0 1px #8da1b9\"\n },\n \"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before\": {\n \"backgroundColor\": \"#3c526d1f\"\n },\n \".line-numbers.line-numbers .line-numbers-rows\": {\n \"borderRight\": \"1px solid #8da1b97a\",\n \"background\": \"#d0dae77a\"\n },\n \".line-numbers .line-numbers-rows > span:before\": {\n \"color\": \"#3c526dda\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-1\": {\n \"color\": \"#755f00\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-5\": {\n \"color\": \"#755f00\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-9\": {\n \"color\": \"#755f00\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-2\": {\n \"color\": \"#af00af\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-6\": {\n \"color\": \"#af00af\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-10\": {\n \"color\": \"#af00af\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-3\": {\n \"color\": \"#005a8e\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-7\": {\n \"color\": \"#005a8e\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-11\": {\n \"color\": \"#005a8e\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-4\": {\n \"color\": \"#7c00aa\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-8\": {\n \"color\": \"#7c00aa\"\n },\n \".rainbow-braces .token.token.punctuation.brace-level-12\": {\n \"color\": \"#7c00aa\"\n },\n \"pre.diff-highlight > code .token.token.deleted:not(.prefix)\": {\n \"backgroundColor\": \"#c22f2e1f\"\n },\n \"pre > code.diff-highlight .token.token.deleted:not(.prefix)\": {\n \"backgroundColor\": \"#c22f2e1f\"\n },\n \"pre.diff-highlight > code .token.token.inserted:not(.prefix)\": {\n \"backgroundColor\": \"#116b001f\"\n },\n \"pre > code.diff-highlight .token.token.inserted:not(.prefix)\": {\n \"backgroundColor\": \"#116b001f\"\n },\n \".command-line .command-line-prompt\": {\n \"borderRight\": \"1px solid #8da1b97a\"\n },\n \".command-line .command-line-prompt > span:before\": {\n \"color\": \"#3c526dda\"\n }\n};","'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport {\n type FC,\n useEffect,\n useState,\n lazy,\n Suspense,\n type ReactNode,\n} from 'react';\nimport CopyToClipboard from 'react-copy-to-clipboard';\nimport {\n okaidia,\n coldarkCold,\n} from 'react-syntax-highlighter/dist/esm/styles/prism';\nimport { cn } from '../../utils/cn';\nimport { Loader } from '../Loader';\n\nconst SyntaxHighlighter = lazy(() =>\n import('react-syntax-highlighter').then((module) => ({\n default: module.Prism,\n }))\n);\n\ntype CodeCompProps = {\n children: string;\n language: string;\n isDarkMode?: boolean;\n showLineNumbers?: boolean;\n};\n\nexport const Code: FC<CodeCompProps> = ({\n children,\n language,\n isDarkMode,\n showLineNumbers = true,\n ...props\n}) => {\n const [isDarkModeState, setIsDarkModeState] = useState(false);\n const [copied, setCopied] = useState(false);\n\n useEffect(\n () =>\n // Necessary to fix first render bug\n setIsDarkModeState(isDarkMode ?? false),\n [isDarkMode]\n );\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <div\n className={cn(\n 'relative h-full w-full text-sm',\n showLineNumbers && 'ml-0'\n )}\n >\n <CopyToClipboard text={children} onCopy={() => setCopied(true)}>\n <button className=\"absolute right-3 top-3\" aria-label=\"Copy code\">\n {copied ? (\n <CopyCheckIcon className=\"size-4\" />\n ) : (\n <CopyIcon className=\"size-4\" />\n )}\n </button>\n </CopyToClipboard>\n <div className=\"grid size-full grid-cols-[0px] overflow-auto p-3\">\n <Suspense fallback={<Loader />}>\n <SyntaxHighlighter\n customStyle={{\n display: undefined,\n overflowX: 'auto',\n overflowY: 'auto',\n padding: undefined,\n color: undefined,\n background: 'inherit',\n margin: undefined,\n }}\n PreTag={(props: { children: ReactNode }) => props.children}\n language={language ?? 'javascript'}\n style={isDarkModeState ? okaidia : coldarkCold}\n showLineNumbers={showLineNumbers}\n {...props}\n >\n {String(children).replace(/\\n$/, '')}\n </SyntaxHighlighter>\n </Suspense>\n </div>\n </div>\n );\n};\n"],"names":["jsxs","jsx","props"],"mappings":";;;;;;;AAAA,MAAe,UAAA;AAAA,EACb,4BAA8B;AAAA,IAC5B,SAAS;AAAA,IACT,cAAc;AAAA,IACd,cAAc;AAAA,IACd,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,cAAc;AAAA,IACd,eAAe;AAAA,IACf,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,aAAa;AAAA,IACb,WAAW;AAAA,EACZ;AAAA,EACD,2BAA6B;AAAA,IAC3B,SAAS;AAAA,IACT,cAAc;AAAA,IACd,cAAc;AAAA,IACd,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,cAAc;AAAA,IACd,eAAe;AAAA,IACf,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,cAA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AA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA,UAAA;AAAA,QAACC,kCAAA,IAAA,iBAAA,EAAgB,MAAM,UAAU,QAAQ,MAAM,UAAU,IAAI,GAC3D,UAACA,kCAAAA,IAAA,UAAA,EAAO,WAAU,0BAAyB,cAAW,aACnD,UAAA,SACEA,kCAAA,IAAA,eAAA,EAAc,WAAU,SAAS,CAAA,IAElCA,kCAAAA,IAAC,UAAS,EAAA,WAAU,SAAS,CAAA,EAAA,CAEjC,EACF,CAAA;AAAA,QACAA,kCAAAA,IAAC,SAAI,WAAU,oDACb,gDAAC,UAAS,EAAA,UAAWA,kCAAAA,IAAA,QAAA,CAAA,CAAO,GAC1B,UAAAA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,aAAa;AAAA,cACX,SAAS;AAAA,cACT,WAAW;AAAA,cACX,WAAW;AAAA,cACX,SAAS;AAAA,cACT,OAAO;AAAA,cACP,YAAY;AAAA,cACZ,QAAQ;AAAA,YACV;AAAA,YACA,QAAQ,CAACC,WAAmCA,OAAM;AAAA,YAClD,UAAU,YAAY;AAAA,YACtB,OAAO,kBAAkB,UAAU;AAAA,YACnC;AAAA,YACC,GAAG;AAAA,YAEH,UAAO,OAAA,QAAQ,EAAE,QAAQ,OAAO,EAAE;AAAA,UAAA;AAAA,WAEvC,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"CodeRender.mjs","sources":["../../../src/components/IDE/CodeRender.tsx"],"sourcesContent":["'use client';\n\nimport highlight from 'highlight.js';\nimport { forwardRef, type HTMLAttributes, useEffect, useRef } from 'react';\nimport { cn } from '../../utils/cn';\nimport { CopyButton } from './CopyButton';\n\ntype CodeCompProps = {\n children: string;\n language: string;\n isDarkMode?: boolean;\n showHeader?: boolean;\n showLineNumbers?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nexport const Code = forwardRef<HTMLDivElement, CodeCompProps>(\n (\n {\n children,\n language,\n isDarkMode,\n showHeader = true,\n showLineNumbers = true,\n className,\n ...props\n },\n ref\n ) => {\n const codeRef = useRef<HTMLElement>(null);\n\n useEffect(() => {\n if (\n codeRef &&\n codeRef.current &&\n !codeRef.current.hasAttribute('data-highlighted')\n ) {\n highlight.highlightElement(codeRef.current);\n\n if (showLineNumbers) {\n // To implement line numbers, we need to add a new div with the line numbers\n }\n\n // Mark as highlighted so we don't re-highlight\n codeRef.current.setAttribute('data-highlighted', 'true');\n }\n }, [children, showLineNumbers]);\n\n return (\n <div\n className={cn(\n 'relative h-full w-full text-sm leading-6',\n showLineNumbers && 'ml-0',\n className\n )}\n ref={ref}\n {...props}\n >\n {showHeader && (\n <>\n <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\">\n {language ?? 'javascript'}\n </div>\n <div className=\"sticky top-28\">\n <div className=\"absolute bottom-0 right-2 flex h-9 items-center\">\n <CopyButton content={children} />\n </div>\n </div>\n </>\n )}\n <div className=\"grid size-full grid-cols-[0px] overflow-auto p-3\">\n <pre>\n <code className={`language-${language} w-fit`} ref={codeRef}>\n {children}\n </code>\n </pre>\n </div>\n </div>\n );\n }\n);\n\nCode.displayName = 'Code';\n"],"names":["jsxs","Fragment","jsx"],"mappings":";;;;;;AAeO,MAAM,OAAO;AAAA,EAClB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB;AAAA,IACA,GAAG;AAAA,KAEL,QACG;AACG,UAAA,UAAU,OAAoB,IAAI;AAExC,cAAU,MAAM;AAEZ,UAAA,WACA,QAAQ,WACR,CAAC,QAAQ,QAAQ,aAAa,kBAAkB,GAChD;AACU,kBAAA,iBAAiB,QAAQ,OAAO;AAOlC,gBAAA,QAAQ,aAAa,oBAAoB,MAAM;AAAA,MAAA;AAAA,IACzD,GACC,CAAC,UAAU,eAAe,CAAC;AAG5B,WAAAA,kCAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,mBAAmB;AAAA,UACnB;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,cAEGA,kCAAA,KAAAC,4BAAA,EAAA,UAAA;AAAA,YAAAC,kCAAA,IAAC,OAAI,EAAA,WAAU,wHACZ,UAAA,YAAY,cACf;AAAA,YACCA,kCAAA,IAAA,OAAA,EAAI,WAAU,iBACb,UAACA,kCAAAA,IAAA,OAAA,EAAI,WAAU,mDACb,UAACA,kCAAAA,IAAA,YAAA,EAAW,SAAS,SAAA,CAAU,GACjC,EACF,CAAA;AAAA,UAAA,GACF;AAAA,gDAED,OAAI,EAAA,WAAU,oDACb,UAAAA,kCAAAA,IAAC,SACC,UAACA,sCAAA,QAAA,EAAK,WAAW,YAAY,QAAQ,UAAU,KAAK,SACjD,UACH,GACF,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;AAEA,KAAK,cAAc;"}
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
+ const lucideReact = require("lucide-react");
6
+ const require$$0 = require("react");
7
+ const reactIntlayer = require("react-intlayer");
8
+ const components_Button_Button = require("../Button/Button.cjs");
9
+ const components_IDE_CopyButton_content = require("./CopyButton.content.cjs");
10
+ const CopyButton = ({ content }) => {
11
+ const [copied, setCopied] = require$$0.useState(false);
12
+ const { label } = reactIntlayer.useDictionary(components_IDE_CopyButton_content.copyContentContent);
13
+ const handleCopy = async () => {
14
+ try {
15
+ await navigator.clipboard.writeText(content);
16
+ setCopied(true);
17
+ } catch (error) {
18
+ console.error("Failed to copy text: ", error);
19
+ }
20
+ };
21
+ require$$0.useEffect(() => {
22
+ const timer = setTimeout(() => {
23
+ setCopied(false);
24
+ }, 1e3);
25
+ return () => clearTimeout(timer);
26
+ }, [copied]);
27
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
28
+ components_Button_Button.Button,
29
+ {
30
+ Icon: copied ? lucideReact.CopyCheckIcon : lucideReact.CopyIcon,
31
+ onClick: handleCopy,
32
+ variant: "hoverable",
33
+ color: "text",
34
+ label,
35
+ size: "icon-sm"
36
+ }
37
+ );
38
+ };
39
+ exports.CopyButton = CopyButton;
40
+ //# sourceMappingURL=CopyButton.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.cjs","sources":["../../../src/components/IDE/CopyButton.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { copyContentContent } from './CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n};\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n label={label}\n size=\"icon-sm\"\n />\n );\n};\n"],"names":["useState","useDictionary","copyContentContent","useEffect","jsx","Button","CopyCheckIcon","CopyIcon"],"mappings":";;;;;;;;;AAaO,MAAM,aAAkC,CAAC,EAAE,cAAc;AAC9D,QAAM,CAAC,QAAQ,SAAS,IAAIA,WAAAA,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAUC,cAAA,cAAcC,oDAAkB;AAElD,QAAM,aAAa,YAAY;AACzB,QAAA;AACI,YAAA,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,aACP,OAAO;AACN,cAAA,MAAM,yBAAyB,KAAK;AAAA,IAAA;AAAA,EAEhD;AAEAC,aAAAA,UAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,OACd,GAAI;AACA,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,MAAM,CAAC;AAGT,SAAAC,2BAAA,kBAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,MAAM,SAASC,YAAAA,gBAAgBC,YAAA;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN;AAAA,MACA,MAAK;AAAA,IAAA;AAAA,EACP;AAEJ;;"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const intlayer = require("intlayer");
4
+ const copyContentContent = {
5
+ key: "copy-button",
6
+ content: {
7
+ label: intlayer.t({
8
+ en: "Copy content",
9
+ fr: "Copier le contenu",
10
+ es: "Copiar contenido",
11
+ "en-GB": "Copy content",
12
+ de: "Inhalt kopieren",
13
+ ja: "コンテンツをコピー",
14
+ ko: "콘텐츠 복사",
15
+ zh: "复制内容",
16
+ it: "Copia contenuto",
17
+ pt: "Copiar conteúdo",
18
+ hi: "सामग्री कॉपी करें",
19
+ ar: "نسخ المحتوى",
20
+ ru: "Копировать содержимое"
21
+ })
22
+ }
23
+ };
24
+ exports.copyContentContent = copyContentContent;
25
+ exports.default = copyContentContent;
26
+ //# sourceMappingURL=CopyButton.content.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.content.cjs","sources":["../../../src/components/IDE/CopyButton.content.ts"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const copyContentContent = {\n key: 'copy-button',\n content: {\n label: t({\n en: 'Copy content',\n fr: 'Copier le contenu',\n es: 'Copiar contenido',\n 'en-GB': 'Copy content',\n de: 'Inhalt kopieren',\n ja: 'コンテンツをコピー',\n ko: '콘텐츠 복사',\n zh: '复制内容',\n it: 'Copia contenuto',\n pt: 'Copiar conteúdo',\n hi: 'सामग्री कॉपी करें',\n ar: 'نسخ المحتوى',\n ru: 'Копировать содержимое',\n }),\n },\n} satisfies DeclarationContent;\n\nexport default copyContentContent;\n"],"names":["t"],"mappings":";;;AAEO,MAAM,qBAAqB;AAAA,EAChC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAOA,SAAAA,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EAAA;AAEL;;;"}
@@ -0,0 +1,8 @@
1
+ export declare const copyContentContent: {
2
+ key: string;
3
+ content: {
4
+ label: import('@intlayer/core').TranslationContent<string>;
5
+ };
6
+ };
7
+ export default copyContentContent;
8
+ //# sourceMappingURL=CopyButton.content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.content.d.ts","sourceRoot":"","sources":["../../../src/components/IDE/CopyButton.content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;CAmBD,CAAC;AAE/B,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { t } from "intlayer";
2
+ const copyContentContent = {
3
+ key: "copy-button",
4
+ content: {
5
+ label: t({
6
+ en: "Copy content",
7
+ fr: "Copier le contenu",
8
+ es: "Copiar contenido",
9
+ "en-GB": "Copy content",
10
+ de: "Inhalt kopieren",
11
+ ja: "コンテンツをコピー",
12
+ ko: "콘텐츠 복사",
13
+ zh: "复制内容",
14
+ it: "Copia contenuto",
15
+ pt: "Copiar conteúdo",
16
+ hi: "सामग्री कॉपी करें",
17
+ ar: "نسخ المحتوى",
18
+ ru: "Копировать содержимое"
19
+ })
20
+ }
21
+ };
22
+ export {
23
+ copyContentContent,
24
+ copyContentContent as default
25
+ };
26
+ //# sourceMappingURL=CopyButton.content.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.content.mjs","sources":["../../../src/components/IDE/CopyButton.content.ts"],"sourcesContent":["import { t, type DeclarationContent } from 'intlayer';\n\nexport const copyContentContent = {\n key: 'copy-button',\n content: {\n label: t({\n en: 'Copy content',\n fr: 'Copier le contenu',\n es: 'Copiar contenido',\n 'en-GB': 'Copy content',\n de: 'Inhalt kopieren',\n ja: 'コンテンツをコピー',\n ko: '콘텐츠 복사',\n zh: '复制内容',\n it: 'Copia contenuto',\n pt: 'Copiar conteúdo',\n hi: 'सामग्री कॉपी करें',\n ar: 'نسخ المحتوى',\n ru: 'Копировать содержимое',\n }),\n },\n} satisfies DeclarationContent;\n\nexport default copyContentContent;\n"],"names":[],"mappings":";AAEO,MAAM,qBAAqB;AAAA,EAChC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,OAAO,EAAE;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACL,CAAA;AAAA,EAAA;AAEL;"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ type CopyButtonProps = {
3
+ content: string;
4
+ };
5
+ export declare const CopyButton: FC<CopyButtonProps>;
6
+ export {};
7
+ //# sourceMappingURL=CopyButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../../src/components/IDE/CopyButton.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAMrD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8B1C,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { j as jsxRuntimeExports } from "../../jsx-runtime-DaNGiM0W.js";
3
+ import { CopyCheckIcon, CopyIcon } from "lucide-react";
4
+ import { useState, useEffect } from "react";
5
+ import { useDictionary } from "react-intlayer";
6
+ import { Button } from "../Button/Button.mjs";
7
+ import { copyContentContent } from "./CopyButton.content.mjs";
8
+ const CopyButton = ({ content }) => {
9
+ const [copied, setCopied] = useState(false);
10
+ const { label } = useDictionary(copyContentContent);
11
+ const handleCopy = async () => {
12
+ try {
13
+ await navigator.clipboard.writeText(content);
14
+ setCopied(true);
15
+ } catch (error) {
16
+ console.error("Failed to copy text: ", error);
17
+ }
18
+ };
19
+ useEffect(() => {
20
+ const timer = setTimeout(() => {
21
+ setCopied(false);
22
+ }, 1e3);
23
+ return () => clearTimeout(timer);
24
+ }, [copied]);
25
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
26
+ Button,
27
+ {
28
+ Icon: copied ? CopyCheckIcon : CopyIcon,
29
+ onClick: handleCopy,
30
+ variant: "hoverable",
31
+ color: "text",
32
+ label,
33
+ size: "icon-sm"
34
+ }
35
+ );
36
+ };
37
+ export {
38
+ CopyButton
39
+ };
40
+ //# sourceMappingURL=CopyButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.mjs","sources":["../../../src/components/IDE/CopyButton.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\n// @ts-ignore react-intlayer not build yet\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { copyContentContent } from './CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n};\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n label={label}\n size=\"icon-sm\"\n />\n );\n};\n"],"names":["jsx"],"mappings":";;;;;;;AAaO,MAAM,aAAkC,CAAC,EAAE,cAAc;AAC9D,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAU,cAAc,kBAAkB;AAElD,QAAM,aAAa,YAAY;AACzB,QAAA;AACI,YAAA,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,aACP,OAAO;AACN,cAAA,MAAM,yBAAyB,KAAK;AAAA,IAAA;AAAA,EAEhD;AAEA,YAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,OACd,GAAI;AACA,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,MAAM,CAAC;AAGT,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM,SAAS,gBAAgB;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN;AAAA,MACA,MAAK;AAAA,IAAA;AAAA,EACP;AAEJ;"}
@@ -79,7 +79,7 @@ const IDE = ({
79
79
  onClickFile: handleClickFile
80
80
  }
81
81
  ) }),
82
- /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "size-full flex-1 overflow-auto pt-2 text-xs md:text-sm", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_IDE_MarkDownRender.MarkdownRenderer, { isDarkMode, children: content }) })
82
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("div", { className: "size-full flex-1 overflow-auto pt-2 text-xs", children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_IDE_MarkDownRender.MarkdownRenderer, { isDarkMode, children: content }) })
83
83
  ] }) }) })
84
84
  ]
85
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IDE.cjs","sources":["../../../src/components/IDE/IDE.tsx"],"sourcesContent":["'use client';\n\nimport { type HTMLAttributes, useState, type FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\nimport { WithResizer } from '../WithResizer';\nimport { FileTree } from './FileTree';\nimport { MarkdownRenderer } from './MarkDownRender';\n\nexport type IDEProps = {\n pages: {\n path: string;\n content: string;\n isOpen?: boolean;\n }[];\n isDarkMode?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nexport const IDE: FC<IDEProps> = ({\n pages: initialPages,\n isDarkMode,\n className,\n ...props\n}) => {\n const [pages, setPages] = useState(initialPages);\n const tabs = pages.filter(({ isOpen }) => isOpen);\n\n const firstTabIndex = tabs.findIndex(({ isOpen }) => isOpen);\n const [activeTab, setActiveTab] = useState(firstTabIndex);\n\n const { content, path } = pages[activeTab];\n const filePaths = initialPages.map(({ path: title }) => title);\n\n const handleClickFile = (title: string) => {\n const page = pages.find(({ path: tabTitle }) => tabTitle === title);\n if (!page) return;\n\n const newPages = pages.map((page) => {\n if (page.path === title) {\n return { ...page, isOpen: true };\n }\n return page;\n });\n\n setPages(newPages);\n\n const newPageIndex = newPages.findIndex(\n ({ path: tabTitle }) => tabTitle === title\n );\n\n setActiveTab(newPageIndex);\n };\n\n return (\n <Container\n className={cn(\n 'flex size-full flex-col justify-start overflow-hidden shadow-lg',\n className\n )}\n roundedSize=\"3xl\"\n transparency=\"none\"\n {...props}\n >\n <div className=\"text-neutral dark:text-neutral-dark flex w-auto flex-row items-center justify-start gap-1 rounded-t-3xl bg-neutral-200 text-xs dark:bg-neutral-950\">\n <div className=\"mx-2 flex items-center justify-start gap-2 p-1\">\n <div className=\"size-3 rounded-full bg-red-500\" />\n <div className=\"size-3 rounded-full bg-yellow-500\" />\n <div className=\"size-3 rounded-full bg-green-500\" />\n </div>\n <div className=\"flex size-full overflow-y-auto\">\n {tabs.map(({ path }, index) => {\n const fullPath = path.split('/');\n const title = fullPath[fullPath.length - 1];\n const isActive = index === activeTab;\n\n return (\n <button\n className={cn(\n 'flex h-8 min-w-20 items-center justify-start px-3 py-1 transition',\n isActive\n ? 'bg-card dark:bg-card-dark'\n : 'dark:hover:bg-card-dark cursor-pointer bg-neutral-200 hover:bg-neutral-300 dark:bg-neutral-950'\n )}\n key={title}\n onClick={() => setActiveTab(index)}\n >\n {title}\n </button>\n );\n })}\n </div>\n </div>\n <div className=\"relative flex size-full flex-1 flex-row justify-start\">\n <div className=\"absolute left-0 top-0 size-full\">\n <div className=\"flex size-full\">\n <WithResizer initialWidth={150}>\n <FileTree\n filesPaths={filePaths}\n activeFile={path}\n onClickFile={handleClickFile}\n />\n </WithResizer>\n\n <div className=\"size-full flex-1 overflow-auto pt-2 text-xs md:text-sm\">\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n </div>\n </div>\n </div>\n </div>\n </Container>\n );\n};\n"],"names":["useState","page","jsxs","Container","cn","jsx","path","WithResizer","FileTree","MarkdownRenderer"],"mappings":";;;;;;;;;;AAkBO,MAAM,MAAoB,CAAC;AAAA,EAChC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAIA,WAAAA,SAAS,YAAY;A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A,GACpD;AAAA,UACAA,2BAAAA,kBAAAA,IAAC,OAAI,EAAA,WAAU,kCACZ,UAAA,KAAK,IAAI,CAAC,EAAE,MAAAC,MAAK,GAAG,UAAU;AACvB,kBAAA,WAAWA,MAAK,MAAM,GAAG;AAC/B,kBAAM,QAAQ,SAAS,SAAS,SAAS,CAAC;AAC1C,kBAAM,WAAW,UAAU;AAGzB,mBAAAD,2BAAA,kBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWD,SAAA;AAAA,kBACT;AAAA,kBACA,WACI,8BACA;AAAA,gBACN;AAAA,gBAEA,SAAS,MAAM,aAAa,KAAK;AAAA,gBAEhC,UAAA;AAAA,cAAA;AAAA,cAHI;AAAA,YAIP;AAAA,UAAA,CAEH,EACH,CAAA;AAAA,QAAA,GACF;AAAA,QACAC,2BAAA,kBAAA,IAAC,OAAI,EAAA,WAAU,yDACb,UAAAA,2BAAA,kBAAA,IAAC,OAAI,EAAA,WAAU,mCACb,UAAAH,kDAAC,OAAI,EAAA,WAAU,kBACb,UAAA;AAAA,UAACG,2BAAAA,kBAAAA,IAAAE,6BAAAA,aAAA,EAAY,cAAc,KACzB,UAAAF,2BAAA,kBAAA;AAAA,YAACG,wBAAA;AAAA,YAAA;AAAA,cACC,YAAY;AAAA,cACZ,YAAY;AAAA,cACZ,aAAa;AAAA,YAAA;AAAA,UAAA,GAEjB;AAAA,UAEAH,2BAAAA,kBAAAA,IAAC,SAAI,WAAU,0DACb,2DAACI,8BAAAA,kBAAiB,EAAA,YACf,kBACH,CAAA,EACF,CAAA;AAAA,QAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"IDE.cjs","sources":["../../../src/components/IDE/IDE.tsx"],"sourcesContent":["'use client';\n\nimport { type HTMLAttributes, useState, type FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\nimport { WithResizer } from '../WithResizer';\nimport { FileTree } from './FileTree';\nimport { MarkdownRenderer } from './MarkDownRender';\n\nexport type IDEProps = {\n pages: {\n path: string;\n content: string;\n isOpen?: boolean;\n }[];\n isDarkMode?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nexport const IDE: FC<IDEProps> = ({\n pages: initialPages,\n isDarkMode,\n className,\n ...props\n}) => {\n const [pages, setPages] = useState(initialPages);\n const tabs = pages.filter(({ isOpen }) => isOpen);\n\n const firstTabIndex = tabs.findIndex(({ isOpen }) => isOpen);\n const [activeTab, setActiveTab] = useState(firstTabIndex);\n\n const { content, path } = pages[activeTab];\n const filePaths = initialPages.map(({ path: title }) => title);\n\n const handleClickFile = (title: string) => {\n const page = pages.find(({ path: tabTitle }) => tabTitle === title);\n if (!page) return;\n\n const newPages = pages.map((page) => {\n if (page.path === title) {\n return { ...page, isOpen: true };\n }\n return page;\n });\n\n setPages(newPages);\n\n const newPageIndex = newPages.findIndex(\n ({ path: tabTitle }) => tabTitle === title\n );\n\n setActiveTab(newPageIndex);\n };\n\n return (\n <Container\n className={cn(\n 'flex size-full flex-col justify-start overflow-hidden shadow-lg',\n className\n )}\n roundedSize=\"3xl\"\n transparency=\"none\"\n {...props}\n >\n <div className=\"text-neutral dark:text-neutral-dark flex w-auto flex-row items-center justify-start gap-1 rounded-t-3xl bg-neutral-200 text-xs dark:bg-neutral-950\">\n <div className=\"mx-2 flex items-center justify-start gap-2 p-1\">\n <div className=\"size-3 rounded-full bg-red-500\" />\n <div className=\"size-3 rounded-full bg-yellow-500\" />\n <div className=\"size-3 rounded-full bg-green-500\" />\n </div>\n <div className=\"flex size-full overflow-y-auto\">\n {tabs.map(({ path }, index) => {\n const fullPath = path.split('/');\n const title = fullPath[fullPath.length - 1];\n const isActive = index === activeTab;\n\n return (\n <button\n className={cn(\n 'flex h-8 min-w-20 items-center justify-start px-3 py-1 transition',\n isActive\n ? 'bg-card dark:bg-card-dark'\n : 'dark:hover:bg-card-dark cursor-pointer bg-neutral-200 hover:bg-neutral-300 dark:bg-neutral-950'\n )}\n key={title}\n onClick={() => setActiveTab(index)}\n >\n {title}\n </button>\n );\n })}\n </div>\n </div>\n <div className=\"relative flex size-full flex-1 flex-row justify-start\">\n <div className=\"absolute left-0 top-0 size-full\">\n <div className=\"flex size-full\">\n <WithResizer initialWidth={150}>\n <FileTree\n filesPaths={filePaths}\n activeFile={path}\n onClickFile={handleClickFile}\n />\n </WithResizer>\n\n <div className=\"size-full flex-1 overflow-auto pt-2 text-xs\">\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n </div>\n </div>\n </div>\n </div>\n </Container>\n );\n};\n"],"names":["useState","page","jsxs","Container","cn","jsx","path","WithResizer","FileTree","MarkdownRenderer"],"mappings":";;;;;;;;;;AAkBO,MAAM,MAAoB,CAAC;AAAA,EAChC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAIA,WAAAA,SAAS,YAAY;AAC/C,QAAM,OAAO,MAAM,OAAO,CAAC,EAAE,aAAa,MAAM;AAEhD,QAAM,gBAAgB,KAAK,UAAU,CAAC,EAAE,aAAa,MAAM;AAC3D,QAAM,CAAC,WAAW,YAAY,IAAIA,WAAAA,SAAS,aAAa;AAExD,QAAM,EAAE,SAAS,SAAS,MAAM,SAAS;AACnC,QAAA,YAAY,aAAa,IAAI,CAAC,EAAE,MAAM,YAAY,KAAK;AAEvD,QAAA,kBAAkB,CAAC,UAAkB;AACnC,UAAA,OAAO,MAAM,KAAK,CAAC,EAAE,MAAM,SAAA,MAAe,aAAa,KAAK;AAClE,QAAI,CAAC,KAAM;AAEX,UAAM,WAAW,MAAM,IAAI,CAACC,UAAS;AAC/BA,UAAAA,MAAK,SAAS,OAAO;AACvB,eAAO,EAAE,GAAGA,OAAM,QAAQ,KAAK;AAAA,MAAA;AAE1BA,aAAAA;AAAAA,IAAA,CACR;AAED,aAAS,QAAQ;AAEjB,UAAM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AU,mCACb,UAAAH,kDAAC,OAAI,EAAA,WAAU,kBACb,UAAA;AAAA,UAACG,2BAAAA,kBAAAA,IAAAE,6BAAAA,aAAA,EAAY,cAAc,KACzB,UAAAF,2BAAA,kBAAA;AAAA,YAACG,wBAAA;AAAA,YAAA;AAAA,cACC,YAAY;AAAA,cACZ,YAAY;AAAA,cACZ,aAAa;AAAA,YAAA;AAAA,UAAA,GAEjB;AAAA,UAEAH,2BAAAA,kBAAAA,IAAC,SAAI,WAAU,+CACb,2DAACI,8BAAAA,kBAAiB,EAAA,YACf,kBACH,CAAA,EACF,CAAA;AAAA,QAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
@@ -77,7 +77,7 @@ const IDE = ({
77
77
  onClickFile: handleClickFile
78
78
  }
79
79
  ) }),
80
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-full flex-1 overflow-auto pt-2 text-xs md:text-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownRenderer, { isDarkMode, children: content }) })
80
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "size-full flex-1 overflow-auto pt-2 text-xs", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MarkdownRenderer, { isDarkMode, children: content }) })
81
81
  ] }) }) })
82
82
  ]
83
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IDE.mjs","sources":["../../../src/components/IDE/IDE.tsx"],"sourcesContent":["'use client';\n\nimport { type HTMLAttributes, useState, type FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\nimport { WithResizer } from '../WithResizer';\nimport { FileTree } from './FileTree';\nimport { MarkdownRenderer } from './MarkDownRender';\n\nexport type IDEProps = {\n pages: {\n path: string;\n content: string;\n isOpen?: boolean;\n }[];\n isDarkMode?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nexport const IDE: FC<IDEProps> = ({\n pages: initialPages,\n isDarkMode,\n className,\n ...props\n}) => {\n const [pages, setPages] = useState(initialPages);\n const tabs = pages.filter(({ isOpen }) => isOpen);\n\n const firstTabIndex = tabs.findIndex(({ isOpen }) => isOpen);\n const [activeTab, setActiveTab] = useState(firstTabIndex);\n\n const { content, path } = pages[activeTab];\n const filePaths = initialPages.map(({ path: title }) => title);\n\n const handleClickFile = (title: string) => {\n const page = pages.find(({ path: tabTitle }) => tabTitle === title);\n if (!page) return;\n\n const newPages = pages.map((page) => {\n if (page.path === title) {\n return { ...page, isOpen: true };\n }\n return page;\n });\n\n setPages(newPages);\n\n const newPageIndex = newPages.findIndex(\n ({ path: tabTitle }) => tabTitle === title\n );\n\n setActiveTab(newPageIndex);\n };\n\n return (\n <Container\n className={cn(\n 'flex size-full flex-col justify-start overflow-hidden shadow-lg',\n className\n )}\n roundedSize=\"3xl\"\n transparency=\"none\"\n {...props}\n >\n <div className=\"text-neutral dark:text-neutral-dark flex w-auto flex-row items-center justify-start gap-1 rounded-t-3xl bg-neutral-200 text-xs dark:bg-neutral-950\">\n <div className=\"mx-2 flex items-center justify-start gap-2 p-1\">\n <div className=\"size-3 rounded-full bg-red-500\" />\n <div className=\"size-3 rounded-full bg-yellow-500\" />\n <div className=\"size-3 rounded-full bg-green-500\" />\n </div>\n <div className=\"flex size-full overflow-y-auto\">\n {tabs.map(({ path }, index) => {\n const fullPath = path.split('/');\n const title = fullPath[fullPath.length - 1];\n const isActive = index === activeTab;\n\n return (\n <button\n className={cn(\n 'flex h-8 min-w-20 items-center justify-start px-3 py-1 transition',\n isActive\n ? 'bg-card dark:bg-card-dark'\n : 'dark:hover:bg-card-dark cursor-pointer bg-neutral-200 hover:bg-neutral-300 dark:bg-neutral-950'\n )}\n key={title}\n onClick={() => setActiveTab(index)}\n >\n {title}\n </button>\n );\n })}\n </div>\n </div>\n <div className=\"relative flex size-full flex-1 flex-row justify-start\">\n <div className=\"absolute left-0 top-0 size-full\">\n <div className=\"flex size-full\">\n <WithResizer initialWidth={150}>\n <FileTree\n filesPaths={filePaths}\n activeFile={path}\n onClickFile={handleClickFile}\n />\n </WithResizer>\n\n <div className=\"size-full flex-1 overflow-auto pt-2 text-xs md:text-sm\">\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n </div>\n </div>\n </div>\n </div>\n </Container>\n );\n};\n"],"names":["page","jsxs","jsx","path"],"mappings":";;;;;;;;AAkBO,MAAM,MAAoB,CAAC;AAAA,EAChC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,YAAY;AAC/C,QAAM,OAAO,MAAM,OAAO,CAAC,EAAE,aAAa,MAAM;AAEhD,QAAM,gBAAgB,KAAK,UAAU,CAAC,EAAE,aAAa,MAAM;AAC3D,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,aAAa;AAExD,QAAM,EAAE,SAAS,SAAS,MAAM,SAAS;AACnC,QAAA,YAAY,aAAa,IAAI,CAAC,EAAE,MAAM,YAAY,KAAK;AAEvD,QAAA,kBAAkB,CAAC,UAAkB;AACnC,UAAA,OAAO,MAAM,KAAK,CAAC,EAAE,MAAM,SAAA,MAAe,aAAa,KAAK;AAClE,QAAI,CAAC,KAAM;AAEX,UAAM,WAAW,MAAM,IAAI,CAACA,UAAS;AAC/BA,UAAAA,MAAK,SAAS,OAAO;AACvB,eAAO,EAAE,GAAGA,OAAM,QAAQ,KAAK;AAAA,MAAA;AAE1BA,aAAAA;AAAAA,IAAA,CACR;AAED,aAAS,QAAQ;AAEjB,UAAM,eAAe,SAAS;AAAA,MAC5B,CAAC,EAAE,MAAM,eAAe,aAAa;AAAA,IACvC;AAEA,iBAAa,YAAY;AAAA,EAC3B;AAGE,SAAAC,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA,aAAY;AAAA,MACZ,cAAa;AAAA,MACZ,GAAG;AAA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AA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"IDE.mjs","sources":["../../../src/components/IDE/IDE.tsx"],"sourcesContent":["'use client';\n\nimport { type HTMLAttributes, useState, type FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\nimport { WithResizer } from '../WithResizer';\nimport { FileTree } from './FileTree';\nimport { MarkdownRenderer } from './MarkDownRender';\n\nexport type IDEProps = {\n pages: {\n path: string;\n content: string;\n isOpen?: boolean;\n }[];\n isDarkMode?: boolean;\n} & HTMLAttributes<HTMLDivElement>;\n\nexport const IDE: FC<IDEProps> = ({\n pages: initialPages,\n isDarkMode,\n className,\n ...props\n}) => {\n const [pages, setPages] = useState(initialPages);\n const tabs = pages.filter(({ isOpen }) => isOpen);\n\n const firstTabIndex = tabs.findIndex(({ isOpen }) => isOpen);\n const [activeTab, setActiveTab] = useState(firstTabIndex);\n\n const { content, path } = pages[activeTab];\n const filePaths = initialPages.map(({ path: title }) => title);\n\n const handleClickFile = (title: string) => {\n const page = pages.find(({ path: tabTitle }) => tabTitle === title);\n if (!page) return;\n\n const newPages = pages.map((page) => {\n if (page.path === title) {\n return { ...page, isOpen: true };\n }\n return page;\n });\n\n setPages(newPages);\n\n const newPageIndex = newPages.findIndex(\n ({ path: tabTitle }) => tabTitle === title\n );\n\n setActiveTab(newPageIndex);\n };\n\n return (\n <Container\n className={cn(\n 'flex size-full flex-col justify-start overflow-hidden shadow-lg',\n className\n )}\n roundedSize=\"3xl\"\n transparency=\"none\"\n {...props}\n >\n <div className=\"text-neutral dark:text-neutral-dark flex w-auto flex-row items-center justify-start gap-1 rounded-t-3xl bg-neutral-200 text-xs dark:bg-neutral-950\">\n <div className=\"mx-2 flex items-center justify-start gap-2 p-1\">\n <div className=\"size-3 rounded-full bg-red-500\" />\n <div className=\"size-3 rounded-full bg-yellow-500\" />\n <div className=\"size-3 rounded-full bg-green-500\" />\n </div>\n <div className=\"flex size-full overflow-y-auto\">\n {tabs.map(({ path }, index) => {\n const fullPath = path.split('/');\n const title = fullPath[fullPath.length - 1];\n const isActive = index === activeTab;\n\n return (\n <button\n className={cn(\n 'flex h-8 min-w-20 items-center justify-start px-3 py-1 transition',\n isActive\n ? 'bg-card dark:bg-card-dark'\n : 'dark:hover:bg-card-dark cursor-pointer bg-neutral-200 hover:bg-neutral-300 dark:bg-neutral-950'\n )}\n key={title}\n onClick={() => setActiveTab(index)}\n >\n {title}\n </button>\n );\n })}\n </div>\n </div>\n <div className=\"relative flex size-full flex-1 flex-row justify-start\">\n <div className=\"absolute left-0 top-0 size-full\">\n <div className=\"flex size-full\">\n <WithResizer initialWidth={150}>\n <FileTree\n filesPaths={filePaths}\n activeFile={path}\n onClickFile={handleClickFile}\n />\n </WithResizer>\n\n <div className=\"size-full flex-1 overflow-auto pt-2 text-xs\">\n <MarkdownRenderer isDarkMode={isDarkMode}>\n {content}\n </MarkdownRenderer>\n </div>\n </div>\n </div>\n </div>\n </Container>\n );\n};\n"],"names":["page","jsxs","jsx","path"],"mappings":";;;;;;;;AAkBO,MAAM,MAAoB,CAAC;AAAA,EAChC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,YAAY;AAC/C,QAAM,OAAO,MAAM,OAAO,CAAC,EAAE,aAAa,MAAM;AAEhD,QAAM,gBAAgB,KAAK,UAAU,CAAC,EAAE,aAAa,MAAM;AAC3D,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,aAAa;AAExD,QAAM,EAAE,SAAS,SAAS,MAAM,SAAS;AACnC,QAAA,YAAY,aAAa,IAAI,CAAC,EAAE,MAAM,YAAY,KAAK;AAEvD,QAAA,kBAAkB,CAAC,UAAkB;AACnC,UAAA,OAAO,MAAM,KAAK,CAAC,EAAE,MAAM,SAAA,MAAe,aAAa,KAAK;AAClE,QAAI,CAAC,KAAM;AAEX,UAAM,WAAW,MAA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,kCAAA,IAAC,OAAI,EAAA,WAAU,yDACb,UAAAA,kCAAA,IAAC,OAAI,EAAA,WAAU,mCACb,UAAAD,uCAAC,OAAI,EAAA,WAAU,kBACb,UAAA;AAAA,UAACC,kCAAAA,IAAA,aAAA,EAAY,cAAc,KACzB,UAAAA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,YAAY;AAAA,cACZ,YAAY;AAAA,cACZ,aAAa;AAAA,YAAA;AAAA,UAAA,GAEjB;AAAA,UAEAA,kCAAAA,IAAC,SAAI,WAAU,+CACb,gDAAC,kBAAiB,EAAA,YACf,kBACH,CAAA,EACF,CAAA;AAAA,QAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -13,8 +13,16 @@ const MarkdownRenderer = ({
13
13
  options: {
14
14
  overrides: {
15
15
  code: {
16
- // eslint-disable-next-line sonarjs/no-unstable-nested-components
17
- component: (props) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_IDE_CodeRender.Code, { ...props, isDarkMode })
16
+ component: (props) => /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
17
+ components_IDE_CodeRender.Code,
18
+ {
19
+ ...props,
20
+ isDarkMode,
21
+ language: props.className.replace("lang-", ""),
22
+ showHeader: false,
23
+ className: "text-xs leading-5"
24
+ }
25
+ )
18
26
  },
19
27
  pre: (props) => props.children
20
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MarkDownRender.cjs","sources":["../../../src/components/IDE/MarkDownRender.tsx"],"sourcesContent":["'use client';\n\nimport Markdown from 'markdown-to-jsx';\nimport type { FC } from 'react';\nimport { Code } from './CodeRender';\n\ntype MarkdownRendererProps = {\n isDarkMode?: boolean;\n children: string;\n};\n\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n}) => (\n <Markdown\n options={{\n overrides: {\n code: {\n // eslint-disable-next-line sonarjs/no-unstable-nested-components\n component: (props) => <Code {...props} isDarkMode={isDarkMode} />,\n },\n pre: (props) => props.children,\n },\n }}\n >\n {children ?? ''}\n </Markdown>\n);\n"],"names":["jsx","Code"],"mappings":";;;;;;AAWO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AACF,MACEA,2BAAA,kBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAS;AAAA,MACP,WAAW;AAAA,QACT,MAAM;AAAA;AAAA,UAEJ,WAAW,CAAC,2DAAWC,0BAAM,MAAA,EAAA,GAAG,OAAO,WAAwB,CAAA;AAAA,QACjE;AAAA,QACA,KAAK,CAAC,UAAU,MAAM;AAAA,MAAA;AAAA,IAE1B;AAAA,IAEC,UAAY,YAAA;AAAA,EAAA;AACf;;"}
1
+ {"version":3,"file":"MarkDownRender.cjs","sources":["../../../src/components/IDE/MarkDownRender.tsx"],"sourcesContent":["'use client';\n\nimport Markdown from 'markdown-to-jsx';\nimport type { FC } from 'react';\nimport { Code } from './CodeRender';\n\ntype MarkdownRendererProps = {\n isDarkMode?: boolean;\n children: string;\n};\n\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n}) => (\n <Markdown\n options={{\n overrides: {\n code: {\n component: (props) => (\n <Code\n {...props}\n isDarkMode={isDarkMode}\n language={props.className.replace('lang-', '')}\n showHeader={false}\n className=\"text-xs leading-5\"\n />\n ),\n },\n pre: (props) => props.children,\n },\n }}\n >\n {children ?? ''}\n </Markdown>\n);\n"],"names":["jsx","Code"],"mappings":";;;;;;AAWO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AACF,MACEA,2BAAA,kBAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAS;AAAA,MACP,WAAW;AAAA,QACT,MAAM;AAAA,UACJ,WAAW,CAAC,UACVA,2BAAA,kBAAA;AAAA,YAACC,0BAAA;AAAA,YAAA;AAAA,cACE,GAAG;AAAA,cACJ;AAAA,cACA,UAAU,MAAM,UAAU,QAAQ,SAAS,EAAE;AAAA,cAC7C,YAAY;AAAA,cACZ,WAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAGhB;AAAA,QACA,KAAK,CAAC,UAAU,MAAM;AAAA,MAAA;AAAA,IAE1B;AAAA,IAEC,UAAY,YAAA;AAAA,EAAA;AACf;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkDownRender.d.ts","sourceRoot":"","sources":["../../../src/components/IDE/MarkDownRender.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiBtD,CAAC"}
1
+ {"version":3,"file":"MarkDownRender.d.ts","sourceRoot":"","sources":["../../../src/components/IDE/MarkDownRender.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAwBtD,CAAC"}
@@ -11,8 +11,16 @@ const MarkdownRenderer = ({
11
11
  options: {
12
12
  overrides: {
13
13
  code: {
14
- // eslint-disable-next-line sonarjs/no-unstable-nested-components
15
- component: (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Code, { ...props, isDarkMode })
14
+ component: (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
15
+ Code,
16
+ {
17
+ ...props,
18
+ isDarkMode,
19
+ language: props.className.replace("lang-", ""),
20
+ showHeader: false,
21
+ className: "text-xs leading-5"
22
+ }
23
+ )
16
24
  },
17
25
  pre: (props) => props.children
18
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MarkDownRender.mjs","sources":["../../../src/components/IDE/MarkDownRender.tsx"],"sourcesContent":["'use client';\n\nimport Markdown from 'markdown-to-jsx';\nimport type { FC } from 'react';\nimport { Code } from './CodeRender';\n\ntype MarkdownRendererProps = {\n isDarkMode?: boolean;\n children: string;\n};\n\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n}) => (\n <Markdown\n options={{\n overrides: {\n code: {\n // eslint-disable-next-line sonarjs/no-unstable-nested-components\n component: (props) => <Code {...props} isDarkMode={isDarkMode} />,\n },\n pre: (props) => props.children,\n },\n }}\n >\n {children ?? ''}\n </Markdown>\n);\n"],"names":["jsx"],"mappings":";;;;AAWO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AACF,MACEA,kCAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAS;AAAA,MACP,WAAW;AAAA,QACT,MAAM;AAAA;AAAA,UAEJ,WAAW,CAAC,gDAAW,MAAM,EAAA,GAAG,OAAO,WAAwB,CAAA;AAAA,QACjE;AAAA,QACA,KAAK,CAAC,UAAU,MAAM;AAAA,MAAA;AAAA,IAE1B;AAAA,IAEC,UAAY,YAAA;AAAA,EAAA;AACf;"}
1
+ {"version":3,"file":"MarkDownRender.mjs","sources":["../../../src/components/IDE/MarkDownRender.tsx"],"sourcesContent":["'use client';\n\nimport Markdown from 'markdown-to-jsx';\nimport type { FC } from 'react';\nimport { Code } from './CodeRender';\n\ntype MarkdownRendererProps = {\n isDarkMode?: boolean;\n children: string;\n};\n\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n}) => (\n <Markdown\n options={{\n overrides: {\n code: {\n component: (props) => (\n <Code\n {...props}\n isDarkMode={isDarkMode}\n language={props.className.replace('lang-', '')}\n showHeader={false}\n className=\"text-xs leading-5\"\n />\n ),\n },\n pre: (props) => props.children,\n },\n }}\n >\n {children ?? ''}\n </Markdown>\n);\n"],"names":["jsx"],"mappings":";;;;AAWO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AACF,MACEA,kCAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAS;AAAA,MACP,WAAW;AAAA,QACT,MAAM;AAAA,UACJ,WAAW,CAAC,UACVA,kCAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACE,GAAG;AAAA,cACJ;AAAA,cACA,UAAU,MAAM,UAAU,QAAQ,SAAS,EAAE;AAAA,cAC7C,YAAY;AAAA,cACZ,WAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAGhB;AAAA,QACA,KAAK,CAAC,UAAU,MAAM;AAAA,MAAA;AAAA,IAE1B;AAAA,IAEC,UAAY,YAAA;AAAA,EAAA;AACf;"}
@@ -0,0 +1,129 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("../../jsx-runtime-XHKiWCTo.cjs");
5
+ const react = require("@monaco-editor/react");
6
+ const require$$0 = require("react");
7
+ const utils_cn = require("../../utils/cn.cjs");
8
+ const components_Loader_index = require("../Loader/index.cjs");
9
+ const components_IDE_CopyButton = require("./CopyButton.cjs");
10
+ const MonacoCode = ({
11
+ children,
12
+ language,
13
+ isDarkMode,
14
+ showLineNumbers,
15
+ showCopyButton = true,
16
+ isReadOnly = false,
17
+ onChange
18
+ }) => {
19
+ const containerRef = require$$0.useRef(null);
20
+ const ideRef = require$$0.useRef(null);
21
+ const [editorSize, setEditorSize] = require$$0.useState({ height: 0, width: 0 });
22
+ const theme = require$$0.useMemo(
23
+ () => isDarkMode ? "vs-dark-transparent" : "hc-light-theme",
24
+ [isDarkMode]
25
+ );
26
+ const handleMountIde = (editor, monaco) => {
27
+ ideRef.current = editor;
28
+ const contentHeight = (editor.getContentHeight() ?? 0) + 25;
29
+ monaco.editor.defineTheme("vs-dark-transparent", {
30
+ base: "vs-dark",
31
+ inherit: true,
32
+ rules: [],
33
+ colors: {
34
+ "editor.background": "#00000000"
35
+ }
36
+ });
37
+ monaco.editor.defineTheme("hc-light-theme", {
38
+ base: "vs",
39
+ inherit: true,
40
+ rules: [],
41
+ colors: {
42
+ "editor.background": "#00000000"
43
+ }
44
+ });
45
+ monaco.editor.setTheme(theme);
46
+ monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
47
+ noSemanticValidation: true,
48
+ // Disables type checking
49
+ noSyntaxValidation: true
50
+ // Disables syntax errors
51
+ });
52
+ monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
53
+ noSemanticValidation: true,
54
+ noSyntaxValidation: true
55
+ });
56
+ monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
57
+ noLib: true,
58
+ allowNonTsExtensions: true
59
+ });
60
+ monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
61
+ noLib: true,
62
+ allowNonTsExtensions: true
63
+ });
64
+ setEditorSize({
65
+ height: contentHeight,
66
+ width: containerRef.current?.clientWidth ?? 0
67
+ });
68
+ };
69
+ const isShowLineNumbers = showLineNumbers ?? children.split("\n").length > 1;
70
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
71
+ "div",
72
+ {
73
+ className: utils_cn.cn(
74
+ "relative h-full w-full text-sm",
75
+ showLineNumbers && "ml-0"
76
+ ),
77
+ children: [
78
+ showCopyButton && /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_IDE_CopyButton.CopyButton, { content: children }),
79
+ /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
80
+ "div",
81
+ {
82
+ className: "grid size-full grid-cols-[0px] overflow-auto",
83
+ ref: containerRef,
84
+ children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
85
+ react.Editor,
86
+ {
87
+ ...editorSize,
88
+ defaultLanguage: "typescript",
89
+ language,
90
+ loading: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(components_Loader_index.Loader, {}),
91
+ defaultValue: String(children).replace(/\n$/, ""),
92
+ onMount: handleMountIde,
93
+ onChange,
94
+ options: {
95
+ readOnly: isReadOnly,
96
+ cursorStyle: "line",
97
+ minimap: { enabled: false },
98
+ scrollbar: {
99
+ vertical: "hidden",
100
+ verticalScrollbarSize: 0,
101
+ alwaysConsumeMouseWheel: false
102
+ },
103
+ folding: false,
104
+ // Disable code folding
105
+ renderValidationDecorations: "off",
106
+ // Disable error/warning decorations
107
+ quickSuggestions: false,
108
+ // Disable IntelliSense
109
+ parameterHints: { enabled: false },
110
+ // Disable parameter hints
111
+ suggestOnTriggerCharacters: false,
112
+ // Disable suggestions on typing
113
+ mouseWheelScrollSensitivity: 0,
114
+ fastScrollSensitivity: 0,
115
+ scrollBeyondLastLine: false,
116
+ lineNumbers: isShowLineNumbers ? "on" : "off"
117
+ },
118
+ theme,
119
+ className: "my-2 rounded-md"
120
+ }
121
+ )
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ );
127
+ };
128
+ exports.MonacoCode = MonacoCode;
129
+ //# sourceMappingURL=MonacoCode.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonacoCode.cjs","sources":["../../../src/components/IDE/MonacoCode.tsx"],"sourcesContent":["'use client';\n\nimport { Editor, OnChange, OnMount } from '@monaco-editor/react';\nimport { type FC, useState, useRef, useMemo } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Loader } from '../Loader';\nimport { CopyButton } from './CopyButton';\n\ntype CodeCompProps = {\n children: string;\n language: string;\n isDarkMode?: boolean;\n showLineNumbers?: boolean;\n showCopyButton?: boolean;\n isReadOnly?: boolean;\n onChange?: OnChange;\n};\n\nexport const MonacoCode: FC<CodeCompProps> = ({\n children,\n language,\n isDarkMode,\n showLineNumbers,\n showCopyButton = true,\n isReadOnly = false,\n onChange,\n}) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const ideRef = useRef(null);\n const [editorSize, setEditorSize] = useState<{\n height: number;\n width: number;\n }>({ height: 0, width: 0 });\n\n const theme = useMemo(\n () => (isDarkMode ? 'vs-dark-transparent' : 'hc-light-theme'),\n [isDarkMode]\n );\n\n const handleMountIde: OnMount = (editor, monaco) => {\n // first time you set the height based on content Height\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ideRef.current = editor as any;\n const contentHeight = (editor.getContentHeight() ?? 0) + 25;\n\n monaco.editor.defineTheme('vs-dark-transparent', {\n base: 'vs-dark',\n inherit: true,\n rules: [],\n colors: {\n 'editor.background': '#00000000',\n },\n });\n monaco.editor.defineTheme('hc-light-theme', {\n base: 'vs',\n inherit: true,\n rules: [],\n colors: {\n 'editor.background': '#00000000',\n },\n });\n\n monaco.editor.setTheme(theme);\n\n // Disable TypeScript diagnostics\n monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({\n noSemanticValidation: true, // Disables type checking\n noSyntaxValidation: true, // Disables syntax errors\n });\n\n // Disable JavaScript diagnostics\n monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({\n noSemanticValidation: true,\n noSyntaxValidation: true,\n });\n\n // Disable unnecessary language features (e.g., suggestions, quick fixes)\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n noLib: true,\n allowNonTsExtensions: true,\n });\n\n monaco.languages.typescript.javascriptDefaults.setCompilerOptions({\n noLib: true,\n allowNonTsExtensions: true,\n });\n\n setEditorSize({\n height: contentHeight,\n width: containerRef.current?.clientWidth ?? 0,\n });\n };\n\n const isShowLineNumbers = showLineNumbers ?? children.split('\\n').length > 1;\n\n return (\n <div\n className={cn(\n 'relative h-full w-full text-sm',\n showLineNumbers && 'ml-0'\n )}\n >\n {showCopyButton && <CopyButton content={children} />}\n <div\n className=\"grid size-full grid-cols-[0px] overflow-auto\"\n ref={containerRef}\n >\n <Editor\n {...editorSize}\n defaultLanguage=\"typescript\"\n language={language}\n loading={<Loader />}\n defaultValue={String(children).replace(/\\n$/, '')}\n onMount={handleMountIde}\n onChange={onChange}\n options={{\n readOnly: isReadOnly,\n cursorStyle: 'line',\n minimap: { enabled: false },\n scrollbar: {\n vertical: 'hidden',\n verticalScrollbarSize: 0,\n alwaysConsumeMouseWheel: false,\n },\n folding: false, // Disable code folding\n renderValidationDecorations: 'off', // Disable error/warning decorations\n quickSuggestions: false, // Disable IntelliSense\n parameterHints: { enabled: false }, // Disable parameter hints\n suggestOnTriggerCharacters: false, // Disable suggestions on typing\n\n mouseWheelScrollSensitivity: 0,\n fastScrollSensitivity: 0,\n scrollBeyondLastLine: false,\n lineNumbers: isShowLineNumbers ? 'on' : 'off',\n }}\n theme={theme}\n className=\"my-2 rounded-md\"\n />\n </div>\n </div>\n );\n};\n"],"names":["useRef","useState","useMemo","jsxs","cn","jsx","CopyButton","Editor","Loader"],"mappings":";;;;;;;;;AAkBO,MAAM,aAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb;AACF,MAAM;AACE,QAAA,eAAeA,kBAAuB,IAAI;AAC1C,QAAA,SAASA,kBAAO,IAAI;AACpB,QAAA,CAAC,YAAY,aAAa,IAAIC,WAAA,SAGjC,EAAE,QAAQ,GAAG,OAAO,GAAG;AAE1B,QAAM,QAAQC,WAAA;AAAA,IACZ,MAAO,aAAa,wBAAwB;AAAA,IAC5C,CAAC,UAAU;AAAA,EACb;AAEM,QAAA,iBAA0B,CAAC,QAAQ,WAAW;AAGlD,WAAO,UAAU;AACjB,UAAM,iBAAiB,OAAO,iBAAiB,KAAK,KAAK;AAElD,WAAA,OAAO,YAAY,uBAAuB;AAAA,MAC/C,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO,CAAC;AAAA,MACR,QAAQ;AAAA,QACN,qBAAqB;AAAA,MAAA;AAAA,IACvB,CACD;AACM,WAAA,OAAO,YAAY,kBAAkB;AAAA,MAC1C,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO,CAAC;AAAA,MACR,QAAQ;AAAA,QACN,qBAAqB;AAAA,MAAA;AA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AE,SAAS,MAAM;AAAA,kBAC1B,WAAW;AAAA,oBACT,UAAU;AAAA,oBACV,uBAAuB;AAAA,oBACvB,yBAAyB;AAAA,kBAC3B;AAAA,kBACA,SAAS;AAAA;AAAA,kBACT,6BAA6B;AAAA;AAAA,kBAC7B,kBAAkB;AAAA;AAAA,kBAClB,gBAAgB,EAAE,SAAS,MAAM;AAAA;AAAA,kBACjC,4BAA4B;AAAA;AAAA,kBAE5B,6BAA6B;AAAA,kBAC7B,uBAAuB;AAAA,kBACvB,sBAAsB;AAAA,kBACtB,aAAa,oBAAoB,OAAO;AAAA,gBAC1C;AAAA,gBACA;AAAA,gBACA,WAAU;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
@@ -0,0 +1,14 @@
1
+ import { OnChange } from '@monaco-editor/react';
2
+ import { FC } from 'react';
3
+ type CodeCompProps = {
4
+ children: string;
5
+ language: string;
6
+ isDarkMode?: boolean;
7
+ showLineNumbers?: boolean;
8
+ showCopyButton?: boolean;
9
+ isReadOnly?: boolean;
10
+ onChange?: OnChange;
11
+ };
12
+ export declare const MonacoCode: FC<CodeCompProps>;
13
+ export {};
14
+ //# sourceMappingURL=MonacoCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MonacoCode.d.ts","sourceRoot":"","sources":["../../../src/components/IDE/MonacoCode.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,QAAQ,EAAW,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,EAA6B,MAAM,OAAO,CAAC;AAK3D,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,aAAa,CA2HxC,CAAC"}