@d0nj/dsh-ui-custom 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -80,4 +80,4 @@ Catalog invariants, preset completeness across every token and both modes, resol
80
80
 
81
81
  ## Deps
82
82
 
83
- Peers: `@deepseek-ai/cordis ~4.0.5` and `@deepseek-ai/schemastery ~3.18.5`. The browser services (`dsh-client-ui-theme`, `-ui-settings`, `-ui-slots`) are supplied by the Host's runtime module table and are not npm dependencies. React arrives from the loader.
83
+ Peers: `@deepseek-ai/cordis ~4.1.0` and `@deepseek-ai/schemastery ~3.19.0`. The browser services (`dsh-client-ui-theme`, `-ui-settings`, `-ui-slots`) are supplied by the Host's runtime module table and are not npm dependencies. React arrives from the loader.
@@ -881,6 +881,11 @@ window.__ModuleLoader__.load({
881
881
  'fangsong', '-apple-system', 'blinkmacsystemfont',
882
882
  'inherit', 'initial', 'unset',
883
883
  ]);
884
+ /** Tokens the Client paints with that no preset names; each follows a documented token. */
885
+ const RUNTIME_ALIASES = [
886
+ ['--dsw-specific-input-major', '--dsw-alias-bg-layer-1'],
887
+ ['--dsw-alias-button-info-fill', '--dsw-alias-brand-primary'],
888
+ ];
884
889
  /**
885
890
  * Whether a value is a plausible CSS colour.
886
891
  *
@@ -1002,6 +1007,18 @@ window.__ModuleLoader__.load({
1002
1007
  }
1003
1008
  tokens[name] = { light, dark };
1004
1009
  }
1010
+ for (const [alias, source] of RUNTIME_ALIASES) {
1011
+ const modes = tokens[source];
1012
+ if (modes !== undefined)
1013
+ tokens[alias] = modes;
1014
+ }
1015
+ const accent = tokens['--dsw-alias-button-info-fill'];
1016
+ if (accent !== undefined) {
1017
+ tokens['--dsw-alias-button-info-hover'] = {
1018
+ light: `color-mix(in srgb, ${accent.light} 85%, black)`,
1019
+ dark: `color-mix(in srgb, ${accent.dark} 85%, white)`,
1020
+ };
1021
+ }
1005
1022
  for (const [name, modes] of Object.entries(geometryTokens(document.geometry))) {
1006
1023
  tokens[name] = modes;
1007
1024
  }
package/dist/resolve.js CHANGED
@@ -24,6 +24,11 @@ const GENERIC_FAMILIES = new Set([
24
24
  'fangsong', '-apple-system', 'blinkmacsystemfont',
25
25
  'inherit', 'initial', 'unset',
26
26
  ]);
27
+ /** Tokens the Client paints with that no preset names; each follows a documented token. */
28
+ const RUNTIME_ALIASES = [
29
+ ['--dsw-specific-input-major', '--dsw-alias-bg-layer-1'],
30
+ ['--dsw-alias-button-info-fill', '--dsw-alias-brand-primary'],
31
+ ];
27
32
  /**
28
33
  * Whether a value is a plausible CSS colour.
29
34
  *
@@ -145,6 +150,18 @@ export function resolveCustomization(document) {
145
150
  }
146
151
  tokens[name] = { light, dark };
147
152
  }
153
+ for (const [alias, source] of RUNTIME_ALIASES) {
154
+ const modes = tokens[source];
155
+ if (modes !== undefined)
156
+ tokens[alias] = modes;
157
+ }
158
+ const accent = tokens['--dsw-alias-button-info-fill'];
159
+ if (accent !== undefined) {
160
+ tokens['--dsw-alias-button-info-hover'] = {
161
+ light: `color-mix(in srgb, ${accent.light} 85%, black)`,
162
+ dark: `color-mix(in srgb, ${accent.dark} 85%, white)`,
163
+ };
164
+ }
148
165
  for (const [name, modes] of Object.entries(geometryTokens(document.geometry))) {
149
166
  tokens[name] = modes;
150
167
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d0nj/dsh-ui-custom",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Theme, colour-token, typography and geometry customisation for the DeepSeek Harness Web UI, with presets and a live editor.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -54,12 +54,12 @@
54
54
  }
55
55
  },
56
56
  "peerDependencies": {
57
- "@deepseek-ai/cordis": "~4.0.5",
58
- "@deepseek-ai/schemastery": "~3.18.5"
57
+ "@deepseek-ai/cordis": "~4.1.0",
58
+ "@deepseek-ai/schemastery": "~3.19.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@deepseek-ai/cordis": "~4.0.5",
62
- "@deepseek-ai/schemastery": "~3.18.5",
61
+ "@deepseek-ai/cordis": "~4.1.0",
62
+ "@deepseek-ai/schemastery": "~3.19.0",
63
63
  "@types/node": "^24.0.0",
64
64
  "typescript": "^5.9.0"
65
65
  },