langie 2.0.3 → 2.0.4
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.
- package/dist/components/index.cjs +8 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.mjs +18 -11
- package/dist/components/index.mjs.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.mjs +1 -1
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +18 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* langie v2.0.
|
|
2
|
+
* langie v2.0.4
|
|
3
3
|
* (c) 2026 nlit
|
|
4
4
|
* @license Apache-2.0
|
|
5
5
|
*
|
|
@@ -1018,10 +1018,10 @@ LanguageSelect_default.__scopeId = "data-v-5b09cc17";
|
|
|
1018
1018
|
// vue-script:/builds/codelits/langie-sdk/src/components/InterfaceLanguageSelect.vue?type=script
|
|
1019
1019
|
import { defineComponent as _defineComponent2 } from "vue";
|
|
1020
1020
|
import { openBlock as _openBlock2, createBlock as _createBlock2, createCommentVNode as _createCommentVNode2, createElementVNode as _createElementVNode2, unref as _unref2, toDisplayString as _toDisplayString2, normalizeClass as _normalizeClass2, createElementBlock as _createElementBlock2 } from "vue";
|
|
1021
|
-
import { computed as computed2, watch as
|
|
1021
|
+
import { computed as computed2, watch as watch3, onMounted, ref as ref3 } from "vue";
|
|
1022
1022
|
|
|
1023
1023
|
// src/useLangie.ts
|
|
1024
|
-
import { watch } from "vue";
|
|
1024
|
+
import { watch as watch2 } from "vue";
|
|
1025
1025
|
|
|
1026
1026
|
// src/constants.ts
|
|
1027
1027
|
var DEFAULT_API_HOST = "https://api.langie.uk/v1";
|
|
@@ -1187,7 +1187,7 @@ async function translateBatch(translations2 = [], options = {}) {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
1189
|
// src/composables/useLangie-core.ts
|
|
1190
|
-
import { ref as ref2, reactive } from "vue";
|
|
1190
|
+
import { ref as ref2, reactive, watch } from "vue";
|
|
1191
1191
|
|
|
1192
1192
|
// src/utils/debug.ts
|
|
1193
1193
|
function devDebug(...args) {
|
|
@@ -1521,6 +1521,13 @@ function useLangieCore(options = {}) {
|
|
|
1521
1521
|
}).catch(() => {
|
|
1522
1522
|
});
|
|
1523
1523
|
};
|
|
1524
|
+
watch(
|
|
1525
|
+
[() => availableLanguages.value.length, currentLanguage],
|
|
1526
|
+
([count, lang]) => {
|
|
1527
|
+
if (count) applyLocalizedNames(lang);
|
|
1528
|
+
},
|
|
1529
|
+
{ immediate: true }
|
|
1530
|
+
);
|
|
1524
1531
|
const setLanguage = (lang) => {
|
|
1525
1532
|
if (lang && lang !== currentLanguage.value) {
|
|
1526
1533
|
}
|
|
@@ -2039,7 +2046,7 @@ function createLangieInstance(options = {}) {
|
|
|
2039
2046
|
};
|
|
2040
2047
|
loadCachedTranslations();
|
|
2041
2048
|
loadCachedLanguages();
|
|
2042
|
-
|
|
2049
|
+
watch2(currentLanguage2, () => {
|
|
2043
2050
|
Object.keys(translations2).forEach((key) => delete translations2[key]);
|
|
2044
2051
|
Object.keys(uiTranslations2).forEach((key) => delete uiTranslations2[key]);
|
|
2045
2052
|
loadCachedTranslations();
|
|
@@ -2322,7 +2329,7 @@ function createLangieInstance(options = {}) {
|
|
|
2322
2329
|
isLoading.value = false;
|
|
2323
2330
|
}
|
|
2324
2331
|
};
|
|
2325
|
-
|
|
2332
|
+
watch2(currentLanguage2, () => {
|
|
2326
2333
|
recentlyQueued.clear();
|
|
2327
2334
|
loadCachedTranslations();
|
|
2328
2335
|
batching.cleanup();
|
|
@@ -2481,12 +2488,12 @@ var InterfaceLanguageSelect_default = /* @__PURE__ */ _defineComponent2({
|
|
|
2481
2488
|
}
|
|
2482
2489
|
}
|
|
2483
2490
|
}
|
|
2484
|
-
|
|
2491
|
+
watch3(currentLanguage2, (newLangCode) => {
|
|
2485
2492
|
if (newLangCode) {
|
|
2486
2493
|
localStorage.setItem("interface_language", newLangCode);
|
|
2487
2494
|
}
|
|
2488
2495
|
});
|
|
2489
|
-
|
|
2496
|
+
watch3(
|
|
2490
2497
|
() => effectiveLanguages.value,
|
|
2491
2498
|
(newLanguages) => {
|
|
2492
2499
|
if (newLanguages.length > 0 && !currentLanguage2.value) {
|
|
@@ -2530,7 +2537,7 @@ var InterfaceLanguageSelect_default = /* @__PURE__ */ _defineComponent2({
|
|
|
2530
2537
|
}
|
|
2531
2538
|
}
|
|
2532
2539
|
});
|
|
2533
|
-
|
|
2540
|
+
watch3(
|
|
2534
2541
|
currentLanguageObject,
|
|
2535
2542
|
(newValue) => {
|
|
2536
2543
|
if (newValue) {
|
|
@@ -2588,7 +2595,7 @@ InterfaceLanguageSelect_default.__scopeId = "data-v-258d337a";
|
|
|
2588
2595
|
// vue-script:/builds/codelits/langie-sdk/src/components/lt.vue?type=script
|
|
2589
2596
|
import { defineComponent as _defineComponent3 } from "vue";
|
|
2590
2597
|
import { toDisplayString as _toDisplayString3, openBlock as _openBlock3, createElementBlock as _createElementBlock3, Transition as _Transition, withCtx as _withCtx2, createBlock as _createBlock3 } from "vue";
|
|
2591
|
-
import { computed as computed3, useSlots, watch as
|
|
2598
|
+
import { computed as computed3, useSlots, watch as watch4 } from "vue";
|
|
2592
2599
|
import { ref as ref4, nextTick as nextTick2 } from "vue";
|
|
2593
2600
|
var lt_default = /* @__PURE__ */ _defineComponent3({
|
|
2594
2601
|
__name: "lt",
|
|
@@ -2630,7 +2637,7 @@ var lt_default = /* @__PURE__ */ _defineComponent3({
|
|
|
2630
2637
|
return (slotContent || "").trim();
|
|
2631
2638
|
});
|
|
2632
2639
|
const forceUpdate = ref4(0);
|
|
2633
|
-
|
|
2640
|
+
watch4(
|
|
2634
2641
|
[uiTranslations2, translations2],
|
|
2635
2642
|
() => {
|
|
2636
2643
|
nextTick2(() => {
|