dsh-deepseek-style-theme 1.43.3 → 1.43.4

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/cordis.patch.yml CHANGED
@@ -1,6 +1,6 @@
1
- # DeepSeek-Style-Theme bundle patch: inserts its public dsh.client entry into
2
- # the web plugin roster. The bundle is the official dsh plugin shape — install
3
- # it with `dsh plugin --profile <name> add <path-or-git-url>`.
4
- - insert:
5
- - id: ui-skin-deepseek-style
6
- name: 'dsh-deepseek-style-theme'
1
+ # DeepSeek-Style-Theme bundle patch: inserts its public dsh.client entry into
2
+ # the web plugin roster. The bundle is the official dsh plugin shape — install
3
+ # it with `dsh plugin --profile <name> add <path-or-git-url>`.
4
+ - insert:
5
+ - id: ui-skin-deepseek-style
6
+ name: 'dsh-deepseek-style-theme'
package/lib/client.js CHANGED
@@ -1,18 +1,22 @@
1
- window.__ModuleLoader__.load({
2
- // This id must equal the package name: the host builds the browser bundle
3
- // URL as /plugins/<entry.id>/client.js (dsh-client-modules), and the loader
4
- // then requires that the bundle registers itself under that same id. The
5
- // package was renamed to the unscoped dsh-deepseek-style-theme in 1.43.1
6
- // while this literal kept the old scope, so on any profile carrying the new
7
- // name the bundle loaded and registered nothing --
8
- // "loaded without registering \"dsh-deepseek-style-theme\" via __ModuleLoader__.load"
9
- // -- which took the whole client half down. It stayed invisible on the
10
- // development machine because that profile still installs the scoped package,
11
- // whose bundle URL matches the stale literal.
12
- id: "dsh-deepseek-style-theme",
13
- factory: (require) => {
14
- var module = { exports: {} };
15
- var exports = module.exports;
1
+ // The loader requires this bundle to register itself under the id the host asked
2
+ // for, and that id is the package NAME of whichever copy is installed -- which is
3
+ // not one value during a rename. The package moved from
4
+ // @dsh-external/dsh-deepseek-style-theme to the unscoped dsh-deepseek-style-theme
5
+ // in 1.43.1, so a profile installed before the rename asks for the old id and one
6
+ // installed after asks for the new one. A single hard-coded literal therefore
7
+ // breaks whichever half it does not match, and BOTH directions were hit for real,
8
+ // one machine each:
9
+ //
10
+ // literal old, install new -> "loaded without registering \"dsh-deepseek-style-theme\""
11
+ // literal new, install old -> "loaded without registering \"@dsh-external/...\""
12
+ //
13
+ // So register under BOTH ids with the same factory: the loader finds the one it
14
+ // wants and the other entry is simply never asked for. The registrations are
15
+ // guarded individually because a loader might reject an id it did not request,
16
+ // and that must not take the working one down with it.
17
+ const dshDeepseekStyleThemeFactory = (require) => {
18
+ var module = { exports: {} };
19
+ var exports = module.exports;
16
20
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
17
21
  const React = require("react");
18
22
 
@@ -1639,6 +1643,18 @@ html[data-dshome-dispersion][data-dshome-glass="liquid"] body .hHd-Xa_root::befo
1639
1643
  -webkit-backdrop-filter:url(#dshome-glass-dispersion) blur(var(--dshome-liquid-blur-sidebar)) saturate(var(--dshome-liquid-saturate))!important;
1640
1644
  backdrop-filter:url(#dshome-glass-dispersion) blur(var(--dshome-liquid-blur-sidebar)) saturate(var(--dshome-liquid-saturate))!important;
1641
1645
  }
1646
+ /* Backdrop blur, switched off by the durable backdropBlur setting. Each glass
1647
+ recipe reads its radius from a variable, so turning the frosting off is one
1648
+ 0px per variable -- the translucency, the sheen and the edge refraction all
1649
+ stay exactly as they were. Written with a body step so it also out-ranks the
1650
+ html[data-dshome-glass] block the liquid radii are declared in. */
1651
+ html[data-dshome-blur="off"],
1652
+ html[data-dshome-blur="off"] body{
1653
+ --dshome-glass-blur:0px;
1654
+ --dshome-liquid-blur:0px;
1655
+ --dshome-liquid-blur-sidebar:0px;
1656
+ --dshome-liquid-blur-composer:0px;
1657
+ }
1642
1658
  @media (prefers-reduced-motion:reduce){
1643
1659
  html[data-dshome-glass="liquid"] .hHd-Xa_root::after{
1644
1660
  animation:none;
@@ -1771,6 +1787,7 @@ html[data-dshome-dispersion][data-dshome-glass="liquid"] body .hHd-Xa_root::befo
1771
1787
  const apply = () => {
1772
1788
  root.setAttribute('data-dshome-glass', dsttGetGlass());
1773
1789
  root.setAttribute('data-dshome-composer', dsttGetComposer());
1790
+ root.setAttribute('data-dshome-blur', dsttGetBlur() ? 'on' : 'off');
1774
1791
  };
1775
1792
  apply();
1776
1793
  const unsubscribe = dsttSubscribe(apply);
@@ -1778,6 +1795,7 @@ html[data-dshome-dispersion][data-dshome-glass="liquid"] body .hHd-Xa_root::befo
1778
1795
  unsubscribe();
1779
1796
  root.removeAttribute('data-dshome-glass');
1780
1797
  root.removeAttribute('data-dshome-composer');
1798
+ root.removeAttribute('data-dshome-blur');
1781
1799
  };
1782
1800
  }
1783
1801
 
@@ -3420,7 +3438,7 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3420
3438
  * plugin's own loopback channel instead; every reader (the color driver,
3421
3439
  * the settings tab) subscribes to this mirror.
3422
3440
  */
3423
- const dsttState = { mode: "peakvalley-redblue", fluidBrush: false, glassStyle: DSTT_GLASS_DEFAULT, composer: DSTT_COMPOSER_DEFAULT, listeners: new Set() };
3441
+ const dsttState = { mode: "peakvalley-redblue", fluidBrush: false, glassStyle: DSTT_GLASS_DEFAULT, composer: DSTT_COMPOSER_DEFAULT, blur: true, listeners: new Set() };
3424
3442
  // Fields the user has chosen in this session. A host half that predates a
3425
3443
  // field ignores it and answers without it -- or with its own default -- so
3426
3444
  // without this a fresh choice gets overwritten by the next sync and the
@@ -3432,6 +3450,26 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3432
3450
  if (dsttState.composer === "origin") return "wide";
3433
3451
  return DSTT_COMPOSER.includes(dsttState.composer) ? dsttState.composer : DSTT_COMPOSER_DEFAULT;
3434
3452
  };
3453
+ const dsttGetBlur = () => dsttState.blur !== false;
3454
+ /**
3455
+ * Turn the glass frosting on or off. Same shape as the other CSS-only
3456
+ * preferences: apply locally first, then let the host persist it, and treat
3457
+ * its answer as confirmation only.
3458
+ */
3459
+ async function dsttSetBlur(ctx, next) {
3460
+ dsttState.blur = next === true;
3461
+ dsttTouched.add("blur");
3462
+ dsttNotify();
3463
+ try {
3464
+ const result = await bridgeCall(DSTT_SET, { mode: dsttState.mode, backdropBlur: dsttState.blur });
3465
+ if (result !== undefined && result !== null && result.ok === true) {
3466
+ return result.value.backdropBlur === dsttState.blur;
3467
+ }
3468
+ } catch (error) {
3469
+ // Fall through: the local choice stands, it just was not stored.
3470
+ }
3471
+ return false;
3472
+ }
3435
3473
  /**
3436
3474
  * Persist the composer's refraction width through the bridge.
3437
3475
  *
@@ -3527,6 +3565,9 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3527
3565
  return await response.json();
3528
3566
  }
3529
3567
 
3568
+ /** Fallback used when the host half is unavailable. */
3569
+ const dsttGetBlurFallback = () => dsttState.blur !== false;
3570
+
3530
3571
  /** Pull the durable mode from the host half once. */
3531
3572
  async function dsttSync(ctx) {
3532
3573
  try {
@@ -3541,6 +3582,7 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3541
3582
  // which is what made a fresh choice look like it snapped back.
3542
3583
  if (!dsttTouched.has("glassStyle") && DSTT_GLASS_STYLES.includes(result.value.glassStyle)) dsttState.glassStyle = result.value.glassStyle;
3543
3584
  if (!dsttTouched.has("composer") && DSTT_COMPOSER.includes(result.value.composerRefraction)) dsttState.composer = result.value.composerRefraction;
3585
+ if (!dsttTouched.has("blur") && typeof result.value.backdropBlur === "boolean") dsttState.blur = result.value.backdropBlur;
3544
3586
  dsttNotify();
3545
3587
  }
3546
3588
  } catch (error) {}
@@ -3801,6 +3843,11 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3801
3843
  if (dstt === undefined || typeof dstt.setComposer !== 'function' || next === composerNow) return;
3802
3844
  dstt.setComposer(next);
3803
3845
  };
3846
+ const blurOn = dstt !== undefined && typeof dstt.blur === 'function' ? dstt.blur() !== false : true;
3847
+ const toggleBlur = () => {
3848
+ if (dstt === undefined || typeof dstt.setBlur !== 'function') return;
3849
+ dstt.setBlur(!blurOn);
3850
+ };
3804
3851
 
3805
3852
  return React.createElement('div', { className: 'dshome-dstt' },
3806
3853
  React.createElement('h3', null,
@@ -3867,6 +3914,19 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3867
3914
  className: 'dshome-dstt-seg-btn' + (composerNow === choice ? ' dshome-on' : ''),
3868
3915
  onClick: () => pickComposer(choice)
3869
3916
  }, isZh ? DSTT_COMPOSER_LABELS[choice].zh : DSTT_COMPOSER_LABELS[choice].en)))),
3917
+ React.createElement('div', { className: 'dshome-dstt-row' },
3918
+ React.createElement('div', { className: 'dshome-dstt-row-body' },
3919
+ React.createElement('div', { className: 'dshome-dstt-row-title' }, isZh ? '背景模糊(磨砂)' : 'Backdrop blur'),
3920
+ React.createElement('div', { className: 'dshome-dstt-row-hint' }, isZh
3921
+ ? '玻璃面板后面那层虚化。关闭后玻璃变成纯半透明:通透度、顶部光泽、边缘折射都保留,只是不再把背后的东西磨掉。'
3922
+ : 'The frosting behind every glass pane. Off leaves the translucency, the sheen and the edge refraction intact and only stops blurring what is behind the glass.')),
3923
+ React.createElement('button', {
3924
+ type: 'button',
3925
+ role: 'switch',
3926
+ 'aria-checked': blurOn,
3927
+ className: 'dshome-dstt-seg-btn' + (blurOn ? ' dshome-on' : ''),
3928
+ onClick: toggleBlur
3929
+ }, blurOn ? (isZh ? '已开启' : 'On') : (isZh ? '已关闭' : 'Off'))),
3870
3930
  React.createElement('div', { className: 'dshome-dstt-status', 'data-peak': timeSliced && peakNow },
3871
3931
  '当前:' + colorName + ' · ' + status));
3872
3932
  }
@@ -3986,6 +4046,8 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3986
4046
  setGlass: (next) => dsttSetGlass(ctx, next),
3987
4047
  composer: dsttGetComposer,
3988
4048
  setComposer: (next) => dsttSetComposer(ctx, next),
4049
+ blur: dsttGetBlur,
4050
+ setBlur: (next) => dsttSetBlur(ctx, next),
3989
4051
  subscribe: dsttSubscribe
3990
4052
  },
3991
4053
  locale: ctx.get('locale')
@@ -3997,5 +4059,13 @@ body[data-dshome-dark] .${CLS}{background:rgba(14,30,60,.94);box-shadow:0 18px 4
3997
4059
  exports.apply = apply;
3998
4060
  exports.inject = ['theme', 'slots', 'locale', 'workspaces', 'connection'];
3999
4061
  return module.exports;
4000
- }
4001
- });
4062
+ };
4063
+
4064
+ // Both ids, same factory. See the note at the top of this file for why one
4065
+ // literal cannot work during the rename.
4066
+ try {
4067
+ window.__ModuleLoader__.load({ id: "dsh-deepseek-style-theme", factory: dshDeepseekStyleThemeFactory });
4068
+ } catch (error) {}
4069
+ try {
4070
+ window.__ModuleLoader__.load({ id: "@dsh-external/dsh-deepseek-style-theme", factory: dshDeepseekStyleThemeFactory });
4071
+ } catch (error) {}
package/lib/index.js CHANGED
@@ -134,7 +134,12 @@ const DsttSettingsSchema = z === null ? null : z.object({
134
134
  z.const("wide"),
135
135
  z.const("origin"),
136
136
  z.const("off")
137
- ]).default(COMPOSER_REFRACTION_DEFAULT)
137
+ ]).default(COMPOSER_REFRACTION_DEFAULT),
138
+ // The `blur()` term in every glass surface's backdrop chain. Turning it off
139
+ // keeps the translucency, the sheen and the edge refraction and drops only
140
+ // the frosting -- implemented as four variables driven to 0px, so nothing
141
+ // else about the recipes moves.
142
+ backdropBlur: z.boolean().default(true)
138
143
  });
139
144
 
140
145
  /** Map a legacy 1.37.x mode id onto a four-mode id, or null when nothing to do. */
@@ -585,7 +590,8 @@ function dsttRead(ctx) {
585
590
  mode: DSTT_MODES.includes(stored) ? stored : DSTT_MODE_DEFAULT,
586
591
  fluidBrush: descriptor.value.fluidBrush === true,
587
592
  glassStyle: dsttGlassValue(ctx),
588
- composerRefraction: dsttComposerValue(ctx)
593
+ composerRefraction: dsttComposerValue(ctx),
594
+ backdropBlur: descriptor.value.backdropBlur !== false
589
595
  }
590
596
  };
591
597
  }
@@ -597,7 +603,7 @@ function dsttRead(ctx) {
597
603
  * persist a choice without a second round trip. None of them is mandatory the
598
604
  * way `mode` is — an older client that only knows about the mode keeps working.
599
605
  */
600
- async function dsttWrite(ctx, mode, fluidBrush, glassStyle, composerRefraction) {
606
+ async function dsttWrite(ctx, mode, fluidBrush, glassStyle, composerRefraction, backdropBlur) {
601
607
  if (!DSTT_MODES.includes(mode)) {
602
608
  return failure("bad-request", `mode must be one of ${DSTT_MODES.join("/")}`, { issues: [] });
603
609
  }
@@ -607,6 +613,7 @@ async function dsttWrite(ctx, mode, fluidBrush, glassStyle, composerRefraction)
607
613
  if (typeof fluidBrush === "boolean") ops.push({ op: "set", path: ["fluidBrush"], value: fluidBrush });
608
614
  if (wantsGlass) ops.push({ op: "set", path: ["glassStyle"], value: glassStyle });
609
615
  if (wantsComposer) ops.push({ op: "set", path: ["composerRefraction"], value: composerRefraction });
616
+ if (typeof backdropBlur === "boolean") ops.push({ op: "set", path: ["backdropBlur"], value: backdropBlur });
610
617
  const settings = ctx.get("settings");
611
618
  if (settings === undefined || settings === null || typeof settings.mutate !== "function") {
612
619
  return failure("internal", "settings service unavailable", {});
@@ -622,11 +629,18 @@ async function dsttWrite(ctx, mode, fluidBrush, glassStyle, composerRefraction)
622
629
  mode,
623
630
  fluidBrush: typeof fluidBrush === "boolean" ? fluidBrush === true : dsttBrushValue(ctx),
624
631
  glassStyle: wantsGlass ? glassStyle : dsttGlassValue(ctx),
625
- composerRefraction: wantsComposer ? composerRefraction : dsttComposerValue(ctx)
632
+ composerRefraction: wantsComposer ? composerRefraction : dsttComposerValue(ctx),
633
+ backdropBlur: typeof backdropBlur === "boolean" ? backdropBlur : dsttBlurValue(ctx)
626
634
  }
627
635
  };
628
636
  }
629
637
 
638
+ /** The stored backdrop-blur preference, defaulting to on. */
639
+ function dsttBlurValue(ctx) {
640
+ const descriptor = settingsDescriptor(ctx, DSTT_SETTINGS_NS);
641
+ return descriptor === null ? true : descriptor.value.backdropBlur !== false;
642
+ }
643
+
630
644
  /**
631
645
  * The stored composer-refraction width, defaulting to the 8px band. `origin` was
632
646
  * this option's first id: it is still accepted by the schema so a settings file
@@ -704,7 +718,7 @@ function apply(ctx) {
704
718
  if (endpoint === DSTT_GET) return dsttRead(ctx);
705
719
  if (endpoint === DSTT_SET) {
706
720
  const payloadObject = payload === null || payload === undefined || typeof payload !== "object" ? {} : payload;
707
- return await dsttWrite(ctx, payloadObject.mode, payloadObject.fluidBrush, payloadObject.glassStyle, payloadObject.composerRefraction);
721
+ return await dsttWrite(ctx, payloadObject.mode, payloadObject.fluidBrush, payloadObject.glassStyle, payloadObject.composerRefraction, payloadObject.backdropBlur);
708
722
  }
709
723
  if (endpoint === FILE_OPEN || endpoint === FILE_REVEAL) {
710
724
  const target = localPathOf(payload);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-deepseek-style-theme",
3
3
  "description": "DeepSeek official-home style theme: WebGL fluid-flow background, liquid glass with SVG edge refraction, glass sidebar and composer, frosted header, running-subagent progress panel, and DeepSeek brand link for the dsh web GUI",
4
- "version": "1.43.3",
4
+ "version": "1.43.4",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "deepseek",