@alexpeng/dsh-custom-plugin 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +175 -0
- package/NOTICE +17 -0
- package/README.i18n.yaml +2 -2
- package/README.md +10 -10
- package/README.zh.md +9 -9
- package/lib/client.js +3671 -893
- package/lib/client.js.map +1 -1
- package/lib/index.js +12 -4
- package/lib/types/client/bg-columns.d.ts +46 -0
- package/lib/types/client/bg-layer.d.ts +49 -0
- package/lib/types/client/bg-scene.d.ts +67 -14
- package/lib/types/client/bg-shader.d.ts +13 -12
- package/lib/types/client/glass/ambient.d.ts +18 -0
- package/lib/types/client/glass/glass-engine.d.ts +58 -0
- package/lib/types/client/glass/glass-tokens.d.ts +111 -0
- package/lib/types/client/glass/host-surfaces.d.ts +96 -0
- package/lib/types/client/glass/liquid-filter.d.ts +90 -0
- package/lib/types/client/palette.d.ts +13 -9
- package/lib/types/client/styles.d.ts +1 -1
- package/lib/types/client/ui/overlays.d.ts +13 -0
- package/lib/types/protocol.d.ts +9 -6
- package/package.json +2 -1
- package/lib/types/client/bg-focus.d.ts +0 -80
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-surface liquid-glass displacement filter.
|
|
3
|
+
*
|
|
4
|
+
* Apple's Liquid Glass reads as glass because the *edge* of the surface bends
|
|
5
|
+
* the content behind it (lensing) while the middle stays clean, with a faint
|
|
6
|
+
* specular rim and a thicker material on larger surfaces. This
|
|
7
|
+
* module builds exactly that as one SVG filter per surface geometry:
|
|
8
|
+
*
|
|
9
|
+
* - the displacement map is generated from the rounded-rect signed distance
|
|
10
|
+
* field — neutral grey in the flat middle, the outward normal in the bevel
|
|
11
|
+
* band, alpha 255 because Chromium premultiplies transparent PNGs to zeros
|
|
12
|
+
* (the approach of shuding/liquid-glass, MIT);
|
|
13
|
+
* - a single `feDisplacementMap` pass bends the backdrop. The filter stays
|
|
14
|
+
* **achromatic** on purpose: an earlier version displaced R/G/B at slightly
|
|
15
|
+
* different scales (the rdev/liquid-glass-react dispersion), which read as a
|
|
16
|
+
* coloured fringe on card and window edges — the reported "边缘异常泛色" —
|
|
17
|
+
* instead of glass;
|
|
18
|
+
* - `filterUnits="userSpaceOnUse"` in CSS pixels, so the bevel is a constant
|
|
19
|
+
* thickness in px instead of a percentage of the box. A shared
|
|
20
|
+
* `objectBoundingBox` filter cannot do that: a 6% bevel is 23px on a 380px
|
|
21
|
+
* card and 59px on a 980px sheet, and it stretches anisotropically on a
|
|
22
|
+
* sidebar.
|
|
23
|
+
*
|
|
24
|
+
* The filter is referenced from `backdrop-filter`, which only Chromium supports
|
|
25
|
+
* for `url()`; every caller keeps a plain blur fallback for the rest.
|
|
26
|
+
* @module @alexpeng/dsh-custom-plugin/client/glass/liquid-filter
|
|
27
|
+
*/
|
|
28
|
+
/** Resolved geometry of one liquid surface, in CSS px. */
|
|
29
|
+
export interface LiquidGeometry {
|
|
30
|
+
readonly width: number;
|
|
31
|
+
readonly height: number;
|
|
32
|
+
readonly radius: number;
|
|
33
|
+
/** Edge band that carries the lens, px. */
|
|
34
|
+
readonly bevel: number;
|
|
35
|
+
/** `feDisplacementMap` scale; the map's amplitude is 0.25 of the range. */
|
|
36
|
+
readonly scale: number;
|
|
37
|
+
/** Softening blur applied to the displaced result, px. */
|
|
38
|
+
readonly blur: number;
|
|
39
|
+
}
|
|
40
|
+
/** Map pixel budget. The map is smooth, so a large surface may be sampled at a
|
|
41
|
+
* lower resolution without changing the lens; the budget keeps a 1000x800
|
|
42
|
+
* sheet from spending 800k SDF evaluations on every resize. */
|
|
43
|
+
export declare const LIQUID_MAP_MAX_PIXELS = 240000;
|
|
44
|
+
/** Hard floor/ceiling for the edge band, px. */
|
|
45
|
+
export declare const LIQUID_BEVEL_MIN = 8;
|
|
46
|
+
export declare const LIQUID_BEVEL_MAX = 26;
|
|
47
|
+
/**
|
|
48
|
+
* Size-adaptive geometry: a larger surface is a thicker material with a
|
|
49
|
+
* stronger lens, which is what Apple's material does ("larger elements get
|
|
50
|
+
* thicker material, deeper shadows, stronger refraction"). The steps are
|
|
51
|
+
* deliberately gentle so a 380px card and a 900px sheet still read as the same
|
|
52
|
+
* glass.
|
|
53
|
+
*/
|
|
54
|
+
export declare function liquidGeometry(width: number, height: number, radius: number): LiquidGeometry;
|
|
55
|
+
/** Deterministic filter id: equal geometry reuses the same `<filter>`. */
|
|
56
|
+
export declare function liquidFilterId(g: LiquidGeometry): string;
|
|
57
|
+
/** The 2D-canvas surface this module needs; injected so tests need no DOM. */
|
|
58
|
+
export interface LiquidCanvasLike {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
getContext(id: '2d'): LiquidContextLike | null;
|
|
62
|
+
toDataURL(type: string): string;
|
|
63
|
+
}
|
|
64
|
+
export interface LiquidContextLike {
|
|
65
|
+
createImageData(width: number, height: number): {
|
|
66
|
+
data: Uint8ClampedArray;
|
|
67
|
+
};
|
|
68
|
+
putImageData(image: {
|
|
69
|
+
data: Uint8ClampedArray;
|
|
70
|
+
}, x: number, y: number): void;
|
|
71
|
+
}
|
|
72
|
+
/** Resolution of the map for a geometry: 1 unless the pixel budget bites. */
|
|
73
|
+
export declare function liquidMapSize(g: LiquidGeometry): {
|
|
74
|
+
width: number;
|
|
75
|
+
height: number;
|
|
76
|
+
scale: number;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Build the displacement map as a PNG data URL. R carries the x normal, G the y
|
|
80
|
+
* normal, both offset around 128 so the flat middle displaces by exactly zero;
|
|
81
|
+
* alpha stays 255 for the premultiplication reason above.
|
|
82
|
+
*/
|
|
83
|
+
export declare function buildLiquidMap(g: LiquidGeometry, canvas: LiquidCanvasLike): string | null;
|
|
84
|
+
/**
|
|
85
|
+
* Filter markup for one geometry: one displacement pass bends the backdrop,
|
|
86
|
+
* a sub-pixel blur softens the sampling, and only that result is output —
|
|
87
|
+
* never the map itself. The pass is achromatic: the three-pass RGB split it
|
|
88
|
+
* replaced showed a coloured fringe on card and window edges.
|
|
89
|
+
*/
|
|
90
|
+
export declare function buildLiquidFilterMarkup(id: string, g: LiquidGeometry, mapHref: string): string;
|
|
@@ -118,19 +118,23 @@ export declare const BACKDROP_ALPHA_LAYER1 = 0.27;
|
|
|
118
118
|
/** `--dsw-specific-sidebar-fill` — the sidebar column (tab colour, a notch
|
|
119
119
|
* denser than the base). */
|
|
120
120
|
export declare const BACKDROP_ALPHA_SIDEBAR = 0.27;
|
|
121
|
+
/**
|
|
122
|
+
* Material the surfaces use while glass is on. `'off'` is the plain opaque
|
|
123
|
+
* shell. Declared here (not in the glass module) so the token-key helper can
|
|
124
|
+
* name it without an import cycle.
|
|
125
|
+
*/
|
|
126
|
+
export type GlassMode = 'off' | 'frost' | 'liquid';
|
|
121
127
|
/**
|
|
122
128
|
* Identity of the theme-token override an appearance repaint would install.
|
|
123
129
|
*
|
|
124
130
|
* Re-registering the very same variables through the theme service is a costly
|
|
125
131
|
* no-op: it re-applies tokens for the whole shell even when the palette and the
|
|
126
|
-
* glass
|
|
127
|
-
* compares this key and skips the registration when it has not changed.
|
|
132
|
+
* glass material did not move (which is what every slider tick does). The
|
|
133
|
+
* painter compares this key and skips the registration when it has not changed.
|
|
128
134
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* renderer
|
|
132
|
-
*
|
|
133
|
-
* mounted renderer replaces them with the backdrop alphas, so all three
|
|
134
|
-
* dimensions are part of the key).
|
|
135
|
+
* All three dimensions are part of the key: the palette family decides the RGB,
|
|
136
|
+
* the material decides the alpha form (and which tokens are overridden at all),
|
|
137
|
+
* and a mounted renderer replaces the three content tokens with the calibrated
|
|
138
|
+
* backdrop alphas.
|
|
135
139
|
*/
|
|
136
|
-
export declare function appearanceTokenKey(bg: string | undefined,
|
|
140
|
+
export declare function appearanceTokenKey(bg: string | undefined, mode: GlassMode, backdrop?: boolean): string;
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* be CSS-Module scoped.
|
|
10
10
|
* @module @alexpeng/dsh-custom-plugin/client/styles
|
|
11
11
|
*/
|
|
12
|
-
export declare const STATIC_CSS = "/* dsh-custom-plugin static styles: host-token design system. */\n/* Motion tokens live on the document root, not on .vx-root: the settings page\n and the dialogs/toasts it owns render outside our overlay layer, and an\n undefined custom property invalidates the whole animation shorthand there. */\n:root {\n --vx-ease: var(--ds-ease-in-out, cubic-bezier(.4, 0, .2, 1));\n --vx-ease-out: cubic-bezier(.16, 1, .3, 1);\n --vx-ease-in: cubic-bezier(.4, 0, 1, 1);\n --vx-dur-open: var(--ds-transition-duration, .2s);\n --vx-dur-pop: .18s;\n --vx-dur-close: .15s;\n --vx-dur-dialog: .22s;\n}\n.vx-root {\n position: fixed;\n inset: 0;\n pointer-events: none;\n z-index: 2147483000;\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif);\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n -webkit-font-smoothing: antialiased;\n}\n\n@keyframes vx-pop-in {\n from { opacity: 0; transform: translateY(var(--vx-pop-shift, 6px)) scale(.97); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-pop-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(calc(var(--vx-pop-shift, 6px) * .45)) scale(.985); }\n}\n@keyframes vx-pop-in-liquid {\n from { opacity: 0; transform: translateY(var(--vx-pop-shift, 6px)); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-pop-out-liquid {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(calc(var(--vx-pop-shift, 6px) * .45)); }\n}\n@keyframes vx-fade-in { from { opacity: 0; } to { opacity: 1; } }\n@keyframes vx-fade-out { from { opacity: 1; } to { opacity: 0; } }\n@keyframes vx-dialog-in {\n from { opacity: 0; transform: translateY(10px) scale(.975); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-dialog-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(4px) scale(.985); }\n}\n@keyframes vx-toast-in {\n from { opacity: 0; transform: translateY(10px) scale(.97); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-toast-out {\n from { opacity: 1; transform: none; }\n to { opacity: 0; transform: translateY(6px) scale(.98); }\n}\n@keyframes vx-section-in {\n from { opacity: 0; transform: translateY(6px); }\n to { opacity: 1; transform: none; }\n}\n@keyframes vx-rotate { to { transform: rotate(360deg); } }\n\n/* Page background layer. Appended to <body>, never inside .vx-root: the\n overlay slot is nested in the shell's z-index:20 layer, where a negative\n z-index would still sit above the content it must stay behind. */\n.vx-bg {\n position: fixed;\n inset: 0;\n pointer-events: none;\n background: transparent;\n z-index: -1;\n}\n.vx-bg > canvas {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: block;\n}\n.vx-fx {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.vx-anchor {\n display: inline-block;\n width: 0;\n height: 1px;\n vertical-align: bottom;\n}\n.vx-turn-actions {\n display: inline-flex;\n gap: 4px;\n margin-left: 10px;\n vertical-align: middle;\n align-items: center;\n}\n\n/* ---------- material system ---------- */\n/* Frost: an evenly diffused milk pane. It is deliberately opaque \u2014 no clear\n body and no edge lensing \u2014 so it can never be mistaken for liquid glass. */\n.vx-glass,\n.vx-popover {\n background: linear-gradient(180deg, rgba(250, 251, 253, .9), rgba(244, 246, 250, .84));\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 16px 40px rgba(15, 23, 42, .1);\n border-radius: var(--dsw-radius-lg, 16px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n:root.vx-dark .vx-glass,\n:root.vx-dark .vx-popover {\n background: linear-gradient(180deg, rgba(31, 33, 39, .92), rgba(24, 26, 31, .86));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 16px 40px rgba(0, 0, 0, .36);\n}\n:root.vx-glass-off .vx-glass,\n:root.vx-glass-off .vx-popover {\n background: var(--dsw-alias-bg-layer-3, #fff);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n}\n/* Liquid: Apple-style clear glass. The body is colourless and clearly lighter\n than frost (82% -> 74% light, 70% -> 62% dark), so the app behind the floating\n window still reads through it. That window is its own compositor surface, so a\n real backdrop refraction is unavailable; the lens is carried by edge optics\n instead: a bright 1px specular rim, a soft top bevel, a darker bottom inner\n shade and a faint cyan/magenta dispersion in the rim. */\n.vx-liquid .vx-glass,\n.vx-liquid .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(249, 251, 254, .86) 0%, rgba(242, 246, 250, .78) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(2px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(2px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .95),\n inset 0 8px 14px -12px rgba(255, 255, 255, .9),\n inset 0 -10px 18px -14px rgba(22, 32, 52, .24),\n inset 0 0 0 1px rgba(255, 255, 255, .4),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 24px 56px rgba(15, 25, 45, .18);\n}\n:root.vx-dark .vx-liquid .vx-glass,\n:root.vx-dark .vx-liquid .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(28, 30, 36, .7) 0%, rgba(20, 22, 27, .62) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .28),\n inset 0 8px 14px -12px rgba(255, 255, 255, .16),\n inset 0 -10px 18px -14px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .12),\n 0 0 0 .5px rgba(0, 0, 0, .4),\n 0 24px 56px rgba(0, 0, 0, .45);\n}\n/* The 1px rim carries most of the glass read in the floating window: a bright\n specular arc plus a barely-there dispersion fringe. */\n.vx-liquid .vx-popover::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .7) 0%,\n rgba(255, 255, 255, .92) 14%,\n rgba(255, 255, 255, .16) 34%,\n rgba(255, 255, 255, .55) 50%,\n rgba(255, 255, 255, .1) 68%,\n rgba(210, 255, 245, .3) 84%,\n rgba(255, 190, 235, .55) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark .vx-liquid .vx-popover::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .3) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .22) 100%);\n}\n/* A live background needs no special material: the clear body already transmits\n it. Only a two-point fill reduction keeps the texture from competing with the\n copy, and the edge optics stay untouched in every background mode. */\n:root.vx-bg-live:not(.vx-glass-off) .vx-glass,\n:root.vx-bg-live:not(.vx-glass-off) .vx-popover {\n background: linear-gradient(180deg, rgba(250, 251, 253, .88), rgba(244, 246, 250, .82));\n -webkit-backdrop-filter: blur(24px) saturate(1.3);\n backdrop-filter: blur(24px) saturate(1.3);\n}\n:root.vx-bg-live.vx-liquid:not(.vx-glass-off) .vx-glass,\n:root.vx-bg-live.vx-liquid:not(.vx-glass-off) .vx-popover {\n background:\n radial-gradient(130% 90% at 12% -14%, rgba(255, 255, 255, .46), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(249, 251, 254, .84) 0%, rgba(242, 246, 250, .76) 100%);\n}\n@supports not (backdrop-filter: url(#vx-lg)) {\n .vx-liquid .vx-glass,\n .vx-liquid .vx-popover {\n background: rgba(251, 252, 255, .62);\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .9),\n 0 0 0 .5px rgba(0, 0, 0, .12),\n 0 18px 44px rgba(15, 25, 45, .16);\n }\n}\n@media (prefers-reduced-transparency: reduce) {\n .vx-liquid .vx-glass,\n .vx-liquid .vx-popover {\n background: var(--dsw-alias-bg-layer-3, #fff);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n }\n}\n\n/* ---------- chips, header and rail buttons ---------- */\n.vx-chip {\n pointer-events: auto;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-secondary, #61666b);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 2px 8px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n line-height: var(--dsw-font-xxxs-11-line-height, 14px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 3px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-chip:hover {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-link { text-decoration: none; }\n.vx-header-btn,\n.vx-foot-btn,\n.vx-balance-text {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n min-height: 28px;\n border-radius: var(--dsw-radius-sm, 8px);\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n color: var(--dsw-alias-label-secondary, #61666b);\n background: transparent;\n border: 1px solid transparent;\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-header-btn:hover,\n.vx-foot-btn:hover,\n.vx-balance-text:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n/* The session header row places the native agent-preset chip and our injected\n * buttons in one 10px-gap flex row. The chip right-insets its label by 2px\n * (padding: 0 2px 0 0), so the 10px padding above left a wider gap between\n * our two buttons than between the chip and the first of them. Match the\n * native inset so both gaps read as one rhythm. */\n.vx-header-btn { padding: 3px 2px; }\n.vx-header-btn[aria-expanded='true'],\n.vx-balance-text.vx-balance-open {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-balance-wrap { display: inline-flex; align-items: center; position: relative; }\n.vx-balance-today {\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n}\n.vx-balance-lines { font-size: var(--dsw-font-xs-13-font-size, 13px); margin: 6px 0; }\n\n/* ---------- buttons ---------- */\n.vx-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n min-height: 30px;\n padding: 0 12px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 1px solid transparent;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: 18px;\n cursor: pointer;\n white-space: nowrap;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease), border-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-button:disabled { opacity: .5; cursor: default; }\n.vx-button-sm { min-height: 26px; padding: 0 9px; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-button-block { width: 100%; }\n.vx-button-primary {\n background: var(--dsw-alias-button-primary-fill, #1b1b1c);\n color: var(--dsw-alias-label-primary-foreground, #fff);\n}\n.vx-button-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover, #2c2c2e); }\n.vx-button-secondary {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n border-color: var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-button-secondary:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n}\n.vx-button-ghost {\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n}\n.vx-button-ghost:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-button-danger {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 45%, transparent);\n color: var(--dsw-alias-state-error-primary, #ec1313);\n}\n.vx-button-danger:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 20%, transparent);\n}\n.vx-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-icon-button:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); color: var(--dsw-alias-label-primary, #1b1b1c); }\n.vx-icon-button-sm { width: 24px; height: 24px; font-size: 14px; }\n\n/* Legacy text buttons kept for surfaces not yet migrated. */\n.vx-btn {\n pointer-events: auto;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 5px 11px;\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-btn:hover { background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1)); }\n.vx-btn.on,\n.vx-btn[aria-pressed='true'] {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n border-color: var(--dsw-alias-border-l3, rgba(0, 0, 0, .12));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-btn:disabled { opacity: .5; cursor: default; }\n.vx-btn-sm { padding: 2px 8px; font-size: var(--dsw-font-xxxs-11-font-size, 11px); }\n.vx-btn-danger {\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 45%, transparent);\n color: var(--dsw-alias-state-error-primary, #ec1313);\n}\n.vx-btn.big { padding: 9px 15px; font-size: var(--dsw-font-xs-13-font-size, 13px); }\n\n/* ---------- inputs, fields, switches, segmented controls ---------- */\n.vx-input {\n flex: 1;\n min-width: 0;\n min-height: 30px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-specific-input-major, var(--dsw-alias-bg-layer-3, #fff));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 5px 10px;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n}\n.vx-input::placeholder { color: var(--dsw-alias-label-caption, #adb2b8); }\n.vx-input:focus-visible { outline-color: var(--dsw-alias-state-business-primary, #4176e6); outline-width: var(--dsw-focus-ring-width, 2px); }\n.vx-field { display: flex; flex-direction: column; gap: 6px; }\n.vx-field-label { font-size: var(--dsw-font-xxs-strong-12-font-size, 12px); font-weight: 500; color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-field-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-tertiary, #979da6); line-height: 18px; }\n.vx-field-error { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-state-error-primary, #ec1313); }\n.vx-switch-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }\n.vx-switch-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.vx-switch-label { font-size: var(--dsw-font-xs-13-font-size, 13px); color: var(--dsw-alias-label-primary, #1b1b1c); cursor: pointer; }\n.vx-switch-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-tertiary, #979da6); line-height: 18px; }\n.vx-switch {\n position: relative;\n width: 36px;\n height: 20px;\n flex: 0 0 auto;\n border: none;\n border-radius: 999px;\n background: var(--dsw-alias-state-idle-primary, #d4d4d4);\n cursor: pointer;\n padding: 0;\n transition: background-color var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-switch.on { background: var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-switch-thumb {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 999px;\n background: var(--dsw-alias-switch-thumb, #fff);\n transition: transform var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-switch.on .vx-switch-thumb { transform: translateX(16px); }\n.vx-switch-row.is-disabled { opacity: .5; }\n.vx-segmented { display: flex; flex-direction: column; gap: 6px; }\n.vx-segmented-track {\n display: inline-flex;\n align-self: flex-start;\n gap: 2px;\n padding: 2px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n}\n.vx-segmented-item {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 26px;\n padding: 0 10px;\n border: none;\n border-radius: calc(var(--dsw-radius-sm, 8px) - 2px);\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-segmented-item.on {\n background: var(--dsw-alias-bg-layer-3, #fff);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n box-shadow: var(--dsw-shadow-lv1, 0 2px 4px rgba(0, 0, 0, .05));\n}\n.vx-toggle-row {\n display: flex;\n gap: 8px;\n align-items: center;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n}\n\n/* ---------- layout ---------- */\n.vx-col { display: flex; flex-direction: column; gap: 10px; }\n.vx-row { display: flex; gap: 8px; align-items: center; }\n.vx-row.wrap { flex-wrap: wrap; }\n.vx-flex1 { flex: 1; }\n.vx-ellipsis {\n max-width: 60%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-section-title {\n font-size: var(--dsw-font-s-strong-14-font-size, 14px);\n font-weight: 500;\n line-height: var(--dsw-font-s-strong-14-line-height, 22px);\n margin-top: 4px;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-muted {\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n}\n.vx-preset-group-label {\n margin: 6px 0 2px;\n font-size: 11px;\n letter-spacing: .04em;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-note {\n border-left: 2px solid var(--dsw-alias-border-l3, rgba(0, 0, 0, .12));\n padding: 4px 0 4px 9px;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-error { color: var(--dsw-alias-state-error-primary, #ec1313); font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-pad { padding: 12px; }\n.vx-pad-sm { padding: 6px 2px; }\n.vx-badge {\n display: inline-flex;\n align-items: center;\n border-radius: 999px;\n padding: 0 7px;\n min-height: 18px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-badge-accent { background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4176e6) 14%, transparent); color: var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-badge-danger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ec1313) 12%, transparent); color: var(--dsw-alias-state-error-primary, #ec1313); }\n.vx-badge-success { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 14%, transparent); color: var(--dsw-alias-state-success-primary, #22c55e); }\n.vx-kbd {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 4px;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n color: var(--dsw-alias-label-tertiary, #979da6);\n font-family: var(--ds-font-family-code, monospace);\n font-size: 10px;\n}\n\n/* ---------- cards ---------- */\n.vx-card {\n background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-settings-card-fill, #fff));\n border-radius: var(--dsw-radius-lg, 16px);\n box-shadow: 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n padding: 16px;\n}\n/* Settings sheet: one self-contained material plane, painted from neutral\n colours instead of the host's per-mode tokens, so switching \u80CC\u666F\u52A8\u6548 between\n \u5173\u95ED/\u5B57\u7B26/\u5149\u5F71 cannot turn it into flat white. Frost is a milky 94% sheet;\n liquid is the same clear Apple-style pane as the popovers (88% -> 80%) with\n the identical edge optics. Cards inside are transparent groups, not a second\n material layer. */\n.vx-settings-page.vx-glass-on {\n position: relative;\n width: 100%;\n max-width: 980px;\n box-sizing: border-box;\n padding: 16px;\n border-radius: 22px;\n background: linear-gradient(180deg, rgba(250, 251, 253, .94), rgba(244, 246, 250, .88));\n -webkit-backdrop-filter: blur(28px) saturate(1.3);\n backdrop-filter: blur(28px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 18px 44px rgba(15, 23, 42, .08);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on {\n background: linear-gradient(180deg, rgba(31, 33, 39, .94), rgba(24, 26, 31, .88));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 18px 44px rgba(0, 0, 0, .34);\n}\n.vx-settings-page.vx-glass-on.vx-liquid {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .66), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(249, 251, 254, .9) 0%, rgba(242, 246, 250, .82) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .97),\n inset 0 10px 18px -14px rgba(255, 255, 255, .85),\n inset 0 -14px 24px -18px rgba(22, 32, 52, .25),\n inset 0 0 0 1px rgba(255, 255, 255, .42),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 26px 60px rgba(15, 25, 45, .2);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(28, 30, 36, .76) 0%, rgba(20, 22, 27, .68) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .3),\n inset 0 10px 18px -14px rgba(255, 255, 255, .16),\n inset 0 -14px 24px -18px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(0, 0, 0, .42),\n 0 26px 60px rgba(0, 0, 0, .46);\n}\n/* Same specular rim as the popovers and dialogs. */\n.vx-settings-page.vx-glass-on.vx-liquid::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .6) 0%,\n rgba(255, 255, 255, .92) 16%,\n rgba(255, 255, 255, .14) 36%,\n rgba(255, 255, 255, .5) 52%,\n rgba(255, 255, 255, .08) 70%,\n rgba(255, 190, 235, .45) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .24) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .2) 100%);\n}\n/* A live background may only nudge the transmission; the optics never move, so\n the sheet reads as the same material in all three background modes. */\n.vx-settings-page.vx-glass-on.vx-bg-live {\n background: linear-gradient(180deg, rgba(250, 251, 253, .92), rgba(244, 246, 250, .86));\n}\n.vx-settings-page.vx-glass-on.vx-liquid.vx-bg-live {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(249, 251, 254, .88) 0%, rgba(242, 246, 250, .8) 100%);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-bg-live {\n background: linear-gradient(180deg, rgba(31, 33, 39, .92), rgba(24, 26, 31, .86));\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid.vx-bg-live {\n background:\n radial-gradient(120% 70% at 10% -14%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 56%),\n linear-gradient(180deg, rgba(28, 30, 36, .74) 0%, rgba(20, 22, 27, .66) 100%);\n}\n.vx-settings-page.vx-glass-off {\n background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-settings-card-fill, #fff));\n box-shadow: 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n}\n/* Grouped content inside the sheet: transparent, separated by a hairline. */\n.vx-settings-page.vx-glass-on .vx-card {\n background: rgba(255, 255, 255, .24);\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .55),\n inset 0 0 0 .5px rgba(255, 255, 255, .35);\n}\n.vx-settings-page.vx-glass-on.vx-liquid .vx-card {\n background: rgba(255, 255, 255, .18);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .6),\n inset 0 0 0 .5px rgba(255, 255, 255, .3);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on .vx-card {\n background: rgba(255, 255, 255, .06);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .12),\n inset 0 0 0 .5px rgba(255, 255, 255, .1);\n}\n:root.vx-dark .vx-settings-page.vx-glass-on.vx-liquid .vx-card {\n background: rgba(255, 255, 255, .05);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n inset 0 0 0 .5px rgba(255, 255, 255, .1);\n}\n.vx-settings-page.vx-glass-off .vx-card {\n background: transparent;\n -webkit-backdrop-filter: none;\n backdrop-filter: none;\n box-shadow: inset 0 0 0 .5px var(--dsw-alias-settings-card-stroke, var(--dsw-alias-border-l3, rgba(0, 0, 0, .12)));\n}\n.vx-card-head {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n.vx-card-titles { flex: 1; min-width: 0; }\n.vx-card-title {\n margin: 0;\n font-size: var(--dsw-font-s-strong-14-font-size, 14px);\n font-weight: 500;\n line-height: var(--dsw-font-s-strong-14-line-height, 22px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-card-desc {\n margin: 2px 0 0;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-card-actions { display: flex; align-items: center; gap: 6px; }\n.vx-card-body { display: flex; flex-direction: column; gap: 10px; }\n\n/* ---------- empty / loading ---------- */\n.vx-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 28px 16px;\n text-align: center;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-empty-icon { opacity: .6; }\n.vx-empty-title { font-size: var(--dsw-font-xs-13-font-size, 13px); color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-empty-hint { font-size: var(--dsw-font-xxs-12-font-size, 12px); line-height: 18px; }\n.vx-empty-action { margin-top: 4px; }\n.vx-spinner { display: inline-flex; align-items: center; gap: 3px; }\n.vx-spinner-dot {\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background: var(--dsw-alias-label-tertiary, #979da6);\n animation: vx-spin 1s infinite ease-in-out;\n}\n.vx-spinner-dot:nth-child(2) { animation-delay: .15s; }\n.vx-spinner-dot:nth-child(3) { animation-delay: .3s; }\n@keyframes vx-spin {\n 0%, 80%, 100% { opacity: .3; transform: scale(.8); }\n 40% { opacity: 1; transform: scale(1); }\n}\n\n/* ---------- anchors / swatches / parameters ---------- */\n.vx-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }\n.vx-swatch {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n border: none;\n background: transparent;\n color: inherit;\n cursor: pointer;\n padding: 2px;\n border-radius: var(--dsw-radius-sm, 8px);\n}\n.vx-swatch:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-swatch-box {\n width: 100%;\n height: 26px;\n border-radius: var(--dsw-radius-sm, 8px);\n box-shadow: 0 0 0 1px var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n box-sizing: border-box;\n transition: box-shadow var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-swatch.on .vx-swatch-box {\n box-shadow: 0 0 0 2px var(--dsw-alias-state-business-primary, #4176e6);\n}\n.vx-swatch-label {\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-param-list { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }\n.vx-param-row { display: grid; grid-template-columns: 52px 1fr 54px; gap: 8px; align-items: center; }\n.vx-param-label { font-size: var(--dsw-font-xxs-12-font-size, 12px); color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-param-val {\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n text-align: right;\n font-variant-numeric: tabular-nums;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-range { width: 100%; height: 18px; margin: 0; accent-color: var(--dsw-alias-state-business-primary, #4176e6); }\n\n/* ---------- export ---------- */\n.vx-format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }\n.vx-format-card {\n display: flex;\n flex-direction: column;\n gap: 2px;\n text-align: left;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: transparent;\n color: inherit;\n font-family: inherit;\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), border-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-format-card:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-format-card.on { border-color: var(--dsw-alias-state-business-primary, #4176e6); background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4176e6) 8%, transparent); }\n.vx-format-title { font-size: var(--dsw-font-xs-13-font-size, 13px); font-weight: 500; }\n.vx-format-hint { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-export-progress { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--dsw-radius-sm, 8px); background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-export-result {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-md, 12px);\n background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 10%, transparent);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-export-result-copy { min-width: 0; }\n.vx-budget-track {\n height: 6px;\n border-radius: 999px;\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n overflow: hidden;\n}\n.vx-budget-fill {\n height: 100%;\n border-radius: 999px;\n background: var(--dsw-alias-state-business-primary, #4176e6);\n transition: width var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-budget-fill.over { background: var(--dsw-alias-state-warn-primary, #f59e0b); }\n/* Daily usage bars: one track per row, so the percentage is measured inside\n the space left by the date column instead of overflowing the card. */\n.vx-bar-track {\n flex: 1 1 auto;\n min-width: 0;\n height: 6px;\n border-radius: 999px;\n overflow: hidden;\n background: transparent;\n}\n.vx-bar-fill {\n display: block;\n height: 100%;\n min-width: 2px;\n border-radius: 999px;\n background: var(--dsw-alias-state-business-primary, #4176e6);\n transition: width var(--ds-transition-duration, .2s) var(--vx-ease);\n}\n.vx-count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }\n.vx-count-cell {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 10px 6px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06));\n}\n.vx-count-value { font-size: var(--dsw-font-l-20-font-size, 20px); font-weight: 500; line-height: 1.2; }\n.vx-count-label { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-command-dialog { max-width: 620px; }\n.vx-command-input { margin-bottom: 4px; }\n.vx-command-list { max-height: min(420px, 56vh); }\n.vx-command-item { display: flex; align-items: center; gap: 10px; }\n.vx-command-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.vx-command-foot {\n display: flex;\n align-items: center;\n gap: 14px;\n width: 100%;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-command-foot .vx-kbd { margin: 0 2px; }\n\n/* ---------- lists ---------- */\n.vx-list {\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 300px;\n overflow: auto;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-list-item {\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 6px 8px;\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-list-item:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-list-item.on,\n.vx-list-item[aria-selected='true'] {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n}\n.vx-list-item:disabled { opacity: .5; cursor: default; }\n.vx-check-row { display: flex; gap: 8px; align-items: center; font-size: var(--dsw-font-xs-13-font-size, 13px); padding: 5px 4px; }\n.vx-check-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* ---------- tables ---------- */\n.vx-table { width: 100%; border-collapse: collapse; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-table th,\n.vx-table td {\n border-bottom: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n padding: 5px 6px;\n text-align: right;\n color: var(--dsw-alias-label-secondary, #61666b);\n}\n.vx-table th {\n font-weight: 500;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-table th:first-child,\n.vx-table td:first-child { text-align: left; }\n\n/* ---------- folders ---------- */\n.vx-folder-list { display: flex; flex-direction: column; gap: 2px; }\n.vx-rename-input { flex: 1; min-width: 0; min-height: 24px; padding: 2px 6px; font-size: var(--dsw-font-xxs-12-font-size, 12px); }\n.vx-folder { display: flex; flex-direction: column; }\n.vx-folder-head {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 4px 4px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: grab;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-folder-head:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-folder-head.drop-inside {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n outline: 1px dashed var(--dsw-alias-state-business-primary, #4176e6);\n}\n.vx-folder-head.drop-before { box-shadow: 0 -2px 0 0 var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-folder-head.drop-after { box-shadow: 0 2px 0 0 var(--dsw-alias-state-business-primary, #4176e6); }\n.vx-folder-name {\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n font-weight: 500;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-folder-body {\n border-left: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n margin-left: 14px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.vx-item-row {\n display: flex;\n gap: 5px;\n align-items: center;\n padding: 3px 4px;\n border-radius: var(--dsw-radius-sm, 8px);\n}\n.vx-item-row:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-item-name {\n flex: 1;\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0;\n}\n.vx-item-name:hover { color: var(--dsw-alias-label-primary, #1b1b1c); }\n.vx-mini {\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #979da6);\n cursor: pointer;\n padding: 3px;\n border-radius: var(--dsw-radius-xs, 4px);\n display: inline-flex;\n align-items: center;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease), color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-mini:hover { color: var(--dsw-alias-label-primary, #1b1b1c); background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-form {\n display: flex;\n flex-direction: column;\n gap: 6px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n border-radius: var(--dsw-radius-md, 12px);\n padding: 8px;\n}\n\n/* ---------- prompts ---------- */\n.vx-toolbar {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-wrap: wrap;\n}\n.vx-toolbar .vx-input { flex: 1 1 160px; }\n.vx-select { flex: 0 0 auto !important; width: auto; min-width: 96px; }\n.vx-textarea { resize: vertical; min-height: 140px; line-height: 20px; padding: 8px 10px; }\n.vx-prompt-grid {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.vx-prompt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }\n.vx-prompt-card {\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n background: var(--dsw-alias-bg-layer-3, transparent);\n border-radius: var(--dsw-radius-md, 12px);\n padding: 8px 10px;\n}\n.vx-prompt-title {\n font-weight: 500;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-prompt-body {\n margin-top: 4px;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-secondary, #61666b);\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 54px;\n overflow: hidden;\n}\n\n/* ---------- dialogs ---------- */\n.vx-dialog-mask {\n position: fixed;\n inset: 0;\n z-index: 60;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n pointer-events: auto;\n background: var(--dsw-alias-bg-mask-1, rgba(8, 10, 16, .25));\n animation: vx-fade-in .18s var(--vx-ease-out);\n}\n.vx-dialog-mask[data-state='closed'] { animation: vx-fade-out .16s var(--vx-ease-in) forwards; }\n.vx-dialog {\n position: relative;\n display: flex;\n flex-direction: column;\n max-height: 82vh;\n width: min(520px, 100%);\n pointer-events: auto;\n border: none;\n border-radius: var(--dsw-radius-xl, 20px);\n background: var(--dsw-alias-bg-layer-3, #fff);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n box-shadow: var(--dsw-elevation-prominent, 0 0 0 .5px rgba(0, 0, 0, .12), 0 12px 32px rgba(0, 0, 0, .12));\n animation: vx-dialog-in var(--vx-dur-dialog) var(--vx-ease-out);\n}\n/* Dialogs follow the same two materials. They render inside the main document,\n so the backdrop chain really does frost / refract the page behind. */\n:root:not(.vx-glass-off) .vx-dialog {\n background: linear-gradient(180deg, rgba(250, 251, 253, .94), rgba(244, 246, 250, .88));\n -webkit-backdrop-filter: blur(30px) saturate(1.3);\n backdrop-filter: blur(30px) saturate(1.3);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .7),\n 0 0 0 .5px rgba(0, 0, 0, .1),\n 0 18px 44px rgba(15, 23, 42, .12);\n}\n:root.vx-dark:not(.vx-glass-off) .vx-dialog {\n background: linear-gradient(180deg, rgba(31, 33, 39, .94), rgba(24, 26, 31, .88));\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(255, 255, 255, .1),\n 0 18px 44px rgba(0, 0, 0, .4);\n}\n:root:not(.vx-glass-off).vx-liquid .vx-dialog {\n background:\n radial-gradient(130% 80% at 10% -14%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(252, 253, 255, .62) 0%, rgba(248, 250, 253, .54) 100%);\n -webkit-backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n backdrop-filter: url(#vx-lg) blur(3px) saturate(1.5) brightness(1.04);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .95),\n inset 0 10px 18px -14px rgba(255, 255, 255, .85),\n inset 0 -14px 24px -18px rgba(22, 32, 52, .25),\n inset 0 0 0 1px rgba(255, 255, 255, .42),\n 0 0 0 .5px rgba(18, 28, 45, .18),\n 0 26px 64px rgba(15, 25, 45, .22);\n}\n:root.vx-dark:not(.vx-glass-off).vx-liquid .vx-dialog {\n background:\n radial-gradient(130% 80% at 10% -14%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 58%),\n linear-gradient(180deg, rgba(28, 30, 36, .66) 0%, rgba(20, 22, 27, .58) 100%);\n box-shadow:\n inset 0 1px 0 rgba(255, 255, 255, .3),\n inset 0 10px 18px -14px rgba(255, 255, 255, .16),\n inset 0 -14px 24px -18px rgba(0, 0, 0, .55),\n inset 0 0 0 1px rgba(255, 255, 255, .14),\n 0 0 0 .5px rgba(0, 0, 0, .42),\n 0 26px 64px rgba(0, 0, 0, .5);\n}\n:root:not(.vx-glass-off).vx-liquid .vx-dialog::after {\n content: '';\n position: absolute;\n inset: 0;\n padding: 1px;\n border-radius: inherit;\n pointer-events: none;\n background: linear-gradient(140deg,\n rgba(180, 240, 255, .6) 0%,\n rgba(255, 255, 255, .9) 16%,\n rgba(255, 255, 255, .14) 36%,\n rgba(255, 255, 255, .5) 52%,\n rgba(255, 255, 255, .08) 70%,\n rgba(255, 190, 235, .45) 100%);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);\n -webkit-mask-composite: xor;\n mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);\n}\n:root.vx-dark.vx-liquid:not(.vx-glass-off) .vx-dialog::after {\n background: linear-gradient(140deg,\n rgba(150, 220, 255, .24) 0%,\n rgba(255, 255, 255, .34) 16%,\n rgba(255, 255, 255, .06) 36%,\n rgba(255, 255, 255, .22) 52%,\n rgba(255, 255, 255, .04) 70%,\n rgba(255, 190, 235, .2) 100%);\n}\n.vx-dialog[data-state='closed'] { animation: vx-dialog-out .16s var(--vx-ease-in) forwards; }\n.vx-dialog-sm { max-width: 360px; }\n.vx-dialog-md { max-width: 520px; }\n.vx-dialog-lg { max-width: 720px; }\n.vx-dialog-head {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 16px 18px 8px;\n}\n.vx-dialog-titles { flex: 1; min-width: 0; }\n.vx-dialog-title {\n margin: 0;\n font-size: var(--dsw-font-m-18-font-size, 16px);\n font-weight: 500;\n line-height: var(--dsw-font-m-18-line-height, 28px);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n}\n.vx-dialog-desc {\n margin: 2px 0 0;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n line-height: 18px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-dialog-body {\n padding: 4px 18px 8px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n gap: 12px;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 10px 18px 16px;\n}\n.vx-discard-bar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f59e0b) 14%, transparent);\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n}\n.vx-dialog-text { font-size: var(--dsw-font-xs-13-font-size, 13px); line-height: 20px; }\n/* One shell for every anchored card: a fixed head, exactly one scrolling body\n and a fixed foot. The cards used to set their own paddings, which is how the\n balance card ended up looking like a different surface from the prompt card. */\n.vx-pop-head {\n display: flex;\n flex: 0 0 auto;\n gap: 8px;\n align-items: center;\n padding: 12px 14px 6px;\n font-weight: 500;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n}\n.vx-pop-body {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n padding: 4px 14px 10px;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-svgbox {\n overflow: auto;\n background: var(--dsw-alias-markdown-code-block, var(--dsw-alias-bg-layer-2, rgba(0, 0, 0, .04)));\n border-radius: var(--dsw-radius-md, 12px);\n padding: 14px;\n}\n.vx-svgbox svg { max-width: 100%; height: auto; }\n\n/* ---------- popovers / panels ---------- */\n.vx-popover {\n position: fixed;\n box-sizing: border-box;\n pointer-events: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding: 0;\n scrollbar-width: thin;\n scrollbar-color: var(--dsh-scrollbar-thumb, rgba(0, 0, 0, .2)) transparent;\n}\n.vx-popover[data-state='open'] { animation: vx-pop-in var(--vx-dur-pop) var(--vx-ease-out); }\n.vx-popover[data-state='closed'] { animation: vx-pop-out var(--vx-dur-close) var(--vx-ease-in) forwards; }\n/* A scale animation distorts an SVG backdrop filter's coordinate space. Liquid\n cards slide/fade instead of scaling so the refraction stays aligned while\n the card enters. */\n.vx-liquid .vx-popover[data-state='open'] { animation-name: vx-pop-in-liquid; }\n.vx-liquid .vx-popover[data-state='closed'] { animation-name: vx-pop-out-liquid; }\n/* Card widths stay content-driven; head/body/foot come from the shared shell. */\n.vx-prompt-list { max-height: none; overflow: visible; }\n.vx-pop-search {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 6px;\n padding: 0 14px 6px;\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-pop-group {\n padding: 6px 2px 2px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n}\n.vx-prompt-row {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n text-align: left;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-family: inherit;\n padding: 6px 8px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-prompt-row:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-prompt-row-name { font-size: var(--dsw-font-xs-13-font-size, 13px); font-weight: 500; }\n.vx-prompt-row-text {\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n color: var(--dsw-alias-label-secondary, #61666b);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.vx-prompt-row-tags { font-size: var(--dsw-font-xxxs-11-font-size, 11px); color: var(--dsw-alias-label-tertiary, #979da6); }\n.vx-pop-foot {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n padding: 6px 14px 12px;\n border-top: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .04));\n}\n/* The usage tables sit in a 380px card; fixed layout keeps six columns from\n pushing the panel into horizontal scroll. */\n.vx-balance-pop .vx-table { table-layout: fixed; }\n.vx-balance-pop .vx-table th,\n.vx-balance-pop .vx-table td {\n padding: 4px 3px;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n white-space: nowrap;\n}\n.vx-balance-pop .vx-table th:first-child,\n.vx-balance-pop .vx-table td:first-child {\n width: 34%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.vx-balance-pop .vx-table th:not(:first-child),\n.vx-balance-pop .vx-table td:not(:first-child) { text-align: right; }\n.vx-balance-totals {\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n font-weight: 500;\n line-height: var(--dsw-font-xs-13-line-height, 20px);\n}\n.vx-balance-hint { margin-top: 6px; }\n.vx-settings-page { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }\n/* The host settings surface is a side panel, not a full page: a stacked nav\n strip keeps the card at full panel width instead of squeezing it beside a\n rail. */\n.vx-settings-shell { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }\n.vx-settings-nav {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 4px;\n padding-bottom: 2px;\n}\n.vx-settings-nav-item {\n text-align: left;\n white-space: nowrap;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xs-13-font-size, 13px);\n border-radius: var(--dsw-radius-sm, 8px);\n padding: 6px 10px;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 8px;\n transition: background-color var(--ds-transition-duration-fast, .1s) var(--vx-ease);\n}\n.vx-settings-nav-item:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-settings-nav-item.on {\n background: var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-weight: 500;\n}\n.vx-settings-content { display: flex; flex-direction: column; gap: 14px; min-width: 0; }\n@media (max-width: 760px) {\n .vx-settings-nav { gap: 2px; }\n}\n\n/* ---------- toasts ---------- */\n.vx-toast-stack {\n position: fixed;\n left: 50%;\n bottom: 26px;\n transform: translateX(-50%);\n display: flex;\n flex-direction: column;\n gap: 8px;\n align-items: center;\n pointer-events: auto;\n z-index: 80;\n}\n.vx-toast {\n display: flex;\n gap: 10px;\n align-items: center;\n max-width: min(560px, calc(100vw - 32px));\n padding: 8px 10px 8px 14px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-toast-bg, #353638);\n color: var(--dsw-alias-toast-label, #fff);\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n box-shadow: var(--dsw-shadow-lv2, 0 4px 12px rgba(0, 0, 0, .12));\n}\n.vx-toast[data-state='open'] { animation: vx-toast-in .22s var(--vx-ease-out); }\n.vx-toast[data-state='closed'] { animation: vx-toast-out .16s var(--vx-ease-in) forwards; }\n.vx-toast-error { background: var(--dsw-alias-state-error-primary, #ec1313); color: var(--dsw-static-neutral-00, #fff); }\n.vx-toast-text { flex: 1; min-width: 0; }\n.vx-toast-action,\n.vx-toast-close {\n border: none;\n background: transparent;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n border-radius: var(--dsw-radius-xs, 4px);\n padding: 2px 6px;\n opacity: .8;\n}\n.vx-toast-action { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }\n.vx-toast-close { font-size: 14px; line-height: 1; padding: 2px 5px; }\n.vx-toast-action:hover,\n.vx-toast-close:hover { opacity: 1; background: rgba(255, 255, 255, .14); }\n\n/* ---------- mermaid ---------- */\n.vx-mmd-wrap {\n position: relative;\n margin: 6px 0;\n border: 1px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, .1));\n border-radius: var(--dsw-radius-md, 12px);\n overflow: hidden;\n background: var(--dsw-alias-markdown-code-block, transparent);\n}\n.vx-mmd-bar {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, .04));\n background: var(--dsw-alias-markdown-code-block-banner, transparent);\n}\n.vx-mmd-btn {\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #61666b);\n font-family: inherit;\n font-size: var(--dsw-font-xxs-12-font-size, 12px);\n padding: 3px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n}\n.vx-mmd-btn:hover { background: var(--dsw-alias-interactive-bg-hover, rgba(38, 49, 72, .06)); }\n.vx-mmd-btn.active {\n background: var(--dsw-alias-markdown-code-segment-selected, var(--dsw-alias-interactive-bg-active, rgba(38, 49, 72, .1)));\n color: var(--dsw-alias-label-primary, #1b1b1c);\n font-weight: 500;\n}\n.vx-mmd-live {\n margin-left: auto;\n font-size: var(--dsw-font-xxxs-11-font-size, 11px);\n color: var(--dsw-alias-label-tertiary, #979da6);\n text-decoration: none;\n padding: 3px 8px;\n}\n.vx-mmd-live:hover { color: var(--dsw-alias-label-secondary, #61666b); }\n.vx-mmd-stage { padding: 16px 12px; overflow-x: auto; text-align: center; }\n.vx-mmd-stage svg { max-width: 100%; height: auto; }\n\n/* ---------- motion / focus polish ---------- */\n.vx-section-in {\n display: flex;\n flex-direction: column;\n gap: 14px;\n animation: vx-section-in .22s var(--vx-ease-out);\n}\n.vx-icon-spin { animation: vx-rotate .9s linear infinite; transform-origin: center; }\n.vx-button,\n.vx-icon-button,\n.vx-header-btn,\n.vx-settings-nav-item,\n.vx-prompt-row,\n.vx-list-item {\n outline: none;\n transition-property: background-color, color, border-color, transform, opacity;\n transition-duration: var(--ds-transition-duration-fast, .1s);\n transition-timing-function: var(--vx-ease);\n}\n.vx-button:focus-visible,\n.vx-icon-button:focus-visible,\n.vx-header-btn:focus-visible,\n.vx-settings-nav-item:focus-visible,\n.vx-prompt-row:focus-visible,\n.vx-list-item:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary-new-colorprimary-new-color, #4d6bfe);\n outline-offset: 2px;\n}\n.vx-button:active:not(:disabled),\n.vx-icon-button:active:not(:disabled),\n.vx-header-btn:active,\n.vx-settings-nav-item:active,\n.vx-prompt-row:active,\n.vx-list-item:active { transform: scale(.97); }\n\n/* ---------- reduced motion ---------- */\n@media (prefers-reduced-motion: reduce) {\n .vx-root *,\n .vx-settings-page,\n .vx-settings-page *,\n .vx-popover,\n .vx-dialog,\n .vx-dialog-mask,\n .vx-toast,\n .vx-toast-stack {\n animation: none !important;\n transition: none !important;\n transform: none !important;\n }\n}\n";
|
|
12
|
+
export declare const STATIC_CSS: string;
|
|
@@ -16,6 +16,19 @@ export declare function usePresence(open: boolean, exitMs?: number): {
|
|
|
16
16
|
mounted: boolean;
|
|
17
17
|
state: 'open' | 'closed';
|
|
18
18
|
};
|
|
19
|
+
/** Current plugin theme, provided by the overlay / settings root. `null` means
|
|
20
|
+
* no provider (unit tests or a non-plugin host), so the document is left alone. */
|
|
21
|
+
export declare const PluginThemeContext: React.Context<boolean | null>;
|
|
22
|
+
/** Mirror the plugin theme onto the document that owns a floating surface.
|
|
23
|
+
* Desktop renders plugin popovers and the settings sheet in their own
|
|
24
|
+
* transparent windows; those documents never receive the main window's
|
|
25
|
+
* appearance classes. Without this, the dark material selectors
|
|
26
|
+
* (`:root.vx-dark …`) never match while the host tokens are already dark,
|
|
27
|
+
* which is the light panel + light text combination in the bug report. */
|
|
28
|
+
export declare function applyDocumentTheme(doc: Document | null | undefined, dark: boolean): void;
|
|
29
|
+
/** Apply the context theme to a surface's owner document before paint. The
|
|
30
|
+
* layout effect avoids a one-frame light flash on the first open. */
|
|
31
|
+
export declare function useDocumentTheme(ref: React.RefObject<HTMLElement | null>, active: boolean): void;
|
|
19
32
|
export interface PopoverProps {
|
|
20
33
|
open: boolean;
|
|
21
34
|
anchor: React.RefObject<HTMLElement | null>;
|
package/lib/types/protocol.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ export declare const CUSTOM_PLUGIN_API_PREFIX = "/api/custom-plugin";
|
|
|
14
14
|
export declare const MERMAID_SCRIPT_PATH = "/custom-plugin/mermaid.js";
|
|
15
15
|
/** Character-tier scene ids; every one is an open-source `ascii-things`
|
|
16
16
|
* preset. Keep in sync with `SCENE_PRESETS` in `client/bg-scene.ts`. */
|
|
17
|
-
export declare const BG_FX_ASCII_PRESETS: readonly ["sharks", "jellyfish", "reef", "night", "turtle", "manta", "dolphin", "seahorse", "hammerhead", "tang", "koi", "starlings", "fireflies", "city", "servers"];
|
|
17
|
+
export declare const BG_FX_ASCII_PRESETS: readonly ["sharks", "jellyfish", "robots", "dog", "reef", "night", "turtle", "manta", "dolphin", "seahorse", "hammerhead", "tang", "koi", "starlings", "fireflies", "city", "servers"];
|
|
18
18
|
/** Shader-tier style ids; every one is a Paper Shaders fragment shader.
|
|
19
19
|
* Keep in sync with `SHADER_STYLES` in `client/bg-shader.ts`. */
|
|
20
|
-
export declare const BG_FX_SHADER_STYLES: readonly ["mesh", "smoke", "rays", "dither", "grain", "warp", "swirl"];
|
|
20
|
+
export declare const BG_FX_SHADER_STYLES: readonly ["mesh", "smoke", "rays", "dither", "grain", "warp", "swirl", "metaballs", "voronoi", "spiral", "neuro"];
|
|
21
21
|
/** The `bgFxPreset` value space: one flat string across both renderer tiers.
|
|
22
22
|
* `normalizeCfg` narrows it to the set that matches the active `bgFx` mode. */
|
|
23
23
|
export type BgFxPreset = (typeof BG_FX_ASCII_PRESETS)[number] | (typeof BG_FX_SHADER_STYLES)[number];
|
|
@@ -35,12 +35,15 @@ export interface CustomPluginConfig {
|
|
|
35
35
|
/** Animated page-background layer below the content surfaces. `'none'` is
|
|
36
36
|
* off; `'ascii'` runs the character renderer; `'shader'` runs the WebGL2
|
|
37
37
|
* full-screen fragment renderer (falling back to the character tier without
|
|
38
|
-
* WebGL2).
|
|
39
|
-
*
|
|
38
|
+
* WebGL2). The factory default is the calibrated 天青灰 + 鲨群 pair; an
|
|
39
|
+
* explicit `'none'` (or a legacy `false`) stays off. Flat string on purpose
|
|
40
|
+
* because `normalizeCfg` drops nested values; a Phase 1 boolean migrates
|
|
41
|
+
* (true → 'ascii', false → 'none'). */
|
|
40
42
|
bgFx?: 'none' | 'ascii' | 'shader';
|
|
41
43
|
/** Which piece runs in the active tier: the character-tier scene ids
|
|
42
|
-
* ('sharks', 'jellyfish', 'reef', …) or the shader-tier
|
|
43
|
-
* 'smoke', 'rays', 'dither', 'grain', 'warp', 'swirl'
|
|
44
|
+
* ('sharks', 'jellyfish', 'robots', 'dog', 'reef', …) or the shader-tier
|
|
45
|
+
* style ids ('mesh', 'smoke', 'rays', 'dither', 'grain', 'warp', 'swirl',
|
|
46
|
+
* 'metaballs', 'voronoi', 'spiral', 'neuro'). One flat field for
|
|
44
47
|
* both because the two tiers never coexist; `normalizeCfg` resets it into
|
|
45
48
|
* the set that matches `bgFx`. Unknown values fall back to that tier's
|
|
46
49
|
* remembered preset (`bgAsciiPreset` / `bgShaderPreset`). */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexpeng/dsh-custom-plugin",
|
|
3
3
|
"description": "Custom convenience suite for the dsh web GUI: appearance, folders, prompts, session export/search, Mermaid, usage analytics, local budget, key-free backups, and a Ctrl/Cmd+K command palette; dual-face plugin mounted without dsh source changes.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"icon": "./icon.svg",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"smoke": "node scripts/smoke.mjs",
|
|
60
60
|
"canary": "node scripts/compat-canary.mjs",
|
|
61
61
|
"bench:mermaid": "node scripts/mermaid-scan-bench.mjs",
|
|
62
|
+
"bench:glass": "node scripts/glass-visual.mjs",
|
|
62
63
|
"prepare": "npm run build",
|
|
63
64
|
"prepublishOnly": "tsc --noEmit && vitest run"
|
|
64
65
|
},
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Spatial focus mask for the backdrop: the ink keeps full strength around the
|
|
3
|
-
* shell's edges and fades toward the reading column, so the texture never sits
|
|
4
|
-
* directly behind body copy. Geometry only — the DOM measurement lives in
|
|
5
|
-
* `custom.tsx`, so both renderer tiers and the unit tests share one rule.
|
|
6
|
-
*
|
|
7
|
-
* The mask is deliberately *not* a radial vignette: the fade follows the real
|
|
8
|
-
* content rectangle (feathered on every side), so a sidebar collapse or a
|
|
9
|
-
* window resize moves the calm zone with the text instead of leaving a
|
|
10
|
-
* mismatched circle on screen.
|
|
11
|
-
*/
|
|
12
|
-
/** Rectangle in CSS pixels, top-left origin, viewport coordinates. */
|
|
13
|
-
export interface BgFocusRect {
|
|
14
|
-
x: number;
|
|
15
|
-
y: number;
|
|
16
|
-
w: number;
|
|
17
|
-
h: number;
|
|
18
|
-
}
|
|
19
|
-
/** Feather width of the fade, CSS px. 150 is kept from rounds 2–3, but for a
|
|
20
|
-
* different reason now: with the composer-span rect the visible gutter is only
|
|
21
|
-
* ~141 px wide (x 280..421 at 1280), so the ramp has to finish *inside* it — at
|
|
22
|
-
* 150 the weight reaches 0.97 at the gutter's outer edge and 1.0 a few px
|
|
23
|
-
* further out, which is the strongest "edge strong → body faint" the layout
|
|
24
|
-
* allows. Round 4 A/B'd 220 and rejected it: a band wider than the gutter
|
|
25
|
-
* dilutes the one region the user can actually see (canvas gutter mean 0.0141
|
|
26
|
-
* vs sidebar 0.0744, i.e. the gutter sat at 19% of full strength while the
|
|
27
|
-
* paragraph area was already down at 0.0060 — ratio 2.37×). */
|
|
28
|
-
export declare const FOCUS_FEATHER_PX = 150;
|
|
29
|
-
/** Ink retained at the middle of the reading column, as a fraction of full
|
|
30
|
-
* strength. Round 4 lowered this from 0.45 to 0.15: the canvas already showed
|
|
31
|
-
* a 3.96× mean ratio at 0.45 (column 0.0151 vs gutter 0.0599), yet the
|
|
32
|
-
* page-scale A/B read as one flat wash — a uniform 45% inside a zone that
|
|
33
|
-
* covers almost the whole content area has nothing to be compared against.
|
|
34
|
-
* 0.15 leaves a barely-there texture behind the copy while the gutter keeps
|
|
35
|
-
* full strength, and the text contrast measured 14.32:1 at 0.45, so it can
|
|
36
|
-
* only improve here. */
|
|
37
|
-
export declare const FOCUS_FLOOR = 0.15;
|
|
38
|
-
/** Reject geometry that cannot describe a real column. */
|
|
39
|
-
export declare function normalizeFocusRect(rect: BgFocusRect | null | undefined): BgFocusRect | null;
|
|
40
|
-
/**
|
|
41
|
-
* The "避让正文" gate: the rect the renderers get. `false` means the mask does
|
|
42
|
-
* not participate at all — `null` reaches `setFocus`, so the ASCII tier never
|
|
43
|
-
* allocates caps and the shader never uploads `u_focus`. This is deliberately
|
|
44
|
-
* not "weight every cell by 1": that would keep the whole pipeline running
|
|
45
|
-
* for a page the user asked to be uniform.
|
|
46
|
-
*/
|
|
47
|
-
export declare function focusRectFor(bgFocus: boolean | undefined, rect: BgFocusRect | null): BgFocusRect | null;
|
|
48
|
-
/** True when two rects describe the same zone; used to skip mask rebuilds. */
|
|
49
|
-
export declare function sameFocusRect(a: BgFocusRect | null, b: BgFocusRect | null): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Ink weight (0..1) at a CSS point: `floor` inside the rect, rising to 1 at
|
|
52
|
-
* `feather` px outside it with a smoothstep ramp (C1-continuous, so the fade
|
|
53
|
-
* has no visible band at either end).
|
|
54
|
-
*/
|
|
55
|
-
export declare function focusWeight(px: number, py: number, rect: BgFocusRect, feather: number, floor: number): number;
|
|
56
|
-
/**
|
|
57
|
-
* Build the calm zone as a quarter-resolution alpha mask (a data URL).
|
|
58
|
-
*
|
|
59
|
-
* Both open-source renderers paint into their own canvas, so the per-cell caps
|
|
60
|
-
* the level renderer used to apply are replaced by a CSS `mask-image`: the
|
|
61
|
-
* reading column fades to {@link FOCUS_FLOOR}, the gutters stay at full
|
|
62
|
-
* strength. Building it at 1/4 resolution keeps a resize-time rebuild cheap
|
|
63
|
-
* (≈10k pixels at 1280×822) and the browser scales it smoothly.
|
|
64
|
-
*/
|
|
65
|
-
export interface FocusMaskDocLike {
|
|
66
|
-
createElement(tag: string): {
|
|
67
|
-
width: number;
|
|
68
|
-
height: number;
|
|
69
|
-
getContext(type: string): {
|
|
70
|
-
createImageData(w: number, h: number): {
|
|
71
|
-
data: Uint8ClampedArray;
|
|
72
|
-
};
|
|
73
|
-
putImageData(image: {
|
|
74
|
-
data: Uint8ClampedArray;
|
|
75
|
-
}, x: number, y: number): void;
|
|
76
|
-
} | null;
|
|
77
|
-
toDataURL(): string;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export declare function buildFocusMask(doc: FocusMaskDocLike, rect: BgFocusRect, width: number, height: number, scale?: number): string | null;
|