@das-fed/upf-utils 6.4.0-dev.253 → 6.4.0-dev.255
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/api-services/modules/authentication/es5.js +1047 -1037
- package/api-services/modules/authentication/index.js +843 -829
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +978 -975
- package/api-services/modules/enterpriseright/index.js +773 -769
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1453 -1443
- package/api-services/modules/file/es5.js +1306 -1299
- package/api-services/modules/file/index.js +1061 -1051
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/index.js +1146 -1132
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1077 -1065
- package/api-services/modules/justauth/index.js +875 -857
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +975 -978
- package/api-services/modules/knowledge/index.js +769 -773
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +978 -975
- package/api-services/modules/link/index.js +773 -769
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1075 -1063
- package/api-services/modules/permission/index.js +874 -856
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1070 -1082
- package/api-services/modules/platformManage/index.js +858 -876
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1037 -1047
- package/api-services/modules/portal/index.js +829 -843
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +978 -975
- package/api-services/modules/space-manage/index.js +773 -769
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1075 -1063
- package/api-services/modules/supplychain-manage/index.js +874 -856
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1037 -1049
- package/api-services/modules/systemConfiguration/index.js +829 -847
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1035 -1045
- package/api-services/src/create-service/index.js +828 -842
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +1784 -1775
- package/common-info/index.js +1484 -1470
- package/common-info/index.js.gz +0 -0
- package/esm-map.json +1 -3
- package/package.json +3 -3
- package/theme/es5.d.ts +0 -6
- package/theme/es5.js +311 -378
- package/theme/index.d.ts +0 -6
- package/theme/index.js +247 -285
- package/theme/index.js.gz +0 -0
- package/theme/presets/default.d.ts +13 -0
package/theme/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { bus as
|
|
2
|
-
const m = "#ffffff",
|
|
1
|
+
import { bus as le } from "@das-fed/mframe";
|
|
2
|
+
const m = "#ffffff", g = "#000000", ie = 0.115, q = (e) => {
|
|
3
3
|
const r = String(e || "").trim();
|
|
4
4
|
return /^#([\da-f]{3}|[\da-f]{6})$/i.test(r) ? r.length === 4 ? `#${r.slice(1).split("").map((t) => `${t}${t}`).join("")}` : r : "";
|
|
5
|
-
},
|
|
6
|
-
const r =
|
|
5
|
+
}, k = (e) => {
|
|
6
|
+
const r = q(e);
|
|
7
7
|
if (!r)
|
|
8
8
|
return null;
|
|
9
9
|
const t = r.slice(1);
|
|
@@ -12,19 +12,19 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
12
12
|
green: Number.parseInt(t.slice(2, 4), 16),
|
|
13
13
|
blue: Number.parseInt(t.slice(4, 6), 16)
|
|
14
14
|
};
|
|
15
|
-
},
|
|
16
|
-
const u =
|
|
15
|
+
}, _ = (e) => Math.min(255, Math.max(0, Math.round(e))), J = (e, r, t, o) => {
|
|
16
|
+
const u = k(e), n = k(r);
|
|
17
17
|
if (!u || !n)
|
|
18
18
|
return o;
|
|
19
|
-
const l = Math.min(1, Math.max(0, t)), i =
|
|
20
|
-
return `#${[i,
|
|
21
|
-
},
|
|
22
|
-
const o =
|
|
19
|
+
const l = Math.min(1, Math.max(0, t)), i = _(u.red * l + n.red * (1 - l)), f = _(u.green * l + n.green * (1 - l)), c = _(u.blue * l + n.blue * (1 - l));
|
|
20
|
+
return `#${[i, f, c].map((p) => p.toString(16).padStart(2, "0")).join("")}`;
|
|
21
|
+
}, fe = (e, r, t) => {
|
|
22
|
+
const o = k(e);
|
|
23
23
|
if (!o)
|
|
24
24
|
return t;
|
|
25
25
|
const u = Math.min(1, Math.max(0, r));
|
|
26
26
|
return `rgba(${o.red}, ${o.green}, ${o.blue}, ${u})`;
|
|
27
|
-
},
|
|
27
|
+
}, H = (e, r = m) => J(e || "#5582F3", r || m, ie, "#ebf1fe"), P = "#5582f3", L = "#e63946", se = [
|
|
28
28
|
{
|
|
29
29
|
group: "foundation",
|
|
30
30
|
name: "brand",
|
|
@@ -107,7 +107,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
107
107
|
description: "圆角和阴影等样式效果",
|
|
108
108
|
variables: ["--upf-border-radius", "--upf-box-shadow", "--upf-box-shadow-elevated"]
|
|
109
109
|
}
|
|
110
|
-
],
|
|
110
|
+
], T = [
|
|
111
111
|
{ name: "--upf-brand-primary", label: "品牌主色", hint: "品牌主色,建议用于导航背景、Logo等品牌识别场景", category: "brand" },
|
|
112
112
|
{ name: "--upf-brand-secondary", label: "品牌辅色", hint: "品牌辅色,用于辅助品牌识别和强调元素", category: "brand" },
|
|
113
113
|
{ name: "--upf-color-primary", label: "主色", hint: "功能主色,用于按钮、交互元素、状态反馈", category: "basic" },
|
|
@@ -116,7 +116,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
116
116
|
label: "主色高亮背景",
|
|
117
117
|
hint: "主色配套高亮背景,默认跟随主色自动生成透明背景,也可手动覆盖",
|
|
118
118
|
category: "basic",
|
|
119
|
-
fallback: (e) =>
|
|
119
|
+
fallback: (e) => H(e["--upf-color-primary"], e["--upf-bg-primary"]),
|
|
120
120
|
fallbackDeps: ["--upf-color-primary", "--upf-bg-primary"]
|
|
121
121
|
},
|
|
122
122
|
{ name: "--upf-color-success", label: "成功色", hint: "成功状态色,用于成功提示、成功按钮", category: "basic" },
|
|
@@ -160,14 +160,14 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
160
160
|
{ name: "--upf-border-radius", label: "圆角", hint: "圆角大小,用于组件圆角", category: "effect" },
|
|
161
161
|
{ name: "--upf-box-shadow", label: "阴影", hint: "阴影效果,用于普通阴影", category: "effect" },
|
|
162
162
|
{ name: "--upf-box-shadow-elevated", label: "浮层阴影", hint: "浮层阴影,用于弹窗、浮层阴影", category: "effect" }
|
|
163
|
-
],
|
|
163
|
+
], ce = T.map((e) => e.name), pe = T.reduce((e, r) => (e[r.name] = r.label, e), {}), me = T.reduce((e, r) => (e[r.name] = r.hint, e), {}), ge = {
|
|
164
164
|
"--upf-nav-bg": "--upf-brand-primary",
|
|
165
165
|
"--upf-color-primary-bg": "--upf-color-primary",
|
|
166
166
|
"--upf-menu-active-text": "--upf-color-primary",
|
|
167
167
|
"--upf-tab-active-text": "--upf-color-primary"
|
|
168
|
-
},
|
|
169
|
-
"--upf-color-primary":
|
|
170
|
-
"--upf-color-primary-bg":
|
|
168
|
+
}, h = {
|
|
169
|
+
"--upf-color-primary": P,
|
|
170
|
+
"--upf-color-primary-bg": H(P),
|
|
171
171
|
"--upf-color-success": "#52c41a",
|
|
172
172
|
"--upf-color-warning": "#faad14",
|
|
173
173
|
"--upf-color-error": "#ff4d4f",
|
|
@@ -182,9 +182,9 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
182
182
|
"--upf-tab-text": "#666666",
|
|
183
183
|
"--upf-tab-active-bg": "#ffffff",
|
|
184
184
|
"--upf-border-radius": "4px"
|
|
185
|
-
},
|
|
185
|
+
}, X = {
|
|
186
186
|
default: {
|
|
187
|
-
...
|
|
187
|
+
...h,
|
|
188
188
|
"--upf-brand-primary": "#0e5fd8",
|
|
189
189
|
"--upf-brand-secondary": "#3579de",
|
|
190
190
|
"--upf-text-primary": "#231815",
|
|
@@ -209,7 +209,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
209
209
|
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.15)"
|
|
210
210
|
},
|
|
211
211
|
cjb: {
|
|
212
|
-
...
|
|
212
|
+
...h,
|
|
213
213
|
"--upf-brand-primary": "#ffffff",
|
|
214
214
|
"--upf-brand-secondary": "#f2f6ff",
|
|
215
215
|
"--upf-text-primary": "#212121",
|
|
@@ -234,7 +234,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
234
234
|
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
|
|
235
235
|
},
|
|
236
236
|
ssl: {
|
|
237
|
-
...
|
|
237
|
+
...h,
|
|
238
238
|
"--upf-brand-primary": "#1f2346",
|
|
239
239
|
"--upf-brand-secondary": "#2d3158",
|
|
240
240
|
"--upf-text-primary": "#231815",
|
|
@@ -260,11 +260,11 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
260
260
|
"--upf-box-shadow-elevated": "0 10px 28px rgba(35, 41, 75, 0.12)"
|
|
261
261
|
},
|
|
262
262
|
dkh: {
|
|
263
|
-
...
|
|
263
|
+
...h,
|
|
264
264
|
"--upf-brand-primary": "#eb0e1b",
|
|
265
265
|
"--upf-brand-secondary": "#f15760",
|
|
266
|
-
"--upf-color-primary":
|
|
267
|
-
"--upf-color-primary-bg":
|
|
266
|
+
"--upf-color-primary": L,
|
|
267
|
+
"--upf-color-primary-bg": H(L),
|
|
268
268
|
"--upf-text-primary": "#231815",
|
|
269
269
|
"--upf-text-secondary": "#666666",
|
|
270
270
|
"--upf-text-placeholder": "#bfbfbf",
|
|
@@ -286,7 +286,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
286
286
|
"--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
|
|
287
287
|
"--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
|
|
288
288
|
}
|
|
289
|
-
},
|
|
289
|
+
}, de = (e, r) => {
|
|
290
290
|
if (!r)
|
|
291
291
|
return "";
|
|
292
292
|
if (typeof r == "function")
|
|
@@ -298,83 +298,48 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
298
298
|
return u;
|
|
299
299
|
}
|
|
300
300
|
return "";
|
|
301
|
-
},
|
|
301
|
+
}, U = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), ar = () => [...ce], ur = () => ({ ...pe }), nr = () => ({ ...me }), lr = () => se.map((e) => ({
|
|
302
302
|
...e,
|
|
303
303
|
variables: [...e.variables]
|
|
304
|
-
})),
|
|
305
|
-
const t =
|
|
304
|
+
})), ir = () => ({ ...ge }), be = (e, r = X.default) => {
|
|
305
|
+
const t = U(e), o = U(r), u = {
|
|
306
306
|
...o,
|
|
307
307
|
...t
|
|
308
308
|
};
|
|
309
|
-
return
|
|
309
|
+
return T.reduce((n, l) => {
|
|
310
310
|
var p;
|
|
311
|
-
const i = t[l.name] || "",
|
|
312
|
-
return n[l.name] = i || (
|
|
311
|
+
const i = t[l.name] || "", f = (p = l.fallbackDeps) == null ? void 0 : p.some((I) => !!t[I]), c = de({ ...u, ...n }, l.fallback);
|
|
312
|
+
return n[l.name] = i || (f ? c : "") || o[l.name] || c, n;
|
|
313
313
|
}, {});
|
|
314
|
-
},
|
|
315
|
-
name: "cjb",
|
|
316
|
-
displayName: "纯净白",
|
|
317
|
-
description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
|
|
318
|
-
mode: "light",
|
|
319
|
-
source: "preset",
|
|
320
|
-
basePresetName: "cjb",
|
|
321
|
-
variables: ve
|
|
322
|
-
}, Ee = y.default, Te = {
|
|
314
|
+
}, he = X.default, z = {
|
|
323
315
|
name: "default",
|
|
324
316
|
displayName: "经典蓝",
|
|
325
317
|
description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
|
|
326
318
|
mode: "light",
|
|
327
319
|
source: "preset",
|
|
328
320
|
basePresetName: "default",
|
|
329
|
-
variables:
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
displayName: "大咖红",
|
|
333
|
-
description: "大咖红主题,壳层与内容交互色保持同系红色",
|
|
334
|
-
mode: "light",
|
|
335
|
-
source: "preset",
|
|
336
|
-
basePresetName: "dkh",
|
|
337
|
-
variables: Ce
|
|
338
|
-
}, we = y.ssl, Fe = {
|
|
339
|
-
name: "ssl",
|
|
340
|
-
displayName: "深邃蓝",
|
|
341
|
-
description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
|
|
342
|
-
mode: "dark",
|
|
343
|
-
source: "preset",
|
|
344
|
-
basePresetName: "ssl",
|
|
345
|
-
variables: we
|
|
346
|
-
}, _e = ["default", "cjb", "ssl", "dkh"], R = {
|
|
347
|
-
default: Te,
|
|
348
|
-
cjb: xe,
|
|
349
|
-
ssl: Fe,
|
|
350
|
-
dkh: Se
|
|
351
|
-
}, Ne = (e) => ({ ...e }), Z = (e) => ({
|
|
352
|
-
...e,
|
|
353
|
-
variables: Ne(e.variables)
|
|
354
|
-
}), g = (e) => {
|
|
355
|
-
const r = String(e || "").trim();
|
|
356
|
-
return R[r] ? Z(R[r]) : void 0;
|
|
357
|
-
}, Ae = () => _e.map((e) => Z(R[e])), ee = (e) => e, a = (e, r) => {
|
|
358
|
-
const t = ee(e);
|
|
321
|
+
variables: he
|
|
322
|
+
}, Q = (e) => e, a = (e, r) => {
|
|
323
|
+
const t = Q(e);
|
|
359
324
|
return String((r ? t[r] : "") ?? "");
|
|
360
|
-
},
|
|
361
|
-
const r =
|
|
325
|
+
}, s = (e, r) => r.map((t) => ({ target: t, from: e })), V = (e) => {
|
|
326
|
+
const r = Q(e);
|
|
362
327
|
return {
|
|
363
328
|
...Object.entries(r).reduce((o, [u, n]) => (o[u] = String(n ?? ""), o), {}),
|
|
364
|
-
...
|
|
329
|
+
...be(r)
|
|
365
330
|
};
|
|
366
|
-
},
|
|
331
|
+
}, ye = {
|
|
367
332
|
"#5582f3": "#3761CA",
|
|
368
333
|
"#e63946": "#C9303C"
|
|
369
|
-
},
|
|
334
|
+
}, j = (e, r) => {
|
|
370
335
|
const t = e || "#5582F3";
|
|
371
|
-
return
|
|
372
|
-
},
|
|
373
|
-
const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor:
|
|
374
|
-
return
|
|
336
|
+
return ye[q(t).toLowerCase()] || r(t, g, 0.84, "#3761CA");
|
|
337
|
+
}, ve = "#999", xe = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), Ee = (e) => xe(e) ? ve : a(e.variables, "--upf-color-primary"), Te = (e) => Array.isArray(e) ? [...e] : [e], C = (e, r, t = {}) => r.reduce((o, u) => {
|
|
338
|
+
const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: J, toRgbaColor: fe, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
|
|
339
|
+
return Te(u.target).forEach((l) => {
|
|
375
340
|
o[l] = String(n ?? "");
|
|
376
341
|
}), o;
|
|
377
|
-
}, {}),
|
|
342
|
+
}, {}), Ce = [
|
|
378
343
|
{ target: "--upf-primary", from: "--upf-color-primary" },
|
|
379
344
|
{ target: "--upf-text", from: "--upf-text-primary" },
|
|
380
345
|
{ target: "--upf-surface", from: "--upf-bg-primary" },
|
|
@@ -384,7 +349,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
384
349
|
{ target: "--upf-menu-item-hover-bg", from: "--upf-menu-hover-bg" },
|
|
385
350
|
{ target: "--upf-menu-item-active-bg", from: "--upf-menu-active-bg" },
|
|
386
351
|
{ target: "--upf-menu-item-active-text", from: "--upf-menu-active-text" }
|
|
387
|
-
],
|
|
352
|
+
], Se = [
|
|
388
353
|
{ target: "--el-color-primary", from: "--upf-color-primary" },
|
|
389
354
|
{ target: "--el-color-success", from: "--upf-color-success" },
|
|
390
355
|
{ target: "--el-color-warning", from: "--upf-color-warning" },
|
|
@@ -417,13 +382,13 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
417
382
|
target: "--el-checkbox-input-border",
|
|
418
383
|
resolve: ({ variables: e }) => `1px solid ${a(e, "--upf-border-color")}`
|
|
419
384
|
}
|
|
420
|
-
],
|
|
385
|
+
], we = [
|
|
421
386
|
{ target: "--das-ui-color-primary-level1", from: "--upf-color-primary-bg" },
|
|
422
|
-
...
|
|
387
|
+
...s("--upf-color-primary-bg", [
|
|
423
388
|
"--das-ui-color-primary-level1",
|
|
424
389
|
"--das-ui-upload-bgcolor-hover"
|
|
425
390
|
]),
|
|
426
|
-
...
|
|
391
|
+
...s("--upf-bg-primary", [
|
|
427
392
|
"--das-black-list-mange-color-white"
|
|
428
393
|
]),
|
|
429
394
|
{ target: "--das-ui-color-primary", from: "--upf-color-primary" },
|
|
@@ -501,7 +466,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
501
466
|
{ target: "--das-input-base-border-color", from: "--upf-border-color" },
|
|
502
467
|
{
|
|
503
468
|
target: ["--upf-form-active-border-color", "--das-input-active-border-color", "--upf-date-picker-active-border-color"],
|
|
504
|
-
resolve:
|
|
469
|
+
resolve: Ee
|
|
505
470
|
},
|
|
506
471
|
{ target: "--das-input-font-color", from: "--upf-text-primary" },
|
|
507
472
|
{ target: "--das-input-sub-font-color", from: "--upf-text-placeholder" },
|
|
@@ -587,15 +552,15 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
587
552
|
},
|
|
588
553
|
{
|
|
589
554
|
target: "--das-ui-color-primary-level7",
|
|
590
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"),
|
|
555
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.82, "#104CCC")
|
|
591
556
|
},
|
|
592
557
|
{
|
|
593
558
|
target: "--das-ui-color-primary-level8",
|
|
594
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"),
|
|
559
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.68, "#002EA3")
|
|
595
560
|
},
|
|
596
561
|
{
|
|
597
562
|
target: "--das-ui-color-primary-level9",
|
|
598
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"),
|
|
563
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.5, "#001F7A")
|
|
599
564
|
},
|
|
600
565
|
{
|
|
601
566
|
target: "--das-ui-color-danger-level1",
|
|
@@ -662,22 +627,22 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
662
627
|
},
|
|
663
628
|
{
|
|
664
629
|
target: "--das-ui-button-primary-hover",
|
|
665
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"),
|
|
630
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary"), g, 0.82, "#104CCC")
|
|
666
631
|
},
|
|
667
|
-
...
|
|
632
|
+
...s("--upf-color-primary", [
|
|
668
633
|
"--das-ui-search-form-primary-color"
|
|
669
634
|
]),
|
|
670
|
-
...
|
|
635
|
+
...s("--upf-text-primary", [
|
|
671
636
|
"--das-ui-tag-list-text-color"
|
|
672
637
|
]),
|
|
673
|
-
...
|
|
638
|
+
...s("--upf-border-color", [
|
|
674
639
|
"--das-ui-tag-list-border-color",
|
|
675
640
|
"--das-ui-upload-border-color"
|
|
676
641
|
]),
|
|
677
|
-
...
|
|
642
|
+
...s("--upf-bg-secondary", [
|
|
678
643
|
"--das-ui-upload-bgcolor"
|
|
679
644
|
]),
|
|
680
|
-
...
|
|
645
|
+
...s("--upf-text-secondary", [
|
|
681
646
|
"--das-ui-search-form-tip-color"
|
|
682
647
|
]),
|
|
683
648
|
{ target: "--das-ui-layout-header-menu-border-color", from: "--upf-nav-border-color" },
|
|
@@ -730,37 +695,37 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
730
695
|
{ target: "--das-ui-layout-aside-menu-expired-color", from: "--upf-text-disabled" },
|
|
731
696
|
{ target: "--das-ui-layout-aside-menu-top-left-icon-color", from: "--upf-color-primary" },
|
|
732
697
|
{ target: "--das-ui-layout-aside-menu-top-right-icon-color", from: "--upf-text-secondary" }
|
|
733
|
-
],
|
|
698
|
+
], Fe = [
|
|
734
699
|
// 同源变量集中维护,新增 target 时优先追加到对应 source 分组。
|
|
735
|
-
...
|
|
700
|
+
...s("--upf-color-primary", [
|
|
736
701
|
"--upf-button-primary",
|
|
737
702
|
"--upf-notification-primary-bg"
|
|
738
703
|
]),
|
|
739
|
-
...
|
|
704
|
+
...s("--upf-text-primary", [
|
|
740
705
|
"--upf-button-default-text",
|
|
741
706
|
"--upf-notification-title-text",
|
|
742
707
|
"--upf-text-tooltip-text"
|
|
743
708
|
]),
|
|
744
|
-
...
|
|
709
|
+
...s("--upf-border-color", [
|
|
745
710
|
"--upf-button-default-border",
|
|
746
711
|
"--upf-text-tooltip-border"
|
|
747
712
|
]),
|
|
748
|
-
...
|
|
713
|
+
...s("--upf-text-disabled", [
|
|
749
714
|
"--upf-button-default-disabled",
|
|
750
715
|
"--upf-switch-off-color",
|
|
751
716
|
"--upf-message-thumb",
|
|
752
717
|
"--upf-text-tooltip-scrollbar-thumb"
|
|
753
718
|
]),
|
|
754
|
-
...
|
|
719
|
+
...s("--upf-bg-secondary", [
|
|
755
720
|
"--upf-button-default-disabled-bg",
|
|
756
721
|
"--upf-table-header-bg"
|
|
757
722
|
]),
|
|
758
|
-
...
|
|
759
|
-
...
|
|
760
|
-
...
|
|
761
|
-
...
|
|
762
|
-
...
|
|
763
|
-
...
|
|
723
|
+
...s("--upf-bg-primary", ["--upf-checkbox-filter-bg"]),
|
|
724
|
+
...s("--upf-color-info", ["--upf-loading-color-1"]),
|
|
725
|
+
...s("--upf-brand-secondary", ["--upf-loading-color-2"]),
|
|
726
|
+
...s("--upf-color-success", ["--upf-loading-color-3"]),
|
|
727
|
+
...s("--upf-divider-color", ["--upf-loading-color-6"]),
|
|
728
|
+
...s("--upf-text-secondary", [
|
|
764
729
|
"--upf-message-close",
|
|
765
730
|
"--upf-notification-description-text",
|
|
766
731
|
"--upf-notification-close",
|
|
@@ -793,7 +758,7 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
793
758
|
},
|
|
794
759
|
{
|
|
795
760
|
target: "--upf-button-active",
|
|
796
|
-
resolve: ({ variables: e, mixHexColor: r }) =>
|
|
761
|
+
resolve: ({ variables: e, mixHexColor: r }) => j(a(e, "--upf-color-primary"), r)
|
|
797
762
|
},
|
|
798
763
|
{
|
|
799
764
|
target: "--upf-button-disabled",
|
|
@@ -801,15 +766,15 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
801
766
|
},
|
|
802
767
|
{
|
|
803
768
|
target: "--upf-button-set",
|
|
804
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3",
|
|
769
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", g, 0.78, "#4367C1")
|
|
805
770
|
},
|
|
806
771
|
{
|
|
807
772
|
target: "--upf-button-set-hover",
|
|
808
|
-
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3",
|
|
773
|
+
resolve: ({ variables: e, mixHexColor: r }) => r(a(e, "--upf-color-primary") || "#5582F3", g, 0.86, "#4C74DA")
|
|
809
774
|
},
|
|
810
775
|
{
|
|
811
776
|
target: "--upf-button-set-active",
|
|
812
|
-
resolve: ({ variables: e, mixHexColor: r }) =>
|
|
777
|
+
resolve: ({ variables: e, mixHexColor: r }) => j(a(e, "--upf-color-primary"), r)
|
|
813
778
|
},
|
|
814
779
|
{
|
|
815
780
|
target: "--upf-button-set-disabled",
|
|
@@ -1013,69 +978,72 @@ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
|
|
|
1013
978
|
},
|
|
1014
979
|
{ target: "--upf-app-container-app-bg-override", from: "--upf-nav-bg" },
|
|
1015
980
|
{ target: "--upf-app-container-app-text-override", from: "--upf-nav-text" }
|
|
1016
|
-
],
|
|
1017
|
-
const t =
|
|
981
|
+
], Ne = (e, r = {}) => C(e, Ce, r), _e = (e, r = {}) => C(e, Se, r), Ae = (e, r = {}) => C(e, we, r), ke = (e, r = {}) => C(e, Fe, r), B = (e, r = {}) => {
|
|
982
|
+
const t = V(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = ke(t, l), f = {
|
|
1018
983
|
...t,
|
|
1019
984
|
...i
|
|
1020
985
|
};
|
|
1021
986
|
return {
|
|
1022
987
|
...t,
|
|
1023
988
|
...i,
|
|
1024
|
-
...o ?
|
|
1025
|
-
...o ?
|
|
1026
|
-
...
|
|
989
|
+
...o ? _e(f, l) : {},
|
|
990
|
+
...o ? Ae(f, l) : {},
|
|
991
|
+
...Ne(f, l)
|
|
1027
992
|
};
|
|
1028
|
-
},
|
|
1029
|
-
|
|
993
|
+
}, D = () => ({
|
|
994
|
+
...z,
|
|
995
|
+
variables: { ...z.variables }
|
|
996
|
+
}), $ = "themeChange", x = "upf-theme-root-vars", He = "upf-default-theme-vars", E = "upf-theme-config", Ve = ["--upf-color-primary", "--upf-brand-primary"], K = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), b = /* @__PURE__ */ new WeakMap(), v = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, R = (e) => e || (typeof document > "u" ? null : document.documentElement), Z = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), S = (e) => e.head || e.documentElement, ee = (e, r) => {
|
|
997
|
+
const t = S(e);
|
|
1030
998
|
t && (r.parentNode !== t || t.lastElementChild !== r) && t.appendChild(r);
|
|
1031
|
-
},
|
|
999
|
+
}, G = (e) => {
|
|
1032
1000
|
var u;
|
|
1033
|
-
if (
|
|
1001
|
+
if (W.has(e))
|
|
1034
1002
|
return;
|
|
1035
|
-
const r =
|
|
1003
|
+
const r = S(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
|
|
1036
1004
|
if (!r || !t)
|
|
1037
1005
|
return;
|
|
1038
1006
|
new t(() => {
|
|
1039
|
-
const n = e.getElementById(
|
|
1040
|
-
|
|
1041
|
-
}).observe(r, { childList: !0 }),
|
|
1042
|
-
},
|
|
1043
|
-
const r = e.getElementById(
|
|
1044
|
-
if (
|
|
1045
|
-
return
|
|
1007
|
+
const n = e.getElementById(x);
|
|
1008
|
+
Z(n) && ee(e, n);
|
|
1009
|
+
}).observe(r, { childList: !0 }), W.add(e);
|
|
1010
|
+
}, Be = (e) => {
|
|
1011
|
+
const r = e.getElementById(x);
|
|
1012
|
+
if (Z(r))
|
|
1013
|
+
return ee(e, r), G(e), r;
|
|
1046
1014
|
const t = e.createElement("style");
|
|
1047
|
-
return t.id =
|
|
1048
|
-
},
|
|
1015
|
+
return t.id = x, S(e).appendChild(t), G(e), t;
|
|
1016
|
+
}, M = (e) => {
|
|
1049
1017
|
const r = Object.entries(e).filter(([, t]) => String(t ?? "").trim()).map(([t, o]) => ` ${t}: ${String(o ?? "")};`).join(`
|
|
1050
1018
|
`);
|
|
1051
1019
|
return r ? `:root {
|
|
1052
1020
|
${r}
|
|
1053
1021
|
}` : ":root {}";
|
|
1054
|
-
},
|
|
1055
|
-
const t =
|
|
1056
|
-
return
|
|
1022
|
+
}, De = (e = "default", r = {}) => {
|
|
1023
|
+
const t = getSharedPresetTheme(e) || D();
|
|
1024
|
+
return M(B(t.variables, {
|
|
1057
1025
|
...r,
|
|
1058
1026
|
themeName: r.themeName || t.name,
|
|
1059
1027
|
basePresetName: r.basePresetName || t.basePresetName
|
|
1060
1028
|
}));
|
|
1061
|
-
},
|
|
1062
|
-
const r = e.getElementById(
|
|
1029
|
+
}, fr = (e = {}) => De("default", e), Re = (e) => {
|
|
1030
|
+
const r = e.getElementById(x);
|
|
1063
1031
|
if (r != null && r.textContent)
|
|
1064
1032
|
return !0;
|
|
1065
|
-
const t =
|
|
1033
|
+
const t = b.get(e) || b.get(e.documentElement);
|
|
1066
1034
|
return !!(t && Object.keys(t).length);
|
|
1067
|
-
},
|
|
1035
|
+
}, Me = (e) => {
|
|
1068
1036
|
var o;
|
|
1069
1037
|
const r = ((o = e.defaultView) == null ? void 0 : o.getComputedStyle) || (typeof getComputedStyle == "function" ? getComputedStyle : void 0);
|
|
1070
1038
|
if (!r || !e.documentElement)
|
|
1071
1039
|
return !1;
|
|
1072
1040
|
const t = r(e.documentElement);
|
|
1073
|
-
return
|
|
1074
|
-
},
|
|
1041
|
+
return Ve.some((u) => t.getPropertyValue(u).trim());
|
|
1042
|
+
}, O = (e) => Object.prototype.toString.call(e) === "[object Object]", w = (e) => ({
|
|
1075
1043
|
themeName: e.name,
|
|
1076
1044
|
basePresetName: e.basePresetName,
|
|
1077
1045
|
variables: e.variables
|
|
1078
|
-
}),
|
|
1046
|
+
}), y = () => w(D()), re = (e) => {
|
|
1079
1047
|
if (typeof window > "u")
|
|
1080
1048
|
return null;
|
|
1081
1049
|
try {
|
|
@@ -1083,31 +1051,31 @@ ${r}
|
|
|
1083
1051
|
if (!r)
|
|
1084
1052
|
return null;
|
|
1085
1053
|
const t = JSON.parse(r);
|
|
1086
|
-
return
|
|
1054
|
+
return O(t) ? t : null;
|
|
1087
1055
|
} catch {
|
|
1088
1056
|
return null;
|
|
1089
1057
|
}
|
|
1090
|
-
},
|
|
1091
|
-
if (!
|
|
1058
|
+
}, Oe = (e, r) => {
|
|
1059
|
+
if (!O(e))
|
|
1092
1060
|
return null;
|
|
1093
1061
|
const t = { ...r };
|
|
1094
1062
|
return Object.entries(e).forEach(([o, u]) => {
|
|
1095
1063
|
!o.startsWith("--") || typeof u != "string" && typeof u != "number" || (t[o] = String(u));
|
|
1096
|
-
}),
|
|
1097
|
-
},
|
|
1098
|
-
const r =
|
|
1064
|
+
}), V(t);
|
|
1065
|
+
}, te = (e) => {
|
|
1066
|
+
const r = O(e.customTheme) ? e.customTheme : null;
|
|
1099
1067
|
if (!r)
|
|
1100
1068
|
return null;
|
|
1101
|
-
const t = String(r.basePresetName || e.remoteTheme || "").trim(), o =
|
|
1069
|
+
const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = getSharedPresetTheme(t) || D(), u = Oe(r.variables, o.variables);
|
|
1102
1070
|
return u ? {
|
|
1103
1071
|
themeName: "custom",
|
|
1104
1072
|
basePresetName: o.name,
|
|
1105
1073
|
variables: u
|
|
1106
1074
|
} : null;
|
|
1107
|
-
},
|
|
1075
|
+
}, Ie = (e) => {
|
|
1108
1076
|
if (!e.useStoredTheme)
|
|
1109
1077
|
return null;
|
|
1110
|
-
const r = String(e.storageKey ||
|
|
1078
|
+
const r = String(e.storageKey || E).trim() || E, t = re(r);
|
|
1111
1079
|
if (!t)
|
|
1112
1080
|
return null;
|
|
1113
1081
|
const o = [t.currentTheme, t.remoteTheme];
|
|
@@ -1116,61 +1084,61 @@ ${r}
|
|
|
1116
1084
|
if (!n)
|
|
1117
1085
|
continue;
|
|
1118
1086
|
if (n === "custom") {
|
|
1119
|
-
const i =
|
|
1087
|
+
const i = te(t);
|
|
1120
1088
|
if (i)
|
|
1121
1089
|
return i;
|
|
1122
1090
|
continue;
|
|
1123
1091
|
}
|
|
1124
|
-
const l =
|
|
1092
|
+
const l = getSharedPresetTheme(n);
|
|
1125
1093
|
if (l)
|
|
1126
|
-
return
|
|
1094
|
+
return w(l);
|
|
1127
1095
|
}
|
|
1128
1096
|
return null;
|
|
1129
|
-
},
|
|
1097
|
+
}, Pe = (e) => {
|
|
1130
1098
|
const r = e.documentElement, t = [r.getAttribute("data-theme"), r.getAttribute("data-skin")];
|
|
1131
1099
|
for (const o of t) {
|
|
1132
|
-
const u =
|
|
1100
|
+
const u = getSharedPresetTheme(String(o || "").trim());
|
|
1133
1101
|
if (u)
|
|
1134
|
-
return
|
|
1102
|
+
return w(u);
|
|
1135
1103
|
}
|
|
1136
1104
|
return null;
|
|
1137
|
-
},
|
|
1105
|
+
}, Le = (e, r) => {
|
|
1138
1106
|
const t = String(r.presetName || "").trim();
|
|
1139
1107
|
if (t) {
|
|
1140
1108
|
if (t === "custom") {
|
|
1141
1109
|
if (r.useStoredTheme === !1)
|
|
1142
|
-
return
|
|
1143
|
-
const u = String(r.storageKey ||
|
|
1144
|
-
return (n ?
|
|
1110
|
+
return y();
|
|
1111
|
+
const u = String(r.storageKey || E).trim() || E, n = re(u);
|
|
1112
|
+
return (n ? te(n) : null) || y();
|
|
1145
1113
|
}
|
|
1146
|
-
const o =
|
|
1147
|
-
return o ?
|
|
1114
|
+
const o = getSharedPresetTheme(t);
|
|
1115
|
+
return o ? w(o) : y();
|
|
1148
1116
|
}
|
|
1149
|
-
return
|
|
1150
|
-
},
|
|
1151
|
-
const t =
|
|
1117
|
+
return Pe(e) || Ie(r) || y();
|
|
1118
|
+
}, Ue = (e, r) => {
|
|
1119
|
+
const t = S(e);
|
|
1152
1120
|
(r.parentNode !== t || t.firstChild !== r) && t.insertBefore(r, t.firstChild);
|
|
1153
|
-
},
|
|
1121
|
+
}, sr = (e = {}) => {
|
|
1154
1122
|
var p;
|
|
1155
1123
|
if (typeof document > "u")
|
|
1156
1124
|
return null;
|
|
1157
|
-
const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t =
|
|
1158
|
-
if (!e.force &&
|
|
1125
|
+
const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Le(r, e), o = e.styleId || He;
|
|
1126
|
+
if (!e.force && Re(r))
|
|
1159
1127
|
return null;
|
|
1160
1128
|
const u = r.getElementById(o);
|
|
1161
|
-
if (!e.force && !u &&
|
|
1129
|
+
if (!e.force && !u && Me(r))
|
|
1162
1130
|
return null;
|
|
1163
1131
|
const n = u || r.createElement("style");
|
|
1164
1132
|
n.id || (n.id = o);
|
|
1165
|
-
const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName,
|
|
1133
|
+
const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, f = M(B(t.variables, {
|
|
1166
1134
|
includeElementAndDasUiBridges: e.includeElementAndDasUiBridges,
|
|
1167
1135
|
themeName: l,
|
|
1168
1136
|
basePresetName: i
|
|
1169
1137
|
}));
|
|
1170
|
-
n.textContent !==
|
|
1138
|
+
n.textContent !== f && (n.textContent = f), Ue(r, n);
|
|
1171
1139
|
const { setThemeAttributes: c = !0 } = e;
|
|
1172
1140
|
return c && ((e.themeName || !r.documentElement.getAttribute("data-theme")) && r.documentElement.setAttribute("data-theme", l), e.skinName !== null && !r.documentElement.getAttribute("data-skin") && r.documentElement.setAttribute("data-skin", e.skinName || i)), n;
|
|
1173
|
-
},
|
|
1141
|
+
}, Y = (e, r) => {
|
|
1174
1142
|
if (!e.length || !r.length)
|
|
1175
1143
|
return;
|
|
1176
1144
|
const t = new Set(r);
|
|
@@ -1178,22 +1146,22 @@ ${r}
|
|
|
1178
1146
|
const u = e[o];
|
|
1179
1147
|
t.has(u) && e.removeProperty(u);
|
|
1180
1148
|
}
|
|
1181
|
-
},
|
|
1182
|
-
const t =
|
|
1183
|
-
(
|
|
1149
|
+
}, ze = (e, r) => {
|
|
1150
|
+
const t = Be(e), o = M(r);
|
|
1151
|
+
(K.get(e) !== o || t.textContent !== o) && (t.textContent = o, K.set(e, o));
|
|
1184
1152
|
const u = Object.keys(r);
|
|
1185
|
-
|
|
1186
|
-
},
|
|
1153
|
+
Y(e.documentElement.style, u), e.body && Y(e.body.style, u);
|
|
1154
|
+
}, je = (e) => {
|
|
1187
1155
|
typeof window > "u" || (window.__UPF_THEME_SNAPSHOT__ = e);
|
|
1188
|
-
},
|
|
1189
|
-
const t =
|
|
1190
|
-
|
|
1156
|
+
}, $e = (e, r) => {
|
|
1157
|
+
const t = v(r) || {}, o = e.ownerDocument || document;
|
|
1158
|
+
b.set(e, t);
|
|
1191
1159
|
const u = e === o.documentElement || e === o.body;
|
|
1192
|
-
u &&
|
|
1193
|
-
},
|
|
1194
|
-
const r =
|
|
1195
|
-
return (r ?
|
|
1196
|
-
},
|
|
1160
|
+
u && b.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
|
|
1161
|
+
}, Ke = (e) => {
|
|
1162
|
+
const r = R(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
|
|
1163
|
+
return (r ? b.get(r) : null) || (t ? b.get(t) : null) || o;
|
|
1164
|
+
}, We = (e = !0) => {
|
|
1197
1165
|
var r;
|
|
1198
1166
|
if (typeof window > "u" || !window.name)
|
|
1199
1167
|
return null;
|
|
@@ -1208,163 +1176,157 @@ ${r}
|
|
|
1208
1176
|
} catch {
|
|
1209
1177
|
return null;
|
|
1210
1178
|
}
|
|
1211
|
-
},
|
|
1179
|
+
}, Ge = (e, r) => {
|
|
1212
1180
|
if (r !== void 0)
|
|
1213
1181
|
return r;
|
|
1214
1182
|
const t = e.config || {};
|
|
1215
1183
|
return String(t.basePresetName || t.name || e.themeName || "").trim() || null;
|
|
1216
|
-
},
|
|
1217
|
-
const t =
|
|
1184
|
+
}, Ye = (e, r = {}) => {
|
|
1185
|
+
const t = R(r.root);
|
|
1218
1186
|
if (!t)
|
|
1219
1187
|
return {};
|
|
1220
|
-
const o =
|
|
1188
|
+
const o = V(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, f]) => (l[i] = String(f ?? ""), l), {}) : B(o, {
|
|
1221
1189
|
includeElementAndDasUiBridges: r.includeElementAndDasUiBridges,
|
|
1222
1190
|
themeName: r.themeName,
|
|
1223
1191
|
basePresetName: r.basePresetName
|
|
1224
1192
|
}), n = t.ownerDocument || document;
|
|
1225
|
-
return t === n.documentElement || t === n.body ?
|
|
1193
|
+
return t === n.documentElement || t === n.body ? ze(n, u) : Object.entries(u).forEach(([l, i]) => {
|
|
1226
1194
|
t.style.getPropertyValue(l) !== i && t.style.setProperty(l, i);
|
|
1227
|
-
}),
|
|
1228
|
-
},
|
|
1229
|
-
const t = e.config || {}, o =
|
|
1195
|
+
}), $e(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
|
|
1196
|
+
}, oe = (e, r = {}) => {
|
|
1197
|
+
const t = e.config || {}, o = Ye(e.variables || {}, {
|
|
1230
1198
|
...r,
|
|
1231
1199
|
themeName: r.themeName || e.themeName,
|
|
1232
1200
|
basePresetName: r.basePresetName || String(t.basePresetName || t.name || ""),
|
|
1233
|
-
skinName:
|
|
1201
|
+
skinName: Ge(e, r.skinName)
|
|
1234
1202
|
});
|
|
1235
|
-
return
|
|
1236
|
-
},
|
|
1203
|
+
return je(e), o;
|
|
1204
|
+
}, A = (e, r, t = !0) => {
|
|
1237
1205
|
try {
|
|
1238
1206
|
return e && e.__THEME_API__ || null;
|
|
1239
1207
|
} catch {
|
|
1240
1208
|
return null;
|
|
1241
1209
|
}
|
|
1242
|
-
},
|
|
1243
|
-
const r =
|
|
1210
|
+
}, F = (e = !0) => typeof window > "u" ? null : A(window, "current", e) || A(window.parent, "parent", e) || A(window.top, "top", e), ae = (e = {}) => {
|
|
1211
|
+
const r = F(e.debug), t = r != null && r.getCurrentTheme ? r.getCurrentTheme() : null;
|
|
1244
1212
|
if (t)
|
|
1245
1213
|
return t;
|
|
1246
1214
|
const o = (typeof window < "u" ? window.__UPF_THEME_SNAPSHOT__ : null) || null;
|
|
1247
|
-
return o ||
|
|
1248
|
-
},
|
|
1249
|
-
const r =
|
|
1215
|
+
return o || We(e.debug);
|
|
1216
|
+
}, qe = (e = {}) => {
|
|
1217
|
+
const r = Ke(e.root);
|
|
1250
1218
|
if (r)
|
|
1251
|
-
return
|
|
1252
|
-
const t =
|
|
1219
|
+
return v(r);
|
|
1220
|
+
const t = ae(e);
|
|
1253
1221
|
if (t != null && t.variables)
|
|
1254
|
-
return
|
|
1255
|
-
const o =
|
|
1222
|
+
return v(t.variables);
|
|
1223
|
+
const o = F(e.debug);
|
|
1256
1224
|
if (!o)
|
|
1257
1225
|
return null;
|
|
1258
1226
|
const u = o.getVariables ? o.getVariables() : null;
|
|
1259
|
-
return
|
|
1260
|
-
},
|
|
1261
|
-
const t =
|
|
1227
|
+
return v(u);
|
|
1228
|
+
}, cr = (e, r = !0) => {
|
|
1229
|
+
const t = F(r);
|
|
1262
1230
|
return t != null && t.changeTheme ? (t.changeTheme(e), !0) : !1;
|
|
1263
|
-
},
|
|
1264
|
-
const r =
|
|
1265
|
-
return r ? (
|
|
1266
|
-
},
|
|
1231
|
+
}, ue = (e = {}) => {
|
|
1232
|
+
const r = ae(e);
|
|
1233
|
+
return r ? (oe(r, e), r) : (e.debug, null);
|
|
1234
|
+
}, pr = (e = {}) => ue({
|
|
1267
1235
|
includeBridges: !1,
|
|
1268
1236
|
includeElementAndDasUiBridges: !1,
|
|
1269
1237
|
...e
|
|
1270
|
-
}),
|
|
1238
|
+
}), Je = (e, r = !0) => {
|
|
1271
1239
|
try {
|
|
1272
|
-
const t =
|
|
1273
|
-
return t.event.on(
|
|
1274
|
-
t.event.off(
|
|
1240
|
+
const t = le("microApp");
|
|
1241
|
+
return t.event.on($, e), () => {
|
|
1242
|
+
t.event.off($, e);
|
|
1275
1243
|
};
|
|
1276
1244
|
} catch {
|
|
1277
1245
|
return null;
|
|
1278
1246
|
}
|
|
1279
|
-
},
|
|
1247
|
+
}, Xe = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, Qe = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", Ze = (e) => {
|
|
1280
1248
|
let r = "";
|
|
1281
1249
|
return (t) => {
|
|
1282
|
-
const o =
|
|
1250
|
+
const o = Qe(t);
|
|
1283
1251
|
o && o === r || (r = o, e(t));
|
|
1284
1252
|
};
|
|
1285
|
-
},
|
|
1286
|
-
const u =
|
|
1287
|
-
return
|
|
1288
|
-
|
|
1253
|
+
}, er = (e, r, t = !1, o = !0) => {
|
|
1254
|
+
const u = Ze(r), n = Xe(e, u), l = Je(u, o), f = (t ? [n, l] : [l, n]).filter(Boolean);
|
|
1255
|
+
return f.length ? () => {
|
|
1256
|
+
f.forEach((c) => c());
|
|
1289
1257
|
} : null;
|
|
1290
|
-
},
|
|
1291
|
-
const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l =
|
|
1292
|
-
let i = !1,
|
|
1258
|
+
}, rr = (e = {}) => {
|
|
1259
|
+
const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l = F(u);
|
|
1260
|
+
let i = !1, f = null, c = null;
|
|
1293
1261
|
const p = () => {
|
|
1294
|
-
i ||
|
|
1295
|
-
},
|
|
1296
|
-
|
|
1262
|
+
i || ue({ ...n, debug: u });
|
|
1263
|
+
}, N = er(l, (d) => {
|
|
1264
|
+
oe(d, n), o && (d == null ? void 0 : d.source) !== "mountSync" && o(d);
|
|
1297
1265
|
}, t, u);
|
|
1298
|
-
return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (
|
|
1299
|
-
|
|
1266
|
+
return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ne) => Promise.resolve().then(ne))(p), typeof requestAnimationFrame == "function" ? f = requestAnimationFrame(() => {
|
|
1267
|
+
f = null, p();
|
|
1300
1268
|
}) : c = setTimeout(() => {
|
|
1301
1269
|
c = null, p();
|
|
1302
1270
|
}, 16)), () => {
|
|
1303
|
-
i = !0,
|
|
1271
|
+
i = !0, f !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(f), f = null), c !== null && (clearTimeout(c), c = null), N == null || N();
|
|
1304
1272
|
};
|
|
1305
|
-
},
|
|
1273
|
+
}, mr = (e = {}) => rr({
|
|
1306
1274
|
includeBridges: !1,
|
|
1307
1275
|
includeElementAndDasUiBridges: !1,
|
|
1308
1276
|
...e
|
|
1309
|
-
}),
|
|
1277
|
+
}), tr = (e, r) => {
|
|
1310
1278
|
var n;
|
|
1311
|
-
const t =
|
|
1279
|
+
const t = R(r), o = String(e || "").trim();
|
|
1312
1280
|
if (!t || !o)
|
|
1313
1281
|
return "";
|
|
1314
1282
|
const u = typeof getComputedStyle > "u" ? "" : getComputedStyle(t).getPropertyValue(o).trim();
|
|
1315
|
-
return u || String(((n =
|
|
1316
|
-
},
|
|
1317
|
-
value:
|
|
1283
|
+
return u || String(((n = qe({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
|
|
1284
|
+
}, gr = (e) => `var(${String(e || "").trim()})`, dr = (e, r) => ({
|
|
1285
|
+
value: tr(String(e || "").trim(), r)
|
|
1318
1286
|
});
|
|
1319
1287
|
export {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
pe as
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
ar as
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
le as syncThemeFromHost,
|
|
1365
|
-
Ue as toDasUiColorOverrides,
|
|
1366
|
-
Le as toElementThemeVariables,
|
|
1367
|
-
Oe as toLegacyThemeVariables,
|
|
1368
|
-
ce as toRgbaColor,
|
|
1369
|
-
ze as toUpfComponentThemeVariables
|
|
1288
|
+
we as DAS_UI_THEME_BRIDGE_ITEMS,
|
|
1289
|
+
Se as ELEMENT_THEME_BRIDGE_ITEMS,
|
|
1290
|
+
Ce as LEGACY_THEME_BRIDGE_ITEMS,
|
|
1291
|
+
X as PRESET_THEME_VARIABLES,
|
|
1292
|
+
se as THEME_SOURCE_VARIABLE_CATEGORIES,
|
|
1293
|
+
me as THEME_SOURCE_VARIABLE_HINTS,
|
|
1294
|
+
pe as THEME_SOURCE_VARIABLE_LABELS,
|
|
1295
|
+
T as THEME_SOURCE_VARIABLE_META,
|
|
1296
|
+
ce as THEME_SOURCE_VARIABLE_NAMES,
|
|
1297
|
+
ge as THEME_SOURCE_VARIABLE_RELATIONS,
|
|
1298
|
+
Fe as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
|
|
1299
|
+
oe as applyThemeEventToDocument,
|
|
1300
|
+
Ye as applyThemeVariablesToDocument,
|
|
1301
|
+
fr as buildDefaultThemeCssText,
|
|
1302
|
+
De as buildPresetThemeCssText,
|
|
1303
|
+
B as buildRuntimeThemeVariables,
|
|
1304
|
+
cr as changeTheme,
|
|
1305
|
+
sr as ensureDefaultThemeStyle,
|
|
1306
|
+
ae as getCurrentTheme,
|
|
1307
|
+
We as getHostThemeSnapshotFromWindowName,
|
|
1308
|
+
F as getThemeAPI,
|
|
1309
|
+
lr as getThemeSourceVariableCategories,
|
|
1310
|
+
nr as getThemeSourceVariableHints,
|
|
1311
|
+
ur as getThemeSourceVariableLabels,
|
|
1312
|
+
ar as getThemeSourceVariableNames,
|
|
1313
|
+
ir as getThemeSourceVariableRelations,
|
|
1314
|
+
tr as getThemeVariable,
|
|
1315
|
+
qe as getThemeVariables,
|
|
1316
|
+
gr as getVar,
|
|
1317
|
+
dr as getVarValue,
|
|
1318
|
+
mr as initHostThemeRootSync,
|
|
1319
|
+
rr as initSubAppThemeSync,
|
|
1320
|
+
J as mixHexColor,
|
|
1321
|
+
q as normalizeHexColor,
|
|
1322
|
+
be as normalizeThemeSourceVariables,
|
|
1323
|
+
H as resolvePrimaryBgColor,
|
|
1324
|
+
C as resolveThemeBridgeVariables,
|
|
1325
|
+
pr as syncHostThemeRoot,
|
|
1326
|
+
ue as syncThemeFromHost,
|
|
1327
|
+
Ae as toDasUiColorOverrides,
|
|
1328
|
+
_e as toElementThemeVariables,
|
|
1329
|
+
Ne as toLegacyThemeVariables,
|
|
1330
|
+
fe as toRgbaColor,
|
|
1331
|
+
ke as toUpfComponentThemeVariables
|
|
1370
1332
|
};
|