@maci0/dsh-win2k 0.12.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/lib/index.js ADDED
@@ -0,0 +1,52 @@
1
+ /**
2
+ * dsh-win2k: Windows 2000 theme, as a DeepSeek Harness plugin.
3
+ *
4
+ * Two halves, both on public Cordis extension points:
5
+ *
6
+ * - the browser half (`lib/client.js`) stacks a `ctx.theme.overrideTokens`
7
+ * layer that repaints the Web client in the Windows 2000 registry colours,
8
+ * and appends the chrome a token cannot express (square corners, MS Sans
9
+ * Serif, the beveled scrollbar);
10
+ * - this host half declares the `win2k` settings namespace that makes the
11
+ * choice persistent. The browser half's own cube in Settings → General sits
12
+ * directly under the built-in Appearance cubes and writes it.
13
+ *
14
+ * The stock Appearance row renders three hardcoded cubes and the durable theme
15
+ * schema accepts only `light`/`dark`/`system`, so a third-party theme cannot
16
+ * enter that row from outside core. This plugin therefore draws its own cube
17
+ * through the public `settings.general.item` slot and keeps the choice in its
18
+ * own namespace: no core change, and no second copy of another plugin's
19
+ * control.
20
+ *
21
+ * @module dsh-win2k
22
+ */
23
+ import Schema from '@deepseek-ai/schemastery';
24
+ /** Plugin name as it appears in the loader. */
25
+ export const name = 'win2k';
26
+ /**
27
+ * Settings namespace the browser cube edits: the join key between this host
28
+ * half and `lib/client.js`.
29
+ */
30
+ export const WIN2K_SETTINGS_NAMESPACE = 'win2k';
31
+ /**
32
+ * Configuration accepted from this plugin's row in a profile patch.
33
+ *
34
+ * `selected` is the plugin's own flag rather than the theme service's
35
+ * preference: the `ui-theme` document holds built-in ids only, and a
36
+ * third-party id cannot be written there.
37
+ *
38
+ * The field is spelled once: the settings namespace validates the stored value
39
+ * against this schema and Cordis validates the row patch against the same
40
+ * object, so the two can never drift. It defaults to `false`: the cube is the
41
+ * switch.
42
+ */
43
+ export const Config = Schema.object({
44
+ selected: Schema.boolean().default(false).volatile(),
45
+ });
46
+ /**
47
+ * Mount the plugin. The host half registers nothing: the row's volatile
48
+ * `selected` is the stored switch, and the browser half reads it.
49
+ * @param _ctx - the host context.
50
+ * @param _config - the row configuration.
51
+ */
52
+ export function apply(_ctx, _config) { }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * dsh-win2k: Windows 2000 theme, as a DeepSeek Harness plugin.
3
+ *
4
+ * Two halves, both on public Cordis extension points:
5
+ *
6
+ * - the browser half (`lib/client.js`) stacks a `ctx.theme.overrideTokens`
7
+ * layer that repaints the Web client in the Windows 2000 registry colours,
8
+ * and appends the chrome a token cannot express (square corners, MS Sans
9
+ * Serif, the beveled scrollbar);
10
+ * - this host half declares the `win2k` settings namespace that makes the
11
+ * choice persistent. The browser half's own cube in Settings → General sits
12
+ * directly under the built-in Appearance cubes and writes it.
13
+ *
14
+ * The stock Appearance row renders three hardcoded cubes and the durable theme
15
+ * schema accepts only `light`/`dark`/`system`, so a third-party theme cannot
16
+ * enter that row from outside core. This plugin therefore draws its own cube
17
+ * through the public `settings.general.item` slot and keeps the choice in its
18
+ * own namespace: no core change, and no second copy of another plugin's
19
+ * control.
20
+ *
21
+ * @module dsh-win2k
22
+ */
23
+ import type { Context, Volatile } from '@deepseek-ai/cordis';
24
+ import Schema from '@deepseek-ai/schemastery';
25
+ /** Plugin name as it appears in the loader. */
26
+ export declare const name = "win2k";
27
+ /**
28
+ * Settings namespace the browser cube edits: the join key between this host
29
+ * half and `lib/client.js`.
30
+ */
31
+ export declare const WIN2K_SETTINGS_NAMESPACE = "win2k";
32
+ /**
33
+ * Configuration accepted from this plugin's row in a profile patch.
34
+ *
35
+ * `selected` is the plugin's own flag rather than the theme service's
36
+ * preference: the `ui-theme` document holds built-in ids only, and a
37
+ * third-party id cannot be written there.
38
+ *
39
+ * The field is spelled once: the settings namespace validates the stored value
40
+ * against this schema and Cordis validates the row patch against the same
41
+ * object, so the two can never drift. It defaults to `false`: the cube is the
42
+ * switch.
43
+ */
44
+ export declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
45
+ selected: Schema<boolean, boolean, "volatile-defined">;
46
+ }>>, Schemastery.ObjectT<NoInfer<{
47
+ selected: Schema<boolean, boolean, "volatile-defined">;
48
+ }>>, "plain">;
49
+ /** Configuration this plugin's row resolves to. */
50
+ export interface Config {
51
+ /** Start with the theme applied. The schema default fills `false`. */
52
+ readonly selected: Volatile<boolean>;
53
+ }
54
+ /**
55
+ * Mount the plugin. The host half registers nothing: the row's volatile
56
+ * `selected` is the stored switch, and the browser half reads it.
57
+ * @param _ctx - the host context.
58
+ * @param _config - the row configuration.
59
+ */
60
+ export declare function apply(_ctx: Context, _config: Config): void;
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Windows 2000",
4
+ "description": "A Windows 2000 theme and period chrome for the web client."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Windows 2000",
4
+ "description": "为网页客户端提供 Windows 2000 主题与同期界面。"
5
+ }
6
+ }
package/package.json ADDED
@@ -0,0 +1,101 @@
1
+ {
2
+ "name": "@maci0/dsh-win2k",
3
+ "version": "0.12.4",
4
+ "publishConfig": {
5
+ "access": "public",
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "type": "module",
9
+ "description": "Windows 2000 theme for DeepSeek Harness: a ctx.theme token layer, a cube under the Appearance row in Settings \u2192 General, and period chrome for the parts a token cannot spell.",
10
+ "license": "MIT",
11
+ "main": "lib/index.js",
12
+ "types": "lib/types/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./lib/types/index.d.ts",
16
+ "default": "./lib/index.js"
17
+ },
18
+ "./client": {
19
+ "default": "./lib/client.js"
20
+ },
21
+ "./cordis.patch.yml": "./cordis.patch.yml",
22
+ "./locale/*.json": "./locale/*.json",
23
+ "./package.json": "./package.json"
24
+ },
25
+ "files": [
26
+ "icon.svg",
27
+ "locale/*.json",
28
+ "lib/**/*.js",
29
+ "lib/types/**/*.d.ts",
30
+ "cordis.patch.yml",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "dsh": {
35
+ "bundle": {
36
+ "patch": "./cordis.patch.yml"
37
+ },
38
+ "client": {
39
+ "platform": "web",
40
+ "inject": [
41
+ "@deepseek-ai/dsh-client-ui-theme",
42
+ "@deepseek-ai/dsh-client-ui-settings",
43
+ "@deepseek-ai/dsh-client-ui-settings-general",
44
+ "@deepseek-ai/dsh-client-locale",
45
+ "@deepseek-ai/dsh-client-ui-renderer"
46
+ ]
47
+ },
48
+ "compatibility": {
49
+ "dsh": ">=0.2.0-rc.2 <0.3.0"
50
+ }
51
+ },
52
+ "scripts": {
53
+ "build": "bunx --bun tsc -p tsconfig.build.json",
54
+ "test": "bun test",
55
+ "typecheck": "bunx --bun tsc -p tsconfig.json",
56
+ "test:node": "node --test tests/*.test.*"
57
+ },
58
+ "engines": {
59
+ "node": "^22.19.0 || >=24.0.0"
60
+ },
61
+ "peerDependencies": {
62
+ "@deepseek-ai/cordis": "4.0.5-alpha.1",
63
+ "@deepseek-ai/dsh-client-locale": "*",
64
+ "@deepseek-ai/dsh-client-ui-renderer": "*",
65
+ "@deepseek-ai/dsh-client-ui-settings": "*",
66
+ "@deepseek-ai/dsh-client-ui-settings-general": "*",
67
+ "@deepseek-ai/dsh-client-ui-theme": "*",
68
+ "@deepseek-ai/schemastery": "*"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "@deepseek-ai/dsh-client-locale": {
72
+ "optional": true
73
+ },
74
+ "@deepseek-ai/dsh-client-ui-renderer": {
75
+ "optional": true
76
+ },
77
+ "@deepseek-ai/dsh-client-ui-settings": {
78
+ "optional": true
79
+ },
80
+ "@deepseek-ai/dsh-client-ui-settings-general": {
81
+ "optional": true
82
+ },
83
+ "@deepseek-ai/dsh-client-ui-theme": {
84
+ "optional": true
85
+ },
86
+ "@deepseek-ai/schemastery": {
87
+ "optional": true
88
+ }
89
+ },
90
+ "devDependencies": {
91
+ "@deepseek-ai/cordis": "4.0.5-alpha.1",
92
+ "@deepseek-ai/schemastery": "^3.18.4",
93
+ "@types/node": "^22.20.2",
94
+ "typescript": "^7.0.2"
95
+ },
96
+ "repository": {
97
+ "type": "git",
98
+ "url": "https://github.com/maci0/dsh-win2k.git"
99
+ },
100
+ "icon": "./icon.svg"
101
+ }