@intlayer/design-system 7.6.0-canary.0 → 7.6.0-canary.1

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 (146) hide show
  1. package/dist/esm/components/Browser/{browser.content.mjs → Browser.content.mjs} +4 -4
  2. package/dist/esm/components/Browser/{browser.content.mjs.map → Browser.content.mjs.map} +1 -1
  3. package/dist/esm/components/Container/index.mjs +1 -0
  4. package/dist/esm/components/Container/index.mjs.map +1 -1
  5. package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs +1 -1
  6. package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
  7. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +226 -122
  8. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  9. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +147 -3
  10. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  11. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs +80 -0
  12. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
  13. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +9 -2
  14. package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  15. package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +56 -55
  16. package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  17. package/dist/esm/components/DictionaryFieldEditor/JSONEditor.mjs +8 -16
  18. package/dist/esm/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  19. package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +1 -1
  20. package/dist/esm/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
  21. package/dist/esm/components/IDE/CodeBlockClient.mjs +2 -2
  22. package/dist/esm/components/IDE/CodeBlockClient.mjs.map +1 -1
  23. package/dist/esm/components/IDE/CodeBlockServer.mjs +2 -2
  24. package/dist/esm/components/IDE/CodeBlockServer.mjs.map +1 -1
  25. package/dist/esm/components/IDE/MonacoCode.mjs +1 -1
  26. package/dist/esm/components/IDE/MonacoCode.mjs.map +1 -1
  27. package/dist/esm/components/Input/Checkbox.mjs +3 -2
  28. package/dist/esm/components/Input/Checkbox.mjs.map +1 -1
  29. package/dist/esm/components/Link/Link.mjs +1 -1
  30. package/dist/esm/components/Link/Link.mjs.map +1 -1
  31. package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -1
  32. package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
  33. package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -1
  34. package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  35. package/dist/esm/components/MarkDownRender/MarkDownRender.mjs +8 -2
  36. package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
  37. package/dist/esm/components/Modal/Modal.mjs +2 -2
  38. package/dist/esm/components/Modal/Modal.mjs.map +1 -1
  39. package/dist/esm/components/Popover/static.mjs +1 -1
  40. package/dist/esm/components/Popover/static.mjs.map +1 -1
  41. package/dist/esm/components/Tab/Tab.mjs +20 -14
  42. package/dist/esm/components/Tab/Tab.mjs.map +1 -1
  43. package/dist/esm/components/Terminal/Terminal.mjs +2 -2
  44. package/dist/esm/components/Terminal/Terminal.mjs.map +1 -1
  45. package/dist/types/components/Badge/index.d.ts +2 -2
  46. package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +3 -3
  47. package/dist/types/components/Breadcrumb/index.d.ts +2 -2
  48. package/dist/types/components/Breadcrumb/index.d.ts.map +1 -1
  49. package/dist/types/components/Browser/{browser.content.d.ts → Browser.content.d.ts} +19 -19
  50. package/dist/types/components/Browser/Browser.content.d.ts.map +1 -0
  51. package/dist/types/components/Browser/Browser.d.ts +2 -2
  52. package/dist/types/components/Button/Button.d.ts +7 -7
  53. package/dist/types/components/Carousel/index.content.d.ts +8 -8
  54. package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +3 -3
  55. package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts.map +1 -1
  56. package/dist/types/components/Command/index.d.ts +20 -20
  57. package/dist/types/components/Container/index.d.ts +9 -9
  58. package/dist/types/components/Container/index.d.ts.map +1 -1
  59. package/dist/types/components/CopyButton/CopyButton.content.d.ts +3 -3
  60. package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +25 -25
  61. package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +9 -9
  62. package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts.map +1 -1
  63. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +1 -0
  64. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  65. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +338 -33
  66. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +197 -25
  67. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
  68. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +7 -0
  69. package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
  70. package/dist/types/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
  71. package/dist/types/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  72. package/dist/types/components/DictionaryFieldEditor/JSONEditor.d.ts.map +1 -1
  73. package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +25 -25
  74. package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +33 -33
  75. package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +9 -9
  76. package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +7 -7
  77. package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +5 -5
  78. package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +31 -31
  79. package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +3 -3
  80. package/dist/types/components/Form/FormBase.d.ts +2 -2
  81. package/dist/types/components/Form/FormBase.d.ts.map +1 -1
  82. package/dist/types/components/Form/FormField.d.ts +2 -2
  83. package/dist/types/components/Form/FormField.d.ts.map +1 -1
  84. package/dist/types/components/Form/elements/EditableFieldInputElement.d.ts +2 -2
  85. package/dist/types/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  86. package/dist/types/components/Form/elements/EditableFieldTextAreaElement.d.ts +2 -2
  87. package/dist/types/components/Form/elements/FormElement.d.ts +2 -2
  88. package/dist/types/components/Form/elements/MultiselectElement.d.ts +2 -2
  89. package/dist/types/components/Form/elements/OTPElement.d.ts +2 -2
  90. package/dist/types/components/Form/elements/SelectElement.d.ts +2 -2
  91. package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts +2 -2
  92. package/dist/types/components/IDE/CodeBlockClient.d.ts.map +1 -1
  93. package/dist/types/components/IDE/CodeBlockServer.d.ts.map +1 -1
  94. package/dist/types/components/IDE/CodeContext.d.ts +2 -2
  95. package/dist/types/components/IDE/CodeContext.d.ts.map +1 -1
  96. package/dist/types/components/IDE/MonacoCode.d.ts.map +1 -1
  97. package/dist/types/components/IDE/code.content.d.ts +5 -5
  98. package/dist/types/components/IDE/copyCode.content.d.ts +5 -5
  99. package/dist/types/components/IDE/selectors.content.d.ts +13 -13
  100. package/dist/types/components/Input/Checkbox.d.ts +4 -4
  101. package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
  102. package/dist/types/components/Input/Input.d.ts +1 -1
  103. package/dist/types/components/Input/Input.d.ts.map +1 -1
  104. package/dist/types/components/Input/OTPInput.d.ts +4 -4
  105. package/dist/types/components/Input/OTPInput.d.ts.map +1 -1
  106. package/dist/types/components/Input/SearchInput.d.ts +2 -2
  107. package/dist/types/components/Link/Link.d.ts +6 -6
  108. package/dist/types/components/Loader/index.content.d.ts +3 -3
  109. package/dist/types/components/Loader/index.content.d.ts.map +1 -1
  110. package/dist/types/components/Loader/spinner.d.ts +2 -2
  111. package/dist/types/components/Loader/spinner.d.ts.map +1 -1
  112. package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -17
  113. package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
  114. package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -13
  115. package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
  116. package/dist/types/components/MarkDownRender/MarkDownRender.d.ts.map +1 -1
  117. package/dist/types/components/MaxWidthSmoother/index.d.ts +2 -2
  118. package/dist/types/components/MaxWidthSmoother/index.d.ts.map +1 -1
  119. package/dist/types/components/Modal/Modal.d.ts.map +1 -1
  120. package/dist/types/components/Navbar/Burger.d.ts +2 -2
  121. package/dist/types/components/Navbar/Burger.d.ts.map +1 -1
  122. package/dist/types/components/Navbar/DesktopNavbar.d.ts +2 -2
  123. package/dist/types/components/Navbar/MobileNavbar.d.ts +2 -2
  124. package/dist/types/components/Navbar/index.d.ts +2 -2
  125. package/dist/types/components/Pagination/Pagination.d.ts +4 -4
  126. package/dist/types/components/Pagination/Pagination.d.ts.map +1 -1
  127. package/dist/types/components/Pagination/pagination.content.d.ts +12 -12
  128. package/dist/types/components/RightDrawer/rightDrawer.content.d.ts +5 -5
  129. package/dist/types/components/Select/Select.d.ts +3 -3
  130. package/dist/types/components/SocialNetworks/index.d.ts +2 -2
  131. package/dist/types/components/SwitchSelector/index.d.ts +7 -7
  132. package/dist/types/components/SwitchSelector/index.d.ts.map +1 -1
  133. package/dist/types/components/Tab/Tab.d.ts +11 -6
  134. package/dist/types/components/Tab/Tab.d.ts.map +1 -1
  135. package/dist/types/components/Tab/TabContext.d.ts +2 -2
  136. package/dist/types/components/TabSelector/TabSelector.d.ts +5 -5
  137. package/dist/types/components/TabSelector/TabSelector.d.ts.map +1 -1
  138. package/dist/types/components/Table/table.content.d.ts +3 -3
  139. package/dist/types/components/Tag/index.d.ts +5 -5
  140. package/dist/types/components/Tag/index.d.ts.map +1 -1
  141. package/dist/types/components/Terminal/Terminal.d.ts.map +1 -1
  142. package/dist/types/components/Terminal/terminal.content.d.ts +5 -5
  143. package/dist/types/components/Terminal/terminal.content.d.ts.map +1 -1
  144. package/dist/types/components/Toaster/Toaster.d.ts +2 -2
  145. package/package.json +19 -19
  146. package/dist/types/components/Browser/browser.content.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDetailsSchema.content.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.ts"],"sourcesContent":["import { type Dictionary, t } from 'intlayer';\n\nexport const useDictionaryDetailsSchemaContent = {\n key: 'dictionary-detail-schema',\n content: {\n titleRequiredError: t({\n en: 'Please enter a name for your organization.',\n 'en-GB': 'Please enter a name for your organization.',\n fr: 'Veuillez saisir un nom pour votre organisation.',\n es: 'Por favor, ingrese un nombre para su organización.',\n de: 'Bitte geben Sie einen Namen für Ihre Organisation ein.',\n ja: 'あなたの組織の名前を入力してください。',\n ko: '조직 이름을 입력하세요.',\n zh: '请输入您组织的名称。',\n it: 'Si prega di inserire un nome per la propria organizzazione.',\n pt: 'Por favor, insira um nome para sua organização.',\n hi: 'कृपया अपने संगठन का नाम दर्ज करें।',\n ar: 'يرجى إدخال اسم منظمتك.',\n ru: 'Пожалуйста, введите название вашей организации.',\n tr: 'Lütfen organizasyonunuz için bir isim girin.',\n pl: 'Proszę podać nazwę organizacji.',\n id: 'Silakan masukkan nama organisasi Anda.',\n vi: 'Vui lòng nhập tên cho tổ chức của bạn.',\n uk: 'Будь ласка, введіть назву вашої організації.',\n }),\n\n titleInvalidTypeError: t({\n en: 'The organization name must be a valid string.',\n 'en-GB': 'The organization name must be a valid string.',\n fr: 'Le nom de votre organisation doit être une chaîne valide.',\n es: 'El nombre de su organización debe ser una cadena válida.',\n de: 'Der Name der Organisation muss eine gültige Zeichenfolge sein.',\n ja: '組織名は有効な文字列である必要があります。',\n ko: '조직 이름은 유효한 문자열이어야 합니다.',\n zh: '组织名称必须是有效的字符串。',\n it: \"Il nome dell'organizzazione deve essere una stringa valida.\",\n pt: 'O nome da organização deve ser uma string válida.',\n hi: 'संगठन का नाम एक वैध स्ट्रिंग होना चाहिए।',\n ar: 'يجب أن يكون اسم المنظمة سلسلة صحيحة.',\n ru: 'Имя организации должно быть правильной строкой.',\n tr: 'Organizasyon adı geçerli bir dize olmalıdır.',\n pl: 'Nazwa organizacji musi być poprawnym łańcuchem znaków.',\n id: 'Nama organisasi harus berupa string yang valid.',\n vi: 'Tên tổ chức phải là một chuỗi hợp lệ.',\n uk: 'Назва організації має бути дійсним рядком.',\n }),\n\n titleMinLengthError: t({\n en: 'The organization name must be at least 4 characters long.',\n 'en-GB': 'The organization name must be at least 4 characters long.',\n fr: 'Le nom de votre organisation doit comporter au moins 4 caractères.',\n es: 'El nombre de su organización debe tener al menos 4 caracteres.',\n de: 'Der Name der Organisation muss mindestens 4 Zeichen lang sein.',\n ja: '組織名は4文字以上でなければなりません。',\n ko: '조직 이름은 4자 이상이어야 합니다.',\n zh: '组织名称必须至少4个字符。',\n it: \"Il nome dell'organizzazione deve essere lungo almeno 4 caratteri.\",\n pt: 'O nome da organização deve ter pelo menos 4 caracteres.',\n hi: 'संगठन का नाम कम से कम 4 वर्ण का होना चाहिए।',\n ar: 'يجب أن يكون اسم المنظمة مكونًا من 4 أحرف على الأقل.',\n ru: 'Имя организации должно содержать не менее 4 символов.',\n tr: 'Organizasyon adı en az 4 karakter uzunluğunda olmalıdır.',\n pl: 'Nazwa organizacji musi mieć co najmniej 4 znaki.',\n id: 'Nama organisasi harus terdiri dari minimal 4 karakter.',\n vi: 'Tên tổ chức phải có ít nhất 4 ký tự.',\n uk: 'Назва організації має містити щонайменше 4 символи.',\n }),\n\n keyRequiredError: t({\n en: 'Please enter a key for your organization.',\n 'en-GB': 'Please enter a key for your organization.',\n fr: 'Veuillez saisir une clé pour votre organisation.',\n es: 'Por favor, ingrese una clave para su organización.',\n de: 'Bitte geben Sie einen Schlüssel für Ihre Organisation ein.',\n ja: 'あなたの組織のためにキーを入力してください。',\n ko: '조직에 대한 키를 입력하세요.',\n zh: '请输入您组织的键。',\n it: 'Si prega di inserire una chiave per la propria organizzazione.',\n pt: 'Por favor, insira uma chave para sua organização.',\n hi: 'कृपया अपने संगठन के लिए एक कुंजी दर्ज करें।',\n ar: 'يرجى إدخال مفتاح لمنظمتك.',\n ru: 'Пожалуйста, введите ключ для вашей организации.',\n tr: 'Lütfen organizasyonunuz için bir anahtar girin.',\n pl: 'Proszę podać klucz organizacji.',\n id: 'Silakan masukkan key untuk organisasi Anda.',\n vi: 'Vui lòng nhập một key cho tổ chức của bạn.',\n uk: 'Будь ласка, введіть ключ для вашої організації.',\n }),\n\n keyInvalidTypeError: t({\n en: 'The key must be a valid string.',\n 'en-GB': 'The key must be a valid string.',\n fr: 'La clé doit être une chaîne valide.',\n es: 'La clave debe ser una cadena válida.',\n de: 'Der Schlüssel muss eine gültige Zeichenfolge sein.',\n ja: 'キーは有効な文字列である必要があります。',\n ko: '키는 유효한 문자열이어야 합니다.',\n zh: '关键字必须是有效的字符串。',\n it: 'La chiave deve essere una stringa valida.',\n pt: 'A chave deve ser uma string válida.',\n hi: 'कुंजी एक वैध स्ट्रिंग होनी चाहिए।',\n ar: 'يجب أن يكون المفتاح سلسلة صحيحة.',\n ru: 'Ключ должен быть правильной строкой.',\n tr: 'Anahtar geçerli bir dize olmalıdır.',\n pl: 'Klucz musi być poprawnym łańcuchem znaków.',\n id: 'Key harus berupa string yang valid.',\n vi: 'Key phải là một chuỗi hợp lệ.',\n uk: 'Ключ має бути дійсним рядком.',\n }),\n\n keySpaceError: t({\n en: 'The key cannot contain spaces or special characters.',\n 'en-GB': 'The key cannot contain spaces or special characters.',\n fr: \"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.\",\n es: 'La clave no puede contener espacios o caracteres especiales.',\n de: 'Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.',\n ja: 'キーにはスペースや特殊文字を含めることはできません。',\n ko: '키에는 공백이나 특수 문자가 포함될 수 없습니다.',\n zh: '关键字不能包含空格或特殊字符。',\n it: 'La chiave non può contenere spazi o caratteri speciali.',\n pt: 'A chave não pode conter espaços ou caracteres especiais.',\n hi: 'कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।',\n ar: 'لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.',\n ru: 'Ключ не может содержать пробелы или специальные символы.',\n tr: 'Anahtar boşluk veya özel karakterler içeremez.',\n pl: 'Klucz nie może zawierać spacji ani znaków specjalnych.',\n id: 'Key tidak boleh mengandung spasi atau karakter khusus.',\n vi: 'Key không được chứa khoảng trắng hoặc ký tự đặc biệt.',\n uk: 'Ключ не може містити пробілів або спеціальних символів.',\n }),\n\n keyMinLengthError: t({\n en: 'The key must be at least 4 characters long.',\n 'en-GB': 'The key must be at least 4 characters long.',\n fr: 'La clé doit comporter au moins 4 caractères.',\n es: 'La clave debe tener al menos 4 caracteres.',\n de: 'Der Schlüssel muss mindestens 4 Zeichen lang sein.',\n ja: 'キーは4文字以上でなければなりません。',\n ko: '키는 4자 이상이어야 합니다.',\n zh: '键必须至少为4个字符。',\n it: 'La chiave deve essere lunga almeno 4 caratteri.',\n pt: 'A chave deve ter pelo menos 4 caracteres.',\n hi: 'कुंजी में कम से कम 4 वर्ण होने चाहिए।',\n ar: 'يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.',\n ru: 'Ключ должен содержать не менее 4 символов.',\n tr: 'Anahtar en az 4 karakter uzunluğunda olmalıdır.',\n pl: 'Klucz musi mieć co najmniej 4 znaki.',\n id: 'Key harus terdiri dari minimal 4 karakter.',\n vi: 'Key phải có ít nhất 4 ký tự.',\n uk: 'Ключ має містити щонайменше 4 символи.',\n }),\n\n // Description Field Error Messages\n descriptionRequiredError: t({\n en: 'Please enter a description for your organization.',\n 'en-GB': 'Please enter a description for your organization.',\n fr: 'Veuillez saisir une description pour votre organisation.',\n es: 'Por favor, ingrese una descripción para su organización.',\n de: 'Bitte geben Sie eine Beschreibung für Ihre Organisation ein.',\n ja: 'あなたの組織の説明を入力してください。',\n ko: '조직에 대한 설명을 입력하세요.',\n zh: '请输入您组织的描述。',\n it: 'Si prega di inserire una descrizione per la propria organizzazione.',\n pt: 'Por favor, insira uma descrição para sua organização.',\n hi: 'कृपया अपने संगठन का विवरण दर्ज करें।',\n ar: 'يرجى إدخال وصف لمنظمتك.',\n ru: 'Пожалуйста, введите описание вашей организации.',\n tr: 'Lütfen organizasyonunuz için bir açıklama girin.',\n pl: 'Proszę podać opis organizacji.',\n id: 'Silakan masukkan deskripsi untuk organisasi Anda.',\n vi: 'Vui lòng nhập mô tả cho tổ chức của bạn.',\n uk: 'Будь ласка, введіть опис вашої організації.',\n }),\n\n descriptionInvalidTypeError: t({\n en: 'The description must be a valid string.',\n 'en-GB': 'The description must be a valid string.',\n fr: 'La description doit être une chaîne valide.',\n es: 'La descripción debe ser una cadena válida.',\n de: 'Die Beschreibung muss eine gültige Zeichenfolge sein.',\n ja: '説明は有効な文字列である必要があります。',\n ko: '설명은 유효한 문자열이어야 합니다.',\n zh: '描述必须是有效的字符串。',\n it: 'La descrizione deve essere una stringa valida.',\n pt: 'A descrição deve ser uma string válida.',\n hi: 'विवरण एक वैध स्ट्रिंग होना चाहिए।',\n ar: 'يجب أن يكون الوصف سلسلة صحيحة.',\n ru: 'Описание должно быть правильной строкой.',\n tr: 'Açıklama geçerli bir dize olmalıdır.',\n pl: 'Opis musi być poprawnym łańcuchem znaków.',\n id: 'Deskripsi harus berupa string yang valid.',\n vi: 'Mô tả phải là một chuỗi hợp lệ.',\n uk: 'Опис має бути дійсним рядком.',\n }),\n\n requiredErrorProjectId: t({\n en: 'Please select a project',\n 'en-GB': 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n de: 'Bitte wählen Sie ein Projekt aus',\n ja: 'プロジェクトを選択してください',\n ko: '프로젝트를 선택하세요',\n zh: '请选择一个项目',\n it: 'Si prega di selezionare un progetto',\n pt: 'Por favor, selecione um projeto',\n hi: 'कृपया एक प्रोजेक्ट चुनें',\n ar: 'يرجى اختيار مشروع',\n ru: 'Пожалуйста, выберите проект',\n tr: 'Lütfen bir proje seçin',\n pl: 'Proszę wybrać projekt.',\n id: 'Silakan pilih project',\n vi: 'Vui lòng chọn một project',\n uk: 'Будь ласка, виберіть проєкт',\n }),\n\n invalidTypeErrorProjectId: t({\n en: 'Please select a valid project',\n 'en-GB': 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n de: 'Bitte wählen Sie ein gültiges Projekt aus',\n ja: '有効なプロジェクトを選択してください',\n ko: '유효한 프로젝트를 선택하세요',\n zh: '请选择有效的项目',\n it: 'Si prega di selezionare un progetto valido',\n pt: 'Por favor, selecione um projeto válido',\n hi: 'कृपया एक वैध परियोजना चुनें',\n ar: 'يرجى اختيار مشروع صالح',\n ru: 'Пожалуйста, выберите действительный проект',\n tr: 'Lütfen geçerli bir proje seçin',\n pl: 'Proszę wybrać poprawny projekt.',\n id: 'Silakan pilih project yang valid',\n vi: 'Vui lòng chọn một project hợp lệ',\n uk: 'Будь ласка, виберіть дійсний проєкт',\n }),\n\n invalidTypeErrorTags: t({\n en: 'Please enter a valid tag',\n 'en-GB': 'Please enter a valid tag',\n fr: 'Veuillez saisir un tag valide',\n es: 'Por favor, ingrese un tag válido',\n de: 'Bitte geben Sie einen gültigen Tag ein',\n ja: '有効なタグを入力してください',\n ko: '유효한 태그를 입력하세요',\n zh: '请输入有效的标签',\n it: 'Si prega di inserire un tag valido',\n pt: 'Por favor, insira um tag válido',\n hi: 'कृपया एक वैध टैग दर्ज करें',\n ar: 'يرجى إدخال وسم صالح',\n ru: 'Пожалуйста, введите действительный тег',\n tr: 'Lütfen geçerli bir etiket girin',\n pl: 'Proszę podać poprawny tag.',\n id: 'Silakan masukkan tag yang valid',\n vi: 'Vui lòng nhập một tag hợp lệ',\n uk: 'Будь ласка, введіть дійсний тег',\n }),\n },\n title: 'Dictionary details validation schema',\n description:\n 'Validation schema for the dictionary details form, including error messages for fields such as title, key, description, project and tags.',\n tags: ['form validation', 'dictionary schema', 'error messages'],\n} satisfies Dictionary;\n\nexport default useDictionaryDetailsSchemaContent;\n"],"mappings":"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"}
1
+ {"version":3,"file":"useDictionaryDetailsSchema.content.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.ts"],"sourcesContent":["import { type Dictionary, t } from 'intlayer';\n\nexport const useDictionaryDetailsSchemaContent = {\n key: 'dictionary-detail-schema',\n content: {\n titleRequiredError: t({\n en: 'Please enter a name for your organization.',\n 'en-GB': 'Please enter a name for your organization.',\n fr: 'Veuillez saisir un nom pour votre organisation.',\n es: 'Por favor, ingrese un nombre para su organización.',\n de: 'Bitte geben Sie einen Namen für Ihre Organisation ein.',\n ja: 'あなたの組織の名前を入力してください。',\n ko: '조직 이름을 입력하세요.',\n zh: '请输入您组织的名称。',\n it: 'Si prega di inserire un nome per la propria organizzazione.',\n pt: 'Por favor, insira um nome para sua organização.',\n hi: 'कृपया अपने संगठन का नाम दर्ज करें।',\n ar: 'يرجى إدخال اسم منظمتك.',\n ru: 'Пожалуйста, введите название вашей организации.',\n tr: 'Lütfen organizasyonunuz için bir isim girin.',\n pl: 'Proszę podać nazwę organizacji.',\n id: 'Silakan masukkan nama organisasi Anda.',\n vi: 'Vui lòng nhập tên cho tổ chức của bạn.',\n uk: 'Будь ласка, введіть назву вашої організації.',\n }),\n\n titleInvalidTypeError: t({\n en: 'The organization name must be a valid string.',\n 'en-GB': 'The organization name must be a valid string.',\n fr: 'Le nom de votre organisation doit être une chaîne valide.',\n es: 'El nombre de su organización debe ser una cadena válida.',\n de: 'Der Name der Organisation muss eine gültige Zeichenfolge sein.',\n ja: '組織名は有効な文字列である必要があります。',\n ko: '조직 이름은 유효한 문자열이어야 합니다.',\n zh: '组织名称必须是有效的字符串。',\n it: \"Il nome dell'organizzazione deve essere una stringa valida.\",\n pt: 'O nome da organização deve ser uma string válida.',\n hi: 'संगठन का नाम एक वैध स्ट्रिंग होना चाहिए।',\n ar: 'يجب أن يكون اسم المنظمة سلسلة صحيحة.',\n ru: 'Имя организации должно быть правильной строкой.',\n tr: 'Organizasyon adı geçerli bir dize olmalıdır.',\n pl: 'Nazwa organizacji musi być poprawnym łańcuchem znaków.',\n id: 'Nama organisasi harus berupa string yang valid.',\n vi: 'Tên tổ chức phải là một chuỗi hợp lệ.',\n uk: 'Назва організації має бути дійсним рядком.',\n }),\n\n titleMinLengthError: t({\n en: 'The organization name must be at least 4 characters long.',\n 'en-GB': 'The organization name must be at least 4 characters long.',\n fr: 'Le nom de votre organisation doit comporter au moins 4 caractères.',\n es: 'El nombre de su organización debe tener al menos 4 caracteres.',\n de: 'Der Name der Organisation muss mindestens 4 Zeichen lang sein.',\n ja: '組織名は4文字以上でなければなりません。',\n ko: '조직 이름은 4자 이상이어야 합니다.',\n zh: '组织名称必须至少4个字符。',\n it: \"Il nome dell'organizzazione deve essere lungo almeno 4 caratteri.\",\n pt: 'O nome da organização deve ter pelo menos 4 caracteres.',\n hi: 'संगठन का नाम कम से कम 4 वर्ण का होना चाहिए।',\n ar: 'يجب أن يكون اسم المنظمة مكونًا من 4 أحرف على الأقل.',\n ru: 'Имя организации должно содержать не менее 4 символов.',\n tr: 'Organizasyon adı en az 4 karakter uzunluğunda olmalıdır.',\n pl: 'Nazwa organizacji musi mieć co najmniej 4 znaki.',\n id: 'Nama organisasi harus terdiri dari minimal 4 karakter.',\n vi: 'Tên tổ chức phải có ít nhất 4 ký tự.',\n uk: 'Назва організації має містити щонайменше 4 символи.',\n }),\n\n keyRequiredError: t({\n en: 'Please enter a key for your organization.',\n 'en-GB': 'Please enter a key for your organization.',\n fr: 'Veuillez saisir une clé pour votre organisation.',\n es: 'Por favor, ingrese una clave para su organización.',\n de: 'Bitte geben Sie einen Schlüssel für Ihre Organisation ein.',\n ja: 'あなたの組織のためにキーを入力してください。',\n ko: '조직에 대한 키를 입력하세요.',\n zh: '请输入您组织的键。',\n it: 'Si prega di inserire una chiave per la propria organizzazione.',\n pt: 'Por favor, insira uma chave para sua organização.',\n hi: 'कृपया अपने संगठन के लिए एक कुंजी दर्ज करें।',\n ar: 'يرجى إدخال مفتاح لمنظمتك.',\n ru: 'Пожалуйста, введите ключ для вашей организации.',\n tr: 'Lütfen organizasyonunuz için bir anahtar girin.',\n pl: 'Proszę podać klucz organizacji.',\n id: 'Silakan masukkan key untuk organisasi Anda.',\n vi: 'Vui lòng nhập một key cho tổ chức của bạn.',\n uk: 'Будь ласка, введіть ключ для вашої організації.',\n }),\n\n keyInvalidTypeError: t({\n en: 'The key must be a valid string.',\n 'en-GB': 'The key must be a valid string.',\n fr: 'La clé doit être une chaîne valide.',\n es: 'La clave debe ser una cadena válida.',\n de: 'Der Schlüssel muss eine gültige Zeichenfolge sein.',\n ja: 'キーは有効な文字列である必要があります。',\n ko: '키는 유효한 문자열이어야 합니다.',\n zh: '关键字必须是有效的字符串。',\n it: 'La chiave deve essere una stringa valida.',\n pt: 'A chave deve ser uma string válida.',\n hi: 'कुंजी एक वैध स्ट्रिंग होनी चाहिए।',\n ar: 'يجب أن يكون المفتاح سلسلة صحيحة.',\n ru: 'Ключ должен быть правильной строкой.',\n tr: 'Anahtar geçerli bir dize olmalıdır.',\n pl: 'Klucz musi być poprawnym łańcuchem znaków.',\n id: 'Key harus berupa string yang valid.',\n vi: 'Key phải là một chuỗi hợp lệ.',\n uk: 'Ключ має бути дійсним рядком.',\n }),\n\n keySpaceError: t({\n en: 'The key cannot contain spaces or special characters.',\n 'en-GB': 'The key cannot contain spaces or special characters.',\n fr: \"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.\",\n es: 'La clave no puede contener espacios o caracteres especiales.',\n de: 'Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.',\n ja: 'キーにはスペースや特殊文字を含めることはできません。',\n ko: '키에는 공백이나 특수 문자가 포함될 수 없습니다.',\n zh: '关键字不能包含空格或特殊字符。',\n it: 'La chiave non può contenere spazi o caratteri speciali.',\n pt: 'A chave não pode conter espaços ou caracteres especiais.',\n hi: 'कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।',\n ar: 'لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.',\n ru: 'Ключ не может содержать пробелы или специальные символы.',\n tr: 'Anahtar boşluk veya özel karakterler içeremez.',\n pl: 'Klucz nie może zawierać spacji ani znaków specjalnych.',\n id: 'Key tidak boleh mengandung spasi atau karakter khusus.',\n vi: 'Key không được chứa khoảng trắng hoặc ký tự đặc biệt.',\n uk: 'Ключ не може містити пробілів або спеціальних символів.',\n }),\n\n keyMinLengthError: t({\n en: 'The key must be at least 4 characters long.',\n 'en-GB': 'The key must be at least 4 characters long.',\n fr: 'La clé doit comporter au moins 4 caractères.',\n es: 'La clave debe tener al menos 4 caracteres.',\n de: 'Der Schlüssel muss mindestens 4 Zeichen lang sein.',\n ja: 'キーは4文字以上でなければなりません。',\n ko: '키는 4자 이상이어야 합니다.',\n zh: '键必须至少为4个字符。',\n it: 'La chiave deve essere lunga almeno 4 caratteri.',\n pt: 'A chave deve ter pelo menos 4 caracteres.',\n hi: 'कुंजी में कम से कम 4 वर्ण होने चाहिए।',\n ar: 'يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.',\n ru: 'Ключ должен содержать не менее 4 символов.',\n tr: 'Anahtar en az 4 karakter uzunluğunda olmalıdır.',\n pl: 'Klucz musi mieć co najmniej 4 znaki.',\n id: 'Key harus terdiri dari minimal 4 karakter.',\n vi: 'Key phải có ít nhất 4 ký tự.',\n uk: 'Ключ має містити щонайменше 4 символи.',\n }),\n\n // Description Field Error Messages\n descriptionRequiredError: t({\n en: 'Please enter a description for your organization.',\n 'en-GB': 'Please enter a description for your organization.',\n fr: 'Veuillez saisir une description pour votre organisation.',\n es: 'Por favor, ingrese una descripción para su organización.',\n de: 'Bitte geben Sie eine Beschreibung für Ihre Organisation ein.',\n ja: 'あなたの組織の説明を入力してください。',\n ko: '조직에 대한 설명을 입력하세요.',\n zh: '请输入您组织的描述。',\n it: 'Si prega di inserire una descrizione per la propria organizzazione.',\n pt: 'Por favor, insira uma descrição para sua organização.',\n hi: 'कृपया अपने संगठन का विवरण दर्ज करें।',\n ar: 'يرجى إدخال وصف لمنظمتك.',\n ru: 'Пожалуйста, введите описание вашей организации.',\n tr: 'Lütfen organizasyonunuz için bir açıklama girin.',\n pl: 'Proszę podać opis organizacji.',\n id: 'Silakan masukkan deskripsi untuk organisasi Anda.',\n vi: 'Vui lòng nhập mô tả cho tổ chức của bạn.',\n uk: 'Будь ласка, введіть опис вашої організації.',\n }),\n\n descriptionInvalidTypeError: t({\n en: 'The description must be a valid string.',\n 'en-GB': 'The description must be a valid string.',\n fr: 'La description doit être une chaîne valide.',\n es: 'La descripción debe ser una cadena válida.',\n de: 'Die Beschreibung muss eine gültige Zeichenfolge sein.',\n ja: '説明は有効な文字列である必要があります。',\n ko: '설명은 유효한 문자열이어야 합니다.',\n zh: '描述必须是有效的字符串。',\n it: 'La descrizione deve essere una stringa valida.',\n pt: 'A descrição deve ser uma string válida.',\n hi: 'विवरण एक वैध स्ट्रिंग होना चाहिए।',\n ar: 'يجب أن يكون الوصف سلسلة صحيحة.',\n ru: 'Описание должно быть правильной строкой.',\n tr: 'Açıklama geçerli bir dize olmalıdır.',\n pl: 'Opis musi być poprawnym łańcuchem znaków.',\n id: 'Deskripsi harus berupa string yang valid.',\n vi: 'Mô tả phải là một chuỗi hợp lệ.',\n uk: 'Опис має бути дійсним рядком.',\n }),\n\n requiredErrorProjectId: t({\n en: 'Please select a project',\n 'en-GB': 'Please select a project',\n fr: 'Veuillez sélectionner un projet',\n es: 'Por favor, seleccione un proyecto',\n de: 'Bitte wählen Sie ein Projekt aus',\n ja: 'プロジェクトを選択してください',\n ko: '프로젝트를 선택하세요',\n zh: '请选择一个项目',\n it: 'Si prega di selezionare un progetto',\n pt: 'Por favor, selecione um projeto',\n hi: 'कृपया एक प्रोजेक्ट चुनें',\n ar: 'يرجى اختيار مشروع',\n ru: 'Пожалуйста, выберите проект',\n tr: 'Lütfen bir proje seçin',\n pl: 'Proszę wybrać projekt.',\n id: 'Silakan pilih project',\n vi: 'Vui lòng chọn một project',\n uk: 'Будь ласка, виберіть проєкт',\n }),\n\n invalidTypeErrorProjectId: t({\n en: 'Please select a valid project',\n 'en-GB': 'Please select a valid project',\n fr: 'Veuillez sélectionner un projet valide',\n es: 'Por favor, seleccione un proyecto válido',\n de: 'Bitte wählen Sie ein gültiges Projekt aus',\n ja: '有効なプロジェクトを選択してください',\n ko: '유효한 프로젝트를 선택하세요',\n zh: '请选择有效的项目',\n it: 'Si prega di selezionare un progetto valido',\n pt: 'Por favor, selecione um projeto válido',\n hi: 'कृपया एक वैध परियोजना चुनें',\n ar: 'يرجى اختيار مشروع صالح',\n ru: 'Пожалуйста, выберите действительный проект',\n tr: 'Lütfen geçerli bir proje seçin',\n pl: 'Proszę wybrać poprawny projekt.',\n id: 'Silakan pilih project yang valid',\n vi: 'Vui lòng chọn một project hợp lệ',\n uk: 'Будь ласка, виберіть дійсний проєкт',\n }),\n\n invalidTypeErrorTags: t({\n en: 'Please enter a valid tag',\n 'en-GB': 'Please enter a valid tag',\n fr: 'Veuillez saisir un tag valide',\n es: 'Por favor, ingrese un tag válido',\n de: 'Bitte geben Sie einen gültigen Tag ein',\n ja: '有効なタグを入力してください',\n ko: '유효한 태그를 입력하세요',\n zh: '请输入有效的标签',\n it: 'Si prega di inserire un tag valido',\n pt: 'Por favor, insira um tag válido',\n hi: 'कृपया एक वैध टैग दर्ज करें',\n ar: 'يرجى إدخال وسم صالح',\n ru: 'Пожалуйста, введите действительный тег',\n tr: 'Lütfen geçerli bir etiket girin',\n pl: 'Proszę podać poprawny tag.',\n id: 'Silakan masukkan tag yang valid',\n vi: 'Vui lòng nhập một tag hợp lệ',\n uk: 'Будь ласка, введіть дійсний тег',\n }),\n\n locationRequiredError: t({\n en: 'Please select a location',\n 'en-GB': 'Please select a location',\n fr: 'Veuillez sélectionner un emplacement',\n es: 'Por favor, seleccione una ubicación',\n de: 'Bitte wählen Sie einen Standort aus',\n ja: '場所を選択してください',\n ko: '위치를 선택하세요',\n zh: '请选择一个位置',\n it: 'Si prega di selezionare una posizione',\n pt: 'Por favor, selecione um local',\n hi: 'कृपया एक स्थान चुनें',\n ar: 'يرجى اختيار موقع',\n ru: 'Пожалуйста, выберите местоположение',\n tr: 'Lütfen bir konum seçin',\n pl: 'Proszę wybrać lokalizację.',\n id: 'Silakan pilih lokasi',\n vi: 'Vui lòng chọn một vị trí',\n uk: 'Будь ласка, виберіть місцезнаходження',\n }),\n\n locationInvalidTypeError: t({\n en: 'Please select a valid location',\n 'en-GB': 'Please select a valid location',\n fr: 'Veuillez sélectionner un emplacement valide',\n es: 'Por favor, seleccione una ubicación válida',\n de: 'Bitte wählen Sie einen gültigen Standort aus',\n ja: '有効な場所を選択してください',\n ko: '유효한 위치를 선택하세요',\n zh: '请选择有效的位置',\n it: 'Si prega di selezionare una posizione valida',\n pt: 'Por favor, selecione um local válido',\n hi: 'कृपया एक वैध स्थान चुनें',\n ar: 'يرجى اختيار موقع صالح',\n ru: 'Пожалуйста, выберите действительное местоположение',\n tr: 'Lütfen geçerli bir konum seçin',\n pl: 'Proszę wybrać poprawną lokalizację.',\n id: 'Silakan pilih lokasi yang valid',\n vi: 'Vui lòng chọn một vị trí hợp lệ',\n uk: 'Будь ласка, виберіть дійсне місцезнаходження',\n }),\n\n filePathRequiredError: t({\n en: 'Please enter a file path',\n 'en-GB': 'Please enter a file path',\n fr: 'Veuillez saisir un chemin de fichier',\n es: 'Por favor, ingrese una ruta de archivo',\n de: 'Bitte geben Sie einen Dateipfad ein',\n ja: 'ファイルパスを入力してください',\n ko: '파일 경로를 입력하세요',\n zh: '请输入文件路径',\n it: 'Si prega di inserire un percorso del file',\n pt: 'Por favor, insira um caminho de arquivo',\n hi: 'कृपया एक फ़ाइल पथ दर्ज करें',\n ar: 'يرجى إدخال مسار الملف',\n ru: 'Пожалуйста, введите путь к файлу',\n tr: 'Lütfen bir dosya yolu girin',\n pl: 'Proszę podać ścieżkę pliku.',\n id: 'Silakan masukkan path file',\n vi: 'Vui lòng nhập đường dẫn tệp',\n uk: 'Будь ласка, введіть шлях до файлу',\n }),\n\n filePathInvalidTypeError: t({\n en: 'The file path must be a valid string',\n 'en-GB': 'The file path must be a valid string',\n fr: 'Le chemin du fichier doit être une chaîne valide',\n es: 'La ruta del archivo debe ser una cadena válida',\n de: 'Der Dateipfad muss eine gültige Zeichenfolge sein',\n ja: 'ファイルパスは有効な文字列である必要があります',\n ko: '파일 경로는 유효한 문자열이어야 합니다',\n zh: '文件路径必须是有效的字符串',\n it: 'Il percorso del file deve essere una stringa valida',\n pt: 'O caminho do arquivo deve ser uma string válida',\n hi: 'फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए',\n ar: 'يجب أن يكون مسار الملف سلسلة صحيحة',\n ru: 'Путь к файлу должен быть правильной строкой',\n tr: 'Dosya yolu geçerli bir dize olmalıdır',\n pl: 'Ścieżka pliku musi być poprawnym łańcuchem znaków.',\n id: 'Path file harus berupa string yang valid',\n vi: 'Đường dẫn tệp phải là một chuỗi hợp lệ',\n uk: 'Шлях до файлу має бути дійсним рядком',\n }),\n },\n title: 'Dictionary details validation schema',\n description:\n 'Validation schema for the dictionary details form, including error messages for fields such as title, key, description, project and tags.',\n tags: ['form validation', 'dictionary schema', 'error messages'],\n} satisfies Dictionary;\n\nexport default useDictionaryDetailsSchemaContent;\n"],"mappings":"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"}
@@ -3,13 +3,20 @@ import { z } from "zod/v4";
3
3
 
4
4
  //#region src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.ts
5
5
  const useDictionaryDetailsSchema = (projectId) => {
6
- const { titleRequiredError, titleInvalidTypeError, titleMinLengthError, keyRequiredError, keyInvalidTypeError, keySpaceError, keyMinLengthError, descriptionRequiredError, descriptionInvalidTypeError, requiredErrorProjectId, invalidTypeErrorProjectId, invalidTypeErrorTags } = useIntlayer("dictionary-detail-schema");
6
+ const { titleRequiredError, titleInvalidTypeError, titleMinLengthError, keyRequiredError, keyInvalidTypeError, keySpaceError, keyMinLengthError, descriptionRequiredError, descriptionInvalidTypeError, requiredErrorProjectId, invalidTypeErrorProjectId, invalidTypeErrorTags, locationRequiredError, locationInvalidTypeError, filePathRequiredError, filePathInvalidTypeError } = useIntlayer("dictionary-detail-schema");
7
7
  return z.object({
8
8
  title: z.string({ error: (issue) => issue.input === void 0 ? titleRequiredError.value : titleInvalidTypeError.value }).refine((val) => val.length === 0 || val.length >= 4, { error: titleMinLengthError.value }).optional(),
9
9
  key: z.string({ error: (issue) => issue.input === void 0 ? keyRequiredError.value : keyInvalidTypeError.value }).min(4, { error: keyMinLengthError.value }).regex(/^[a-zA-Z0-9-_]+$/, { error: keySpaceError.value }).default(""),
10
10
  description: z.string({ error: (issue) => issue.input === void 0 ? descriptionRequiredError.value : descriptionInvalidTypeError.value }).optional(),
11
11
  projectIds: z.array(z.string({ error: (issue) => issue.input === void 0 ? requiredErrorProjectId.value : invalidTypeErrorProjectId.value })).default([projectId]),
12
- tags: z.array(z.string({ error: () => invalidTypeErrorTags.value })).default([])
12
+ tags: z.array(z.string({ error: () => invalidTypeErrorTags.value })).default([]),
13
+ location: z.enum([
14
+ "local",
15
+ "remote",
16
+ "local&remote",
17
+ "plugin"
18
+ ], { error: (issue) => issue.input === void 0 ? locationRequiredError.value : locationInvalidTypeError.value }).optional(),
19
+ filePath: z.string({ error: (issue) => issue.input === void 0 ? filePathRequiredError.value : filePathInvalidTypeError.value }).optional()
13
20
  });
14
21
  };
15
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"useDictionaryDetailsSchema.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.ts"],"sourcesContent":["import { useIntlayer } from 'react-intlayer';\nimport { z } from 'zod/v4';\n\nexport const useDictionaryDetailsSchema = (projectId: string) => {\n const {\n titleRequiredError,\n titleInvalidTypeError,\n titleMinLengthError,\n keyRequiredError,\n keyInvalidTypeError,\n keySpaceError,\n keyMinLengthError,\n descriptionRequiredError,\n descriptionInvalidTypeError,\n requiredErrorProjectId,\n invalidTypeErrorProjectId,\n invalidTypeErrorTags,\n } = useIntlayer('dictionary-detail-schema');\n\n return z.object({\n title: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? titleRequiredError.value\n : titleInvalidTypeError.value,\n })\n // Can be length of 0 or > 4\n .refine((val) => val.length === 0 || val.length >= 4, {\n error: titleMinLengthError.value,\n })\n .optional(),\n key: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? keyRequiredError.value\n : keyInvalidTypeError.value,\n })\n .min(4, { error: keyMinLengthError.value })\n /**\n * Valid :\n * my-key\n * my_key\n *\n * Invalid :\n * my key\n * my.key\n */\n .regex(/^[a-zA-Z0-9-_]+$/, { error: keySpaceError.value })\n .default(''),\n description: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? descriptionRequiredError.value\n : descriptionInvalidTypeError.value,\n })\n .optional(),\n projectIds: z\n .array(\n z.string({\n error: (issue) =>\n issue.input === undefined\n ? requiredErrorProjectId.value\n : invalidTypeErrorProjectId.value,\n })\n )\n .default([projectId]),\n tags: z\n .array(\n z.string({\n error: () => invalidTypeErrorTags.value,\n })\n )\n .default([]),\n });\n};\n\nexport type DictionaryDetailsFormData = z.infer<\n ReturnType<typeof useDictionaryDetailsSchema>\n>;\n"],"mappings":";;;;AAGA,MAAa,8BAA8B,cAAsB;CAC/D,MAAM,EACJ,oBACA,uBACA,qBACA,kBACA,qBACA,eACA,mBACA,0BACA,6BACA,wBACA,2BACA,yBACE,YAAY,2BAA2B;AAE3C,QAAO,EAAE,OAAO;EACd,OAAO,EACJ,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,mBAAmB,QACnB,sBAAsB,OAC7B,CAAC,CAED,QAAQ,QAAQ,IAAI,WAAW,KAAK,IAAI,UAAU,GAAG,EACpD,OAAO,oBAAoB,OAC5B,CAAC,CACD,UAAU;EACb,KAAK,EACF,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,iBAAiB,QACjB,oBAAoB,OAC3B,CAAC,CACD,IAAI,GAAG,EAAE,OAAO,kBAAkB,OAAO,CAAC,CAU1C,MAAM,oBAAoB,EAAE,OAAO,cAAc,OAAO,CAAC,CACzD,QAAQ,GAAG;EACd,aAAa,EACV,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,yBAAyB,QACzB,4BAA4B,OACnC,CAAC,CACD,UAAU;EACb,YAAY,EACT,MACC,EAAE,OAAO,EACP,QAAQ,UACN,MAAM,UAAU,SACZ,uBAAuB,QACvB,0BAA0B,OACjC,CAAC,CACH,CACA,QAAQ,CAAC,UAAU,CAAC;EACvB,MAAM,EACH,MACC,EAAE,OAAO,EACP,aAAa,qBAAqB,OACnC,CAAC,CACH,CACA,QAAQ,EAAE,CAAC;EACf,CAAC"}
1
+ {"version":3,"file":"useDictionaryDetailsSchema.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.ts"],"sourcesContent":["import { useIntlayer } from 'react-intlayer';\nimport { z } from 'zod/v4';\n\nexport const useDictionaryDetailsSchema = (projectId: string) => {\n const {\n titleRequiredError,\n titleInvalidTypeError,\n titleMinLengthError,\n keyRequiredError,\n keyInvalidTypeError,\n keySpaceError,\n keyMinLengthError,\n descriptionRequiredError,\n descriptionInvalidTypeError,\n requiredErrorProjectId,\n invalidTypeErrorProjectId,\n invalidTypeErrorTags,\n locationRequiredError,\n locationInvalidTypeError,\n filePathRequiredError,\n filePathInvalidTypeError,\n } = useIntlayer('dictionary-detail-schema');\n\n return z.object({\n title: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? titleRequiredError.value\n : titleInvalidTypeError.value,\n })\n // Can be length of 0 or > 4\n .refine((val) => val.length === 0 || val.length >= 4, {\n error: titleMinLengthError.value,\n })\n .optional(),\n key: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? keyRequiredError.value\n : keyInvalidTypeError.value,\n })\n .min(4, { error: keyMinLengthError.value })\n /**\n * Valid :\n * my-key\n * my_key\n *\n * Invalid :\n * my key\n * my.key\n */\n .regex(/^[a-zA-Z0-9-_]+$/, { error: keySpaceError.value })\n .default(''),\n description: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? descriptionRequiredError.value\n : descriptionInvalidTypeError.value,\n })\n .optional(),\n projectIds: z\n .array(\n z.string({\n error: (issue) =>\n issue.input === undefined\n ? requiredErrorProjectId.value\n : invalidTypeErrorProjectId.value,\n })\n )\n .default([projectId]),\n tags: z\n .array(\n z.string({\n error: () => invalidTypeErrorTags.value,\n })\n )\n .default([]),\n location: z\n .enum(['local', 'remote', 'local&remote', 'plugin'], {\n error: (issue) =>\n issue.input === undefined\n ? locationRequiredError.value\n : locationInvalidTypeError.value,\n })\n .optional(),\n filePath: z\n .string({\n error: (issue) =>\n issue.input === undefined\n ? filePathRequiredError.value\n : filePathInvalidTypeError.value,\n })\n .optional(),\n });\n};\n\nexport type DictionaryDetailsFormData = z.infer<\n ReturnType<typeof useDictionaryDetailsSchema>\n>;\n"],"mappings":";;;;AAGA,MAAa,8BAA8B,cAAsB;CAC/D,MAAM,EACJ,oBACA,uBACA,qBACA,kBACA,qBACA,eACA,mBACA,0BACA,6BACA,wBACA,2BACA,sBACA,uBACA,0BACA,uBACA,6BACE,YAAY,2BAA2B;AAE3C,QAAO,EAAE,OAAO;EACd,OAAO,EACJ,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,mBAAmB,QACnB,sBAAsB,OAC7B,CAAC,CAED,QAAQ,QAAQ,IAAI,WAAW,KAAK,IAAI,UAAU,GAAG,EACpD,OAAO,oBAAoB,OAC5B,CAAC,CACD,UAAU;EACb,KAAK,EACF,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,iBAAiB,QACjB,oBAAoB,OAC3B,CAAC,CACD,IAAI,GAAG,EAAE,OAAO,kBAAkB,OAAO,CAAC,CAU1C,MAAM,oBAAoB,EAAE,OAAO,cAAc,OAAO,CAAC,CACzD,QAAQ,GAAG;EACd,aAAa,EACV,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,yBAAyB,QACzB,4BAA4B,OACnC,CAAC,CACD,UAAU;EACb,YAAY,EACT,MACC,EAAE,OAAO,EACP,QAAQ,UACN,MAAM,UAAU,SACZ,uBAAuB,QACvB,0BAA0B,OACjC,CAAC,CACH,CACA,QAAQ,CAAC,UAAU,CAAC;EACvB,MAAM,EACH,MACC,EAAE,OAAO,EACP,aAAa,qBAAqB,OACnC,CAAC,CACH,CACA,QAAQ,EAAE,CAAC;EACd,UAAU,EACP,KAAK;GAAC;GAAS;GAAU;GAAgB;GAAS,EAAE,EACnD,QAAQ,UACN,MAAM,UAAU,SACZ,sBAAsB,QACtB,yBAAyB,OAChC,CAAC,CACD,UAAU;EACb,UAAU,EACP,OAAO,EACN,QAAQ,UACN,MAAM,UAAU,SACZ,sBAAsB,QACtB,yBAAyB,OAChC,CAAC,CACD,UAAU;EACd,CAAC"}
@@ -1,30 +1,22 @@
1
1
  'use client';
2
2
 
3
3
  import { Button, ButtonColor, ButtonVariant } from "../Button/Button.mjs";
4
- import { SwitchSelector } from "../SwitchSelector/index.mjs";
5
4
  import { LocaleSwitcherContentProvider } from "../LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs";
5
+ import { Tab } from "../Tab/Tab.mjs";
6
6
  import { ContentEditor } from "./ContentEditor.mjs";
7
7
  import { DictionaryDetailsForm } from "./DictionaryDetails/DictionaryDetailsForm.mjs";
8
8
  import { JSONEditor } from "./JSONEditor.mjs";
9
9
  import { SaveForm } from "./SaveForm/SaveForm.mjs";
10
10
  import { StructureEditor } from "./StructureEditor.mjs";
11
11
  import { ArrowLeft } from "lucide-react";
12
- import { useEffect, useState } from "react";
12
+ import { useEffect } from "react";
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
14
14
  import { useIntlayer } from "react-intlayer";
15
15
  import { useConfiguration, useDictionariesRecordActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
16
16
 
17
17
  //#region src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx
18
- var EditorViewType = /* @__PURE__ */ function(EditorViewType$1) {
19
- EditorViewType$1[EditorViewType$1["DetailsEditor"] = 0] = "DetailsEditor";
20
- EditorViewType$1[EditorViewType$1["ContentEditor"] = 1] = "ContentEditor";
21
- EditorViewType$1[EditorViewType$1["StructureEditor"] = 2] = "StructureEditor";
22
- EditorViewType$1[EditorViewType$1["JSONEditor"] = 3] = "JSONEditor";
23
- return EditorViewType$1;
24
- }(EditorViewType || {});
25
- const DictionaryFieldEditor = ({ dictionary, onClickDictionaryList, isDarkMode, mode, onDelete, onSave }) => {
18
+ const DictionaryFieldEditor = ({ dictionary, onClickDictionaryList, isDarkMode, mode, onDelete, onSave, showReturnButton = true }) => {
26
19
  const config = useConfiguration();
27
- const [editorView, setEditorView] = useState(EditorViewType.ContentEditor);
28
20
  const { returnToDictionaryList } = useIntlayer("dictionary-field-editor");
29
21
  const { setFocusedContent } = useFocusUnmergedDictionary();
30
22
  const { setLocaleDictionaries } = useDictionariesRecordActions();
@@ -42,59 +34,68 @@ const DictionaryFieldEditor = ({ dictionary, onClickDictionaryList, isDarkMode,
42
34
  return /* @__PURE__ */ jsx(LocaleSwitcherContentProvider, {
43
35
  availableLocales: config?.internationalization.locales ?? [],
44
36
  children: /* @__PURE__ */ jsxs("div", {
45
- className: "relative flex size-full flex-col gap-6 px-2",
37
+ className: "relative flex h-full min-h-0 w-full flex-1 flex-col overflow-hidden",
46
38
  children: [
47
- /* @__PURE__ */ jsx(Button, {
39
+ showReturnButton && /* @__PURE__ */ jsx(Button, {
48
40
  onClick: onClickDictionaryList,
49
41
  variant: ButtonVariant.HOVERABLE,
50
- className: "z-10 mr-auto ml-5",
42
+ className: "z-10 mr-auto ml-5 shrink-0",
51
43
  color: ButtonColor.TEXT,
52
44
  Icon: ArrowLeft,
53
45
  label: returnToDictionaryList.label.value,
54
46
  children: returnToDictionaryList.text
55
47
  }),
56
- /* @__PURE__ */ jsx(SwitchSelector, {
57
- defaultValue: editorView,
58
- onChange: (value) => setEditorView(value),
59
- color: "text",
60
- size: "sm",
61
- choices: [
62
- {
63
- content: "Details",
64
- value: EditorViewType.DetailsEditor
65
- },
66
- {
67
- content: "Structure",
68
- value: EditorViewType.StructureEditor
69
- },
70
- {
71
- content: "Content",
72
- value: EditorViewType.ContentEditor
73
- },
74
- {
75
- content: "JSON",
76
- value: EditorViewType.JSONEditor
77
- }
78
- ].filter(({ value }) => !(!mode.includes("remote") && value === EditorViewType.DetailsEditor))
48
+ /* @__PURE__ */ jsx("div", {
49
+ className: "min-h-0 flex-1",
50
+ children: /* @__PURE__ */ jsxs(Tab, {
51
+ defaultTab: "content",
52
+ variant: "ghost",
53
+ fullHeight: true,
54
+ headerClassName: "sticky top-0 z-10 rounded-xl bg-background/20 pb-4",
55
+ children: [
56
+ mode.includes("remote") && /* @__PURE__ */ jsx(Tab.Item, {
57
+ label: "Details",
58
+ value: "details",
59
+ children: /* @__PURE__ */ jsx(DictionaryDetailsForm, {
60
+ dictionary,
61
+ mode
62
+ })
63
+ }),
64
+ /* @__PURE__ */ jsx(Tab.Item, {
65
+ label: "Structure",
66
+ value: "structure",
67
+ children: /* @__PURE__ */ jsx(StructureEditor, { dictionary })
68
+ }),
69
+ /* @__PURE__ */ jsx(Tab.Item, {
70
+ label: "Content",
71
+ value: "content",
72
+ children: /* @__PURE__ */ jsx(ContentEditor, {
73
+ dictionary,
74
+ isDarkMode
75
+ })
76
+ }),
77
+ /* @__PURE__ */ jsx(Tab.Item, {
78
+ label: "JSON",
79
+ value: "json",
80
+ children: /* @__PURE__ */ jsx(JSONEditor, {
81
+ dictionary,
82
+ isDarkMode
83
+ })
84
+ })
85
+ ]
86
+ })
79
87
  }),
80
- editorView === EditorViewType.DetailsEditor && /* @__PURE__ */ jsx(DictionaryDetailsForm, { dictionary }),
81
- editorView === EditorViewType.StructureEditor && /* @__PURE__ */ jsx(StructureEditor, { dictionary }),
82
- editorView === EditorViewType.ContentEditor && /* @__PURE__ */ jsx(ContentEditor, {
83
- dictionary,
84
- isDarkMode
85
- }),
86
- editorView === EditorViewType.JSONEditor && /* @__PURE__ */ jsx(JSONEditor, {
87
- dictionary,
88
- isDarkMode
89
- }),
90
- /* @__PURE__ */ jsx(SaveForm, {
91
- dictionary,
92
- mode,
93
- onDelete: () => {
94
- setFocusedContent(null);
95
- onDelete?.();
96
- },
97
- onSave
88
+ /* @__PURE__ */ jsx("div", {
89
+ className: "shrink-0 border-card border-t p-4",
90
+ children: /* @__PURE__ */ jsx(SaveForm, {
91
+ dictionary,
92
+ mode,
93
+ onDelete: () => {
94
+ setFocusedContent(null);
95
+ onDelete?.();
96
+ },
97
+ onSave
98
+ })
98
99
  })
99
100
  ]
100
101
  })
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.mjs","names":[],"sources":["../../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusUnmergedDictionary,\n} from '@intlayer/editor-react';\nimport type { Dictionary } from '@intlayer/types';\nimport { ArrowLeft } from 'lucide-react';\nimport { type FC, useEffect, useState } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Button, ButtonColor, ButtonVariant } from '../Button';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n onDelete?: () => void;\n onSave?: () => void;\n isDarkMode?: boolean;\n mode: ('local' | 'remote')[];\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n onDelete,\n onSave,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useIntlayer('dictionary-field-editor');\n const { setFocusedContent } = useFocusUnmergedDictionary();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n dictionaryLocalId: dictionary.localId,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.localId!]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config?.internationalization.locales ?? []}\n >\n <div className=\"relative flex size-full flex-col gap-6 px-2\">\n <Button\n onClick={onClickDictionaryList}\n variant={ButtonVariant.HOVERABLE}\n className=\"z-10 mr-auto ml-5\"\n color={ButtonColor.TEXT}\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n >\n {returnToDictionaryList.text}\n </Button>\n\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(\n !mode.includes('remote') &&\n value === EditorViewType.DetailsEditor\n )\n )}\n />\n\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n onSave={onSave}\n />\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA6BA,IAAK,4DAAL;AACE;AACA;AACA;AACA;;EAJG;AAOL,MAAa,yBAAyD,EACpE,YACA,uBACA,YACA,MACA,UACA,aACI;CACJ,MAAM,SAAS,kBAAkB;CACjC,MAAM,CAAC,YAAY,iBAAiB,SAClC,eAAe,cAChB;CACD,MAAM,EAAE,2BAA2B,YAAY,0BAA0B;CACzE,MAAM,EAAE,sBAAsB,4BAA4B;CAC1D,MAAM,EAAE,0BAA0B,8BAA8B;AAEhE,iBAAgB;AAEd,qBAAmB,UAAU;GAC3B,GAAI,QAAQ,EAAE;GACd,eAAe,WAAW;GAC1B,mBAAmB,WAAW;GAC/B,EAAE;AACH,yBAAuB,UAAU;GAC/B,GAAG;IACF,WAAW,UAAW;GACxB,EAAE;IACF,EAAE,CAAC;AAEN,QACE,oBAAC;EACC,kBAAkB,QAAQ,qBAAqB,WAAW,EAAE;YAE5D,qBAAC;GAAI,WAAU;;IACb,oBAAC;KACC,SAAS;KACT,SAAS,cAAc;KACvB,WAAU;KACV,OAAO,YAAY;KACnB,MAAM;KACN,OAAO,uBAAuB,MAAM;eAEnC,uBAAuB;MACjB;IAET,oBAAC;KACC,cAAc;KACd,WAAW,UAAU,cAAc,MAAM;KACzC,OAAM;KACN,MAAK;KACL,SAAS;MACP;OACE,SAAS;OACT,OAAO,eAAe;OACvB;MACD;OACE,SAAS;OACT,OAAO,eAAe;OACvB;MACD;OACE,SAAS;OACT,OAAO,eAAe;OACvB;MACD;OACE,SAAS;OACT,OAAO,eAAe;OACvB;MACF,CAAC,QACC,EAAE,YACD,EACE,CAAC,KAAK,SAAS,SAAS,IACxB,UAAU,eAAe,eAE9B;MACD;IAED,eAAe,eAAe,iBAC7B,oBAAC,yBAAkC,aAAc;IAElD,eAAe,eAAe,mBAC7B,oBAAC,mBAA4B,aAAc;IAE5C,eAAe,eAAe,iBAC7B,oBAAC;KAA0B;KAAwB;MAAc;IAElE,eAAe,eAAe,cAC7B,oBAAC;KAAuB;KAAwB;MAAc;IAGhE,oBAAC;KACa;KACN;KACN,gBAAgB;AACd,wBAAkB,KAAK;AACvB,kBAAY;;KAEN;MACR;;IACE;GACwB"}
1
+ {"version":3,"file":"DictionaryFieldEditor.mjs","names":[],"sources":["../../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusUnmergedDictionary,\n} from '@intlayer/editor-react';\nimport type { Dictionary } from '@intlayer/types';\nimport { ArrowLeft } from 'lucide-react';\nimport { type FC, useEffect } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Button, ButtonColor, ButtonVariant } from '../Button';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { Tab } from '../Tab';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n onDelete?: () => void;\n onSave?: () => void;\n isDarkMode?: boolean;\n mode: ('local' | 'remote')[];\n showReturnButton?: boolean;\n};\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n onDelete,\n onSave,\n showReturnButton = true,\n}) => {\n const config = useConfiguration();\n const { returnToDictionaryList } = useIntlayer('dictionary-field-editor');\n const { setFocusedContent } = useFocusUnmergedDictionary();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n dictionaryLocalId: dictionary.localId,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.localId!]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config?.internationalization.locales ?? []}\n >\n <div className=\"relative flex h-full min-h-0 w-full flex-1 flex-col overflow-hidden\">\n {showReturnButton && (\n <Button\n onClick={onClickDictionaryList}\n variant={ButtonVariant.HOVERABLE}\n className=\"z-10 mr-auto ml-5 shrink-0\"\n color={ButtonColor.TEXT}\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n >\n {returnToDictionaryList.text}\n </Button>\n )}\n\n <div className=\"min-h-0 flex-1\">\n <Tab\n defaultTab=\"content\"\n variant=\"ghost\"\n fullHeight\n headerClassName=\"sticky top-0 z-10 rounded-xl bg-background/20 pb-4\"\n >\n {mode.includes('remote') && (\n <Tab.Item label=\"Details\" value=\"details\">\n <DictionaryDetailsForm dictionary={dictionary} mode={mode} />\n </Tab.Item>\n )}\n <Tab.Item label=\"Structure\" value=\"structure\">\n <StructureEditor dictionary={dictionary} />\n </Tab.Item>\n <Tab.Item label=\"Content\" value=\"content\">\n <ContentEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n </Tab.Item>\n <Tab.Item label=\"JSON\" value=\"json\">\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n </Tab.Item>\n </Tab>\n </div>\n\n <div className=\"shrink-0 border-card border-t p-4\">\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n onDelete={() => {\n setFocusedContent(null as any);\n onDelete?.();\n }}\n onSave={onSave}\n />\n </div>\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BA,MAAa,yBAAyD,EACpE,YACA,uBACA,YACA,MACA,UACA,QACA,mBAAmB,WACf;CACJ,MAAM,SAAS,kBAAkB;CACjC,MAAM,EAAE,2BAA2B,YAAY,0BAA0B;CACzE,MAAM,EAAE,sBAAsB,4BAA4B;CAC1D,MAAM,EAAE,0BAA0B,8BAA8B;AAEhE,iBAAgB;AAEd,qBAAmB,UAAU;GAC3B,GAAI,QAAQ,EAAE;GACd,eAAe,WAAW;GAC1B,mBAAmB,WAAW;GAC/B,EAAE;AACH,yBAAuB,UAAU;GAC/B,GAAG;IACF,WAAW,UAAW;GACxB,EAAE;IACF,EAAE,CAAC;AAEN,QACE,oBAAC;EACC,kBAAkB,QAAQ,qBAAqB,WAAW,EAAE;YAE5D,qBAAC;GAAI,WAAU;;IACZ,oBACC,oBAAC;KACC,SAAS;KACT,SAAS,cAAc;KACvB,WAAU;KACV,OAAO,YAAY;KACnB,MAAM;KACN,OAAO,uBAAuB,MAAM;eAEnC,uBAAuB;MACjB;IAGX,oBAAC;KAAI,WAAU;eACb,qBAAC;MACC,YAAW;MACX,SAAQ;MACR;MACA,iBAAgB;;OAEf,KAAK,SAAS,SAAS,IACtB,oBAAC,IAAI;QAAK,OAAM;QAAU,OAAM;kBAC9B,oBAAC;SAAkC;SAAkB;UAAQ;SACpD;OAEb,oBAAC,IAAI;QAAK,OAAM;QAAY,OAAM;kBAChC,oBAAC,mBAA4B,aAAc;SAClC;OACX,oBAAC,IAAI;QAAK,OAAM;QAAU,OAAM;kBAC9B,oBAAC;SAA0B;SAAwB;UAAc;SACxD;OACX,oBAAC,IAAI;QAAK,OAAM;QAAO,OAAM;kBAC3B,oBAAC;SAAuB;SAAwB;UAAc;SACrD;;OACP;MACF;IAEN,oBAAC;KAAI,WAAU;eACb,oBAAC;MACa;MACN;MACN,gBAAgB;AACd,yBAAkB,KAAY;AAC9B,mBAAY;;MAEN;OACR;MACE;;IACF;GACwB"}
@@ -1,6 +1,4 @@
1
- import { Container } from "../Container/index.mjs";
2
1
  import { MonacoCode } from "../IDE/MonacoCode.mjs";
3
- import { useMemo } from "react";
4
2
  import { jsx } from "react/jsx-runtime";
5
3
  import { useEditedContent } from "@intlayer/editor-react";
6
4
 
@@ -15,20 +13,14 @@ const JSONEditor = ({ dictionary, isDarkMode }) => {
15
13
  return false;
16
14
  }
17
15
  };
18
- const displayedContent = useMemo(() => editedContent?.[dictionary.localId]?.content ?? dictionary?.content ?? {}, [dictionary]);
19
- return /* @__PURE__ */ jsx(Container, {
20
- background: "none",
21
- border: true,
22
- roundedSize: "xl",
23
- className: "w-full overflow-hidden p-3",
24
- children: /* @__PURE__ */ jsx(MonacoCode, {
25
- language: "json",
26
- onChange: (content) => {
27
- if (isValidJSON(content ?? "{}")) setEditedContent(dictionary.localId, JSON.parse(content ?? "{}"));
28
- },
29
- isDarkMode,
30
- children: JSON.stringify(displayedContent, null, 2)
31
- })
16
+ const displayedContent = editedContent?.[dictionary.localId]?.content ?? dictionary?.content;
17
+ return /* @__PURE__ */ jsx(MonacoCode, {
18
+ language: "json",
19
+ onChange: (content) => {
20
+ if (isValidJSON(content ?? "{}")) setEditedContent(dictionary.localId, JSON.parse(content ?? "{}"));
21
+ },
22
+ isDarkMode,
23
+ children: JSON.stringify(displayedContent, null, 2)
32
24
  });
33
25
  };
34
26
 
@@ -1 +1 @@
1
- {"version":3,"file":"JSONEditor.mjs","names":[],"sources":["../../../../src/components/DictionaryFieldEditor/JSONEditor.tsx"],"sourcesContent":["import { useEditedContent } from '@intlayer/editor-react';\nimport type { Dictionary } from '@intlayer/types';\nimport { type FC, useMemo } from 'react';\nimport { Container } from '../Container';\nimport { MonacoCode } from '../IDE/MonacoCode';\n\ntype JSONEditorProps = {\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const JSONEditor: FC<JSONEditorProps> = ({ dictionary, isDarkMode }) => {\n const { setEditedContent, editedContent } = useEditedContent();\n\n const isValidJSON = (jsonString: string): boolean => {\n try {\n JSON.parse(jsonString);\n return true; // Valid JSON\n } catch (_error) {\n return false; // Invalid JSON\n }\n };\n\n const displayedContent = useMemo(\n () =>\n editedContent?.[dictionary.localId!]?.content ??\n dictionary?.content ??\n {},\n\n [dictionary]\n );\n\n return (\n <Container\n background=\"none\"\n border\n roundedSize=\"xl\"\n className=\"w-full overflow-hidden p-3\"\n >\n <MonacoCode\n language=\"json\"\n onChange={(content) => {\n if (isValidJSON(content ?? '{}')) {\n setEditedContent(dictionary.localId!, JSON.parse(content ?? '{}'));\n }\n }}\n isDarkMode={isDarkMode}\n >\n {JSON.stringify(displayedContent, null, 2)}\n </MonacoCode>\n </Container>\n );\n};\n"],"mappings":";;;;;;;AAWA,MAAa,cAAmC,EAAE,YAAY,iBAAiB;CAC7E,MAAM,EAAE,kBAAkB,kBAAkB,kBAAkB;CAE9D,MAAM,eAAe,eAAgC;AACnD,MAAI;AACF,QAAK,MAAM,WAAW;AACtB,UAAO;WACA,QAAQ;AACf,UAAO;;;CAIX,MAAM,mBAAmB,cAErB,gBAAgB,WAAW,UAAW,WACtC,YAAY,WACZ,EAAE,EAEJ,CAAC,WAAW,CACb;AAED,QACE,oBAAC;EACC,YAAW;EACX;EACA,aAAY;EACZ,WAAU;YAEV,oBAAC;GACC,UAAS;GACT,WAAW,YAAY;AACrB,QAAI,YAAY,WAAW,KAAK,CAC9B,kBAAiB,WAAW,SAAU,KAAK,MAAM,WAAW,KAAK,CAAC;;GAG1D;aAEX,KAAK,UAAU,kBAAkB,MAAM,EAAE;IAC/B;GACH"}
1
+ {"version":3,"file":"JSONEditor.mjs","names":[],"sources":["../../../../src/components/DictionaryFieldEditor/JSONEditor.tsx"],"sourcesContent":["import { useEditedContent } from '@intlayer/editor-react';\nimport type { Dictionary } from '@intlayer/types';\nimport type { FC } from 'react';\nimport { MonacoCode } from '../IDE/MonacoCode';\n\ntype JSONEditorProps = {\n dictionary: Dictionary;\n isDarkMode?: boolean;\n};\n\nexport const JSONEditor: FC<JSONEditorProps> = ({ dictionary, isDarkMode }) => {\n const { setEditedContent, editedContent } = useEditedContent();\n\n const isValidJSON = (jsonString: string): boolean => {\n try {\n JSON.parse(jsonString);\n return true; // Valid JSON\n } catch (_error) {\n return false; // Invalid JSON\n }\n };\n\n const displayedContent =\n editedContent?.[dictionary.localId!]?.content ?? dictionary?.content;\n\n return (\n <MonacoCode\n language=\"json\"\n onChange={(content) => {\n if (isValidJSON(content ?? '{}')) {\n setEditedContent(dictionary.localId!, JSON.parse(content ?? '{}'));\n }\n }}\n isDarkMode={isDarkMode}\n >\n {JSON.stringify(displayedContent, null, 2)}\n </MonacoCode>\n );\n};\n"],"mappings":";;;;;AAUA,MAAa,cAAmC,EAAE,YAAY,iBAAiB;CAC7E,MAAM,EAAE,kBAAkB,kBAAkB,kBAAkB;CAE9D,MAAM,eAAe,eAAgC;AACnD,MAAI;AACF,QAAK,MAAM,WAAW;AACtB,UAAO;WACA,QAAQ;AACf,UAAO;;;CAIX,MAAM,mBACJ,gBAAgB,WAAW,UAAW,WAAW,YAAY;AAE/D,QACE,oBAAC;EACC,UAAS;EACT,WAAW,YAAY;AACrB,OAAI,YAAY,WAAW,KAAK,CAC9B,kBAAiB,WAAW,SAAU,KAAK,MAAM,WAAW,KAAK,CAAC;;EAG1D;YAEX,KAAK,UAAU,kBAAkB,MAAM,EAAE;GAC/B"}
@@ -38,7 +38,7 @@ const VersionSwitcher = ({ panelProps }) => {
38
38
  className: "max-h-[80vh] min-w-28",
39
39
  separator: "y",
40
40
  role: "listbox",
41
- transparency: "sm",
41
+ transparency: "xs",
42
42
  border: true,
43
43
  roundedSize: "2xl",
44
44
  borderColor: "text",
@@ -1 +1 @@
1
- {"version":3,"file":"VersionSwitcher.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.tsx"],"sourcesContent":["'use client';\n\nimport {\n Button,\n ButtonColor,\n ButtonSize,\n ButtonTextAlign,\n ButtonVariant,\n} from '@components/Button';\nimport { Container } from '@components/Container';\nimport { DropDown, type PanelProps } from '@components/DropDown';\nimport { MoveVertical } from 'lucide-react';\nimport type { FC } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { useVersionSwitcher } from './VersionSwitcherContext';\n\nexport type VersionSwitcherProps = {\n panelProps?: Omit<PanelProps, 'identifier'>;\n};\n\nconst DROPDOWN_IDENTIFIER = 'version-switcher';\n\nexport const VersionSwitcher: FC<VersionSwitcherProps> = ({ panelProps }) => {\n const { switchTo, versionSwitcherLabel, versionListLabel } =\n useIntlayer('version-switcher');\n const { selectedVersion, versions, setSelectedVersion } =\n useVersionSwitcher();\n\n if (versions.length === 0) {\n return <></>;\n }\n\n return (\n <div\n className=\"rounded-xl border border-text text-text transition-colors\"\n aria-label={versionListLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger identifier={DROPDOWN_IDENTIFIER}>\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"px-2\">{selectedVersion ?? 'LTS'}</div>\n <MoveVertical className=\"w-5 self-center\" />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n className=\"right-0 left-auto\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"sm\"\n border\n roundedSize=\"2xl\"\n borderColor=\"text\"\n aria-label={versionSwitcherLabel.value}\n >\n <ol className=\"divide-y divide-dashed divide-text/20 overflow-y-auto p-1\">\n {versions.reverse().map((version) => (\n <li className=\"px-1.5 py-1\" key={version}>\n <Button\n onClick={() => setSelectedVersion(version)}\n label={`${switchTo} v${version}`}\n isActive={selectedVersion === version}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n isFullWidth\n textAlign={ButtonTextAlign.LEFT}\n size={ButtonSize.SM}\n >\n <div className=\"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1 text-neutral text-sm\">\n {version}\n </div>\n </Button>\n </li>\n ))}\n </ol>\n </Container>\n </DropDown.Panel>\n </DropDown>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,sBAAsB;AAE5B,MAAa,mBAA6C,EAAE,iBAAiB;CAC3E,MAAM,EAAE,UAAU,sBAAsB,qBACtC,YAAY,mBAAmB;CACjC,MAAM,EAAE,iBAAiB,UAAU,uBACjC,oBAAoB;AAEtB,KAAI,SAAS,WAAW,EACtB,QAAO,iCAAK;AAGd,QACE,oBAAC;EACC,WAAU;EACV,cAAY,iBAAiB;YAE7B,qBAAC;GAAS,YAAY;cACpB,oBAAC,SAAS;IAAQ,YAAY;cAC5B,qBAAC;KAAI,WAAU;gBACb,oBAAC;MAAI,WAAU;gBAAQ,mBAAmB;OAAY,EACtD,oBAAC,gBAAa,WAAU,oBAAoB;MACxC;KACW,EAEnB,oBAAC,SAAS;IACR,YAAY;IACZ;IACA;IACA,WAAU;IACV,GAAI;cAEJ,oBAAC;KACC,WAAU;KACV,WAAU;KACV,MAAK;KACL,cAAa;KACb;KACA,aAAY;KACZ,aAAY;KACZ,cAAY,qBAAqB;eAEjC,oBAAC;MAAG,WAAU;gBACX,SAAS,SAAS,CAAC,KAAK,YACvB,oBAAC;OAAG,WAAU;iBACZ,oBAAC;QACC,eAAe,mBAAmB,QAAQ;QAC1C,OAAO,GAAG,SAAS,IAAI;QACvB,UAAU,oBAAoB;QAC9B,SAAS,cAAc;QACvB,OAAO,YAAY;QACnB;QACA,WAAW,gBAAgB;QAC3B,MAAM,WAAW;kBAEjB,oBAAC;SAAI,WAAU;mBACZ;UACG;SACC;SAdsB,QAe5B,CACL;OACC;MACK;KACG;IACR;GACP"}
1
+ {"version":3,"file":"VersionSwitcher.mjs","names":[],"sources":["../../../../../src/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.tsx"],"sourcesContent":["'use client';\n\nimport {\n Button,\n ButtonColor,\n ButtonSize,\n ButtonTextAlign,\n ButtonVariant,\n} from '@components/Button';\nimport { Container } from '@components/Container';\nimport { DropDown, type PanelProps } from '@components/DropDown';\nimport { MoveVertical } from 'lucide-react';\nimport type { FC } from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { useVersionSwitcher } from './VersionSwitcherContext';\n\nexport type VersionSwitcherProps = {\n panelProps?: Omit<PanelProps, 'identifier'>;\n};\n\nconst DROPDOWN_IDENTIFIER = 'version-switcher';\n\nexport const VersionSwitcher: FC<VersionSwitcherProps> = ({ panelProps }) => {\n const { switchTo, versionSwitcherLabel, versionListLabel } =\n useIntlayer('version-switcher');\n const { selectedVersion, versions, setSelectedVersion } =\n useVersionSwitcher();\n\n if (versions.length === 0) {\n return <></>;\n }\n\n return (\n <div\n className=\"rounded-xl border border-text text-text transition-colors\"\n aria-label={versionListLabel.value}\n >\n <DropDown identifier={DROPDOWN_IDENTIFIER}>\n <DropDown.Trigger identifier={DROPDOWN_IDENTIFIER}>\n <div className=\"flex w-full items-center justify-between\">\n <div className=\"px-2\">{selectedVersion ?? 'LTS'}</div>\n <MoveVertical className=\"w-5 self-center\" />\n </div>\n </DropDown.Trigger>\n\n <DropDown.Panel\n identifier={DROPDOWN_IDENTIFIER}\n isOverable\n isFocusable\n className=\"right-0 left-auto\"\n {...panelProps}\n >\n <Container\n className=\"max-h-[80vh] min-w-28\"\n separator=\"y\"\n role=\"listbox\"\n transparency=\"xs\"\n border\n roundedSize=\"2xl\"\n borderColor=\"text\"\n aria-label={versionSwitcherLabel.value}\n >\n <ol className=\"divide-y divide-dashed divide-text/20 overflow-y-auto p-1\">\n {versions.reverse().map((version) => (\n <li className=\"px-1.5 py-1\" key={version}>\n <Button\n onClick={() => setSelectedVersion(version)}\n label={`${switchTo} v${version}`}\n isActive={selectedVersion === version}\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n isFullWidth\n textAlign={ButtonTextAlign.LEFT}\n size={ButtonSize.SM}\n >\n <div className=\"flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1 text-neutral text-sm\">\n {version}\n </div>\n </Button>\n </li>\n ))}\n </ol>\n </Container>\n </DropDown.Panel>\n </DropDown>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,sBAAsB;AAE5B,MAAa,mBAA6C,EAAE,iBAAiB;CAC3E,MAAM,EAAE,UAAU,sBAAsB,qBACtC,YAAY,mBAAmB;CACjC,MAAM,EAAE,iBAAiB,UAAU,uBACjC,oBAAoB;AAEtB,KAAI,SAAS,WAAW,EACtB,QAAO,iCAAK;AAGd,QACE,oBAAC;EACC,WAAU;EACV,cAAY,iBAAiB;YAE7B,qBAAC;GAAS,YAAY;cACpB,oBAAC,SAAS;IAAQ,YAAY;cAC5B,qBAAC;KAAI,WAAU;gBACb,oBAAC;MAAI,WAAU;gBAAQ,mBAAmB;OAAY,EACtD,oBAAC,gBAAa,WAAU,oBAAoB;MACxC;KACW,EAEnB,oBAAC,SAAS;IACR,YAAY;IACZ;IACA;IACA,WAAU;IACV,GAAI;cAEJ,oBAAC;KACC,WAAU;KACV,WAAU;KACV,MAAK;KACL,cAAa;KACb;KACA,aAAY;KACZ,aAAY;KACZ,cAAY,qBAAqB;eAEjC,oBAAC;MAAG,WAAU;gBACX,SAAS,SAAS,CAAC,KAAK,YACvB,oBAAC;OAAG,WAAU;iBACZ,oBAAC;QACC,eAAe,mBAAmB,QAAQ;QAC1C,OAAO,GAAG,SAAS,IAAI;QACvB,UAAU,oBAAoB;QAC9B,SAAS,cAAc;QACvB,OAAO,YAAY;QACnB;QACA,WAAW,gBAAgB;QAC3B,MAAM,WAAW;kBAEjB,oBAAC;SAAI,WAAU;mBACZ;UACG;SACC;SAdsB,QAe5B,CACL;OACC;MACK;KACG;IACR;GACP"}
@@ -7,10 +7,10 @@ const CodeDefault = ({ children }) => /* @__PURE__ */ jsx("div", {
7
7
  className: "min-w-0 max-w-full overflow-x-auto",
8
8
  children: /* @__PURE__ */ jsx("pre", {
9
9
  className: "min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
10
- children: /* @__PURE__ */ jsx("code", { children: children.split("\n").map((line, index) => /* @__PURE__ */ jsx("span", {
10
+ children: /* @__PURE__ */ jsx("code", { children: typeof children === "string" ? children.split("\n").map((line, index) => /* @__PURE__ */ jsx("span", {
11
11
  className: "line block w-full",
12
12
  children: line
13
- }, `line-${index}-${line.slice(0, 10)}`)) })
13
+ }, `line-${index}-${line.slice(0, 10)}`)) : children })
14
14
  })
15
15
  });
16
16
  const CodeBlockShiki = lazy(() => import("./CodeBlockShiki.mjs").then((mod) => ({ default: mod.CodeBlockShiki })));
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlockClient.mjs","names":[],"sources":["../../../../src/components/IDE/CodeBlockClient.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport { type FC, type HTMLAttributes, lazy, Suspense } from 'react';\nimport type { BundledLanguage } from 'shiki/bundle/web';\n\nexport const CodeDefault: FC<{ children: string }> = ({ children }) => (\n <div className=\"min-w-0 max-w-full overflow-x-auto\">\n <pre className=\"min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n <code>\n {children.split('\\n').map((line, index) => (\n <span\n className=\"line block w-full\"\n key={`line-${index}-${line.slice(0, 10)}`}\n >\n {line}\n </span>\n ))}\n </code>\n </pre>\n </div>\n);\n\n// Lazy load the Shiki component\nconst CodeBlockShiki = lazy(() =>\n import('./CodeBlockShiki').then((mod) => ({\n default: mod.CodeBlockShiki,\n }))\n);\n\nexport type CodeBlockProps = {\n children: string;\n lang: BundledLanguage;\n isDarkMode?: boolean;\n isEditable?: boolean;\n onChange?: (content: string) => void;\n} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;\n\nexport const CodeBlock: FC<CodeBlockProps> = ({\n className,\n onChange,\n isEditable,\n children,\n lang,\n isDarkMode,\n ...props\n}) => (\n <div\n className={cn('flex w-full min-w-0 max-w-full overflow-x-auto', className)}\n {...props}\n >\n <Suspense fallback={<CodeDefault>{children}</CodeDefault>}>\n <CodeBlockShiki lang={lang} isDarkMode={isDarkMode}>\n {children}\n </CodeBlockShiki>\n </Suspense>\n </div>\n);\n"],"mappings":";;;;;AAIA,MAAa,eAAyC,EAAE,eACtD,oBAAC;CAAI,WAAU;WACb,oBAAC;EAAI,WAAU;YACb,oBAAC,oBACE,SAAS,MAAM,KAAK,CAAC,KAAK,MAAM,UAC/B,oBAAC;GACC,WAAU;aAGT;KAFI,QAAQ,MAAM,GAAG,KAAK,MAAM,GAAG,GAAG,GAGlC,CACP,GACG;GACH;EACF;AAIR,MAAM,iBAAiB,WACrB,OAAO,wBAAoB,MAAM,SAAS,EACxC,SAAS,IAAI,gBACd,EAAE,CACJ;AAUD,MAAa,aAAiC,EAC5C,WACA,UACA,YACA,UACA,MACA,YACA,GAAG,YAEH,oBAAC;CACC,WAAW,GAAG,kDAAkD,UAAU;CAC1E,GAAI;WAEJ,oBAAC;EAAS,UAAU,oBAAC,eAAa,WAAuB;YACvD,oBAAC;GAAqB;GAAkB;GACrC;IACc;GACR;EACP"}
1
+ {"version":3,"file":"CodeBlockClient.mjs","names":[],"sources":["../../../../src/components/IDE/CodeBlockClient.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport { type FC, type HTMLAttributes, lazy, Suspense } from 'react';\nimport type { BundledLanguage } from 'shiki/bundle/web';\n\nexport const CodeDefault: FC<{ children: string }> = ({ children }) => (\n <div className=\"min-w-0 max-w-full overflow-x-auto\">\n <pre className=\"min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n <code>\n {typeof children === 'string'\n ? children.split('\\n').map((line, index) => (\n <span\n className=\"line block w-full\"\n key={`line-${index}-${line.slice(0, 10)}`}\n >\n {line}\n </span>\n ))\n : children}\n </code>\n </pre>\n </div>\n);\n\n// Lazy load the Shiki component\nconst CodeBlockShiki = lazy(() =>\n import('./CodeBlockShiki').then((mod) => ({\n default: mod.CodeBlockShiki,\n }))\n);\n\nexport type CodeBlockProps = {\n children: string;\n lang: BundledLanguage;\n isDarkMode?: boolean;\n isEditable?: boolean;\n onChange?: (content: string) => void;\n} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;\n\nexport const CodeBlock: FC<CodeBlockProps> = ({\n className,\n onChange,\n isEditable,\n children,\n lang,\n isDarkMode,\n ...props\n}) => (\n <div\n className={cn('flex w-full min-w-0 max-w-full overflow-x-auto', className)}\n {...props}\n >\n <Suspense fallback={<CodeDefault>{children}</CodeDefault>}>\n <CodeBlockShiki lang={lang} isDarkMode={isDarkMode}>\n {children}\n </CodeBlockShiki>\n </Suspense>\n </div>\n);\n"],"mappings":";;;;;AAIA,MAAa,eAAyC,EAAE,eACtD,oBAAC;CAAI,WAAU;WACb,oBAAC;EAAI,WAAU;YACb,oBAAC,oBACE,OAAO,aAAa,WACjB,SAAS,MAAM,KAAK,CAAC,KAAK,MAAM,UAC9B,oBAAC;GACC,WAAU;aAGT;KAFI,QAAQ,MAAM,GAAG,KAAK,MAAM,GAAG,GAAG,GAGlC,CACP,GACF,WACC;GACH;EACF;AAIR,MAAM,iBAAiB,WACrB,OAAO,wBAAoB,MAAM,SAAS,EACxC,SAAS,IAAI,gBACd,EAAE,CACJ;AAUD,MAAa,aAAiC,EAC5C,WACA,UACA,YACA,UACA,MACA,YACA,GAAG,YAEH,oBAAC;CACC,WAAW,GAAG,kDAAkD,UAAU;CAC1E,GAAI;WAEJ,oBAAC;EAAS,UAAU,oBAAC,eAAa,WAAuB;YACvD,oBAAC;GAAqB;GAAkB;GACrC;IACc;GACR;EACP"}
@@ -26,10 +26,10 @@ const CodeBlockShiki = (async ({ children, lang, isDarkMode, onChange, ...props
26
26
  const CodeDefault = ({ children, isEditable, isDarkMode, onChange, ...props }) => /* @__PURE__ */ jsx("div", {
27
27
  contentEditable: isEditable,
28
28
  ...props,
29
- children: /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { children: children.split("\n").map((line, index) => /* @__PURE__ */ jsx("span", {
29
+ children: /* @__PURE__ */ jsx("pre", { children: /* @__PURE__ */ jsx("code", { children: typeof children === "string" ? children.split("\n").map((line, index) => /* @__PURE__ */ jsx("span", {
30
30
  className: "line block w-full",
31
31
  children: line
32
- }, index)) }) })
32
+ }, index)) : children }) })
33
33
  });
34
34
  const CodeBlock = ({ className, onChange, isEditable, ...props }) => /* @__PURE__ */ jsx(Suspense, {
35
35
  fallback: /* @__PURE__ */ jsx(CodeDefault, { ...props }),
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlockServer.mjs","names":[],"sources":["../../../../src/components/IDE/CodeBlockServer.tsx"],"sourcesContent":["import {\n transformerMetaHighlight,\n transformerMetaWordHighlight,\n transformerNotationDiff,\n transformerNotationErrorLevel,\n transformerNotationHighlight,\n transformerNotationWordHighlight,\n} from '@shikijs/transformers';\nimport { cn } from '@utils/cn';\nimport { type FC, type HTMLAttributes, Suspense } from 'react';\nimport {\n type BundledLanguage,\n type BundledTheme,\n type CodeToHastOptions,\n codeToHtml,\n} from 'shiki/bundle/web';\n\nexport const CodeBlockShiki = (async ({\n children,\n lang,\n isDarkMode,\n onChange,\n ...props\n}: CodeBlockProps) => {\n const shikiOptions: CodeToHastOptions<BundledLanguage, BundledTheme> = {\n lang,\n theme: isDarkMode ? 'github-dark' : 'github-light',\n transformers: [\n transformerNotationDiff(),\n transformerNotationHighlight(),\n transformerNotationWordHighlight(),\n transformerNotationErrorLevel(),\n transformerMetaHighlight(),\n transformerMetaWordHighlight(),\n ],\n };\n\n const out = await codeToHtml(children, shikiOptions);\n\n return (\n <div\n dangerouslySetInnerHTML={{ __html: out }}\n {...props}\n style={{ backgroundColor: 'transparent' }}\n />\n );\n}) as unknown as FC<CodeBlockProps>;\n\nconst CodeDefault: FC<CodeBlockProps> = ({\n children,\n isEditable,\n isDarkMode,\n onChange,\n ...props\n}) => (\n <div contentEditable={isEditable} {...props}>\n <pre>\n <code>\n {children.split('\\n').map((line, index) => (\n <span className=\"line block w-full\" key={index}>\n {line}\n </span>\n ))}\n </code>\n </pre>\n </div>\n);\n\nexport type CodeBlockProps = {\n children: string;\n lang: BundledLanguage;\n isDarkMode?: boolean;\n isEditable?: boolean;\n onChange?: (content: string) => void;\n} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;\n\nexport const CodeBlock: FC<CodeBlockProps> = ({\n className,\n onChange,\n isEditable,\n ...props\n}) => (\n <Suspense fallback={<CodeDefault {...props} />}>\n <CodeBlockShiki\n className={cn('flex w-full', className)}\n contentEditable={isEditable}\n onInput={(e) => onChange?.(e.currentTarget.textContent ?? '')}\n {...props}\n />\n </Suspense>\n);\n"],"mappings":";;;;;;;AAiBA,MAAa,kBAAkB,OAAO,EACpC,UACA,MACA,YACA,UACA,GAAG,YACiB;AAgBpB,QACE,oBAAC;EACC,yBAAyB,EAAE,QAJnB,MAAM,WAAW,UAb0C;GACrE;GACA,OAAO,aAAa,gBAAgB;GACpC,cAAc;IACZ,yBAAyB;IACzB,8BAA8B;IAC9B,kCAAkC;IAClC,+BAA+B;IAC/B,0BAA0B;IAC1B,8BAA8B;IAC/B;GACF,CAEmD,EAIR;EACxC,GAAI;EACJ,OAAO,EAAE,iBAAiB,eAAe;GACzC;;AAIN,MAAM,eAAmC,EACvC,UACA,YACA,YACA,UACA,GAAG,YAEH,oBAAC;CAAI,iBAAiB;CAAY,GAAI;WACpC,oBAAC,mBACC,oBAAC,oBACE,SAAS,MAAM,KAAK,CAAC,KAAK,MAAM,UAC/B,oBAAC;EAAK,WAAU;YACb;IADsC,MAElC,CACP,GACG,GACH;EACF;AAWR,MAAa,aAAiC,EAC5C,WACA,UACA,YACA,GAAG,YAEH,oBAAC;CAAS,UAAU,oBAAC,eAAY,GAAI,QAAS;WAC5C,oBAAC;EACC,WAAW,GAAG,eAAe,UAAU;EACvC,iBAAiB;EACjB,UAAU,MAAM,WAAW,EAAE,cAAc,eAAe,GAAG;EAC7D,GAAI;GACJ;EACO"}
1
+ {"version":3,"file":"CodeBlockServer.mjs","names":[],"sources":["../../../../src/components/IDE/CodeBlockServer.tsx"],"sourcesContent":["import {\n transformerMetaHighlight,\n transformerMetaWordHighlight,\n transformerNotationDiff,\n transformerNotationErrorLevel,\n transformerNotationHighlight,\n transformerNotationWordHighlight,\n} from '@shikijs/transformers';\nimport { cn } from '@utils/cn';\nimport { type FC, type HTMLAttributes, Suspense } from 'react';\nimport {\n type BundledLanguage,\n type BundledTheme,\n type CodeToHastOptions,\n codeToHtml,\n} from 'shiki/bundle/web';\n\nexport const CodeBlockShiki = (async ({\n children,\n lang,\n isDarkMode,\n onChange,\n ...props\n}: CodeBlockProps) => {\n const shikiOptions: CodeToHastOptions<BundledLanguage, BundledTheme> = {\n lang,\n theme: isDarkMode ? 'github-dark' : 'github-light',\n transformers: [\n transformerNotationDiff(),\n transformerNotationHighlight(),\n transformerNotationWordHighlight(),\n transformerNotationErrorLevel(),\n transformerMetaHighlight(),\n transformerMetaWordHighlight(),\n ],\n };\n\n const out = await codeToHtml(children, shikiOptions);\n\n return (\n <div\n dangerouslySetInnerHTML={{ __html: out }}\n {...props}\n style={{ backgroundColor: 'transparent' }}\n />\n );\n}) as unknown as FC<CodeBlockProps>;\n\nconst CodeDefault: FC<CodeBlockProps> = ({\n children,\n isEditable,\n isDarkMode,\n onChange,\n ...props\n}) => (\n <div contentEditable={isEditable} {...props}>\n <pre>\n <code>\n {typeof children === 'string'\n ? children.split('\\n').map((line, index) => (\n <span className=\"line block w-full\" key={index}>\n {line}\n </span>\n ))\n : children}\n </code>\n </pre>\n </div>\n);\n\nexport type CodeBlockProps = {\n children: string;\n lang: BundledLanguage;\n isDarkMode?: boolean;\n isEditable?: boolean;\n onChange?: (content: string) => void;\n} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;\n\nexport const CodeBlock: FC<CodeBlockProps> = ({\n className,\n onChange,\n isEditable,\n ...props\n}) => (\n <Suspense fallback={<CodeDefault {...props} />}>\n <CodeBlockShiki\n className={cn('flex w-full', className)}\n contentEditable={isEditable}\n onInput={(e) => onChange?.(e.currentTarget.textContent ?? '')}\n {...props}\n />\n </Suspense>\n);\n"],"mappings":";;;;;;;AAiBA,MAAa,kBAAkB,OAAO,EACpC,UACA,MACA,YACA,UACA,GAAG,YACiB;AAgBpB,QACE,oBAAC;EACC,yBAAyB,EAAE,QAJnB,MAAM,WAAW,UAb0C;GACrE;GACA,OAAO,aAAa,gBAAgB;GACpC,cAAc;IACZ,yBAAyB;IACzB,8BAA8B;IAC9B,kCAAkC;IAClC,+BAA+B;IAC/B,0BAA0B;IAC1B,8BAA8B;IAC/B;GACF,CAEmD,EAIR;EACxC,GAAI;EACJ,OAAO,EAAE,iBAAiB,eAAe;GACzC;;AAIN,MAAM,eAAmC,EACvC,UACA,YACA,YACA,UACA,GAAG,YAEH,oBAAC;CAAI,iBAAiB;CAAY,GAAI;WACpC,oBAAC,mBACC,oBAAC,oBACE,OAAO,aAAa,WACjB,SAAS,MAAM,KAAK,CAAC,KAAK,MAAM,UAC9B,oBAAC;EAAK,WAAU;YACb;IADsC,MAElC,CACP,GACF,WACC,GACH;EACF;AAWR,MAAa,aAAiC,EAC5C,WACA,UACA,YACA,GAAG,YAEH,oBAAC;CAAS,UAAU,oBAAC,eAAY,GAAI,QAAS;WAC5C,oBAAC;EACC,WAAW,GAAG,eAAe,UAAU;EACvC,iBAAiB;EACjB,UAAU,MAAM,WAAW,EAAE,cAAc,eAAe,GAAG;EAC7D,GAAI;GACJ;EACO"}
@@ -53,7 +53,7 @@ const MonacoCode = ({ children, language, isDarkMode, showLineNumbers, showCopyB
53
53
  width: containerRef.current?.clientWidth ?? 0
54
54
  });
55
55
  };
56
- const isShowLineNumbers = showLineNumbers ?? children.split("\n").length > 1;
56
+ const isShowLineNumbers = showLineNumbers ?? (typeof children === "string" ? children.split("\n").length > 1 : false);
57
57
  return /* @__PURE__ */ jsxs("div", {
58
58
  className: cn("relative h-full w-full text-sm", showLineNumbers && "ml-0"),
59
59
  children: [showCopyButton && /* @__PURE__ */ jsx("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"MonacoCode.mjs","names":[],"sources":["../../../../src/components/IDE/MonacoCode.tsx"],"sourcesContent":["'use client';\n\nimport { Editor, type OnChange, type OnMount } from '@monaco-editor/react';\nimport { cn } from '@utils/cn';\nimport { type FC, useMemo, useRef, useState } from 'react';\nimport { CopyButton } from '../CopyButton';\nimport { Loader } from '../Loader';\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\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 && (\n <div className=\"sticky top-5 z-10\">\n <div\n className={cn('absolute right-2 bottom-0 flex h-7 items-center')}\n >\n <CopyButton content={children} />\n </div>\n </div>\n )}\n <div\n className=\"z-0 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"],"mappings":";;;;;;;;;;AAkBA,MAAa,cAAiC,EAC5C,UACA,UACA,YACA,iBACA,iBAAiB,MACjB,aAAa,OACb,eACI;CACJ,MAAM,eAAe,OAAuB,KAAK;CACjD,MAAM,SAAS,OAAO,KAAK;CAC3B,MAAM,CAAC,YAAY,iBAAiB,SAGjC;EAAE,QAAQ;EAAG,OAAO;EAAG,CAAC;CAE3B,MAAM,QAAQ,cACL,aAAa,wBAAwB,kBAC5C,CAAC,WAAW,CACb;CAED,MAAM,kBAA2B,QAAQ,WAAW;AAGlD,SAAO,UAAU;EACjB,MAAM,iBAAiB,OAAO,kBAAkB,IAAI,KAAK;AAEzD,SAAO,OAAO,YAAY,uBAAuB;GAC/C,MAAM;GACN,SAAS;GACT,OAAO,EAAE;GACT,QAAQ,EACN,qBAAqB,aACtB;GACF,CAAC;AACF,SAAO,OAAO,YAAY,kBAAkB;GAC1C,MAAM;GACN,SAAS;GACT,OAAO,EAAE;GACT,QAAQ,EACN,qBAAqB,aACtB;GACF,CAAC;AAEF,SAAO,OAAO,SAAS,MAAM;AAG7B,SAAO,UAAU,WAAW,mBAAmB,sBAAsB;GACnE,sBAAsB;GACtB,oBAAoB;GACrB,CAAC;AAGF,SAAO,UAAU,WAAW,mBAAmB,sBAAsB;GACnE,sBAAsB;GACtB,oBAAoB;GACrB,CAAC;AAGF,SAAO,UAAU,WAAW,mBAAmB,mBAAmB;GAChE,OAAO;GACP,sBAAsB;GACvB,CAAC;AAEF,SAAO,UAAU,WAAW,mBAAmB,mBAAmB;GAChE,OAAO;GACP,sBAAsB;GACvB,CAAC;AAEF,gBAAc;GACZ,QAAQ;GACR,OAAO,aAAa,SAAS,eAAe;GAC7C,CAAC;;CAGJ,MAAM,oBAAoB,mBAAmB,SAAS,MAAM,KAAK,CAAC,SAAS;AAE3E,QACE,qBAAC;EACC,WAAW,GACT,kCACA,mBAAmB,OACpB;aAEA,kBACC,oBAAC;GAAI,WAAU;aACb,oBAAC;IACC,WAAW,GAAG,kDAAkD;cAEhE,oBAAC,cAAW,SAAS,WAAY;KAC7B;IACF,EAER,oBAAC;GACC,WAAU;GACV,KAAK;aAEL,oBAAC;IACC,GAAI;IACJ,iBAAgB;IACN;IACV,SAAS,oBAAC,WAAS;IACnB,cAAc,OAAO,SAAS,CAAC,QAAQ,OAAO,GAAG;IACjD,SAAS;IACC;IACV,SAAS;KACP,UAAU;KACV,aAAa;KACb,SAAS,EAAE,SAAS,OAAO;KAC3B,WAAW;MACT,UAAU;MACV,uBAAuB;MACvB,yBAAyB;MAC1B;KACD,SAAS;KACT,6BAA6B;KAC7B,kBAAkB;KAClB,gBAAgB,EAAE,SAAS,OAAO;KAClC,4BAA4B;KAE5B,6BAA6B;KAC7B,uBAAuB;KACvB,sBAAsB;KACtB,aAAa,oBAAoB,OAAO;KACzC;IACM;IACP,WAAU;KACV;IACE;GACF"}
1
+ {"version":3,"file":"MonacoCode.mjs","names":[],"sources":["../../../../src/components/IDE/MonacoCode.tsx"],"sourcesContent":["'use client';\n\nimport { Editor, type OnChange, type OnMount } from '@monaco-editor/react';\nimport { cn } from '@utils/cn';\nimport { type FC, useMemo, useRef, useState } from 'react';\nimport { CopyButton } from '../CopyButton';\nimport { Loader } from '../Loader';\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\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 =\n showLineNumbers ??\n (typeof children === 'string' ? children.split('\\n').length > 1 : false);\n\n return (\n <div\n className={cn(\n 'relative h-full w-full text-sm',\n showLineNumbers && 'ml-0'\n )}\n >\n {showCopyButton && (\n <div className=\"sticky top-5 z-10\">\n <div\n className={cn('absolute right-2 bottom-0 flex h-7 items-center')}\n >\n <CopyButton content={children} />\n </div>\n </div>\n )}\n <div\n className=\"z-0 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"],"mappings":";;;;;;;;;;AAkBA,MAAa,cAAiC,EAC5C,UACA,UACA,YACA,iBACA,iBAAiB,MACjB,aAAa,OACb,eACI;CACJ,MAAM,eAAe,OAAuB,KAAK;CACjD,MAAM,SAAS,OAAO,KAAK;CAC3B,MAAM,CAAC,YAAY,iBAAiB,SAGjC;EAAE,QAAQ;EAAG,OAAO;EAAG,CAAC;CAE3B,MAAM,QAAQ,cACL,aAAa,wBAAwB,kBAC5C,CAAC,WAAW,CACb;CAED,MAAM,kBAA2B,QAAQ,WAAW;AAGlD,SAAO,UAAU;EACjB,MAAM,iBAAiB,OAAO,kBAAkB,IAAI,KAAK;AAEzD,SAAO,OAAO,YAAY,uBAAuB;GAC/C,MAAM;GACN,SAAS;GACT,OAAO,EAAE;GACT,QAAQ,EACN,qBAAqB,aACtB;GACF,CAAC;AACF,SAAO,OAAO,YAAY,kBAAkB;GAC1C,MAAM;GACN,SAAS;GACT,OAAO,EAAE;GACT,QAAQ,EACN,qBAAqB,aACtB;GACF,CAAC;AAEF,SAAO,OAAO,SAAS,MAAM;AAG7B,SAAO,UAAU,WAAW,mBAAmB,sBAAsB;GACnE,sBAAsB;GACtB,oBAAoB;GACrB,CAAC;AAGF,SAAO,UAAU,WAAW,mBAAmB,sBAAsB;GACnE,sBAAsB;GACtB,oBAAoB;GACrB,CAAC;AAGF,SAAO,UAAU,WAAW,mBAAmB,mBAAmB;GAChE,OAAO;GACP,sBAAsB;GACvB,CAAC;AAEF,SAAO,UAAU,WAAW,mBAAmB,mBAAmB;GAChE,OAAO;GACP,sBAAsB;GACvB,CAAC;AAEF,gBAAc;GACZ,QAAQ;GACR,OAAO,aAAa,SAAS,eAAe;GAC7C,CAAC;;CAGJ,MAAM,oBACJ,oBACC,OAAO,aAAa,WAAW,SAAS,MAAM,KAAK,CAAC,SAAS,IAAI;AAEpE,QACE,qBAAC;EACC,WAAW,GACT,kCACA,mBAAmB,OACpB;aAEA,kBACC,oBAAC;GAAI,WAAU;aACb,oBAAC;IACC,WAAW,GAAG,kDAAkD;cAEhE,oBAAC,cAAW,SAAS,WAAY;KAC7B;IACF,EAER,oBAAC;GACC,WAAU;GACV,KAAK;aAEL,oBAAC;IACC,GAAI;IACJ,iBAAgB;IACN;IACV,SAAS,oBAAC,WAAS;IACnB,cAAc,OAAO,SAAS,CAAC,QAAQ,OAAO,GAAG;IACjD,SAAS;IACC;IACV,SAAS;KACP,UAAU;KACV,aAAa;KACb,SAAS,EAAE,SAAS,OAAO;KAC3B,WAAW;MACT,UAAU;MACV,uBAAuB;MACvB,yBAAyB;MAC1B;KACD,SAAS;KACT,6BAA6B;KAC7B,kBAAkB;KAClB,gBAAgB,EAAE,SAAS,OAAO;KAClC,4BAA4B;KAE5B,6BAA6B;KAC7B,uBAAuB;KACvB,sBAAsB;KACtB,aAAa,oBAAoB,OAAO;KACzC;IACM;IACP,WAAU;KACV;IACE;GACF"}
@@ -5,7 +5,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region src/components/Input/Checkbox.tsx
6
6
  const checkboxVariants = cva([
7
7
  "appearance-none",
8
- "pointer relative border-2",
8
+ "relative cursor-pointer border-2",
9
9
  "focus:outline-0",
10
10
  "checked:border-current checked:bg-current checked:hover:bg-current/80",
11
11
  "ring-current/20 ring-offset-current",
@@ -15,7 +15,8 @@ const checkboxVariants = cva([
15
15
  "checked:before:absolute checked:before:inset-0 checked:before:content-['✓']",
16
16
  "checked:before:flex checked:before:items-center checked:before:justify-center",
17
17
  "checked:before:text-text-opposite/80",
18
- "rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl"
18
+ "rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl",
19
+ "after:absolute after:-inset-2 after:content-['']"
19
20
  ].join(" "), {
20
21
  variants: {
21
22
  variant: { default: "" },
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.mjs","names":[],"sources":["../../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type {\n DetailedHTMLProps,\n FC,\n InputHTMLAttributes,\n ReactNode,\n} from 'react';\n\nexport const checkboxVariants = cva(\n [\n 'appearance-none',\n 'pointer relative border-2',\n 'focus:outline-0',\n 'checked:border-current checked:bg-current checked:hover:bg-current/80',\n 'ring-current/20 ring-offset-current',\n 'hover:bg-current/20',\n 'disabled:opacity-50',\n\n // Ring + animation\n 'ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6',\n\n // centered custom checkmark with text-opposite color\n \"checked:before:absolute checked:before:inset-0 checked:before:content-['✓']\",\n 'checked:before:flex checked:before:items-center checked:before:justify-center',\n 'checked:before:text-text-opposite/80',\n\n // Corner shape\n 'rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl',\n ].join(' '),\n {\n variants: {\n variant: {\n default: '',\n },\n size: {\n sm: 'size-4 rounded-md',\n md: 'size-5 rounded-lg',\n lg: 'size-6 rounded-xl',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n }\n);\n\nexport enum CheckboxSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport enum CheckboxColor {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n DESTRUCTIVE = 'destructive',\n NEUTRAL = 'neutral',\n LIGHT = 'light',\n TEXT = 'text',\n DARK = 'dark',\n ERROR = 'error',\n SUCCESS = 'success',\n CUSTOM = 'custom',\n}\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<\n VariantProps<typeof checkboxVariants>,\n 'validationStyleEnabled' | 'size' | 'color'\n > & {\n size?: CheckboxSize | `${CheckboxSize}`;\n color?: CheckboxColor | `${CheckboxColor}`;\n labelClassName?: string;\n };\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n labelClassName,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={cn(\n checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n }),\n className\n )}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className={cn(\n 'flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm',\n props.labelClassName\n )}\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"mappings":";;;;;AASA,MAAa,mBAAmB,IAC9B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CAGA;CACA;CACA;CAGA;CACD,CAAC,KAAK,IAAI,EACX;CACE,UAAU;EACR,SAAS,EACP,SAAS,IACV;EACD,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,OAAO;GACL,SAAS;GACT,WAAW;GACX,aAAa;GACb,SAAS;GACT,OAAO;GACP,MAAM;GACN,MAAM;GACN,OAAO;GACP,SAAS;GACT,QAAQ;GACT;EACD,wBAAwB;GACtB,UAAU;GACV,SAAS;GACV;EACF;CACD,iBAAiB;EACf,SAAS;EACT,OAAO;EACP,wBAAwB;EACxB,MAAM;EACP;CACF,CACF;AAED,IAAY,wDAAL;AACL;AACA;AACA;;;AAGF,IAAY,0DAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAmBF,MAAM,SAA4B,EAChC,yBAAyB,OACzB,OACA,MACA,OACA,MACA,SACA,WACA,gBACA,GAAG,YAEH,oBAAC;CACC,MAAK;CACL,WAAW,GACT,iBAAiB;EACf;EACA;EACA;EACA,wBAAwB,yBAAyB,YAAY;EAC9D,CAAC,EACF,UACD;CACD,GAAI;EACJ;AAGJ,MAAa,YAA+B,UAAU;CACpD,MAAM,EAAE,OAAO,MAAM,OAAO;AAE5B,QAAO,QACL,qBAAC;EACC,SAAS,MAAM;EACf,WAAW,GACT,uEACA,MAAM,eACP;aAED,oBAAC;GAAM,IAAI,MAAM;GAAM,GAAI;IAAS,EACnC;GACK,GAER,oBAAC;EAAM,IAAI,MAAM;EAAM,GAAI;GAAS"}
1
+ {"version":3,"file":"Checkbox.mjs","names":[],"sources":["../../../../src/components/Input/Checkbox.tsx"],"sourcesContent":["import { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type {\n DetailedHTMLProps,\n FC,\n InputHTMLAttributes,\n ReactNode,\n} from 'react';\n\nexport const checkboxVariants = cva(\n [\n 'appearance-none',\n 'relative cursor-pointer border-2',\n 'focus:outline-0',\n 'checked:border-current checked:bg-current checked:hover:bg-current/80',\n 'ring-current/20 ring-offset-current',\n 'hover:bg-current/20',\n 'disabled:opacity-50',\n\n // Ring + animation\n 'ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6',\n\n // centered custom checkmark with text-opposite color\n \"checked:before:absolute checked:before:inset-0 checked:before:content-['✓']\",\n 'checked:before:flex checked:before:items-center checked:before:justify-center',\n 'checked:before:text-text-opposite/80',\n\n // Corner shape\n 'rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl',\n\n // --- FIX START ---\n // Invisible Hit Area Expansion\n // extends the interaction zone by 0.5rem (8px) on all sides\n \"after:absolute after:-inset-2 after:content-['']\",\n // --- FIX END ---\n ].join(' '),\n {\n variants: {\n variant: {\n default: '',\n },\n size: {\n sm: 'size-4 rounded-md',\n md: 'size-5 rounded-lg',\n lg: 'size-6 rounded-xl',\n },\n color: {\n primary: 'accent-primary',\n secondary: 'accent-secondary',\n destructive: 'accent-destructive',\n neutral: 'accent-neutral',\n light: 'accent-light',\n text: 'accent-text',\n dark: 'accent-dark',\n error: 'accent-error',\n success: 'accent-success',\n custom: 'accent-custom',\n },\n validationStyleEnabled: {\n disabled: '',\n enabled: 'valid:border-success invalid:border-error',\n },\n },\n defaultVariants: {\n variant: 'default',\n color: 'primary',\n validationStyleEnabled: 'disabled',\n size: 'md',\n },\n }\n);\n\nexport enum CheckboxSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport enum CheckboxColor {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n DESTRUCTIVE = 'destructive',\n NEUTRAL = 'neutral',\n LIGHT = 'light',\n TEXT = 'text',\n DARK = 'dark',\n ERROR = 'error',\n SUCCESS = 'success',\n CUSTOM = 'custom',\n}\n\nexport type CheckboxProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'size'\n> & {\n name: string;\n validationStyleEnabled?: boolean;\n label?: ReactNode;\n} & Omit<\n VariantProps<typeof checkboxVariants>,\n 'validationStyleEnabled' | 'size' | 'color'\n > & {\n size?: CheckboxSize | `${CheckboxSize}`;\n color?: CheckboxColor | `${CheckboxColor}`;\n labelClassName?: string;\n };\n\nconst Input: FC<CheckboxProps> = ({\n validationStyleEnabled = false,\n label,\n size,\n color,\n name,\n variant,\n className,\n labelClassName,\n ...props\n}) => (\n <input\n type=\"checkbox\"\n className={cn(\n checkboxVariants({\n variant,\n size,\n color,\n validationStyleEnabled: validationStyleEnabled ? 'enabled' : 'disabled',\n }),\n className\n )}\n {...props}\n />\n);\n\nexport const Checkbox: FC<CheckboxProps> = (props) => {\n const { label, name, id } = props;\n\n return label ? (\n <label\n htmlFor={id ?? name}\n className={cn(\n 'flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm',\n props.labelClassName\n )}\n >\n <Input id={id ?? name} {...props} />\n {label}\n </label>\n ) : (\n <Input id={id ?? name} {...props} />\n );\n};\n"],"mappings":";;;;;AASA,MAAa,mBAAmB,IAC9B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CAGA;CACA;CACA;CAGA;CAKA;CAED,CAAC,KAAK,IAAI,EACX;CACE,UAAU;EACR,SAAS,EACP,SAAS,IACV;EACD,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACD,OAAO;GACL,SAAS;GACT,WAAW;GACX,aAAa;GACb,SAAS;GACT,OAAO;GACP,MAAM;GACN,MAAM;GACN,OAAO;GACP,SAAS;GACT,QAAQ;GACT;EACD,wBAAwB;GACtB,UAAU;GACV,SAAS;GACV;EACF;CACD,iBAAiB;EACf,SAAS;EACT,OAAO;EACP,wBAAwB;EACxB,MAAM;EACP;CACF,CACF;AAED,IAAY,wDAAL;AACL;AACA;AACA;;;AAGF,IAAY,0DAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAmBF,MAAM,SAA4B,EAChC,yBAAyB,OACzB,OACA,MACA,OACA,MACA,SACA,WACA,gBACA,GAAG,YAEH,oBAAC;CACC,MAAK;CACL,WAAW,GACT,iBAAiB;EACf;EACA;EACA;EACA,wBAAwB,yBAAyB,YAAY;EAC9D,CAAC,EACF,UACD;CACD,GAAI;EACJ;AAGJ,MAAa,YAA+B,UAAU;CACpD,MAAM,EAAE,OAAO,MAAM,OAAO;AAE5B,QAAO,QACL,qBAAC;EACC,SAAS,MAAM;EACf,WAAW,GACT,uEACA,MAAM,eACP;aAED,oBAAC;GAAM,IAAI,MAAM;GAAM,GAAI;IAAS,EACnC;GACK,GAER,oBAAC;EAAM,IAAI,MAAM;EAAM,GAAI;GAAS"}
@@ -62,7 +62,7 @@ let LinkUnderlined = /* @__PURE__ */ function(LinkUnderlined$1) {
62
62
  const linkVariants = cva("gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50", {
63
63
  variants: {
64
64
  variant: {
65
- [`${LinkVariant.DEFAULT}`]: "h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0 hover:underline",
65
+ [`${LinkVariant.DEFAULT}`]: "h-auto justify-start border-inherit bg-current/0 px-1 decoration-1 underline-offset-4 hover:bg-current/0 hover:underline",
66
66
  [`${LinkVariant.INVISIBLE_LINK}`]: "h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-4 hover:bg-current/0",
67
67
  [`${LinkVariant.BUTTON}`]: "relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5",
68
68
  [`${LinkVariant.BUTTON_OUTLINED}`]: "relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5",