@xiaotuchu/dsh-theme-eye-care 0.0.0-stage → 2.0.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/LICENSE +21 -0
- package/README.md +215 -2
- package/cordis.patch.yml +8 -0
- package/lib/client.js +654 -0
- package/lib/index.js +22 -0
- package/package.json +68 -3
- package/preview.png +0 -0
- package/themes/eye-green.json +628 -0
- package/themes/warm-grey.json +629 -0
- package/themes/warm-paper.json +629 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
// GENERATED FILE — edit themes/*.json and run `npm run build`.
|
|
2
|
+
//
|
|
3
|
+
// Client half of @xiaotuchu/dsh-theme-eye-care. Stacks one alias-token override layer for the selected
|
|
4
|
+
// palette over whatever theme is active, and contributes the palette switcher to
|
|
5
|
+
// Settings -> General. Every token value is a { light, dark } pair because the
|
|
6
|
+
// presenter picks one per active color scheme.
|
|
7
|
+
window.__ModuleLoader__.load({
|
|
8
|
+
id: "@xiaotuchu/dsh-theme-eye-care",
|
|
9
|
+
factory: (require) => {
|
|
10
|
+
var module = { exports: {} };
|
|
11
|
+
var exports = module.exports;
|
|
12
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
|
|
14
|
+
var react = require("react");
|
|
15
|
+
|
|
16
|
+
var SOURCE = "@xiaotuchu/dsh-theme-eye-care";
|
|
17
|
+
var STORAGE_KEY = "dsh-theme-eye-care:palette";
|
|
18
|
+
var DEFAULT_THEME = "warm-paper";
|
|
19
|
+
var OFF_ID = "dsh-default";
|
|
20
|
+
|
|
21
|
+
var THEMES = [
|
|
22
|
+
{
|
|
23
|
+
id: "eye-green",
|
|
24
|
+
displayName: "护眼绿",
|
|
25
|
+
swatch: "#eef7ed",
|
|
26
|
+
tokens: {
|
|
27
|
+
"--dsw-alias-bg-base": { light: "#eef7ed", dark: "#1c211d" },
|
|
28
|
+
"--dsw-alias-bg-layer-1": { light: "#eef7ed", dark: "#232a24" },
|
|
29
|
+
"--dsw-alias-bg-layer-2": { light: "#eef7ed", dark: "#29322a" },
|
|
30
|
+
"--dsw-alias-bg-layer-3": { light: "#eef7ed", dark: "#303a31" },
|
|
31
|
+
"--dsw-alias-bg-module-platform": { light: "#e2efe0", dark: "#29322a" },
|
|
32
|
+
"--dsw-alias-bg-multi-select": { light: "#e7f2e5", dark: "#303a31" },
|
|
33
|
+
"--dsw-alias-bg-overlay": { light: "#eaf4e8", dark: "#303a31" },
|
|
34
|
+
"--dsw-alias-bg-document-preview": { light: "#e2efe0", dark: "#1c211d" },
|
|
35
|
+
"--dsw-alias-bg-skeleton": { light: "rgba(79,118,95, 0.08)", dark: "rgba(214,231,216, 0.08)" },
|
|
36
|
+
"--dsw-alias-bg-mask-1": { light: "rgba(28,40,32, 0.28)", dark: "rgba(0, 0, 0, 0.5)" },
|
|
37
|
+
"--dsw-alias-bg-mask-2": { light: "rgba(28,40,32, 0.14)", dark: "rgba(0, 0, 0, 0.2)" },
|
|
38
|
+
"--dsw-alias-bg-mask-3": { light: "rgba(18,28,21, 0.48)", dark: "rgba(0, 0, 0, 0.48)" },
|
|
39
|
+
"--dsw-alias-bg-mask-photo": { light: "rgba(18,28,21, 0.88)", dark: "rgba(0, 0, 0, 0.88)" },
|
|
40
|
+
"--dsw-alias-bg-mask-drop": { light: "rgba(238, 247, 237, 0.72)", dark: "rgba(31,42,35, 0.72)" },
|
|
41
|
+
"--dsw-alias-bg-document-selection": { light: "color-mix(in srgb, #4f765f 40%, transparent)", dark: "color-mix(in srgb, #4f765f 40%, transparent)" },
|
|
42
|
+
"--dsw-alias-border-l1": { light: "rgba(79,118,95, 0.12)", dark: "rgba(214,231,216, 0.08)" },
|
|
43
|
+
"--dsw-alias-border-l2": { light: "rgba(79,118,95, 0.20)", dark: "rgba(214,231,216, 0.14)" },
|
|
44
|
+
"--dsw-alias-border-l2-darkmode-thin": { light: "rgba(79,118,95, 0.20)", dark: "rgba(214,231,216, 0.08)" },
|
|
45
|
+
"--dsw-alias-border-l3": { light: "rgba(79,118,95, 0.26)", dark: "rgba(214,231,216, 0.18)" },
|
|
46
|
+
"--dsw-alias-border-l4": { light: "rgba(79,118,95, 0.34)", dark: "rgba(214,231,216, 0.24)" },
|
|
47
|
+
"--dsw-alias-border-inverted": { light: "rgba(0, 0, 0, 0)", dark: "rgba(214,231,216, 0.06)" },
|
|
48
|
+
"--dsw-alias-border-inverted2": { light: "rgba(0, 0, 0, 0)", dark: "rgba(214,231,216, 0.08)" },
|
|
49
|
+
"--dsw-alias-label-primary": { light: "#26332b", dark: "#dfe9e0" },
|
|
50
|
+
"--dsw-alias-label-primary-dimmed": { light: "#33413a", dark: "#c3d3c6" },
|
|
51
|
+
"--dsw-alias-label-primary-foreground": { light: "#eef7ed", dark: "#1c211d" },
|
|
52
|
+
"--dsw-alias-label-primary-inverted": { light: "#eef7ed", dark: "#c3d3c6" },
|
|
53
|
+
"--dsw-alias-label-primary-bluish": { light: "#3d5c4a", dark: "#c6e0cd" },
|
|
54
|
+
"--dsw-alias-label-secondary": { light: "#4a5a4f", dark: "#b4c2b6" },
|
|
55
|
+
"--dsw-alias-label-tertiary": { light: "#556852", dark: "#93a396" },
|
|
56
|
+
"--dsw-alias-label-caption": { light: "#768878", dark: "#7c8b7f" },
|
|
57
|
+
"--dsw-alias-label-dimmed": { light: "#d3e6d1", dark: "#3a4738" },
|
|
58
|
+
"--dsw-alias-label-document-preview": { light: "#4e6055", dark: "#b4c2b6" },
|
|
59
|
+
"--dsw-alias-label-shimmer": { light: "color-mix(in srgb, #1d2b21 30%, transparent)", dark: "color-mix(in srgb, #f7fcf6 45%, transparent)" },
|
|
60
|
+
"--dsw-alias-label-deep-diving": { light: "#7d5f16", dark: "#e0c07a" },
|
|
61
|
+
"--dsw-alias-label-deep-diving-shimmer": { light: "#9c7a20", dark: "#f0d89a" },
|
|
62
|
+
"--dsw-alias-link": { light: "#4f765f", dark: "#8fc0a0" },
|
|
63
|
+
"--dsw-alias-settings-card-fill": { light: "var(--dsw-alias-bg-layer-2)", dark: "var(--dsw-alias-bg-layer-2)" },
|
|
64
|
+
"--dsw-alias-settings-card-stroke": { light: "var(--dsw-alias-border-l4)", dark: "var(--dsw-alias-border-l4)" },
|
|
65
|
+
"--dsw-alias-brand-primary": { light: "#2f5145", dark: "#dfe9e0" },
|
|
66
|
+
"--dsw-alias-brand-primary-invert": { light: "#2f5145", dark: "#dfe9e0" },
|
|
67
|
+
"--dsw-alias-brand-primary-new-colorprimary-new-color": { light: "#4f765f", dark: "#8fc0a0" },
|
|
68
|
+
"--dsw-alias-brand-text": { light: "#26332b", dark: "#dfe9e0" },
|
|
69
|
+
"--dsw-alias-button-contrast-fill": { light: "#3a5247", dark: "#dfe9e0" },
|
|
70
|
+
"--dsw-alias-button-elevated-fill": { light: "#eef7ed", dark: "#303a31" },
|
|
71
|
+
"--dsw-alias-button-floating-fill": { light: "#eef7ed", dark: "#29322a" },
|
|
72
|
+
"--dsw-alias-button-floating-hover": { light: "#eaf4e8", dark: "#303a31" },
|
|
73
|
+
"--dsw-alias-button-ghost-active-border": { light: "#8fae92", dark: "#5c7a63" },
|
|
74
|
+
"--dsw-alias-button-ghost-active-fill": { light: "#d5e7d3", dark: "#3a4738" },
|
|
75
|
+
"--dsw-alias-button-ghost-active-hover": { light: "#c8dec6", dark: "#456a58" },
|
|
76
|
+
"--dsw-alias-button-info-fill": { light: "#4f765f", dark: "#8fc0a0" },
|
|
77
|
+
"--dsw-alias-button-info-hover": { light: "#3f6149", dark: "#a3ceb2" },
|
|
78
|
+
"--dsw-alias-button-primary-dimmed": { light: "#d5e7d3", dark: "#3a4738" },
|
|
79
|
+
"--dsw-alias-button-primary-fill": { light: "var(--dsw-alias-brand-primary)", dark: "var(--dsw-alias-brand-primary)" },
|
|
80
|
+
"--dsw-alias-button-primary-hover": { light: "#456a58", dark: "#f7fcf6" },
|
|
81
|
+
"--dsw-alias-button-tool-bar-fill": { light: "rgba(74,92,79, 0.5)", dark: "rgba(74,92,79, 0.5)" },
|
|
82
|
+
"--dsw-alias-button-tool-bar-fill-invisible": { light: "rgba(30,42,34, 0.36)", dark: "rgba(30,42,34, 0.36)" },
|
|
83
|
+
"--dsw-alias-button-tool-bar-hover": { light: "rgba(74,92,79, 0.6)", dark: "rgba(74,92,79, 0.6)" },
|
|
84
|
+
"--dsw-alias-interactive-bg-hover": { light: "rgba(79,118,95, 0.07)", dark: "rgba(214,231,216, 0.08)" },
|
|
85
|
+
"--dsw-alias-interactive-bg-active": { light: "rgba(79,118,95, 0.14)", dark: "rgba(214,231,216, 0.14)" },
|
|
86
|
+
"--dsw-alias-interactive-bg-hover-accent": { light: "rgba(79,118,95, 0.16)", dark: "rgba(214,231,216, 0.20)" },
|
|
87
|
+
"--dsw-alias-interactive-bg-hover-danger": { light: "rgba(176, 68, 58, 0.08)", dark: "rgba(214, 120, 110, 0.16)" },
|
|
88
|
+
"--dsw-alias-interactive-bg-hover-solid": { light: "#e7f2e5", dark: "#29322a" },
|
|
89
|
+
"--dsw-alias-markdown-code-block": { light: "#e2efe0", dark: "#232a24" },
|
|
90
|
+
"--dsw-alias-markdown-code-block-banner": { light: "#d5e7d3", dark: "#29322a" },
|
|
91
|
+
"--dsw-alias-markdown-code-segment-selected": { light: "#eef7ed", dark: "#303a31" },
|
|
92
|
+
"--dsw-alias-markdown-code-segment-unselected": { light: "#e7f2e5", dark: "#1f2620" },
|
|
93
|
+
"--dsw-alias-markdown-inline-code": { light: "#e5f1e2", dark: "#29322a" },
|
|
94
|
+
"--dsw-alias-markdown-citation": { light: "#e2efe0", dark: "#29322a" },
|
|
95
|
+
"--dsw-alias-markdown-placeholder": { light: "#e9f4e7", dark: "#232a24" },
|
|
96
|
+
"--dsw-alias-markdown-tag": { light: "#d5e7d3", dark: "#303a31" },
|
|
97
|
+
"--dsw-alias-scrollbar-bg-l1": { light: "#d3e6d1", dark: "#456a58" },
|
|
98
|
+
"--dsw-alias-scrollbar-bg-l2": { light: "#d3e6d1", dark: "#3a4738" },
|
|
99
|
+
"--dsw-alias-scrollbar-hover-l1": { light: "#c0d9be", dark: "#5c7a63" },
|
|
100
|
+
"--dsw-alias-scrollbar-hover-l2": { light: "#c0d9be", dark: "#4b5c48" },
|
|
101
|
+
"--dsw-alias-state-business-primary": { light: "#4f765f", dark: "#8fc0a0" },
|
|
102
|
+
"--dsw-alias-state-business-tertiary": { light: "#dceada", dark: "#3a4738" },
|
|
103
|
+
"--dsw-alias-state-error-primary": { light: "#a83c34", dark: "#e08a80" },
|
|
104
|
+
"--dsw-alias-state-error-secondary": { light: "#c9645a", dark: "#e08a80" },
|
|
105
|
+
"--dsw-alias-state-idle-primary": { light: "#cec5a4", dark: "#5a5340" },
|
|
106
|
+
"--dsw-alias-state-success-primary": { light: "#4f7a33", dark: "#8ec06a" },
|
|
107
|
+
"--dsw-alias-state-success-secondary": { light: "#6b9c4f", dark: "#8ec06a" },
|
|
108
|
+
"--dsw-alias-state-success-tertiary": { light: "#e3edd0", dark: "#333f28" },
|
|
109
|
+
"--dsw-alias-state-warn-primary": { light: "#b07a10", dark: "#e0b260" },
|
|
110
|
+
"--dsw-alias-state-warn-secondary": { light: "#d0a03c", dark: "#e0b260" },
|
|
111
|
+
"--dsw-alias-state-warn-tertiary": { light: "#f6e8c4", dark: "#4a3c1e" },
|
|
112
|
+
"--dsw-alias-state-warn-label": { light: "#8f6210", dark: "#e0b260" },
|
|
113
|
+
"--dsw-alias-code-diff-added": { light: "rgba(79, 122, 51, 0.12)", dark: "rgba(142, 192, 106, 0.12)" },
|
|
114
|
+
"--dsw-alias-code-diff-deleted": { light: "rgba(168, 60, 52, 0.10)", dark: "rgba(224, 138, 128, 0.12)" },
|
|
115
|
+
"--dsw-alias-file-diff-added-bg": { light: "#e6efd6", dark: "#2a3521" },
|
|
116
|
+
"--dsw-alias-file-diff-added-gutter": { light: "#edf4e0", dark: "#212a1a" },
|
|
117
|
+
"--dsw-alias-file-diff-added-marker": { light: "#4f8f36", dark: "#8ec06a" },
|
|
118
|
+
"--dsw-alias-file-diff-deleted-bg": { light: "#f6e2db", dark: "#3a241f" },
|
|
119
|
+
"--dsw-alias-file-diff-deleted-gutter": { light: "#fbeae4", dark: "#2c1a16" },
|
|
120
|
+
"--dsw-alias-file-diff-deleted-marker": { light: "#b0443a", dark: "#e08a80" },
|
|
121
|
+
"--dsw-alias-menu-group-header-fill": { light: "#eaf4e8f0", dark: "#29322af0" },
|
|
122
|
+
"--dsw-alias-menu-icon": { light: "#5c7a63", dark: "#c3d3c6" },
|
|
123
|
+
"--dsw-alias-toast-bg": { light: "#3a5247", dark: "#303a31" },
|
|
124
|
+
"--dsw-alias-toast-label": { light: "#eef7ed", dark: "#f7fcf6" },
|
|
125
|
+
"--dsw-alias-tooltip-bg": { light: "#2f5145", dark: "#303a31" },
|
|
126
|
+
"--dsw-alias-tooltip-key-bg": { light: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)", dark: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)" },
|
|
127
|
+
"--dsw-alias-turn-trigger-bg": { light: "var(--dsw-alias-markdown-code-block)", dark: "var(--dsw-alias-interactive-bg-hover)" },
|
|
128
|
+
"--dsw-alias-turn-trigger-bg-hover": { light: "var(--dsw-alias-interactive-bg-hover)", dark: "var(--dsw-alias-interactive-bg-active)" },
|
|
129
|
+
"--dsw-alias-onboarding-accent": { light: "#4f765f", dark: "#8fc0a0" },
|
|
130
|
+
"--dsw-alias-onboarding-card-fill": { light: "color-mix(in srgb, #f7fcf6 80%, transparent)", dark: "color-mix(in srgb, #29322a 80%, transparent)" },
|
|
131
|
+
"--dsw-alias-onboarding-secondary-fill": { light: "#eef7ed", dark: "#3a4738" },
|
|
132
|
+
"--dsw-alias-onboarding-checkbox-border": { light: "color-mix(in srgb, #26332b 20%, transparent)", dark: "var(--dsw-alias-border-l2)" },
|
|
133
|
+
"--dsw-alias-switch-thumb": { light: "#eef7ed", dark: "#7f9a86" },
|
|
134
|
+
"--dsw-specific-sidebar-fill": { light: "#e2efe0", dark: "#1f2620" },
|
|
135
|
+
"--dsw-specific-sidebar-nav-item-hover": { light: "#d8ead6", dark: "#29322a" },
|
|
136
|
+
"--dsw-specific-sidebar-nav-item-active": { light: "#c8dec6", dark: "#303a31" },
|
|
137
|
+
"--dsw-specific-sidebar-nav-item-active-accent": { light: "#dceada", dark: "#3a4738" },
|
|
138
|
+
"--dsw-specific-menu": { light: "#eef7edf0", dark: "#232a24f0" },
|
|
139
|
+
"--dsw-menu-surface-fill": { light: "#eef7ed94", dark: "#232a2494" },
|
|
140
|
+
"--dsw-specific-bubble": { light: "#e7f2e5", dark: "#29322a" },
|
|
141
|
+
"--dsw-specific-bubble-highlight": { light: "#d5e7d3", dark: "#3a4738" },
|
|
142
|
+
"--dsw-specific-input-major": { light: "#eef7ed", dark: "#29322a" },
|
|
143
|
+
"--dsw-specific-login-input": { light: "#f2f9f0", dark: "#1f2620" },
|
|
144
|
+
"--dsw-specific-selector": { light: "#e7f2e5", dark: "#29322a" },
|
|
145
|
+
"--dsw-specific-tip": { light: "#e7f2e5", dark: "#29322a" },
|
|
146
|
+
"--dsw-linear-gradient-think": { light: "linear-gradient(180deg, #eef7ed 20.19%, #eef7ed00 100%)", dark: "linear-gradient(180deg, #1c211d 20.19%, #1c211d00 100%)" },
|
|
147
|
+
"--dsw-linear-think-select": { light: "linear-gradient(180deg, #e7f2e5 20.19%, #e7f2e500 100%)", dark: "linear-gradient(180deg, #29322a 20.19%, #29322a00 100%)" },
|
|
148
|
+
"--dsw-static-neutral-00": { light: "#eef7ed", dark: "#f7fcf6" },
|
|
149
|
+
"--dsw-static-neutral-50": { light: "#eef7ed", dark: "#f2f9f0" },
|
|
150
|
+
"--dsw-static-neutral-100": { light: "#eaf4e8", dark: "#eaf4e8" },
|
|
151
|
+
"--dsw-static-neutral-200": { light: "#e2efe0", dark: "#e2efe0" },
|
|
152
|
+
"--dsw-static-neutral-400": { light: "#a9bfa8", dark: "#a9bfa8" },
|
|
153
|
+
"--dsw-static-neutral-700": { light: "#4a5a4f", dark: "#4a5a4f" },
|
|
154
|
+
"--dsw-static-neutral-800": { light: "#3a4738", dark: "#3a4738" },
|
|
155
|
+
"--dsw-static-neutral-850": { light: "#303a31", dark: "#303a31" },
|
|
156
|
+
"--dsw-static-neutral-1000": { light: "#26332b", dark: "#26332b" },
|
|
157
|
+
"--dsw-static-neutral-bluish-00": { light: "#eef7ed", dark: "#f7fcf6" },
|
|
158
|
+
"--dsw-static-neutral-bluish-400": { light: "#9fb49e", dark: "#9fb49e" },
|
|
159
|
+
"--dsw-static-neutral-bluish-1000": { light: "#26332b", dark: "#26332b" },
|
|
160
|
+
"--dsw-static-blue-400": { light: "#6b9179", dark: "#6b9179" },
|
|
161
|
+
"--dsw-static-blue-450": { light: "#59836a", dark: "#59836a" },
|
|
162
|
+
"--dsw-static-blue-500": { light: "#4f765f", dark: "#4f765f" },
|
|
163
|
+
"--dsw-static-blue-600": { light: "#3f6149", dark: "#3f6149" },
|
|
164
|
+
"--shiki-token-constant": { light: "#1f6f8b", dark: "#7fb8d4" },
|
|
165
|
+
"--shiki-token-string": { light: "#4a7a2c", dark: "#a8cc7e" },
|
|
166
|
+
"--shiki-token-comment": { light: "#8a8371", dark: "#9a9380" },
|
|
167
|
+
"--shiki-token-keyword": { light: "#a8452f", dark: "#e39a86" },
|
|
168
|
+
"--shiki-token-parameter": { light: "#a15c1e", dark: "#e0a86a" },
|
|
169
|
+
"--shiki-token-function": { light: "#6b4a8f", dark: "#c2a8e0" },
|
|
170
|
+
"--shiki-token-string-expression": { light: "#3f6b28", dark: "#96bf72" },
|
|
171
|
+
"--shiki-token-punctuation": { light: "#5c5745", dark: "#c2bba5" },
|
|
172
|
+
"--shiki-token-link": { light: "#1d6383", dark: "#86c2dd" }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: "warm-grey",
|
|
177
|
+
displayName: "护眼灰",
|
|
178
|
+
swatch: "#f2f0ec",
|
|
179
|
+
tokens: {
|
|
180
|
+
"--dsw-alias-bg-base": { light: "#f2f0ec", dark: "#211f1d" },
|
|
181
|
+
"--dsw-alias-bg-layer-1": { light: "#f2f0ec", dark: "#282624" },
|
|
182
|
+
"--dsw-alias-bg-layer-2": { light: "#f2f0ec", dark: "#2f2d2a" },
|
|
183
|
+
"--dsw-alias-bg-layer-3": { light: "#f2f0ec", dark: "#37342f" },
|
|
184
|
+
"--dsw-alias-bg-module-platform": { light: "#e9e6e0", dark: "#2f2d2a" },
|
|
185
|
+
"--dsw-alias-bg-multi-select": { light: "#eae7e1", dark: "#37342f" },
|
|
186
|
+
"--dsw-alias-bg-overlay": { light: "#ece9e4", dark: "#37342f" },
|
|
187
|
+
"--dsw-alias-bg-document-preview": { light: "#e9e6e0", dark: "#211f1d" },
|
|
188
|
+
"--dsw-alias-bg-skeleton": { light: "rgba(122,100,68, 0.08)", dark: "rgba(214,210,202, 0.08)" },
|
|
189
|
+
"--dsw-alias-bg-mask-1": { light: "rgba(40,38,30, 0.28)", dark: "rgba(0, 0, 0, 0.5)" },
|
|
190
|
+
"--dsw-alias-bg-mask-2": { light: "rgba(40,38,30, 0.14)", dark: "rgba(0, 0, 0, 0.2)" },
|
|
191
|
+
"--dsw-alias-bg-mask-3": { light: "rgba(26,24,18, 0.48)", dark: "rgba(0, 0, 0, 0.48)" },
|
|
192
|
+
"--dsw-alias-bg-mask-photo": { light: "rgba(26,24,18, 0.88)", dark: "rgba(0, 0, 0, 0.88)" },
|
|
193
|
+
"--dsw-alias-bg-mask-drop": { light: "rgba(242, 240, 236, 0.72)", dark: "rgba(33,31,29, 0.72)" },
|
|
194
|
+
"--dsw-alias-bg-document-selection": { light: "color-mix(in srgb, #7a6444 40%, transparent)", dark: "color-mix(in srgb, #7a6444 40%, transparent)" },
|
|
195
|
+
"--dsw-alias-border-l1": { light: "rgba(122,100,68, 0.12)", dark: "rgba(214,210,202, 0.08)" },
|
|
196
|
+
"--dsw-alias-border-l2": { light: "rgba(122,100,68, 0.20)", dark: "rgba(214,210,202, 0.14)" },
|
|
197
|
+
"--dsw-alias-border-l2-darkmode-thin": { light: "rgba(122,100,68, 0.20)", dark: "rgba(214,210,202, 0.08)" },
|
|
198
|
+
"--dsw-alias-border-l3": { light: "rgba(122,100,68, 0.26)", dark: "rgba(214,210,202, 0.18)" },
|
|
199
|
+
"--dsw-alias-border-l4": { light: "rgba(122,100,68, 0.34)", dark: "rgba(214,210,202, 0.24)" },
|
|
200
|
+
"--dsw-alias-border-inverted": { light: "rgba(0, 0, 0, 0)", dark: "rgba(214,210,202, 0.06)" },
|
|
201
|
+
"--dsw-alias-border-inverted2": { light: "rgba(0, 0, 0, 0)", dark: "rgba(214,210,202, 0.08)" },
|
|
202
|
+
"--dsw-alias-label-primary": { light: "#302e2a", dark: "#e9e6e0" },
|
|
203
|
+
"--dsw-alias-label-primary-dimmed": { light: "#3c3a35", dark: "#c9c5bc" },
|
|
204
|
+
"--dsw-alias-label-primary-foreground": { light: "#f2f0ec", dark: "#211f1d" },
|
|
205
|
+
"--dsw-alias-label-primary-inverted": { light: "#f2f0ec", dark: "#c9c5bc" },
|
|
206
|
+
"--dsw-alias-label-primary-bluish": { light: "#4a4740", dark: "#ded3bc" },
|
|
207
|
+
"--dsw-alias-label-secondary": { light: "#55524b", dark: "#bdb9b0" },
|
|
208
|
+
"--dsw-alias-label-tertiary": { light: "#605d55", dark: "#9c9890" },
|
|
209
|
+
"--dsw-alias-label-caption": { light: "#7e7a72", dark: "#84807a" },
|
|
210
|
+
"--dsw-alias-label-dimmed": { light: "#d9d5cc", dark: "#423f3a" },
|
|
211
|
+
"--dsw-alias-label-document-preview": { light: "#585550", dark: "#bdb9b0" },
|
|
212
|
+
"--dsw-alias-label-shimmer": { light: "color-mix(in srgb, #24221e 30%, transparent)", dark: "color-mix(in srgb, #f8f7f4 45%, transparent)" },
|
|
213
|
+
"--dsw-alias-label-deep-diving": { light: "#7d5f16", dark: "#e0c07a" },
|
|
214
|
+
"--dsw-alias-label-deep-diving-shimmer": { light: "#9c7a20", dark: "#f0d89a" },
|
|
215
|
+
"--dsw-alias-link": { light: "#7a6444", dark: "#c9a97a" },
|
|
216
|
+
"--dsw-alias-settings-card-fill": { light: "var(--dsw-alias-bg-layer-2)", dark: "var(--dsw-alias-bg-layer-2)" },
|
|
217
|
+
"--dsw-alias-settings-card-stroke": { light: "var(--dsw-alias-border-l4)", dark: "var(--dsw-alias-border-l4)" },
|
|
218
|
+
"--dsw-alias-brand-primary": { light: "#3a3833", dark: "#e9e6e0" },
|
|
219
|
+
"--dsw-alias-brand-primary-invert": { light: "#3a3833", dark: "#e9e6e0" },
|
|
220
|
+
"--dsw-alias-brand-primary-new-colorprimary-new-color": { light: "#7a6444", dark: "#c9a97a" },
|
|
221
|
+
"--dsw-alias-brand-text": { light: "#302e2a", dark: "#e9e6e0" },
|
|
222
|
+
"--dsw-alias-button-contrast-fill": { light: "#4a4741", dark: "#e9e6e0" },
|
|
223
|
+
"--dsw-alias-button-elevated-fill": { light: "#f2f0ec", dark: "#37342f" },
|
|
224
|
+
"--dsw-alias-button-floating-fill": { light: "#f2f0ec", dark: "#2f2d2a" },
|
|
225
|
+
"--dsw-alias-button-floating-hover": { light: "#ece9e4", dark: "#37342f" },
|
|
226
|
+
"--dsw-alias-button-ghost-active-border": { light: "#9a968c", dark: "#66625a" },
|
|
227
|
+
"--dsw-alias-button-ghost-active-fill": { light: "#dcd8cf", dark: "#423f3a" },
|
|
228
|
+
"--dsw-alias-button-ghost-active-hover": { light: "#d0ccc3", dark: "#55524b" },
|
|
229
|
+
"--dsw-alias-button-info-fill": { light: "#7a6444", dark: "#c9a97a" },
|
|
230
|
+
"--dsw-alias-button-info-hover": { light: "#6d5940", dark: "#cdae80" },
|
|
231
|
+
"--dsw-alias-button-primary-dimmed": { light: "#dcd8cf", dark: "#423f3a" },
|
|
232
|
+
"--dsw-alias-button-primary-fill": { light: "var(--dsw-alias-brand-primary)", dark: "var(--dsw-alias-brand-primary)" },
|
|
233
|
+
"--dsw-alias-button-primary-hover": { light: "#55524b", dark: "#f8f7f4" },
|
|
234
|
+
"--dsw-alias-button-tool-bar-fill": { light: "rgba(92,88,80, 0.5)", dark: "rgba(92,88,80, 0.5)" },
|
|
235
|
+
"--dsw-alias-button-tool-bar-fill-invisible": { light: "rgba(42,40,36, 0.36)", dark: "rgba(42,40,36, 0.36)" },
|
|
236
|
+
"--dsw-alias-button-tool-bar-hover": { light: "rgba(92,88,80, 0.6)", dark: "rgba(92,88,80, 0.6)" },
|
|
237
|
+
"--dsw-alias-interactive-bg-hover": { light: "rgba(122,100,68, 0.07)", dark: "rgba(214,210,202, 0.08)" },
|
|
238
|
+
"--dsw-alias-interactive-bg-active": { light: "rgba(122,100,68, 0.14)", dark: "rgba(214,210,202, 0.14)" },
|
|
239
|
+
"--dsw-alias-interactive-bg-hover-accent": { light: "rgba(122,100,68, 0.16)", dark: "rgba(214,210,202, 0.20)" },
|
|
240
|
+
"--dsw-alias-interactive-bg-hover-danger": { light: "rgba(176, 68, 58, 0.08)", dark: "rgba(214, 120, 110, 0.16)" },
|
|
241
|
+
"--dsw-alias-interactive-bg-hover-solid": { light: "#eae7e1", dark: "#2f2d2a" },
|
|
242
|
+
"--dsw-alias-markdown-code-block": { light: "#e9e6e0", dark: "#282624" },
|
|
243
|
+
"--dsw-alias-markdown-code-block-banner": { light: "#dcd8cf", dark: "#2f2d2a" },
|
|
244
|
+
"--dsw-alias-markdown-code-segment-selected": { light: "#f2f0ec", dark: "#37342f" },
|
|
245
|
+
"--dsw-alias-markdown-code-segment-unselected": { light: "#eae7e1", dark: "#1e1c1a" },
|
|
246
|
+
"--dsw-alias-markdown-inline-code": { light: "#e8e5df", dark: "#2f2d2a" },
|
|
247
|
+
"--dsw-alias-markdown-citation": { light: "#e9e6e0", dark: "#2f2d2a" },
|
|
248
|
+
"--dsw-alias-markdown-placeholder": { light: "#ebe8e2", dark: "#282624" },
|
|
249
|
+
"--dsw-alias-markdown-tag": { light: "#dcd8cf", dark: "#37342f" },
|
|
250
|
+
"--dsw-alias-scrollbar-bg-l1": { light: "#d9d5cc", dark: "#55524b" },
|
|
251
|
+
"--dsw-alias-scrollbar-bg-l2": { light: "#d9d5cc", dark: "#423f3a" },
|
|
252
|
+
"--dsw-alias-scrollbar-hover-l1": { light: "#c8c4ba", dark: "#66625a" },
|
|
253
|
+
"--dsw-alias-scrollbar-hover-l2": { light: "#c8c4ba", dark: "#565249" },
|
|
254
|
+
"--dsw-alias-state-business-primary": { light: "#7a6444", dark: "#c9a97a" },
|
|
255
|
+
"--dsw-alias-state-business-tertiary": { light: "#e6e1d7", dark: "#423f3a" },
|
|
256
|
+
"--dsw-alias-state-error-primary": { light: "#a83c34", dark: "#e08a80" },
|
|
257
|
+
"--dsw-alias-state-error-secondary": { light: "#c9645a", dark: "#e08a80" },
|
|
258
|
+
"--dsw-alias-state-idle-primary": { light: "#cec5a4", dark: "#5a5340" },
|
|
259
|
+
"--dsw-alias-state-success-primary": { light: "#4f7a33", dark: "#8ec06a" },
|
|
260
|
+
"--dsw-alias-state-success-secondary": { light: "#6b9c4f", dark: "#8ec06a" },
|
|
261
|
+
"--dsw-alias-state-success-tertiary": { light: "#e3edd0", dark: "#333f28" },
|
|
262
|
+
"--dsw-alias-state-warn-primary": { light: "#b07a10", dark: "#e0b260" },
|
|
263
|
+
"--dsw-alias-state-warn-secondary": { light: "#d0a03c", dark: "#e0b260" },
|
|
264
|
+
"--dsw-alias-state-warn-tertiary": { light: "#f6e8c4", dark: "#4a3c1e" },
|
|
265
|
+
"--dsw-alias-state-warn-label": { light: "#8f6210", dark: "#e0b260" },
|
|
266
|
+
"--dsw-alias-code-diff-added": { light: "rgba(79, 122, 51, 0.12)", dark: "rgba(142, 192, 106, 0.12)" },
|
|
267
|
+
"--dsw-alias-code-diff-deleted": { light: "rgba(168, 60, 52, 0.10)", dark: "rgba(224, 138, 128, 0.12)" },
|
|
268
|
+
"--dsw-alias-file-diff-added-bg": { light: "#e6efd6", dark: "#2a3521" },
|
|
269
|
+
"--dsw-alias-file-diff-added-gutter": { light: "#edf4e0", dark: "#212a1a" },
|
|
270
|
+
"--dsw-alias-file-diff-added-marker": { light: "#4f8f36", dark: "#8ec06a" },
|
|
271
|
+
"--dsw-alias-file-diff-deleted-bg": { light: "#f6e2db", dark: "#3a241f" },
|
|
272
|
+
"--dsw-alias-file-diff-deleted-gutter": { light: "#fbeae4", dark: "#2c1a16" },
|
|
273
|
+
"--dsw-alias-file-diff-deleted-marker": { light: "#b0443a", dark: "#e08a80" },
|
|
274
|
+
"--dsw-alias-menu-group-header-fill": { light: "#ece9e4f0", dark: "#2f2d2af0" },
|
|
275
|
+
"--dsw-alias-menu-icon": { light: "#66625a", dark: "#c9c5bc" },
|
|
276
|
+
"--dsw-alias-toast-bg": { light: "#4a4741", dark: "#37342f" },
|
|
277
|
+
"--dsw-alias-toast-label": { light: "#f2f0ec", dark: "#f8f7f4" },
|
|
278
|
+
"--dsw-alias-tooltip-bg": { light: "#3a3833", dark: "#37342f" },
|
|
279
|
+
"--dsw-alias-tooltip-key-bg": { light: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)", dark: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)" },
|
|
280
|
+
"--dsw-alias-turn-trigger-bg": { light: "var(--dsw-alias-markdown-code-block)", dark: "var(--dsw-alias-interactive-bg-hover)" },
|
|
281
|
+
"--dsw-alias-turn-trigger-bg-hover": { light: "var(--dsw-alias-interactive-bg-hover)", dark: "var(--dsw-alias-interactive-bg-active)" },
|
|
282
|
+
"--dsw-alias-onboarding-accent": { light: "#7a6444", dark: "#c9a97a" },
|
|
283
|
+
"--dsw-alias-onboarding-card-fill": { light: "color-mix(in srgb, #f8f7f4 80%, transparent)", dark: "color-mix(in srgb, #2f2d2a 80%, transparent)" },
|
|
284
|
+
"--dsw-alias-onboarding-secondary-fill": { light: "#f2f0ec", dark: "#423f3a" },
|
|
285
|
+
"--dsw-alias-onboarding-checkbox-border": { light: "color-mix(in srgb, #302e2a 20%, transparent)", dark: "var(--dsw-alias-border-l2)" },
|
|
286
|
+
"--dsw-alias-switch-thumb": { light: "#f2f0ec", dark: "#918d86" },
|
|
287
|
+
"--dsw-specific-sidebar-fill": { light: "#e9e6e0", dark: "#1e1c1a" },
|
|
288
|
+
"--dsw-specific-sidebar-nav-item-hover": { light: "#dedad2", dark: "#2f2d2a" },
|
|
289
|
+
"--dsw-specific-sidebar-nav-item-active": { light: "#d0ccc3", dark: "#37342f" },
|
|
290
|
+
"--dsw-specific-sidebar-nav-item-active-accent": { light: "#e6e1d7", dark: "#423f3a" },
|
|
291
|
+
"--dsw-specific-menu": { light: "#f2f0ecf0", dark: "#282624f0" },
|
|
292
|
+
"--dsw-menu-surface-fill": { light: "#f2f0ec94", dark: "#28262494" },
|
|
293
|
+
"--dsw-specific-bubble": { light: "#eae7e1", dark: "#2f2d2a" },
|
|
294
|
+
"--dsw-specific-bubble-highlight": { light: "#dcd8cf", dark: "#423f3a" },
|
|
295
|
+
"--dsw-specific-input-major": { light: "#f2f0ec", dark: "#2f2d2a" },
|
|
296
|
+
"--dsw-specific-login-input": { light: "#f4f2ee", dark: "#1e1c1a" },
|
|
297
|
+
"--dsw-specific-selector": { light: "#eae7e1", dark: "#2f2d2a" },
|
|
298
|
+
"--dsw-specific-tip": { light: "#eae7e1", dark: "#2f2d2a" },
|
|
299
|
+
"--dsw-linear-gradient-think": { light: "linear-gradient(180deg, #f2f0ec 20.19%, #f2f0ec00 100%)", dark: "linear-gradient(180deg, #211f1d 20.19%, #211f1d00 100%)" },
|
|
300
|
+
"--dsw-linear-think-select": { light: "linear-gradient(180deg, #eae7e1 20.19%, #eae7e100 100%)", dark: "linear-gradient(180deg, #2f2d2a 20.19%, #2f2d2a00 100%)" },
|
|
301
|
+
"--dsw-static-neutral-00": { light: "#f2f0ec", dark: "#f8f7f4" },
|
|
302
|
+
"--dsw-static-neutral-50": { light: "#f2f0ec", dark: "#f4f2ee" },
|
|
303
|
+
"--dsw-static-neutral-100": { light: "#ece9e4", dark: "#ece9e4" },
|
|
304
|
+
"--dsw-static-neutral-200": { light: "#e9e6e0", dark: "#e9e6e0" },
|
|
305
|
+
"--dsw-static-neutral-400": { light: "#b0aca2", dark: "#b0aca2" },
|
|
306
|
+
"--dsw-static-neutral-700": { light: "#55524b", dark: "#55524b" },
|
|
307
|
+
"--dsw-static-neutral-800": { light: "#423f3a", dark: "#423f3a" },
|
|
308
|
+
"--dsw-static-neutral-850": { light: "#37342f", dark: "#37342f" },
|
|
309
|
+
"--dsw-static-neutral-1000": { light: "#302e2a", dark: "#302e2a" },
|
|
310
|
+
"--dsw-static-neutral-bluish-00": { light: "#f2f0ec", dark: "#f8f7f4" },
|
|
311
|
+
"--dsw-static-neutral-bluish-400": { light: "#a8a49a", dark: "#a8a49a" },
|
|
312
|
+
"--dsw-static-neutral-bluish-1000": { light: "#302e2a", dark: "#302e2a" },
|
|
313
|
+
"--dsw-static-blue-400": { light: "#91795a", dark: "#91795a" },
|
|
314
|
+
"--dsw-static-blue-450": { light: "#85704e", dark: "#85704e" },
|
|
315
|
+
"--dsw-static-blue-500": { light: "#7a6444", dark: "#7a6444" },
|
|
316
|
+
"--dsw-static-blue-600": { light: "#6d5940", dark: "#6d5940" },
|
|
317
|
+
"--shiki-token-constant": { light: "#1f6f8b", dark: "#7fb8d4" },
|
|
318
|
+
"--shiki-token-string": { light: "#4a7a2c", dark: "#a8cc7e" },
|
|
319
|
+
"--shiki-token-comment": { light: "#8a8371", dark: "#9a9380" },
|
|
320
|
+
"--shiki-token-keyword": { light: "#a8452f", dark: "#e39a86" },
|
|
321
|
+
"--shiki-token-parameter": { light: "#a15c1e", dark: "#e0a86a" },
|
|
322
|
+
"--shiki-token-function": { light: "#6b4a8f", dark: "#c2a8e0" },
|
|
323
|
+
"--shiki-token-string-expression": { light: "#3f6b28", dark: "#96bf72" },
|
|
324
|
+
"--shiki-token-punctuation": { light: "#5c5745", dark: "#c2bba5" },
|
|
325
|
+
"--shiki-token-link": { light: "#1d6383", dark: "#86c2dd" }
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "warm-paper",
|
|
330
|
+
displayName: "暖纸",
|
|
331
|
+
swatch: "#f5f0e1",
|
|
332
|
+
tokens: {
|
|
333
|
+
"--dsw-alias-bg-base": { light: "#f5f0e1", dark: "#211f19" },
|
|
334
|
+
"--dsw-alias-bg-layer-1": { light: "#f5f0e1", dark: "#2b281f" },
|
|
335
|
+
"--dsw-alias-bg-layer-2": { light: "#f5f0e1", dark: "#322e26" },
|
|
336
|
+
"--dsw-alias-bg-layer-3": { light: "#f5f0e1", dark: "#3b372c" },
|
|
337
|
+
"--dsw-alias-bg-module-platform": { light: "#e8e5d9", dark: "#322e26" },
|
|
338
|
+
"--dsw-alias-bg-multi-select": { light: "#ede8d6", dark: "#3b372c" },
|
|
339
|
+
"--dsw-alias-bg-overlay": { light: "#f2eddc", dark: "#3b372c" },
|
|
340
|
+
"--dsw-alias-bg-document-preview": { light: "#e8e5d9", dark: "#211f19" },
|
|
341
|
+
"--dsw-alias-bg-skeleton": { light: "rgba(107, 95, 58, 0.08)", dark: "rgba(236, 229, 210, 0.08)" },
|
|
342
|
+
"--dsw-alias-bg-mask-1": { light: "rgba(46, 40, 20, 0.28)", dark: "rgba(0, 0, 0, 0.5)" },
|
|
343
|
+
"--dsw-alias-bg-mask-2": { light: "rgba(46, 40, 20, 0.14)", dark: "rgba(0, 0, 0, 0.2)" },
|
|
344
|
+
"--dsw-alias-bg-mask-3": { light: "rgba(30, 26, 12, 0.48)", dark: "rgba(0, 0, 0, 0.48)" },
|
|
345
|
+
"--dsw-alias-bg-mask-photo": { light: "rgba(30, 26, 12, 0.88)", dark: "rgba(0, 0, 0, 0.88)" },
|
|
346
|
+
"--dsw-alias-bg-mask-drop": { light: "rgba(245, 240, 225, 0.72)", dark: "rgba(41, 38, 32, 0.72)" },
|
|
347
|
+
"--dsw-alias-bg-document-selection": { light: "color-mix(in srgb, #b8912e 40%, transparent)", dark: "color-mix(in srgb, #b8912e 40%, transparent)" },
|
|
348
|
+
"--dsw-alias-border-l1": { light: "rgba(107, 95, 58, 0.12)", dark: "rgba(236, 229, 210, 0.08)" },
|
|
349
|
+
"--dsw-alias-border-l2": { light: "rgba(107, 95, 58, 0.20)", dark: "rgba(236, 229, 210, 0.14)" },
|
|
350
|
+
"--dsw-alias-border-l2-darkmode-thin": { light: "rgba(107, 95, 58, 0.20)", dark: "rgba(236, 229, 210, 0.08)" },
|
|
351
|
+
"--dsw-alias-border-l3": { light: "rgba(107, 95, 58, 0.26)", dark: "rgba(236, 229, 210, 0.18)" },
|
|
352
|
+
"--dsw-alias-border-l4": { light: "rgba(107, 95, 58, 0.34)", dark: "rgba(236, 229, 210, 0.24)" },
|
|
353
|
+
"--dsw-alias-border-inverted": { light: "rgba(0, 0, 0, 0)", dark: "rgba(236, 229, 210, 0.06)" },
|
|
354
|
+
"--dsw-alias-border-inverted2": { light: "rgba(0, 0, 0, 0)", dark: "rgba(236, 229, 210, 0.08)" },
|
|
355
|
+
"--dsw-alias-label-primary": { light: "#37342a", dark: "#ece5d2" },
|
|
356
|
+
"--dsw-alias-label-primary-dimmed": { light: "#464332", dark: "#d8d1bc" },
|
|
357
|
+
"--dsw-alias-label-primary-foreground": { light: "#f5f0e1", dark: "#211f19" },
|
|
358
|
+
"--dsw-alias-label-primary-inverted": { light: "#f5f0e1", dark: "#d8d1bc" },
|
|
359
|
+
"--dsw-alias-label-primary-bluish": { light: "#5f4a18", dark: "#e8d9a8" },
|
|
360
|
+
"--dsw-alias-label-secondary": { light: "#5c5743", dark: "#c2bba5" },
|
|
361
|
+
"--dsw-alias-label-tertiary": { light: "#6a6344", dark: "#a49d88" },
|
|
362
|
+
"--dsw-alias-label-caption": { light: "#8b846a", dark: "#7d7767" },
|
|
363
|
+
"--dsw-alias-label-dimmed": { light: "#ddd6bd", dark: "#464130" },
|
|
364
|
+
"--dsw-alias-label-document-preview": { light: "#5f5a45", dark: "#c2bba5" },
|
|
365
|
+
"--dsw-alias-label-shimmer": { light: "color-mix(in srgb, #2e2a1c 30%, transparent)", dark: "color-mix(in srgb, #fdfbf5 45%, transparent)" },
|
|
366
|
+
"--dsw-alias-label-deep-diving": { light: "#7d5f16", dark: "#e0c07a" },
|
|
367
|
+
"--dsw-alias-label-deep-diving-shimmer": { light: "#9c7a20", dark: "#f0d89a" },
|
|
368
|
+
"--dsw-alias-link": { light: "#7d5f16", dark: "#d8b45c" },
|
|
369
|
+
"--dsw-alias-settings-card-fill": { light: "var(--dsw-alias-bg-layer-2)", dark: "var(--dsw-alias-bg-layer-2)" },
|
|
370
|
+
"--dsw-alias-settings-card-stroke": { light: "var(--dsw-alias-border-l4)", dark: "var(--dsw-alias-border-l4)" },
|
|
371
|
+
"--dsw-alias-brand-primary": { light: "#3f3a2b", dark: "#ece5d2" },
|
|
372
|
+
"--dsw-alias-brand-primary-invert": { light: "#3f3a2b", dark: "#ece5d2" },
|
|
373
|
+
"--dsw-alias-brand-primary-new-colorprimary-new-color": { light: "#7d5f16", dark: "#d8b45c" },
|
|
374
|
+
"--dsw-alias-brand-text": { light: "#37342a", dark: "#ece5d2" },
|
|
375
|
+
"--dsw-alias-button-contrast-fill": { light: "#4a4636", dark: "#ece5d2" },
|
|
376
|
+
"--dsw-alias-button-elevated-fill": { light: "#f5f0e1", dark: "#3b372c" },
|
|
377
|
+
"--dsw-alias-button-floating-fill": { light: "#f5f0e1", dark: "#322e26" },
|
|
378
|
+
"--dsw-alias-button-floating-hover": { light: "#f2eddc", dark: "#3b372c" },
|
|
379
|
+
"--dsw-alias-button-ghost-active-border": { light: "#a8986a", dark: "#6b6450" },
|
|
380
|
+
"--dsw-alias-button-ghost-active-fill": { light: "#e0d9b7", dark: "#464130" },
|
|
381
|
+
"--dsw-alias-button-ghost-active-hover": { light: "#d3cba6", dark: "#524b38" },
|
|
382
|
+
"--dsw-alias-button-info-fill": { light: "#7d5f16", dark: "#d8b45c" },
|
|
383
|
+
"--dsw-alias-button-info-hover": { light: "#96731c", dark: "#e5c470" },
|
|
384
|
+
"--dsw-alias-button-primary-dimmed": { light: "#e0d9b7", dark: "#464130" },
|
|
385
|
+
"--dsw-alias-button-primary-fill": { light: "var(--dsw-alias-brand-primary)", dark: "var(--dsw-alias-brand-primary)" },
|
|
386
|
+
"--dsw-alias-button-primary-hover": { light: "#524b38", dark: "#fdfbf5" },
|
|
387
|
+
"--dsw-alias-button-tool-bar-fill": { light: "rgba(90, 84, 66, 0.5)", dark: "rgba(90, 84, 66, 0.5)" },
|
|
388
|
+
"--dsw-alias-button-tool-bar-fill-invisible": { light: "rgba(46, 42, 30, 0.36)", dark: "rgba(46, 42, 30, 0.36)" },
|
|
389
|
+
"--dsw-alias-button-tool-bar-hover": { light: "rgba(90, 84, 66, 0.6)", dark: "rgba(90, 84, 66, 0.6)" },
|
|
390
|
+
"--dsw-alias-interactive-bg-hover": { light: "rgba(107, 95, 58, 0.07)", dark: "rgba(236, 229, 210, 0.08)" },
|
|
391
|
+
"--dsw-alias-interactive-bg-active": { light: "rgba(107, 95, 58, 0.14)", dark: "rgba(236, 229, 210, 0.14)" },
|
|
392
|
+
"--dsw-alias-interactive-bg-hover-accent": { light: "rgba(107, 95, 58, 0.16)", dark: "rgba(236, 229, 210, 0.20)" },
|
|
393
|
+
"--dsw-alias-interactive-bg-hover-danger": { light: "rgba(176, 68, 58, 0.08)", dark: "rgba(214, 120, 110, 0.16)" },
|
|
394
|
+
"--dsw-alias-interactive-bg-hover-solid": { light: "#ede8d6", dark: "#322e26" },
|
|
395
|
+
"--dsw-alias-markdown-code-block": { light: "#e8e5d9", dark: "#2b281f" },
|
|
396
|
+
"--dsw-alias-markdown-code-block-banner": { light: "#e0d9b7", dark: "#322e26" },
|
|
397
|
+
"--dsw-alias-markdown-code-segment-selected": { light: "#f5f0e1", dark: "#3b372c" },
|
|
398
|
+
"--dsw-alias-markdown-code-segment-unselected": { light: "#ede8d6", dark: "#262319" },
|
|
399
|
+
"--dsw-alias-markdown-inline-code": { light: "#eae4cd", dark: "#322e26" },
|
|
400
|
+
"--dsw-alias-markdown-citation": { light: "#e8e5d9", dark: "#322e26" },
|
|
401
|
+
"--dsw-alias-markdown-placeholder": { light: "#efe9d6", dark: "#2b281f" },
|
|
402
|
+
"--dsw-alias-markdown-tag": { light: "#e0d9b7", dark: "#3b372c" },
|
|
403
|
+
"--dsw-alias-scrollbar-bg-l1": { light: "#ddd6bd", dark: "#524b38" },
|
|
404
|
+
"--dsw-alias-scrollbar-bg-l2": { light: "#ddd6bd", dark: "#464130" },
|
|
405
|
+
"--dsw-alias-scrollbar-hover-l1": { light: "#cec5a4", dark: "#6b6450" },
|
|
406
|
+
"--dsw-alias-scrollbar-hover-l2": { light: "#cec5a4", dark: "#5a5340" },
|
|
407
|
+
"--dsw-alias-state-business-primary": { light: "#7d5f16", dark: "#d8b45c" },
|
|
408
|
+
"--dsw-alias-state-business-tertiary": { light: "#efe6c8", dark: "#464130" },
|
|
409
|
+
"--dsw-alias-state-error-primary": { light: "#a83c34", dark: "#e08a80" },
|
|
410
|
+
"--dsw-alias-state-error-secondary": { light: "#c9645a", dark: "#e08a80" },
|
|
411
|
+
"--dsw-alias-state-idle-primary": { light: "#cec5a4", dark: "#5a5340" },
|
|
412
|
+
"--dsw-alias-state-success-primary": { light: "#4f7a33", dark: "#8ec06a" },
|
|
413
|
+
"--dsw-alias-state-success-secondary": { light: "#6b9c4f", dark: "#8ec06a" },
|
|
414
|
+
"--dsw-alias-state-success-tertiary": { light: "#e3edd0", dark: "#333f28" },
|
|
415
|
+
"--dsw-alias-state-warn-primary": { light: "#b07a10", dark: "#e0b260" },
|
|
416
|
+
"--dsw-alias-state-warn-secondary": { light: "#d0a03c", dark: "#e0b260" },
|
|
417
|
+
"--dsw-alias-state-warn-tertiary": { light: "#f6e8c4", dark: "#4a3c1e" },
|
|
418
|
+
"--dsw-alias-state-warn-label": { light: "#8f6210", dark: "#e0b260" },
|
|
419
|
+
"--dsw-alias-code-diff-added": { light: "rgba(79, 122, 51, 0.12)", dark: "rgba(142, 192, 106, 0.12)" },
|
|
420
|
+
"--dsw-alias-code-diff-deleted": { light: "rgba(168, 60, 52, 0.10)", dark: "rgba(224, 138, 128, 0.12)" },
|
|
421
|
+
"--dsw-alias-file-diff-added-bg": { light: "#e6efd6", dark: "#2a3521" },
|
|
422
|
+
"--dsw-alias-file-diff-added-gutter": { light: "#edf4e0", dark: "#212a1a" },
|
|
423
|
+
"--dsw-alias-file-diff-added-marker": { light: "#4f8f36", dark: "#8ec06a" },
|
|
424
|
+
"--dsw-alias-file-diff-deleted-bg": { light: "#f6e2db", dark: "#3a241f" },
|
|
425
|
+
"--dsw-alias-file-diff-deleted-gutter": { light: "#fbeae4", dark: "#2c1a16" },
|
|
426
|
+
"--dsw-alias-file-diff-deleted-marker": { light: "#b0443a", dark: "#e08a80" },
|
|
427
|
+
"--dsw-alias-menu-group-header-fill": { light: "#f2eddcf0", dark: "#322e26f0" },
|
|
428
|
+
"--dsw-alias-menu-icon": { light: "#6b6450", dark: "#d8d1bc" },
|
|
429
|
+
"--dsw-alias-toast-bg": { light: "#4a4636", dark: "#3b372c" },
|
|
430
|
+
"--dsw-alias-toast-label": { light: "#f5f0e1", dark: "#fdfbf5" },
|
|
431
|
+
"--dsw-alias-tooltip-bg": { light: "#3f3a2b", dark: "#3b372c" },
|
|
432
|
+
"--dsw-alias-tooltip-key-bg": { light: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)", dark: "color-mix(in srgb, var(--dsw-alias-tooltip-bg), white 18%)" },
|
|
433
|
+
"--dsw-alias-turn-trigger-bg": { light: "var(--dsw-alias-markdown-code-block)", dark: "var(--dsw-alias-interactive-bg-hover)" },
|
|
434
|
+
"--dsw-alias-turn-trigger-bg-hover": { light: "var(--dsw-alias-interactive-bg-hover)", dark: "var(--dsw-alias-interactive-bg-active)" },
|
|
435
|
+
"--dsw-alias-onboarding-accent": { light: "#7d5f16", dark: "#d8b45c" },
|
|
436
|
+
"--dsw-alias-onboarding-card-fill": { light: "color-mix(in srgb, #fdfbf5 80%, transparent)", dark: "color-mix(in srgb, #322e26 80%, transparent)" },
|
|
437
|
+
"--dsw-alias-onboarding-secondary-fill": { light: "#f5f0e1", dark: "#464130" },
|
|
438
|
+
"--dsw-alias-onboarding-checkbox-border": { light: "color-mix(in srgb, #37342a 20%, transparent)", dark: "var(--dsw-alias-border-l2)" },
|
|
439
|
+
"--dsw-alias-switch-thumb": { light: "#f5f0e1", dark: "#948d72" },
|
|
440
|
+
"--dsw-specific-sidebar-fill": { light: "#e8e5d9", dark: "#262319" },
|
|
441
|
+
"--dsw-specific-sidebar-nav-item-hover": { light: "#ded7bd", dark: "#322e26" },
|
|
442
|
+
"--dsw-specific-sidebar-nav-item-active": { light: "#d3cba6", dark: "#3b372c" },
|
|
443
|
+
"--dsw-specific-sidebar-nav-item-active-accent": { light: "#efe6c8", dark: "#464130" },
|
|
444
|
+
"--dsw-specific-menu": { light: "#f5f0e1f0", dark: "#2b281ff0" },
|
|
445
|
+
"--dsw-menu-surface-fill": { light: "#f5f0e194", dark: "#2b281f94" },
|
|
446
|
+
"--dsw-specific-bubble": { light: "#ede8d6", dark: "#322e26" },
|
|
447
|
+
"--dsw-specific-bubble-highlight": { light: "#e0d9b7", dark: "#464130" },
|
|
448
|
+
"--dsw-specific-input-major": { light: "#f5f0e1", dark: "#322e26" },
|
|
449
|
+
"--dsw-specific-login-input": { light: "#f9f5e9", dark: "#262319" },
|
|
450
|
+
"--dsw-specific-selector": { light: "#ede8d6", dark: "#322e26" },
|
|
451
|
+
"--dsw-specific-tip": { light: "#ede8d6", dark: "#322e26" },
|
|
452
|
+
"--dsw-linear-gradient-think": { light: "linear-gradient(180deg, #f5f0e1 20.19%, #f5f0e100 100%)", dark: "linear-gradient(180deg, #211f19 20.19%, #211f1900 100%)" },
|
|
453
|
+
"--dsw-linear-think-select": { light: "linear-gradient(180deg, #ede8d6 20.19%, #ede8d600 100%)", dark: "linear-gradient(180deg, #322e26 20.19%, #322e2600 100%)" },
|
|
454
|
+
"--dsw-static-neutral-00": { light: "#f5f0e1", dark: "#fdfbf5" },
|
|
455
|
+
"--dsw-static-neutral-50": { light: "#f5f0e1", dark: "#f9f5e9" },
|
|
456
|
+
"--dsw-static-neutral-100": { light: "#f2eddc", dark: "#f2eddc" },
|
|
457
|
+
"--dsw-static-neutral-200": { light: "#e8e5d9", dark: "#e8e5d9" },
|
|
458
|
+
"--dsw-static-neutral-400": { light: "#b3ab90", dark: "#b3ab90" },
|
|
459
|
+
"--dsw-static-neutral-700": { light: "#5c5743", dark: "#5c5743" },
|
|
460
|
+
"--dsw-static-neutral-800": { light: "#464130", dark: "#464130" },
|
|
461
|
+
"--dsw-static-neutral-850": { light: "#3b372c", dark: "#3b372c" },
|
|
462
|
+
"--dsw-static-neutral-1000": { light: "#37342a", dark: "#37342a" },
|
|
463
|
+
"--dsw-static-neutral-bluish-00": { light: "#f5f0e1", dark: "#fdfbf5" },
|
|
464
|
+
"--dsw-static-neutral-bluish-400": { light: "#a89f84", dark: "#a89f84" },
|
|
465
|
+
"--dsw-static-neutral-bluish-1000": { light: "#37342a", dark: "#37342a" },
|
|
466
|
+
"--dsw-static-blue-400": { light: "#d0a03c", dark: "#d0a03c" },
|
|
467
|
+
"--dsw-static-blue-450": { light: "#c8962c", dark: "#c8962c" },
|
|
468
|
+
"--dsw-static-blue-500": { light: "#b8912e", dark: "#b8912e" },
|
|
469
|
+
"--dsw-static-blue-600": { light: "#96731c", dark: "#96731c" },
|
|
470
|
+
"--shiki-token-constant": { light: "#1f6f8b", dark: "#7fb8d4" },
|
|
471
|
+
"--shiki-token-string": { light: "#4a7a2c", dark: "#a8cc7e" },
|
|
472
|
+
"--shiki-token-comment": { light: "#8a8371", dark: "#9a9380" },
|
|
473
|
+
"--shiki-token-keyword": { light: "#a8452f", dark: "#e39a86" },
|
|
474
|
+
"--shiki-token-parameter": { light: "#a15c1e", dark: "#e0a86a" },
|
|
475
|
+
"--shiki-token-function": { light: "#6b4a8f", dark: "#c2a8e0" },
|
|
476
|
+
"--shiki-token-string-expression": { light: "#3f6b28", dark: "#96bf72" },
|
|
477
|
+
"--shiki-token-punctuation": { light: "#5c5745", dark: "#c2bba5" },
|
|
478
|
+
"--shiki-token-link": { light: "#1d6383", dark: "#86c2dd" }
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
];
|
|
482
|
+
|
|
483
|
+
// ---------------------------------------------------------------- state
|
|
484
|
+
var themeService = null;
|
|
485
|
+
var disposeLayer = null;
|
|
486
|
+
var selection = DEFAULT_THEME;
|
|
487
|
+
var listeners = new Set();
|
|
488
|
+
|
|
489
|
+
function themeById(id) {
|
|
490
|
+
for (var i = 0; i < THEMES.length; i++) if (THEMES[i].id === id) return THEMES[i];
|
|
491
|
+
return undefined;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/** Read the persisted choice, falling back to the default palette. */
|
|
495
|
+
function readStored() {
|
|
496
|
+
try {
|
|
497
|
+
var raw = window.localStorage.getItem(STORAGE_KEY);
|
|
498
|
+
if (raw === OFF_ID) return OFF_ID;
|
|
499
|
+
return themeById(raw) ? raw : DEFAULT_THEME;
|
|
500
|
+
} catch (error) {
|
|
501
|
+
return DEFAULT_THEME;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
function writeStored(id) {
|
|
506
|
+
try {
|
|
507
|
+
window.localStorage.setItem(STORAGE_KEY, id);
|
|
508
|
+
} catch (error) {
|
|
509
|
+
console.warn(SOURCE + ": could not persist the palette choice", error);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
function notify(id) {
|
|
514
|
+
listeners.forEach((listener) => listener(id));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
function subscribe(listener) {
|
|
518
|
+
listeners.add(listener);
|
|
519
|
+
return () => {
|
|
520
|
+
listeners.delete(listener);
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// ---------------------------------------------------------------- layer
|
|
525
|
+
/**
|
|
526
|
+
* Replace the override layer with the one for \`id\`, or remove it entirely
|
|
527
|
+
* for the "DSH default" choice. overrideTokens returns a disposer, so a swap
|
|
528
|
+
* is dispose-then-stack and never leaves two layers behind.
|
|
529
|
+
*/
|
|
530
|
+
function selectPalette(id) {
|
|
531
|
+
selection = id;
|
|
532
|
+
if (disposeLayer !== null) {
|
|
533
|
+
disposeLayer();
|
|
534
|
+
disposeLayer = null;
|
|
535
|
+
}
|
|
536
|
+
var theme = themeById(id);
|
|
537
|
+
if (theme === undefined || themeService === null) return;
|
|
538
|
+
disposeLayer = themeService.overrideTokens(SOURCE, theme.tokens);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
function choose(id) {
|
|
542
|
+
writeStored(id);
|
|
543
|
+
selectPalette(id);
|
|
544
|
+
notify(id);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// ---------------------------------------------------------------- row UI
|
|
548
|
+
// Styling mirrors the built-in Appearance row's cubes rule-for-rule (same
|
|
549
|
+
// declarations, re-prefixed class names) so the General column reads as one
|
|
550
|
+
// control family. Injected as a stylesheet rather than inline styles because
|
|
551
|
+
// the :hover state and the .5px hairline are not expressible inline.
|
|
552
|
+
var STYLE_ID = SOURCE + ":row-css";
|
|
553
|
+
var ROW_CSS = ".dshEyeCare_group{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:8px;padding:16px 0;display:flex}.dshEyeCare_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.dshEyeCare_desc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.dshEyeCare_cubeRow{flex-wrap:wrap;align-items:stretch;gap:8px;display:flex}.dshEyeCare_cube{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-xl);font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;flex-direction:column;flex:1 1 0;min-width:88px;justify-content:center;align-items:center;gap:4px;padding:20px 12px;font-size:14px;line-height:22px;display:flex}.dshEyeCare_cube:hover:not(.dshEyeCare_selected){background:var(--dsw-alias-interactive-bg-hover)}.dshEyeCare_selected{background:var(--dsw-alias-bg-module-platform);border-color:var(--dsw-static-neutral-bluish-400)}.dshEyeCare_swatch{box-sizing:border-box;flex:none;width:20px;height:20px;border-radius:4px;border:1px solid var(--dsw-alias-border-l3)}.dshEyeCare_swatchNone{background:0 0;border-style:dashed;border-color:var(--dsw-alias-border-l4)}";
|
|
554
|
+
|
|
555
|
+
/** Inject our row stylesheet once; returns whether THIS call created it. */
|
|
556
|
+
function installRowCss() {
|
|
557
|
+
if (document.getElementById(STYLE_ID) !== null) return false;
|
|
558
|
+
var style = document.createElement("style");
|
|
559
|
+
style.id = STYLE_ID;
|
|
560
|
+
style.textContent = ROW_CSS;
|
|
561
|
+
document.head.appendChild(style);
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
function removeRowCss() {
|
|
566
|
+
var style = document.getElementById(STYLE_ID);
|
|
567
|
+
if (style !== null && style !== undefined) style.remove();
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
var OPTIONS = THEMES.map((theme) => ({ id: theme.id, label: theme.displayName, swatch: theme.swatch }));
|
|
571
|
+
OPTIONS.push({ id: OFF_ID, label: "DSH 默认", swatch: null });
|
|
572
|
+
|
|
573
|
+
/** Palette row: owns its selection, so it needs no store seat or injected action. */
|
|
574
|
+
function PaletteRow() {
|
|
575
|
+
var state = react.useState(readStored);
|
|
576
|
+
var selected = state[0];
|
|
577
|
+
var setSelected = state[1];
|
|
578
|
+
react.useEffect(() => subscribe(setSelected), []);
|
|
579
|
+
return react.createElement(
|
|
580
|
+
"div",
|
|
581
|
+
{ className: "dshEyeCare_group" },
|
|
582
|
+
react.createElement("div", { className: "dshEyeCare_title" }, "护眼配色"),
|
|
583
|
+
react.createElement("div", { className: "dshEyeCare_desc" }, "选择立即生效并被记住"),
|
|
584
|
+
react.createElement(
|
|
585
|
+
"div",
|
|
586
|
+
{ className: "dshEyeCare_cubeRow" },
|
|
587
|
+
OPTIONS.map((option) =>
|
|
588
|
+
react.createElement(
|
|
589
|
+
"button",
|
|
590
|
+
{
|
|
591
|
+
key: option.id,
|
|
592
|
+
type: "button",
|
|
593
|
+
"aria-pressed": selected === option.id ? "true" : "false",
|
|
594
|
+
onClick: () => choose(option.id),
|
|
595
|
+
className: selected === option.id ? "dshEyeCare_cube dshEyeCare_selected" : "dshEyeCare_cube"
|
|
596
|
+
},
|
|
597
|
+
react.createElement("span", {
|
|
598
|
+
className: option.swatch === null ? "dshEyeCare_swatch dshEyeCare_swatchNone" : "dshEyeCare_swatch",
|
|
599
|
+
style: option.swatch === null ? undefined : { background: option.swatch }
|
|
600
|
+
}),
|
|
601
|
+
react.createElement("span", null, option.label)
|
|
602
|
+
)
|
|
603
|
+
)
|
|
604
|
+
)
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
// ---------------------------------------------------------------- plugin
|
|
609
|
+
/** Required services: the theme registry to stack layers on, and the settings row slot. */
|
|
610
|
+
var inject = ["theme", "slots"];
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Apply the persisted palette and contribute the switcher row.
|
|
614
|
+
* @param ctx - client root context.
|
|
615
|
+
*/
|
|
616
|
+
function apply(ctx) {
|
|
617
|
+
themeService = ctx.get("theme");
|
|
618
|
+
var ownsRowCss = installRowCss();
|
|
619
|
+
ctx.effect(() => {
|
|
620
|
+
selectPalette(readStored());
|
|
621
|
+
// Another window may switch the palette; localStorage is per origin.
|
|
622
|
+
var onStorage = (event) => {
|
|
623
|
+
if (event.key !== null && event.key !== STORAGE_KEY) return;
|
|
624
|
+
selectPalette(readStored());
|
|
625
|
+
notify(selection);
|
|
626
|
+
};
|
|
627
|
+
window.addEventListener("storage", onStorage);
|
|
628
|
+
return () => {
|
|
629
|
+
window.removeEventListener("storage", onStorage);
|
|
630
|
+
if (ownsRowCss) removeRowCss();
|
|
631
|
+
if (disposeLayer !== null) {
|
|
632
|
+
disposeLayer();
|
|
633
|
+
disposeLayer = null;
|
|
634
|
+
}
|
|
635
|
+
themeService = null;
|
|
636
|
+
};
|
|
637
|
+
}, SOURCE + ": palette layer");
|
|
638
|
+
ctx.slots.inject("settings.general.item", () =>
|
|
639
|
+
ctx.slots.register(
|
|
640
|
+
{ name: "settings.general.item", id: "eye-care-palette", order: 12 },
|
|
641
|
+
PaletteRow
|
|
642
|
+
)
|
|
643
|
+
);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
exports.THEMES = THEMES;
|
|
647
|
+
exports.STORAGE_KEY = STORAGE_KEY;
|
|
648
|
+
exports.OFF_ID = OFF_ID;
|
|
649
|
+
exports.DEFAULT_THEME = DEFAULT_THEME;
|
|
650
|
+
exports.apply = apply;
|
|
651
|
+
exports.inject = inject;
|
|
652
|
+
return module.exports;
|
|
653
|
+
}
|
|
654
|
+
});
|