@morlay/dsh-client-ui-primitives 0.0.2-alpha.6 → 0.0.2-alpha.7

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
@@ -23,7 +23,7 @@
23
23
  ## token 树
24
24
 
25
25
  `designTokens`(`src/client/theme.generated.ts`)由 `scripts/gen-design-tokens.mts` 从
26
- 上游主题源码生成,共 **359 个 `--dsw-*`**:叶子是该变量在 light 主题里的默认值。
26
+ 上游主题源码生成,共 **367 个 `--dsw-*`**:叶子是该变量在 light 主题里的默认值。
27
27
  生成机制、`"$"` 键语义与守卫判据见
28
28
  [ADR-css-in-js样式层与官方token消费](./.agents/adrs/20260917-css-in-js样式层与官方token消费.md)。
29
29
 
package/dist/client.cjs CHANGED
@@ -323,7 +323,7 @@ window.__ModuleLoader__.load({
323
323
  //#endregion
324
324
  //#region src/client/theme.generated.ts
325
325
  /**
326
- * 官方主题的 `--dsw-*` token 全集(361 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
326
+ * 官方主题的 `--dsw-*` token 全集(367 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
327
327
  *
328
328
  * 叶子是该变量的**默认值**(官方 light 主题里首次出现的定义):既是类型推导的来源,也可作 fallback。
329
329
  * `"$"` 键出现在「自身也是 token 的分支」上(命名体系里有 40 个短名同时是长名前缀的 token)。
@@ -399,6 +399,10 @@ window.__ModuleLoader__.load({
399
399
  "hover": "rgba(84, 85, 87, 0.6)"
400
400
  } }
401
401
  },
402
+ "code": { "diff": {
403
+ "added": "var(--dsw-static-green-500-a08)",
404
+ "deleted": "var(--dsw-static-red-600-a08)"
405
+ } },
402
406
  "interactive": { "bg": {
403
407
  "active": "rgba(38, 49, 72, 0.1)",
404
408
  "hover": {
@@ -872,7 +876,11 @@ window.__ModuleLoader__.load({
872
876
  "green": {
873
877
  "100": "rgb(230, 250, 237)",
874
878
  "400": "rgb(78, 209, 126)",
875
- "500": "rgb(34, 197, 94)",
879
+ "500": {
880
+ "$": "rgb(34, 197, 94)",
881
+ "a08": "rgb(34 197 94 / 8%)",
882
+ "a12": "rgb(34 197 94 / 12%)"
883
+ },
876
884
  "900": "rgb(35, 60, 44)"
877
885
  },
878
886
  "neutral": {
@@ -917,9 +925,15 @@ window.__ModuleLoader__.load({
917
925
  "red": {
918
926
  "50": "rgb(254, 242, 242)",
919
927
  "100": "rgb(254, 226, 226)",
920
- "400": "rgb(242, 90, 90)",
928
+ "400": {
929
+ "$": "rgb(242, 90, 90)",
930
+ "a12": "rgb(242 90 90 / 12%)"
931
+ },
921
932
  "500": "rgb(239, 68, 68)",
922
- "600": "rgb(236, 19, 19)",
933
+ "600": {
934
+ "$": "rgb(236, 19, 19)",
935
+ "a08": "rgb(236 19 19 / 8%)"
936
+ },
923
937
  "900": "rgb(87, 12, 12)"
924
938
  }
925
939
  }
package/dist/client.d.cts CHANGED
@@ -9414,7 +9414,7 @@ declare function styleOf(component: StyledComponent<ElementType>): CSSProps;
9414
9414
  //#endregion
9415
9415
  //#region src/client/theme.generated.d.ts
9416
9416
  /**
9417
- * 官方主题的 `--dsw-*` token 全集(361 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
9417
+ * 官方主题的 `--dsw-*` token 全集(367 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
9418
9418
  *
9419
9419
  * 叶子是该变量的**默认值**(官方 light 主题里首次出现的定义):既是类型推导的来源,也可作 fallback。
9420
9420
  * `"$"` 键出现在「自身也是 token 的分支」上(命名体系里有 40 个短名同时是长名前缀的 token)。
@@ -9512,6 +9512,12 @@ declare const designTokens: {
9512
9512
  };
9513
9513
  };
9514
9514
  };
9515
+ readonly code: {
9516
+ readonly diff: {
9517
+ readonly added: "var(--dsw-static-green-500-a08)";
9518
+ readonly deleted: "var(--dsw-static-red-600-a08)";
9519
+ };
9520
+ };
9515
9521
  readonly interactive: {
9516
9522
  readonly bg: {
9517
9523
  readonly active: "rgba(38, 49, 72, 0.1)";
@@ -10093,7 +10099,11 @@ declare const designTokens: {
10093
10099
  readonly green: {
10094
10100
  readonly "100": "rgb(230, 250, 237)";
10095
10101
  readonly "400": "rgb(78, 209, 126)";
10096
- readonly "500": "rgb(34, 197, 94)";
10102
+ readonly "500": {
10103
+ readonly $: "rgb(34, 197, 94)";
10104
+ readonly a08: "rgb(34 197 94 / 8%)";
10105
+ readonly a12: "rgb(34 197 94 / 12%)";
10106
+ };
10097
10107
  readonly "900": "rgb(35, 60, 44)";
10098
10108
  };
10099
10109
  readonly neutral: {
@@ -10138,9 +10148,15 @@ declare const designTokens: {
10138
10148
  readonly red: {
10139
10149
  readonly "50": "rgb(254, 242, 242)";
10140
10150
  readonly "100": "rgb(254, 226, 226)";
10141
- readonly "400": "rgb(242, 90, 90)";
10151
+ readonly "400": {
10152
+ readonly $: "rgb(242, 90, 90)";
10153
+ readonly a12: "rgb(242 90 90 / 12%)";
10154
+ };
10142
10155
  readonly "500": "rgb(239, 68, 68)";
10143
- readonly "600": "rgb(236, 19, 19)";
10156
+ readonly "600": {
10157
+ readonly $: "rgb(236, 19, 19)";
10158
+ readonly a08: "rgb(236 19 19 / 8%)";
10159
+ };
10144
10160
  readonly "900": "rgb(87, 12, 12)";
10145
10161
  };
10146
10162
  };
@@ -10239,6 +10255,12 @@ declare const dsw: TokenVars<{
10239
10255
  };
10240
10256
  };
10241
10257
  };
10258
+ readonly code: {
10259
+ readonly diff: {
10260
+ readonly added: "var(--dsw-static-green-500-a08)";
10261
+ readonly deleted: "var(--dsw-static-red-600-a08)";
10262
+ };
10263
+ };
10242
10264
  readonly interactive: {
10243
10265
  readonly bg: {
10244
10266
  readonly active: "rgba(38, 49, 72, 0.1)";
@@ -10820,7 +10842,11 @@ declare const dsw: TokenVars<{
10820
10842
  readonly green: {
10821
10843
  readonly "100": "rgb(230, 250, 237)";
10822
10844
  readonly "400": "rgb(78, 209, 126)";
10823
- readonly "500": "rgb(34, 197, 94)";
10845
+ readonly "500": {
10846
+ readonly $: "rgb(34, 197, 94)";
10847
+ readonly a08: "rgb(34 197 94 / 8%)";
10848
+ readonly a12: "rgb(34 197 94 / 12%)";
10849
+ };
10824
10850
  readonly "900": "rgb(35, 60, 44)";
10825
10851
  };
10826
10852
  readonly neutral: {
@@ -10865,9 +10891,15 @@ declare const dsw: TokenVars<{
10865
10891
  readonly red: {
10866
10892
  readonly "50": "rgb(254, 242, 242)";
10867
10893
  readonly "100": "rgb(254, 226, 226)";
10868
- readonly "400": "rgb(242, 90, 90)";
10894
+ readonly "400": {
10895
+ readonly $: "rgb(242, 90, 90)";
10896
+ readonly a12: "rgb(242 90 90 / 12%)";
10897
+ };
10869
10898
  readonly "500": "rgb(239, 68, 68)";
10870
- readonly "600": "rgb(236, 19, 19)";
10899
+ readonly "600": {
10900
+ readonly $: "rgb(236, 19, 19)";
10901
+ readonly a08: "rgb(236 19 19 / 8%)";
10902
+ };
10871
10903
  readonly "900": "rgb(87, 12, 12)";
10872
10904
  };
10873
10905
  };
package/dist/client.d.mts CHANGED
@@ -9414,7 +9414,7 @@ declare function styleOf(component: StyledComponent<ElementType>): CSSProps;
9414
9414
  //#endregion
9415
9415
  //#region src/client/theme.generated.d.ts
9416
9416
  /**
9417
- * 官方主题的 `--dsw-*` token 全集(361 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
9417
+ * 官方主题的 `--dsw-*` token 全集(367 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
9418
9418
  *
9419
9419
  * 叶子是该变量的**默认值**(官方 light 主题里首次出现的定义):既是类型推导的来源,也可作 fallback。
9420
9420
  * `"$"` 键出现在「自身也是 token 的分支」上(命名体系里有 40 个短名同时是长名前缀的 token)。
@@ -9512,6 +9512,12 @@ declare const designTokens: {
9512
9512
  };
9513
9513
  };
9514
9514
  };
9515
+ readonly code: {
9516
+ readonly diff: {
9517
+ readonly added: "var(--dsw-static-green-500-a08)";
9518
+ readonly deleted: "var(--dsw-static-red-600-a08)";
9519
+ };
9520
+ };
9515
9521
  readonly interactive: {
9516
9522
  readonly bg: {
9517
9523
  readonly active: "rgba(38, 49, 72, 0.1)";
@@ -10093,7 +10099,11 @@ declare const designTokens: {
10093
10099
  readonly green: {
10094
10100
  readonly "100": "rgb(230, 250, 237)";
10095
10101
  readonly "400": "rgb(78, 209, 126)";
10096
- readonly "500": "rgb(34, 197, 94)";
10102
+ readonly "500": {
10103
+ readonly $: "rgb(34, 197, 94)";
10104
+ readonly a08: "rgb(34 197 94 / 8%)";
10105
+ readonly a12: "rgb(34 197 94 / 12%)";
10106
+ };
10097
10107
  readonly "900": "rgb(35, 60, 44)";
10098
10108
  };
10099
10109
  readonly neutral: {
@@ -10138,9 +10148,15 @@ declare const designTokens: {
10138
10148
  readonly red: {
10139
10149
  readonly "50": "rgb(254, 242, 242)";
10140
10150
  readonly "100": "rgb(254, 226, 226)";
10141
- readonly "400": "rgb(242, 90, 90)";
10151
+ readonly "400": {
10152
+ readonly $: "rgb(242, 90, 90)";
10153
+ readonly a12: "rgb(242 90 90 / 12%)";
10154
+ };
10142
10155
  readonly "500": "rgb(239, 68, 68)";
10143
- readonly "600": "rgb(236, 19, 19)";
10156
+ readonly "600": {
10157
+ readonly $: "rgb(236, 19, 19)";
10158
+ readonly a08: "rgb(236 19 19 / 8%)";
10159
+ };
10144
10160
  readonly "900": "rgb(87, 12, 12)";
10145
10161
  };
10146
10162
  };
@@ -10239,6 +10255,12 @@ declare const dsw: TokenVars<{
10239
10255
  };
10240
10256
  };
10241
10257
  };
10258
+ readonly code: {
10259
+ readonly diff: {
10260
+ readonly added: "var(--dsw-static-green-500-a08)";
10261
+ readonly deleted: "var(--dsw-static-red-600-a08)";
10262
+ };
10263
+ };
10242
10264
  readonly interactive: {
10243
10265
  readonly bg: {
10244
10266
  readonly active: "rgba(38, 49, 72, 0.1)";
@@ -10820,7 +10842,11 @@ declare const dsw: TokenVars<{
10820
10842
  readonly green: {
10821
10843
  readonly "100": "rgb(230, 250, 237)";
10822
10844
  readonly "400": "rgb(78, 209, 126)";
10823
- readonly "500": "rgb(34, 197, 94)";
10845
+ readonly "500": {
10846
+ readonly $: "rgb(34, 197, 94)";
10847
+ readonly a08: "rgb(34 197 94 / 8%)";
10848
+ readonly a12: "rgb(34 197 94 / 12%)";
10849
+ };
10824
10850
  readonly "900": "rgb(35, 60, 44)";
10825
10851
  };
10826
10852
  readonly neutral: {
@@ -10865,9 +10891,15 @@ declare const dsw: TokenVars<{
10865
10891
  readonly red: {
10866
10892
  readonly "50": "rgb(254, 242, 242)";
10867
10893
  readonly "100": "rgb(254, 226, 226)";
10868
- readonly "400": "rgb(242, 90, 90)";
10894
+ readonly "400": {
10895
+ readonly $: "rgb(242, 90, 90)";
10896
+ readonly a12: "rgb(242 90 90 / 12%)";
10897
+ };
10869
10898
  readonly "500": "rgb(239, 68, 68)";
10870
- readonly "600": "rgb(236, 19, 19)";
10899
+ readonly "600": {
10900
+ readonly $: "rgb(236, 19, 19)";
10901
+ readonly a08: "rgb(236 19 19 / 8%)";
10902
+ };
10871
10903
  readonly "900": "rgb(87, 12, 12)";
10872
10904
  };
10873
10905
  };
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "UI Primitives",
4
+ "description": "css-in-js styling layer plus the shared reference parser and renderer for the forked conversation UI."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "UI 基础层",
4
+ "description": "css-in-js 样式层,以及被 fork 的对话 UI 共用的引用解析与渲染转换。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morlay/dsh-client-ui-primitives",
3
- "version": "0.0.2-alpha.6",
3
+ "version": "0.0.2-alpha.7",
4
4
  "description": "css-in-js styling kit (styled / Token / Styling) for the forked conversation UI: consumes the official --dsw-* design tokens, so no CSS Modules precompile step is needed.",
5
5
  "keywords": [
6
6
  "client",
@@ -16,6 +16,7 @@
16
16
  "url": "https://github.com/morlay/dsh-plugin.git"
17
17
  },
18
18
  "files": [
19
+ "locale/*.json",
19
20
  "dist",
20
21
  "src",
21
22
  "cordis.patch.yml",
@@ -29,7 +30,8 @@
29
30
  "./client": {
30
31
  "types": "./dist/client.d.cts",
31
32
  "default": "./dist/client.cjs"
32
- }
33
+ },
34
+ "./locale/*.json": "./locale/*.json"
33
35
  },
34
36
  "dependencies": {
35
37
  "mdast-util-from-markdown": "^2.0.3",
@@ -40,7 +42,7 @@
40
42
  "micromark-util-types": "^2.0.2"
41
43
  },
42
44
  "devDependencies": {
43
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-alpha.1",
45
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.7-alpha.2",
44
46
  "@types/mdast": "^4.0.4",
45
47
  "@types/react": "~18.3.1",
46
48
  "csstype": "^3.1.3",
@@ -48,7 +50,7 @@
48
50
  "react-dom": "^18.2.0"
49
51
  },
50
52
  "peerDependencies": {
51
- "@deepseek-ai/cordis": "4.0.3"
53
+ "@deepseek-ai/cordis": "4.0.4"
52
54
  },
53
55
  "dsh": {
54
56
  "client": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 官方主题的 `--dsw-*` token 全集(361 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
2
+ * 官方主题的 `--dsw-*` token 全集(367 个),由 packages/client/ui-primitives/scripts/gen-design-tokens.mts 生成,勿手改。
3
3
  *
4
4
  * 叶子是该变量的**默认值**(官方 light 主题里首次出现的定义):既是类型推导的来源,也可作 fallback。
5
5
  * `"$"` 键出现在「自身也是 token 的分支」上(命名体系里有 40 个短名同时是长名前缀的 token)。
@@ -97,6 +97,12 @@ export const designTokens = {
97
97
  },
98
98
  },
99
99
  },
100
+ "code": {
101
+ "diff": {
102
+ "added": "var(--dsw-static-green-500-a08)",
103
+ "deleted": "var(--dsw-static-red-600-a08)",
104
+ },
105
+ },
100
106
  "interactive": {
101
107
  "bg": {
102
108
  "active": "rgba(38, 49, 72, 0.1)",
@@ -678,7 +684,11 @@ export const designTokens = {
678
684
  "green": {
679
685
  "100": "rgb(230, 250, 237)",
680
686
  "400": "rgb(78, 209, 126)",
681
- "500": "rgb(34, 197, 94)",
687
+ "500": {
688
+ "$": "rgb(34, 197, 94)",
689
+ "a08": "rgb(34 197 94 / 8%)",
690
+ "a12": "rgb(34 197 94 / 12%)",
691
+ },
682
692
  "900": "rgb(35, 60, 44)",
683
693
  },
684
694
  "neutral": {
@@ -723,9 +733,15 @@ export const designTokens = {
723
733
  "red": {
724
734
  "50": "rgb(254, 242, 242)",
725
735
  "100": "rgb(254, 226, 226)",
726
- "400": "rgb(242, 90, 90)",
736
+ "400": {
737
+ "$": "rgb(242, 90, 90)",
738
+ "a12": "rgb(242 90 90 / 12%)",
739
+ },
727
740
  "500": "rgb(239, 68, 68)",
728
- "600": "rgb(236, 19, 19)",
741
+ "600": {
742
+ "$": "rgb(236, 19, 19)",
743
+ "a08": "rgb(236 19 19 / 8%)",
744
+ },
729
745
  "900": "rgb(87, 12, 12)",
730
746
  },
731
747
  },