dsh-theme-gallery 0.1.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 +657 -0
- package/cordis.patch.yml +48 -0
- package/lib/client.d.ts +29 -0
- package/lib/client.js +4229 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.js +178 -0
- package/lib/themes/meng-hai-you-yu.json +292 -0
- package/lib/themes/shan-qing-ting-cai.json +290 -0
- package/package.json +118 -0
- package/schema/theme.schema.json +159 -0
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# The layer this bundle contributes to whichever profile selects it.
|
|
2
|
+
#
|
|
3
|
+
# One row, one package name. The client module system mounts this package's
|
|
4
|
+
# browser half (./client) when the row is enabled, and that half registers the
|
|
5
|
+
# themes through the `theme` service provided by @deepseek-ai/dsh-client-ui-theme.
|
|
6
|
+
#
|
|
7
|
+
# ── NO `modifies` HERE ───────────────────────────────────────────────────────
|
|
8
|
+
#
|
|
9
|
+
# This row used to declare `modifies: [ui-theme]`, meaning "I modify the row that
|
|
10
|
+
# owns the theme service". That is a CYCLE, and it hung the whole application.
|
|
11
|
+
#
|
|
12
|
+
# The client half already lists `theme` in its `inject` array, which is what
|
|
13
|
+
# actually orders activation: the consumer is mounted once the provider has
|
|
14
|
+
# offered the service. Adding `modifies` on top told the loader the opposite as
|
|
15
|
+
# well — that this row must be brought up BEFORE ui-theme — so ui-theme waited for
|
|
16
|
+
# us and we waited for ui-theme, both fibers stayed pending, and the desktop app
|
|
17
|
+
# stopped at "Loading plugins..." with no exception and no crash log.
|
|
18
|
+
#
|
|
19
|
+
# Consuming a service through `inject` is sufficient and correct. Never declare
|
|
20
|
+
# `modifies` for a row whose service this plugin consumes.
|
|
21
|
+
#
|
|
22
|
+
# ── THE KILL SWITCH (`config.ambient`) ───────────────────────────────────────
|
|
23
|
+
#
|
|
24
|
+
# `config: { ambient: false }` stops BOTH of this plugin's active layers: the
|
|
25
|
+
# sidebar scenery and the skin restore.
|
|
26
|
+
#
|
|
27
|
+
# It exists because the only lever available when the plugin misbehaved was
|
|
28
|
+
# removing it from `dsh.profile.bundles` — and on the desktop that list is NOT
|
|
29
|
+
# hand-maintained. The application re-derives it from `dependencies` whenever a
|
|
30
|
+
# package is installed, enabled or optimised, so a package declaring
|
|
31
|
+
# `dsh.bundle.patch` is written straight back and the plugin returns on its own.
|
|
32
|
+
# There was no brake on the plugin's side at all.
|
|
33
|
+
#
|
|
34
|
+
# To defuse a misbehaving skin without fighting the installer, set it to `false` in
|
|
35
|
+
# the PROFILE's own `cordis.patch.yml` (the durable place):
|
|
36
|
+
#
|
|
37
|
+
# - id: theme-gallery
|
|
38
|
+
# name: dsh-theme-gallery
|
|
39
|
+
# config:
|
|
40
|
+
# ambient: false
|
|
41
|
+
#
|
|
42
|
+
# Anything other than an explicit `false` leaves both layers on, so an absent
|
|
43
|
+
# `config` behaves exactly as before.
|
|
44
|
+
- insert:
|
|
45
|
+
- id: theme-gallery
|
|
46
|
+
name: dsh-theme-gallery
|
|
47
|
+
config:
|
|
48
|
+
ambient: true
|
package/lib/client.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type surface of the theme pack's browser half.
|
|
3
|
+
*
|
|
4
|
+
* The runtime entry is `lib/client.js` — a lazy-CJS factory the client module
|
|
5
|
+
* system loads. This file describes what that factory exports; the registration
|
|
6
|
+
* contract itself is verified in `types/client.ts`.
|
|
7
|
+
*/
|
|
8
|
+
import type { Context } from '@deepseek-ai/cordis'
|
|
9
|
+
import type { ThemeDefinition, ThemeTokenOverrides } from '@deepseek-ai/dsh-client-ui-theme/client'
|
|
10
|
+
|
|
11
|
+
/** One theme contributed by this pack. */
|
|
12
|
+
export interface PackTheme {
|
|
13
|
+
/** Theme id passed to `ctx.theme.setTheme`. */
|
|
14
|
+
id: string
|
|
15
|
+
/** Base palette the overrides sit on top of. */
|
|
16
|
+
base: ThemeDefinition['colorScheme']
|
|
17
|
+
/** Alias-token overrides, each with one value per color scheme. */
|
|
18
|
+
tokens: ThemeTokenOverrides
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Display name used in client diagnostics. */
|
|
22
|
+
export declare const name: string
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Client plugin body: register every theme in this pack and mount the settings
|
|
26
|
+
* row into `settings.general.item`.
|
|
27
|
+
* @param ctx - client context carrying the theme and slots services.
|
|
28
|
+
*/
|
|
29
|
+
export declare function apply(ctx: Context): void
|