@done-coding/admin-core 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/README.md +1 -48
  2. package/es/bridge/index.mjs +75 -72
  3. package/es/bridge/layout.mjs +51 -0
  4. package/es/bridge/theme/index.mjs +1 -1
  5. package/es/bridge/theme/persist.mjs +1 -1
  6. package/es/components/app-layout/AppAside.vue.mjs +2 -2
  7. package/es/components/app-layout/AppAside.vue2.mjs +27 -10
  8. package/es/components/app-layout/AppCollapseToggle.vue.mjs +7 -0
  9. package/es/components/app-layout/AppCollapseToggle.vue2.mjs +54 -0
  10. package/es/components/app-layout/AppFooter.vue.mjs +1 -1
  11. package/es/components/app-layout/AppHeader.vue.mjs +3 -3
  12. package/es/components/app-layout/AppHeader.vue2.mjs +1 -1
  13. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  14. package/es/components/app-layout/AppLayout.vue2.mjs +3 -3
  15. package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
  16. package/es/components/app-layout/AppSidebar.vue2.mjs +41 -61
  17. package/es/components/app-layout/AppTheme.vue.mjs +3 -3
  18. package/es/components/app-layout/viewport.mjs +3 -3
  19. package/es/components/display/TabsHeader.vue.mjs +4 -4
  20. package/es/components/form/FormItemNestForm.vue.mjs +2 -2
  21. package/es/components/form/FormItemNestFormList.vue.mjs +2 -2
  22. package/es/components/form/FormSubmitPanel.vue.mjs +1 -1
  23. package/es/components/form/FormVerifyImage.vue.mjs +1 -1
  24. package/es/components/table/TableToolbar.vue.mjs +3 -3
  25. package/es/hooks/{use-admin-theme-apply.mjs → use-theme-apply.mjs} +62 -62
  26. package/es/hooks/use-viewport-apply.mjs +39 -0
  27. package/es/index.mjs +88 -88
  28. package/es/inject/key.mjs +13 -13
  29. package/es/store/app.mjs +69 -62
  30. package/es/style.css +1 -1
  31. package/package.json +6 -8
  32. package/types/bridge/config-hook.d.ts +0 -68
  33. package/types/bridge/index.d.ts +18 -417
  34. package/types/bridge/layout.d.ts +25 -0
  35. package/types/bridge/plugin.d.ts +12 -30
  36. package/types/bridge/route.d.ts +1 -20
  37. package/types/bridge/state.d.ts +0 -14
  38. package/types/bridge/storage.d.ts +0 -9
  39. package/types/bridge/theme/index.d.ts +1 -8
  40. package/types/bridge/theme/persist.d.ts +3 -15
  41. package/types/bridge/theme/system-dark.d.ts +0 -12
  42. package/types/bridge/theme/types.d.ts +27 -265
  43. package/types/components/app-layout/AppAside.vue.d.ts +0 -1
  44. package/types/components/app-layout/AppCollapseToggle.vue.d.ts +11 -0
  45. package/types/components/app-layout/AppHeader.vue.d.ts +0 -3
  46. package/types/components/app-layout/AppLayout.vue.d.ts +0 -12
  47. package/types/components/app-layout/AppPage.vue.d.ts +0 -2
  48. package/types/components/app-layout/AppSidebar.vue.d.ts +0 -2
  49. package/types/components/app-layout/types.d.ts +2 -127
  50. package/types/components/app-layout/viewport.d.ts +2 -30
  51. package/types/components/data-view/DataListViewItem.vue.d.ts +0 -8
  52. package/types/components/data-view/index.d.ts +0 -4
  53. package/types/components/data-view/types.d.ts +0 -41
  54. package/types/components/data-view/utils.d.ts +0 -3
  55. package/types/components/display/TabsHeader.vue.d.ts +0 -2
  56. package/types/components/display/TabsMain.vue.d.ts +0 -2
  57. package/types/components/display/TabsRefineFlow.vue.d.ts +0 -1
  58. package/types/components/display/index.d.ts +1 -37
  59. package/types/components/display/types.d.ts +0 -131
  60. package/types/components/form/FormItemNestForm.vue.d.ts +0 -5
  61. package/types/components/form/FormItemNestFormList.vue.d.ts +0 -17
  62. package/types/components/form/FormVerifyCode.vue.d.ts +0 -9
  63. package/types/components/form/FormVerifyImage.vue.d.ts +0 -1
  64. package/types/components/form/form-search-utils.d.ts +0 -14
  65. package/types/components/form/nest-form-item-list.d.ts +0 -28
  66. package/types/components/form/nest-form-item.d.ts +0 -21
  67. package/types/components/form/nest-registry.d.ts +0 -14
  68. package/types/components/form/types.d.ts +8 -185
  69. package/types/components/form/use-form-submit.d.ts +0 -12
  70. package/types/components/form/use-nest-form-list.d.ts +0 -13
  71. package/types/components/form/use-nest-form.d.ts +0 -15
  72. package/types/components/form/use-nest-layout-scale.d.ts +0 -12
  73. package/types/components/form/utils.d.ts +1 -56
  74. package/types/components/list-page/ListPage.vue.d.ts +0 -6
  75. package/types/components/list-page/types.d.ts +2 -19
  76. package/types/components/misc/index.d.ts +1 -6
  77. package/types/components/misc/types.d.ts +0 -6
  78. package/types/components/modal/ConfirmModal.vue.d.ts +0 -10
  79. package/types/components/modal/modal-shelf-core.d.ts +0 -3
  80. package/types/components/modal/modal-shelf-hierarchy.d.ts +0 -4
  81. package/types/components/modal/modal-shelf-types.d.ts +0 -34
  82. package/types/components/modal/types.d.ts +1 -20
  83. package/types/components/panel/PanelItemNestForm.vue.d.ts +0 -6
  84. package/types/components/panel/PanelItemNestPanel.vue.d.ts +0 -5
  85. package/types/components/panel/nest-panel-form.d.ts +0 -21
  86. package/types/components/panel/nest-panel-item.d.ts +0 -14
  87. package/types/components/panel/types.d.ts +1 -49
  88. package/types/components/table/types.d.ts +9 -124
  89. package/types/config/list-model.d.ts +0 -29
  90. package/types/config/route.d.ts +0 -2
  91. package/types/helpers/form.d.ts +0 -5
  92. package/types/helpers/list-helper.d.ts +0 -26
  93. package/types/helpers/types.d.ts +0 -11
  94. package/types/hooks/activated.d.ts +0 -10
  95. package/types/hooks/feel-size.d.ts +0 -2
  96. package/types/hooks/index.d.ts +2 -2
  97. package/types/hooks/menus-dispatch.d.ts +0 -4
  98. package/types/hooks/timeout.d.ts +0 -4
  99. package/types/hooks/use-channel-viewport-height.d.ts +0 -14
  100. package/types/hooks/use-theme-apply.d.ts +11 -0
  101. package/types/hooks/use-viewport-apply.d.ts +8 -0
  102. package/types/inject/key.d.ts +2 -87
  103. package/types/router/guard/index.d.ts +0 -13
  104. package/types/router/guard/login.d.ts +0 -1
  105. package/types/router/guard/permission.d.ts +0 -1
  106. package/types/router/guard/types.d.ts +2 -5
  107. package/types/store/app.d.ts +10 -31
  108. package/types/store/router-permission.d.ts +2 -55
  109. package/types/store/user.d.ts +2 -26
  110. package/types/types/dot-path.d.ts +0 -8
  111. package/types/types/route.d.ts +0 -45
  112. package/types/types/utility-types.d.ts +0 -7
  113. package/types/utils/export.d.ts +1 -16
  114. package/types/utils/id.d.ts +0 -1
  115. package/types/utils/router.d.ts +0 -2
  116. package/types/utils/theme-scale.d.ts +0 -31
  117. package/types/utils/time.d.ts +0 -1
  118. package/docs/TECH_SNAPSHOT.md +0 -146
  119. package/docs/nested-config-paradigm.md +0 -80
  120. package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/RETROSPECTIVE.md +0 -63
  121. package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/design.md +0 -575
  122. package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/landing-authorizations/2026-05-09-080900-/346/234/2371-/345/205/245/345/256/236/346/226/275/346/216/210/346/235/203.md +0 -107
  123. package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/project-orchestration.md +0 -58
  124. package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/requirements.md +0 -238
  125. package/docs/specs/2026-05-09-055250-moderate-/345/210/227/350/241/250key/351/205/215/347/275/256/347/202/271/350/267/257/345/276/204/346/224/257/346/214/201/tasks.md +0 -290
  126. package/es/hooks/use-admin-viewport-apply.mjs +0 -39
  127. package/types/hooks/use-admin-theme-apply.d.ts +0 -34
  128. package/types/hooks/use-admin-viewport-apply.d.ts +0 -20
@@ -1,10 +1,9 @@
1
- import { defineComponent as k, useCssVars as A, inject as v, computed as e, ref as b, openBlock as f, createElementBlock as T, normalizeStyle as g, createVNode as a, unref as o, withCtx as i, renderSlot as h, createElementVNode as C, createBlock as H, createCommentVNode as L } from "vue";
2
- import w from "../menu/MenuTree.vue.mjs";
3
- import y from "../display/WatchSize.vue.mjs";
4
- import { ElTooltip as F, ElIcon as I } from "element-plus";
5
- import { ArrowRightBold as V } from "@element-plus/icons-vue";
6
- import { APP_LAYOUT_APP_STORE_KEY as Y, APP_LAYOUT_BRIDGE_KEY as N } from "../../inject/key.mjs";
7
- const O = { class: "app-sidebar-shim" }, D = /* @__PURE__ */ k({
1
+ import { defineComponent as P, useCssVars as A, inject as m, computed as e, ref as v, openBlock as B, createElementBlock as E, normalizeStyle as H, createVNode as l, unref as p, withCtx as b, renderSlot as g, createElementVNode as L } from "vue";
2
+ import $ from "../menu/MenuTree.vue.mjs";
3
+ import f from "../display/WatchSize.vue.mjs";
4
+ import w from "./AppCollapseToggle.vue.mjs";
5
+ import { APP_LAYOUT_APP_STORE_KEY as F, APP_LAYOUT_BRIDGE_KEY as k } from "../../inject/key.mjs";
6
+ const Y = { class: "app-sidebar-shim" }, N = /* @__PURE__ */ P({
8
7
  __name: "AppSidebar",
9
8
  props: {
10
9
  show: { type: Boolean },
@@ -12,80 +11,61 @@ const O = { class: "app-sidebar-shim" }, D = /* @__PURE__ */ k({
12
11
  menus: {},
13
12
  menuFlatList: {}
14
13
  },
15
- setup(s) {
16
- A((d) => ({
17
- v368510bd: E.value,
18
- v7b09fce5: _.value,
19
- v1098f49b: B.value,
20
- cc02eed6: l.value.bodyColor,
21
- v56d0884d: l.value.primaryColor
14
+ setup(t) {
15
+ A((o) => ({
16
+ v769c523e: _.value,
17
+ v2fe699b4: x.value,
18
+ v819fea8c: S.value
22
19
  }));
23
- const S = s, u = v(Y), c = e(() => u.sidebarStyle), p = b(0), m = b(0), x = e(() => parseFloat(String(c.value.paddingTop ?? "")) || 0), _ = e(
24
- () => `${Math.max(x.value, p.value)}px`
25
- ), B = e(() => `${m.value}px`), E = e(() => S.aboveHeader ? 2 : 0), r = e(() => u.sidebarIsCollapse), P = e(() => ({
26
- transform: `rotate(${r.value ? 0 : 180}deg)`
27
- })), $ = v(N), l = e(() => $.themeColors.value);
28
- return (d, t) => (f(), T("div", {
20
+ const h = t, s = m(F), u = e(() => s.sidebarStyle), c = v(0), d = v(0), C = e(() => parseFloat(String(u.value.paddingTop ?? "")) || 0), x = e(
21
+ () => `${Math.max(C.value, c.value)}px`
22
+ ), S = e(() => `${d.value}px`), _ = e(() => h.aboveHeader ? 2 : 0), r = e(() => s.sidebarIsCollapse), y = () => {
23
+ const o = !r.value;
24
+ s.changeSidebarCollapseStatus(o);
25
+ }, T = m(k), n = e(() => T.themeColors.value);
26
+ return (o, a) => (B(), E("div", {
29
27
  class: "app-sidebar",
30
- style: g(c.value)
28
+ style: H(u.value)
31
29
  }, [
32
- a(o(y), {
30
+ l(p(f), {
33
31
  class: "app-sidebar-top",
34
- onHeightChange: t[0] || (t[0] = (n) => p.value = n)
32
+ onHeightChange: a[0] || (a[0] = (i) => c.value = i)
35
33
  }, {
36
- default: i(() => [
37
- h(d.$slots, "top", {}, void 0, !0)
34
+ default: b(() => [
35
+ g(o.$slots, "top", {}, void 0, !0)
38
36
  ]),
39
37
  _: 3
40
38
  }),
41
- C("div", O, [
42
- a(o(w), {
39
+ L("div", Y, [
40
+ l(p($), {
43
41
  collapse: r.value,
44
- menus: s.menus,
42
+ menus: t.menus,
45
43
  style: { height: "100%" },
46
- "background-color": l.value.bodyColor,
47
- "text-color": l.value.baseColor,
48
- "active-text-color": l.value.primaryColor,
49
- menuFlatList: s.menuFlatList,
44
+ "background-color": n.value.bodyColor,
45
+ "text-color": n.value.baseColor,
46
+ "active-text-color": n.value.primaryColor,
47
+ menuFlatList: t.menuFlatList,
50
48
  routerMode: ""
51
49
  }, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
52
50
  ]),
53
- a(o(y), {
51
+ l(p(f), {
54
52
  class: "app-sidebar-bottom",
55
- onHeightChange: t[1] || (t[1] = (n) => m.value = n)
53
+ onHeightChange: a[1] || (a[1] = (i) => d.value = i)
56
54
  }, {
57
- default: i(() => [
58
- h(d.$slots, "bottom", {}, void 0, !0)
55
+ default: b(() => [
56
+ g(o.$slots, "bottom", {}, void 0, !0)
59
57
  ]),
60
58
  _: 3
61
59
  }),
62
- s.show ? (f(), H(o(F), {
63
- key: 0,
64
- content: r.value ? "展开" : "收起",
65
- placement: "right",
66
- "show-after": 200
67
- }, {
68
- default: i(() => [
69
- C("div", {
70
- class: "app-sidebar-toggle",
71
- onClick: t[2] || (t[2] = (n) => o(u).changeSidebarCollapseStatus(!r.value))
72
- }, [
73
- a(o(I), null, {
74
- default: i(() => [
75
- a(o(V), {
76
- class: "app-sidebar-toggle-icon",
77
- style: g(P.value)
78
- }, null, 8, ["style"])
79
- ]),
80
- _: 1
81
- })
82
- ])
83
- ]),
84
- _: 1
85
- }, 8, ["content"])) : L("", !0)
60
+ l(w, {
61
+ side: "sidebar",
62
+ show: t.show,
63
+ collapse: r.value,
64
+ onToggle: y
65
+ }, null, 8, ["show", "collapse"])
86
66
  ], 4));
87
67
  }
88
68
  });
89
69
  export {
90
- D as default
70
+ N as default
91
71
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AppTheme.vue2.mjs";
2
2
  /* empty css */
3
- import e from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e4f0fe3b"]]);
3
+ import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const a = /* @__PURE__ */ p(o, [["__scopeId", "data-v-06ca4822"]]);
5
5
  export {
6
- m as default
6
+ a as default
7
7
  };
@@ -1,5 +1,5 @@
1
- const E = 800, _ = 1e4;
1
+ const E = 800, O = 1e4;
2
2
  export {
3
- _ as ADMIN_CORE_VIEWPORT_DECOR_ZINDEX_ABOVE,
4
- E as ADMIN_CORE_VIEWPORT_DECOR_ZINDEX_BELOW
3
+ O as CORE_VIEWPORT_DECOR_ZINDEX_ABOVE,
4
+ E as CORE_VIEWPORT_DECOR_ZINDEX_BELOW
5
5
  };
@@ -1,7 +1,7 @@
1
- import a from "./TabsHeader.vue2.mjs";
1
+ import o from "./TabsHeader.vue2.mjs";
2
2
  /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const e = /* @__PURE__ */ o(a, [["__scopeId", "data-v-3faa57f5"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6b4fc73b"]]);
5
5
  export {
6
- e as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormItemNestForm.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-12b77b02"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a413a382"]]);
5
5
  export {
6
- p as default
6
+ e as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormItemNestFormList.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9fa02cbe"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-68118cbf"]]);
5
5
  export {
6
- s as default
6
+ e as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormSubmitPanel.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93bc9096"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1505775a"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormVerifyImage.vue2.mjs";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-669b7ad9"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7a70397e"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableToolbar.vue2.mjs";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6f2937e1"]]);
3
+ import a from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0175f1a9"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { watch as s } from "vue";
2
2
  import { themeScaleDerive as C, themeScaleParseHex as S, themeScaleMix as $, themeScaleToRgba as _ } from "../utils/theme-scale.mjs";
3
- const u = "admin-core-theme", y = [
3
+ const m = "dc-core-theme", y = [
4
4
  ["primaryColor", { scale: !0, el: "--el-color-primary" }],
5
5
  ["successColor", { scale: !0, el: "--el-color-success" }],
6
6
  ["warningColor", { scale: !0, el: "--el-color-warning" }],
@@ -27,23 +27,23 @@ const u = "admin-core-theme", y = [
27
27
  "dark-2"
28
28
  ], L = (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase(), g = (r, t) => {
29
29
  const e = [];
30
- for (const [l, a] of y) {
31
- const o = r[l];
30
+ for (const [c, n] of y) {
31
+ const o = r[c];
32
32
  if (o === void 0 || o === "") continue;
33
- const n = `--admin-core-${L(l)}`, i = a.el === void 0 ? [] : Array.isArray(a.el) ? a.el : [a.el];
34
- if (a.scale) {
33
+ const l = `--dc-core-${L(c)}`, a = n.el === void 0 ? [] : Array.isArray(n.el) ? n.el : [n.el];
34
+ if (n.scale) {
35
35
  const d = C(o, t);
36
- e.push(`${n}: ${o};`);
37
- for (const c of p)
38
- e.push(`${n}-${c}: ${d[c]};`);
39
- for (const c of i) {
40
- e.push(`${c}: ${o};`);
41
- for (const m of p)
42
- e.push(`${c}-${m}: ${d[m]};`);
36
+ e.push(`${l}: ${o};`);
37
+ for (const i of p)
38
+ e.push(`${l}-${i}: ${d[i]};`);
39
+ for (const i of a) {
40
+ e.push(`${i}: ${o};`);
41
+ for (const u of p)
42
+ e.push(`${i}-${u}: ${d[u]};`);
43
43
  }
44
44
  } else {
45
- e.push(`${n}: ${o};`);
46
- for (const d of i) e.push(`${d}: ${o};`);
45
+ e.push(`${l}: ${o};`);
46
+ for (const d of a) e.push(`${d}: ${o};`);
47
47
  }
48
48
  }
49
49
  return e.join(`
@@ -55,7 +55,7 @@ const u = "admin-core-theme", y = [
55
55
  if (!r) return "";
56
56
  const e = S(r);
57
57
  if (!e) return "";
58
- const l = Math.max(...e), a = l === 0 ? 0 : Math.min(A, T / l), o = $(r, "#000000", a);
58
+ const c = Math.max(...e), n = c === 0 ? 0 : Math.min(A, T / c), o = $(r, "#000000", n);
59
59
  return `--el-overlay-color-lighter: ${_(
60
60
  o,
61
61
  v[t]
@@ -64,51 +64,51 @@ const u = "admin-core-theme", y = [
64
64
  if (!r) return "";
65
65
  const e = _(r, I[t]);
66
66
  return e === r ? "" : `--el-mask-color: ${e};`;
67
- }, P = 0.88, k = (r, t) => !r || !S(r) ? "" : `--admin-core-dialog-surface: ${$(r, "#ffffff", P)};`, D = (r) => {
68
- const t = r.light, e = r.dark, l = g(t, "light"), a = g(e, "dark"), n = [
69
- l,
70
- "color: var(--admin-core-base-color);",
67
+ }, P = 0.88, k = (r, t) => !r || !S(r) ? "" : `--dc-core-dialog-surface: ${$(r, "#ffffff", P)};`, D = (r) => {
68
+ const t = r.light, e = r.dark, c = g(t, "light"), n = g(e, "dark"), l = [
69
+ c,
70
+ "color: var(--dc-core-base-color);",
71
71
  f(t.bodyColor, "light"),
72
72
  h(t.bodyColor, "light")
73
- ].filter(Boolean), i = [
74
- a,
73
+ ].filter(Boolean), a = [
74
+ n,
75
75
  f(e.bodyColor, "dark"),
76
76
  h(e.bodyColor, "dark"),
77
77
  k(e.bodyColor)
78
78
  ].filter(Boolean);
79
79
  return `:root {
80
- ${n.join(
80
+ ${l.join(
81
81
  `
82
82
  `
83
83
  )}
84
84
  }
85
85
  :root.dark {
86
- ${i.join(`
86
+ ${a.join(`
87
87
  `)}
88
88
  }
89
89
  `;
90
- }, E = "admin-core-rhythm", b = "admin-core-ep-bridge", x = "admin-core-ep-structural", B = [
90
+ }, E = "dc-core-rhythm", b = "dc-core-ep-bridge", x = "dc-core-ep-structural", B = [
91
91
  ".el-dialog,",
92
92
  ".el-message-box {",
93
- // elevation:暗色下用提亮过的面板底(--admin-core-dialog-surface,仅 :root.dark 派生),
93
+ // elevation:暗色下用提亮过的面板底(--dc-core-dialog-surface,仅 :root.dark 派生),
94
94
  // 让整块面板亮于页面底而浮起;缺省(亮色 / 非 hex)退 --el-bg-color,亮色零改动。
95
- " background-color: var(--admin-core-dialog-surface, var(--el-bg-color));",
96
- " border: 1px solid var(--admin-core-border-color, var(--el-border-color));",
95
+ " background-color: var(--dc-core-dialog-surface, var(--el-bg-color));",
96
+ " border: 1px solid var(--dc-core-border-color, var(--el-border-color));",
97
97
  "}"
98
98
  ].join(`
99
99
  `), R = [
100
100
  // T1 必纳:表格行密度(垂直经 td padding,水平经 .cell padding)
101
101
  ".el-table .el-table__cell {",
102
- " padding-top: var(--admin-core-cell-padding-y, 8px);",
103
- " padding-bottom: var(--admin-core-cell-padding-y, 8px);",
102
+ " padding-top: var(--dc-core-cell-padding-y, 8px);",
103
+ " padding-bottom: var(--dc-core-cell-padding-y, 8px);",
104
104
  "}",
105
105
  ".el-table .cell {",
106
- " padding-left: var(--admin-core-cell-padding-x, 12px);",
107
- " padding-right: var(--admin-core-cell-padding-x, 12px);",
106
+ " padding-left: var(--dc-core-cell-padding-x, 12px);",
107
+ " padding-right: var(--dc-core-cell-padding-x, 12px);",
108
108
  "}",
109
109
  // T1 必纳:表单项间距
110
110
  ".el-form-item {",
111
- " margin-bottom: var(--admin-core-form-item-gap, 18px);",
111
+ " margin-bottom: var(--dc-core-form-item-gap, 18px);",
112
112
  "}"
113
113
  // 注:dialog/card 内距撤到期二——其 EP 原生值(dialog 16 / card 20)与单一
114
114
  // content-gap 无法同时对齐,本期纳入会破"默认档零漂移";期二用专属 var 补。
@@ -166,32 +166,32 @@ const u = "admin-core-theme", y = [
166
166
  }
167
167
  };
168
168
  function Y(r, t) {
169
- const e = w[r], l = H[t], a = [
170
- `--admin-core-space-unit: ${e.spaceUnit};`,
171
- `--admin-core-content-gap: ${e.gap};`,
172
- `--admin-core-control-height: ${e.controlHeight};`,
169
+ const e = w[r], c = H[t], n = [
170
+ `--dc-core-space-unit: ${e.spaceUnit};`,
171
+ `--dc-core-content-gap: ${e.gap};`,
172
+ `--dc-core-control-height: ${e.controlHeight};`,
173
173
  `--el-component-size: ${e.controlHeight};`,
174
- `--admin-core-cell-padding-y: ${e.cellPaddingY};`,
175
- `--admin-core-cell-padding-x: ${e.cellPaddingX};`,
176
- `--admin-core-form-item-gap: ${e.formItemGap};`,
177
- `--admin-core-font-size-base: ${e.fontSizeBase};`,
174
+ `--dc-core-cell-padding-y: ${e.cellPaddingY};`,
175
+ `--dc-core-cell-padding-x: ${e.cellPaddingX};`,
176
+ `--dc-core-form-item-gap: ${e.formItemGap};`,
177
+ `--dc-core-font-size-base: ${e.fontSizeBase};`,
178
178
  `--el-font-size-base: ${e.fontSizeBase};`,
179
- `--admin-core-font-scale: ${e.fontScale};`,
180
- `--admin-core-motion-duration: ${l.duration};`,
181
- `--el-transition-duration-fast: ${l.duration};`,
182
- `--admin-core-motion-duration-slow: ${l.durationSlow};`,
183
- `--el-transition-duration: ${l.durationSlow};`,
184
- // easing 仅挂 admin-core,[MUST NOT] dual-write 覆盖 EP 两条 bezier——
179
+ `--dc-core-font-scale: ${e.fontScale};`,
180
+ `--dc-core-motion-duration: ${c.duration};`,
181
+ `--el-transition-duration-fast: ${c.duration};`,
182
+ `--dc-core-motion-duration-slow: ${c.durationSlow};`,
183
+ `--el-transition-duration: ${c.durationSlow};`,
184
+ // easing 仅挂 dc-core,[MUST NOT] dual-write 覆盖 EP 两条 bezier——
185
185
  // EP ease-in-out / fast 曲线各异,覆盖会让默认档动画曲线漂移;motion 档对 EP 只经 duration 生效。
186
- `--admin-core-motion-easing: ${l.easing};`
186
+ `--dc-core-motion-easing: ${c.easing};`
187
187
  ], o = [
188
- "--admin-core-motion-duration: 0.01ms;",
189
- "--admin-core-motion-duration-slow: 0.01ms;",
188
+ "--dc-core-motion-duration: 0.01ms;",
189
+ "--dc-core-motion-duration-slow: 0.01ms;",
190
190
  "--el-transition-duration: 0.01ms;",
191
191
  "--el-transition-duration-fast: 0.01ms;"
192
192
  ];
193
193
  return `:root {
194
- ${a.join(`
194
+ ${n.join(`
195
195
  `)}
196
196
  }
197
197
  @media (prefers-reduced-motion: reduce) {
@@ -208,8 +208,8 @@ function U(r) {
208
208
  const t = r.document ?? (typeof document < "u" ? document : void 0);
209
209
  if (!t) return;
210
210
  const e = () => {
211
- let o = t.getElementById(u);
212
- return o || (o = t.createElement("style"), o.id = u, t.head.appendChild(o)), o;
211
+ let o = t.getElementById(m);
212
+ return o || (o = t.createElement("style"), o.id = m, t.head.appendChild(o)), o;
213
213
  };
214
214
  if (!t.getElementById(x)) {
215
215
  const o = t.createElement("style");
@@ -228,22 +228,22 @@ function U(r) {
228
228
  },
229
229
  { immediate: !0 }
230
230
  );
231
- const { getThemeDensity: l, getThemeMotion: a } = r;
232
- if (l && a) {
231
+ const { getThemeDensity: c, getThemeMotion: n } = r;
232
+ if (c && n) {
233
233
  if (!t.getElementById(b)) {
234
- const n = t.createElement("style");
235
- n.id = b, n.textContent = R, t.head.appendChild(n);
234
+ const l = t.createElement("style");
235
+ l.id = b, l.textContent = R, t.head.appendChild(l);
236
236
  }
237
237
  const o = () => {
238
- let n = t.getElementById(
238
+ let l = t.getElementById(
239
239
  E
240
240
  );
241
- return n || (n = t.createElement("style"), n.id = E, t.head.appendChild(n)), n;
241
+ return l || (l = t.createElement("style"), l.id = E, t.head.appendChild(l)), l;
242
242
  };
243
243
  s(
244
- () => [l(), a()],
245
- ([n, i]) => {
246
- o().textContent = Y(n, i);
244
+ () => [c(), n()],
245
+ ([l, a]) => {
246
+ o().textContent = Y(l, a);
247
247
  },
248
248
  { immediate: !0 }
249
249
  );
@@ -251,5 +251,5 @@ function U(r) {
251
251
  }
252
252
  export {
253
253
  Y as buildRhythmCss,
254
- U as useAdminThemeApply
254
+ U as useThemeApply
255
255
  };
@@ -0,0 +1,39 @@
1
+ import { watch as i } from "vue";
2
+ const r = "dc-core-viewport", c = (e, d) => {
3
+ const p = e.paddingLeft + e.paddingRight, t = e.paddingTop + e.paddingBottom;
4
+ return `:root {
5
+ --dc-core-viewport-width: calc(100vw - ${p}px);
6
+ --dc-core-viewport-height: calc(100vh - ${t}px);
7
+ --dc-core-viewport-padding-top: ${e.paddingTop}px;
8
+ --dc-core-viewport-padding-right: ${e.paddingRight}px;
9
+ --dc-core-viewport-padding-bottom: ${e.paddingBottom}px;
10
+ --dc-core-viewport-padding-left: ${e.paddingLeft}px;
11
+ ` + // gap 内缝 var:仅当提供 getGapConfig 时注入(纯对外暴露,core 不读)。
12
+ (d ? ` --dc-core-gap: ${d.size}px;
13
+ ` : "") + `}
14
+ `;
15
+ };
16
+ function a(e) {
17
+ const d = e.document ?? (typeof document < "u" ? document : void 0);
18
+ if (!d) return;
19
+ const p = () => {
20
+ let t = d.getElementById(r);
21
+ return t || (t = d.createElement("style"), t.id = r, d.head.appendChild(t)), t;
22
+ };
23
+ i(
24
+ () => {
25
+ var t;
26
+ return {
27
+ viewport: e.getViewportConfig(),
28
+ gap: (t = e.getGapConfig) == null ? void 0 : t.call(e)
29
+ };
30
+ },
31
+ ({ viewport: t, gap: o }) => {
32
+ p().textContent = c(t, o);
33
+ },
34
+ { deep: !0, immediate: !0 }
35
+ );
36
+ }
37
+ export {
38
+ a as useViewportApply
39
+ };