gemi 0.53.0 → 0.54.0
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/app/index.js +2 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gemi.js +1456 -5
- package/dist/bin/gemi.js.map +9 -5
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +2 -2
- package/dist/bun/plugin.js.map +1 -1
- package/dist/bun/preload.js +2 -2
- package/dist/bun/preload.js.map +1 -1
- package/dist/{chunk-msz8rngs.js → chunk-004bcmsa.js} +2 -2
- package/dist/chunk-004bcmsa.js.map +10 -0
- package/dist/chunk-07t0dmdg.js +4 -0
- package/dist/{chunk-faa987e4.js.map → chunk-07t0dmdg.js.map} +2 -2
- package/dist/{chunk-cg53h5ht.js → chunk-0weeq0ke.js} +2 -2
- package/dist/{chunk-cg53h5ht.js.map → chunk-0weeq0ke.js.map} +1 -1
- package/dist/chunk-113khwbw.js +5 -0
- package/dist/{chunk-2qn472j4.js.map → chunk-113khwbw.js.map} +1 -1
- package/dist/{chunk-tmk4zfz9.js → chunk-1sh6kqjn.js} +3 -3
- package/dist/{chunk-tmk4zfz9.js.map → chunk-1sh6kqjn.js.map} +1 -1
- package/dist/{chunk-2gw6cyyj.js → chunk-1snh7yc4.js} +2 -2
- package/dist/{chunk-2gw6cyyj.js.map → chunk-1snh7yc4.js.map} +1 -1
- package/dist/chunk-26r8dcxd.js +6 -0
- package/dist/{chunk-ffre1z8s.js.map → chunk-26r8dcxd.js.map} +2 -2
- package/dist/{chunk-ebcgdv00.js → chunk-2pt6kyn9.js} +3 -3
- package/dist/{chunk-ebcgdv00.js.map → chunk-2pt6kyn9.js.map} +1 -1
- package/dist/{chunk-1pqfmw5h.js → chunk-2zmz3pjk.js} +3 -3
- package/dist/{chunk-1pqfmw5h.js.map → chunk-2zmz3pjk.js.map} +1 -1
- package/dist/{chunk-zhsaz9cr.js → chunk-3bw1jk21.js} +1 -1
- package/dist/chunk-4qkzdyj7.js +4 -0
- package/dist/{chunk-0h3jr9d9.js.map → chunk-4qkzdyj7.js.map} +1 -1
- package/dist/{chunk-d1ahbza9.js → chunk-50vm7x98.js} +3 -3
- package/dist/{chunk-d1ahbza9.js.map → chunk-50vm7x98.js.map} +1 -1
- package/dist/{chunk-qyaqg07q.js → chunk-6j1z2cqt.js} +2 -2
- package/dist/{chunk-qyaqg07q.js.map → chunk-6j1z2cqt.js.map} +1 -1
- package/dist/chunk-6rhebm18.js +5 -0
- package/dist/chunk-6rhebm18.js.map +10 -0
- package/dist/{chunk-rq770c71.js → chunk-71m47kad.js} +2 -2
- package/dist/{chunk-rq770c71.js.map → chunk-71m47kad.js.map} +1 -1
- package/dist/{chunk-0h3jr9d9.js → chunk-7f5ad759.js} +2 -2
- package/dist/{chunk-4e61qbp4.js.map → chunk-7f5ad759.js.map} +1 -1
- package/dist/chunk-85av4ncy.js +4 -0
- package/dist/{chunk-3d3nmr5g.js.map → chunk-85av4ncy.js.map} +2 -2
- package/dist/{chunk-23g7qdpg.js → chunk-9taz1h3t.js} +3 -3
- package/dist/{chunk-23g7qdpg.js.map → chunk-9taz1h3t.js.map} +1 -1
- package/dist/{chunk-ppt296ye.js → chunk-agabw2w1.js} +2 -2
- package/dist/{chunk-ppt296ye.js.map → chunk-agabw2w1.js.map} +1 -1
- package/dist/{chunk-092pj2j2.js → chunk-bb3zvxsf.js} +3 -3
- package/dist/{chunk-092pj2j2.js.map → chunk-bb3zvxsf.js.map} +1 -1
- package/dist/{chunk-h7jv3ame.js → chunk-br8ten26.js} +2 -2
- package/dist/{chunk-h7jv3ame.js.map → chunk-br8ten26.js.map} +1 -1
- package/dist/{chunk-4e61qbp4.js → chunk-bzhtymvv.js} +2 -2
- package/dist/{chunk-8p6rqegw.js.map → chunk-bzhtymvv.js.map} +1 -1
- package/dist/{chunk-68w225rv.js → chunk-c0wcsmpj.js} +2 -2
- package/dist/{chunk-68w225rv.js.map → chunk-c0wcsmpj.js.map} +1 -1
- package/dist/{chunk-xsmt86n3.js → chunk-c22vcxty.js} +2 -2
- package/dist/{chunk-xsmt86n3.js.map → chunk-c22vcxty.js.map} +1 -1
- package/dist/{chunk-07jtzbf0.js → chunk-c2pv3ah8.js} +2 -2
- package/dist/{chunk-07jtzbf0.js.map → chunk-c2pv3ah8.js.map} +2 -2
- package/dist/{chunk-q09mmr05.js → chunk-cz3szqhq.js} +2 -2
- package/dist/{chunk-q09mmr05.js.map → chunk-cz3szqhq.js.map} +1 -1
- package/dist/{chunk-69w4egkg.js → chunk-dwx2y7br.js} +4 -4
- package/dist/{chunk-69w4egkg.js.map → chunk-dwx2y7br.js.map} +1 -1
- package/dist/{chunk-2sfz64xh.js → chunk-dxw8k6f1.js} +2 -2
- package/dist/{chunk-2sfz64xh.js.map → chunk-dxw8k6f1.js.map} +1 -1
- package/dist/chunk-e3mggavt.js +5 -0
- package/dist/chunk-e3mggavt.js.map +11 -0
- package/dist/{chunk-j1knf8gv.js → chunk-efsk1wy0.js} +3 -3
- package/dist/{chunk-j1knf8gv.js.map → chunk-efsk1wy0.js.map} +1 -1
- package/dist/{chunk-t4n25km9.js → chunk-f13f68c0.js} +2 -2
- package/dist/{chunk-t4n25km9.js.map → chunk-f13f68c0.js.map} +1 -1
- package/dist/{chunk-vv72kw74.js → chunk-f418jh9k.js} +2 -2
- package/dist/{chunk-vv72kw74.js.map → chunk-f418jh9k.js.map} +1 -1
- package/dist/chunk-f4e7fh95.js +17 -0
- package/dist/chunk-f4e7fh95.js.map +14 -0
- package/dist/{chunk-ewgv1j8q.js → chunk-fcqc3e3r.js} +2 -2
- package/dist/{chunk-ewgv1j8q.js.map → chunk-fcqc3e3r.js.map} +1 -1
- package/dist/{chunk-3y9nf09k.js → chunk-g5tj10p8.js} +2 -2
- package/dist/{chunk-3y9nf09k.js.map → chunk-g5tj10p8.js.map} +1 -1
- package/dist/chunk-gn9zjgep.js +5 -0
- package/dist/chunk-gn9zjgep.js.map +10 -0
- package/dist/{chunk-5s45prj5.js → chunk-h7mcwfg5.js} +4 -4
- package/dist/{chunk-5s45prj5.js.map → chunk-h7mcwfg5.js.map} +1 -1
- package/dist/chunk-hk067634.js +4 -0
- package/dist/{chunk-vnjvd82s.js.map → chunk-hk067634.js.map} +2 -2
- package/dist/{chunk-qx6sahe0.js → chunk-hrrmxreg.js} +2 -2
- package/dist/{chunk-qx6sahe0.js.map → chunk-hrrmxreg.js.map} +1 -1
- package/dist/{chunk-p22rkf1g.js → chunk-jb022m7n.js} +2 -2
- package/dist/{chunk-p22rkf1g.js.map → chunk-jb022m7n.js.map} +1 -1
- package/dist/chunk-jb2nst6v.js +4 -0
- package/dist/{chunk-6scjrbw7.js.map → chunk-jb2nst6v.js.map} +2 -2
- package/dist/{chunk-kxzwem3g.js → chunk-jdgvdddd.js} +2 -2
- package/dist/{chunk-kxzwem3g.js.map → chunk-jdgvdddd.js.map} +1 -1
- package/dist/{chunk-2yth3kk2.js → chunk-jp4pf3yt.js} +4 -4
- package/dist/{chunk-2yth3kk2.js.map → chunk-jp4pf3yt.js.map} +1 -1
- package/dist/chunk-k14dmqwh.js +5 -0
- package/dist/{chunk-92793zh4.js.map → chunk-k14dmqwh.js.map} +4 -3
- package/dist/{chunk-tkv6cw94.js → chunk-k8endm5j.js} +3 -3
- package/dist/{chunk-tkv6cw94.js.map → chunk-k8endm5j.js.map} +1 -1
- package/dist/chunk-kkkqyvwv.js +81 -0
- package/dist/{chunk-ear03axe.js.map → chunk-kkkqyvwv.js.map} +7 -5
- package/dist/{chunk-cmq5t8p9.js → chunk-kv2ep453.js} +3 -3
- package/dist/{chunk-cmq5t8p9.js.map → chunk-kv2ep453.js.map} +1 -1
- package/dist/{chunk-z4q1ty6w.js → chunk-kz39hphm.js} +3 -3
- package/dist/{chunk-z4q1ty6w.js.map → chunk-kz39hphm.js.map} +1 -1
- package/dist/{chunk-kaxvw75w.js → chunk-ms8qd7da.js} +3 -3
- package/dist/{chunk-kaxvw75w.js.map → chunk-ms8qd7da.js.map} +1 -1
- package/dist/{chunk-ttzkn1qd.js → chunk-n1tkn8gv.js} +2 -2
- package/dist/{chunk-ttzkn1qd.js.map → chunk-n1tkn8gv.js.map} +1 -1
- package/dist/chunk-nncwsdzz.js +5 -0
- package/dist/chunk-nncwsdzz.js.map +10 -0
- package/dist/{chunk-7s1g3v1y.js → chunk-pgjk5ft3.js} +3 -3
- package/dist/{chunk-7s1g3v1y.js.map → chunk-pgjk5ft3.js.map} +1 -1
- package/dist/{chunk-tztqkat2.js → chunk-r06rxn19.js} +2 -2
- package/dist/{chunk-tztqkat2.js.map → chunk-r06rxn19.js.map} +1 -1
- package/dist/chunk-r9z5rrk0.js +4 -0
- package/dist/{chunk-1ab1ptq5.js.map → chunk-r9z5rrk0.js.map} +2 -2
- package/dist/{chunk-h5g05qwb.js → chunk-s6e7cvek.js} +2 -2
- package/dist/{chunk-h5g05qwb.js.map → chunk-s6e7cvek.js.map} +1 -1
- package/dist/{chunk-qjnv2rkh.js → chunk-sqp7kn7h.js} +3 -3
- package/dist/{chunk-qjnv2rkh.js.map → chunk-sqp7kn7h.js.map} +1 -1
- package/dist/{chunk-mt2755rs.js → chunk-w6gb9gc5.js} +3 -3
- package/dist/{chunk-mt2755rs.js.map → chunk-w6gb9gc5.js.map} +1 -1
- package/dist/{chunk-ha7n1c94.js → chunk-xxw0gz4q.js} +2 -2
- package/dist/{chunk-ha7n1c94.js.map → chunk-xxw0gz4q.js.map} +1 -1
- package/dist/chunk-ywr2vd5r.js +5 -0
- package/dist/{chunk-9279y4af.js.map → chunk-ywr2vd5r.js.map} +2 -2
- package/dist/{chunk-fbp5vapa.js → chunk-zckj6bs6.js} +3 -3
- package/dist/{chunk-fbp5vapa.js.map → chunk-zckj6bs6.js.map} +2 -2
- package/dist/chunks/{ThemeProvider-CTX9LOFC.js → ThemeProvider-Bk1eZymb.js} +186 -3
- package/dist/chunks/ThemeProvider-Bk1eZymb.js.map +1 -0
- package/dist/client/ComponentContext.d.ts.map +1 -1
- package/dist/client/DictionarySinkContext.d.ts +10 -0
- package/dist/client/DictionarySinkContext.d.ts.map +1 -0
- package/dist/client/createRoot.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +187 -8
- package/dist/client/index.js.map +1 -1
- package/dist/client/useDictionary.d.ts +34 -0
- package/dist/client/useDictionary.d.ts.map +1 -0
- package/dist/client/useDictionary.test-d.d.ts +2 -0
- package/dist/client/useDictionary.test-d.d.ts.map +1 -0
- package/dist/client/useTranslator.d.ts +8 -0
- package/dist/client/useTranslator.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Lang.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/i18n/Dictionary.d.ts +7 -0
- package/dist/i18n/Dictionary.d.ts.map +1 -1
- package/dist/i18n/Translator.d.ts +12 -0
- package/dist/i18n/Translator.d.ts.map +1 -1
- package/dist/i18n/config.d.ts +6 -0
- package/dist/i18n/config.d.ts.map +1 -1
- package/dist/i18n/defineDictionary.d.ts +65 -0
- package/dist/i18n/defineDictionary.d.ts.map +1 -0
- package/dist/i18n/dictionaryRegistry.d.ts +85 -0
- package/dist/i18n/dictionaryRegistry.d.ts.map +1 -0
- package/dist/i18n/dictionaryRuntime.d.ts +16 -0
- package/dist/i18n/dictionaryRuntime.d.ts.map +1 -0
- package/dist/i18n/dictionaryRuntime.js +4 -0
- package/dist/i18n/dictionaryRuntime.js.map +9 -0
- package/dist/i18n/dictionaryShape.d.ts +66 -0
- package/dist/i18n/dictionaryShape.d.ts.map +1 -0
- package/dist/i18n/dictionarySink.d.ts +31 -0
- package/dist/i18n/dictionarySink.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +5 -4
- package/dist/i18n/translate.d.ts +21 -0
- package/dist/i18n/translate.d.ts.map +1 -0
- package/dist/internal/gemiExternals.d.ts +1 -1
- package/dist/internal/gemiExternals.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +2 -2
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +2 -2
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/index.js +4 -4
- package/dist/services/index.js.map +2 -2
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/streamQueryInjection.d.ts +9 -1
- package/dist/services/router/streamQueryInjection.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/vite/__vite-browser-external-S5EYS4bz.mjs +7 -0
- package/dist/vite/api_vite-DSBC5Nzy.mjs +5 -0
- package/dist/vite/browser-DFEUWTkA.mjs +6086 -0
- package/dist/vite/build-C0lmnz6d.mjs +5326 -0
- package/dist/vite/index.mjs +1349 -1
- package/dist/vite/lib-TT6NqN6b.mjs +363 -0
- package/dist/vite/lib-U4DF62jt.mjs +48846 -0
- package/dist/vite/main-Drp2rSLR.mjs +2123 -0
- package/dist/vite/node-BgyIm-M7.mjs +17799 -0
- package/dist/vite/node-yGkKTK1d.mjs +789 -0
- package/dist/vite/postcss-hCXrlC4m.mjs +3515 -0
- package/dist/vite/postcss-import-rYEe0OKc.mjs +448 -0
- package/dist/vite/prompt--dNycKSZ-BmZ8jzP_.mjs +889 -0
- package/dist/vite/rolldown-runtime-B4lejLz5.mjs +37 -0
- package/package.json +3 -1
- package/dist/chunk-1ab1ptq5.js +0 -4
- package/dist/chunk-2qn472j4.js +0 -5
- package/dist/chunk-3d3nmr5g.js +0 -4
- package/dist/chunk-6scjrbw7.js +0 -4
- package/dist/chunk-88pq4gmf.js +0 -5
- package/dist/chunk-88pq4gmf.js.map +0 -10
- package/dist/chunk-8p6rqegw.js +0 -4
- package/dist/chunk-92793zh4.js +0 -5
- package/dist/chunk-9279y4af.js +0 -5
- package/dist/chunk-bq4w14a6.js +0 -5
- package/dist/chunk-bq4w14a6.js.map +0 -10
- package/dist/chunk-ear03axe.js +0 -81
- package/dist/chunk-faa987e4.js +0 -4
- package/dist/chunk-ffre1z8s.js +0 -6
- package/dist/chunk-msz8rngs.js.map +0 -10
- package/dist/chunk-vnjvd82s.js +0 -4
- package/dist/chunk-xw44bwnh.js +0 -5
- package/dist/chunk-xw44bwnh.js.map +0 -11
- package/dist/chunk-y4djde42.js +0 -5
- package/dist/chunk-y4djde42.js.map +0 -11
- package/dist/chunks/ThemeProvider-CTX9LOFC.js.map +0 -1
- /package/dist/{chunk-zhsaz9cr.js.map → chunk-3bw1jk21.js.map} +0 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { t as __commonJSMin } from "./node-BgyIm-M7.mjs";
|
|
2
|
+
//#region ../../node_modules/.bun/vite@8.1.4+7c45af26d9ba26c8/node_modules/vite/dist/node/chunks/lib.js
|
|
3
|
+
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var openParentheses = "(".charCodeAt(0);
|
|
5
|
+
var closeParentheses = ")".charCodeAt(0);
|
|
6
|
+
var singleQuote = "'".charCodeAt(0);
|
|
7
|
+
var doubleQuote = "\"".charCodeAt(0);
|
|
8
|
+
var backslash = "\\".charCodeAt(0);
|
|
9
|
+
var slash = "/".charCodeAt(0);
|
|
10
|
+
var comma = ",".charCodeAt(0);
|
|
11
|
+
var colon = ":".charCodeAt(0);
|
|
12
|
+
var star = "*".charCodeAt(0);
|
|
13
|
+
var uLower = "u".charCodeAt(0);
|
|
14
|
+
var uUpper = "U".charCodeAt(0);
|
|
15
|
+
var plus = "+".charCodeAt(0);
|
|
16
|
+
var isUnicodeRange = /^[a-f0-9?-]+$/i;
|
|
17
|
+
module.exports = function(input) {
|
|
18
|
+
var tokens = [];
|
|
19
|
+
var value = input;
|
|
20
|
+
var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
|
|
21
|
+
var pos = 0;
|
|
22
|
+
var code = value.charCodeAt(pos);
|
|
23
|
+
var max = value.length;
|
|
24
|
+
var stack = [{ nodes: tokens }];
|
|
25
|
+
var balanced = 0;
|
|
26
|
+
var parent;
|
|
27
|
+
var name = "";
|
|
28
|
+
var before = "";
|
|
29
|
+
var after = "";
|
|
30
|
+
while (pos < max) if (code <= 32) {
|
|
31
|
+
next = pos;
|
|
32
|
+
do {
|
|
33
|
+
next += 1;
|
|
34
|
+
code = value.charCodeAt(next);
|
|
35
|
+
} while (code <= 32);
|
|
36
|
+
token = value.slice(pos, next);
|
|
37
|
+
prev = tokens[tokens.length - 1];
|
|
38
|
+
if (code === closeParentheses && balanced) after = token;
|
|
39
|
+
else if (prev && prev.type === "div") {
|
|
40
|
+
prev.after = token;
|
|
41
|
+
prev.sourceEndIndex += token.length;
|
|
42
|
+
} else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) before = token;
|
|
43
|
+
else tokens.push({
|
|
44
|
+
type: "space",
|
|
45
|
+
sourceIndex: pos,
|
|
46
|
+
sourceEndIndex: next,
|
|
47
|
+
value: token
|
|
48
|
+
});
|
|
49
|
+
pos = next;
|
|
50
|
+
} else if (code === singleQuote || code === doubleQuote) {
|
|
51
|
+
next = pos;
|
|
52
|
+
quote = code === singleQuote ? "'" : "\"";
|
|
53
|
+
token = {
|
|
54
|
+
type: "string",
|
|
55
|
+
sourceIndex: pos,
|
|
56
|
+
quote
|
|
57
|
+
};
|
|
58
|
+
do {
|
|
59
|
+
escape = false;
|
|
60
|
+
next = value.indexOf(quote, next + 1);
|
|
61
|
+
if (~next) {
|
|
62
|
+
escapePos = next;
|
|
63
|
+
while (value.charCodeAt(escapePos - 1) === backslash) {
|
|
64
|
+
escapePos -= 1;
|
|
65
|
+
escape = !escape;
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
value += quote;
|
|
69
|
+
next = value.length - 1;
|
|
70
|
+
token.unclosed = true;
|
|
71
|
+
}
|
|
72
|
+
} while (escape);
|
|
73
|
+
token.value = value.slice(pos + 1, next);
|
|
74
|
+
token.sourceEndIndex = token.unclosed ? next : next + 1;
|
|
75
|
+
tokens.push(token);
|
|
76
|
+
pos = next + 1;
|
|
77
|
+
code = value.charCodeAt(pos);
|
|
78
|
+
} else if (code === slash && value.charCodeAt(pos + 1) === star) {
|
|
79
|
+
next = value.indexOf("*/", pos);
|
|
80
|
+
token = {
|
|
81
|
+
type: "comment",
|
|
82
|
+
sourceIndex: pos,
|
|
83
|
+
sourceEndIndex: next + 2
|
|
84
|
+
};
|
|
85
|
+
if (next === -1) {
|
|
86
|
+
token.unclosed = true;
|
|
87
|
+
next = value.length;
|
|
88
|
+
token.sourceEndIndex = next;
|
|
89
|
+
}
|
|
90
|
+
token.value = value.slice(pos + 2, next);
|
|
91
|
+
tokens.push(token);
|
|
92
|
+
pos = next + 2;
|
|
93
|
+
code = value.charCodeAt(pos);
|
|
94
|
+
} else if ((code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc") {
|
|
95
|
+
token = value[pos];
|
|
96
|
+
tokens.push({
|
|
97
|
+
type: "word",
|
|
98
|
+
sourceIndex: pos - before.length,
|
|
99
|
+
sourceEndIndex: pos + token.length,
|
|
100
|
+
value: token
|
|
101
|
+
});
|
|
102
|
+
pos += 1;
|
|
103
|
+
code = value.charCodeAt(pos);
|
|
104
|
+
} else if (code === slash || code === comma || code === colon) {
|
|
105
|
+
token = value[pos];
|
|
106
|
+
tokens.push({
|
|
107
|
+
type: "div",
|
|
108
|
+
sourceIndex: pos - before.length,
|
|
109
|
+
sourceEndIndex: pos + token.length,
|
|
110
|
+
value: token,
|
|
111
|
+
before,
|
|
112
|
+
after: ""
|
|
113
|
+
});
|
|
114
|
+
before = "";
|
|
115
|
+
pos += 1;
|
|
116
|
+
code = value.charCodeAt(pos);
|
|
117
|
+
} else if (openParentheses === code) {
|
|
118
|
+
next = pos;
|
|
119
|
+
do {
|
|
120
|
+
next += 1;
|
|
121
|
+
code = value.charCodeAt(next);
|
|
122
|
+
} while (code <= 32);
|
|
123
|
+
parenthesesOpenPos = pos;
|
|
124
|
+
token = {
|
|
125
|
+
type: "function",
|
|
126
|
+
sourceIndex: pos - name.length,
|
|
127
|
+
value: name,
|
|
128
|
+
before: value.slice(parenthesesOpenPos + 1, next)
|
|
129
|
+
};
|
|
130
|
+
pos = next;
|
|
131
|
+
if (name === "url" && code !== singleQuote && code !== doubleQuote) {
|
|
132
|
+
next -= 1;
|
|
133
|
+
do {
|
|
134
|
+
escape = false;
|
|
135
|
+
next = value.indexOf(")", next + 1);
|
|
136
|
+
if (~next) {
|
|
137
|
+
escapePos = next;
|
|
138
|
+
while (value.charCodeAt(escapePos - 1) === backslash) {
|
|
139
|
+
escapePos -= 1;
|
|
140
|
+
escape = !escape;
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
value += ")";
|
|
144
|
+
next = value.length - 1;
|
|
145
|
+
token.unclosed = true;
|
|
146
|
+
}
|
|
147
|
+
} while (escape);
|
|
148
|
+
whitespacePos = next;
|
|
149
|
+
do {
|
|
150
|
+
whitespacePos -= 1;
|
|
151
|
+
code = value.charCodeAt(whitespacePos);
|
|
152
|
+
} while (code <= 32);
|
|
153
|
+
if (parenthesesOpenPos < whitespacePos) {
|
|
154
|
+
if (pos !== whitespacePos + 1) token.nodes = [{
|
|
155
|
+
type: "word",
|
|
156
|
+
sourceIndex: pos,
|
|
157
|
+
sourceEndIndex: whitespacePos + 1,
|
|
158
|
+
value: value.slice(pos, whitespacePos + 1)
|
|
159
|
+
}];
|
|
160
|
+
else token.nodes = [];
|
|
161
|
+
if (token.unclosed && whitespacePos + 1 !== next) {
|
|
162
|
+
token.after = "";
|
|
163
|
+
token.nodes.push({
|
|
164
|
+
type: "space",
|
|
165
|
+
sourceIndex: whitespacePos + 1,
|
|
166
|
+
sourceEndIndex: next,
|
|
167
|
+
value: value.slice(whitespacePos + 1, next)
|
|
168
|
+
});
|
|
169
|
+
} else {
|
|
170
|
+
token.after = value.slice(whitespacePos + 1, next);
|
|
171
|
+
token.sourceEndIndex = next;
|
|
172
|
+
}
|
|
173
|
+
} else {
|
|
174
|
+
token.after = "";
|
|
175
|
+
token.nodes = [];
|
|
176
|
+
}
|
|
177
|
+
pos = next + 1;
|
|
178
|
+
token.sourceEndIndex = token.unclosed ? next : pos;
|
|
179
|
+
code = value.charCodeAt(pos);
|
|
180
|
+
tokens.push(token);
|
|
181
|
+
} else {
|
|
182
|
+
balanced += 1;
|
|
183
|
+
token.after = "";
|
|
184
|
+
token.sourceEndIndex = pos + 1;
|
|
185
|
+
tokens.push(token);
|
|
186
|
+
stack.push(token);
|
|
187
|
+
tokens = token.nodes = [];
|
|
188
|
+
parent = token;
|
|
189
|
+
}
|
|
190
|
+
name = "";
|
|
191
|
+
} else if (closeParentheses === code && balanced) {
|
|
192
|
+
pos += 1;
|
|
193
|
+
code = value.charCodeAt(pos);
|
|
194
|
+
parent.after = after;
|
|
195
|
+
parent.sourceEndIndex += after.length;
|
|
196
|
+
after = "";
|
|
197
|
+
balanced -= 1;
|
|
198
|
+
stack[stack.length - 1].sourceEndIndex = pos;
|
|
199
|
+
stack.pop();
|
|
200
|
+
parent = stack[balanced];
|
|
201
|
+
tokens = parent.nodes;
|
|
202
|
+
} else {
|
|
203
|
+
next = pos;
|
|
204
|
+
do {
|
|
205
|
+
if (code === backslash) next += 1;
|
|
206
|
+
next += 1;
|
|
207
|
+
code = value.charCodeAt(next);
|
|
208
|
+
} while (next < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === "function" && parent.value === "calc" || code === slash && parent.type === "function" && parent.value === "calc" || code === closeParentheses && balanced));
|
|
209
|
+
token = value.slice(pos, next);
|
|
210
|
+
if (openParentheses === code) name = token;
|
|
211
|
+
else if ((uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2))) tokens.push({
|
|
212
|
+
type: "unicode-range",
|
|
213
|
+
sourceIndex: pos,
|
|
214
|
+
sourceEndIndex: next,
|
|
215
|
+
value: token
|
|
216
|
+
});
|
|
217
|
+
else tokens.push({
|
|
218
|
+
type: "word",
|
|
219
|
+
sourceIndex: pos,
|
|
220
|
+
sourceEndIndex: next,
|
|
221
|
+
value: token
|
|
222
|
+
});
|
|
223
|
+
pos = next;
|
|
224
|
+
}
|
|
225
|
+
for (pos = stack.length - 1; pos; pos -= 1) {
|
|
226
|
+
stack[pos].unclosed = true;
|
|
227
|
+
stack[pos].sourceEndIndex = value.length;
|
|
228
|
+
}
|
|
229
|
+
return stack[0].nodes;
|
|
230
|
+
};
|
|
231
|
+
}));
|
|
232
|
+
var require_walk = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
233
|
+
module.exports = function walk(nodes, cb, bubble) {
|
|
234
|
+
var i, max, node, result;
|
|
235
|
+
for (i = 0, max = nodes.length; i < max; i += 1) {
|
|
236
|
+
node = nodes[i];
|
|
237
|
+
if (!bubble) result = cb(node, i, nodes);
|
|
238
|
+
if (result !== false && node.type === "function" && Array.isArray(node.nodes)) walk(node.nodes, cb, bubble);
|
|
239
|
+
if (bubble) cb(node, i, nodes);
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
}));
|
|
243
|
+
var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
244
|
+
function stringifyNode(node, custom) {
|
|
245
|
+
var type = node.type;
|
|
246
|
+
var value = node.value;
|
|
247
|
+
var buf;
|
|
248
|
+
var customResult;
|
|
249
|
+
if (custom && (customResult = custom(node)) !== void 0) return customResult;
|
|
250
|
+
else if (type === "word" || type === "space") return value;
|
|
251
|
+
else if (type === "string") {
|
|
252
|
+
buf = node.quote || "";
|
|
253
|
+
return buf + value + (node.unclosed ? "" : buf);
|
|
254
|
+
} else if (type === "comment") return "/*" + value + (node.unclosed ? "" : "*/");
|
|
255
|
+
else if (type === "div") return (node.before || "") + value + (node.after || "");
|
|
256
|
+
else if (Array.isArray(node.nodes)) {
|
|
257
|
+
buf = stringify(node.nodes, custom);
|
|
258
|
+
if (type !== "function") return buf;
|
|
259
|
+
return value + "(" + (node.before || "") + buf + (node.after || "") + (node.unclosed ? "" : ")");
|
|
260
|
+
}
|
|
261
|
+
return value;
|
|
262
|
+
}
|
|
263
|
+
function stringify(nodes, custom) {
|
|
264
|
+
var result, i;
|
|
265
|
+
if (Array.isArray(nodes)) {
|
|
266
|
+
result = "";
|
|
267
|
+
for (i = nodes.length - 1; ~i; i -= 1) result = stringifyNode(nodes[i], custom) + result;
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
return stringifyNode(nodes, custom);
|
|
271
|
+
}
|
|
272
|
+
module.exports = stringify;
|
|
273
|
+
}));
|
|
274
|
+
var require_unit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
275
|
+
var minus = "-".charCodeAt(0);
|
|
276
|
+
var plus = "+".charCodeAt(0);
|
|
277
|
+
var dot = ".".charCodeAt(0);
|
|
278
|
+
var exp = "e".charCodeAt(0);
|
|
279
|
+
var EXP = "E".charCodeAt(0);
|
|
280
|
+
function likeNumber(value) {
|
|
281
|
+
var code = value.charCodeAt(0);
|
|
282
|
+
var nextCode;
|
|
283
|
+
if (code === plus || code === minus) {
|
|
284
|
+
nextCode = value.charCodeAt(1);
|
|
285
|
+
if (nextCode >= 48 && nextCode <= 57) return true;
|
|
286
|
+
var nextNextCode = value.charCodeAt(2);
|
|
287
|
+
if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) return true;
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
if (code === dot) {
|
|
291
|
+
nextCode = value.charCodeAt(1);
|
|
292
|
+
if (nextCode >= 48 && nextCode <= 57) return true;
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
if (code >= 48 && code <= 57) return true;
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
module.exports = function(value) {
|
|
299
|
+
var pos = 0;
|
|
300
|
+
var length = value.length;
|
|
301
|
+
var code;
|
|
302
|
+
var nextCode;
|
|
303
|
+
var nextNextCode;
|
|
304
|
+
if (length === 0 || !likeNumber(value)) return false;
|
|
305
|
+
code = value.charCodeAt(pos);
|
|
306
|
+
if (code === plus || code === minus) pos++;
|
|
307
|
+
while (pos < length) {
|
|
308
|
+
code = value.charCodeAt(pos);
|
|
309
|
+
if (code < 48 || code > 57) break;
|
|
310
|
+
pos += 1;
|
|
311
|
+
}
|
|
312
|
+
code = value.charCodeAt(pos);
|
|
313
|
+
nextCode = value.charCodeAt(pos + 1);
|
|
314
|
+
if (code === dot && nextCode >= 48 && nextCode <= 57) {
|
|
315
|
+
pos += 2;
|
|
316
|
+
while (pos < length) {
|
|
317
|
+
code = value.charCodeAt(pos);
|
|
318
|
+
if (code < 48 || code > 57) break;
|
|
319
|
+
pos += 1;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
code = value.charCodeAt(pos);
|
|
323
|
+
nextCode = value.charCodeAt(pos + 1);
|
|
324
|
+
nextNextCode = value.charCodeAt(pos + 2);
|
|
325
|
+
if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {
|
|
326
|
+
pos += nextCode === plus || nextCode === minus ? 3 : 2;
|
|
327
|
+
while (pos < length) {
|
|
328
|
+
code = value.charCodeAt(pos);
|
|
329
|
+
if (code < 48 || code > 57) break;
|
|
330
|
+
pos += 1;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
number: value.slice(0, pos),
|
|
335
|
+
unit: value.slice(pos)
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
}));
|
|
339
|
+
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
340
|
+
var parse = require_parse();
|
|
341
|
+
var walk = require_walk();
|
|
342
|
+
var stringify = require_stringify();
|
|
343
|
+
function ValueParser(value) {
|
|
344
|
+
if (this instanceof ValueParser) {
|
|
345
|
+
this.nodes = parse(value);
|
|
346
|
+
return this;
|
|
347
|
+
}
|
|
348
|
+
return new ValueParser(value);
|
|
349
|
+
}
|
|
350
|
+
ValueParser.prototype.toString = function() {
|
|
351
|
+
return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
|
|
352
|
+
};
|
|
353
|
+
ValueParser.prototype.walk = function(cb, bubble) {
|
|
354
|
+
walk(this.nodes, cb, bubble);
|
|
355
|
+
return this;
|
|
356
|
+
};
|
|
357
|
+
ValueParser.unit = require_unit();
|
|
358
|
+
ValueParser.walk = walk;
|
|
359
|
+
ValueParser.stringify = stringify;
|
|
360
|
+
module.exports = ValueParser;
|
|
361
|
+
}));
|
|
362
|
+
//#endregion
|
|
363
|
+
export { require_lib as t };
|