dsh-theme-mineradio 2.2.9 → 2.3.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/lib/client.js +21 -41
- package/lib/types/client/MineradioAppearanceRow.d.ts +72 -0
- package/lib/types/client/MineradioControls.d.ts +38 -0
- package/lib/types/client/MineradioPluginCard.d.ts +15 -0
- package/lib/types/client/audio-reactivity.d.ts +33 -0
- package/lib/types/client/cinema-drift.d.ts +20 -0
- package/lib/types/client/color-extract.d.ts +14 -0
- package/lib/types/client/critters.d.ts +21 -0
- package/lib/types/client/fluid-interactions.d.ts +19 -0
- package/lib/types/client/fluid-shader.d.ts +57 -0
- package/lib/types/client/fluid-tones.d.ts +30 -0
- package/lib/types/client/glass-dispersion.d.ts +29 -0
- package/lib/types/client/greetings.d.ts +24 -0
- package/lib/types/client/index.d.ts +17 -6
- package/lib/types/client/locales.d.ts +140 -0
- package/lib/types/client/mesh.d.ts +18 -0
- package/lib/types/client/seam-stamper.d.ts +21 -0
- package/lib/types/client/settings-store.d.ts +115 -0
- package/lib/types/client/specular-parallax.d.ts +5 -0
- package/lib/types/client/spot-core.d.ts +52 -0
- package/lib/types/client/spotlight.d.ts +11 -0
- package/lib/types/client/star-river.d.ts +43 -0
- package/lib/types/client/station-dial.d.ts +24 -0
- package/lib/types/client/theme-layer.d.ts +287 -0
- package/lib/types/client/wallpaper-store.d.ts +30 -0
- package/lib/types/client/whale.d.ts +25 -0
- package/lib/types/client/wordmark-badge.d.ts +25 -0
- package/lib/types/index.d.ts +6 -4
- package/lib/types/invariant.d.ts +7 -4
- package/package.json +95 -87
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* the Mineradio layer: one toggleable visual skin over the whole Web surface.
|
|
3
|
+
* Everything this layer owns is an effect — token overrides ride the theme
|
|
4
|
+
* service's override stack, the CSS hooks ride a `data-dsh-aqua` attribute on
|
|
5
|
+
* <html> (the stylesheet only applies under it), the ambient scene and page
|
|
6
|
+
* fades are mounted/removed with the layer — so switching the flag off (or
|
|
7
|
+
* unloading the plugin) restores the stock UI exactly: no residue, no reload.
|
|
8
|
+
*
|
|
9
|
+
* The enable flag persists in localStorage: a client-only visual preference
|
|
10
|
+
* (like the selected-session key), written and read by this plugin alone.
|
|
11
|
+
*/
|
|
12
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
13
|
+
import type { ThemeTokenOverrides } from '@deepseek-ai/dsh-client-ui-theme/client';
|
|
14
|
+
/** html attribute selecting the Mineradio layer: CSS hooks and ambient effects.
|
|
15
|
+
* Kept as the internal `data-dsh-aqua` seam so the stylesheet's 100+ gated
|
|
16
|
+
* selectors and the helper modules stay consistent across the skin. */
|
|
17
|
+
export declare const MINERADIO_ATTRIBUTE = "data-dsh-aqua";
|
|
18
|
+
/** localStorage key carrying the layer enable flag. */
|
|
19
|
+
export declare const MINERADIO_ENABLED_KEY = "dsh.ui-mineradio.enabled";
|
|
20
|
+
/** Default state when nothing is stored yet: on. */
|
|
21
|
+
export declare const DEFAULT_ENABLED = true;
|
|
22
|
+
/**
|
|
23
|
+
* Alias-token override layer: the Mineradio "cinema gold" palette. Every
|
|
24
|
+
* value is a `{ light, dark }` pair so the layer stays legible when the user
|
|
25
|
+
* switches the Appearance preference — dark is the near-black studio
|
|
26
|
+
* ({INK}), light is a warm paper white. The brand accent is champagne gold
|
|
27
|
+
* with mint + ember rose echoes, straight from the Mineradio wordmark.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MINERADIO_TOKEN_OVERRIDES: ThemeTokenOverrides;
|
|
30
|
+
/** Preset global text-ink tints: the "text colour" switch swaps the warm
|
|
31
|
+
* champagne ink for a neutral / mint / rose tint while keeping the SAME
|
|
32
|
+
* lightness ladder, so every preset stays readable in either scheme. The
|
|
33
|
+
* champagne preset reproduces the shipped values exactly (no regression). */
|
|
34
|
+
export type TextStyle = 'champagne' | 'neutral' | 'mint' | 'rose';
|
|
35
|
+
/** Tunable layer knobs, persisted independently of the enable flag. */
|
|
36
|
+
export interface MineradioSettings {
|
|
37
|
+
/** Rendering mode: mica (frosted floating cards) or the stock layout with a generic glass material. */
|
|
38
|
+
mode: 'mica' | 'compat';
|
|
39
|
+
/** Global text-ink tint: warm champagne (default) or a neutral/mint/rose. */
|
|
40
|
+
textStyle: TextStyle;
|
|
41
|
+
/** Glass backdrop blur radius, px. */
|
|
42
|
+
blur: number;
|
|
43
|
+
/** Glass fill opacity, 0-100 (50 = the shipped look; drives the frost multiplier). */
|
|
44
|
+
frost: number;
|
|
45
|
+
/** Fluid hue, degrees (0-360, continuous). */
|
|
46
|
+
fluidHue: number;
|
|
47
|
+
/** Fluid depth, 0-100 (0 = deep saturated, 100 = pale light, continuous). */
|
|
48
|
+
fluidDepth: number;
|
|
49
|
+
/** Glass dispersion tint hue, degrees (0-360, continuous). */
|
|
50
|
+
dispersionHue: number;
|
|
51
|
+
/** Glass refraction strength, 0-100 (0 = none, 100 = strong). */
|
|
52
|
+
dispersionRefract: number;
|
|
53
|
+
/** Background brightness, 0-100 (0 = pure black, 50 = transparent, 100 = pure white). */
|
|
54
|
+
bgBrightness: number;
|
|
55
|
+
/** Backdrop source: the living fluid board or a custom wallpaper. */
|
|
56
|
+
background: 'fluid' | 'wallpaper';
|
|
57
|
+
/** Wallpaper image data URL (empty until one is picked). */
|
|
58
|
+
wallpaper: string;
|
|
59
|
+
/** Auto-derive the accent hue from the wallpaper (spotlight/bloom/dispersion). */
|
|
60
|
+
autoTint: boolean;
|
|
61
|
+
/** Particle whale in the chat area center (opt-in extra; off by default —
|
|
62
|
+
* the Mineradio star river is the shipped particle stage). */
|
|
63
|
+
whale: boolean;
|
|
64
|
+
/** Ambient marine life (fish / bubbles / plankton). */
|
|
65
|
+
critters: boolean;
|
|
66
|
+
/** Interactive mesh (the site's dot-grid with pointer repel). */
|
|
67
|
+
mesh: boolean;
|
|
68
|
+
/** Star-river particle density, 0-100 (50 = 1×, 100 = 2× the default field). */
|
|
69
|
+
starDensity: number;
|
|
70
|
+
/** Cursor spotlight glow that follows the pointer over the glass panes. */
|
|
71
|
+
spotlight: boolean;
|
|
72
|
+
/** Hover press-down: the pane under the cursor sinks a touch (tactile depth). */
|
|
73
|
+
press: boolean;
|
|
74
|
+
/** Audio reactivity: the backdrop pulses with mic audio (fluid/stars/glow). */
|
|
75
|
+
audioReact: boolean;
|
|
76
|
+
/** Wallpaper blur radius, px. */
|
|
77
|
+
wallpaperBlur: number;
|
|
78
|
+
/** Wallpaper frost veil, 0-100. */
|
|
79
|
+
wallpaperFrost: number;
|
|
80
|
+
/** Frosted-glass mask over the wallpaper (readability veil + stronger blur). */
|
|
81
|
+
wallpaperMask: boolean;
|
|
82
|
+
/** Frost mask blur radius, px (0 = none, 40 = heavy frosted glass). */
|
|
83
|
+
wallpaperMaskBlur: number;
|
|
84
|
+
/** Frost mask veil opacity, 0-100 (0 = clear, 100 = fully opaque scrim). */
|
|
85
|
+
wallpaperMaskOpacity: number;
|
|
86
|
+
/** Video wallpaper blur radius, px (0 = crisp, 40 = heavy acrylic). */
|
|
87
|
+
videoBlur: number;
|
|
88
|
+
/** Video wallpaper brightness, 0-100 (100 = fully lit, 0 = deepest dim). */
|
|
89
|
+
videoBrightness: number;
|
|
90
|
+
/** Performance gate: which motion layers actually run. Orthogonal to scenes. */
|
|
91
|
+
perf: PerfTier;
|
|
92
|
+
/** Optional rainbow fluid drift. Off by default; does not rewrite fluidHue. */
|
|
93
|
+
rainbow: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** Performance gate. Scenes keep their knob values; this only mounts layers. */
|
|
96
|
+
export type PerfTier = 'performance' | 'balanced' | 'vivid';
|
|
97
|
+
/** One-click scene: a named bundle of existing knobs (never the wallpaper). */
|
|
98
|
+
export type ScenePreset = 'studio' | 'deepsea' | 'midnight' | 'mist' | 'rainbow';
|
|
99
|
+
/** Knob bundle for one scene. Wallpaper / video files stay untouched. */
|
|
100
|
+
type SceneBundle = Pick<MineradioSettings, 'textStyle' | 'blur' | 'frost' | 'fluidHue' | 'fluidDepth' | 'dispersionHue' | 'dispersionRefract' | 'starDensity' | 'spotlight' | 'press' | 'audioReact' | 'background' | 'rainbow'>;
|
|
101
|
+
/** Which scene the current knobs match, or null after a manual tweak. */
|
|
102
|
+
export declare function matchScenePreset(settings: Pick<MineradioSettings, keyof SceneBundle>): ScenePreset | null;
|
|
103
|
+
/**
|
|
104
|
+
* Owns the Mineradio layer lifecycle: reads the durable enable flag, and applies /
|
|
105
|
+
* retracts every layer on change. Cross-tab flips arrive through the storage
|
|
106
|
+
* event; every subscription and mounted effect are released when the plugin
|
|
107
|
+
* fiber is disposed.
|
|
108
|
+
*/
|
|
109
|
+
export declare class MineradioLayer {
|
|
110
|
+
private enabled;
|
|
111
|
+
private settings;
|
|
112
|
+
/** Resolved palette scheme: dark = the brightness knob darkens, light = it brightens. */
|
|
113
|
+
private dark;
|
|
114
|
+
private tokenDisposer;
|
|
115
|
+
private mainFluid;
|
|
116
|
+
private interactionDisposer;
|
|
117
|
+
private themeListener;
|
|
118
|
+
private seamDisposer;
|
|
119
|
+
private spotlightDisposer;
|
|
120
|
+
private whaleHandle;
|
|
121
|
+
private meshHandle;
|
|
122
|
+
private starRiverHandle;
|
|
123
|
+
private audioHandle;
|
|
124
|
+
private cinemaDrift;
|
|
125
|
+
private dispersion;
|
|
126
|
+
private specularParallaxDisposer;
|
|
127
|
+
/** Object URL of the current large-video wallpaper (revoked on replace). */
|
|
128
|
+
private videoObjectUrl;
|
|
129
|
+
/** IndexedDB id backing the current object URL (guards against reloads). */
|
|
130
|
+
private videoBlobId;
|
|
131
|
+
/** Extracted accent hue from the wallpaper (undefined until read). */
|
|
132
|
+
private extractedHue;
|
|
133
|
+
/** Wallpaper source the extracted hue was computed from (guards re-reads). */
|
|
134
|
+
private extractedWallpaper;
|
|
135
|
+
/** Live rainbow hue, only while the rainbow scene is on. Not persisted. */
|
|
136
|
+
private rainbowHue;
|
|
137
|
+
private rainbowRaf;
|
|
138
|
+
/** Station dial: per-workspace hue offset, glided by station-dial.ts. */
|
|
139
|
+
private stationOffset;
|
|
140
|
+
private stationDisposer;
|
|
141
|
+
private readonly ctx;
|
|
142
|
+
/**
|
|
143
|
+
* @param ctx - owning client context.
|
|
144
|
+
*/
|
|
145
|
+
constructor(ctx: Context);
|
|
146
|
+
/** Current enable state (the settings row mirrors this). */
|
|
147
|
+
getEnabled(): boolean;
|
|
148
|
+
/** Current knob values (the settings row mirrors these). */
|
|
149
|
+
getSettings(): MineradioSettings;
|
|
150
|
+
/** Whether the resolved palette is dark (the brightness knob darkens). */
|
|
151
|
+
getDark(): boolean;
|
|
152
|
+
/** Resolved scheme from the theme service (falls back to the body attribute). */
|
|
153
|
+
private resolveScheme;
|
|
154
|
+
/** Re-read every knob from localStorage into memory. */
|
|
155
|
+
private reloadSettings;
|
|
156
|
+
/** Set the performance gate (does not rewrite scene knobs). */
|
|
157
|
+
setPerf(value: PerfTier): void;
|
|
158
|
+
/** Apply one named scene. Wallpaper / video files stay as they are. */
|
|
159
|
+
applyScene(preset: ScenePreset): void;
|
|
160
|
+
/** Flip the layer: persist, then apply or retract every owned effect. */
|
|
161
|
+
setEnabled(value: boolean): void;
|
|
162
|
+
/** Set the rendering mode ('mica' or 'compat'). */
|
|
163
|
+
setMode(value: 'mica' | 'compat'): void;
|
|
164
|
+
/** Set the global text-ink preset ('champagne' | 'neutral' | 'mint' | 'rose'). */
|
|
165
|
+
setTextStyle(value: TextStyle): void;
|
|
166
|
+
/** Set the glass blur radius (px). */
|
|
167
|
+
setBlur(value: number): void;
|
|
168
|
+
/** Set the glass frost amount (0-100). */
|
|
169
|
+
setFrost(value: number): void;
|
|
170
|
+
/** Set the fluid hue (degrees, continuous). */
|
|
171
|
+
setFluidHue(value: number): void;
|
|
172
|
+
/** Set the glass dispersion tint hue (degrees, continuous). */
|
|
173
|
+
setDispersionHue(value: number): void;
|
|
174
|
+
/** Set the glass refraction strength (0-100). */
|
|
175
|
+
setDispersionRefract(value: number): void;
|
|
176
|
+
/** Set the fluid depth (0-100, continuous: deep ↔ pale). */
|
|
177
|
+
setFluidDepth(value: number): void;
|
|
178
|
+
/** Set the background brightness (0-100: 0 = pure black, 50 = transparent, 100 = pure white). */
|
|
179
|
+
setBgBrightness(value: number): void;
|
|
180
|
+
/** Set the backdrop source (fluid board or custom wallpaper). */
|
|
181
|
+
setBackground(value: 'fluid' | 'wallpaper'): void;
|
|
182
|
+
/** Set the wallpaper image (a data URL; empty clears it) or a large video
|
|
183
|
+
* (`idb:<id>` marker whose blob lives in IndexedDB). */
|
|
184
|
+
setWallpaper(value: string): void;
|
|
185
|
+
/** Set the wallpaper auto-tint flag (derive accent hues from the wallpaper). */
|
|
186
|
+
setAutoTint(value: boolean): void;
|
|
187
|
+
/** Set the particle-whale flag (chat-area center decoration). */
|
|
188
|
+
setWhale(value: boolean): void;
|
|
189
|
+
/** Set the ambient marine-life flag (fish / bubbles / plankton). */
|
|
190
|
+
setCritters(value: boolean): void;
|
|
191
|
+
/** Set the interactive-mesh flag (dot-grid decoration). */
|
|
192
|
+
setMesh(value: boolean): void;
|
|
193
|
+
/** Set the star-river particle density (0-100). */
|
|
194
|
+
setStarDensity(value: number): void;
|
|
195
|
+
/** Set the cursor-spotlight flag (pointer-tracking glass glow). */
|
|
196
|
+
setSpotlight(value: boolean): void;
|
|
197
|
+
/** Set the hover-press flag (pane sinks a touch under the cursor). */
|
|
198
|
+
setPress(value: boolean): void;
|
|
199
|
+
/** Set the audio-reactivity flag (mic-driven backdrop pulse). */
|
|
200
|
+
setAudioReact(value: boolean): void;
|
|
201
|
+
/** Set the wallpaper blur radius (px). */
|
|
202
|
+
setWallpaperBlur(value: number): void;
|
|
203
|
+
/** Set the wallpaper frost veil (0-100). */
|
|
204
|
+
setWallpaperFrost(value: number): void;
|
|
205
|
+
/** Set the wallpaper frost-mask flag (readability veil + stronger blur). */
|
|
206
|
+
setWallpaperMask(value: boolean): void;
|
|
207
|
+
/** Set the frost-mask blur radius (px). */
|
|
208
|
+
setWallpaperMaskBlur(value: number): void;
|
|
209
|
+
/** Set the frost-mask veil opacity (0-100). */
|
|
210
|
+
setWallpaperMaskOpacity(value: number): void;
|
|
211
|
+
/** Set the video wallpaper blur radius (px). */
|
|
212
|
+
setVideoBlur(value: number): void;
|
|
213
|
+
/** Set the video wallpaper brightness (0-100, 100 = fully lit). */
|
|
214
|
+
setVideoBrightness(value: number): void;
|
|
215
|
+
/** After the user re-grants file access (选择视频 click on an fsa: video),
|
|
216
|
+
* drop the mount guard and re-apply so the file is re-read and played. */
|
|
217
|
+
authorizeVideo(): void;
|
|
218
|
+
private sync;
|
|
219
|
+
/** Write the knob-driven CSS variables and mode attributes onto <html>. */
|
|
220
|
+
private applySettings;
|
|
221
|
+
/** The wallpaper plays as a plain <video> element (the browser's own
|
|
222
|
+
* decoder, no player chrome at all): looping on, cover fill via CSS, and
|
|
223
|
+
* autoplay with a muted fallback where policy requires it. A direct
|
|
224
|
+
* element (not an iframe) keeps backdrop-filter working over it, so the
|
|
225
|
+
* glass panels stay frosted above the video. */
|
|
226
|
+
private configureWallpaperVideo;
|
|
227
|
+
/** The hue driving the spotlight glow + ambient bloom right now. */
|
|
228
|
+
private accentHue;
|
|
229
|
+
/** The dispersion edge-tint hue (auto-extracted, or the user's knob). */
|
|
230
|
+
private dispersionTintHue;
|
|
231
|
+
/** Write the hue-driven accent vars (spotlight glow + bloom + dispersion). */
|
|
232
|
+
private applyAccentTint;
|
|
233
|
+
/** Kick off (or clear) wallpaper color extraction, guarded by source. */
|
|
234
|
+
private ensureWallpaperTint;
|
|
235
|
+
/** Extract the dominant hue and repaint the accents (async, guarded). */
|
|
236
|
+
private extractWallpaperTint;
|
|
237
|
+
/** Draw a wallpaper image into the extractor. */
|
|
238
|
+
private extractImageHue;
|
|
239
|
+
/** Draw the wallpaper video's first available frame into the extractor. */
|
|
240
|
+
private extractVideoHue;
|
|
241
|
+
/** Apply the mode's token layer (floating palette, or translucent compat). */
|
|
242
|
+
private applyTokens;
|
|
243
|
+
/** The text-ink override for the current preset: redefines the warm ink
|
|
244
|
+
* tokens only; every other token falls through to the base layer. */
|
|
245
|
+
private inkOverrides;
|
|
246
|
+
private mount;
|
|
247
|
+
/** Performance / balanced keep the last fluid frame; vivid runs the loop. */
|
|
248
|
+
private allowFluidLoop;
|
|
249
|
+
/** Balanced + vivid keep stars / drift / dispersion / specular. */
|
|
250
|
+
private allowMotionFx;
|
|
251
|
+
/** Only vivid mounts the optional extras (whale / mesh / audio). */
|
|
252
|
+
private allowDecor;
|
|
253
|
+
/** Hover glow / tilt stay off in the performance gate. */
|
|
254
|
+
private allowHoverFx;
|
|
255
|
+
/** Mount or drop motion layers to match the performance gate. */
|
|
256
|
+
private syncMotionLayers;
|
|
257
|
+
/** Mount the Mineradio star-river particle stage when the gate allows it. */
|
|
258
|
+
private syncStarRiver;
|
|
259
|
+
/** Start or stop the cinematic camera drift. */
|
|
260
|
+
private syncCinemaDrift;
|
|
261
|
+
/** Start or stop the glass chromatic-dispersion filter. */
|
|
262
|
+
private syncGlassDispersion;
|
|
263
|
+
/** Start or stop the specular-highlight cursor parallax. */
|
|
264
|
+
private syncSpecularParallax;
|
|
265
|
+
/** Mount or drop the particle whale to match enabled + the whale flag. */
|
|
266
|
+
private syncWhale;
|
|
267
|
+
/** Mount or drop the interactive mesh to match enabled + the mesh flag. */
|
|
268
|
+
private syncMesh;
|
|
269
|
+
/** Start or stop the mic audio feed to match enabled + the audioReact flag.
|
|
270
|
+
* The feed routes bass → fluid, mids/highs → star river, and overall
|
|
271
|
+
* loudness → a CSS var that lifts the spotlight glow. */
|
|
272
|
+
private syncAudioReact;
|
|
273
|
+
private unmount;
|
|
274
|
+
/** Attach the fluid shader and the interaction feeds. */
|
|
275
|
+
private mountFluid;
|
|
276
|
+
private teardownFluid;
|
|
277
|
+
private fluidParams;
|
|
278
|
+
/** Slow hue walk for the rainbow scene. Does not rewrite the stored knob. */
|
|
279
|
+
private syncRainbowDrift;
|
|
280
|
+
private stopRainbowDrift;
|
|
281
|
+
private applyFluidPalettes;
|
|
282
|
+
/** Stamp the data-* seams the stylesheet keys off (self-contained mode). */
|
|
283
|
+
private startSeamStamper;
|
|
284
|
+
/** Attach the cursor-spotlight pointer feeds (idempotent per mount). */
|
|
285
|
+
private startSpotlightFeed;
|
|
286
|
+
}
|
|
287
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Large wallpaper storage: videos too big for localStorage (its ~5MB quota)
|
|
3
|
+
* go into IndexedDB as raw blobs, while the setting keeps a tiny `idb:<id>`
|
|
4
|
+
* marker. On boot the layer loads the blob, wraps it in an object URL and
|
|
5
|
+
* hands it to the <video> element — no quota trouble, survives restarts.
|
|
6
|
+
*/
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
/** Chromium-only File System Access picker (absent elsewhere). */
|
|
10
|
+
showOpenFilePicker?: (options?: {
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
types?: Array<{
|
|
13
|
+
description?: string;
|
|
14
|
+
accept: Record<string, string[]>;
|
|
15
|
+
}>;
|
|
16
|
+
}) => Promise<FileSystemFileHandle[]>;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** Store a blob and return its `idb:<id>` marker ('' on failure → caller
|
|
20
|
+
* falls back to the data-URL path). */
|
|
21
|
+
export declare function saveVideoBlob(blob: Blob): Promise<string>;
|
|
22
|
+
/** Load a stored blob by id (null when absent). */
|
|
23
|
+
export declare function loadVideoBlob(id: string): Promise<Blob | null>;
|
|
24
|
+
/** Drop a stored blob (ignores failures). */
|
|
25
|
+
export declare function deleteVideoBlob(id: string): Promise<void>;
|
|
26
|
+
/** Persist a File System Access handle so the next visit can re-read the
|
|
27
|
+
* ORIGINAL file without the user picking it again. */
|
|
28
|
+
export declare function saveVideoHandle(handle: FileSystemFileHandle): Promise<boolean>;
|
|
29
|
+
/** Load the remembered file handle (null when absent or storage fails). */
|
|
30
|
+
export declare function loadVideoHandle(): Promise<FileSystemFileHandle | null>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Particle whale: the deepseek.com/harness hero's centerpiece fish rendered
|
|
3
|
+
* as particles — a faithful 2D port of the site's `HeroDigitileR3F` (chunk
|
|
4
|
+
* 776) minus three.js. The 24×18 brand-fish SVG is sampled onto a 60×60
|
|
5
|
+
* luminance grid, the particles scatter, then assemble into the silhouette
|
|
6
|
+
* with the site's drift / tail-sway / light-shading / pointer-push math.
|
|
7
|
+
* Additive canvas blending + `mix-blend-mode: screen` (as on the site).
|
|
8
|
+
*/
|
|
9
|
+
/** Whale handle: scheme updates plus disposal. */
|
|
10
|
+
export interface WhaleHandle {
|
|
11
|
+
/** Flip the particle color between the dark (white) and light (gray) sets. */
|
|
12
|
+
setDark: (dark: boolean) => void;
|
|
13
|
+
/** Stop the engine and remove the DOM. */
|
|
14
|
+
dispose: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Mount the particle whale into `host` (the ambient scene) and start the
|
|
18
|
+
* engine. The wrapper is centered on the MAIN column — the `[data-phase]`
|
|
19
|
+
* conversation area, i.e. everything right of the sidebar — not the whole
|
|
20
|
+
* viewport.
|
|
21
|
+
* @param host - the container the whale wrapper is appended to.
|
|
22
|
+
* @param dark - resolved scheme at mount (white particles on dark, gray on light).
|
|
23
|
+
* @returns the handle.
|
|
24
|
+
*/
|
|
25
|
+
export declare function mountWhale(host: HTMLElement, dark: boolean): WhaleHandle;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wordmark badge swap: in DARK mode the DSH wordmark's solid "HARNESS"
|
|
3
|
+
* plate (`<rect x="129.348" .../>` + knocked-out letterforms) is replaced
|
|
4
|
+
* at runtime with the official deepseek.com/harness nameplate — the glossy
|
|
5
|
+
* "Harness" pill (gradient ring + soft glow + black/25 pill with white/95
|
|
6
|
+
* mono text). In LIGHT mode the stock plate stays exactly as shipped. The
|
|
7
|
+
* plate box inside the svg is measured and the pill is positioned over the
|
|
8
|
+
* letterform slot, so it tracks the wordmark through sidebar expand /
|
|
9
|
+
* collapse, width resizes, and late layout. Everything is removed on
|
|
10
|
+
* dispose: off == the stock wordmark exactly.
|
|
11
|
+
*/
|
|
12
|
+
/** Badge handle: scheme updates plus disposal. */
|
|
13
|
+
export interface BadgeHandle {
|
|
14
|
+
/** Dark mode wears the official pill; light mode keeps the stock plate. */
|
|
15
|
+
setDark: (dark: boolean) => void;
|
|
16
|
+
/** Stop observing and restore the stock wordmark. */
|
|
17
|
+
dispose: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Decorate every stamped wordmark button and keep it decorated as React
|
|
21
|
+
* remounts nodes or the layout settles.
|
|
22
|
+
* @param dark - resolved scheme at mount.
|
|
23
|
+
* @returns the handle.
|
|
24
|
+
*/
|
|
25
|
+
export declare function startWordmarkBadge(dark: boolean): BadgeHandle;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Mineradio theme-layer plugin, node half.
|
|
3
|
-
*
|
|
2
|
+
* Mineradio theme-layer plugin, node half. Pure UI plugin: the empty apply
|
|
3
|
+
* exists so the plugin appears in the host cordis.yml / Loader; the browser
|
|
4
|
+
* half ships via exports["./client"], discovered through the package.json
|
|
5
|
+
* dsh.client declaration. The enable flag is a browser-local preference
|
|
6
|
+
* (localStorage) — a client-only visual layer owns no host configuration.
|
|
4
7
|
*/
|
|
5
|
-
|
|
6
8
|
/** Host plugin body — no host-side behavior for this surface plugin. */
|
|
7
|
-
export declare function apply(): void;
|
|
9
|
+
export declare function apply(): void;
|
package/lib/types/invariant.d.ts
CHANGED
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
* @module dsh-theme-mineradio/invariant
|
|
4
4
|
*/
|
|
5
5
|
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
-
|
|
7
6
|
/** Cordis companion plugin name. */
|
|
8
|
-
export declare const name
|
|
7
|
+
export declare const name = "client-ui-mineradio-invariant";
|
|
9
8
|
/** Service required before the companion can reserve package ownership. */
|
|
10
9
|
export declare const inject: string[];
|
|
11
|
-
/**
|
|
12
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Register this package's invariant companion.
|
|
12
|
+
* @param ctx - Cordis context carrying the invariant service.
|
|
13
|
+
* @returns the installed registration's disposer after setup succeeds.
|
|
14
|
+
*/
|
|
15
|
+
export declare const apply: (ctx: Context) => Promise<() => void>;
|
package/package.json
CHANGED
|
@@ -1,87 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-theme-mineradio",
|
|
3
|
-
"description": "Mineradio: a cinematic private-visual-radio glass theme for the Web surface — champagne glow, fluid or wallpaper backdrop, unified corners, and motion",
|
|
4
|
-
"version": "2.2
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/dhicoc/dsh-theme-mineradio.git"
|
|
11
|
-
},
|
|
12
|
-
"type": "module",
|
|
13
|
-
"main": "lib/index.js",
|
|
14
|
-
"types": "lib/types/index.d.ts",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./lib/types/index.d.ts",
|
|
18
|
-
"default": "./lib/index.js"
|
|
19
|
-
},
|
|
20
|
-
"./invariant": {
|
|
21
|
-
"types": "./lib/types/invariant.d.ts",
|
|
22
|
-
"default": "./lib/invariant.js"
|
|
23
|
-
},
|
|
24
|
-
"./client": {
|
|
25
|
-
"types": "./lib/types/client/index.d.ts",
|
|
26
|
-
"default": "./lib/client.js"
|
|
27
|
-
},
|
|
28
|
-
"./src/*": "./src/*",
|
|
29
|
-
"./package.json": "./package.json"
|
|
30
|
-
},
|
|
31
|
-
"dsh": {
|
|
32
|
-
"bundle": {
|
|
33
|
-
"patch": "./cordis.patch.yml"
|
|
34
|
-
},
|
|
35
|
-
"client": {
|
|
36
|
-
"inject": [
|
|
37
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
38
|
-
"@deepseek-ai/dsh-client-locale",
|
|
39
|
-
"@deepseek-ai/dsh-client-ui-theme",
|
|
40
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
41
|
-
"@deepseek-ai/dsh-client-ui-slots",
|
|
42
|
-
"@deepseek-ai/dsh-client-ui-primitives"
|
|
43
|
-
],
|
|
44
|
-
"platform": "web"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"scripts": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"@deepseek-ai/
|
|
56
|
-
"@deepseek-ai/dsh-client-
|
|
57
|
-
"@deepseek-ai/dsh-client-
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"@deepseek-ai/
|
|
68
|
-
"@deepseek-ai/dsh-client-
|
|
69
|
-
"@deepseek-ai/dsh-client-
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-
|
|
71
|
-
"@deepseek-ai/dsh-client-ui-
|
|
72
|
-
"@deepseek-ai/dsh-client-ui-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"react": "
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"lib/
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-theme-mineradio",
|
|
3
|
+
"description": "Mineradio: a cinematic private-visual-radio glass theme for the Web surface — champagne glow, fluid or wallpaper backdrop, unified corners, and motion",
|
|
4
|
+
"version": "2.3.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/dhicoc/dsh-theme-mineradio.git"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "lib/index.js",
|
|
14
|
+
"types": "lib/types/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./lib/types/index.d.ts",
|
|
18
|
+
"default": "./lib/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./invariant": {
|
|
21
|
+
"types": "./lib/types/invariant.d.ts",
|
|
22
|
+
"default": "./lib/invariant.js"
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"types": "./lib/types/client/index.d.ts",
|
|
26
|
+
"default": "./lib/client.js"
|
|
27
|
+
},
|
|
28
|
+
"./src/*": "./src/*",
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"dsh": {
|
|
32
|
+
"bundle": {
|
|
33
|
+
"patch": "./cordis.patch.yml"
|
|
34
|
+
},
|
|
35
|
+
"client": {
|
|
36
|
+
"inject": [
|
|
37
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
38
|
+
"@deepseek-ai/dsh-client-locale",
|
|
39
|
+
"@deepseek-ai/dsh-client-ui-theme",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
41
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
42
|
+
"@deepseek-ai/dsh-client-ui-primitives"
|
|
43
|
+
],
|
|
44
|
+
"platform": "web"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "node build-tools/build-client.mjs",
|
|
49
|
+
"bundle": "node build-tools/build-client.mjs",
|
|
50
|
+
"typecheck": "tsc --noEmit",
|
|
51
|
+
"watch": "node build-tools/build-client.mjs"
|
|
52
|
+
},
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
56
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.1-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-theme": "^0.1.1-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
64
|
+
"react": "^18.2.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
68
|
+
"@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.1-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.1-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-theme": "0.1.1-rc.2",
|
|
75
|
+
"@deepseek-ai/dsh-invariants": "0.1.1-rc.2",
|
|
76
|
+
"@types/react": "~18.3.1",
|
|
77
|
+
"@types/react-dom": "~18.3.1",
|
|
78
|
+
"esbuild": "^0.25.0",
|
|
79
|
+
"react": "^18.2.0",
|
|
80
|
+
"react-dom": "^18.2.0",
|
|
81
|
+
"typescript": "^5.6.0"
|
|
82
|
+
},
|
|
83
|
+
"files": [
|
|
84
|
+
"cordis.patch.yml",
|
|
85
|
+
"lib/index.js",
|
|
86
|
+
"lib/invariant.js",
|
|
87
|
+
"lib/client.js",
|
|
88
|
+
"lib/types/**/*.d.ts"
|
|
89
|
+
],
|
|
90
|
+
"pnpm": {
|
|
91
|
+
"onlyBuiltDependencies": [
|
|
92
|
+
"esbuild"
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|