@floegence/floe-webapp-core 0.52.1 → 0.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/styles/themes/classicSemanticTokens.js +8 -5
- package/dist/styles/themes/presets.d.ts +1 -1
- package/dist/styles/themes/presets.js +35 -27
- package/dist/styles/themes/windowTokens.d.ts +17 -0
- package/dist/styles/themes/windowTokens.js +19 -0
- package/dist/styles.css +1 -1
- package/dist/surface.css +49 -0
- package/dist/themes/dark.css +9 -0
- package/dist/themes/light.css +9 -0
- package/dist/themes/shell-presets.generated.css +132 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LIGHT_WINDOW_TOKENS as n, DARK_WINDOW_TOKENS as i } from "./windowTokens.js";
|
|
1
2
|
function a(h) {
|
|
2
3
|
const l = {}, c = (r, e = /* @__PURE__ */ new Set()) => {
|
|
3
4
|
const o = h[r];
|
|
@@ -9,7 +10,8 @@ function a(h) {
|
|
|
9
10
|
l[r] = c(r);
|
|
10
11
|
return Object.freeze(l);
|
|
11
12
|
}
|
|
12
|
-
const
|
|
13
|
+
const t = {
|
|
14
|
+
...n,
|
|
13
15
|
"--background": "hsl(34 24% 94%)",
|
|
14
16
|
"--foreground": "hsl(214 26% 17%)",
|
|
15
17
|
"--primary": "hsl(214 26% 17%)",
|
|
@@ -73,7 +75,8 @@ const n = {
|
|
|
73
75
|
"--selection-code-bg": "hsl(212 100% 67%)",
|
|
74
76
|
"--selection-code-fg": "hsl(220 20% 8%)",
|
|
75
77
|
"--glow": "hsl(214 26% 17%)"
|
|
76
|
-
},
|
|
78
|
+
}, d = {
|
|
79
|
+
...i,
|
|
77
80
|
"--background": "hsl(222 30% 8%)",
|
|
78
81
|
"--foreground": "hsl(210 20% 98%)",
|
|
79
82
|
"--primary": "hsl(210 20% 98%)",
|
|
@@ -137,8 +140,8 @@ const n = {
|
|
|
137
140
|
"--selection-code-bg": "hsl(212 100% 67%)",
|
|
138
141
|
"--selection-code-fg": "hsl(220 20% 8%)",
|
|
139
142
|
"--glow": "hsl(217 65% 52%)"
|
|
140
|
-
},
|
|
143
|
+
}, b = a(t), u = a(d);
|
|
141
144
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
u as CLASSIC_DARK_SEMANTIC_TOKENS,
|
|
146
|
+
b as CLASSIC_LIGHT_SEMANTIC_TOKENS
|
|
144
147
|
};
|
|
@@ -6,7 +6,7 @@ export interface FloeShellThemeSelection {
|
|
|
6
6
|
dark?: string;
|
|
7
7
|
}
|
|
8
8
|
export type FloeShellThemeDefaults = Partial<Record<FloeShellThemeMode, string>>;
|
|
9
|
-
type ShellThemeTokenName = '--background' | '--foreground' | '--primary' | '--primary-foreground' | '--secondary' | '--secondary-foreground' | '--muted' | '--muted-foreground' | '--accent' | '--accent-foreground' | '--border' | '--input' | '--ring' | '--chrome-border' | '--top-bar-border' | '--activity-bar-border' | '--bottom-bar-border' | '--terminal-panel-border' | '--card' | '--card-foreground' | '--popover' | '--popover-foreground' | '--success' | '--success-foreground' | '--warning' | '--warning-foreground' | '--error' | '--error-foreground' | '--info' | '--info-foreground' | '--highlight-block-info-accent' | '--highlight-block-warning-accent' | '--highlight-block-success-accent' | '--highlight-block-error-accent' | '--highlight-block-note-accent' | '--highlight-block-tip-accent' | '--sidebar' | '--sidebar-foreground' | '--sidebar-primary' | '--sidebar-primary-foreground' | '--sidebar-accent' | '--sidebar-accent-foreground' | '--sidebar-border' | '--sidebar-ring' | '--activity-bar' | '--activity-bar-foreground' | '--activity-bar-foreground-active' | '--activity-bar-badge' | '--activity-bar-badge-foreground' | '--terminal-background' | '--terminal-foreground' | '--chart-1' | '--chart-2' | '--chart-3' | '--chart-4' | '--chart-5' | '--selection-bg' | '--selection-fg' | '--selection-on-primary-bg' | '--selection-on-primary-fg' | '--selection-code-bg' | '--selection-code-fg' | '--glow';
|
|
9
|
+
type ShellThemeTokenName = '--floe-window-background' | '--floe-window-foreground' | '--floe-window-muted-foreground' | '--floe-window-titlebar-background' | '--floe-window-border' | '--floe-window-shadow' | '--background' | '--foreground' | '--primary' | '--primary-foreground' | '--secondary' | '--secondary-foreground' | '--muted' | '--muted-foreground' | '--accent' | '--accent-foreground' | '--border' | '--input' | '--ring' | '--chrome-border' | '--top-bar-border' | '--activity-bar-border' | '--bottom-bar-border' | '--terminal-panel-border' | '--card' | '--card-foreground' | '--popover' | '--popover-foreground' | '--success' | '--success-foreground' | '--warning' | '--warning-foreground' | '--error' | '--error-foreground' | '--info' | '--info-foreground' | '--highlight-block-info-accent' | '--highlight-block-warning-accent' | '--highlight-block-success-accent' | '--highlight-block-error-accent' | '--highlight-block-note-accent' | '--highlight-block-tip-accent' | '--sidebar' | '--sidebar-foreground' | '--sidebar-primary' | '--sidebar-primary-foreground' | '--sidebar-accent' | '--sidebar-accent-foreground' | '--sidebar-border' | '--sidebar-ring' | '--activity-bar' | '--activity-bar-foreground' | '--activity-bar-foreground-active' | '--activity-bar-badge' | '--activity-bar-badge-foreground' | '--terminal-background' | '--terminal-foreground' | '--chart-1' | '--chart-2' | '--chart-3' | '--chart-4' | '--chart-5' | '--selection-bg' | '--selection-fg' | '--selection-on-primary-bg' | '--selection-on-primary-fg' | '--selection-code-bg' | '--selection-code-fg' | '--glow';
|
|
10
10
|
export declare const REQUIRED_SHELL_THEME_TOKENS: readonly ShellThemeTokenName[];
|
|
11
11
|
interface ShellThemePaletteDefinition {
|
|
12
12
|
name: string;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DARK_WINDOW_TOKENS as s, LIGHT_WINDOW_TOKENS as m } from "./windowTokens.js";
|
|
2
|
+
import { CLASSIC_LIGHT_SEMANTIC_TOKENS as l, CLASSIC_DARK_SEMANTIC_TOKENS as b } from "./classicSemanticTokens.js";
|
|
3
|
+
const w = [
|
|
4
|
+
"--floe-window-background",
|
|
5
|
+
"--floe-window-foreground",
|
|
6
|
+
"--floe-window-muted-foreground",
|
|
7
|
+
"--floe-window-titlebar-background",
|
|
8
|
+
"--floe-window-border",
|
|
9
|
+
"--floe-window-shadow",
|
|
3
10
|
"--background",
|
|
4
11
|
"--foreground",
|
|
5
12
|
"--primary",
|
|
@@ -63,7 +70,7 @@ const C = [
|
|
|
63
70
|
"--selection-code-bg",
|
|
64
71
|
"--selection-code-fg",
|
|
65
72
|
"--glow"
|
|
66
|
-
],
|
|
73
|
+
], p = {
|
|
67
74
|
success: "#287A4B",
|
|
68
75
|
successForeground: "#FFFFFF",
|
|
69
76
|
warning: "#835800",
|
|
@@ -74,7 +81,7 @@ const C = [
|
|
|
74
81
|
infoForeground: "#FFFFFF",
|
|
75
82
|
note: "#6847A0",
|
|
76
83
|
tip: "#1E6F73"
|
|
77
|
-
},
|
|
84
|
+
}, B = {
|
|
78
85
|
success: "#72D39C",
|
|
79
86
|
successForeground: "#07160E",
|
|
80
87
|
warning: "#F0C36A",
|
|
@@ -87,7 +94,7 @@ const C = [
|
|
|
87
94
|
tip: "#71C8C0"
|
|
88
95
|
};
|
|
89
96
|
function o(r) {
|
|
90
|
-
const e = r.mode === "light" ?
|
|
97
|
+
const e = r.mode === "light" ? p : B, n = r.mode === "light" ? { background: "#F4C95D", foreground: "#243447" } : {
|
|
91
98
|
background: r.background,
|
|
92
99
|
foreground: r.foreground
|
|
93
100
|
}, [t, d, F, c, g] = r.chart, a = r.syntax ?? {
|
|
@@ -99,6 +106,7 @@ function o(r) {
|
|
|
99
106
|
function: g,
|
|
100
107
|
constant: c
|
|
101
108
|
}, u = {
|
|
109
|
+
...r.mode === "dark" ? s : m,
|
|
102
110
|
"--background": r.background,
|
|
103
111
|
"--foreground": r.foreground,
|
|
104
112
|
"--primary": r.primary,
|
|
@@ -241,7 +249,7 @@ function o(r) {
|
|
|
241
249
|
tokens: r.mode === "light" ? { light: u } : { dark: u }
|
|
242
250
|
};
|
|
243
251
|
}
|
|
244
|
-
const
|
|
252
|
+
const E = {
|
|
245
253
|
...o({
|
|
246
254
|
name: "classic-light",
|
|
247
255
|
displayName: "Classic Light",
|
|
@@ -273,9 +281,9 @@ const p = {
|
|
|
273
281
|
}
|
|
274
282
|
}),
|
|
275
283
|
inheritsBaseTokens: !0,
|
|
276
|
-
semanticTokens:
|
|
284
|
+
semanticTokens: l,
|
|
277
285
|
tokens: void 0
|
|
278
|
-
},
|
|
286
|
+
}, k = {
|
|
279
287
|
...o({
|
|
280
288
|
name: "classic-dark",
|
|
281
289
|
displayName: "Classic Dark",
|
|
@@ -307,10 +315,10 @@ const p = {
|
|
|
307
315
|
}
|
|
308
316
|
}),
|
|
309
317
|
inheritsBaseTokens: !0,
|
|
310
|
-
semanticTokens:
|
|
318
|
+
semanticTokens: b,
|
|
311
319
|
tokens: void 0
|
|
312
|
-
},
|
|
313
|
-
|
|
320
|
+
}, A = [
|
|
321
|
+
E,
|
|
314
322
|
o({
|
|
315
323
|
name: "paper",
|
|
316
324
|
displayName: "Paper",
|
|
@@ -566,7 +574,7 @@ const p = {
|
|
|
566
574
|
constant: "#745500"
|
|
567
575
|
}
|
|
568
576
|
}),
|
|
569
|
-
|
|
577
|
+
k,
|
|
570
578
|
o({
|
|
571
579
|
name: "ink",
|
|
572
580
|
displayName: "Ink",
|
|
@@ -882,18 +890,18 @@ const p = {
|
|
|
882
890
|
constant: "#BF5AF2"
|
|
883
891
|
}
|
|
884
892
|
})
|
|
885
|
-
],
|
|
893
|
+
], v = {
|
|
886
894
|
light: "classic-light",
|
|
887
895
|
dark: "classic-dark"
|
|
888
896
|
};
|
|
889
|
-
function
|
|
897
|
+
function y(r, e) {
|
|
890
898
|
const n = r.mode ?? "both";
|
|
891
899
|
return n === "both" || n === e;
|
|
892
900
|
}
|
|
893
|
-
function
|
|
894
|
-
return r.filter((n) =>
|
|
901
|
+
function h(r, e) {
|
|
902
|
+
return r.filter((n) => y(n, e));
|
|
895
903
|
}
|
|
896
|
-
function
|
|
904
|
+
function C(r) {
|
|
897
905
|
const e = /* @__PURE__ */ new Set();
|
|
898
906
|
for (const n of r) {
|
|
899
907
|
if (e.has(n.name))
|
|
@@ -902,10 +910,10 @@ function y(r) {
|
|
|
902
910
|
}
|
|
903
911
|
}
|
|
904
912
|
function i(r, e, n, t) {
|
|
905
|
-
const d =
|
|
913
|
+
const d = h(r, e);
|
|
906
914
|
return n && d.some((F) => F.name === n) ? n : t && d.some((F) => F.name === t) ? t : d[0]?.name;
|
|
907
915
|
}
|
|
908
|
-
function
|
|
916
|
+
function S(r, e, n = {}) {
|
|
909
917
|
const t = typeof r == "object" && r !== null && !Array.isArray(r) ? r : void 0, d = t?.version === 1, F = d && typeof t.light == "string" ? t.light : void 0, c = d && typeof t.dark == "string" ? t.dark : void 0;
|
|
910
918
|
return {
|
|
911
919
|
version: 1,
|
|
@@ -913,15 +921,15 @@ function f(r, e, n = {}) {
|
|
|
913
921
|
dark: i(e, "dark", c, n.dark)
|
|
914
922
|
};
|
|
915
923
|
}
|
|
916
|
-
|
|
924
|
+
C(A);
|
|
917
925
|
export {
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
926
|
+
v as BUILT_IN_SHELL_THEME_DEFAULTS,
|
|
927
|
+
w as REQUIRED_SHELL_THEME_TOKENS,
|
|
928
|
+
C as assertUniqueThemePresetNames,
|
|
929
|
+
A as builtInShellThemePresets,
|
|
922
930
|
o as createShellThemePreset,
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
931
|
+
h as getShellThemePresetsForMode,
|
|
932
|
+
S as normalizeShellThemeSelection,
|
|
933
|
+
y as presetSupportsMode,
|
|
926
934
|
i as resolveShellThemePresetName
|
|
927
935
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Palette-relative, opaque window material; resolved by CSS only when the theme changes. */
|
|
2
|
+
export declare const LIGHT_WINDOW_TOKENS: {
|
|
3
|
+
readonly '--floe-window-background': "color-mix(in srgb, var(--card) 35%, white)";
|
|
4
|
+
readonly '--floe-window-foreground': "var(--foreground)";
|
|
5
|
+
readonly '--floe-window-muted-foreground': "var(--muted-foreground)";
|
|
6
|
+
readonly '--floe-window-titlebar-background': "color-mix(in srgb, var(--floe-window-background) 92%, var(--foreground))";
|
|
7
|
+
readonly '--floe-window-border': "color-mix(in srgb, var(--floe-window-background) 88%, var(--foreground))";
|
|
8
|
+
readonly '--floe-window-shadow': "0 1px 3px rgb(0 0 0 / 14%), 0 12px 28px -8px rgb(0 0 0 / 18%)";
|
|
9
|
+
};
|
|
10
|
+
export declare const DARK_WINDOW_TOKENS: {
|
|
11
|
+
readonly '--floe-window-background': "color-mix(in srgb, var(--card) 90%, white)";
|
|
12
|
+
readonly '--floe-window-foreground': "var(--foreground)";
|
|
13
|
+
readonly '--floe-window-muted-foreground': "color-mix(in srgb, var(--muted-foreground) 72%, var(--foreground))";
|
|
14
|
+
readonly '--floe-window-titlebar-background': "color-mix(in srgb, var(--floe-window-background) 95%, white)";
|
|
15
|
+
readonly '--floe-window-border': "color-mix(in srgb, var(--floe-window-background) 88%, var(--foreground))";
|
|
16
|
+
readonly '--floe-window-shadow': "0 1px 3px rgb(0 0 0 / 30%), 0 12px 28px -8px rgb(0 0 0 / 32%)";
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
"--floe-window-background": "color-mix(in srgb, var(--card) 35%, white)",
|
|
3
|
+
"--floe-window-foreground": "var(--foreground)",
|
|
4
|
+
"--floe-window-muted-foreground": "var(--muted-foreground)",
|
|
5
|
+
"--floe-window-titlebar-background": "color-mix(in srgb, var(--floe-window-background) 92%, var(--foreground))",
|
|
6
|
+
"--floe-window-border": "color-mix(in srgb, var(--floe-window-background) 88%, var(--foreground))",
|
|
7
|
+
"--floe-window-shadow": "0 1px 3px rgb(0 0 0 / 14%), 0 12px 28px -8px rgb(0 0 0 / 18%)"
|
|
8
|
+
}, r = {
|
|
9
|
+
"--floe-window-background": "color-mix(in srgb, var(--card) 90%, white)",
|
|
10
|
+
"--floe-window-foreground": "var(--foreground)",
|
|
11
|
+
"--floe-window-muted-foreground": "color-mix(in srgb, var(--muted-foreground) 72%, var(--foreground))",
|
|
12
|
+
"--floe-window-titlebar-background": "color-mix(in srgb, var(--floe-window-background) 95%, white)",
|
|
13
|
+
"--floe-window-border": "color-mix(in srgb, var(--floe-window-background) 88%, var(--foreground))",
|
|
14
|
+
"--floe-window-shadow": "0 1px 3px rgb(0 0 0 / 30%), 0 12px 28px -8px rgb(0 0 0 / 32%)"
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
r as DARK_WINDOW_TOKENS,
|
|
18
|
+
o as LIGHT_WINDOW_TOKENS
|
|
19
|
+
};
|