tera-system-ui 0.0.15 → 0.0.17

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 (70) hide show
  1. package/dist/components/brand-logo/BrandLogo.svelte +31 -31
  2. package/dist/components/button/Button.svelte +49 -49
  3. package/dist/components/combobox/Combobox.svelte +8 -8
  4. package/dist/components/command/command.scss +72 -72
  5. package/dist/components/command/components/Command.svelte +120 -120
  6. package/dist/components/command/components/CommandEmpty.svelte +30 -30
  7. package/dist/components/command/components/CommandGroup.svelte +110 -110
  8. package/dist/components/command/components/CommandInput.svelte +92 -92
  9. package/dist/components/command/components/CommandItem.svelte +110 -110
  10. package/dist/components/command/components/CommandList.svelte +56 -56
  11. package/dist/components/command/components/CommandLoading.svelte +28 -28
  12. package/dist/components/command/components/CommandSeparator.svelte +21 -21
  13. package/dist/components/dialog/Dialog.svelte +107 -107
  14. package/dist/components/dialog/dialog.scss +112 -112
  15. package/dist/components/header/Header.svelte +36 -36
  16. package/dist/components/header/header.scss +19 -19
  17. package/dist/components/icons/IconArrowBigRightFilled.svelte +10 -10
  18. package/dist/components/icons/IconBook.svelte +10 -10
  19. package/dist/components/icons/IconBookmarkPlus.svelte +10 -10
  20. package/dist/components/icons/IconCalculator.svelte +10 -10
  21. package/dist/components/icons/IconCheck.svelte +10 -10
  22. package/dist/components/icons/IconChevronDown.svelte +10 -10
  23. package/dist/components/icons/IconCopy.svelte +10 -10
  24. package/dist/components/icons/IconCopyCheckFilled.svelte +10 -10
  25. package/dist/components/icons/IconHamburger.svelte +10 -10
  26. package/dist/components/icons/IconLanguage.svelte +10 -10
  27. package/dist/components/icons/IconLoader2.svelte +10 -10
  28. package/dist/components/icons/IconMoon.svelte +10 -10
  29. package/dist/components/icons/IconPointFilled.svelte +10 -10
  30. package/dist/components/icons/IconSearch.svelte +10 -10
  31. package/dist/components/icons/IconSun.svelte +10 -10
  32. package/dist/components/icons/IconSwitchHorizontal.svelte +10 -10
  33. package/dist/components/icons/IconSwitchVertical.svelte +10 -10
  34. package/dist/components/icons/IconTransform.svelte +10 -10
  35. package/dist/components/icons/IconX.svelte +10 -10
  36. package/dist/components/input/Input.svelte +24 -24
  37. package/dist/components/language-picker-button/LanguagePickerButton.svelte +109 -109
  38. package/dist/components/light-dark-toggle/LightDarkToggle.svelte +36 -36
  39. package/dist/components/popover/Popover.svelte +136 -136
  40. package/dist/components/popover-responsive/PopoverResponsive.svelte +87 -87
  41. package/dist/components/side-navigation/SideNavigation.svelte +114 -113
  42. package/dist/components/side-navigation/SideNavigationItem.svelte +17 -17
  43. package/dist/components/side-navigation/SideNavigationLayout.svelte +19 -19
  44. package/dist/components/side-navigation/sidenav.scss +149 -149
  45. package/dist/components/tera-ui-context/TeraUiContext.svelte +28 -28
  46. package/dist/paraglide/.prettierignore +3 -0
  47. package/dist/paraglide/messages/de.d.ts +4 -0
  48. package/dist/paraglide/messages/de.js +42 -0
  49. package/dist/paraglide/messages/en.d.ts +4 -0
  50. package/dist/paraglide/messages/en.js +42 -0
  51. package/dist/paraglide/messages/es.d.ts +4 -0
  52. package/dist/paraglide/messages/es.js +42 -0
  53. package/dist/paraglide/messages/fr.d.ts +4 -0
  54. package/dist/paraglide/messages/fr.js +42 -0
  55. package/dist/paraglide/messages/it.d.ts +4 -0
  56. package/dist/paraglide/messages/it.js +42 -0
  57. package/dist/paraglide/messages/pt.d.ts +4 -0
  58. package/dist/paraglide/messages/pt.js +42 -0
  59. package/dist/paraglide/messages/ru.d.ts +4 -0
  60. package/dist/paraglide/messages/ru.js +42 -0
  61. package/dist/paraglide/messages/vi.d.ts +4 -0
  62. package/dist/paraglide/messages/vi.js +42 -0
  63. package/dist/paraglide/messages.d.ts +12 -0
  64. package/dist/paraglide/messages.js +122 -0
  65. package/dist/paraglide/runtime.d.ts +52 -0
  66. package/dist/paraglide/runtime.js +141 -0
  67. package/dist/themes/scrollbar.scss +37 -37
  68. package/package.json +95 -94
  69. package/scripts/add-component-template.js +120 -120
  70. package/scripts/generate-ts-index.js +136 -136
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Sprache auswählen`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Einheitenrechner`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `CalcES Wissenschaftlicher Rechner`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `CalcES Dokumentation`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Select language`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Unit Converter`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `CalcES Scientific Calculator`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `CalcES Documentation`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Seleccionar idioma`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Convertidor de Unidades`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `Calculadora Científica CalcES`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `Documentación de CalcES`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Sélectionner la langue`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Convertisseur d'Unités`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `Calculatrice Scientifique CalcES`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `Documentation de CalcES`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Seleziona la lingua`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Convertitore di Unità`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `Calcolatrice Scientifica CalcES`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `Documentazione di CalcES`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Selecionar idioma`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Conversor de Unidades`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `Calculadora Científica CalcES`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `Documentação CalcES`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Выберите язык`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Конвертер единиц`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `Научный калькулятор CalcES`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `Документация CalcES`
@@ -0,0 +1,4 @@
1
+ export function text_select_language(): string;
2
+ export function text_unit_converter(): string;
3
+ export function text_calces_scientific_calculator(): string;
4
+ export function text_calces_documentation(): string;
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file contains language specific message functions for tree-shaking.
4
+ *
5
+ *! WARNING: Only import messages from this file if you want to manually
6
+ *! optimize your bundle. Else, import from the `messages.js` file.
7
+ *
8
+ * Your bundler will (in the future) automatically replace the index function
9
+ * with a language specific message function in the build step.
10
+ */
11
+
12
+
13
+ /**
14
+ *
15
+ * @returns {string}
16
+ */
17
+ /* @__NO_SIDE_EFFECTS__ */
18
+ export const text_select_language = () => `Chọn ngôn ngữ`
19
+
20
+
21
+ /**
22
+ *
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_unit_converter = () => `Bộ Chuyển Đổi Đơn Vị`
27
+
28
+
29
+ /**
30
+ *
31
+ * @returns {string}
32
+ */
33
+ /* @__NO_SIDE_EFFECTS__ */
34
+ export const text_calces_scientific_calculator = () => `Máy Tính Khoa Học CalcES`
35
+
36
+
37
+ /**
38
+ *
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const text_calces_documentation = () => `Tài Liệu CalcES`
@@ -0,0 +1,12 @@
1
+ export function text_select_language(params?: {}, options?: {
2
+ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
3
+ }): string;
4
+ export function text_unit_converter(params?: {}, options?: {
5
+ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
6
+ }): string;
7
+ export function text_calces_scientific_calculator(params?: {}, options?: {
8
+ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
9
+ }): string;
10
+ export function text_calces_documentation(params?: {}, options?: {
11
+ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it";
12
+ }): string;
@@ -0,0 +1,122 @@
1
+ /* eslint-disable */
2
+ import { languageTag } from "./runtime.js"
3
+ import * as de from "./messages/de.js"
4
+ import * as en from "./messages/en.js"
5
+ import * as es from "./messages/es.js"
6
+ import * as fr from "./messages/fr.js"
7
+ import * as pt from "./messages/pt.js"
8
+ import * as vi from "./messages/vi.js"
9
+ import * as ru from "./messages/ru.js"
10
+ import * as it from "./messages/it.js"
11
+
12
+
13
+ /**
14
+ * This message has been compiled by [inlang paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
15
+ *
16
+ * - Don't edit the message's code. Use [Sherlock (VS Code extension)](https://inlang.com/m/r7kp499g/app-inlang-ideExtension),
17
+ * the [web editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) instead, or edit the translation files manually.
18
+ *
19
+ * - The params are NonNullable<unknown> because the inlang SDK does not provide information on the type of a param (yet).
20
+ *
21
+ * @param {{}} params
22
+ * @param {{ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it" }} options
23
+ * @returns {string}
24
+ */
25
+ /* @__NO_SIDE_EFFECTS__ */
26
+ export const text_select_language = (params = {}, options = {}) => {
27
+ return {
28
+ de: de.text_select_language,
29
+ en: en.text_select_language,
30
+ es: es.text_select_language,
31
+ fr: fr.text_select_language,
32
+ it: it.text_select_language,
33
+ pt: pt.text_select_language,
34
+ ru: ru.text_select_language,
35
+ vi: vi.text_select_language
36
+ }[options.languageTag ?? languageTag()]()
37
+ }
38
+
39
+
40
+
41
+ /**
42
+ * This message has been compiled by [inlang paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
43
+ *
44
+ * - Don't edit the message's code. Use [Sherlock (VS Code extension)](https://inlang.com/m/r7kp499g/app-inlang-ideExtension),
45
+ * the [web editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) instead, or edit the translation files manually.
46
+ *
47
+ * - The params are NonNullable<unknown> because the inlang SDK does not provide information on the type of a param (yet).
48
+ *
49
+ * @param {{}} params
50
+ * @param {{ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it" }} options
51
+ * @returns {string}
52
+ */
53
+ /* @__NO_SIDE_EFFECTS__ */
54
+ export const text_unit_converter = (params = {}, options = {}) => {
55
+ return {
56
+ de: de.text_unit_converter,
57
+ en: en.text_unit_converter,
58
+ es: es.text_unit_converter,
59
+ fr: fr.text_unit_converter,
60
+ it: it.text_unit_converter,
61
+ pt: pt.text_unit_converter,
62
+ ru: ru.text_unit_converter,
63
+ vi: vi.text_unit_converter
64
+ }[options.languageTag ?? languageTag()]()
65
+ }
66
+
67
+
68
+
69
+ /**
70
+ * This message has been compiled by [inlang paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
71
+ *
72
+ * - Don't edit the message's code. Use [Sherlock (VS Code extension)](https://inlang.com/m/r7kp499g/app-inlang-ideExtension),
73
+ * the [web editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) instead, or edit the translation files manually.
74
+ *
75
+ * - The params are NonNullable<unknown> because the inlang SDK does not provide information on the type of a param (yet).
76
+ *
77
+ * @param {{}} params
78
+ * @param {{ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it" }} options
79
+ * @returns {string}
80
+ */
81
+ /* @__NO_SIDE_EFFECTS__ */
82
+ export const text_calces_scientific_calculator = (params = {}, options = {}) => {
83
+ return {
84
+ de: de.text_calces_scientific_calculator,
85
+ en: en.text_calces_scientific_calculator,
86
+ es: es.text_calces_scientific_calculator,
87
+ fr: fr.text_calces_scientific_calculator,
88
+ it: it.text_calces_scientific_calculator,
89
+ pt: pt.text_calces_scientific_calculator,
90
+ ru: ru.text_calces_scientific_calculator,
91
+ vi: vi.text_calces_scientific_calculator
92
+ }[options.languageTag ?? languageTag()]()
93
+ }
94
+
95
+
96
+
97
+ /**
98
+ * This message has been compiled by [inlang paraglide](https://inlang.com/m/gerre34r/library-inlang-paraglideJs).
99
+ *
100
+ * - Don't edit the message's code. Use [Sherlock (VS Code extension)](https://inlang.com/m/r7kp499g/app-inlang-ideExtension),
101
+ * the [web editor](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) instead, or edit the translation files manually.
102
+ *
103
+ * - The params are NonNullable<unknown> because the inlang SDK does not provide information on the type of a param (yet).
104
+ *
105
+ * @param {{}} params
106
+ * @param {{ languageTag?: "de" | "en" | "es" | "fr" | "pt" | "vi" | "ru" | "it" }} options
107
+ * @returns {string}
108
+ */
109
+ /* @__NO_SIDE_EFFECTS__ */
110
+ export const text_calces_documentation = (params = {}, options = {}) => {
111
+ return {
112
+ de: de.text_calces_documentation,
113
+ en: en.text_calces_documentation,
114
+ es: es.text_calces_documentation,
115
+ fr: fr.text_calces_documentation,
116
+ it: it.text_calces_documentation,
117
+ pt: pt.text_calces_documentation,
118
+ ru: ru.text_calces_documentation,
119
+ vi: vi.text_calces_documentation
120
+ }[options.languageTag ?? languageTag()]()
121
+ }
122
+
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Check if something is an available language tag.
3
+ *
4
+ * @example
5
+ * if (isAvailableLanguageTag(params.locale)) {
6
+ * setLanguageTag(params.locale)
7
+ * } else {
8
+ * setLanguageTag("en")
9
+ * }
10
+ *
11
+ * @param {any} thing
12
+ * @returns {thing is AvailableLanguageTag}
13
+ */
14
+ export function isAvailableLanguageTag(thing: any): thing is AvailableLanguageTag;
15
+ /**
16
+ * The project's source language tag.
17
+ *
18
+ * @example
19
+ * if (newlySelectedLanguageTag === sourceLanguageTag){
20
+ * // do nothing as the source language tag is the default language
21
+ * return
22
+ * }
23
+ */
24
+ export const sourceLanguageTag: "en";
25
+ /**
26
+ * The project's available language tags.
27
+ *
28
+ * @example
29
+ * if (availableLanguageTags.includes(userSelectedLanguageTag) === false){
30
+ * throw new Error("Language tag not available")
31
+ * }
32
+ */
33
+ export const availableLanguageTags: readonly ["de", "en", "es", "fr", "pt", "vi", "ru", "it"];
34
+ /**
35
+ * Get the current language tag.
36
+ *
37
+ * @example
38
+ * if (languageTag() === "de"){
39
+ * console.log("Germany 🇩🇪")
40
+ * } else if (languageTag() === "nl"){
41
+ * console.log("Netherlands 🇳🇱")
42
+ * }
43
+ *
44
+ * @type {() => AvailableLanguageTag}
45
+ */
46
+ export let languageTag: () => AvailableLanguageTag;
47
+ export function setLanguageTag(tag: AvailableLanguageTag | (() => AvailableLanguageTag)): void;
48
+ export function onSetLanguageTag(fn: (languageTag: AvailableLanguageTag) => void): void;
49
+ /**
50
+ * A language tag that is available in the project.
51
+ */
52
+ export type AvailableLanguageTag = (typeof availableLanguageTags)[number];