@ui0/icon 0.1.4 → 0.1.5
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/getIcon.d.ts.map +1 -1
- package/dist/index.js +110 -110
- package/dist/plugin.d.ts.map +1 -1
- package/dist/ui0/index.d.ts.map +1 -1
- package/dist/ui0/index.js +13 -9
- package/dist/vite/index.js +335 -318
- package/dist/vite/next/sources.d.ts.map +1 -1
- package/dist/vite/options.d.ts +6 -2
- package/dist/vite/options.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/vite/index.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var I = (r, t, e) =>
|
|
4
|
-
import { createHash as
|
|
5
|
-
import { createRequire as
|
|
6
|
-
import
|
|
7
|
-
import { parse as
|
|
8
|
-
import { readdirSync as
|
|
1
|
+
var St = Object.defineProperty;
|
|
2
|
+
var Nt = (r, t, e) => t in r ? St(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
3
|
+
var I = (r, t, e) => Nt(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { createHash as kt } from "node:crypto";
|
|
5
|
+
import { createRequire as Ct } from "node:module";
|
|
6
|
+
import N from "node:path";
|
|
7
|
+
import { parse as Et, compileTemplate as Pt, compileStyle as Ft } from "vue/compiler-sfc";
|
|
8
|
+
import { readdirSync as It, readFileSync as z, statSync as Ot } from "node:fs";
|
|
9
9
|
function X(r, t, e, s = 480, i = 480) {
|
|
10
|
-
const
|
|
11
|
-
return
|
|
10
|
+
const c = r.split(/[\s,]+/).map(parseFloat), a = r.includes(",") ? "," : " ";
|
|
11
|
+
return c.map((n, o) => {
|
|
12
12
|
const u = o % 2 === 0, p = u ? s : i, g = u ? t : e;
|
|
13
|
-
return ((
|
|
14
|
-
}).reduce((
|
|
13
|
+
return ((n - p) * g + p).toFixed(2);
|
|
14
|
+
}).reduce((n, o, u) => n + (u > 0 ? u % 2 === 0 ? " " : a : "") + o, "");
|
|
15
15
|
}
|
|
16
16
|
function at(r, t) {
|
|
17
17
|
return r.replace(/([-+]?\d*\.?\d+(?:[eE][-+]?\d+)?)/g, (e) => (parseFloat(e) * t).toFixed(2));
|
|
18
18
|
}
|
|
19
19
|
function tt(r, t, e) {
|
|
20
|
-
const [s = 0, i = 0] = e, { x1:
|
|
20
|
+
const [s = 0, i = 0] = e, { x1: c, y1: a, x2: n, y2: o, ...u } = r, p = parseFloat(c).toFixed(3), g = parseFloat(a).toFixed(3), l = parseFloat(n).toFixed(3), m = parseFloat(o).toFixed(3), f = (h, d) => (d + (h - d) * t).toFixed(3);
|
|
21
21
|
return {
|
|
22
22
|
...u,
|
|
23
23
|
// Сохраняем остальные атрибуты
|
|
24
|
-
x1:
|
|
25
|
-
y1:
|
|
26
|
-
x2:
|
|
27
|
-
y2:
|
|
24
|
+
x1: f(+p, s),
|
|
25
|
+
y1: f(+g, i),
|
|
26
|
+
x2: f(+l, s),
|
|
27
|
+
y2: f(+m, i)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
function et(r, t, e) {
|
|
31
|
-
const [s = 0, i = 0] = e, { x:
|
|
31
|
+
const [s = 0, i = 0] = e, { x: c, y: a, width: n, height: o, ...u } = r, p = (g, l) => (l + (g - l) * t).toFixed(3);
|
|
32
32
|
return {
|
|
33
33
|
...u,
|
|
34
|
-
x: p(+
|
|
35
|
-
y: p(+
|
|
36
|
-
width: (+
|
|
34
|
+
x: p(+c, s),
|
|
35
|
+
y: p(+a, i),
|
|
36
|
+
width: (+n * t).toFixed(3),
|
|
37
37
|
height: (+o * t).toFixed(3)
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function D(r, t, e) {
|
|
41
|
-
return isNaN(t) || isNaN(e) ? r : r.replace(/([MLHVCSQTZmlhvcsqtaz])([^MLHVCSQTZmlhvcsqtaz]*)/gi, (s, i,
|
|
41
|
+
return isNaN(t) || isNaN(e) ? r : r.replace(/([MLHVCSQTZmlhvcsqtaz])([^MLHVCSQTZmlhvcsqtaz]*)/gi, (s, i, c) => {
|
|
42
42
|
if (/^[Zz]$/.test(i)) return i;
|
|
43
|
-
const
|
|
44
|
-
let
|
|
45
|
-
return
|
|
43
|
+
const a = i === i.toLowerCase();
|
|
44
|
+
let n = i, o = 0;
|
|
45
|
+
return c.split(/[\s,]+/).filter(Boolean).forEach((u) => {
|
|
46
46
|
const p = parseFloat(u);
|
|
47
47
|
let g = u;
|
|
48
|
-
isNaN(p) || (
|
|
49
|
-
}),
|
|
48
|
+
isNaN(p) || (a || (g = (o % 2 === 0 ? p + t : p + e).toFixed(3)), o++), n += (n === i ? "" : " ") + g;
|
|
49
|
+
}), n;
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function _t(r) {
|
|
53
53
|
return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, e) => (e ? "-" : "") + t.toLowerCase());
|
|
54
54
|
}
|
|
55
55
|
function st(r) {
|
|
56
56
|
return r.startsWith("@") || r.startsWith(":") ? r : r.replace(/[^a-zA-Z0-9]+(.)/g, (t, e) => e.toUpperCase()).replace(/^[A-Z]/, (t) => t.toLowerCase());
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Mt(r, t, e) {
|
|
59
59
|
const s = [];
|
|
60
60
|
for (let i = 0; i < r.length; i++) {
|
|
61
|
-
const
|
|
62
|
-
if (r.startsWith(`<${t}`, i) &&
|
|
61
|
+
const c = r.indexOf(">", i);
|
|
62
|
+
if (r.startsWith(`<${t}`, i) && c > -1 && r[c - 1] !== "/" && s.push(i), r.startsWith(`</${t}>`, i) && s.length > 0 && s.pop() === e)
|
|
63
63
|
return i;
|
|
64
64
|
}
|
|
65
65
|
return -1;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Bt = [
|
|
68
68
|
"attributeName",
|
|
69
69
|
"repeatCount",
|
|
70
70
|
"repeatDur",
|
|
@@ -80,7 +80,7 @@ const _t = [
|
|
|
80
80
|
"lengthAdjust",
|
|
81
81
|
"ariaHidden",
|
|
82
82
|
"ariaLabel"
|
|
83
|
-
],
|
|
83
|
+
], jt = [
|
|
84
84
|
"svg",
|
|
85
85
|
"g",
|
|
86
86
|
"path",
|
|
@@ -144,8 +144,8 @@ const _t = [
|
|
|
144
144
|
"a",
|
|
145
145
|
"switch"
|
|
146
146
|
];
|
|
147
|
-
function
|
|
148
|
-
return
|
|
147
|
+
function Lt(r, t) {
|
|
148
|
+
return jt.includes(r.tag) ? !Bt.includes(t) : !0;
|
|
149
149
|
}
|
|
150
150
|
class x {
|
|
151
151
|
static createNode(t = {}) {
|
|
@@ -175,11 +175,11 @@ class x {
|
|
|
175
175
|
if (!e) return !1;
|
|
176
176
|
const s = Array.isArray(e) ? e : [e];
|
|
177
177
|
for (const i of s) {
|
|
178
|
-
let
|
|
179
|
-
for (;
|
|
180
|
-
if (
|
|
178
|
+
let c = this.parent;
|
|
179
|
+
for (; c !== null; ) {
|
|
180
|
+
if (c === i)
|
|
181
181
|
return !0;
|
|
182
|
-
|
|
182
|
+
c = c.parent;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
return !1;
|
|
@@ -209,7 +209,7 @@ class x {
|
|
|
209
209
|
// todo when exists end tag between quotes - "something >" parser have issues
|
|
210
210
|
static parse(t, e, s = {}) {
|
|
211
211
|
let i = t.replace(/\r?\n/g, " ").replace(/\s+/g, " ").trim();
|
|
212
|
-
const
|
|
212
|
+
const c = [], { parent: a = null } = s;
|
|
213
213
|
for (; i.length > 0; ) {
|
|
214
214
|
if (i.startsWith("<!--")) {
|
|
215
215
|
const d = i.indexOf("-->") + 3;
|
|
@@ -242,33 +242,33 @@ class x {
|
|
|
242
242
|
tag: "#text",
|
|
243
243
|
attributes: {},
|
|
244
244
|
children: [],
|
|
245
|
-
parent:
|
|
245
|
+
parent: a,
|
|
246
246
|
content: b,
|
|
247
247
|
raw: b
|
|
248
248
|
}), v = e ? e(y) : y;
|
|
249
|
-
v &&
|
|
249
|
+
v && c.push(...Array.isArray(v) ? v : [v]), i = d === -1 ? "" : i.slice(d);
|
|
250
250
|
continue;
|
|
251
251
|
}
|
|
252
|
-
const
|
|
253
|
-
if (
|
|
254
|
-
const o = i[
|
|
252
|
+
const n = i.indexOf(">");
|
|
253
|
+
if (n === -1) break;
|
|
254
|
+
const o = i[n - 1] === "/", u = i.slice(1, o ? n - 1 : n), p = u.indexOf(" "), g = p === -1 ? u : u.slice(0, p), l = p === -1 ? "" : u.slice(p + 1), m = this.createNode({
|
|
255
255
|
tag: g,
|
|
256
|
-
attributes: this.parseAttributes(
|
|
256
|
+
attributes: this.parseAttributes(l),
|
|
257
257
|
children: [],
|
|
258
|
-
parent:
|
|
258
|
+
parent: a,
|
|
259
259
|
content: "",
|
|
260
260
|
raw: ""
|
|
261
261
|
// Will be set later
|
|
262
262
|
});
|
|
263
|
-
let
|
|
263
|
+
let f = n + 1;
|
|
264
264
|
if (!o) {
|
|
265
|
-
const d = `</${g}>`, b =
|
|
266
|
-
b !== -1 && (m.raw = i.slice(
|
|
265
|
+
const d = `</${g}>`, b = Mt(i, g, 0);
|
|
266
|
+
b !== -1 && (m.raw = i.slice(f, b), m.content = m.raw.slice(0, b - f), m.raw.includes("<") && (m.children = this.parse(m.raw, e, { parent: m })), f = b + d.length);
|
|
267
267
|
}
|
|
268
268
|
const h = e ? e(m) : m;
|
|
269
|
-
h ?
|
|
269
|
+
h ? c.push(...Array.isArray(h) ? h : [h]) : m.parent && (m.parent.content = m.parent.content.replace(this.serialize(m), "")), i = i.slice(f).trim();
|
|
270
270
|
}
|
|
271
|
-
return
|
|
271
|
+
return c;
|
|
272
272
|
}
|
|
273
273
|
static parseAsSingle(t, e, s = {}) {
|
|
274
274
|
return this.parse(t, e, s)[0];
|
|
@@ -281,7 +281,7 @@ class x {
|
|
|
281
281
|
static serialize(t) {
|
|
282
282
|
if (Array.isArray(t))
|
|
283
283
|
return t.map((i) => this.serialize(i)).join("");
|
|
284
|
-
const e = Object.entries(t.attributes).map(([i,
|
|
284
|
+
const e = Object.entries(t.attributes).map(([i, c]) => ` ${Lt(t, i) ? _t(i) : i}="${c}"`).join(""), s = t.children.map((i) => this.serialize(i)).join("");
|
|
285
285
|
return t.children.length === 0 ? t.content ? `<${t.tag}${e}>${t.content}</${t.tag}>` : `<${t.tag}${e}/>` : `<${t.tag}${e}>${s}</${t.tag}>`;
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
@@ -292,10 +292,10 @@ class x {
|
|
|
292
292
|
* @param options Optional traversal options
|
|
293
293
|
*/
|
|
294
294
|
static walk(t, e, s) {
|
|
295
|
-
const i = Array.isArray(t) ? t : [t],
|
|
296
|
-
(
|
|
295
|
+
const i = Array.isArray(t) ? t : [t], c = (s == null ? void 0 : s.includeText) ?? !0, a = (n) => {
|
|
296
|
+
(n.tag !== "#text" || c) && e(n) === !1 || n.children.forEach((o) => a(o));
|
|
297
297
|
};
|
|
298
|
-
i.forEach(
|
|
298
|
+
i.forEach(a);
|
|
299
299
|
}
|
|
300
300
|
static clone(t, e = null) {
|
|
301
301
|
const s = this.createNode({
|
|
@@ -316,7 +316,7 @@ class x {
|
|
|
316
316
|
return e;
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
const
|
|
319
|
+
const Rt = /* @__PURE__ */ new Set(["path", "rect", "circle", "ellipse", "line", "polyline", "polygon"]), ct = ["dataProgressAt", "dataProgressInactive", "dataProgressActive"];
|
|
320
320
|
function $(r, t) {
|
|
321
321
|
throw new Error(`[ui0-icon] ${r}: ${t}`);
|
|
322
322
|
}
|
|
@@ -334,114 +334,114 @@ function U(r, t, e) {
|
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
function P(r) {
|
|
337
|
-
return
|
|
337
|
+
return ct.some((t) => r.attributes[t] !== void 0);
|
|
338
338
|
}
|
|
339
339
|
function J(r, t) {
|
|
340
340
|
P(r) && $(t, "progress declaration inside an excluded subtree"), r.children.forEach((e) => J(e, t));
|
|
341
341
|
}
|
|
342
342
|
function it(r) {
|
|
343
|
-
return JSON.stringify(
|
|
343
|
+
return JSON.stringify(ct.map((t) => r.attributes[t]));
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Tt(r, t) {
|
|
346
346
|
const e = [], s = r.attributes.dataProgressBy === "layers";
|
|
347
347
|
r.attributes.dataProgressBy !== void 0 && !s && $(t, `unknown progress target mode '${r.attributes.dataProgressBy}'`);
|
|
348
|
-
const
|
|
349
|
-
s && (!
|
|
350
|
-
const
|
|
351
|
-
if (["defs", "mask", "clipPath"].includes(
|
|
352
|
-
J(
|
|
348
|
+
const c = (r.attributes.dataIcon ?? "").split(/[\s,]+/).includes("no-progress") || r.hasClass("no-progress"), a = (r.attributes.dataLayers ?? "").split(/[\s,]+/).filter(Boolean);
|
|
349
|
+
s && (!a.length || new Set(a).size !== a.length) && $(t, "layer progress requires a nonempty, unique data-layers list");
|
|
350
|
+
const n = new Map(a.map((l) => [l, []])), o = (l, m, f) => {
|
|
351
|
+
if (["defs", "mask", "clipPath"].includes(l.tag)) {
|
|
352
|
+
J(l, t);
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
-
if (
|
|
356
|
-
J(
|
|
355
|
+
if (c || l.hasClass("no-progress") || l.hasAttr("data-skip")) {
|
|
356
|
+
J(l, t);
|
|
357
357
|
return;
|
|
358
358
|
}
|
|
359
|
-
const h =
|
|
360
|
-
if (m && (h || P(
|
|
361
|
-
const d =
|
|
362
|
-
d !== void 0 ? (
|
|
359
|
+
const h = l.tag === "g" && l.hasAttr("data-group");
|
|
360
|
+
if (m && (h || P(l)) && $(t, "nested progress targets conflict with their containing group"), s) {
|
|
361
|
+
const d = l.attributes.dataLayer;
|
|
362
|
+
d !== void 0 ? (n.has(d) || $(t, `unknown layer '${d}'`), f !== void 0 && $(t, "nested progress layers overlap"), n.get(d).push(l)) : P(l) && l !== r && $(t, "layer progress declarations must be placed on a data-layer node"), l.children.forEach((b) => o(b, !1, d ?? f));
|
|
363
363
|
} else {
|
|
364
|
-
const d = h ||
|
|
365
|
-
if (
|
|
366
|
-
P(
|
|
364
|
+
const d = h || Rt.has(l.tag);
|
|
365
|
+
if (l.attributes[":opacity"] !== void 0 || l.attributes[":data-p-on"] !== void 0) {
|
|
366
|
+
P(l) && $(t, "progress conflicts with an existing :opacity binding");
|
|
367
367
|
return;
|
|
368
368
|
}
|
|
369
|
-
!m && d && e.push([
|
|
369
|
+
!m && d && e.push([l]), !d && P(l) && l !== r && $(t, "progress declaration requires a paint node or data-group"), l.children.forEach((b) => o(b, m || h));
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
|
-
if (o(r, !1), s && !
|
|
373
|
-
for (const [
|
|
374
|
-
m.length || $(t, `layer '${
|
|
375
|
-
const u = e.map((
|
|
376
|
-
return { steps: e.map((
|
|
372
|
+
if (o(r, !1), s && !c)
|
|
373
|
+
for (const [l, m] of n)
|
|
374
|
+
m.length || $(t, `layer '${l}' has no progress targets`), e.push(m);
|
|
375
|
+
const u = e.map((l) => l.filter(P)), p = u.some((l) => l.length);
|
|
376
|
+
return { steps: e.map((l, m) => {
|
|
377
377
|
var b;
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
const h = ((b =
|
|
378
|
+
const f = u[m];
|
|
379
|
+
f.some((y) => it(y) !== it(f[0])) && $(t, "conflicting declarations for the same layer");
|
|
380
|
+
const h = ((b = f[0]) == null ? void 0 : b.attributes) ?? {};
|
|
381
381
|
p && h.dataProgressAt === void 0 && $(t, "explicit and automatic progress thresholds cannot be mixed");
|
|
382
382
|
const d = p ? B(h.dataProgressAt, 0, 100, `${t} at`) : Number((100 * (m + 1) / e.length).toFixed(3));
|
|
383
383
|
return {
|
|
384
|
-
targets:
|
|
384
|
+
targets: l,
|
|
385
385
|
at: d,
|
|
386
386
|
...U({ inactive: h.dataProgressInactive, active: h.dataProgressActive }, {}, t)
|
|
387
387
|
};
|
|
388
388
|
}) };
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function zt(r, t, e) {
|
|
391
391
|
if (!r) return { steps: [] };
|
|
392
392
|
Array.isArray(r.steps) || $(e, "progress.steps must be an array");
|
|
393
|
-
const s = U(r, {}, e), i = /* @__PURE__ */ new Set(),
|
|
393
|
+
const s = U(r, {}, e), i = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map(), a = (o) => {
|
|
394
394
|
if (["defs", "mask", "clipPath"].includes(o.tag) || o.hasClass("no-progress") || o.hasAttr("data-skip")) return;
|
|
395
395
|
const u = o.attributes.dataLayer;
|
|
396
|
-
u &&
|
|
396
|
+
u && c.set(u, [...c.get(u) ?? [], o]), o.children.forEach(a);
|
|
397
397
|
};
|
|
398
|
-
return t.forEach(
|
|
398
|
+
return t.forEach(a), { steps: r.steps.map((o, u) => {
|
|
399
399
|
const p = `${e} progress step ${u + 1}`;
|
|
400
400
|
o.at === void 0 && $(p, "at is required");
|
|
401
401
|
const g = o.cells !== void 0;
|
|
402
402
|
g === (o.layers !== void 0) && $(p, "use either cells or layers");
|
|
403
|
-
const
|
|
404
|
-
|
|
403
|
+
const l = g ? o.cells : o.layers;
|
|
404
|
+
l.length || $(p, "target list cannot be empty");
|
|
405
405
|
const m = [];
|
|
406
|
-
for (const
|
|
407
|
-
const h = g ? t.has(
|
|
408
|
-
h.length || $(p, `unknown ${g ? "cell" : "layer"} '${
|
|
406
|
+
for (const f of l) {
|
|
407
|
+
const h = g ? t.has(f) ? [t.get(f)] : [] : c.get(f) ?? [];
|
|
408
|
+
h.length || $(p, `unknown ${g ? "cell" : "layer"} '${f}'`);
|
|
409
409
|
for (const d of h)
|
|
410
|
-
[...i].some((b) => b === d || d.isChildOf(b) || b.isChildOf(d)) && $(p, `overlapping target '${
|
|
410
|
+
[...i].some((b) => b === d || d.isChildOf(b) || b.isChildOf(d)) && $(p, `overlapping target '${f}'`), i.add(d), m.push(d);
|
|
411
411
|
}
|
|
412
412
|
return { targets: m, at: B(o.at, 0, 100, `${p} at`), ...U(o, s, p) };
|
|
413
413
|
}) };
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function lt(r) {
|
|
416
416
|
for (const t of r.steps)
|
|
417
417
|
for (const e of t.targets) {
|
|
418
418
|
if (!e.parent) throw new Error("[ui0-icon] progress target has no parent");
|
|
419
419
|
const s = e.parent, i = s.children.indexOf(e);
|
|
420
420
|
if (i < 0) throw new Error("[ui0-icon] progress target is detached");
|
|
421
|
-
const
|
|
421
|
+
const c = x.createNode({
|
|
422
422
|
tag: "g",
|
|
423
423
|
parent: s,
|
|
424
424
|
children: [e],
|
|
425
425
|
attributes: { ":opacity": `iconProgressValue >= ${t.at} ? ${t.active} : ${t.inactive}` }
|
|
426
426
|
});
|
|
427
|
-
s.children[i] =
|
|
427
|
+
s.children[i] = c, e.parent = c;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function ft(r, t) {
|
|
431
431
|
const e = x.parseAsSingle(r);
|
|
432
|
-
return (!e || e.tag !== "svg") && $(t, "expected an SVG root"),
|
|
432
|
+
return (!e || e.tag !== "svg") && $(t, "expected an SVG root"), lt(Tt(e, t)), e.serialize();
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function ut(r, t, e) {
|
|
435
435
|
const s = x.parseAsSingle(r);
|
|
436
436
|
(!s || s.tag !== "svg") && $(e, "expected an SVG root");
|
|
437
437
|
const i = /* @__PURE__ */ new Map();
|
|
438
|
-
for (const
|
|
439
|
-
const
|
|
440
|
-
|
|
438
|
+
for (const c of s.children) {
|
|
439
|
+
const a = c.attributes.dataCell;
|
|
440
|
+
a !== void 0 && (i.has(a) && $(e, `duplicate placement cell '${a}'`), i.set(a, c));
|
|
441
441
|
}
|
|
442
|
-
return
|
|
442
|
+
return lt(zt(t.progress, i, e)), s.serialize();
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Wt(r, t) {
|
|
445
445
|
if (r === void 0) return 100;
|
|
446
446
|
const s = typeof r == "number" || typeof r == "string" && r.trim() !== "" ? Number(r) : NaN;
|
|
447
447
|
return Number.isFinite(s) ? Math.max(0, Math.min(100, s)) : (t == null || t("[ui0-icon] invalid progress value, using 100"), 100);
|
|
@@ -450,7 +450,7 @@ const W = /\s|,/, rt = ["path", "rect", "circle", "ellipse", "line", "polyline",
|
|
|
450
450
|
function ot(r, t = 1) {
|
|
451
451
|
return t !== 1 ? D(at(r, t), -F(t), -F(t)) : r;
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class Vt {
|
|
454
454
|
constructor(t = {}) {
|
|
455
455
|
I(this, "options");
|
|
456
456
|
I(this, "name");
|
|
@@ -476,44 +476,44 @@ class zt {
|
|
|
476
476
|
modifiers: []
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
|
-
let i = "",
|
|
479
|
+
let i = "", c = {
|
|
480
480
|
x: 1,
|
|
481
481
|
y: 1
|
|
482
|
-
},
|
|
483
|
-
|
|
484
|
-
const
|
|
482
|
+
}, a = this.result[t].options;
|
|
483
|
+
a.flags ?? (a.flags = []), a.modifiers ?? (a.modifiers = []), a.layers ?? (a.layers = []);
|
|
484
|
+
const n = x.parseAsSingle(e, (l) => {
|
|
485
485
|
var m;
|
|
486
|
-
if (
|
|
487
|
-
if (
|
|
488
|
-
const [, ,
|
|
489
|
-
(
|
|
486
|
+
if (l.tag === "svg" || l.tag === "g") {
|
|
487
|
+
if (l.tag === "svg" && l.hasAttr("viewBox")) {
|
|
488
|
+
const [, , f = "960", h = "960"] = l.attributes.viewBox.split(" ");
|
|
489
|
+
(f !== "960" || h !== "960") && (c.x = 960 / +f, c.y = 960 / +h);
|
|
490
490
|
}
|
|
491
|
-
|
|
491
|
+
l.hasAttr("data-icon") && (a.flags = l.attributes.dataIcon.split(W)), l.hasAttr("data-layers") && (a.layers = l.attributes.dataLayers.split(W)), l.hasAttr("data-modifiers") && (a.modifiers = l.attributes.dataModifiers.split(W));
|
|
492
492
|
}
|
|
493
|
-
if (
|
|
493
|
+
if (l.tag === "template")
|
|
494
494
|
return x.createNode({
|
|
495
495
|
tag: "template",
|
|
496
|
-
attributes:
|
|
497
|
-
content:
|
|
496
|
+
attributes: l.attributes,
|
|
497
|
+
content: l.raw,
|
|
498
498
|
children: [],
|
|
499
|
-
parent:
|
|
499
|
+
parent: l.parent,
|
|
500
500
|
raw: ""
|
|
501
501
|
});
|
|
502
|
-
if (
|
|
503
|
-
return i +=
|
|
504
|
-
if (rt.includes(
|
|
505
|
-
const { id:
|
|
506
|
-
|
|
502
|
+
if (l.tag === "style" && ((m = l.parent) == null ? void 0 : m.tag) === "defs")
|
|
503
|
+
return i += l.content, null;
|
|
504
|
+
if (rt.includes(l.tag) || l.tag === "g") {
|
|
505
|
+
const { id: f } = l.attributes;
|
|
506
|
+
f && (f.startsWith("r-icon") || f.startsWith("no-")) && (l.attributes.class = f + " " + (l.attributes.class ?? ""), delete l.attributes.id);
|
|
507
507
|
}
|
|
508
|
-
return
|
|
508
|
+
return l;
|
|
509
509
|
});
|
|
510
|
-
!
|
|
511
|
-
(
|
|
510
|
+
!a.flags.includes("no-rescale") && this.options.rescaling && n.walk((l) => {
|
|
511
|
+
(l.tag !== "g" && c && c.x !== 1 || c.y !== 1) && this.processBoxScaling(l, c.x, c.y);
|
|
512
512
|
});
|
|
513
|
-
const o = this.processNode(t,
|
|
514
|
-
delete
|
|
513
|
+
const o = this.processNode(t, n);
|
|
514
|
+
delete n.attributes.id, delete n.attributes.viewBox;
|
|
515
515
|
const u = {};
|
|
516
|
-
|
|
516
|
+
n.children.unshift(
|
|
517
517
|
x.createNode({
|
|
518
518
|
tag: "rect",
|
|
519
519
|
children: [],
|
|
@@ -526,9 +526,9 @@ class zt {
|
|
|
526
526
|
);
|
|
527
527
|
const p = x.createNode({
|
|
528
528
|
tag: "g",
|
|
529
|
-
content:
|
|
530
|
-
raw:
|
|
531
|
-
children:
|
|
529
|
+
content: n.content,
|
|
530
|
+
raw: n.raw,
|
|
531
|
+
children: n.children,
|
|
532
532
|
attributes: {
|
|
533
533
|
...u,
|
|
534
534
|
":class": "modifiers",
|
|
@@ -536,7 +536,7 @@ class zt {
|
|
|
536
536
|
},
|
|
537
537
|
parent: null
|
|
538
538
|
});
|
|
539
|
-
|
|
539
|
+
n.hasAttr("class") && (p.attributes.class = n.attributes.class), n.hasAttr("style") && (p.attributes.style = n.attributes.style), this.options.fit && (p.attributes[":style"] = "'--r-icon-fit-ratio: ' + fitRatios[fit]");
|
|
540
540
|
let g = x.serialize(p);
|
|
541
541
|
return this.result[t].sfc = {
|
|
542
542
|
template: g,
|
|
@@ -547,17 +547,17 @@ class zt {
|
|
|
547
547
|
render(t) {
|
|
548
548
|
if (!this.result) return "";
|
|
549
549
|
const { template: e = "", style: s = "", script: i = "" } = this.result[t].sfc;
|
|
550
|
-
let
|
|
551
|
-
return e && (
|
|
550
|
+
let c = "";
|
|
551
|
+
return e && (c += `
|
|
552
552
|
<template>
|
|
553
553
|
${e}
|
|
554
|
-
</template>`), s && (
|
|
554
|
+
</template>`), s && (c += `
|
|
555
555
|
<style scoped lang="scss">
|
|
556
556
|
${s.trim()}
|
|
557
|
-
</style>`), i && (
|
|
557
|
+
</style>`), i && (c += `
|
|
558
558
|
<script>
|
|
559
559
|
${i}
|
|
560
|
-
<\/script>`),
|
|
560
|
+
<\/script>`), c;
|
|
561
561
|
}
|
|
562
562
|
processBoxScaling(t, e = 1, s = 1) {
|
|
563
563
|
if (!(e === 1 && s === 1))
|
|
@@ -568,19 +568,19 @@ ${i}
|
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
processNode(t, e) {
|
|
571
|
-
const s = this.result[t].options, i = ["fit", "progress", "rendering", "modifiers"], { layers:
|
|
572
|
-
s.layers = [...s.layers, ...
|
|
573
|
-
const
|
|
571
|
+
const s = this.result[t].options, i = ["fit", "progress", "rendering", "modifiers"], { layers: c = [] } = this.processFeatures(t, e);
|
|
572
|
+
s.layers = [...s.layers, ...c];
|
|
573
|
+
const a = {
|
|
574
574
|
...this.processFit(e),
|
|
575
|
-
layers:
|
|
575
|
+
layers: c,
|
|
576
576
|
fitRatios: {
|
|
577
577
|
default: 1,
|
|
578
578
|
small: 0.84210526,
|
|
579
579
|
large: 1.16666667
|
|
580
580
|
}
|
|
581
581
|
};
|
|
582
|
-
return Array.isArray(this.options.fit) && (this.options.fit.length === 2 && ([
|
|
583
|
-
setup: () => (${JSON.stringify(
|
|
582
|
+
return Array.isArray(this.options.fit) && (this.options.fit.length === 2 && ([a.fitRatios.small, a.fitRatios.large] = this.options.fit), this.options.fit[2] && ([a.fitRatios.small, a.fitRatios.default, a.fitRatios.large] = this.options.fit)), `export default {
|
|
583
|
+
setup: () => (${JSON.stringify(a)}),
|
|
584
584
|
props: ${JSON.stringify(i)},
|
|
585
585
|
customOptions: ${JSON.stringify(s)}
|
|
586
586
|
}`;
|
|
@@ -601,185 +601,202 @@ ${i}
|
|
|
601
601
|
t.attributes.fill && !e.includes("fill") && (t.attributes[":fill"] = `rendering === 'original' ? '${t.attributes.fill}' : undefined`, delete t.attributes.fill), t.attributes.stroke && !e.includes("stroke") && (t.attributes[":stroke"] = `rendering === 'original' ? '${t.attributes.stroke}' : undefined`, delete t.attributes.stroke);
|
|
602
602
|
}
|
|
603
603
|
processFit(t) {
|
|
604
|
-
let e = 0, s = 0, i = 0,
|
|
605
|
-
const
|
|
606
|
-
return t.walk((
|
|
604
|
+
let e = 0, s = 0, i = 0, c = 0, a = 0;
|
|
605
|
+
const n = [], o = [], u = [], p = [], g = [], [l = 0.84210526, m = 1.16666667] = Array.isArray(this.options.fit) ? this.options.fit : [];
|
|
606
|
+
return t.walk((f) => {
|
|
607
607
|
var h;
|
|
608
|
-
if (!
|
|
609
|
-
if (
|
|
610
|
-
const { x1: d = "0", x2: b = "0", y1: y = "0", y2: v = "0" } =
|
|
608
|
+
if (!f.hasClass("no-fit") && ((h = f.parent) == null ? void 0 : h.tag) !== "mask") {
|
|
609
|
+
if (f.tag === "line") {
|
|
610
|
+
const { x1: d = "0", x2: b = "0", y1: y = "0", y2: v = "0" } = f.attributes;
|
|
611
611
|
u.push({
|
|
612
612
|
x1: d,
|
|
613
613
|
x2: b,
|
|
614
614
|
y1: y,
|
|
615
615
|
y2: v
|
|
616
|
-
}),
|
|
616
|
+
}), f.attributes[":x1"] = `fitLine[${i}][this.fit].x1`, f.attributes[":x2"] = `fitLine[${i}][this.fit].x2`, f.attributes[":y1"] = `fitLine[${i}][this.fit].y1`, f.attributes[":y2"] = `fitLine[${i}][this.fit].y2`, delete f.attributes.x1, delete f.attributes.x2, delete f.attributes.y1, delete f.attributes.y2, i++;
|
|
617
617
|
}
|
|
618
|
-
if (
|
|
619
|
-
const { width: d, height: b, x: y, y: v } =
|
|
620
|
-
o.push({ width: d, height: b, x: y, y: v }),
|
|
618
|
+
if (f.tag === "path" && f.hasAttr("d") && (n.push(f.attributes.d), f.attributes[":d"] = `fitPath[${s}][this.fit]`, s++, delete f.attributes.d), f.tag === "polyline" && (p.push(f.attributes.points), f.attributes[":points"] = `fitPolyline[${e}][this.fit]`, delete f.attributes.points, e++), f.tag === "circle" && f.hasAttr("r") && (g.push(f.attributes.r), f.attributes[":r"] = `fitCircle[${c}][this.fit]`, c++, delete f.attributes.r), f.tag === "rect" && f.hasAttr("width") && f.hasAttr("height")) {
|
|
619
|
+
const { width: d, height: b, x: y, y: v } = f.attributes;
|
|
620
|
+
o.push({ width: d, height: b, x: y, y: v }), f.attributes[":width"] = `fitRect[${a}][this.fit].width`, f.attributes[":height"] = `fitRect[${a}][this.fit].height`, f.attributes[":x"] = `fitRect[${a}][this.fit].x`, f.attributes[":y"] = `fitRect[${a}][this.fit].y`, a++, delete f.attributes.width, delete f.attributes.height, delete f.attributes.x, delete f.attributes.y;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
}), {
|
|
624
|
-
fitPolyline: p.reduce((
|
|
625
|
-
...
|
|
624
|
+
fitPolyline: p.reduce((f, h) => [
|
|
625
|
+
...f,
|
|
626
626
|
{
|
|
627
627
|
default: h,
|
|
628
|
-
small: D(X(h,
|
|
628
|
+
small: D(X(h, l, l), -F(l), -F(l)),
|
|
629
629
|
large: D(X(h, m, m), -F(m), -F(m))
|
|
630
630
|
}
|
|
631
631
|
], []),
|
|
632
|
-
fitLine: u.reduce((
|
|
633
|
-
...
|
|
632
|
+
fitLine: u.reduce((f, h) => [
|
|
633
|
+
...f,
|
|
634
634
|
{
|
|
635
635
|
default: h,
|
|
636
|
-
small: tt(h,
|
|
636
|
+
small: tt(h, l, [480, 480]),
|
|
637
637
|
large: tt(h, m, [480, 480])
|
|
638
638
|
}
|
|
639
639
|
], []),
|
|
640
|
-
fitPath:
|
|
641
|
-
...
|
|
640
|
+
fitPath: n.reduce((f, h) => [
|
|
641
|
+
...f,
|
|
642
642
|
{
|
|
643
643
|
default: h,
|
|
644
|
-
small: ot(h,
|
|
644
|
+
small: ot(h, l),
|
|
645
645
|
large: ot(h, m)
|
|
646
646
|
}
|
|
647
647
|
], []),
|
|
648
|
-
fitRect: o.reduce((
|
|
649
|
-
...
|
|
648
|
+
fitRect: o.reduce((f, h) => [
|
|
649
|
+
...f,
|
|
650
650
|
{
|
|
651
651
|
default: h,
|
|
652
|
-
small: et(h,
|
|
652
|
+
small: et(h, l, [480, 480]),
|
|
653
653
|
large: et(h, m, [480, 480])
|
|
654
654
|
}
|
|
655
655
|
], []),
|
|
656
|
-
fitCircle: g.reduce((
|
|
657
|
-
...
|
|
656
|
+
fitCircle: g.reduce((f, h) => [
|
|
657
|
+
...f,
|
|
658
658
|
{
|
|
659
659
|
default: h,
|
|
660
|
-
small: (+h *
|
|
660
|
+
small: (+h * l).toFixed(3),
|
|
661
661
|
large: (+h * m).toFixed(3)
|
|
662
662
|
}
|
|
663
663
|
], [])
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
666
|
processFeatures(t, e) {
|
|
667
|
-
const s = [], i = [],
|
|
667
|
+
const s = [], i = [], c = [], a = [], n = /* @__PURE__ */ new Set();
|
|
668
668
|
return e.walk((o) => {
|
|
669
669
|
const u = rt.includes(o.tag), p = o.tag === "g";
|
|
670
670
|
if (!o.hasAttr("data-skip")) {
|
|
671
671
|
if (o.hasAttr("data-layer")) {
|
|
672
|
-
|
|
673
|
-
const g = [...
|
|
672
|
+
n.add(o.attributes.dataLayer);
|
|
673
|
+
const g = [...n].indexOf(o.attributes.dataLayer);
|
|
674
674
|
o.addStyle(`--r-icon-l-i: ${g}`), o.attributes["data-l-i"] = g.toString();
|
|
675
675
|
}
|
|
676
|
-
if (o.hasClass("no-progress") &&
|
|
676
|
+
if (o.hasClass("no-progress") && c.push(o), o.tag === "mask" && a.push(o), u || p) {
|
|
677
677
|
const g = o.attributes.class && o.attributes.class.indexOf("no-progress") > -1;
|
|
678
|
-
p && o.hasAttr("data-group") && (s.push(o), i.push(o), delete o.attributes.dataGroup), u && !o.isChildOf(i) && (g || s.push(o)), o.isChildOf(
|
|
678
|
+
p && o.hasAttr("data-group") && (s.push(o), i.push(o), delete o.attributes.dataGroup), u && !o.isChildOf(i) && (g || s.push(o)), o.isChildOf(a) || this.processRendering(o);
|
|
679
679
|
}
|
|
680
680
|
this.processNodesIfModifiers(o);
|
|
681
681
|
}
|
|
682
|
-
}), e.addStyle(`--r-icon-l-c: ${
|
|
683
|
-
layers:
|
|
682
|
+
}), e.addStyle(`--r-icon-l-c: ${n.size}`), e.addStyle(`--r-icon-p-c: ${s.length}`), this.processPointNodes(s), this.applyProgress(t, s, c, a), {
|
|
683
|
+
layers: n
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
/** Applies the legacy progress behavior; the next transformer supplies its own compiled program. */
|
|
687
687
|
applyProgress(t, e, s, i) {
|
|
688
|
-
this.result[t].options.flags.includes("no-progress") || e.forEach((
|
|
689
|
-
if (!
|
|
690
|
-
const
|
|
691
|
-
|
|
688
|
+
this.result[t].options.flags.includes("no-progress") || e.forEach((c, a) => {
|
|
689
|
+
if (!c.isChildOf([...s, ...i])) {
|
|
690
|
+
const n = ((100 / e.length || 1) * (a + 1)).toFixed(3);
|
|
691
|
+
c.attributes["data-p-on"] = n, c.attributes[":opacity"] = `(progress ?? 100) >= ${n} ? 1 : .2`;
|
|
692
692
|
}
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
-
class
|
|
696
|
+
class Gt extends Vt {
|
|
697
697
|
/** Consumes an already compiled progress template from the next loader. */
|
|
698
698
|
processPrepared(t, e) {
|
|
699
699
|
return this.processCompiled(t, e, this.options);
|
|
700
700
|
}
|
|
701
701
|
/** Transforms author declarations into a component with one shared reactive progress value. */
|
|
702
702
|
process(t, e = "", s = this.options) {
|
|
703
|
-
return this.processCompiled(t,
|
|
703
|
+
return this.processCompiled(t, ft(e, t), s);
|
|
704
704
|
}
|
|
705
705
|
/** Compiles composition-owned progress without automatically progressing each source body. */
|
|
706
706
|
processVirtual(t, e, s) {
|
|
707
|
-
return this.processCompiled(t,
|
|
707
|
+
return this.processCompiled(t, ut(e, s, t), this.options);
|
|
708
708
|
}
|
|
709
709
|
/** Adds one computed normalization per component while preserving the existing generated setup data. */
|
|
710
710
|
processCompiled(t, e, s) {
|
|
711
|
-
const i = x.parseAsSingle(e),
|
|
712
|
-
if (
|
|
713
|
-
const
|
|
714
|
-
|
|
711
|
+
const i = x.parseAsSingle(e), c = i == null ? void 0 : i.attributes.transform, a = super.process(t, e, s);
|
|
712
|
+
if (c && (a.template = a.template.replace(/^<g(?=[\s>])/, `<g transform="${c}"`)), i != null && i.attributes.dataModifiers) {
|
|
713
|
+
const n = x.parseAsSingle(a.template);
|
|
714
|
+
n.walk((o) => {
|
|
715
715
|
if (!["path", "rect", "circle", "ellipse", "line", "polyline", "polygon"].includes(o.tag)) return;
|
|
716
716
|
const u = "{ '--ui0-icon-state': modifiers.join('|') }", p = o.attributes[":style"];
|
|
717
717
|
o.attributes[":style"] = p ? `[${p}, ${u}]` : u;
|
|
718
|
-
}),
|
|
718
|
+
}), a.template = n.serialize();
|
|
719
719
|
}
|
|
720
|
-
return
|
|
721
|
-
const __iconNormalize = ${
|
|
722
|
-
${
|
|
720
|
+
return a.script = `import { computed as __iconComputed } from 'vue'
|
|
721
|
+
const __iconNormalize = ${Wt.toString()}
|
|
722
|
+
${a.script}`.replace(
|
|
723
723
|
/setup: \(\) => \((.*?)\),\n props:/s,
|
|
724
|
-
(
|
|
724
|
+
(n, o) => {
|
|
725
725
|
const u = JSON.parse(o);
|
|
726
726
|
for (const p of Object.values(u)) {
|
|
727
727
|
const g = Array.isArray(p) ? p : [p];
|
|
728
|
-
for (const
|
|
729
|
-
|
|
728
|
+
for (const l of g)
|
|
729
|
+
l && typeof l == "object" && "default" in l && (l.normal = l.default);
|
|
730
730
|
}
|
|
731
731
|
return `setup: (__props) => ({ ...(${JSON.stringify(u)}), iconProgressValue: __iconComputed(() => __iconNormalize(__props.progress, import.meta.env.DEV ? console.warn : undefined)) }),
|
|
732
732
|
props:`;
|
|
733
733
|
}
|
|
734
|
-
),
|
|
734
|
+
), a;
|
|
735
735
|
}
|
|
736
736
|
/** Declarative progress is already compiled; skip the legacy automatic opacity rewrite. */
|
|
737
737
|
applyProgress() {
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function pt(r) {
|
|
741
741
|
return "file" in r;
|
|
742
742
|
}
|
|
743
|
-
function
|
|
744
|
-
const t = r.indexOf("?"), e = t === -1 ? void 0 : r.slice(t), s = t === -1 ? r : r.slice(0, t), i = s.indexOf("#"),
|
|
743
|
+
function qt(r) {
|
|
744
|
+
const t = r.indexOf("?"), e = t === -1 ? void 0 : r.slice(t), s = t === -1 ? r : r.slice(0, t), i = s.indexOf("#"), c = i === -1 ? s : s.slice(0, i), [a, ...n] = c.split("."), o = i === -1 ? void 0 : s.slice(i + 1);
|
|
745
745
|
return {
|
|
746
|
-
name:
|
|
746
|
+
name: a,
|
|
747
747
|
cell: o,
|
|
748
748
|
query: e,
|
|
749
|
-
modifiers:
|
|
749
|
+
modifiers: n.length ? n.map((u) => u.replace(/:/g, "-")) : void 0
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
|
-
const
|
|
752
|
+
const Dt = `<svg width="960" height="960" viewBox="0 0 960 960">>
|
|
753
753
|
<path class="no-fill" d="M340 340 C494.6 340 620 465.4 620 620" />
|
|
754
754
|
</svg>
|
|
755
|
-
`,
|
|
755
|
+
`, Ut = `<svg width="960" height="960" viewBox="0 0 960 960">
|
|
756
756
|
<path class="no-fill" d="M480 600 L480 360 M480 360 L395.1 444.9 M480 360 L564.9 444.9"/>
|
|
757
757
|
</svg>
|
|
758
|
-
`,
|
|
758
|
+
`, Jt = `<svg width="960" height="960" viewBox="0 0 960 960">
|
|
759
759
|
|
|
760
760
|
<polyline points="347.69,546.155 480,413.845 612.31,546.155"/>
|
|
761
761
|
|
|
762
762
|
</svg>
|
|
763
|
-
`,
|
|
763
|
+
`, Zt = `<svg viewBox="0 0 960 960">
|
|
764
764
|
<circle cx="480" cy="480" r="320"/>
|
|
765
765
|
</svg>
|
|
766
|
-
`,
|
|
766
|
+
`, Ht = `<svg>
|
|
767
767
|
<path class="no-fill" d="M480,480h280c0,74.2-29.5,145.5-82,198-52.5,52.5-123.8,82-198,82v-280Z"/>
|
|
768
768
|
</svg>
|
|
769
|
-
`,
|
|
770
|
-
`,
|
|
769
|
+
`, Kt = `<svg viewBox="0 0 960 960"><circle cx="480" cy="480" r="60"/></svg>
|
|
770
|
+
`, Qt = `<svg data-icon="utility no-progress" viewBox="0 0 960 960">
|
|
771
771
|
<path d="M441.3,253.9c17.2-29.8,60.2-29.8,77.4,0l117.6,203.8,117.6,203.8c17.2,29.8-4.3,67-38.7,67H244.7c-34.4,0-55.9-37.2-38.7-67l117.6-203.8,117.6-203.8Z"/>
|
|
772
772
|
</svg>
|
|
773
773
|
`, V = {
|
|
774
|
-
"arc-90":
|
|
775
|
-
arrow:
|
|
776
|
-
chevron:
|
|
777
|
-
circle:
|
|
778
|
-
"pie-90":
|
|
779
|
-
point:
|
|
780
|
-
triangle:
|
|
774
|
+
"arc-90": Dt,
|
|
775
|
+
arrow: Ut,
|
|
776
|
+
chevron: Jt,
|
|
777
|
+
circle: Zt,
|
|
778
|
+
"pie-90": Ht,
|
|
779
|
+
point: Kt,
|
|
780
|
+
triangle: Qt
|
|
781
781
|
};
|
|
782
|
-
|
|
782
|
+
function nt(r, t) {
|
|
783
|
+
if (N.isAbsolute(t)) return t;
|
|
784
|
+
let e = r;
|
|
785
|
+
const s = [];
|
|
786
|
+
for (let i = 0; i < 4; i++) {
|
|
787
|
+
const c = N.join(e, t);
|
|
788
|
+
s.push(c);
|
|
789
|
+
try {
|
|
790
|
+
if (Ot(c).isDirectory()) return c;
|
|
791
|
+
} catch {
|
|
792
|
+
}
|
|
793
|
+
const a = N.dirname(e);
|
|
794
|
+
if (a === e) break;
|
|
795
|
+
e = a;
|
|
796
|
+
}
|
|
797
|
+
throw new Error(`[ui0-icon] directory '${t}' not found (looked in: ${s.join(", ")})`);
|
|
798
|
+
}
|
|
799
|
+
class Yt {
|
|
783
800
|
constructor(t, e, s) {
|
|
784
801
|
I(this, "files", /* @__PURE__ */ new Map());
|
|
785
802
|
this.options = t, this.root = e, this.warn = s;
|
|
@@ -789,90 +806,90 @@ class Kt {
|
|
|
789
806
|
var e;
|
|
790
807
|
if (this.files.clear(), ((e = this.options.packs) == null ? void 0 : e.blocks) !== void 0) throw new Error("[ui0-icon] packs.blocks cannot override the built-in pack");
|
|
791
808
|
const t = typeof this.options.dir == "string" ? [this.options.dir] : this.options.dir ?? [];
|
|
792
|
-
for (const s of t) this.scanDirectory("assets",
|
|
809
|
+
for (const s of t) this.scanDirectory("assets", nt(this.root, s));
|
|
793
810
|
for (const [s, i] of Object.entries(this.options.packs ?? {}))
|
|
794
|
-
typeof i == "string" && this.scanDirectory(s,
|
|
811
|
+
typeof i == "string" && this.scanDirectory(s, nt(this.root, i));
|
|
795
812
|
}
|
|
796
813
|
/** Registers every nested SVG with a path relative to its configured directory. */
|
|
797
814
|
scanDirectory(t, e, s = "") {
|
|
798
|
-
for (const i of
|
|
799
|
-
const
|
|
800
|
-
if (i.isDirectory()) this.scanDirectory(t, e,
|
|
801
|
-
else if (i.isFile() &&
|
|
802
|
-
const
|
|
803
|
-
if (this.files.has(
|
|
804
|
-
this.files.set(
|
|
815
|
+
for (const i of It(N.join(e, s), { withFileTypes: !0 })) {
|
|
816
|
+
const c = N.posix.join(s, i.name);
|
|
817
|
+
if (i.isDirectory()) this.scanDirectory(t, e, c);
|
|
818
|
+
else if (i.isFile() && c.endsWith(".svg")) {
|
|
819
|
+
const a = `${t}/${c.slice(0, -4)}`, n = N.join(e, c);
|
|
820
|
+
if (this.files.has(a)) throw new Error(`[ui0-icon] duplicate source '${a}'`);
|
|
821
|
+
this.files.set(a, n);
|
|
805
822
|
}
|
|
806
823
|
}
|
|
807
824
|
}
|
|
808
825
|
/** Finds a file-backed icon name for ordinary imports within the configured source roots. */
|
|
809
826
|
nameOfFile(t) {
|
|
810
|
-
for (const [e, s] of this.files) if (
|
|
827
|
+
for (const [e, s] of this.files) if (N.resolve(s) === N.resolve(t)) return e;
|
|
811
828
|
}
|
|
812
829
|
/** Checks whether the next loader owns a complete icon name. */
|
|
813
830
|
has(t) {
|
|
814
|
-
var
|
|
831
|
+
var c;
|
|
815
832
|
const e = t.indexOf("/"), s = t.slice(0, e), i = t.slice(e + 1);
|
|
816
|
-
return this.files.has(t) || s === "blocks" && i in V || s === "virtual" && i in (this.options.virtual ?? {}) || typeof ((
|
|
833
|
+
return this.files.has(t) || s === "blocks" && i in V || s === "virtual" && i in (this.options.virtual ?? {}) || typeof ((c = this.options.packs) == null ? void 0 : c[s]) == "object" && i in this.options.packs[s];
|
|
817
834
|
}
|
|
818
835
|
/** Reads one registered source and records its actual filesystem dependencies. */
|
|
819
836
|
read(t) {
|
|
820
|
-
var
|
|
837
|
+
var n, o;
|
|
821
838
|
const e = t.indexOf("/"), s = t.slice(0, e), i = t.slice(e + 1);
|
|
822
839
|
if (s === "virtual") {
|
|
823
|
-
const u = (
|
|
840
|
+
const u = (n = this.options.virtual) == null ? void 0 : n[i];
|
|
824
841
|
if (!u) throw new Error(`[ui0-icon] unknown source '${t}'`);
|
|
825
|
-
if (
|
|
842
|
+
if (pt(u)) {
|
|
826
843
|
if (u.file.trimStart().startsWith("<")) return { svg: u.file, definition: u, files: /* @__PURE__ */ new Set() };
|
|
827
|
-
const p =
|
|
844
|
+
const p = N.resolve(this.root, u.file);
|
|
828
845
|
return { svg: z(p, "utf8"), definition: u, files: /* @__PURE__ */ new Set([p]) };
|
|
829
846
|
}
|
|
830
847
|
return { definition: u, files: /* @__PURE__ */ new Set() };
|
|
831
848
|
}
|
|
832
849
|
if (s === "blocks" && V[i]) return { svg: V[i], files: /* @__PURE__ */ new Set() };
|
|
833
|
-
const
|
|
834
|
-
if (
|
|
835
|
-
const u =
|
|
850
|
+
const c = (o = this.options.packs) == null ? void 0 : o[s];
|
|
851
|
+
if (c && typeof c == "object" && i in c) {
|
|
852
|
+
const u = c[i];
|
|
836
853
|
if (this.files.has(t) && this.warn(`[ui0-icon] packs.${s}.${i} overrides the directory source`), typeof u != "string") throw new Error(`[ui0-icon] '${t}' must retain an SVG file reference`);
|
|
837
|
-
const p =
|
|
854
|
+
const p = N.resolve(this.root, u);
|
|
838
855
|
return { svg: z(p, "utf8"), files: /* @__PURE__ */ new Set([p]) };
|
|
839
856
|
}
|
|
840
|
-
const
|
|
841
|
-
if (!
|
|
842
|
-
return { svg: z(
|
|
857
|
+
const a = this.files.get(t);
|
|
858
|
+
if (!a) throw new Error(`[ui0-icon] unknown source '${t}'`);
|
|
859
|
+
return { svg: z(a, "utf8"), files: /* @__PURE__ */ new Set([a]) };
|
|
843
860
|
}
|
|
844
861
|
}
|
|
845
|
-
function
|
|
862
|
+
function dt(r, t, e) {
|
|
846
863
|
const s = r.attributes.viewBox === void 0 ? [0, 0, t, t] : r.attributes.viewBox.trim().split(/[\s,]+/).map(Number);
|
|
847
864
|
if (s.length !== 4 || s.some((i) => !Number.isFinite(i)) || s[2] <= 0 || s[3] <= 0)
|
|
848
865
|
throw new Error(`[ui0-icon] ${e}: invalid viewBox`);
|
|
849
866
|
return s;
|
|
850
867
|
}
|
|
851
|
-
function
|
|
868
|
+
function Xt(r) {
|
|
852
869
|
const t = { ...r.attributes };
|
|
853
870
|
return delete t.viewBox, delete t.width, delete t.height, x.createNode({ tag: "g", attributes: t, children: r.children, content: r.content }).serialize();
|
|
854
871
|
}
|
|
855
|
-
function
|
|
872
|
+
function ht(r, t, e, s, i = /* @__PURE__ */ new Set()) {
|
|
856
873
|
var m;
|
|
857
874
|
if (i.has(r)) throw new Error(`[ui0-icon] ${r}: cyclic composition`);
|
|
858
|
-
const
|
|
859
|
-
if (!
|
|
860
|
-
return { svg:
|
|
861
|
-
const
|
|
862
|
-
if (![o, u].every((
|
|
875
|
+
const c = new Set(i).add(r), a = t.read(r);
|
|
876
|
+
if (!a.definition || pt(a.definition))
|
|
877
|
+
return { svg: a.svg, files: a.files, virtual: !1 };
|
|
878
|
+
const n = a.definition, { rows: o, cols: u } = n;
|
|
879
|
+
if (![o, u].every((f) => Number.isSafeInteger(f) && f > 0))
|
|
863
880
|
throw new Error(`[ui0-icon] ${r}: rows and cols must be positive integers`);
|
|
864
|
-
const p = [], g = new Set(
|
|
865
|
-
for (const [
|
|
881
|
+
const p = [], g = new Set(a.files);
|
|
882
|
+
for (const [f, h] of Object.entries(n.cells)) {
|
|
866
883
|
if (h === void 0) continue;
|
|
867
|
-
const d = `${r} cell ${
|
|
884
|
+
const d = `${r} cell ${f}`, b = f.split("-").map(Number), [y, v] = b;
|
|
868
885
|
if (b.length !== 2 || !b.every(Number.isSafeInteger) || y < 1 || y > o || v < 1 || v > u)
|
|
869
886
|
throw new Error(`[ui0-icon] ${d}: cell is outside ${o}x${u}`);
|
|
870
|
-
const w = typeof h == "string" ? { value: h } : h, { rows: E, cols:
|
|
871
|
-
if (![E,
|
|
887
|
+
const w = typeof h == "string" ? { value: h } : h, { rows: E, cols: k } = w.span ?? { rows: 1, cols: 1 };
|
|
888
|
+
if (![E, k].every((A) => Number.isSafeInteger(A) && A > 0))
|
|
872
889
|
throw new Error(`[ui0-icon] ${d}: span rows and cols must be positive integers`);
|
|
873
|
-
if (E > o - y + 1 ||
|
|
874
|
-
throw new Error(`[ui0-icon] ${d}: span ${E}x${
|
|
875
|
-
const S =
|
|
890
|
+
if (E > o - y + 1 || k > u - v + 1)
|
|
891
|
+
throw new Error(`[ui0-icon] ${d}: span ${E}x${k} is outside ${o}x${u}`);
|
|
892
|
+
const S = qt(w.value), C = Object.fromEntries(new URLSearchParams(S.query));
|
|
876
893
|
if ("weight" in w || C.weight !== void 0) throw new Error(`[ui0-icon] ${d}: local weight is forbidden`);
|
|
877
894
|
if ("shape" in w || "badge" in w || C.shape !== void 0 || C.badge !== void 0)
|
|
878
895
|
throw new Error(`[ui0-icon] ${d}: shape and badge belong to the complete icon`);
|
|
@@ -881,72 +898,72 @@ function dt(r, t, e, s, i = /* @__PURE__ */ new Set()) {
|
|
|
881
898
|
w.cell === "full" && s(`[ui0-icon] ${d}: cell:'full' is deprecated and has no placement effect`);
|
|
882
899
|
for (const A of ["fit", "rotate", "flipped", "filled", "rendering", "modifiers"])
|
|
883
900
|
w[A] !== void 0 && C[A] !== void 0 && String(w[A]) !== C[A] && s(`[ui0-icon] ${d}: ${A}=${String(w[A])} overrides value parameter ${C[A]}`);
|
|
884
|
-
let
|
|
901
|
+
let j;
|
|
885
902
|
try {
|
|
886
|
-
|
|
903
|
+
j = ht(S.name, t, e, s, c);
|
|
887
904
|
} catch (A) {
|
|
888
905
|
throw new Error(`[ui0-icon] ${d} source '${S.name}': ${String(A)}`);
|
|
889
906
|
}
|
|
890
|
-
|
|
891
|
-
const Z = x.parseAsSingle(
|
|
892
|
-
if (!Number.isFinite(
|
|
893
|
-
const H = Math.abs(
|
|
894
|
-
if (Math.abs(
|
|
907
|
+
j.files.forEach((A) => g.add(A));
|
|
908
|
+
const Z = x.parseAsSingle(j.svg), [gt, mt, _, M] = dt(Z, e, `${d} source ${S.name}`), L = w.rotate ?? Number(C.rotate ?? 0);
|
|
909
|
+
if (!Number.isFinite(L)) throw new Error(`[ui0-icon] ${d}: invalid rotate`);
|
|
910
|
+
const H = Math.abs(L % 180) === 90, bt = H ? M / _ : _ / M, vt = k * o / (E * u);
|
|
911
|
+
if (Math.abs(bt - vt) > 1e-6)
|
|
895
912
|
throw new Error(`[ui0-icon] ${d} source ${S.name}: source proportions do not match the placement area`);
|
|
896
|
-
const
|
|
897
|
-
if (!(
|
|
898
|
-
const T = e * 0.75 *
|
|
899
|
-
dataCell:
|
|
900
|
-
transform: `translate(${
|
|
901
|
-
class: [...S.modifiers ?? [], ...
|
|
913
|
+
const R = w.fit ?? C.fit ?? "normal", K = { normal: 1, default: 1, small: 0.84210526, large: 1.16666667 };
|
|
914
|
+
if (!(R in K)) throw new Error(`[ui0-icon] ${d}: unknown fit '${R}'`);
|
|
915
|
+
const T = e * 0.75 * k / u / ((H ? M : _) * 0.75) * K[R], wt = e * 0.125 + (v - 1 + k / 2) * e * 0.75 / u, $t = e * 0.125 + (y - 1 + E / 2) * e * 0.75 / o, yt = w.flipped ?? C.flipped === "true", Q = w.filled ?? (C.filled === "true" || ((m = S.modifiers) == null ? void 0 : m.some((A) => ["fill", "filled"].includes(A)))), xt = typeof w.modifiers == "string" ? w.modifiers.split(/[\s,]+/) : w.modifiers ?? [], Y = {
|
|
916
|
+
dataCell: f,
|
|
917
|
+
transform: `translate(${wt} ${$t}) scale(${yt ? -T : T} ${T}) rotate(${L}) translate(${-gt - _ / 2} ${-mt - M / 2})`,
|
|
918
|
+
class: [...S.modifiers ?? [], ...xt].join(" ")
|
|
902
919
|
};
|
|
903
920
|
Q !== void 0 && (Y.style = `fill:${Q ? "var(--0-icon-fill-color, currentColor)" : "none"}`);
|
|
904
|
-
const
|
|
905
|
-
p.push(x.createNode({ tag: "g", attributes: Y, content:
|
|
921
|
+
const At = Xt(Z).replaceAll("iconProgressValue", "100");
|
|
922
|
+
p.push(x.createNode({ tag: "g", attributes: Y, content: At }).serialize());
|
|
906
923
|
}
|
|
907
|
-
const
|
|
908
|
-
return { svg:
|
|
924
|
+
const l = `<svg viewBox="0 0 ${e} ${e}">${p.join("")}</svg>`;
|
|
925
|
+
return { svg: ut(l, n, r), files: g, virtual: !0 };
|
|
909
926
|
}
|
|
910
|
-
function
|
|
927
|
+
function te(r, t, e) {
|
|
911
928
|
const s = x.parseAsSingle(r);
|
|
912
929
|
if (!s || s.tag !== "svg") throw new Error(`[ui0-icon] ${e}: expected SVG root`);
|
|
913
|
-
const [i,
|
|
914
|
-
if (s.attributes.viewBox = "0 0 960 960", i !== 0 ||
|
|
915
|
-
const u = `translate(480 480) scale(${o}) translate(${-i -
|
|
930
|
+
const [i, c, a, n] = dt(s, t, e), o = 960 / Math.max(a, n);
|
|
931
|
+
if (s.attributes.viewBox = "0 0 960 960", i !== 0 || c !== 0 || a !== 960 || n !== 960) {
|
|
932
|
+
const u = `translate(480 480) scale(${o}) translate(${-i - a / 2} ${-c - n / 2})`;
|
|
916
933
|
s.attributes.transform = `${u} ${s.attributes.transform ?? ""}`.trim();
|
|
917
934
|
}
|
|
918
935
|
return s.serialize();
|
|
919
936
|
}
|
|
920
937
|
const G = "virtual:ui0-icon-next/", O = "\0ui0-icon-next/", q = "/@ui0-icon-next/";
|
|
921
|
-
function
|
|
938
|
+
function ae(r = {}) {
|
|
922
939
|
let t = "";
|
|
923
940
|
const e = r.size ?? 960;
|
|
924
941
|
if (!Number.isFinite(e) || e <= 0) throw new Error("[ui0-icon] size must be a positive number");
|
|
925
942
|
let s;
|
|
926
|
-
const i = /* @__PURE__ */ new Map(),
|
|
943
|
+
const i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), a = new Gt({ fit: r.fit ?? !0, rescaling: !1 });
|
|
927
944
|
return {
|
|
928
945
|
name: "vite:ui0-icon",
|
|
929
946
|
enforce: "pre",
|
|
930
|
-
configResolved(
|
|
931
|
-
t =
|
|
947
|
+
configResolved(n) {
|
|
948
|
+
t = n.root, s = new Yt(r, t, (o) => n.logger.warn(o)), s.scan();
|
|
932
949
|
},
|
|
933
|
-
resolveId(
|
|
934
|
-
if (
|
|
935
|
-
if (
|
|
936
|
-
if (!o || !/\.svg(?:\?icon)?$/.test(
|
|
937
|
-
const u =
|
|
950
|
+
resolveId(n, o) {
|
|
951
|
+
if (n.startsWith(q) || n.startsWith(O)) return n;
|
|
952
|
+
if (n.startsWith(G)) return O + decodeURIComponent(n.slice(G.length));
|
|
953
|
+
if (!o || !/\.svg(?:\?icon)?$/.test(n)) return;
|
|
954
|
+
const u = n.replace(/\?icon$/, ""), p = N.isAbsolute(u) ? u : N.resolve(N.dirname(o.split("?")[0]), u), g = s.nameOfFile(p) ?? (u.startsWith("/") ? s.nameOfFile(N.join(t, u)) : void 0);
|
|
938
955
|
if (g) return O + g;
|
|
939
956
|
},
|
|
940
|
-
load(
|
|
941
|
-
if (
|
|
942
|
-
if (!
|
|
943
|
-
const o =
|
|
944
|
-
i.set(
|
|
945
|
-
const p = u.virtual ? u.svg :
|
|
946
|
-
if (
|
|
957
|
+
load(n) {
|
|
958
|
+
if (n.startsWith(q)) return c.get(n) ?? "";
|
|
959
|
+
if (!n.startsWith(O)) return;
|
|
960
|
+
const o = n.slice(O.length), u = ht(o, s, e, (d) => this.warn(d));
|
|
961
|
+
i.set(n, u.files), u.files.forEach((d) => this.addWatchFile(d));
|
|
962
|
+
const p = u.virtual ? u.svg : ft(u.svg, o), g = a.processPrepared(o, te(p, e, o)), l = kt("sha256").update(o).digest("hex").slice(0, 12), m = `data-v-${l}`, f = Pt({ source: g.template, filename: `${o}.vue`, id: m, scoped: !!g.style });
|
|
963
|
+
if (f.errors.length) throw f.errors[0];
|
|
947
964
|
let h = "";
|
|
948
965
|
if (g.style) {
|
|
949
|
-
const d =
|
|
966
|
+
const d = Ct(N.join(t, "package.json")), b = Ft({
|
|
950
967
|
source: g.style,
|
|
951
968
|
filename: `${o}.scss`,
|
|
952
969
|
id: m,
|
|
@@ -962,63 +979,63 @@ function oe(r = {}) {
|
|
|
962
979
|
}
|
|
963
980
|
});
|
|
964
981
|
if (b.errors.length) throw b.errors[0];
|
|
965
|
-
const y = `${q}${
|
|
966
|
-
|
|
982
|
+
const y = `${q}${l}.css`;
|
|
983
|
+
c.set(y, b.code), h += `import ${JSON.stringify(y)}
|
|
967
984
|
`;
|
|
968
985
|
}
|
|
969
986
|
return h += g.script.replace("export default", "const _body =") + `
|
|
970
|
-
`, h +=
|
|
987
|
+
`, h += f.code.replace("export function render", "function render"), h += `
|
|
971
988
|
_body.render = render
|
|
972
989
|
`, g.style && (h += `_body.__scopeId = ${JSON.stringify(m)}
|
|
973
990
|
`), h + `export default _body
|
|
974
991
|
`;
|
|
975
992
|
},
|
|
976
|
-
transform(
|
|
993
|
+
transform(n, o) {
|
|
977
994
|
var b, y;
|
|
978
995
|
if (!o.endsWith(".vue")) return;
|
|
979
|
-
const { descriptor: u, errors: p } =
|
|
996
|
+
const { descriptor: u, errors: p } = Et(n, { filename: o });
|
|
980
997
|
if (p.length || !((b = u.template) != null && b.ast)) return;
|
|
981
|
-
const g = /* @__PURE__ */ new Set(),
|
|
998
|
+
const g = /* @__PURE__ */ new Set(), l = (v) => {
|
|
982
999
|
var w, E;
|
|
983
1000
|
if (v.type === 1 && ["Icon", "icon", "Ui0Icon", "ui0-icon"].includes(v.tag ?? ""))
|
|
984
|
-
for (const
|
|
985
|
-
if (
|
|
986
|
-
const S =
|
|
1001
|
+
for (const k of v.props ?? []) {
|
|
1002
|
+
if (k.type === 6 && ["value", "badge"].includes(k.name) && k.value) {
|
|
1003
|
+
const S = k.value.content.split(/[.?]/, 1)[0];
|
|
987
1004
|
if (s.has(S)) g.add(S);
|
|
988
1005
|
else if (/^(assets|virtual|blocks)\//.test(S) || S.split("/")[0] in (r.packs ?? {}))
|
|
989
1006
|
throw new Error(`[ui0-icon] ${o}: unknown source '${S}'`);
|
|
990
1007
|
}
|
|
991
|
-
if (
|
|
1008
|
+
if (k.type === 7 && k.name === "bind" && ((w = k.arg) == null ? void 0 : w.content) === "value")
|
|
992
1009
|
for (const S of Object.keys(r.virtual ?? {})) g.add(`virtual/${S}`);
|
|
993
1010
|
}
|
|
994
|
-
(E = v.children) == null || E.forEach(
|
|
1011
|
+
(E = v.children) == null || E.forEach(l);
|
|
995
1012
|
};
|
|
996
|
-
if (
|
|
1013
|
+
if (l(u.template.ast), !g.size) return;
|
|
997
1014
|
const m = [...g].map((v, w) => `import __ui0Body${w} from ${JSON.stringify(G + encodeURIComponent(v))}`).join(`
|
|
998
|
-
`),
|
|
1015
|
+
`), f = [...g].map((v, w) => `${JSON.stringify(v)}: __ui0Body${w}`).join(","), h = `
|
|
999
1016
|
import { provide as __ui0Provide, inject as __ui0Inject } from 'vue'
|
|
1000
1017
|
${m}
|
|
1001
1018
|
const __ui0Key = Symbol.for('ui0-icon-generated')
|
|
1002
|
-
__ui0Provide(__ui0Key, { ...__ui0Inject(__ui0Key, {}), ${
|
|
1019
|
+
__ui0Provide(__ui0Key, { ...__ui0Inject(__ui0Key, {}), ${f} })
|
|
1003
1020
|
`;
|
|
1004
1021
|
if (u.scriptSetup) {
|
|
1005
1022
|
const v = u.scriptSetup.loc.start.offset;
|
|
1006
|
-
return { code:
|
|
1023
|
+
return { code: n.slice(0, v) + h + n.slice(v), map: null };
|
|
1007
1024
|
}
|
|
1008
1025
|
const d = (y = u.script) != null && y.lang ? ` lang="${u.script.lang}"` : "";
|
|
1009
|
-
return { code: `${
|
|
1026
|
+
return { code: `${n}
|
|
1010
1027
|
<script setup${d}>${h}<\/script>`, map: null };
|
|
1011
1028
|
},
|
|
1012
|
-
handleHotUpdate(
|
|
1029
|
+
handleHotUpdate(n) {
|
|
1013
1030
|
s.scan();
|
|
1014
1031
|
const o = [];
|
|
1015
1032
|
for (const [u, p] of i) {
|
|
1016
|
-
if (!p.has(
|
|
1017
|
-
const g =
|
|
1033
|
+
if (!p.has(n.file)) continue;
|
|
1034
|
+
const g = n.server.moduleGraph.getModuleById(u);
|
|
1018
1035
|
g && o.push(g);
|
|
1019
1036
|
}
|
|
1020
|
-
for (const u of
|
|
1021
|
-
const p =
|
|
1037
|
+
for (const u of c.keys()) {
|
|
1038
|
+
const p = n.server.moduleGraph.getModuleById(u);
|
|
1022
1039
|
p && o.length && o.push(p);
|
|
1023
1040
|
}
|
|
1024
1041
|
if (o.length) return o;
|
|
@@ -1026,8 +1043,8 @@ __ui0Provide(__ui0Key, { ...__ui0Inject(__ui0Key, {}), ${c} })
|
|
|
1026
1043
|
};
|
|
1027
1044
|
}
|
|
1028
1045
|
export {
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1046
|
+
ae as ViteUi0Icon,
|
|
1047
|
+
ae as ViteUi0IconNext,
|
|
1048
|
+
ae as default,
|
|
1049
|
+
pt as isVirtualTemplate
|
|
1033
1050
|
};
|