@floegence/floe-webapp-core 0.56.3 → 0.56.6
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/dist/styles/themes/classicSemanticTokens.d.ts +138 -138
- package/dist/styles/themes/classicSemanticTokens.js +14 -13
- package/dist/styles/themes/presets.js +38 -36
- package/dist/styles/themes/progressTokens.d.ts +5 -0
- package/dist/styles/themes/progressTokens.js +72 -0
- package/dist/styles.css +1 -1
- package/dist/themes/dark.css +4 -0
- package/dist/themes/light.css +4 -0
- package/dist/themes/shell-presets.generated.css +96 -0
- package/dist/ui.css +6 -16
- package/package.json +1 -1
|
@@ -1,144 +1,144 @@
|
|
|
1
1
|
export declare const CLASSIC_LIGHT_CSS_TOKENS: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
2
|
+
'--floe-window-background': "var(--popover)";
|
|
3
|
+
'--floe-window-titlebar-background': "var(--popover)";
|
|
4
|
+
'--background': "#f8f7f2";
|
|
5
|
+
'--foreground': "#303a34";
|
|
6
|
+
'--primary': "#465a43";
|
|
7
|
+
'--primary-foreground': "#f8faf5";
|
|
8
|
+
'--secondary': "#eeefe8";
|
|
9
|
+
'--secondary-foreground': "#545f56";
|
|
10
|
+
'--muted': "#e9ece3";
|
|
11
|
+
'--muted-foreground': "#5e695c";
|
|
12
|
+
'--accent': "#e0e7da";
|
|
13
|
+
'--accent-foreground': "#303a34";
|
|
14
|
+
'--border': "#d4d8cd";
|
|
15
|
+
'--input': "#858e80";
|
|
16
|
+
'--ring': "#56694f";
|
|
17
|
+
'--chrome-border': "#dedfd7";
|
|
18
|
+
'--top-bar-border': "var(--chrome-border)";
|
|
19
|
+
'--activity-bar-border': "var(--chrome-border)";
|
|
20
|
+
'--bottom-bar-border': "var(--chrome-border)";
|
|
21
|
+
'--terminal-panel-border': "var(--chrome-border)";
|
|
22
|
+
'--card': "#fcfbf7";
|
|
23
|
+
'--card-foreground': "#303a34";
|
|
24
|
+
'--popover': "#fffefa";
|
|
25
|
+
'--popover-foreground': "#303a34";
|
|
26
|
+
'--success': "#496744";
|
|
27
|
+
'--success-foreground': "#f8faf5";
|
|
28
|
+
'--warning': "#856828";
|
|
29
|
+
'--warning-foreground': "#fffefa";
|
|
30
|
+
'--error': "#b74744";
|
|
31
|
+
'--error-foreground': "#fffefa";
|
|
32
|
+
'--info': "#2671d9";
|
|
33
|
+
'--info-foreground': "#fffefa";
|
|
34
|
+
'--highlight-block-info-accent': "oklch(0.52 0.14 245)";
|
|
35
|
+
'--highlight-block-warning-accent': "oklch(0.62 0.16 65)";
|
|
36
|
+
'--highlight-block-success-accent': "oklch(0.55 0.14 155)";
|
|
37
|
+
'--highlight-block-error-accent': "oklch(0.55 0.16 25)";
|
|
38
|
+
'--highlight-block-note-accent': "oklch(0.52 0.16 285)";
|
|
39
|
+
'--highlight-block-tip-accent': "oklch(0.52 0.12 175)";
|
|
40
|
+
'--sidebar': "#efeee7";
|
|
41
|
+
'--sidebar-foreground': "#303a34";
|
|
42
|
+
'--sidebar-primary': "#465a43";
|
|
43
|
+
'--sidebar-primary-foreground': "#f8faf5";
|
|
44
|
+
'--sidebar-accent': "#e0e7da";
|
|
45
|
+
'--sidebar-accent-foreground': "#303a34";
|
|
46
|
+
'--sidebar-border': "#dedfd7";
|
|
47
|
+
'--sidebar-ring': "#56694f";
|
|
48
|
+
'--activity-bar': "#eeede6";
|
|
49
|
+
'--activity-bar-foreground': "#5e695c";
|
|
50
|
+
'--activity-bar-foreground-active': "#303a34";
|
|
51
|
+
'--activity-bar-badge': "#465a43";
|
|
52
|
+
'--activity-bar-badge-foreground': "#f8faf5";
|
|
53
|
+
'--terminal-background': "hsl(214 26% 17%)";
|
|
54
|
+
'--terminal-foreground': "hsl(0 0% 92%)";
|
|
55
|
+
'--chart-1': "hsl(214 26% 17%)";
|
|
56
|
+
'--chart-2': "hsl(215 16% 42%)";
|
|
57
|
+
'--chart-3': "hsl(217 91% 60%)";
|
|
58
|
+
'--chart-4': "oklch(0.68 0.16 150)";
|
|
59
|
+
'--chart-5': "hsl(38 92% 50%)";
|
|
60
|
+
'--selection-bg': "hsl(217 91% 60%)";
|
|
61
|
+
'--selection-fg': "hsl(0 0% 100%)";
|
|
62
|
+
'--selection-on-primary-bg': "hsl(38 92% 50%)";
|
|
63
|
+
'--selection-on-primary-fg': "hsl(214 26% 17%)";
|
|
64
|
+
'--selection-code-bg': "hsl(212 100% 67%)";
|
|
65
|
+
'--selection-code-fg': "hsl(220 20% 8%)";
|
|
66
|
+
'--glow': "#465a43";
|
|
67
|
+
'--floe-window-foreground': "var(--foreground)";
|
|
68
|
+
'--floe-window-muted-foreground': "var(--muted-foreground)";
|
|
69
|
+
'--floe-window-border': "color-mix(in srgb, var(--floe-window-background) 88%, var(--foreground))";
|
|
70
|
+
'--floe-window-shadow': "0 1px 3px rgb(0 0 0 / 14%), 0 12px 28px -8px rgb(0 0 0 / 18%)";
|
|
71
71
|
};
|
|
72
72
|
export declare const CLASSIC_DARK_CSS_TOKENS: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
73
|
+
'--floe-window-background': "var(--popover)";
|
|
74
|
+
'--floe-window-titlebar-background': "var(--popover)";
|
|
75
|
+
'--background': "#202223";
|
|
76
|
+
'--foreground': "#e5e6e2";
|
|
77
|
+
'--primary': "#bccbb8";
|
|
78
|
+
'--primary-foreground': "#20291f";
|
|
79
|
+
'--secondary': "#303435";
|
|
80
|
+
'--secondary-foreground': "#b8bdb8";
|
|
81
|
+
'--muted': "#343738";
|
|
82
|
+
'--muted-foreground': "#9da4a0";
|
|
83
|
+
'--accent': "#353a38";
|
|
84
|
+
'--accent-foreground': "#e5e6e2";
|
|
85
|
+
'--border': "#3e4142";
|
|
86
|
+
'--input': "#6d7571";
|
|
87
|
+
'--ring': "#acbdb3";
|
|
88
|
+
'--chrome-border': "#292c2b";
|
|
89
|
+
'--top-bar-border': "var(--chrome-border)";
|
|
90
|
+
'--activity-bar-border': "var(--chrome-border)";
|
|
91
|
+
'--bottom-bar-border': "var(--chrome-border)";
|
|
92
|
+
'--terminal-panel-border': "var(--chrome-border)";
|
|
93
|
+
'--card': "#282b2c";
|
|
94
|
+
'--card-foreground': "#e5e6e2";
|
|
95
|
+
'--popover': "#2b2e2f";
|
|
96
|
+
'--popover-foreground': "#e5e6e2";
|
|
97
|
+
'--success': "#a1b69e";
|
|
98
|
+
'--success-foreground': "#20291f";
|
|
99
|
+
'--warning': "#c8af84";
|
|
100
|
+
'--warning-foreground': "#20291f";
|
|
101
|
+
'--error': "oklch(0.7 0.22 25)";
|
|
102
|
+
'--error-foreground': "#202223";
|
|
103
|
+
'--info': "oklch(0.7 0.15 250)";
|
|
104
|
+
'--info-foreground': "#202223";
|
|
105
|
+
'--highlight-block-info-accent': "oklch(0.62 0.12 240)";
|
|
106
|
+
'--highlight-block-warning-accent': "oklch(0.7 0.14 65)";
|
|
107
|
+
'--highlight-block-success-accent': "oklch(0.62 0.12 155)";
|
|
108
|
+
'--highlight-block-error-accent': "oklch(0.6 0.14 25)";
|
|
109
|
+
'--highlight-block-note-accent': "oklch(0.62 0.14 285)";
|
|
110
|
+
'--highlight-block-tip-accent': "oklch(0.6 0.1 175)";
|
|
111
|
+
'--sidebar': "#1b1d1e";
|
|
112
|
+
'--sidebar-foreground': "#e5e6e2";
|
|
113
|
+
'--sidebar-primary': "#bccbb8";
|
|
114
|
+
'--sidebar-primary-foreground': "#20291f";
|
|
115
|
+
'--sidebar-accent': "#353a38";
|
|
116
|
+
'--sidebar-accent-foreground': "#e5e6e2";
|
|
117
|
+
'--sidebar-border': "#292c2b";
|
|
118
|
+
'--sidebar-ring': "#acbdb3";
|
|
119
|
+
'--activity-bar': "#17191a";
|
|
120
|
+
'--activity-bar-foreground': "#9da4a0";
|
|
121
|
+
'--activity-bar-foreground-active': "#e5e6e2";
|
|
122
|
+
'--activity-bar-badge': "#bccbb8";
|
|
123
|
+
'--activity-bar-badge-foreground': "#20291f";
|
|
124
|
+
'--terminal-background': "hsl(222 32% 7%)";
|
|
125
|
+
'--terminal-foreground': "hsl(210 15% 92%)";
|
|
126
|
+
'--chart-1': "hsl(210 20% 98%)";
|
|
127
|
+
'--chart-2': "hsl(215 20% 60%)";
|
|
128
|
+
'--chart-3': "oklch(0.7 0.15 250)";
|
|
129
|
+
'--chart-4': "oklch(0.72 0.19 150)";
|
|
130
|
+
'--chart-5': "oklch(0.82 0.16 80)";
|
|
131
|
+
'--selection-bg': "hsl(215 70% 50%)";
|
|
132
|
+
'--selection-fg': "hsl(0 0% 100%)";
|
|
133
|
+
'--selection-on-primary-bg': "hsl(215 80% 35%)";
|
|
134
|
+
'--selection-on-primary-fg': "hsl(0 0% 100%)";
|
|
135
|
+
'--selection-code-bg': "hsl(212 100% 67%)";
|
|
136
|
+
'--selection-code-fg': "hsl(220 20% 8%)";
|
|
137
|
+
'--glow': "hsl(217 65% 52%)";
|
|
138
|
+
'--floe-window-foreground': "var(--foreground)";
|
|
139
|
+
'--floe-window-muted-foreground': "color-mix(in srgb, var(--muted-foreground) 72%, var(--foreground))";
|
|
140
|
+
'--floe-window-border': "color-mix(in srgb, var(--floe-window-background) 88%, var(--foreground))";
|
|
141
|
+
'--floe-window-shadow': "0 1px 3px rgb(0 0 0 / 30%), 0 12px 28px -8px rgb(0 0 0 / 32%)";
|
|
142
142
|
};
|
|
143
143
|
export declare const CLASSIC_LIGHT_SEMANTIC_TOKENS: Readonly<Partial<Record<`--${string}`, string>>>;
|
|
144
144
|
export declare const CLASSIC_DARK_SEMANTIC_TOKENS: Readonly<Partial<Record<`--${string}`, string>>>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { createProgressTokens as b } from "./progressTokens.js";
|
|
2
|
+
import { LIGHT_WINDOW_TOKENS as l, DARK_WINDOW_TOKENS as h } from "./windowTokens.js";
|
|
3
|
+
function f(c) {
|
|
3
4
|
const a = {}, n = (r, o = /* @__PURE__ */ new Set()) => {
|
|
4
5
|
const e = c[r];
|
|
5
6
|
if (!e || o.has(r)) return e;
|
|
6
|
-
const
|
|
7
|
-
return
|
|
7
|
+
const t = /^var\((--[\w-]+)\)$/u.exec(e)?.[1];
|
|
8
|
+
return t ? (o.add(r), n(t, o)) : e;
|
|
8
9
|
};
|
|
9
10
|
for (const r of Object.keys(c))
|
|
10
11
|
a[r] = n(r);
|
|
11
12
|
return Object.freeze(a);
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
-
...
|
|
14
|
+
const i = {
|
|
15
|
+
...l,
|
|
15
16
|
"--floe-window-background": "var(--popover)",
|
|
16
17
|
"--floe-window-titlebar-background": "var(--popover)",
|
|
17
18
|
"--background": "#f8f7f2",
|
|
@@ -77,8 +78,8 @@ const f = {
|
|
|
77
78
|
"--selection-code-bg": "hsl(212 100% 67%)",
|
|
78
79
|
"--selection-code-fg": "hsl(220 20% 8%)",
|
|
79
80
|
"--glow": "#465a43"
|
|
80
|
-
},
|
|
81
|
-
...
|
|
81
|
+
}, d = {
|
|
82
|
+
...h,
|
|
82
83
|
"--floe-window-background": "var(--popover)",
|
|
83
84
|
"--floe-window-titlebar-background": "var(--popover)",
|
|
84
85
|
"--background": "#202223",
|
|
@@ -144,10 +145,10 @@ const f = {
|
|
|
144
145
|
"--selection-code-bg": "hsl(212 100% 67%)",
|
|
145
146
|
"--selection-code-fg": "hsl(220 20% 8%)",
|
|
146
147
|
"--glow": "hsl(217 65% 52%)"
|
|
147
|
-
}, g = i(
|
|
148
|
+
}, g = { ...i, ...b("light", i) }, s = { ...d, ...b("dark", d) }, p = f(g), v = f(s);
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
s as CLASSIC_DARK_CSS_TOKENS,
|
|
151
|
+
v as CLASSIC_DARK_SEMANTIC_TOKENS,
|
|
152
|
+
g as CLASSIC_LIGHT_CSS_TOKENS,
|
|
153
|
+
p as CLASSIC_LIGHT_SEMANTIC_TOKENS
|
|
153
154
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createProgressTokens as b } from "./progressTokens.js";
|
|
2
|
+
import { DARK_WINDOW_TOKENS as B, LIGHT_WINDOW_TOKENS as A } from "./windowTokens.js";
|
|
2
3
|
import { CLASSIC_LIGHT_SEMANTIC_TOKENS as d, CLASSIC_DARK_SEMANTIC_TOKENS as F } from "./classicSemanticTokens.js";
|
|
3
|
-
const
|
|
4
|
+
const T = [
|
|
4
5
|
"--floe-window-background",
|
|
5
6
|
"--floe-window-foreground",
|
|
6
7
|
"--floe-window-muted-foreground",
|
|
@@ -70,7 +71,7 @@ const S = [
|
|
|
70
71
|
"--selection-code-bg",
|
|
71
72
|
"--selection-code-fg",
|
|
72
73
|
"--glow"
|
|
73
|
-
],
|
|
74
|
+
], E = {
|
|
74
75
|
success: "#287A4B",
|
|
75
76
|
successForeground: "#FFFFFF",
|
|
76
77
|
warning: "#835800",
|
|
@@ -81,7 +82,7 @@ const S = [
|
|
|
81
82
|
infoForeground: "#FFFFFF",
|
|
82
83
|
note: "#6847A0",
|
|
83
84
|
tip: "#1E6F73"
|
|
84
|
-
},
|
|
85
|
+
}, k = {
|
|
85
86
|
success: "#72D39C",
|
|
86
87
|
successForeground: "#07160E",
|
|
87
88
|
warning: "#F0C36A",
|
|
@@ -94,19 +95,19 @@ const S = [
|
|
|
94
95
|
tip: "#71C8C0"
|
|
95
96
|
};
|
|
96
97
|
function o(r) {
|
|
97
|
-
const e = r.mode === "light" ?
|
|
98
|
+
const e = r.mode === "light" ? E : k, n = r.mode === "light" ? { background: "#F4C95D", foreground: "#243447" } : {
|
|
98
99
|
background: r.background,
|
|
99
100
|
foreground: r.foreground
|
|
100
|
-
}, [t, c, u,
|
|
101
|
+
}, [t, c, u, i, s] = r.chart, a = r.syntax ?? {
|
|
101
102
|
comment: r.mutedForeground,
|
|
102
103
|
keyword: t,
|
|
103
104
|
string: c,
|
|
104
|
-
number:
|
|
105
|
+
number: i,
|
|
105
106
|
type: u,
|
|
106
107
|
function: s,
|
|
107
|
-
constant:
|
|
108
|
-
},
|
|
109
|
-
...r.mode === "dark" ?
|
|
108
|
+
constant: i
|
|
109
|
+
}, g = {
|
|
110
|
+
...r.mode === "dark" ? B : A,
|
|
110
111
|
"--background": r.background,
|
|
111
112
|
"--foreground": r.foreground,
|
|
112
113
|
"--primary": r.primary,
|
|
@@ -161,7 +162,7 @@ function o(r) {
|
|
|
161
162
|
"--chart-1": t,
|
|
162
163
|
"--chart-2": c,
|
|
163
164
|
"--chart-3": u,
|
|
164
|
-
"--chart-4":
|
|
165
|
+
"--chart-4": i,
|
|
165
166
|
"--chart-5": s,
|
|
166
167
|
"--selection-bg": r.selectionBackground,
|
|
167
168
|
"--selection-fg": r.selectionForeground,
|
|
@@ -173,8 +174,9 @@ function o(r) {
|
|
|
173
174
|
// selectionBackground so we don't inherit a near-white primary as glow source.
|
|
174
175
|
"--glow": r.glow ?? (r.mode === "light" ? r.primary : r.selectionBackground)
|
|
175
176
|
};
|
|
177
|
+
Object.assign(g, b(r.mode, g));
|
|
176
178
|
for (const [l, p] of Object.entries(r.fileIconColors ?? {}))
|
|
177
|
-
|
|
179
|
+
g[`--floe-file-icon-${l}`] = p;
|
|
178
180
|
return {
|
|
179
181
|
name: r.name,
|
|
180
182
|
displayName: r.displayName,
|
|
@@ -188,7 +190,7 @@ function o(r) {
|
|
|
188
190
|
border: r.border,
|
|
189
191
|
colors: r.chart
|
|
190
192
|
},
|
|
191
|
-
semanticTokens:
|
|
193
|
+
semanticTokens: g,
|
|
192
194
|
monaco: {
|
|
193
195
|
[r.mode]: {
|
|
194
196
|
base: r.mode === "light" ? "vs" : "vs-dark",
|
|
@@ -248,10 +250,10 @@ function o(r) {
|
|
|
248
250
|
}
|
|
249
251
|
}
|
|
250
252
|
},
|
|
251
|
-
tokens: r.mode === "light" ? { light:
|
|
253
|
+
tokens: r.mode === "light" ? { light: g } : { dark: g }
|
|
252
254
|
};
|
|
253
255
|
}
|
|
254
|
-
const
|
|
256
|
+
const y = {
|
|
255
257
|
...o({
|
|
256
258
|
name: "classic-light",
|
|
257
259
|
displayName: "Classic Light",
|
|
@@ -285,7 +287,7 @@ const k = {
|
|
|
285
287
|
inheritsBaseTokens: !0,
|
|
286
288
|
semanticTokens: d,
|
|
287
289
|
tokens: void 0
|
|
288
|
-
},
|
|
290
|
+
}, C = {
|
|
289
291
|
...o({
|
|
290
292
|
name: "classic-dark",
|
|
291
293
|
displayName: "Classic Dark",
|
|
@@ -319,8 +321,8 @@ const k = {
|
|
|
319
321
|
inheritsBaseTokens: !0,
|
|
320
322
|
semanticTokens: F,
|
|
321
323
|
tokens: void 0
|
|
322
|
-
},
|
|
323
|
-
|
|
324
|
+
}, h = [
|
|
325
|
+
y,
|
|
324
326
|
o({
|
|
325
327
|
name: "paper",
|
|
326
328
|
displayName: "Paper",
|
|
@@ -576,7 +578,7 @@ const k = {
|
|
|
576
578
|
constant: "#745500"
|
|
577
579
|
}
|
|
578
580
|
}),
|
|
579
|
-
|
|
581
|
+
C,
|
|
580
582
|
o({
|
|
581
583
|
name: "ink",
|
|
582
584
|
displayName: "Ink",
|
|
@@ -962,18 +964,18 @@ const k = {
|
|
|
962
964
|
constant: "#E9A4A0"
|
|
963
965
|
}
|
|
964
966
|
})
|
|
965
|
-
],
|
|
967
|
+
], x = {
|
|
966
968
|
light: "classic-light",
|
|
967
969
|
dark: "classic-dark"
|
|
968
970
|
};
|
|
969
|
-
function
|
|
971
|
+
function D(r, e) {
|
|
970
972
|
const n = r.mode ?? "both";
|
|
971
973
|
return n === "both" || n === e;
|
|
972
974
|
}
|
|
973
|
-
function
|
|
974
|
-
return r.filter((n) =>
|
|
975
|
+
function f(r, e) {
|
|
976
|
+
return r.filter((n) => D(n, e));
|
|
975
977
|
}
|
|
976
|
-
function
|
|
978
|
+
function w(r) {
|
|
977
979
|
const e = /* @__PURE__ */ new Set();
|
|
978
980
|
for (const n of r) {
|
|
979
981
|
if (e.has(n.name))
|
|
@@ -982,26 +984,26 @@ function f(r) {
|
|
|
982
984
|
}
|
|
983
985
|
}
|
|
984
986
|
function m(r, e, n, t) {
|
|
985
|
-
const c =
|
|
987
|
+
const c = f(r, e);
|
|
986
988
|
return n && c.some((u) => u.name === n) ? n : t && c.some((u) => u.name === t) ? t : c[0]?.name;
|
|
987
989
|
}
|
|
988
|
-
function
|
|
989
|
-
const t = typeof r == "object" && r !== null && !Array.isArray(r) ? r : void 0, c = t?.version === 1, u = c && typeof t.light == "string" ? t.light : void 0,
|
|
990
|
+
function L(r, e, n = {}) {
|
|
991
|
+
const t = typeof r == "object" && r !== null && !Array.isArray(r) ? r : void 0, c = t?.version === 1, u = c && typeof t.light == "string" ? t.light : void 0, i = c && typeof t.dark == "string" ? t.dark : void 0;
|
|
990
992
|
return {
|
|
991
993
|
version: 1,
|
|
992
994
|
light: m(e, "light", u, n.light),
|
|
993
|
-
dark: m(e, "dark",
|
|
995
|
+
dark: m(e, "dark", i, n.dark)
|
|
994
996
|
};
|
|
995
997
|
}
|
|
996
|
-
|
|
998
|
+
w(h);
|
|
997
999
|
export {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1000
|
+
x as BUILT_IN_SHELL_THEME_DEFAULTS,
|
|
1001
|
+
T as REQUIRED_SHELL_THEME_TOKENS,
|
|
1002
|
+
w as assertUniqueThemePresetNames,
|
|
1003
|
+
h as builtInShellThemePresets,
|
|
1002
1004
|
o as createShellThemePreset,
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1005
|
+
f as getShellThemePresetsForMode,
|
|
1006
|
+
L as normalizeShellThemeSelection,
|
|
1007
|
+
D as presetSupportsMode,
|
|
1006
1008
|
m as resolveShellThemePresetName
|
|
1007
1009
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FloeThemeTokenMap } from './index';
|
|
2
|
+
/** Derive static progress paint from the authored palette, for CSS and host metadata.
|
|
3
|
+
* All interpolation adds white in sRGB, so even antialiased glyph edges brighten.
|
|
4
|
+
* Neutral surfaces share a conservative contrast bound; no DOM sampling is needed. */
|
|
5
|
+
export declare function createProgressTokens(mode: 'light' | 'dark', tokens: Readonly<FloeThemeTokenMap>): FloeThemeTokenMap;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const g = (t) => (t /= 255) <= 0.04045 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4, u = (t) => t.map(g).reduce((r, a, n) => r + a * [0.2126, 0.7152, 0.0722][n], 0), M = (t, r) => (Math.max(u(t), u(r)) + 0.05) / (Math.min(u(t), u(r)) + 0.05), d = (t, r) => t.map((a) => Math.round(a + (255 - a) * r)), f = (t) => `rgb(${t.join(" ")})`;
|
|
2
|
+
function x(t) {
|
|
3
|
+
const [r, a, n] = t.map(g), s = Math.cbrt(0.4122214708 * r + 0.5363325363 * a + 0.0514459929 * n), o = Math.cbrt(0.2119034982 * r + 0.6806995451 * a + 0.1073969566 * n), m = Math.cbrt(0.0883024619 * r + 0.2817188376 * a + 0.6299787005 * n);
|
|
4
|
+
return [
|
|
5
|
+
0.2104542553 * s + 0.793617785 * o - 0.0040720468 * m,
|
|
6
|
+
1.9779984951 * s - 2.428592205 * o + 0.4505937099 * m,
|
|
7
|
+
0.0259040371 * s + 0.7827717662 * o - 0.808675766 * m
|
|
8
|
+
];
|
|
9
|
+
}
|
|
10
|
+
function P(t, r) {
|
|
11
|
+
const [, a, n] = x(t), s = Math.min(1, 0.03 / Math.max(Math.hypot(a, n), 1e-10)), o = a * s, m = n * s, c = (r + 0.3963377774 * o + 0.2158037573 * m) ** 3, l = (r - 0.1055613458 * o - 0.0638541728 * m) ** 3, h = (r - 0.0894841775 * o - 1.291485548 * m) ** 3;
|
|
12
|
+
return [
|
|
13
|
+
4.0767416621 * c - 3.3077115913 * l + 0.2309699292 * h,
|
|
14
|
+
-1.2684380046 * c + 2.6097574011 * l - 0.3413193965 * h,
|
|
15
|
+
-0.0041960863 * c - 0.7034186147 * l + 1.707614701 * h
|
|
16
|
+
].map(
|
|
17
|
+
(e) => Math.round(
|
|
18
|
+
Math.max(0, Math.min(1, e <= 31308e-7 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - 0.055)) * 255
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function b(t) {
|
|
23
|
+
let r = 0, a = 1;
|
|
24
|
+
for (let n = 0; n < 26; n++) {
|
|
25
|
+
const s = (r + a) / 2;
|
|
26
|
+
t(s) ? r = s : a = s;
|
|
27
|
+
}
|
|
28
|
+
return r;
|
|
29
|
+
}
|
|
30
|
+
function $(t, r) {
|
|
31
|
+
const a = (e) => {
|
|
32
|
+
const i = r[e];
|
|
33
|
+
if (!i || !/^#[\da-f]{6}$/iu.test(i))
|
|
34
|
+
throw new Error(`Progress palette requires an opaque hex color: ${e}`);
|
|
35
|
+
return [1, 3, 5].map((p) => parseInt(i.slice(p, p + 2), 16));
|
|
36
|
+
}, n = ["--background", "--card", "--muted", "--accent", "--popover", "--sidebar"].map(
|
|
37
|
+
(e) => a(e)
|
|
38
|
+
), s = (e, i) => n.every((p) => M(e, p) >= i);
|
|
39
|
+
let o = P(a("--foreground"), t === "dark" ? 0.69 : 0.2);
|
|
40
|
+
if (t === "dark")
|
|
41
|
+
for (; (!s(o, 4.55) || M(o, a("--background")) < 5) && o.some((e) => e < 255); )
|
|
42
|
+
o = o.map((e) => Math.min(255, e + 1));
|
|
43
|
+
const m = d(
|
|
44
|
+
o,
|
|
45
|
+
t === "dark" ? 1 : b((e) => s(d(o, e), 4.65))
|
|
46
|
+
);
|
|
47
|
+
let c = a("--primary");
|
|
48
|
+
const l = a("--primary-foreground");
|
|
49
|
+
let h = 0.28;
|
|
50
|
+
if (u(l) > u(c)) {
|
|
51
|
+
const e = b(
|
|
52
|
+
(i) => M(d(c.map((p) => Math.round(p * i)), h), l) >= 4.65
|
|
53
|
+
);
|
|
54
|
+
c = c.map((i) => Math.round(i * e));
|
|
55
|
+
} else {
|
|
56
|
+
const e = (i) => {
|
|
57
|
+
const p = x(c), k = x(d(c, i));
|
|
58
|
+
return Math.hypot(...p.map((y, w) => y - k[w]));
|
|
59
|
+
};
|
|
60
|
+
for (; e(1) < 0.105; ) c = c.map((i) => Math.floor(i * 0.99));
|
|
61
|
+
for (; e(h) < 0.105 && h < 1; ) h = Math.min(1, h + 5e-3);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
"--floe-progress-text-base": f(o),
|
|
65
|
+
"--floe-progress-text-peak": f(m),
|
|
66
|
+
"--floe-progress-primary-base": f(c),
|
|
67
|
+
"--floe-progress-primary-white-mix": `${(h * 100).toFixed(1)}%`
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
$ as createProgressTokens
|
|
72
|
+
};
|