dsh-cool-theme 0.7.0 → 0.8.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.md +9 -17
- package/README.zh.md +8 -16
- package/lib/client.js +644 -44
- package/lib/types/client/components.d.ts.map +1 -1
- package/lib/types/client/css/accents.d.ts +47 -0
- package/lib/types/client/css/accents.d.ts.map +1 -0
- package/lib/types/client/css/primitives.d.ts +5 -4
- package/lib/types/client/css/primitives.d.ts.map +1 -1
- package/lib/types/client/custom.d.ts +59 -6
- package/lib/types/client/custom.d.ts.map +1 -1
- package/lib/types/client/icons.d.ts +37 -0
- package/lib/types/client/icons.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +4 -0
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/theme.d.ts.map +1 -1
- package/lib/types/client/tokens.d.ts +6 -0
- package/lib/types/client/tokens.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/client/components.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,OAAO,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/client/components.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,KAAK,QAAQ,EAAiB,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5C,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,UAAU,EAKhB,MAAM,aAAa,CAAA;AAkBpB,mEAAmE;AACnE,eAAO,M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,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;QAC3D,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;KAC9C,CAAA;IACD,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,MAAM,CAAA;IAC5B;;;;OAIG;IACH,cAAc,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAA;CACpC;;;;;;;gBAsoCA"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accent layer: the alias tokens that put the theme's accent colour on DSH's
|
|
3
|
+
* interactive components instead of its foreground.
|
|
4
|
+
*
|
|
5
|
+
* DSH paints the filled Button, the Switch track, the checkbox/radio fills and
|
|
6
|
+
* the Tooltip bubble from alias tokens that all resolve to the *foreground*
|
|
7
|
+
* neutral: `--dsw-alias-brand-primary` and `--dsw-alias-label-primary` name the
|
|
8
|
+
* same `--dsw-static-neutral-bluish-*` step in both appearances, so the brand is
|
|
9
|
+
* monochrome by construction. A preset that retints only the primitive layer
|
|
10
|
+
* therefore cannot separate them — the button simply becomes the new text
|
|
11
|
+
* colour. Components whose colour is a literal in the shell's stylesheets
|
|
12
|
+
* rather than a step of the palette stay put for the same reason: the
|
|
13
|
+
* `interactive-bg-*` overlays are `rgba()` constants there, and the off-state
|
|
14
|
+
* Switch track is `--dsw-alias-border-l3`, itself a literal hairline. A
|
|
15
|
+
* primitive-only retint has nothing to reach them through, which is why this
|
|
16
|
+
* layer republishes those aliases by name.
|
|
17
|
+
*
|
|
18
|
+
* The accent is read from the palette's own `--dsw-static-deepseek-*` scale: the
|
|
19
|
+
* colour DSH already spends on focus rings, links and `--dsw-alias-state-business-primary`,
|
|
20
|
+
* and the one the custom-theme editor exposes as its Accent seed. Every value
|
|
21
|
+
* here is derived from that scale plus the palette's neutral extremes, because a
|
|
22
|
+
* custom theme's accent is arbitrary and an unreadable on-accent ink or tooltip
|
|
23
|
+
* would be worse than the untinted default.
|
|
24
|
+
*/
|
|
25
|
+
import type { StaticMap } from './primitives.js';
|
|
26
|
+
/** One override layer value: a colour per appearance. */
|
|
27
|
+
export type ModePair = {
|
|
28
|
+
light: string;
|
|
29
|
+
dark: string;
|
|
30
|
+
};
|
|
31
|
+
/** Token name → value pair, the shape `theme.overrideTokens` consumes. */
|
|
32
|
+
export type AliasOverrides = Record<string, ModePair>;
|
|
33
|
+
/**
|
|
34
|
+
* The alias tokens that carry the accent. Empty when either appearance has no
|
|
35
|
+
* usable accent: publishing half a layer would leave the two appearances
|
|
36
|
+
* disagreeing about the theme's brand colour.
|
|
37
|
+
*/
|
|
38
|
+
export declare function accentOverrides(light: StaticMap, dark: StaticMap): AliasOverrides;
|
|
39
|
+
/**
|
|
40
|
+
* The same layer as CSS, for the fallback used when the client exposes no
|
|
41
|
+
* `theme.overrideTokens`. DSH declares its aliases on `body`, so the light block
|
|
42
|
+
* rides on `:root` (a pseudo-class outranks it) and the dark block adds
|
|
43
|
+
* `html[data-ds-dark-theme] body` to outrank `body[data-ds-dark-theme]`
|
|
44
|
+
* regardless of where the injected sheet lands in the cascade.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildAccentCss(light: StaticMap, dark: StaticMap): string;
|
|
47
|
+
//# sourceMappingURL=accents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accents.d.ts","sourceRoot":"","sources":["../../../../src/client/css/accents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,0EAA0E;AAC1E,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AA6KrD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,cAAc,CAuBjF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAOxE"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Primitives layer: the ONLY place theme authors should edit to create a new theme.
|
|
3
3
|
*
|
|
4
|
-
* Architecture
|
|
4
|
+
* Architecture:
|
|
5
5
|
* :root → light values for --dsw-static-*
|
|
6
6
|
* html[data-ds-dark-theme], body[data-ds-dark-theme] → dark values for the SAME --dsw-static-* keys
|
|
7
|
-
*
|
|
7
|
+
* the shell's alias layer (design-platform.css) → one `var(--dsw-static-*)` mapping per appearance
|
|
8
|
+
* accents.ts → the alias tokens that follow the accent, not the foreground
|
|
8
9
|
*
|
|
9
|
-
* Changing a theme = providing a new light + dark map for these
|
|
10
|
-
* Semantic aliases
|
|
10
|
+
* Changing a theme = providing a new light + dark map for these variables.
|
|
11
|
+
* Semantic aliases — and the accent layer built on them — automatically follow.
|
|
11
12
|
*/
|
|
12
13
|
export type StaticMap = Record<string, string>;
|
|
13
14
|
export declare const PRIMITIVES_LIGHT: StaticMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../src/client/css/primitives.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../src/client/css/primitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE9C,eAAO,MAAM,gBAAgB,EAAE,SA0E9B,CAAA;AAID,eAAO,MAAM,eAAe,EAAE,SAqC7B,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,GAAE,SAA4B,EAAE,IAAI,GAAE,SAA2B,GAAG,MAAM,CAMjH;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAKrH"}
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
* through `resolvePreset` -> `primitiveOverrides` unchanged. The one structural
|
|
9
9
|
* difference is the neutral ramp, which is built per appearance (see below).
|
|
10
10
|
*
|
|
11
|
-
* Seed groups (
|
|
11
|
+
* Seed groups (7):
|
|
12
12
|
* neutral merged `--dsw-static-neutral-bluish-*` + `--dsw-static-neutral-*`,
|
|
13
13
|
* one ramp PER appearance
|
|
14
14
|
* accent merged `--dsw-static-deepseek-*` + `--dsw-static-blue-*`
|
|
15
15
|
* green / amber / red
|
|
16
|
+
* border DSH's border ladder, derived from one seed (l1 is the seed)
|
|
16
17
|
* shiki 9 syntax tokens
|
|
17
18
|
*/
|
|
18
19
|
import type { PresetDef } from './presets.js';
|
|
@@ -32,7 +33,18 @@ export type NeutralRamp = {
|
|
|
32
33
|
lightest: string;
|
|
33
34
|
darkest: string;
|
|
34
35
|
};
|
|
35
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* The border seed. Unlike every other seed it is an overlay rather than a solid
|
|
38
|
+
* fill, so it carries an opaque base colour plus an opacity percentage (0–100).
|
|
39
|
+
* It publishes DSH's whole border ladder: `--dsw-alias-border-l1` is exactly
|
|
40
|
+
* this seed and the stronger levels are derived from it (see
|
|
41
|
+
* {@link borderTokens}).
|
|
42
|
+
*/
|
|
43
|
+
export type BorderSeed = {
|
|
44
|
+
color: string;
|
|
45
|
+
alpha: number;
|
|
46
|
+
};
|
|
47
|
+
/** Everything a user can edit. 2*2 + 4*2 + 9*2 = 30 colours, plus 2 borders. */
|
|
36
48
|
export type CustomTheme = {
|
|
37
49
|
/**
|
|
38
50
|
* One neutral ramp PER appearance. DSH's alias layer picks a different step
|
|
@@ -50,14 +62,23 @@ export type CustomTheme = {
|
|
|
50
62
|
green: SeedPair;
|
|
51
63
|
amber: SeedPair;
|
|
52
64
|
red: SeedPair;
|
|
65
|
+
/** Border colour and opacity per appearance; only l1 is the seed, the rest are derived. */
|
|
66
|
+
border: Record<Mode, BorderSeed>;
|
|
53
67
|
shiki: Record<ShikiKey, SeedPair>;
|
|
54
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* DSH's own `--dsw-alias-border-l1`: a 4% black hairline in light and a 6% white
|
|
71
|
+
* one in dark. A fresh custom theme starts here, so turning custom mode on
|
|
72
|
+
* leaves the borders exactly as the shell paints them until the seed is moved.
|
|
73
|
+
*/
|
|
74
|
+
export declare const DEFAULT_BORDER: Record<Mode, BorderSeed>;
|
|
55
75
|
/**
|
|
56
76
|
* Parse a colour into `#RRGGBB`, or null when it is not a format we understand.
|
|
57
77
|
*
|
|
58
78
|
* Accepted: `#RGB`, `#RGBA`, `#RRGGBB`, `#RRGGBBAA`, `rgb()`/`rgba()` with
|
|
59
|
-
* numbers or percentages, and `hsl()`/`hsla()`. Alpha is parsed but dropped
|
|
60
|
-
* every
|
|
79
|
+
* numbers or percentages, and `hsl()`/`hsla()`. Alpha is parsed but dropped:
|
|
80
|
+
* every seed stores an opaque colour, and the one overlay — the border — keeps
|
|
81
|
+
* its opacity in a field of its own.
|
|
61
82
|
*
|
|
62
83
|
* `primitives.ts` stores `rgb(r, g, b)` while presets store hex, so both shapes
|
|
63
84
|
* have to work; the extra forms are there for what users may type.
|
|
@@ -65,6 +86,32 @@ export type CustomTheme = {
|
|
|
65
86
|
export declare function tryToHex(input: unknown): string | null;
|
|
66
87
|
/** `tryToHex` with a black fallback, for call sites that need a guaranteed value. */
|
|
67
88
|
export declare function toHex(input: unknown): string;
|
|
89
|
+
/**
|
|
90
|
+
* One border alias value, at the seed's own opacity or an override of it.
|
|
91
|
+
*
|
|
92
|
+
* Written as `rgba()` rather than an 8-digit hex because the seed stores the
|
|
93
|
+
* opacity as a percentage and `rgba()` is the form DSH's own border tokens take.
|
|
94
|
+
*/
|
|
95
|
+
export declare function borderCss(seed: BorderSeed, alpha?: number): string;
|
|
96
|
+
/**
|
|
97
|
+
* Every border alias one seed publishes, under DSH's own names. Typed rather
|
|
98
|
+
* than a bare map so a level cannot go missing from the ladder unnoticed.
|
|
99
|
+
*/
|
|
100
|
+
export type BorderTokens = {
|
|
101
|
+
'--dsw-alias-border-l1': string;
|
|
102
|
+
'--dsw-alias-border-l2': string;
|
|
103
|
+
'--dsw-alias-border-l3': string;
|
|
104
|
+
'--dsw-alias-border-l4': string;
|
|
105
|
+
'--dsw-alias-border-l2-darkmode-thin': string;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* The whole border ladder, from one seed. l1 is the seed itself and every
|
|
109
|
+
* stronger level is the same hue at DSH's own spacing above it, so a single
|
|
110
|
+
* picker moves sidebars, tab bars, cards and buttons together, and a stronger
|
|
111
|
+
* level can never end up weaker than a subtler one. The alpha is clamped, so a
|
|
112
|
+
* near-opaque seed flattens the top of the ladder instead of overflowing it.
|
|
113
|
+
*/
|
|
114
|
+
export declare function borderTokens(mode: Mode, seed: BorderSeed): BorderTokens;
|
|
68
115
|
/**
|
|
69
116
|
* Recover the seed inputs from an already-generated preset.
|
|
70
117
|
*
|
|
@@ -75,9 +122,11 @@ export declare function toHex(input: unknown): string;
|
|
|
75
122
|
export declare function extractSeeds(base: PresetDef): CustomTheme;
|
|
76
123
|
/**
|
|
77
124
|
* Bump when the `CustomTheme` shape changes so old blobs can be migrated.
|
|
78
|
-
* v2 split the neutral ramp per appearance;
|
|
125
|
+
* v2 split the neutral ramp per appearance; v3 added the border seed. Older
|
|
126
|
+
* blobs stay readable: a v1/v2 theme simply starts from the shipped border
|
|
127
|
+
* default, which is what it was already rendering.
|
|
79
128
|
*/
|
|
80
|
-
export declare const CUSTOM_SCHEMA_VERSION =
|
|
129
|
+
export declare const CUSTOM_SCHEMA_VERSION = 3;
|
|
81
130
|
/** Self-contained stored form: records the preset the seeds were derived from. */
|
|
82
131
|
export type CustomEnvelope = {
|
|
83
132
|
v: number;
|
|
@@ -95,6 +144,10 @@ export declare function normalizeCustom(raw: unknown, fallback: CustomTheme): Cu
|
|
|
95
144
|
* Unlike the presets (which ship one ramp for both appearances), the ramp is
|
|
96
145
|
* built once per appearance, so the light text and the dark text are no longer
|
|
97
146
|
* the two ends of the same colour axis.
|
|
147
|
+
*
|
|
148
|
+
* The border aliases are the one set of tokens a seed publishes directly
|
|
149
|
+
* instead of through a `--dsw-static-*` ramp: DSH keeps its border levels as
|
|
150
|
+
* alpha overlays in the base stylesheets, so they have no scale to hang off.
|
|
98
151
|
*/
|
|
99
152
|
export declare function buildCustomPreset(v: CustomTheme): PresetDef;
|
|
100
153
|
/** A named custom theme the user saved. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../../src/client/custom.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"custom.d.ts","sourceRoot":"","sources":["../../../src/client/custom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,YAAY,EAAE,SAAS,EAAE,CAAA;AAEzB,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,MAAM,CAAA;AAEnC,sCAAsC;AACtC,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,6DAA6D;AAC7D,eAAO,MAAM,UAAU,4HAUb,CAAA;AACV,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAElD,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I,EAAE,MAAM,KAAK,WAAW,GACzC,UAAU,EAAE,CAuBd;AAED,gEAAgE;AAChE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAMnE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The plugin's own icon set.
|
|
3
|
+
*
|
|
4
|
+
* Every glyph lives in `assets/` as an SVG, and that file is the source of
|
|
5
|
+
* truth for its artwork: `tsdown` inlines it as text (the `loader` map in
|
|
6
|
+
* tsdown.config.ts, described by assets.d.ts), and the wrapper below narrows the
|
|
7
|
+
* markup to the same `{ size, className }` surface the shell's icons expose, so
|
|
8
|
+
* a call site swaps one for the other without touching its layout.
|
|
9
|
+
*
|
|
10
|
+
* Two properties of the artwork the wrapper keeps: the strokes draw in
|
|
11
|
+
* `currentColor`, so whichever control owns an icon goes on painting it — hover,
|
|
12
|
+
* disabled and the danger face included — with no CSS here; and React owns the
|
|
13
|
+
* `<svg>` root, so `size` stays a real prop instead of riding on the asset's own
|
|
14
|
+
* `1em` box.
|
|
15
|
+
*/
|
|
16
|
+
import * as React from 'react';
|
|
17
|
+
/** What a caller may set on one of these icons — the shell's own `IconProps`. */
|
|
18
|
+
export interface IconProps {
|
|
19
|
+
/** Square edge length in px. Defaults to 16, the box the artwork is drawn for. */
|
|
20
|
+
size?: number;
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const IconDelete: React.FC<IconProps>;
|
|
24
|
+
export declare const IconEdit: React.FC<IconProps>;
|
|
25
|
+
export declare const IconExport: React.FC<IconProps>;
|
|
26
|
+
export declare const IconImport: React.FC<IconProps>;
|
|
27
|
+
export declare const IconPlus: React.FC<IconProps>;
|
|
28
|
+
/**
|
|
29
|
+
* The palette as markup instead of as a component, because its only consumer
|
|
30
|
+
* patches shell DOM rather than rendering it: `patchThemeNavIcon` in theme.tsx
|
|
31
|
+
* hides the gear the settings nav draws for an unknown section and writes this
|
|
32
|
+
* into the seat beside it. The string therefore travels whole, with width and
|
|
33
|
+
* height pinned to the shell's 16px icon slot — the asset's own `1em` would
|
|
34
|
+
* resolve against whatever font the nav happens to carry.
|
|
35
|
+
*/
|
|
36
|
+
export declare const THEME_NAV_MARKUP: string;
|
|
37
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/client/icons.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiDD,eAAO,MAAM,UAAU,qBAAiD,CAAA;AACxE,eAAO,MAAM,QAAQ,qBAA2C,CAAA;AAChE,eAAO,MAAM,UAAU,qBAAiD,CAAA;AACxE,eAAO,MAAM,UAAU,qBAAiD,CAAA;AACxE,eAAO,MAAM,QAAQ,qBAA2C,CAAA;AAMhE;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,QAGC,CAAA"}
|
|
@@ -35,6 +35,8 @@ export declare const zh: {
|
|
|
35
35
|
'custom.amber.desc': string;
|
|
36
36
|
'custom.red.title': string;
|
|
37
37
|
'custom.red.desc': string;
|
|
38
|
+
'custom.border.title': string;
|
|
39
|
+
'custom.border.desc': string;
|
|
38
40
|
'custom.shiki.desc': string;
|
|
39
41
|
'custom.seed.light': string;
|
|
40
42
|
'custom.seed.dark': string;
|
|
@@ -112,6 +114,8 @@ export declare const en: {
|
|
|
112
114
|
'custom.amber.desc': string;
|
|
113
115
|
'custom.red.title': string;
|
|
114
116
|
'custom.red.desc': string;
|
|
117
|
+
'custom.border.title': string;
|
|
118
|
+
'custom.border.desc': string;
|
|
115
119
|
'custom.shiki.desc': string;
|
|
116
120
|
'custom.seed.light': string;
|
|
117
121
|
'custom.seed.dark': string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mEAAmE;AACnE,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mEAAmE;AACnE,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EmB,CAAA;AAElC,8CAA8C;AAC9C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,EAAE,CAAA;AAEtC,mEAAmE;AACnE,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/client/theme.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/client/theme.tsx"],"names":[],"mappings":"AAiMA,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,QA8iBrC"}
|
|
@@ -13,6 +13,12 @@ export declare function resolvePreset(src: PresetId | PresetDef): {
|
|
|
13
13
|
[x: string]: string;
|
|
14
14
|
};
|
|
15
15
|
} | null;
|
|
16
|
+
/**
|
|
17
|
+
* Every token a theme publishes, in one layer: the primitive ramps it retints,
|
|
18
|
+
* plus the alias tokens that move DSH's interactive components onto the theme's
|
|
19
|
+
* accent (see css/accents.ts). The accent goes last so it wins over any alias a
|
|
20
|
+
* custom theme's own map happens to carry.
|
|
21
|
+
*/
|
|
16
22
|
export declare function buildOverrides(src: PresetId | PresetDef): Record<string, {
|
|
17
23
|
light: string;
|
|
18
24
|
dark: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/client/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/client/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAKtF,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS;;;;;;;SAatD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAIzG;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAItE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cool-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "DeepSeek Harness theme plugin — supports Dark / Light / System appearance switching, ships 34 preset themes, and supports creating, sharing, and importing custom themes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|