@nonamelego/dsh-catppuccin 0.6.6 → 0.7.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/README.en.md +10 -3
- package/README.md +17 -8
- package/lib/client.js +384 -24
- package/lib/client.js.map +1 -1
- package/lib/index.js +234 -150
- package/lib/index.js.map +1 -1
- package/package.json +9 -2
package/lib/client.js
CHANGED
|
@@ -52,7 +52,7 @@ window.__ModuleLoader__.load({
|
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region \0dsh-css:/home/runner/work/dsh-catppuccin-theme/dsh-catppuccin-theme/src/client/CatppuccinRow.module.css.mjs
|
|
55
|
-
const css$2 = ".AfSEaq_cubes{flex-wrap:wrap;gap:8px;display:flex}.AfSEaq_cube{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-xl);color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;flex-direction:column;flex:118px;justify-content:center;align-items:flex-start;gap:2px;padding:12px 14px;font-size:13px;line-height:20px;display:flex}.AfSEaq_cube:hover:not(.AfSEaq_selected){background:var(--dsw-alias-interactive-bg-hover)}.AfSEaq_cube:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.AfSEaq_selected{background:var(--dsw-alias-bg-module-platform);border-color:var(--dsw-static-neutral-bluish-400)}.AfSEaq_cubeHead{align-items:center;gap:6px;display:inline-flex}.AfSEaq_swatch{border-radius:3px;flex:none;width:12px;height:12px}.AfSEaq_subtitle{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:14px}.AfSEaq_shikiRow{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.AfSEaq_shikiLabel{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.AfSEaq_codePreview{flex-direction:column;gap:6px;margin-top:2px;display:flex}.AfSEaq_codeSample{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-markdown-code-block,var(--dsw-alias-bg-layer-2));color:var(--shiki-foreground,var(--dsw-alias-label-primary));white-space:pre;margin:0;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:18px;overflow:auto}.AfSEaq_tokKeyword{color:var(--shiki-token-keyword,var(--dsw-static-blue-500))}.AfSEaq_tokFunction{color:var(--shiki-token-function,var(--dsw-static-amber-500))}.AfSEaq_tokParameter{color:var(--shiki-token-parameter,var(--dsw-alias-label-primary))}.AfSEaq_tokString{color:var(--shiki-token-string,var(--dsw-static-green-500))}.AfSEaq_tokPunct{color:var(--shiki-token-punctuation,var(--dsw-alias-label-secondary))}.AfSEaq_tokComment{color:var(--shiki-token-comment,var(--dsw-alias-label-tertiary))}.AfSEaq_overrides{flex-direction:column;gap:6px;display:flex}.AfSEaq_overrideRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.AfSEaq_overrideInput{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-primary);font:inherit;background:0 0;flex:200px;padding:0 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}.AfSEaq_overrideInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--dsw-alias-state-business-primary) 35%, transparent);outline:none}.AfSEaq_overrideValue{flex:140px}.AfSEaq_hint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.AfSEaq_selfStart{align-self:flex-start}";
|
|
55
|
+
const css$2 = ".AfSEaq_cubes{flex-wrap:wrap;gap:8px;display:flex}.AfSEaq_cube{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-xl);color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;flex-direction:column;flex:118px;justify-content:center;align-items:flex-start;gap:2px;padding:12px 14px;font-size:13px;line-height:20px;display:flex}.AfSEaq_cube:hover:not(.AfSEaq_selected){background:var(--dsw-alias-interactive-bg-hover)}.AfSEaq_cube:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}.AfSEaq_selected{background:var(--dsw-alias-bg-module-platform);border-color:var(--dsw-static-neutral-bluish-400)}.AfSEaq_cubeHead{align-items:center;gap:6px;display:inline-flex}.AfSEaq_swatch{border-radius:3px;flex:none;width:12px;height:12px}.AfSEaq_subtitle{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:14px}.AfSEaq_shikiRow{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.AfSEaq_followRow{flex-direction:column;gap:6px;display:flex}.AfSEaq_followHead{align-items:center;gap:10px;display:flex}.AfSEaq_followLabel{color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px}.AfSEaq_shikiLabel{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px}.AfSEaq_codePreview{flex-direction:column;gap:6px;margin-top:2px;display:flex}.AfSEaq_codeSample{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-markdown-code-block,var(--dsw-alias-bg-layer-2));color:var(--shiki-foreground,var(--dsw-alias-label-primary));white-space:pre;margin:0;padding:8px 10px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:18px;overflow:auto}.AfSEaq_tokKeyword{color:var(--shiki-token-keyword,var(--dsw-static-blue-500))}.AfSEaq_tokFunction{color:var(--shiki-token-function,var(--dsw-static-amber-500))}.AfSEaq_tokParameter{color:var(--shiki-token-parameter,var(--dsw-alias-label-primary))}.AfSEaq_tokString{color:var(--shiki-token-string,var(--dsw-static-green-500))}.AfSEaq_tokPunct{color:var(--shiki-token-punctuation,var(--dsw-alias-label-secondary))}.AfSEaq_tokComment{color:var(--shiki-token-comment,var(--dsw-alias-label-tertiary))}.AfSEaq_overrides{flex-direction:column;gap:6px;display:flex}.AfSEaq_overrideRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.AfSEaq_overrideInput{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-label-primary);font:inherit;background:0 0;flex:200px;padding:0 8px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}.AfSEaq_overrideInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);box-shadow:0 0 0 2px color-mix(in srgb, var(--dsw-alias-state-business-primary) 35%, transparent);outline:none}.AfSEaq_overrideValue{flex:140px}.AfSEaq_hint{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}.AfSEaq_selfStart{align-self:flex-start}";
|
|
56
56
|
const tagId$2 = "@nonamelego/dsh-catppuccin/CatppuccinRow.module.css";
|
|
57
57
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]") === null) {
|
|
58
58
|
const tag = document.createElement("style");
|
|
@@ -67,6 +67,9 @@ window.__ModuleLoader__.load({
|
|
|
67
67
|
"cube": "AfSEaq_cube",
|
|
68
68
|
"cubeHead": "AfSEaq_cubeHead",
|
|
69
69
|
"cubes": "AfSEaq_cubes",
|
|
70
|
+
"followHead": "AfSEaq_followHead",
|
|
71
|
+
"followLabel": "AfSEaq_followLabel",
|
|
72
|
+
"followRow": "AfSEaq_followRow",
|
|
70
73
|
"hint": "AfSEaq_hint",
|
|
71
74
|
"overrideInput": "AfSEaq_overrideInput",
|
|
72
75
|
"overrideRow": "AfSEaq_overrideRow",
|
|
@@ -89,9 +92,11 @@ window.__ModuleLoader__.load({
|
|
|
89
92
|
//#region src/client/CatppuccinRow.tsx
|
|
90
93
|
/**
|
|
91
94
|
* Catppuccin flavour row — the first row of the plugin's own settings page
|
|
92
|
-
* (issue #27) and of the plugin detail card. It lists the four flavour themes
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
+
* (issue #27) and of the plugin detail card. It lists the four flavour themes,
|
|
96
|
+
* a "follow the OS light/dark scheme" switch (issue #36 — NOT the same thing as
|
|
97
|
+
* the "off" cube, which hands the UI back to the official theme) and the
|
|
98
|
+
* "off" cube itself. Selecting a flavour calls the injected `select`, which
|
|
99
|
+
* switches the official ThemeRuntime and persists the choice.
|
|
95
100
|
* The row subscribes to `theme/change` so the highlighted flavour tracks the
|
|
96
101
|
* live preference.
|
|
97
102
|
*
|
|
@@ -126,8 +131,10 @@ window.__ModuleLoader__.load({
|
|
|
126
131
|
* @param props - composed slot props.
|
|
127
132
|
* @returns the row element tree.
|
|
128
133
|
*/
|
|
129
|
-
function CatppuccinRow({ t, themes, current, subscribe, select, overrides, setOverrides, shikiStyle, setShikiStyle, subscribePrefs }) {
|
|
134
|
+
function CatppuccinRow({ t, themes, current, subscribe, select, followAvailable, followSystem, setFollowSystem, followDark, setFollowDark, overrides, setOverrides, shikiStyle, setShikiStyle, subscribePrefs }) {
|
|
130
135
|
const choice = (0, react.useSyncExternalStore)(subscribe, current);
|
|
136
|
+
const following = (0, react.useSyncExternalStore)(subscribePrefs, followSystem);
|
|
137
|
+
const darkEnd = (0, react.useSyncExternalStore)(subscribePrefs, followDark);
|
|
131
138
|
const overrideMap = (0, react.useSyncExternalStore)(subscribePrefs, overrides);
|
|
132
139
|
const style = (0, react.useSyncExternalStore)(subscribePrefs, shikiStyle);
|
|
133
140
|
const [overridesOpen, setOverridesOpen] = (0, react.useState)(false);
|
|
@@ -250,6 +257,47 @@ window.__ModuleLoader__.load({
|
|
|
250
257
|
})
|
|
251
258
|
}, "off")]
|
|
252
259
|
}),
|
|
260
|
+
followAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
261
|
+
className: CatppuccinRow_module_css_default.followRow,
|
|
262
|
+
"data-catppuccin-follow": "",
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
265
|
+
className: CatppuccinRow_module_css_default.followHead,
|
|
266
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
267
|
+
checked: following,
|
|
268
|
+
onChange: (next) => {
|
|
269
|
+
setFollowSystem(next);
|
|
270
|
+
},
|
|
271
|
+
label: t("row.follow")
|
|
272
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
273
|
+
className: CatppuccinRow_module_css_default.followLabel,
|
|
274
|
+
children: t("row.follow")
|
|
275
|
+
})]
|
|
276
|
+
}),
|
|
277
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
278
|
+
className: CatppuccinRow_module_css_default.hint,
|
|
279
|
+
children: t("row.followHint")
|
|
280
|
+
}),
|
|
281
|
+
following && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
282
|
+
className: CatppuccinRow_module_css_default.shikiRow,
|
|
283
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
284
|
+
className: CatppuccinRow_module_css_default.shikiLabel,
|
|
285
|
+
children: t("row.followDark")
|
|
286
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SegmentedControl, {
|
|
287
|
+
id: "catppuccin-follow-dark",
|
|
288
|
+
label: t("row.followDark"),
|
|
289
|
+
value: darkEnd,
|
|
290
|
+
options: themes.filter((flavor) => flavor.id !== "catppuccin-latte").map((flavor) => ({
|
|
291
|
+
value: flavor.id,
|
|
292
|
+
label: flavor.label
|
|
293
|
+
})),
|
|
294
|
+
onChange: (next) => {
|
|
295
|
+
setFollowDark(next);
|
|
296
|
+
}
|
|
297
|
+
})]
|
|
298
|
+
})
|
|
299
|
+
]
|
|
300
|
+
}),
|
|
253
301
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
254
302
|
className: CatppuccinRow_module_css_default.shikiRow,
|
|
255
303
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -534,7 +582,7 @@ window.__ModuleLoader__.load({
|
|
|
534
582
|
* (item II — lazy CSS), so editing the stylesheet means editing
|
|
535
583
|
* glass.module.css and rebuilding.
|
|
536
584
|
*/
|
|
537
|
-
const GLASS_CSS_TEXT = "[data-dsh-glass] body{--dsh-glass-card:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-raised:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(64% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-hover:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(76% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 18%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff6b;--dsh-glass-drop:0 10px 32px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 38%, transparent);--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-ground:color-mix(in srgb, color-mix(in srgb, var(--dsw-alias-bg-base), #fff calc(var(--dsh-glass-brightness-white,0) * 100%)), #000 calc(var(--dsh-glass-brightness-black,0) * 100%));--dsh-glass-ambience:calc(1 - var(--dsh-glass-brightness-white,0) - var(--dsh-glass-brightness-black,0));--dsh-glass-wash-tint:#fff;--dsh-glass-wash-mix:22%}[data-dsh-glass] body[data-ds-dark-theme]{--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 24%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 16%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff14;--dsh-glass-drop:0 10px 32px #02060e73;--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-wash-tint:var(--dsw-alias-bg-layer-1);--dsh-glass-wash-mix:68%}[data-dsh-glass] body,[data-dsh-glass] [data-dsh-glass-ground-sample]{background: radial-gradient(58% 46% at 18% 6%, color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) calc(12% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 68%), radial-gradient(48% 42% at 86% 14%, color-mix(in srgb, var(--dsw-alias-state-success-tertiary) calc(10% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 62%), linear-gradient(165deg, color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))) 0%, var(--dsh-glass-ground) 55%, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) 100%)}[data-dsh-glass] [data-dsh-glass-frame],[data-dsh-glass] [data-phase],[data-dsh-glass] [data-dsh-glass-details],[data-dsh-glass-float] [data-dsh-glass-frame]>[class*=centerCol]{background:0 0}[data-dsh-glass-float] [data-phase=active] header{z-index:8;position:relative}[data-dsh-glass-float] [class*=banner]{position:static}[data-dsh-glass-float] [data-phase=active] [data-conversation-scroll]{margin-top:-95px;padding-top:107px}[data-dsh-glass] [data-phase] [class*=composerSeat][class*=composerSeat]{background:0 0}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock],[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]{position:relative}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock]:before,[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]:before{content:\"\";left:calc(-1 * var(--dsh-composer-side-clearance,16px));right:calc(-1 * var(--dsh-composer-side-clearance,16px));z-index:-1;pointer-events:none;background:color-mix(in srgb, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) calc(70% + 10% * var(--dsh-glass-frost,1)), transparent);height:calc(100% + 12px);backdrop-filter:blur(var(--dsh-glass-blur,14px));position:absolute;bottom:-4px;-webkit-mask-image:linear-gradient(#0000 0,#000 18px);mask-image:linear-gradient(#0000 0,#000 18px)}[data-dsh-glass] [data-dsh-glass-fade]{z-index:7;pointer-events:none;backdrop-filter:blur(5px);background:#ffffff2e;height:13px;position:fixed;left:0;right:0}[data-dsh-glass] body[data-ds-dark-theme] [data-dsh-glass-fade]{background:#00000024}[data-dsh-glass] [data-dsh-glass-fade=top]{top:0;-webkit-mask-image:linear-gradient(#000 0%,#0000 100%);mask-image:linear-gradient(#000 0%,#0000 100%)}[data-dsh-glass][data-windows-titlebar] [data-dsh-glass-fade=top]{display:none}[data-dsh-glass] [data-dsh-glass-fade=bottom]{bottom:0;-webkit-mask-image:linear-gradient(#0000 0%,#000 100%);mask-image:linear-gradient(#0000 0%,#000 100%)}[data-dsh-glass-float] [data-menu-material=translucent],[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-float] [role=dialog],[data-dsh-glass-float] [role=alert],[data-dsh-glass-float] [data-trigger-menu],[data-dsh-glass-float] [data-dsh-glass-surface]{border-radius:14px}[data-dsh-glass-float] [role=menuitem],[data-dsh-glass-float] [role=tooltip],[data-dsh-glass-float] [class*=pill]{border-radius:8px}[data-dsh-glass-float] button[class*=button]{border-radius:10px}[data-dsh-glass-float] [class*=iconButton],[data-dsh-glass-float] [class*=searchButton]{border-radius:8px}[data-dsh-glass-float] [class*=block]{--dsl-code-block-border-radius:14px;--dsl-diff-radius:14px;--dsl-read-radius:14px;--dsl-terminal-radius:14px;--dsl-web-radius:14px;--dsl-search-radius:14px;border-radius:14px}[data-dsh-glass-float] [data-dsh-glass-add]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-add]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-dsh-glass-surface]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-surface]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-conversation-scroll] [class*=bubble]{border:1px solid var(--dsh-glass-rim-soft);background:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(46% * var(--dsh-glass-frost,1)), transparent);border-radius:14px}[data-dsh-glass-float] [class*=card]{border-radius:14px}[data-dsh-glass-float] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]),[data-dsh-glass-compat] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]){background:color-mix(in srgb, var(--dsw-alias-bg-module-platform) calc(52% * var(--dsh-glass-frost,1)), transparent);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-changed-files],html[data-dsh-glass-float] [data-presented-file]{--changes-fill:var(--dsh-glass-card);--deliverable-fill:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-presented-file],html[data-dsh-glass-float] [data-changed-files]{background:var(--dsh-glass-card)}html[data-dsh-glass-float] [data-changed-files]>:first-child,html[data-dsh-glass-float] [data-changed-files] ul>li>:first-child,html[data-dsh-glass-float] [data-changed-files] ul{background:0 0}html[data-dsh-glass-float] [data-changed-files] ul{border-top:.5px solid var(--dsh-glass-rim-soft)}html[data-dsh-glass-float] [data-changed-files]>:first-child>:first-child,html[data-dsh-glass-float] [data-presented-file]>:first-child{background:var(--dsh-glass-card-raised)}html[data-dsh-glass-float] [data-turn-trigger]{background:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-turn-trigger]:hover{background:var(--dsh-glass-card-hover)}[data-dsh-glass] [data-dsh-glass-settings]{--dsh-glass-settings-raised:calc(38% + 38% * var(--dsh-glass-frost,1));--dsh-glass-settings-soft:calc(30% + 30% * var(--dsh-glass-frost,1));--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-750) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass] body:not([data-ds-dark-theme]) [data-dsh-glass-settings]{--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-60) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-100) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-75) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]){width:100%;margin:var(--dsh-glass-gap,12px) auto 0;max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:20px;padding:10px 16px 8px}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]):after{display:none}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [data-phase] header:not([class*=headerBlank]){width:auto;margin-left:calc(var(--dsh-glass-gap,12px) + 16px);max-width:none;margin-right:16px}[data-dsh-glass-float] [class*=sidebarCol]{--dsw-specific-sidebar-fill:transparent;z-index:9;margin:var(--dsh-glass-gap,12px);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-drop);border-radius:20px;padding:10px 12px 14px;position:relative;overflow:hidden}[data-dsh-glass-float] [class*=sidebarCol]:before{content:\"\";border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);z-index:-1;pointer-events:none;transition:border-radius .15s var(--ds-ease-in-out);position:absolute;inset:0}[data-dsh-glass-float] body{--dsw-specific-sidebar-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))))!important}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [class*=sidebarCol]{margin:var(--dsh-glass-gap,12px) calc(-1 * min(var(--dsh-glass-gap,12px), 16px)) var(--dsh-glass-gap,12px) var(--dsh-glass-gap,12px);transition:margin .15s var(--ds-ease-in-out), border-radius .15s var(--ds-ease-in-out);border-radius:16px;padding:0}[data-dsh-glass-float] [data-dsh-glass-frame]:not([data-sidebar-collapsed]) [data-dsh-glass-sidebar-root]{width:100%!important}[data-dsh-glass-float] [data-dsh-glass-trajectory]{margin:8px auto var(--dsh-glass-gap,12px);width:calc(100% - 32px);max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));height:calc(100% - 8px - var(--dsh-glass-gap,12px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);border-radius:20px;overflow:hidden}[data-dsh-glass-float] [data-dsh-glass-trajectory] [role=toolbar],[data-dsh-glass-float] [data-dsh-glass-trajectory] section[aria-label=Trajectory\\ timeline]{background:0 0}[data-dsh-glass-float] [data-composer-card],[data-dsh-glass-float] [data-composer-card]:after{border-radius:24px}[data-dsh-glass-float] [data-composer-card]{z-index:8;isolation:isolate;border:1px solid var(--dsh-glass-rim-strong);box-shadow:var(--dsh-glass-input-shadow);background:0 0;position:relative}[data-dsh-glass-float] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-float] [data-dsh-glass-inputbar]:not([class*=hero]):not(:has([data-dsh-glass-stats])){padding-bottom:var(--dsh-glass-gap,12px)}[data-dsh-glass-float] [role=treeitem][aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}[data-dsh-glass-float] button[class*=button]:hover:not(:disabled),[data-dsh-glass-float] [role=menuitem]:hover:not(:disabled){box-shadow:0 0 12px color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent)}[data-dsh-glass-float] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] body[data-ds-dark-theme] [data-menu-material=translucent]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px}[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *){background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-menu-material=translucent]:has([role=group]>[role=menuitemradio]){--dsw-menu-surface-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-2) 70%, transparent)}[data-dsh-glass-float] [data-menu-group]:has(>[role=menuitemradio])>[data-menu-group-heading]{background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:999px;align-items:center;width:fit-content;margin:3px 0 5px 6px;padding:3px 10px;display:inline-flex}[data-dsh-glass-float] [role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;border-radius:20px;position:relative}[data-dsh-glass-float] [role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass] [data-conversation-scroll]{text-shadow:0 0 1px #ffffff80}[data-dsh-glass] body[data-ds-dark-theme] [data-conversation-scroll]{text-shadow:0 0 1px #0006}[data-dsh-glass-float] [data-dsh-glass-inputbar] [data-slot]{color:var(--dsw-alias-label-secondary)}[data-dsh-glass]{--dsh-glass-entry-scale:1}[data-dsh-glass-compat]{--dsh-glass-entry-scale:0}[data-dsh-glass] [data-testid^=view-]{animation:dsh-glass-in calc(.26s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}[data-dsh-glass] [data-tool]{animation:dsh-glass-rise calc(.3s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out) both}[data-dsh-glass] [role=dialog]{animation:dsh-glass-dialog-in calc(.24s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}@keyframes dsh-glass-in{0%{opacity:0}}@keyframes dsh-glass-rise{0%{opacity:0;transform:translateY(6px)}}@keyframes dsh-glass-dialog-in{0%{opacity:0}}[data-dsh-glass] :focus-visible{outline:2px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 85%, transparent);outline-offset:1px}[data-dsh-glass] ::selection{background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 35%, transparent)}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover],[data-dsh-glass-compat] [class*=dropdown]{backdrop-filter:blur(12px)}[data-dsh-glass-compat] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(12px)}[data-dsh-glass-compat] [data-sidebar-right-panel][data-sidebar-right-open],[data-dsh-glass-compat] [data-sidebar-right-panel][data-sidebar-right-open] [class*=panel]{backdrop-filter:blur(12px)}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover],[data-dsh-glass-compat] [class*=dropdown]{background:var(--dsh-glass-card-raised)}[data-dsh-glass-compat] [data-composer-card]{isolation:isolate;backdrop-filter:none;background:0 0;position:relative}[data-dsh-glass-compat] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *):not(:focus-visible),[data-dsh-glass-compat] [data-composer-card]:not(:focus-visible),[data-dsh-glass-compat] [class*=popover]:not(:focus-visible),[data-dsh-glass-compat] [class*=dropdown]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim);outline-offset:-1px}[data-dsh-glass-compat] [role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;position:relative}[data-dsh-glass-compat] [role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,12px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-settings] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-settings] .dsm-select-menu{background:color-mix(in srgb, var(--dsh-glass-ground) 92%, transparent);backdrop-filter:blur(12px);box-shadow:var(--dsh-glass-drop)}[data-dsh-glass-settings] .dsm-panel-head{isolation:isolate;outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px;background:0 0;border-radius:14px;padding:6px 12px 4px}[data-dsh-glass-settings] .dsm-panel-head:before{content:\"\";z-index:-1;border-radius:inherit;background:color-mix(in srgb, var(--dsh-glass-ground) 78%, transparent);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){[data-dsh-glass] [data-testid^=view-],[data-dsh-glass] [data-tool],[data-dsh-glass] [role=dialog]{animation:none}}";
|
|
585
|
+
const GLASS_CSS_TEXT = "[data-dsh-glass] body{--dsh-glass-card:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-raised:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(64% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-card-hover:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(76% * var(--dsh-glass-frost,1)), transparent);--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 18%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff6b;--dsh-glass-drop:0 10px 32px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 38%, transparent);--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-ground:color-mix(in srgb, color-mix(in srgb, var(--dsw-alias-bg-base), #fff calc(var(--dsh-glass-brightness-white,0) * 100%)), #000 calc(var(--dsh-glass-brightness-black,0) * 100%));--dsh-glass-ambience:calc(1 - var(--dsh-glass-brightness-white,0) - var(--dsh-glass-brightness-black,0));--dsh-glass-wash-tint:#fff;--dsh-glass-wash-mix:22%}[data-dsh-glass] body[data-ds-dark-theme]{--dsh-glass-rim:color-mix(in srgb, var(--dsw-alias-label-primary) 24%, transparent);--dsh-glass-rim-soft:color-mix(in srgb, var(--dsw-alias-label-primary) 16%, transparent);--dsh-glass-rim-strong:color-mix(in srgb, var(--dsw-alias-label-primary) 30%, transparent);--dsh-glass-edge:inset 0 1px 0 #ffffff14;--dsh-glass-drop:0 10px 32px #02060e73;--dsh-glass-input-shadow:0 1px 2px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 65%, transparent), 0 8px 24px color-mix(in srgb, var(--dsw-alias-bg-mask-2) 80%, transparent);--dsh-glass-wash-tint:var(--dsw-alias-bg-layer-1);--dsh-glass-wash-mix:68%}[data-dsh-glass] body,[data-dsh-glass] [data-dsh-glass-ground-sample]{background: radial-gradient(calc(58% * var(--dsh-glass-glow-size,1)) calc(46% * var(--dsh-glass-glow-size,1)) at 18% 6%, color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) calc(12% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 68%), radial-gradient(calc(48% * var(--dsh-glass-glow-size,1)) calc(42% * var(--dsh-glass-glow-size,1)) at 86% 14%, color-mix(in srgb, var(--dsw-alias-state-success-tertiary) calc(10% * var(--dsh-glass-ambience) * var(--dsh-glass-glow,0) * var(--dsh-glass-glow-strength,1)), transparent), transparent 62%), linear-gradient(165deg, color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))) 0%, var(--dsh-glass-ground) 55%, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) 100%)}[data-dsh-glass] [data-dsh-glass-frame],[data-dsh-glass] [data-phase],[data-dsh-glass] [data-dsh-glass-details],[data-dsh-glass-float] [data-dsh-glass-frame]>[class*=centerCol]{background:0 0}[data-dsh-glass-float] [data-phase=active] header{z-index:8;position:relative}[data-dsh-glass-float] [class*=banner]{position:static}[data-dsh-glass-float] [data-phase=active] [data-conversation-scroll]{margin-top:-95px;padding-top:107px}[data-dsh-glass] [data-phase] [class*=composerSeat][class*=composerSeat]{background:0 0}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock],[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]{position:relative}[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[class*=dock]:before,[data-dsh-glass] [data-phase] [data-dsh-glass-inputbar]>[data-composer-dock]:before{content:\"\";left:calc(-1 * var(--dsh-composer-side-clearance,16px));right:calc(-1 * var(--dsh-composer-side-clearance,16px));z-index:-1;pointer-events:none;background:color-mix(in srgb, color-mix(in srgb, var(--dsh-glass-ground), #000 calc(5% * var(--dsh-glass-ambience))) calc(70% + 10% * var(--dsh-glass-frost,1)), transparent);height:calc(100% + 12px);backdrop-filter:blur(var(--dsh-glass-blur,14px));position:absolute;bottom:-4px;-webkit-mask-image:linear-gradient(#0000 0,#000 18px);mask-image:linear-gradient(#0000 0,#000 18px)}[data-dsh-glass] [data-dsh-glass-fade]{z-index:7;pointer-events:none;backdrop-filter:blur(5px);background:#ffffff2e;height:13px;position:fixed;left:0;right:0}[data-dsh-glass] body[data-ds-dark-theme] [data-dsh-glass-fade]{background:#00000024}[data-dsh-glass] [data-dsh-glass-fade=top]{top:0;-webkit-mask-image:linear-gradient(#000 0%,#0000 100%);mask-image:linear-gradient(#000 0%,#0000 100%)}[data-dsh-glass][data-windows-titlebar] [data-dsh-glass-fade=top]{display:none}[data-dsh-glass] [data-dsh-glass-fade=bottom]{bottom:0;-webkit-mask-image:linear-gradient(#0000 0%,#000 100%);mask-image:linear-gradient(#0000 0%,#000 100%)}[data-dsh-glass-float] [data-menu-material=translucent],[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-float] [role=dialog],[data-dsh-glass-float] [role=alert],[data-dsh-glass-float] [data-trigger-menu],[data-dsh-glass-float] [data-dsh-glass-surface]{border-radius:14px}[data-dsh-glass-float] [role=menuitem],[data-dsh-glass-float] [role=tooltip],[data-dsh-glass-float] [class*=pill]{border-radius:8px}[data-dsh-glass-float] button[class*=button]{border-radius:10px}[data-dsh-glass-float] [class*=iconButton],[data-dsh-glass-float] [class*=searchButton]{border-radius:8px}[data-dsh-glass-float] [class*=block]{--dsl-code-block-border-radius:14px;--dsl-diff-radius:14px;--dsl-read-radius:14px;--dsl-terminal-radius:14px;--dsl-web-radius:14px;--dsl-search-radius:14px;border-radius:14px}[data-dsh-glass-float] [data-dsh-glass-add]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-add]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-dsh-glass-surface]{background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-dsh-glass-surface]:hover:not(:disabled){background:var(--dsh-glass-card-hover)}[data-dsh-glass-float] [data-conversation-scroll] [class*=bubble]{border:1px solid var(--dsh-glass-rim-soft);background:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(46% * var(--dsh-glass-frost,1)), transparent);border-radius:14px}[data-dsh-glass-float] [class*=card]{border-radius:14px}[data-dsh-glass-float] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]),[data-dsh-glass-compat] [data-reader-reasoning-card]:not([data-overflow=false][data-expanded=false]){background:color-mix(in srgb, var(--dsw-alias-bg-module-platform) calc(52% * var(--dsh-glass-frost,1)), transparent);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-changed-files],html[data-dsh-glass-float] [data-presented-file]{--changes-fill:var(--dsh-glass-card);--deliverable-fill:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-presented-file],html[data-dsh-glass-float] [data-changed-files]{background:var(--dsh-glass-card)}html[data-dsh-glass-float] [data-changed-files]>:first-child,html[data-dsh-glass-float] [data-changed-files] ul>li>:first-child,html[data-dsh-glass-float] [data-changed-files] ul{background:0 0}html[data-dsh-glass-float] [data-changed-files] ul{border-top:.5px solid var(--dsh-glass-rim-soft)}html[data-dsh-glass-float] [data-changed-files]>:first-child>:first-child,html[data-dsh-glass-float] [data-presented-file]>:first-child{background:var(--dsh-glass-card-raised)}html[data-dsh-glass-float] [data-turn-trigger]{background:var(--dsh-glass-card);border-color:var(--dsh-glass-rim-soft);border-radius:14px}html[data-dsh-glass-float] [data-turn-trigger]:hover{background:var(--dsh-glass-card-hover)}[data-dsh-glass] [data-dsh-glass-settings]{--dsh-glass-settings-raised:calc(38% + 38% * var(--dsh-glass-frost,1));--dsh-glass-settings-soft:calc(30% + 30% * var(--dsh-glass-frost,1));--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-800) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-750) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-850) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass] body:not([data-ds-dark-theme]) [data-dsh-glass-settings]{--dsw-alias-bg-module-platform:color-mix(in srgb, var(--dsw-static-neutral-bluish-60) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-3:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-alias-bg-layer-2:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-raised), transparent);--dsw-alias-bg-layer-1:color-mix(in srgb, var(--dsw-static-neutral-bluish-00) var(--dsh-glass-settings-soft), transparent);--dsw-specific-sidebar-nav-item-active:color-mix(in srgb, var(--dsw-static-neutral-bluish-100) var(--dsh-glass-settings-raised), transparent);--dsw-specific-sidebar-nav-item-hover:color-mix(in srgb, var(--dsw-static-neutral-bluish-75) var(--dsh-glass-settings-soft), transparent)}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]){width:100%;margin:var(--dsh-glass-gap,12px) auto 0;max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:20px;padding:10px 16px 8px}[data-dsh-glass-float] [data-phase] header:not([class*=headerBlank]):after{display:none}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [data-phase] header:not([class*=headerBlank]){width:auto;margin-left:calc(var(--dsh-glass-gap,12px) + 16px);max-width:none;margin-right:16px}[data-dsh-glass-float] [class*=sidebarCol]{--dsw-specific-sidebar-fill:transparent;z-index:9;margin:var(--dsh-glass-gap,12px);border:1px solid var(--dsh-glass-rim-soft);box-shadow:var(--dsh-glass-drop);border-radius:20px;padding:10px 12px 14px;position:relative;overflow:hidden}[data-dsh-glass-float] [class*=sidebarCol]:before{content:\"\";border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);z-index:-1;pointer-events:none;transition:border-radius .15s var(--ds-ease-in-out);position:absolute;inset:0}[data-dsh-glass-float] body{--dsw-specific-sidebar-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-1) calc(52% * var(--dsh-glass-frost,1)), color-mix(in srgb, var(--dsh-glass-ground), var(--dsh-glass-wash-tint) calc(var(--dsh-glass-wash-mix) * var(--dsh-glass-ambience))))!important}[data-dsh-glass-float] [data-dsh-glass-frame][data-sidebar-collapsed] [class*=sidebarCol]{margin:var(--dsh-glass-gap,12px) calc(-1 * min(var(--dsh-glass-gap,12px), 16px)) var(--dsh-glass-gap,12px) var(--dsh-glass-gap,12px);transition:margin .15s var(--ds-ease-in-out), border-radius .15s var(--ds-ease-in-out);border-radius:16px;padding:0}[data-dsh-glass-float] [data-dsh-glass-frame]:not([data-sidebar-collapsed]) [data-dsh-glass-sidebar-root]{width:100%!important}[data-dsh-glass-float] [data-dsh-glass-trajectory]{margin:8px auto var(--dsh-glass-gap,12px);width:calc(100% - 32px);max-width:min(calc(var(--dsh-chat-user-width,clamp(680px, calc(var(--dsh-conversation-column-width,1500px) * .64), 920px)) + 32px), calc(100% - 32px));height:calc(100% - 8px - var(--dsh-glass-gap,12px));border:1px solid var(--dsh-glass-rim);background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);border-radius:20px;overflow:hidden}[data-dsh-glass-float] [data-dsh-glass-trajectory] [role=toolbar],[data-dsh-glass-float] [data-dsh-glass-trajectory] section[aria-label=Trajectory\\ timeline]{background:0 0}[data-dsh-glass-float] [data-composer-card],[data-dsh-glass-float] [data-composer-card]:after{border-radius:24px}[data-dsh-glass-float] [data-composer-card]{z-index:8;isolation:isolate;border:1px solid var(--dsh-glass-rim-strong);box-shadow:var(--dsh-glass-input-shadow);background:0 0;position:relative}[data-dsh-glass-float] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card);box-shadow:var(--dsh-glass-edge);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-float] [data-dsh-glass-inputbar]:not([class*=hero]):not(:has([data-dsh-glass-stats])){padding-bottom:var(--dsh-glass-gap,12px)}[data-dsh-glass-float] [role=treeitem][aria-selected=true]{background:var(--dsw-alias-interactive-bg-hover)}[data-dsh-glass-float] button[class*=button]:hover:not(:disabled),[data-dsh-glass-float] [role=menuitem]:hover:not(:disabled){box-shadow:0 0 12px color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent)}[data-dsh-glass-float] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] body[data-ds-dark-theme] [data-menu-material=translucent]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px}[data-dsh-glass-float] [role=menu]:not([data-menu-material]):not([data-menu-material] *){background:var(--dsh-glass-card-raised);border:1px solid var(--dsh-glass-rim-soft);backdrop-filter:blur(var(--dsh-glass-blur,14px))}[data-dsh-glass-float] [data-menu-material=translucent]:has([role=group]>[role=menuitemradio]){--dsw-menu-surface-fill:color-mix(in srgb, var(--dsw-alias-bg-layer-2) 70%, transparent)}[data-dsh-glass-float] [data-menu-group]:has(>[role=menuitemradio])>[data-menu-group-heading]{background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));border-radius:999px;align-items:center;width:fit-content;margin:3px 0 5px 6px;padding:3px 10px;display:inline-flex}[data-dsh-glass-float] [role=presentation]>[role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;border-radius:20px;position:relative}[data-dsh-glass-float] [role=presentation]>[role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,14px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass] [data-conversation-scroll]{text-shadow:0 0 1px #ffffff80}[data-dsh-glass] body[data-ds-dark-theme] [data-conversation-scroll]{text-shadow:0 0 1px #0006}[data-dsh-glass-float] [data-dsh-glass-inputbar] [data-slot]{color:var(--dsw-alias-label-secondary)}[data-dsh-glass]{--dsh-glass-entry-scale:1}[data-dsh-glass-compat]{--dsh-glass-entry-scale:0}[data-dsh-glass] [data-testid^=view-]{animation:dsh-glass-in calc(.26s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}[data-dsh-glass] [data-tool]{animation:dsh-glass-rise calc(.3s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out) both}[data-dsh-glass] [role=dialog]{animation:dsh-glass-dialog-in calc(.24s * var(--dsh-glass-entry-scale,1)) var(--ds-ease-in-out)}@keyframes dsh-glass-in{0%{opacity:0}}@keyframes dsh-glass-rise{0%{opacity:0;transform:translateY(6px)}}@keyframes dsh-glass-dialog-in{0%{opacity:0}}[data-dsh-glass] :focus-visible{outline:2px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 85%, transparent);outline-offset:1px}[data-dsh-glass] ::selection{background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 35%, transparent)}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover],[data-dsh-glass-compat] [class*=dropdown]{backdrop-filter:blur(12px)}[data-dsh-glass-compat] [data-menu-material=translucent]:not(:focus-visible){--dsw-menu-surface-fill:var(--dsh-glass-card-raised);--dsw-menu-backdrop-filter:blur(12px)}[data-dsh-glass-compat] [data-sidebar-right-panel][data-sidebar-right-open],[data-dsh-glass-compat] [data-sidebar-right-panel][data-sidebar-right-open] [class*=panel]{backdrop-filter:blur(12px)}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-compat] [class*=popover],[data-dsh-glass-compat] [class*=dropdown]{background:var(--dsh-glass-card-raised)}[data-dsh-glass-compat] [data-composer-card]{isolation:isolate;backdrop-filter:none;background:0 0;position:relative}[data-dsh-glass-compat] [data-composer-card]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}[data-dsh-glass-compat] [role=menu]:not([data-menu-material]):not([data-menu-material] *):not(:focus-visible),[data-dsh-glass-compat] [data-composer-card]:not(:focus-visible),[data-dsh-glass-compat] [class*=popover]:not(:focus-visible),[data-dsh-glass-compat] [class*=dropdown]:not(:focus-visible){outline:1px solid var(--dsh-glass-rim);outline-offset:-1px}[data-dsh-glass-compat] [role=presentation]>[role=dialog][aria-modal=true]{isolation:isolate;backdrop-filter:none;border:1px solid var(--dsh-glass-rim);box-shadow:var(--dsh-glass-edge), var(--dsh-glass-drop);background:0 0;position:relative}[data-dsh-glass-compat] [role=presentation]>[role=dialog][aria-modal=true]:before{content:\"\";z-index:-1;border-radius:inherit;background:var(--dsh-glass-card-raised);backdrop-filter:blur(var(--dsh-glass-blur,12px));pointer-events:none;position:absolute;inset:0}[data-dsh-glass-settings] [role=menu]:not([data-menu-material]):not([data-menu-material] *),[data-dsh-glass-settings] .dsm-select-menu{background:color-mix(in srgb, var(--dsh-glass-ground) 92%, transparent);backdrop-filter:blur(12px);box-shadow:var(--dsh-glass-drop)}[data-dsh-glass-settings] .dsm-panel-head{isolation:isolate;outline:1px solid var(--dsh-glass-rim-soft);outline-offset:-1px;background:0 0;border-radius:14px;padding:6px 12px 4px}[data-dsh-glass-settings] .dsm-panel-head:before{content:\"\";z-index:-1;border-radius:inherit;background:color-mix(in srgb, var(--dsh-glass-ground) 78%, transparent);backdrop-filter:blur(12px);pointer-events:none;position:absolute;inset:0}@media (prefers-reduced-motion:reduce){[data-dsh-glass] [data-testid^=view-],[data-dsh-glass] [data-tool],[data-dsh-glass] [role=dialog]{animation:none}}";
|
|
538
586
|
/** Legacy settings namespace (DSH <= 0.1.6-alpha.2): the Host registers it
|
|
539
587
|
* through `settings.installSection`, the Client binds it through
|
|
540
588
|
* `ctx.settingsScope` (see `src/settings-catppuccin.ts`). */
|
|
@@ -577,6 +625,21 @@ window.__ModuleLoader__.load({
|
|
|
577
625
|
"catppuccin-macchiato",
|
|
578
626
|
"catppuccin-mocha"
|
|
579
627
|
];
|
|
628
|
+
/**
|
|
629
|
+
* The LIGHT end of "follow the OS" (issue #36). Latte is the only light
|
|
630
|
+
* flavour Catppuccin ships, so the light half is a constant instead of a
|
|
631
|
+
* setting — a picker here would offer exactly one real option.
|
|
632
|
+
*/
|
|
633
|
+
const FOLLOW_LIGHT_FLAVOR = "catppuccin-latte";
|
|
634
|
+
/** The flavours the follow mode may use for its DARK end. Only the three dark
|
|
635
|
+
* flavours: Latte here would paint a light palette into the dark half. */
|
|
636
|
+
const FOLLOW_DARK_FLAVORS = [
|
|
637
|
+
"catppuccin-frappe",
|
|
638
|
+
"catppuccin-macchiato",
|
|
639
|
+
"catppuccin-mocha"
|
|
640
|
+
];
|
|
641
|
+
/** Shipped follow-mode dark end: Mocha, Catppuccin's most common dark pick. */
|
|
642
|
+
const DEFAULT_FOLLOW_DARK = "catppuccin-mocha";
|
|
580
643
|
/** Shipped glass defaults — the single source of truth; the client glass layer
|
|
581
644
|
* (`src/client/glass/glass-layer.ts`) derives its knob defaults from here. */
|
|
582
645
|
const DEFAULT_GLASS = {
|
|
@@ -587,6 +650,7 @@ window.__ModuleLoader__.load({
|
|
|
587
650
|
brightness: 50,
|
|
588
651
|
gap: 12,
|
|
589
652
|
glowStrength: 100,
|
|
653
|
+
glowSize: 100,
|
|
590
654
|
glow: false
|
|
591
655
|
};
|
|
592
656
|
/** Shipped update-check channel: chase the stable `latest` tag. */
|
|
@@ -598,6 +662,8 @@ window.__ModuleLoader__.load({
|
|
|
598
662
|
return {
|
|
599
663
|
version: 1,
|
|
600
664
|
flavor: "off",
|
|
665
|
+
followSystem: false,
|
|
666
|
+
followDark: DEFAULT_FOLLOW_DARK,
|
|
601
667
|
glass: { ...DEFAULT_GLASS },
|
|
602
668
|
autoCheck: true,
|
|
603
669
|
updateChannel: DEFAULT_UPDATE_CHANNEL,
|
|
@@ -649,6 +715,10 @@ window.__ModuleLoader__.load({
|
|
|
649
715
|
const flavor = raw.flavor;
|
|
650
716
|
if (typeof flavor === "string" && CATPPUCCIN_THEME_IDS.includes(flavor)) state.flavor = flavor;
|
|
651
717
|
else if (flavor === "off") state.flavor = "off";
|
|
718
|
+
const followDark = raw.followDark;
|
|
719
|
+
state.followDark = typeof followDark === "string" && FOLLOW_DARK_FLAVORS.includes(followDark) ? followDark : DEFAULT_FOLLOW_DARK;
|
|
720
|
+
state.followSystem = raw.followSystem === true;
|
|
721
|
+
if (state.flavor === "off") state.followSystem = false;
|
|
652
722
|
const glass = typeof raw.glass === "object" && raw.glass !== null ? raw.glass : {};
|
|
653
723
|
state.glass.enabled = glass.enabled === true;
|
|
654
724
|
state.glass.mode = glass.mode === "compat" ? "compat" : "mica";
|
|
@@ -657,6 +727,7 @@ window.__ModuleLoader__.load({
|
|
|
657
727
|
state.glass.brightness = clampFinite(glass.brightness, 0, 100, DEFAULT_GLASS.brightness);
|
|
658
728
|
state.glass.gap = clampFinite(glass.gap, 4, 24, DEFAULT_GLASS.gap);
|
|
659
729
|
state.glass.glowStrength = clampFinite(glass.glowStrength, 0, 200, DEFAULT_GLASS.glowStrength);
|
|
730
|
+
state.glass.glowSize = clampFinite(glass.glowSize, 100, 250, DEFAULT_GLASS.glowSize);
|
|
660
731
|
state.glass.glow = glass.glow === true;
|
|
661
732
|
state.autoCheck = raw.autoCheck !== false;
|
|
662
733
|
state.updateChannel = raw.updateChannel === "beta" ? "beta" : "latest";
|
|
@@ -669,12 +740,14 @@ window.__ModuleLoader__.load({
|
|
|
669
740
|
* "no durable state yet" apart from "an explicit default choice". */
|
|
670
741
|
function isDefaultState(state) {
|
|
671
742
|
const expected = defaultState();
|
|
672
|
-
return state.flavor === expected.flavor && state.glass.enabled === expected.glass.enabled && state.glass.mode === expected.glass.mode && state.glass.blur === expected.glass.blur && state.glass.frost === expected.glass.frost && state.glass.brightness === expected.glass.brightness && state.glass.gap === expected.glass.gap && state.glass.glowStrength === expected.glass.glowStrength && state.glass.glow === expected.glass.glow && state.autoCheck === expected.autoCheck && state.updateChannel === expected.updateChannel && Object.keys(state.overrides).length === 0 && state.shikiStyle === expected.shikiStyle;
|
|
743
|
+
return state.flavor === expected.flavor && state.followSystem === expected.followSystem && state.followDark === expected.followDark && state.glass.enabled === expected.glass.enabled && state.glass.mode === expected.glass.mode && state.glass.blur === expected.glass.blur && state.glass.frost === expected.glass.frost && state.glass.brightness === expected.glass.brightness && state.glass.gap === expected.glass.gap && state.glass.glowStrength === expected.glass.glowStrength && state.glass.glowSize === expected.glass.glowSize && state.glass.glow === expected.glass.glow && state.autoCheck === expected.autoCheck && state.updateChannel === expected.updateChannel && Object.keys(state.overrides).length === 0 && state.shikiStyle === expected.shikiStyle;
|
|
673
744
|
}
|
|
674
745
|
/** Drop the synthetic `version` field: full state → settings-document section. */
|
|
675
746
|
function settingsSectionFromState(state) {
|
|
676
747
|
return {
|
|
677
748
|
flavor: state.flavor,
|
|
749
|
+
followSystem: state.followSystem,
|
|
750
|
+
followDark: state.followDark,
|
|
678
751
|
glass: { ...state.glass },
|
|
679
752
|
autoCheck: state.autoCheck,
|
|
680
753
|
updateChannel: state.updateChannel,
|
|
@@ -697,7 +770,7 @@ window.__ModuleLoader__.load({
|
|
|
697
770
|
/** Whether two settings sections are field-for-field equal (used to skip
|
|
698
771
|
* redundant mirror writes and to recognize the Host echoing our own write). */
|
|
699
772
|
function settingsSectionsEqual(a, b) {
|
|
700
|
-
return a.flavor === b.flavor && a.glass.enabled === b.glass.enabled && a.glass.mode === b.glass.mode && a.glass.blur === b.glass.blur && a.glass.frost === b.glass.frost && a.glass.brightness === b.glass.brightness && a.glass.gap === b.glass.gap && a.glass.glowStrength === b.glass.glowStrength && a.glass.glow === b.glass.glow && a.autoCheck === b.autoCheck && a.updateChannel === b.updateChannel && a.shikiStyle === b.shikiStyle && sameOverrides(a.overrides, b.overrides);
|
|
773
|
+
return a.flavor === b.flavor && a.followSystem === b.followSystem && a.followDark === b.followDark && a.glass.enabled === b.glass.enabled && a.glass.mode === b.glass.mode && a.glass.blur === b.glass.blur && a.glass.frost === b.glass.frost && a.glass.brightness === b.glass.brightness && a.glass.gap === b.glass.gap && a.glass.glowStrength === b.glass.glowStrength && a.glass.glowSize === b.glass.glowSize && a.glass.glow === b.glass.glow && a.autoCheck === b.autoCheck && a.updateChannel === b.updateChannel && a.shikiStyle === b.shikiStyle && sameOverrides(a.overrides, b.overrides);
|
|
701
774
|
}
|
|
702
775
|
/**
|
|
703
776
|
* Replay the local changes a window made BEFORE the durable channel became
|
|
@@ -752,6 +825,8 @@ window.__ModuleLoader__.load({
|
|
|
752
825
|
}
|
|
753
826
|
};
|
|
754
827
|
carry("flavor");
|
|
828
|
+
carry("followSystem");
|
|
829
|
+
carry("followDark");
|
|
755
830
|
carryGlass("enabled");
|
|
756
831
|
carryGlass("mode");
|
|
757
832
|
carryGlass("blur");
|
|
@@ -759,6 +834,7 @@ window.__ModuleLoader__.load({
|
|
|
759
834
|
carryGlass("brightness");
|
|
760
835
|
carryGlass("gap");
|
|
761
836
|
carryGlass("glowStrength");
|
|
837
|
+
carryGlass("glowSize");
|
|
762
838
|
carryGlass("glow");
|
|
763
839
|
carry("autoCheck");
|
|
764
840
|
carry("updateChannel");
|
|
@@ -793,7 +869,8 @@ window.__ModuleLoader__.load({
|
|
|
793
869
|
"--dsh-glass-brightness-white",
|
|
794
870
|
"--dsh-glass-glow",
|
|
795
871
|
"--dsh-glass-gap",
|
|
796
|
-
"--dsh-glass-glow-strength"
|
|
872
|
+
"--dsh-glass-glow-strength",
|
|
873
|
+
"--dsh-glass-glow-size"
|
|
797
874
|
];
|
|
798
875
|
/** localStorage key carrying the layer enable flag. */
|
|
799
876
|
const GLASS_ENABLED_KEY = "dsh.catppuccin.glass.enabled";
|
|
@@ -822,6 +899,7 @@ window.__ModuleLoader__.load({
|
|
|
822
899
|
brightness: DEFAULT_GLASS.brightness,
|
|
823
900
|
gap: DEFAULT_GLASS.gap,
|
|
824
901
|
glowStrength: DEFAULT_GLASS.glowStrength,
|
|
902
|
+
glowSize: DEFAULT_GLASS.glowSize,
|
|
825
903
|
glow: DEFAULT_GLASS.glow
|
|
826
904
|
};
|
|
827
905
|
/** Numeric knob keys and their localStorage names. */
|
|
@@ -830,7 +908,8 @@ window.__ModuleLoader__.load({
|
|
|
830
908
|
frost: "dsh.catppuccin.glass.frost",
|
|
831
909
|
brightness: "dsh.catppuccin.glass.brightness",
|
|
832
910
|
gap: "dsh.catppuccin.glass.gap",
|
|
833
|
-
glowStrength: "dsh.catppuccin.glass.glow-strength"
|
|
911
|
+
glowStrength: "dsh.catppuccin.glass.glow-strength",
|
|
912
|
+
glowSize: "dsh.catppuccin.glass.glow-size"
|
|
834
913
|
};
|
|
835
914
|
/** Per-knob [min, max]. One table instead of the old `key === 'blur' ? 40 : 100`
|
|
836
915
|
* test: the gap knob is the first one that is NOT zero-based (4-24, issue
|
|
@@ -841,7 +920,8 @@ window.__ModuleLoader__.load({
|
|
|
841
920
|
frost: [0, 100],
|
|
842
921
|
brightness: [0, 100],
|
|
843
922
|
gap: [4, 24],
|
|
844
|
-
glowStrength: [0, 200]
|
|
923
|
+
glowStrength: [0, 200],
|
|
924
|
+
glowSize: [100, 250]
|
|
845
925
|
};
|
|
846
926
|
/** The localStorage names of the numeric knobs — the reverse of
|
|
847
927
|
* `NUMERIC_KEYS`. Used by the cross-tab `storage` handler: the event's `key`
|
|
@@ -1010,6 +1090,7 @@ window.__ModuleLoader__.load({
|
|
|
1010
1090
|
brightness: this.settings.brightness,
|
|
1011
1091
|
gap: this.settings.gap,
|
|
1012
1092
|
glowStrength: this.settings.glowStrength,
|
|
1093
|
+
glowSize: this.settings.glowSize,
|
|
1013
1094
|
glow: this.settings.glow
|
|
1014
1095
|
};
|
|
1015
1096
|
}
|
|
@@ -1025,6 +1106,7 @@ window.__ModuleLoader__.load({
|
|
|
1025
1106
|
brightness: clampSetting("brightness", remote.brightness),
|
|
1026
1107
|
gap: clampSetting("gap", remote.gap),
|
|
1027
1108
|
glowStrength: clampSetting("glowStrength", remote.glowStrength),
|
|
1109
|
+
glowSize: clampSetting("glowSize", remote.glowSize),
|
|
1028
1110
|
glow: remote.glow === true
|
|
1029
1111
|
};
|
|
1030
1112
|
writeEnabled(this.enabled);
|
|
@@ -1034,6 +1116,7 @@ window.__ModuleLoader__.load({
|
|
|
1034
1116
|
writeSetting("brightness", this.settings.brightness);
|
|
1035
1117
|
writeSetting("gap", this.settings.gap);
|
|
1036
1118
|
writeSetting("glowStrength", this.settings.glowStrength);
|
|
1119
|
+
writeSetting("glowSize", this.settings.glowSize);
|
|
1037
1120
|
writeGlow(this.settings.glow);
|
|
1038
1121
|
this.sync();
|
|
1039
1122
|
}
|
|
@@ -1114,6 +1197,18 @@ window.__ModuleLoader__.load({
|
|
|
1114
1197
|
if (this.enabled) this.applySettings();
|
|
1115
1198
|
this.publish();
|
|
1116
1199
|
}
|
|
1200
|
+
/** Set the ground-glow SPREAD, percent of the shipped radii (issue #32
|
|
1201
|
+
* follow-up). Geometry only: the peak alpha stays put, the falloff flattens
|
|
1202
|
+
* — and positions stay hardcoded (no "where" axis, see
|
|
1203
|
+
* `docs/issue-32-glow-tuning.md` §2). */
|
|
1204
|
+
setGlowSize(value) {
|
|
1205
|
+
const next = clampSetting("glowSize", value);
|
|
1206
|
+
if (next === this.settings.glowSize) return;
|
|
1207
|
+
this.settings.glowSize = next;
|
|
1208
|
+
writeSetting("glowSize", next);
|
|
1209
|
+
if (this.enabled) this.applySettings();
|
|
1210
|
+
this.publish();
|
|
1211
|
+
}
|
|
1117
1212
|
/** Restore every knob to the shipped defaults (persisted immediately). */
|
|
1118
1213
|
resetDefaults() {
|
|
1119
1214
|
this.settings = { ...SETTINGS_DEFAULTS };
|
|
@@ -1123,6 +1218,7 @@ window.__ModuleLoader__.load({
|
|
|
1123
1218
|
writeSetting("brightness", this.settings.brightness);
|
|
1124
1219
|
writeSetting("gap", this.settings.gap);
|
|
1125
1220
|
writeSetting("glowStrength", this.settings.glowStrength);
|
|
1221
|
+
writeSetting("glowSize", this.settings.glowSize);
|
|
1126
1222
|
writeGlow(this.settings.glow);
|
|
1127
1223
|
if (this.enabled) this.applySettings();
|
|
1128
1224
|
this.publish();
|
|
@@ -1136,6 +1232,7 @@ window.__ModuleLoader__.load({
|
|
|
1136
1232
|
brightness: readSetting("brightness"),
|
|
1137
1233
|
gap: readSetting("gap"),
|
|
1138
1234
|
glowStrength: readSetting("glowStrength"),
|
|
1235
|
+
glowSize: readSetting("glowSize"),
|
|
1139
1236
|
glow: readGlow()
|
|
1140
1237
|
};
|
|
1141
1238
|
}
|
|
@@ -1166,7 +1263,8 @@ window.__ModuleLoader__.load({
|
|
|
1166
1263
|
"--dsh-glass-brightness-white": String(dark ? 0 : Math.max(0, (this.settings.brightness - 50) / 50)),
|
|
1167
1264
|
"--dsh-glass-glow": this.settings.glow ? "1" : "0",
|
|
1168
1265
|
"--dsh-glass-gap": `${this.settings.gap}px`,
|
|
1169
|
-
"--dsh-glass-glow-strength": String(this.settings.glowStrength / 100)
|
|
1266
|
+
"--dsh-glass-glow-strength": String(this.settings.glowStrength / 100),
|
|
1267
|
+
"--dsh-glass-glow-size": String(this.settings.glowSize / 100)
|
|
1170
1268
|
};
|
|
1171
1269
|
for (const [property, value] of Object.entries(knobs)) style.setProperty(property, value);
|
|
1172
1270
|
const compat = this.settings.mode === "compat";
|
|
@@ -1410,8 +1508,8 @@ window.__ModuleLoader__.load({
|
|
|
1410
1508
|
* @param props - composed slot props.
|
|
1411
1509
|
* @returns the settings row.
|
|
1412
1510
|
*/
|
|
1413
|
-
function GlassRow({ t, getState, subscribe, setEnabled, setMode, setBlur, setFrost, setBrightness, setGap, setGlow, setGlowStrength, resetDefaults, onPreviewMain }) {
|
|
1414
|
-
const { enabled, mode, blur, frost, brightness, gap, glow, glowStrength, dark } = (0, react.useSyncExternalStore)(subscribe, getState);
|
|
1511
|
+
function GlassRow({ t, getState, subscribe, setEnabled, setMode, setBlur, setFrost, setBrightness, setGap, setGlow, setGlowStrength, setGlowSize, resetDefaults, onPreviewMain }) {
|
|
1512
|
+
const { enabled, mode, blur, frost, brightness, gap, glow, glowStrength, glowSize, dark } = (0, react.useSyncExternalStore)(subscribe, getState);
|
|
1415
1513
|
const bgMin = dark ? 0 : 50;
|
|
1416
1514
|
const bgMax = dark ? 50 : 100;
|
|
1417
1515
|
const bgDisplay = Math.min(bgMax, Math.max(bgMin, brightness));
|
|
@@ -1586,7 +1684,7 @@ window.__ModuleLoader__.load({
|
|
|
1586
1684
|
className: GlassRow_module_css_default.rowHint,
|
|
1587
1685
|
children: t("glass.glowHint")
|
|
1588
1686
|
}),
|
|
1589
|
-
glow && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Knob, {
|
|
1687
|
+
glow && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Knob, {
|
|
1590
1688
|
label: t("glass.glowStrength"),
|
|
1591
1689
|
value: glowStrength,
|
|
1592
1690
|
min: 0,
|
|
@@ -1594,7 +1692,15 @@ window.__ModuleLoader__.load({
|
|
|
1594
1692
|
step: 5,
|
|
1595
1693
|
unit: "%",
|
|
1596
1694
|
onChange: setGlowStrength
|
|
1597
|
-
}),
|
|
1695
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Knob, {
|
|
1696
|
+
label: t("glass.glowSize"),
|
|
1697
|
+
value: glowSize,
|
|
1698
|
+
min: 100,
|
|
1699
|
+
max: 250,
|
|
1700
|
+
step: 5,
|
|
1701
|
+
unit: "%",
|
|
1702
|
+
onChange: setGlowSize
|
|
1703
|
+
})] }),
|
|
1598
1704
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1599
1705
|
className: GlassRow_module_css_default.sampleRow,
|
|
1600
1706
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -2178,7 +2284,10 @@ window.__ModuleLoader__.load({
|
|
|
2178
2284
|
"page.title": "Catppuccin 外观设置",
|
|
2179
2285
|
"row.title": "Catppuccin 主题",
|
|
2180
2286
|
"row.description": "Latte / Frappé / Macchiato / Mocha 四款配色,一键切换。",
|
|
2181
|
-
"row.off": "
|
|
2287
|
+
"row.off": "关闭(官方主题)",
|
|
2288
|
+
"row.follow": "跟随系统深色/浅色",
|
|
2289
|
+
"row.followHint": "浅色时用 Latte,深色时用下方选中的风味;跟随 Windows 的深浅色设置切换,原生标题栏与窗口按钮一起变。深色端默认 Mocha。",
|
|
2290
|
+
"row.followDark": "深色端风味",
|
|
2182
2291
|
"row.helpLabel": "关于 Catppuccin 主题",
|
|
2183
2292
|
"row.help": "Catppuccin 社区出品的四款配色:Latte(浅色)、Frappé / Macchiato / Mocha(深色)。选择后立即生效并持久保存。",
|
|
2184
2293
|
"row.shikiStyle": "代码高亮风格",
|
|
@@ -2223,6 +2332,7 @@ window.__ModuleLoader__.load({
|
|
|
2223
2332
|
"glass.glow": "地面光斑",
|
|
2224
2333
|
"glass.glowHint": "在渐变地面上叠加两枚柔光斑(0.6.3 的观感)。光斑固定在屏幕上,各块玻璃面板会透出它的不同部位,所以默认关闭;打开后左上角会明显偏亮,强度可调,100% 即上述观感。背景亮度拉满时氛围归零,光斑会一并淡出",
|
|
2225
2334
|
"glass.glowStrength": "地面光斑强度",
|
|
2335
|
+
"glass.glowSize": "地面光斑范围",
|
|
2226
2336
|
"glass.previewGround": "地面样本",
|
|
2227
2337
|
"glass.previewGroundHint": "这一段就是页面地面的真实取色:拖动「背景亮度」或切换「地面光斑」,它当场变化。",
|
|
2228
2338
|
"glass.reset": "还原默认值",
|
|
@@ -2272,7 +2382,10 @@ window.__ModuleLoader__.load({
|
|
|
2272
2382
|
"page.title": "Catppuccin appearance",
|
|
2273
2383
|
"row.title": "Catppuccin theme",
|
|
2274
2384
|
"row.description": "Latte / Frappé / Macchiato / Mocha, one click away.",
|
|
2275
|
-
"row.off": "
|
|
2385
|
+
"row.off": "Turn off (official theme)",
|
|
2386
|
+
"row.follow": "Follow system light/dark",
|
|
2387
|
+
"row.followHint": "Latte on light, the flavour picked below on dark; switches with the Windows light/dark setting, native title bar and window buttons included. The dark end defaults to Mocha.",
|
|
2388
|
+
"row.followDark": "Dark-end flavour",
|
|
2276
2389
|
"row.helpLabel": "About the Catppuccin theme",
|
|
2277
2390
|
"row.help": "Four palettes from the Catppuccin community: Latte (light), Frappé / Macchiato / Mocha (dark). Applies instantly and persists.",
|
|
2278
2391
|
"row.shikiStyle": "Code highlight style",
|
|
@@ -2317,6 +2430,7 @@ window.__ModuleLoader__.load({
|
|
|
2317
2430
|
"glass.glow": "Ground glows",
|
|
2318
2431
|
"glass.glowHint": "Adds the two soft radial glows back on top of the gradient ground (the 0.6.3 look). They are pinned to the screen while the glass panes sit elsewhere, so each pane transmits a different slice of them — off by default; turning it on visibly brightens the top-left corner, and the strength knob below scales it (100% is that look). At maximum backdrop brightness the ambience collapses and the glows fade out with it",
|
|
2319
2432
|
"glass.glowStrength": "Ground glow strength",
|
|
2433
|
+
"glass.glowSize": "Ground glow spread",
|
|
2320
2434
|
"glass.previewGround": "Ground sample",
|
|
2321
2435
|
"glass.previewGroundHint": "This strip is the page ground itself: drag the brightness knob or toggle the glows and it changes on the spot.",
|
|
2322
2436
|
"glass.reset": "Reset to defaults",
|
|
@@ -2366,7 +2480,10 @@ window.__ModuleLoader__.load({
|
|
|
2366
2480
|
"page.title": "Catppuccin 外観設定",
|
|
2367
2481
|
"row.title": "Catppuccin テーマ",
|
|
2368
2482
|
"row.description": "Latte / Frappé / Macchiato / Mocha の4色をワンクリックで切替。",
|
|
2369
|
-
"row.off": "
|
|
2483
|
+
"row.off": "オフ(標準テーマ)",
|
|
2484
|
+
"row.follow": "システムのライト/ダークに追従",
|
|
2485
|
+
"row.followHint": "ライトは Latte、ダークは下で選んだフレーバー。Windows のライト/ダーク設定に合わせて切り替わり、ネイティブのタイトルバーとウィンドウボタンも追従します。ダーク側の既定は Mocha。",
|
|
2486
|
+
"row.followDark": "ダーク側のフレーバー",
|
|
2370
2487
|
"row.helpLabel": "Catppuccin テーマについて",
|
|
2371
2488
|
"row.help": "Catppuccin コミュニティの4色: Latte(ライト)、Frappé / Macchiato / Mocha(ダーク)。選択直後に反映され、保存されます。",
|
|
2372
2489
|
"row.shikiStyle": "コードハイライト",
|
|
@@ -2411,6 +2528,7 @@ window.__ModuleLoader__.load({
|
|
|
2411
2528
|
"glass.glow": "地面の光だまり",
|
|
2412
2529
|
"glass.glowHint": "グラデーションの地面に 2 つの柔らかな光だまりを重ねます(0.6.3 の見た目)。光だまりは画面に固定され、各ガラス面はその別々の部分を透かすため、既定ではオフ。オンにすると左上が明るくなります。下の強さで拡大でき、100% がその見た目です。背景の明るさを最大にすると雰囲気が 0 になり、光だまりも消えます",
|
|
2413
2530
|
"glass.glowStrength": "地面の光だまりの強さ",
|
|
2531
|
+
"glass.glowSize": "地面の光だまりの広がり",
|
|
2414
2532
|
"glass.previewGround": "地面サンプル",
|
|
2415
2533
|
"glass.previewGroundHint": "この帯はページの地面そのものです。背景の輝度を動かすか光だまりを切り替えると、その場で変わります。",
|
|
2416
2534
|
"glass.reset": "デフォルトに戻す",
|
|
@@ -2460,7 +2578,10 @@ window.__ModuleLoader__.load({
|
|
|
2460
2578
|
"page.title": "Catppuccin 모양 설정",
|
|
2461
2579
|
"row.title": "Catppuccin 테마",
|
|
2462
2580
|
"row.description": "Latte / Frappé / Macchiato / Mocha 네 가지 배색, 한 번의 클릭으로 전환.",
|
|
2463
|
-
"row.off": "
|
|
2581
|
+
"row.off": "끄기(기본 테마)",
|
|
2582
|
+
"row.follow": "시스템 밝기/어둡기 따르기",
|
|
2583
|
+
"row.followHint": "밝을 때는 Latte, 어두울 때는 아래에서 고른 플레이버. Windows 밝기 설정에 따라 전환되며 기본 제목 표시줄과 창 버튼도 함께 바뀝니다. 어두운 쪽 기본값은 Mocha.",
|
|
2584
|
+
"row.followDark": "어두운 쪽 플레이버",
|
|
2464
2585
|
"row.helpLabel": "Catppuccin 테마 정보",
|
|
2465
2586
|
"row.help": "Catppuccin 커뮤니티의 네 가지 배색: Latte(밝음), Frappé / Macchiato / Mocha(어두움). 선택 즉시 적용되고 저장됩니다.",
|
|
2466
2587
|
"row.shikiStyle": "코드 하이라이트",
|
|
@@ -2505,6 +2626,7 @@ window.__ModuleLoader__.load({
|
|
|
2505
2626
|
"glass.glow": "지면 광점",
|
|
2506
2627
|
"glass.glowHint": "그라데이션 지면 위에 부드러운 광점 두 개를 다시 올립니다(0.6.3 모양). 광점은 화면에 고정되어 각 유리 패널이 서로 다른 부분을 비추므로 기본값은 꺼짐이며, 켜면 왼쪽 위가 밝아집니다. 아래 강도로 키울 수 있고 100%가 그 모양입니다. 배경 밝기를 최대로 올리면 분위기가 0이 되어 광점도 사라집니다",
|
|
2507
2628
|
"glass.glowStrength": "지면 광점 강도",
|
|
2629
|
+
"glass.glowSize": "지면 광점 범위",
|
|
2508
2630
|
"glass.previewGround": "바닥 샘플",
|
|
2509
2631
|
"glass.previewGroundHint": "이 띠는 페이지 바닥 그대로입니다. 배경 밝기를 움직이거나 빛무리를 켜면 바로 바뀝니다.",
|
|
2510
2632
|
"glass.reset": "기본값으로 되돌리기",
|
|
@@ -2554,7 +2676,10 @@ window.__ModuleLoader__.load({
|
|
|
2554
2676
|
"page.title": "Aspecto de Catppuccin",
|
|
2555
2677
|
"row.title": "Tema Catppuccin",
|
|
2556
2678
|
"row.description": "Latte / Frappé / Macchiato / Mocha, a un clic.",
|
|
2557
|
-
"row.off": "
|
|
2679
|
+
"row.off": "Desactivar (tema oficial)",
|
|
2680
|
+
"row.follow": "Seguir el modo claro/oscuro del sistema",
|
|
2681
|
+
"row.followHint": "Latte en claro y el sabor elegido abajo en oscuro; cambia con el ajuste de Windows, incluidos la barra de título nativa y los botones de la ventana. El extremo oscuro es Mocha por defecto.",
|
|
2682
|
+
"row.followDark": "Sabor del extremo oscuro",
|
|
2558
2683
|
"row.helpLabel": "Acerca del tema Catppuccin",
|
|
2559
2684
|
"row.help": "Cuatro paletas de la comunidad Catppuccin: Latte (claro), Frappé / Macchiato / Mocha (oscuro). Se aplican al instante y se guardan.",
|
|
2560
2685
|
"row.shikiStyle": "Estilo de resaltado",
|
|
@@ -2599,6 +2724,7 @@ window.__ModuleLoader__.load({
|
|
|
2599
2724
|
"glass.glow": "Destellos del fondo",
|
|
2600
2725
|
"glass.glowHint": "Vuelve a añadir los dos destellos radiales suaves sobre el fondo degradado (el aspecto de 0.6.3). Están fijados a la pantalla y cada panel de vidrio deja pasar una parte distinta, por eso está desactivado por defecto; al activarlo se aclara la esquina superior izquierda y el control de intensidad de abajo lo amplía (100 % es ese aspecto). Con el brillo del fondo al máximo la ambientación se anula y los destellos desaparecen con ella",
|
|
2601
2726
|
"glass.glowStrength": "Intensidad de los destellos",
|
|
2727
|
+
"glass.glowSize": "Extensión de los destellos",
|
|
2602
2728
|
"glass.previewGround": "Muestra del fondo",
|
|
2603
2729
|
"glass.previewGroundHint": "Esta banda es el fondo real de la página: mueve el brillo o activa los destellos y cambia al instante.",
|
|
2604
2730
|
"glass.reset": "Restablecer valores",
|
|
@@ -2648,7 +2774,10 @@ window.__ModuleLoader__.load({
|
|
|
2648
2774
|
"page.title": "Apparence Catppuccin",
|
|
2649
2775
|
"row.title": "Thème Catppuccin",
|
|
2650
2776
|
"row.description": "Latte / Frappé / Macchiato / Mocha, en un clic.",
|
|
2651
|
-
"row.off": "
|
|
2777
|
+
"row.off": "Désactiver (thème officiel)",
|
|
2778
|
+
"row.follow": "Suivre le clair/sombre du système",
|
|
2779
|
+
"row.followHint": "Latte en clair, la saveur choisie ci-dessous en sombre ; bascule avec le réglage Windows, barre de titre native et boutons de fenêtre compris. L’extrémité sombre est Mocha par défaut.",
|
|
2780
|
+
"row.followDark": "Saveur de l’extrémité sombre",
|
|
2652
2781
|
"row.helpLabel": "À propos du thème Catppuccin",
|
|
2653
2782
|
"row.help": "Quatre palettes de la communauté Catppuccin : Latte (clair), Frappé / Macchiato / Mocha (sombre). Application immédiate et persistante.",
|
|
2654
2783
|
"row.shikiStyle": "Style de coloration",
|
|
@@ -2693,6 +2822,7 @@ window.__ModuleLoader__.load({
|
|
|
2693
2822
|
"glass.glow": "Halos du fond",
|
|
2694
2823
|
"glass.glowHint": "Rajoute les deux halos radiaux doux sur le fond dégradé (l'aspect 0.6.3). Ils sont fixés à l'écran et chaque panneau de verre en laisse passer une partie différente, d'où la valeur par défaut désactivée ; l'activer éclaircit le coin supérieur gauche, et le curseur d'intensité ci-dessous l'amplifie (100 % correspond à cet aspect). Au maximum de luminosité du fond, l'ambiance s'annule et les halos disparaissent avec elle",
|
|
2695
2824
|
"glass.glowStrength": "Intensité des halos",
|
|
2825
|
+
"glass.glowSize": "Étendue des halos",
|
|
2696
2826
|
"glass.previewGround": "Échantillon du fond",
|
|
2697
2827
|
"glass.previewGroundHint": "Cette bande est le fond réel de la page : bougez la luminosité ou activez les halos et elle change aussitôt.",
|
|
2698
2828
|
"glass.reset": "Restaurer les valeurs",
|
|
@@ -2742,7 +2872,10 @@ window.__ModuleLoader__.load({
|
|
|
2742
2872
|
"page.title": "Catppuccin-Darstellung",
|
|
2743
2873
|
"row.title": "Catppuccin-Design",
|
|
2744
2874
|
"row.description": "Latte / Frappé / Macchiato / Mocha, mit einem Klick.",
|
|
2745
|
-
"row.off": "
|
|
2875
|
+
"row.off": "Aus (offizielles Theme)",
|
|
2876
|
+
"row.follow": "System-Hell/Dunkel folgen",
|
|
2877
|
+
"row.followHint": "Latte bei Hell, die unten gewählte Variante bei Dunkel; wechselt mit der Windows-Einstellung, inklusive nativer Titelleiste und Fensterknöpfe. Das dunkle Ende ist standardmäßig Mocha.",
|
|
2878
|
+
"row.followDark": "Variante fürs dunkle Ende",
|
|
2746
2879
|
"row.helpLabel": "Über das Catppuccin-Design",
|
|
2747
2880
|
"row.help": "Vier Paletten der Catppuccin-Community: Latte (hell), Frappé / Macchiato / Mocha (dunkel). Wirkt sofort und wird gespeichert.",
|
|
2748
2881
|
"row.shikiStyle": "Code-Hervorhebung",
|
|
@@ -2787,6 +2920,7 @@ window.__ModuleLoader__.load({
|
|
|
2787
2920
|
"glass.glow": "Hintergrund-Lichtflecken",
|
|
2788
2921
|
"glass.glowHint": "Legt die beiden weichen Lichtflecken wieder über den Verlaufs-Hintergrund (das Aussehen von 0.6.3). Sie sind am Bildschirm fixiert und jede Glasscheibe lässt einen anderen Ausschnitt durch, deshalb standardmäßig aus; eingeschaltet hellt sich die linke obere Ecke auf, und der Regler für die Stärke darunter verstärkt sie (100 % entspricht diesem Aussehen). Bei maximaler Hintergrundhelligkeit fällt die Ambience auf 0 und die Lichtflecken verschwinden mit",
|
|
2789
2922
|
"glass.glowStrength": "Stärke der Lichtflecken",
|
|
2923
|
+
"glass.glowSize": "Ausdehnung der Lichtflecken",
|
|
2790
2924
|
"glass.previewGround": "Bodenprobe",
|
|
2791
2925
|
"glass.previewGroundHint": "Dieser Streifen ist der echte Seitenhintergrund: Helligkeit ziehen oder Lichtflecken einschalten – er ändert sich sofort.",
|
|
2792
2926
|
"glass.reset": "Standardwerte wiederherstellen",
|
|
@@ -3962,6 +4096,16 @@ window.__ModuleLoader__.load({
|
|
|
3962
4096
|
path: ["flavor"],
|
|
3963
4097
|
value: section.flavor
|
|
3964
4098
|
},
|
|
4099
|
+
{
|
|
4100
|
+
op: "set",
|
|
4101
|
+
path: ["followSystem"],
|
|
4102
|
+
value: section.followSystem
|
|
4103
|
+
},
|
|
4104
|
+
{
|
|
4105
|
+
op: "set",
|
|
4106
|
+
path: ["followDark"],
|
|
4107
|
+
value: section.followDark
|
|
4108
|
+
},
|
|
3965
4109
|
{
|
|
3966
4110
|
op: "set",
|
|
3967
4111
|
path: ["glass", "enabled"],
|
|
@@ -3997,6 +4141,11 @@ window.__ModuleLoader__.load({
|
|
|
3997
4141
|
path: ["glass", "glowStrength"],
|
|
3998
4142
|
value: section.glass.glowStrength
|
|
3999
4143
|
},
|
|
4144
|
+
{
|
|
4145
|
+
op: "set",
|
|
4146
|
+
path: ["glass", "glowSize"],
|
|
4147
|
+
value: section.glass.glowSize
|
|
4148
|
+
},
|
|
4000
4149
|
{
|
|
4001
4150
|
op: "set",
|
|
4002
4151
|
path: ["glass", "glow"],
|
|
@@ -4148,6 +4297,10 @@ window.__ModuleLoader__.load({
|
|
|
4148
4297
|
const OVERRIDES_KEY = "dsh.catppuccin.overrides";
|
|
4149
4298
|
/** localStorage key carrying the shiki style preference (item M). */
|
|
4150
4299
|
const SHIKI_STYLE_KEY = "dsh.catppuccin.shikiStyle";
|
|
4300
|
+
/** localStorage key carrying the follow-the-OS flag (issue #36). */
|
|
4301
|
+
const FOLLOW_SYSTEM_KEY = "dsh.catppuccin.followSystem";
|
|
4302
|
+
/** localStorage key carrying the follow-mode dark half (issue #36). */
|
|
4303
|
+
const FOLLOW_DARK_KEY = "dsh.catppuccin.followDark";
|
|
4151
4304
|
/** Accepted flavour values — the four registered theme ids plus `off`. These
|
|
4152
4305
|
* MUST stay in sync with the registered themes (guarded by
|
|
4153
4306
|
* tests/palettes.spec.ts) because the persisted value is the theme id. */
|
|
@@ -4292,6 +4445,35 @@ window.__ModuleLoader__.load({
|
|
|
4292
4445
|
localStorage.setItem(SHIKI_STYLE_KEY, value);
|
|
4293
4446
|
} catch {}
|
|
4294
4447
|
}
|
|
4448
|
+
/** Read the persisted follow-the-OS flag (issue #36; absent means off). */
|
|
4449
|
+
function readFollowSystem() {
|
|
4450
|
+
try {
|
|
4451
|
+
return localStorage.getItem(FOLLOW_SYSTEM_KEY) === "true";
|
|
4452
|
+
} catch {
|
|
4453
|
+
return false;
|
|
4454
|
+
}
|
|
4455
|
+
}
|
|
4456
|
+
/** Persist the follow-the-OS flag. */
|
|
4457
|
+
function writeFollowSystem(value) {
|
|
4458
|
+
try {
|
|
4459
|
+
localStorage.setItem(FOLLOW_SYSTEM_KEY, String(value));
|
|
4460
|
+
} catch {}
|
|
4461
|
+
}
|
|
4462
|
+
/** Read the follow-mode dark half (only the three dark flavours are legal). */
|
|
4463
|
+
function readFollowDark() {
|
|
4464
|
+
try {
|
|
4465
|
+
const raw = localStorage.getItem(FOLLOW_DARK_KEY);
|
|
4466
|
+
return raw !== null && FOLLOW_DARK_FLAVORS.includes(raw) ? raw : DEFAULT_FOLLOW_DARK;
|
|
4467
|
+
} catch {
|
|
4468
|
+
return DEFAULT_FOLLOW_DARK;
|
|
4469
|
+
}
|
|
4470
|
+
}
|
|
4471
|
+
/** Persist the follow-mode dark half. */
|
|
4472
|
+
function writeFollowDark(value) {
|
|
4473
|
+
try {
|
|
4474
|
+
localStorage.setItem(FOLLOW_DARK_KEY, value);
|
|
4475
|
+
} catch {}
|
|
4476
|
+
}
|
|
4295
4477
|
/**
|
|
4296
4478
|
* Does this host ship the menu blur that makes a translucent menu surface work?
|
|
4297
4479
|
*
|
|
@@ -4445,6 +4627,8 @@ window.__ModuleLoader__.load({
|
|
|
4445
4627
|
const buildLocalState = () => ({
|
|
4446
4628
|
version: 1,
|
|
4447
4629
|
flavor: readFlavor(),
|
|
4630
|
+
followSystem: readFollowSystem() && readFlavor() !== "off",
|
|
4631
|
+
followDark: readFollowDark(),
|
|
4448
4632
|
glass: glass.getRemoteState(),
|
|
4449
4633
|
autoCheck: readAutoCheck(),
|
|
4450
4634
|
updateChannel: readUpdateChannel(),
|
|
@@ -4461,7 +4645,99 @@ window.__ModuleLoader__.load({
|
|
|
4461
4645
|
conflictCount += 1;
|
|
4462
4646
|
for (const listener of conflictListeners) listener();
|
|
4463
4647
|
};
|
|
4648
|
+
const FOLLOW_LAYER_SOURCE = PACKAGE_NAME;
|
|
4649
|
+
/** Disposer of the currently stacked follow layer (`undefined` = no layer). */
|
|
4650
|
+
let followLayerDispose;
|
|
4651
|
+
/** Content signature of the stacked layer, so a no-op refresh does not
|
|
4652
|
+
* republish (every `overrideTokens` call emits `theme/change`). */
|
|
4653
|
+
let followLayerSignature;
|
|
4654
|
+
/** Theme-id → shiki/flavour key ("catppuccin-latte" → "latte"). */
|
|
4655
|
+
const flavorKey = (flavor) => flavor.themeId.replace("catppuccin-", "");
|
|
4656
|
+
/** Whether this host serves `overrideTokens` at all. Hosts before that API
|
|
4657
|
+
* cannot follow the OS; the row hides the control instead of offering a
|
|
4658
|
+
* switch that would do nothing. */
|
|
4659
|
+
const followSupported = () => typeof theme.overrideTokens === "function";
|
|
4660
|
+
/** Follow mode is wanted AND possible. `off` always wins: turning the plugin
|
|
4661
|
+
* off must not leave a layer painting Catppuccin tokens. */
|
|
4662
|
+
const followWanted = () => followSupported() && readFollowSystem() && readFlavor() !== "off";
|
|
4663
|
+
/**
|
|
4664
|
+
* The two halves of the follow layer.
|
|
4665
|
+
*
|
|
4666
|
+
* Precedence per token mirrors `registerThemeFor`: flavour tokens < shiki <
|
|
4667
|
+
* host-shape menu patch < user overrides (later wins). A user override is
|
|
4668
|
+
* scheme-agnostic by contract, so the SAME value goes into both halves.
|
|
4669
|
+
* A token present in only one flavour falls back to the other half's value so
|
|
4670
|
+
* every entry stays a well-formed `{ light, dark }` pair (`overrideTokens`
|
|
4671
|
+
* throws on a bare string).
|
|
4672
|
+
* @returns the layer, or null when a flavour table is missing.
|
|
4673
|
+
*/
|
|
4674
|
+
const followLayerTokens = () => {
|
|
4675
|
+
const light = flavorInfo(FOLLOW_LIGHT_FLAVOR);
|
|
4676
|
+
const dark = flavorInfo(readFollowDark());
|
|
4677
|
+
if (light === void 0 || dark === void 0) return null;
|
|
4678
|
+
const shiki = readShikiStyle();
|
|
4679
|
+
const lightShiki = SHIKI_TOKENS[flavorKey(light)][shiki];
|
|
4680
|
+
const darkShiki = SHIKI_TOKENS[flavorKey(dark)][shiki];
|
|
4681
|
+
const menu = menuSurfaceFor(hostHasMenuBlur());
|
|
4682
|
+
const overrides = readOverrides();
|
|
4683
|
+
const names = /* @__PURE__ */ new Set([
|
|
4684
|
+
...Object.keys(light.tokens),
|
|
4685
|
+
...Object.keys(dark.tokens),
|
|
4686
|
+
...Object.keys(lightShiki),
|
|
4687
|
+
...Object.keys(darkShiki),
|
|
4688
|
+
...Object.keys(menu),
|
|
4689
|
+
...Object.keys(overrides)
|
|
4690
|
+
]);
|
|
4691
|
+
const pairs = {};
|
|
4692
|
+
for (const name of names) {
|
|
4693
|
+
const lightValue = overrides[name] ?? menu[name] ?? lightShiki[name] ?? light.tokens[name];
|
|
4694
|
+
const darkValue = overrides[name] ?? menu[name] ?? darkShiki[name] ?? dark.tokens[name];
|
|
4695
|
+
if (lightValue === void 0 && darkValue === void 0) continue;
|
|
4696
|
+
pairs[name] = {
|
|
4697
|
+
light: lightValue ?? darkValue,
|
|
4698
|
+
dark: darkValue ?? lightValue
|
|
4699
|
+
};
|
|
4700
|
+
}
|
|
4701
|
+
return pairs;
|
|
4702
|
+
};
|
|
4703
|
+
/** Remove the follow layer (idempotent). */
|
|
4704
|
+
const disposeFollowLayer = () => {
|
|
4705
|
+
if (followLayerDispose === void 0) return;
|
|
4706
|
+
followLayerDispose();
|
|
4707
|
+
followLayerDispose = void 0;
|
|
4708
|
+
followLayerSignature = void 0;
|
|
4709
|
+
};
|
|
4710
|
+
/**
|
|
4711
|
+
* Stack (or refresh, or retire) the follow layer.
|
|
4712
|
+
*
|
|
4713
|
+
* MUST be called outside a `theme/change` dispatch: `overrideTokens`
|
|
4714
|
+
* publishes, and a synchronous publish from inside a dispatch lets the
|
|
4715
|
+
* presenter apply the OUTER (stale) snapshot last — the issue #10 trap, same
|
|
4716
|
+
* reason `scheduleRestore` defers.
|
|
4717
|
+
*/
|
|
4718
|
+
const syncFollowLayer = () => {
|
|
4719
|
+
if (!followWanted()) {
|
|
4720
|
+
disposeFollowLayer();
|
|
4721
|
+
return;
|
|
4722
|
+
}
|
|
4723
|
+
const tokens = followLayerTokens();
|
|
4724
|
+
if (tokens === null) {
|
|
4725
|
+
disposeFollowLayer();
|
|
4726
|
+
return;
|
|
4727
|
+
}
|
|
4728
|
+
const signature = JSON.stringify(tokens);
|
|
4729
|
+
if (followLayerDispose !== void 0 && signature === followLayerSignature) return;
|
|
4730
|
+
const dispose = theme.overrideTokens(FOLLOW_LAYER_SOURCE, tokens);
|
|
4731
|
+
followLayerDispose?.();
|
|
4732
|
+
followLayerDispose = dispose;
|
|
4733
|
+
followLayerSignature = signature;
|
|
4734
|
+
};
|
|
4464
4735
|
const reapplyThemePrefs = () => {
|
|
4736
|
+
if (followWanted()) {
|
|
4737
|
+
syncFollowLayer();
|
|
4738
|
+
return;
|
|
4739
|
+
}
|
|
4740
|
+
disposeFollowLayer();
|
|
4465
4741
|
const active = theme.getTheme().preference;
|
|
4466
4742
|
const flavor = flavorInfo(active);
|
|
4467
4743
|
if (flavor === void 0) return;
|
|
@@ -4546,6 +4822,28 @@ window.__ModuleLoader__.load({
|
|
|
4546
4822
|
applyRestoredPreference = (id) => {
|
|
4547
4823
|
commitTheme(id, false);
|
|
4548
4824
|
};
|
|
4825
|
+
let followSyncPending = false;
|
|
4826
|
+
const scheduleFollowSync = () => {
|
|
4827
|
+
if (followSyncPending) return;
|
|
4828
|
+
followSyncPending = true;
|
|
4829
|
+
queueMicrotask(() => {
|
|
4830
|
+
followSyncPending = false;
|
|
4831
|
+
if (!followWanted()) {
|
|
4832
|
+
disposeFollowLayer();
|
|
4833
|
+
return;
|
|
4834
|
+
}
|
|
4835
|
+
syncFollowLayer();
|
|
4836
|
+
const preference = theme.getTheme().preference;
|
|
4837
|
+
if (preference === "system") {
|
|
4838
|
+
clearBootPalette();
|
|
4839
|
+
return;
|
|
4840
|
+
}
|
|
4841
|
+
if (builtinPickWins(preference, liveBuiltinPick)) return;
|
|
4842
|
+
try {
|
|
4843
|
+
commitTheme("system", false);
|
|
4844
|
+
} catch {}
|
|
4845
|
+
});
|
|
4846
|
+
};
|
|
4549
4847
|
let restorePending = false;
|
|
4550
4848
|
let pendingDesired;
|
|
4551
4849
|
const scheduleRestore = (desired) => {
|
|
@@ -4569,8 +4867,14 @@ window.__ModuleLoader__.load({
|
|
|
4569
4867
|
});
|
|
4570
4868
|
};
|
|
4571
4869
|
const applyDesired = () => {
|
|
4572
|
-
|
|
4870
|
+
const follow = followWanted();
|
|
4871
|
+
if (!follow) rememberBuiltinPreference(theme.getTheme().preference);
|
|
4573
4872
|
const desired = readFlavor();
|
|
4873
|
+
if (follow) {
|
|
4874
|
+
scheduleFollowSync();
|
|
4875
|
+
return;
|
|
4876
|
+
}
|
|
4877
|
+
if (followLayerDispose !== void 0) scheduleFollowSync();
|
|
4574
4878
|
if (desired === "off") {
|
|
4575
4879
|
const preference = theme.getTheme().preference;
|
|
4576
4880
|
if (readExplicitFlavorOff()) {
|
|
@@ -4590,7 +4894,17 @@ window.__ModuleLoader__.load({
|
|
|
4590
4894
|
applyDesired();
|
|
4591
4895
|
const disposer = ctx.on("theme/change", applyDesired);
|
|
4592
4896
|
const onStorage = (event) => {
|
|
4897
|
+
if (event.key === "dsh.catppuccin.followSystem" || event.key === "dsh.catppuccin.followDark") {
|
|
4898
|
+
emitPrefs();
|
|
4899
|
+
applyDesired();
|
|
4900
|
+
return;
|
|
4901
|
+
}
|
|
4593
4902
|
if (event.key !== "dsh.catppuccin.flavor") return;
|
|
4903
|
+
if (followWanted()) {
|
|
4904
|
+
emitPrefs();
|
|
4905
|
+
applyDesired();
|
|
4906
|
+
return;
|
|
4907
|
+
}
|
|
4594
4908
|
const next = readFlavor();
|
|
4595
4909
|
if (next !== "off") {
|
|
4596
4910
|
ensureThemeRegistered(next);
|
|
@@ -4720,11 +5034,48 @@ window.__ModuleLoader__.load({
|
|
|
4720
5034
|
accent: flavor.accent
|
|
4721
5035
|
})),
|
|
4722
5036
|
current: () => {
|
|
5037
|
+
if (readFollowSystem() && readFlavor() !== "off") return readFlavor();
|
|
4723
5038
|
const pref = theme.getTheme().preference;
|
|
4724
5039
|
return flavorFromThemeId(pref);
|
|
4725
5040
|
},
|
|
4726
5041
|
subscribe: (listener) => ctx.on("theme/change", listener),
|
|
5042
|
+
followAvailable: followSupported(),
|
|
5043
|
+
followSystem: () => readFollowSystem(),
|
|
5044
|
+
setFollowSystem: (enabled) => {
|
|
5045
|
+
if (!followSupported()) return;
|
|
5046
|
+
if (enabled) {
|
|
5047
|
+
if (readFlavor() === "off") writeFlavor(readFollowDark());
|
|
5048
|
+
writeFollowSystem(true);
|
|
5049
|
+
syncFollowLayer();
|
|
5050
|
+
try {
|
|
5051
|
+
if (applyRestoredPreference !== void 0) applyRestoredPreference("system");
|
|
5052
|
+
else theme.setTheme("system");
|
|
5053
|
+
} catch {}
|
|
5054
|
+
} else {
|
|
5055
|
+
writeFollowSystem(false);
|
|
5056
|
+
disposeFollowLayer();
|
|
5057
|
+
const target = readFlavor();
|
|
5058
|
+
if (target !== "off") try {
|
|
5059
|
+
if (applyRestoredPreference !== void 0) applyRestoredPreference(target);
|
|
5060
|
+
else theme.setTheme(target);
|
|
5061
|
+
} catch {}
|
|
5062
|
+
}
|
|
5063
|
+
emitPrefs();
|
|
5064
|
+
queuePersist();
|
|
5065
|
+
},
|
|
5066
|
+
followDark: () => readFollowDark(),
|
|
5067
|
+
setFollowDark: (dark) => {
|
|
5068
|
+
if (!FOLLOW_DARK_FLAVORS.includes(dark)) return;
|
|
5069
|
+
writeFollowDark(dark);
|
|
5070
|
+
if (followWanted()) syncFollowLayer();
|
|
5071
|
+
emitPrefs();
|
|
5072
|
+
queuePersist();
|
|
5073
|
+
},
|
|
4727
5074
|
select: (choice) => {
|
|
5075
|
+
if (readFollowSystem()) {
|
|
5076
|
+
writeFollowSystem(false);
|
|
5077
|
+
disposeFollowLayer();
|
|
5078
|
+
}
|
|
4728
5079
|
if (choice === "off") {
|
|
4729
5080
|
writeFlavor("off");
|
|
4730
5081
|
try {
|
|
@@ -4804,6 +5155,9 @@ window.__ModuleLoader__.load({
|
|
|
4804
5155
|
setGlowStrength: (glowStrength) => {
|
|
4805
5156
|
glass.setGlowStrength(glowStrength);
|
|
4806
5157
|
},
|
|
5158
|
+
setGlowSize: (glowSize) => {
|
|
5159
|
+
glass.setGlowSize(glowSize);
|
|
5160
|
+
},
|
|
4807
5161
|
resetDefaults: () => {
|
|
4808
5162
|
glass.resetDefaults();
|
|
4809
5163
|
}
|
|
@@ -4887,6 +5241,8 @@ window.__ModuleLoader__.load({
|
|
|
4887
5241
|
exports.AUTO_CHECK_KEY = AUTO_CHECK_KEY;
|
|
4888
5242
|
exports.CATPPUCCIN_FLAVOR_VALUES = CATPPUCCIN_FLAVOR_VALUES;
|
|
4889
5243
|
exports.FLAVOR_STORAGE_KEY = FLAVOR_STORAGE_KEY;
|
|
5244
|
+
exports.FOLLOW_DARK_KEY = FOLLOW_DARK_KEY;
|
|
5245
|
+
exports.FOLLOW_SYSTEM_KEY = FOLLOW_SYSTEM_KEY;
|
|
4890
5246
|
exports.NS = NS;
|
|
4891
5247
|
exports.OVERRIDES_KEY = OVERRIDES_KEY;
|
|
4892
5248
|
exports.RESTORE_STORAGE_KEY = RESTORE_STORAGE_KEY;
|
|
@@ -4903,6 +5259,8 @@ window.__ModuleLoader__.load({
|
|
|
4903
5259
|
exports.readAutoCheck = readAutoCheck;
|
|
4904
5260
|
exports.readExplicitFlavorOff = readExplicitFlavorOff;
|
|
4905
5261
|
exports.readFlavor = readFlavor;
|
|
5262
|
+
exports.readFollowDark = readFollowDark;
|
|
5263
|
+
exports.readFollowSystem = readFollowSystem;
|
|
4906
5264
|
exports.readOverrides = readOverrides;
|
|
4907
5265
|
exports.readRestoredPreference = readRestoredPreference;
|
|
4908
5266
|
exports.readShikiStyle = readShikiStyle;
|
|
@@ -4910,6 +5268,8 @@ window.__ModuleLoader__.load({
|
|
|
4910
5268
|
exports.rememberBuiltinPreference = rememberBuiltinPreference;
|
|
4911
5269
|
exports.writeAutoCheck = writeAutoCheck;
|
|
4912
5270
|
exports.writeFlavor = writeFlavor;
|
|
5271
|
+
exports.writeFollowDark = writeFollowDark;
|
|
5272
|
+
exports.writeFollowSystem = writeFollowSystem;
|
|
4913
5273
|
exports.writeOverrides = writeOverrides;
|
|
4914
5274
|
exports.writeShikiStyle = writeShikiStyle;
|
|
4915
5275
|
exports.writeUpdateChannel = writeUpdateChannel;
|