@menapo/vi18n 0.1.1 → 0.1.2
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/{apply-Bre-lY9J.js → apply-FAHl1R6T.js} +69 -89
- package/dist/{captured-Bj8bO6vd.js → captured-CTjjDF5o.js} +196 -217
- package/dist/{check-BIKEuu6B.js → check-DwFwOB1d.js} +66 -84
- package/dist/cli.js +2 -3
- package/dist/{collect-Cx4_SKOe.js → collect-CYATDjdo.js} +1 -2
- package/dist/collisions-uMTuq36M.js +215 -0
- package/dist/compile-CEvH-6sY.js +240 -0
- package/dist/{compile-Cc97JaW2.js → compile-DqkofbiO.js} +376 -331
- package/dist/concurrency-BCY_4zcr.js +1 -0
- package/dist/concurrency-Dy2ny50V.js +107 -0
- package/dist/config.d.ts +1 -5
- package/dist/config.js +4 -5
- package/dist/{types-D3QGM8XO.js → diagnostics-1onDF6Ua.js} +26 -26
- package/dist/{dir-zw6bGMKQ.js → dir-TGLYuOZb.js} +34 -37
- package/dist/{duplicates-yuRljQ6h.js → duplicates-CsUXRX2J.js} +10 -27
- package/dist/engine-Bf7nVigL.js +556 -0
- package/dist/engine.d.ts +1 -5
- package/dist/engine.js +297 -168
- package/dist/exchange-DYG9RZoT.js +41 -0
- package/dist/{exclude-Du-Zd_qI.js → exclude-vMnm3lqU.js} +2 -3
- package/dist/{export-C9Sy6UWv.js → export-BYq0gfLd.js} +17 -38
- package/dist/{extract-C3S8btx0.js → extract-CYtuEo8u.js} +114 -82
- package/dist/{formats-9unqj_fZ.js → formats-ChV1LVH_.js} +352 -276
- package/dist/fs-ezCMZeDV.js +52 -0
- package/dist/i18next-1waHziMy.js +1 -0
- package/dist/i18next-D66Icz3L.js +1907 -0
- package/dist/{import-nANvQutw.js → import-BApbQlmm.js} +81 -75
- package/dist/index.d.ts +1 -13
- package/dist/index.js +14 -16
- package/dist/{init-C2ScuW6a.js → init-J7AwwA5e.js} +466 -501
- package/dist/{library-D5CWvTQs.js → library-BfSOBeBd.js} +975 -451
- package/dist/lingui-Ee2farVo.js +902 -0
- package/dist/lint.d.ts +0 -4
- package/dist/lint.js +68 -81
- package/dist/{load-gW-oJt1Q.js → load-BFLLqY8x.js} +272 -147
- package/dist/{load-CQRz4PpM.js → load-CMwhukZ4.js} +1211 -1115
- package/dist/{locales-DX4MOBFE.js → locales-DxLDrx-h.js} +271 -237
- package/dist/{lsp-RMMMc88P.js → lsp-BC7xDGON.js} +4 -5
- package/dist/{match-BGr8EXB3.js → match-BLDcj610.js} +11 -4
- package/dist/{mcp-CHVwBoRP.js → mcp-Cka8ywDF.js} +4 -5
- package/dist/{merge-driver-BTX87aVm.js → merge-driver-B04Apm29.js} +138 -122
- package/dist/migrate-D7TNl6SD.js +2169 -0
- package/dist/migrate-khCY8TE0.js +1 -0
- package/dist/{openai-CTaMDcl-.js → openai-RWw0YlAx.js} +128 -87
- package/dist/{output-DWE3SIUA.js → output-CF9uvk_-.js} +15 -9
- package/dist/parse.d.ts +1 -3
- package/dist/parse.js +7 -8
- package/dist/{pipeline-DbX6rlo5.js → pipeline-B30irGMD.js} +1 -1
- package/dist/{pipeline-C9Dbotkh.js → pipeline-sgl_q_op.js} +387 -359
- package/dist/project-DSzWKU3C.js +544 -0
- package/dist/{pseudo-DRv30iN5.js → pseudo-DNbNNVGP.js} +125 -3
- package/dist/{raw-C4Y6vyGY.js → raw-YsYZMS9n.js} +52 -29
- package/dist/react-intl-tzGIk6G3.js +634 -0
- package/dist/restore-BG_zMpSj.js +199 -0
- package/dist/rewrite-hAcRJwiZ.js +415 -0
- package/dist/{rich-DCUKl5HM.js → rich-ApY1Dm4S.js} +35 -28
- package/dist/rolldown-runtime-C1I3wEg2.js +43 -0
- package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-D8jQpDG7.js} +1 -2
- package/dist/run-CFzR3V93.js +647 -0
- package/dist/scan-worker.d.ts +2 -4
- package/dist/scan-worker.js +1 -1
- package/dist/{scoped-BMYpSthj.js → scoped-h3KE8XWW.js} +3 -4
- package/dist/{server-deBOq2vq.js → server-WlxZH0oX.js} +275 -330
- package/dist/{server-Da1Ot9IN.js → server-ceuzzkal.js} +292 -386
- package/dist/server.d.ts +1 -17
- package/dist/server.js +415 -381
- package/dist/{sitemap-DJXzKoza.js → sitemap-796jJKUT.js} +21 -33
- package/dist/{sources-D19czDSA.js → sources-DuOdM02f.js} +712 -373
- package/dist/{status-zr4jY59Y.js → status-CTH3qI-0.js} +30 -30
- package/dist/{stdio-FPOKQAgu.js → stdio-D9kTzyqB.js} +2 -4
- package/dist/{stdio-CVaJfxA7.js → stdio-FWIVU3P4.js} +1 -2
- package/dist/sync-CpL0Qsgw.js +1352 -0
- package/dist/{t-DC-c9zE5.js → t-gvEXx25s.js} +76 -53
- package/dist/test.d.ts +5 -16
- package/dist/test.js +77 -48
- package/dist/translate-BrfVRkjl.js +336 -0
- package/dist/{ts-BaU5yOf0.js → ts-BX6kwig5.js} +25 -14
- package/dist/{types-DtvQ7UdD.js → types-3kwyaCAm.js} +1 -2
- package/dist/{types-DsdWBG0b.d.ts → types-BaG1LboH.d.ts} +2 -6
- package/dist/{types-CgUCkFU1.d.ts → types-Cy2bPdSg.d.ts} +14 -20
- package/dist/types-Ds_vebja.js +41 -0
- package/dist/{units-CQ5Q99RC.js → units-VVLgQ7x7.js} +7 -16
- package/dist/{url-CRfCOhUI.js → url-Bpc6wLea.js} +24 -11
- package/dist/{url-CsBkRaJy.js → url-D2_VlEeH.js} +25 -12
- package/dist/{validate-D6DJepZv.js → validate-PGgMsasz.js} +3 -5
- package/dist/{validate-BxpupdAf.js → validate-zv4-IZyZ.js} +690 -377
- package/dist/{version-Byqi2guX.js → version-BFs370Ce.js} +3 -5
- package/dist/{vite-scan-CT_vsp4g.js → vite-scan-DFKSGVE9.js} +87 -92
- package/dist/vite.d.ts +2 -6
- package/dist/vite.js +6482 -6018
- package/dist/vue-i18n-CBmZqHbG.js +806 -0
- package/dist/{which-BOemZ5Q8.js → which-BpyJyBkX.js} +44 -37
- package/dist/{worker-84U6uYB3.js → worker-BjzVqJVO.js} +454 -608
- package/package.json +5 -5
- package/dist/check-HsmmpJZg.js +0 -1
- package/dist/codec-DuvU2VQy.js +0 -207
- package/dist/collisions-CfpZU8e4.js +0 -217
- package/dist/compile-BaDh0cHG.js +0 -245
- package/dist/concurrency-C9UUWuDC.js +0 -96
- package/dist/concurrency-DONL7t4V.js +0 -1
- package/dist/engine-C2ENBRJe.js +0 -531
- package/dist/i18next-9HAoxwUI.js +0 -1
- package/dist/i18next-BEJgv_S8.js +0 -1596
- package/dist/lingui-zUiCl9Um.js +0 -833
- package/dist/messages-BfjIExyB.js +0 -166
- package/dist/migrate-IpLDMXmq.js +0 -1484
- package/dist/migrate-rCQuOGsf.js +0 -1
- package/dist/project-Bw9UPIdx.js +0 -1046
- package/dist/project-C4GpaN-n.js +0 -381
- package/dist/react-intl-BP0u-D5m.js +0 -519
- package/dist/restore-CiYv-jxS.js +0 -175
- package/dist/rewrite-EsIw_lsq.js +0 -803
- package/dist/run-BEcnBbu-.js +0 -694
- package/dist/runtime-DTMmliT1.js +0 -64
- package/dist/sync-B9V2KFwb.js +0 -658
- package/dist/translate-CQnJfLjO.js +0 -299
- package/dist/types-wSh9fCBY.js +0 -11
- package/dist/vue-i18n-g0iGy6CZ.js +0 -651
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as warnOnce, g as DEV, n as S } from "./dir-TGLYuOZb.js";
|
|
2
|
+
import { E as formatPart, a as caseOf, c as valueOf, i as argText, l as warnMissing, s as poundOf, t as lookup } from "./t-gvEXx25s.js";
|
|
3
3
|
const ENTITIES = {
|
|
4
|
-
"&": "amp",
|
|
5
|
-
"<": "lt",
|
|
6
|
-
">": "gt",
|
|
7
|
-
"\"": "quot",
|
|
8
|
-
"'": "
|
|
4
|
+
"&": "&",
|
|
5
|
+
"<": "<",
|
|
6
|
+
">": ">",
|
|
7
|
+
"\"": """,
|
|
8
|
+
"'": "'"
|
|
9
9
|
};
|
|
10
10
|
/** A node with the framework's element key (`State.richKey`, set by React and Preact glue). */
|
|
11
11
|
const keyed = (node, key) => S.richKey?.(node, key) ?? node;
|
|
@@ -23,7 +23,7 @@ function richIn(key, values, mode, scope) {
|
|
|
23
23
|
* nodes; in `richHtml` it is escaped first, as only handler output is trusted.
|
|
24
24
|
*/
|
|
25
25
|
const text = (into, s, escape = html) => {
|
|
26
|
-
if (escape) s = s.replace(/[&<>"']/g, (c) =>
|
|
26
|
+
if (escape) s = s.replace(/[&<>"']/g, (c) => ENTITIES[c]);
|
|
27
27
|
if (!s) return;
|
|
28
28
|
const last = into.length - 1;
|
|
29
29
|
if (typeof into[last] === "string") into[last] += s;
|
|
@@ -45,36 +45,44 @@ function richIn(key, values, mode, scope) {
|
|
|
45
45
|
const p = m[i];
|
|
46
46
|
if (typeof p === "string") text(into, p);
|
|
47
47
|
else if (p === 0) text(into, formatPart(4, void 0, n, s));
|
|
48
|
+
else if (p[1] > 6) tag(p, i, n, into, k + i);
|
|
48
49
|
else {
|
|
49
50
|
const op = p[1];
|
|
50
51
|
const value = valueOf(values, p[0]);
|
|
51
|
-
|
|
52
|
-
if (
|
|
53
|
-
if (op > 6) {
|
|
54
|
-
const fn = typeof value === "function" ? value : S.tags?.[mode + p[0]];
|
|
55
|
-
if (fn || mode === 1) {
|
|
56
|
-
const children = [];
|
|
57
|
-
if (op === 7) walk(p, 2, n, children, 0);
|
|
58
|
-
if (mode === 1) into.push({
|
|
59
|
-
tag: p[0],
|
|
60
|
-
children
|
|
61
|
-
});
|
|
62
|
-
else if (html) text(into, "" + fn(children.join(""), i), false);
|
|
63
|
-
else into.push(keyed(fn(children, k + i), k + i));
|
|
64
|
-
} else {
|
|
65
|
-
if (DEV) warnOnce(`no handler for <${p[0]}> in ${html ? "richHtml" : "rich"}()`);
|
|
66
|
-
if (op === 7) walk(p, 2, n, into, nested);
|
|
67
|
-
}
|
|
68
|
-
} else if (op === void 0) {
|
|
52
|
+
if (DEV) warnMissing(value, p, m);
|
|
53
|
+
if (!op) {
|
|
69
54
|
if (!mode && value != null && !"stringnumberbigint".includes(typeof value) && !(value instanceof Date)) into.push(keyed(value, k + i));
|
|
70
55
|
else text(into, argText(value, s));
|
|
71
56
|
} else if (op < 4) {
|
|
72
57
|
const c = caseOf(p, value, s.locale);
|
|
73
|
-
if (c
|
|
58
|
+
if (c) walk(c, 0, poundOf(p, value, n), into, (k + i + 1) * 1e3);
|
|
74
59
|
} else text(into, formatPart(op, p[2], value, s));
|
|
75
60
|
}
|
|
76
61
|
}
|
|
77
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Tag part `p` at index `i` of its list, `key` its key among the output
|
|
65
|
+
* siblings: tags have handlers, not values. A call's own handler wins over
|
|
66
|
+
* `defaults.tags` (`State.tags`, keyed by mode and tag). `richParts` has no
|
|
67
|
+
* handlers: every tag becomes a part, whatever `fn` is.
|
|
68
|
+
*/
|
|
69
|
+
const tag = (p, i, n, into, key) => {
|
|
70
|
+
const value = valueOf(values, p[0]);
|
|
71
|
+
const fn = typeof value === "function" ? value : S.tags?.[mode + p[0]];
|
|
72
|
+
if (fn || mode === 1) {
|
|
73
|
+
const children = [];
|
|
74
|
+
walk(p, 2, n, children, 0);
|
|
75
|
+
if (mode === 1) into.push({
|
|
76
|
+
tag: p[0],
|
|
77
|
+
children
|
|
78
|
+
});
|
|
79
|
+
else if (html) text(into, "" + fn(children.join(""), i), false);
|
|
80
|
+
else into.push(keyed(fn(children, key), key));
|
|
81
|
+
} else {
|
|
82
|
+
if (DEV) warnOnce(`no handler for <${p[0]}> in ${html ? "richHtml" : "rich"}()`);
|
|
83
|
+
walk(p, 2, n, into, (key + 1) * 1e3);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
78
86
|
walk(lookup(s, key, !scope), 0, 0, out, 0);
|
|
79
87
|
return out;
|
|
80
88
|
}
|
|
@@ -93,5 +101,4 @@ const richHtml = html;
|
|
|
93
101
|
/** `string | { tag, children }` parts; arguments are stringified. */
|
|
94
102
|
const parts = (message, values) => richIn(message, values, 1);
|
|
95
103
|
const richParts = parts;
|
|
96
|
-
//#endregion
|
|
97
104
|
export { richParts as i, richHtml as n, richIn as r, rich as t };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __esmMin = (fn, res, err) => () => {
|
|
10
|
+
if (err) throw err[0];
|
|
11
|
+
try {
|
|
12
|
+
return fn && (res = fn(fn = 0)), res;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw err = [e], e;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
18
|
+
var __exportAll = (all, no_symbols) => {
|
|
19
|
+
let target = {};
|
|
20
|
+
for (var name in all) __defProp(target, name, {
|
|
21
|
+
get: all[name],
|
|
22
|
+
enumerable: true
|
|
23
|
+
});
|
|
24
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
25
|
+
return target;
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
29
|
+
key = keys[i];
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
31
|
+
get: ((k) => from[k]).bind(null, key),
|
|
32
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return to;
|
|
36
|
+
};
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
|
+
value: mod,
|
|
39
|
+
enumerable: true
|
|
40
|
+
}) : target, mod));
|
|
41
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
43
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
@@ -9,5 +9,4 @@ var __exportAll = (all, no_symbols) => {
|
|
|
9
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
10
|
return target;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { __exportAll as t };
|