@floegence/floe-webapp-core 0.39.0 → 0.39.1

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.
@@ -0,0 +1,2 @@
1
+ export declare const CLASSIC_LIGHT_SEMANTIC_TOKENS: Readonly<Partial<Record<`--${string}`, string>>>;
2
+ export declare const CLASSIC_DARK_SEMANTIC_TOKENS: Readonly<Partial<Record<`--${string}`, string>>>;
@@ -0,0 +1,142 @@
1
+ function a(h) {
2
+ const l = {}, c = (r, e = /* @__PURE__ */ new Set()) => {
3
+ const o = h[r];
4
+ if (!o || e.has(r)) return o;
5
+ const s = /^var\((--[\w-]+)\)$/u.exec(o)?.[1];
6
+ return s ? (e.add(r), c(s, e)) : o;
7
+ };
8
+ for (const r of Object.keys(h))
9
+ l[r] = c(r);
10
+ return Object.freeze(l);
11
+ }
12
+ const n = {
13
+ "--background": "hsl(34 24% 94%)",
14
+ "--foreground": "hsl(214 26% 17%)",
15
+ "--primary": "hsl(214 26% 17%)",
16
+ "--primary-foreground": "hsl(36 100% 99%)",
17
+ "--secondary": "hsl(36 15% 94%)",
18
+ "--secondary-foreground": "hsl(214 25% 25%)",
19
+ "--muted": "hsl(36 15% 94%)",
20
+ "--muted-foreground": "hsl(215 16% 42%)",
21
+ "--accent": "hsl(34 11% 88%)",
22
+ "--accent-foreground": "hsl(214 26% 17%)",
23
+ "--border": "hsl(35 13% 82%)",
24
+ "--input": "hsl(37 15% 76%)",
25
+ "--ring": "hsl(214 26% 17%)",
26
+ "--chrome-border": "hsl(33 11% 84%)",
27
+ "--top-bar-border": "var(--chrome-border)",
28
+ "--activity-bar-border": "var(--chrome-border)",
29
+ "--bottom-bar-border": "var(--chrome-border)",
30
+ "--terminal-panel-border": "var(--chrome-border)",
31
+ "--card": "hsl(36 100% 99%)",
32
+ "--card-foreground": "hsl(214 26% 17%)",
33
+ "--popover": "hsl(36 100% 99%)",
34
+ "--popover-foreground": "hsl(214 26% 17%)",
35
+ "--success": "oklch(0.68 0.16 150)",
36
+ "--success-foreground": "hsl(0 0% 100%)",
37
+ "--warning": "hsl(38 92% 50%)",
38
+ "--warning-foreground": "hsl(214 26% 17%)",
39
+ "--error": "oklch(0.65 0.2 25)",
40
+ "--error-foreground": "hsl(0 0% 100%)",
41
+ "--info": "hsl(217 91% 60%)",
42
+ "--info-foreground": "hsl(0 0% 100%)",
43
+ "--highlight-block-info-accent": "oklch(0.52 0.14 245)",
44
+ "--highlight-block-warning-accent": "oklch(0.62 0.16 65)",
45
+ "--highlight-block-success-accent": "oklch(0.55 0.14 155)",
46
+ "--highlight-block-error-accent": "oklch(0.55 0.16 25)",
47
+ "--highlight-block-note-accent": "oklch(0.52 0.16 285)",
48
+ "--highlight-block-tip-accent": "oklch(0.52 0.12 175)",
49
+ "--sidebar": "hsl(36 13% 92%)",
50
+ "--sidebar-foreground": "hsl(214 26% 17%)",
51
+ "--sidebar-primary": "hsl(214 26% 17%)",
52
+ "--sidebar-primary-foreground": "hsl(36 100% 99%)",
53
+ "--sidebar-accent": "hsl(34 11% 88%)",
54
+ "--sidebar-accent-foreground": "hsl(214 26% 17%)",
55
+ "--sidebar-border": "hsl(33 11% 84%)",
56
+ "--sidebar-ring": "hsl(214 26% 17%)",
57
+ "--activity-bar": "hsl(36 13% 92%)",
58
+ "--activity-bar-foreground": "hsl(215 16% 42%)",
59
+ "--activity-bar-foreground-active": "hsl(214 26% 17%)",
60
+ "--activity-bar-badge": "hsl(214 26% 17%)",
61
+ "--activity-bar-badge-foreground": "hsl(36 100% 99%)",
62
+ "--terminal-background": "hsl(214 26% 17%)",
63
+ "--terminal-foreground": "hsl(0 0% 92%)",
64
+ "--chart-1": "hsl(214 26% 17%)",
65
+ "--chart-2": "hsl(215 16% 42%)",
66
+ "--chart-3": "hsl(217 91% 60%)",
67
+ "--chart-4": "oklch(0.68 0.16 150)",
68
+ "--chart-5": "hsl(38 92% 50%)",
69
+ "--selection-bg": "hsl(217 91% 60%)",
70
+ "--selection-fg": "hsl(0 0% 100%)",
71
+ "--selection-on-primary-bg": "hsl(38 92% 50%)",
72
+ "--selection-on-primary-fg": "hsl(214 26% 17%)",
73
+ "--selection-code-bg": "hsl(212 100% 67%)",
74
+ "--selection-code-fg": "hsl(220 20% 8%)"
75
+ }, i = {
76
+ "--background": "hsl(222 30% 8%)",
77
+ "--foreground": "hsl(210 20% 98%)",
78
+ "--primary": "hsl(210 20% 98%)",
79
+ "--primary-foreground": "hsl(222 30% 10%)",
80
+ "--secondary": "hsl(220 25% 14%)",
81
+ "--secondary-foreground": "hsl(210 20% 98%)",
82
+ "--muted": "hsl(220 25% 14%)",
83
+ "--muted-foreground": "hsl(215 20% 60%)",
84
+ "--accent": "hsl(220 25% 16%)",
85
+ "--accent-foreground": "hsl(210 20% 98%)",
86
+ "--border": "hsl(220 20% 18%)",
87
+ "--input": "hsl(220 25% 14%)",
88
+ "--ring": "hsl(215 25% 70%)",
89
+ "--chrome-border": "var(--border)",
90
+ "--top-bar-border": "var(--chrome-border)",
91
+ "--activity-bar-border": "var(--chrome-border)",
92
+ "--bottom-bar-border": "var(--chrome-border)",
93
+ "--terminal-panel-border": "var(--chrome-border)",
94
+ "--card": "hsl(222 28% 10%)",
95
+ "--card-foreground": "hsl(210 20% 98%)",
96
+ "--popover": "hsl(222 28% 10%)",
97
+ "--popover-foreground": "hsl(210 20% 98%)",
98
+ "--success": "oklch(0.72 0.19 150)",
99
+ "--success-foreground": "hsl(222 30% 10%)",
100
+ "--warning": "oklch(0.82 0.16 80)",
101
+ "--warning-foreground": "hsl(222 30% 10%)",
102
+ "--error": "oklch(0.7 0.22 25)",
103
+ "--error-foreground": "hsl(0 0% 100%)",
104
+ "--info": "oklch(0.7 0.15 250)",
105
+ "--info-foreground": "hsl(0 0% 100%)",
106
+ "--highlight-block-info-accent": "oklch(0.62 0.12 240)",
107
+ "--highlight-block-warning-accent": "oklch(0.7 0.14 65)",
108
+ "--highlight-block-success-accent": "oklch(0.62 0.12 155)",
109
+ "--highlight-block-error-accent": "oklch(0.6 0.14 25)",
110
+ "--highlight-block-note-accent": "oklch(0.62 0.14 285)",
111
+ "--highlight-block-tip-accent": "oklch(0.6 0.1 175)",
112
+ "--sidebar": "hsl(222 28% 10%)",
113
+ "--sidebar-foreground": "hsl(210 20% 98%)",
114
+ "--sidebar-primary": "hsl(217 80% 55%)",
115
+ "--sidebar-primary-foreground": "hsl(0 0% 100%)",
116
+ "--sidebar-accent": "hsl(220 25% 16%)",
117
+ "--sidebar-accent-foreground": "hsl(210 20% 98%)",
118
+ "--sidebar-border": "hsl(220 20% 18%)",
119
+ "--sidebar-ring": "hsl(217 80% 55%)",
120
+ "--activity-bar": "hsl(222 30% 9%)",
121
+ "--activity-bar-foreground": "hsl(215 20% 55%)",
122
+ "--activity-bar-foreground-active": "hsl(210 20% 98%)",
123
+ "--activity-bar-badge": "hsl(217 80% 55%)",
124
+ "--activity-bar-badge-foreground": "hsl(0 0% 100%)",
125
+ "--terminal-background": "hsl(222 32% 7%)",
126
+ "--terminal-foreground": "hsl(210 15% 92%)",
127
+ "--chart-1": "hsl(210 20% 98%)",
128
+ "--chart-2": "hsl(215 20% 60%)",
129
+ "--chart-3": "oklch(0.7 0.15 250)",
130
+ "--chart-4": "oklch(0.72 0.19 150)",
131
+ "--chart-5": "oklch(0.82 0.16 80)",
132
+ "--selection-bg": "hsl(215 70% 50%)",
133
+ "--selection-fg": "hsl(0 0% 100%)",
134
+ "--selection-on-primary-bg": "hsl(215 80% 35%)",
135
+ "--selection-on-primary-fg": "hsl(0 0% 100%)",
136
+ "--selection-code-bg": "hsl(212 100% 67%)",
137
+ "--selection-code-fg": "hsl(220 20% 8%)"
138
+ }, t = a(n), d = a(i);
139
+ export {
140
+ d as CLASSIC_DARK_SEMANTIC_TOKENS,
141
+ t as CLASSIC_LIGHT_SEMANTIC_TOKENS
142
+ };
@@ -32,6 +32,12 @@ export interface FloeThemePreset {
32
32
  border?: string;
33
33
  colors: readonly [string, string, string, string, string];
34
34
  };
35
+ /**
36
+ * Complete resolved shell tokens for non-renderer adapters such as Electron's main process.
37
+ * Unlike `tokens`, this also contains the inherited Classic baseline without applying it as
38
+ * an inline renderer override.
39
+ */
40
+ semanticTokens?: Readonly<FloeThemeTokenMap>;
35
41
  /** Optional Monaco definitions keyed by resolved light/dark mode. */
36
42
  monaco?: Partial<Record<'light' | 'dark', FloeMonacoThemeDefinition>>;
37
43
  tokens?: FloeThemeTokenOverrides;
@@ -41,6 +41,7 @@ interface ShellThemePaletteDefinition {
41
41
  export declare function createShellThemePreset(definition: ShellThemePaletteDefinition): FloeThemePreset;
42
42
  export declare const builtInShellThemePresets: readonly [{
43
43
  inheritsBaseTokens: true;
44
+ semanticTokens: Readonly<Partial<Record<`--${string}`, string>>>;
44
45
  tokens: undefined;
45
46
  name: string;
46
47
  displayName: string;
@@ -57,6 +58,7 @@ export declare const builtInShellThemePresets: readonly [{
57
58
  monaco?: Partial<Record<"light" | "dark", import("./index").FloeMonacoThemeDefinition>>;
58
59
  }, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, FloeThemePreset, {
59
60
  inheritsBaseTokens: true;
61
+ semanticTokens: Readonly<Partial<Record<`--${string}`, string>>>;
60
62
  tokens: undefined;
61
63
  name: string;
62
64
  displayName: string;
@@ -1,4 +1,5 @@
1
- const A = [
1
+ import { CLASSIC_LIGHT_SEMANTIC_TOKENS as s, CLASSIC_DARK_SEMANTIC_TOKENS as m } from "./classicSemanticTokens.js";
2
+ const C = [
2
3
  "--background",
3
4
  "--foreground",
4
5
  "--primary",
@@ -61,7 +62,7 @@ const A = [
61
62
  "--selection-on-primary-fg",
62
63
  "--selection-code-bg",
63
64
  "--selection-code-fg"
64
- ], s = {
65
+ ], l = {
65
66
  success: "#287A4B",
66
67
  successForeground: "#FFFFFF",
67
68
  warning: "#835800",
@@ -72,7 +73,7 @@ const A = [
72
73
  infoForeground: "#FFFFFF",
73
74
  note: "#6847A0",
74
75
  tip: "#1E6F73"
75
- }, m = {
76
+ }, b = {
76
77
  success: "#72D39C",
77
78
  successForeground: "#07160E",
78
79
  warning: "#F0C36A",
@@ -85,18 +86,18 @@ const A = [
85
86
  tip: "#71C8C0"
86
87
  };
87
88
  function o(r) {
88
- const e = r.mode === "light" ? s : m, n = r.mode === "light" ? { background: "#F4C95D", foreground: "#243447" } : {
89
+ const e = r.mode === "light" ? l : b, n = r.mode === "light" ? { background: "#F4C95D", foreground: "#243447" } : {
89
90
  background: r.background,
90
91
  foreground: r.foreground
91
- }, [t, d, F, c, u] = r.chart, a = r.syntax ?? {
92
+ }, [t, d, F, c, g] = r.chart, a = r.syntax ?? {
92
93
  comment: r.mutedForeground,
93
94
  keyword: t,
94
95
  string: d,
95
96
  number: c,
96
97
  type: F,
97
- function: u,
98
+ function: g,
98
99
  constant: c
99
- }, g = {
100
+ }, u = {
100
101
  "--background": r.background,
101
102
  "--foreground": r.foreground,
102
103
  "--primary": r.primary,
@@ -152,7 +153,7 @@ function o(r) {
152
153
  "--chart-2": d,
153
154
  "--chart-3": F,
154
155
  "--chart-4": c,
155
- "--chart-5": u,
156
+ "--chart-5": g,
156
157
  "--selection-bg": r.selectionBackground,
157
158
  "--selection-fg": r.selectionForeground,
158
159
  "--selection-on-primary-bg": n.background,
@@ -173,6 +174,7 @@ function o(r) {
173
174
  border: r.border,
174
175
  colors: r.chart
175
176
  },
177
+ semanticTokens: u,
176
178
  monaco: {
177
179
  [r.mode]: {
178
180
  base: r.mode === "light" ? "vs" : "vs-dark",
@@ -232,10 +234,10 @@ function o(r) {
232
234
  }
233
235
  }
234
236
  },
235
- tokens: r.mode === "light" ? { light: g } : { dark: g }
237
+ tokens: r.mode === "light" ? { light: u } : { dark: u }
236
238
  };
237
239
  }
238
- const l = {
240
+ const B = {
239
241
  ...o({
240
242
  name: "classic-light",
241
243
  displayName: "Classic Light",
@@ -267,8 +269,9 @@ const l = {
267
269
  }
268
270
  }),
269
271
  inheritsBaseTokens: !0,
272
+ semanticTokens: s,
270
273
  tokens: void 0
271
- }, b = {
274
+ }, p = {
272
275
  ...o({
273
276
  name: "classic-dark",
274
277
  displayName: "Classic Dark",
@@ -300,9 +303,10 @@ const l = {
300
303
  }
301
304
  }),
302
305
  inheritsBaseTokens: !0,
306
+ semanticTokens: m,
303
307
  tokens: void 0
304
- }, B = [
305
- l,
308
+ }, k = [
309
+ B,
306
310
  o({
307
311
  name: "paper",
308
312
  displayName: "Paper",
@@ -558,7 +562,7 @@ const l = {
558
562
  constant: "#745500"
559
563
  }
560
564
  }),
561
- b,
565
+ p,
562
566
  o({
563
567
  name: "ink",
564
568
  displayName: "Ink",
@@ -814,18 +818,18 @@ const l = {
814
818
  constant: "#FFCC66"
815
819
  }
816
820
  })
817
- ], y = {
821
+ ], D = {
818
822
  light: "classic-light",
819
823
  dark: "classic-dark"
820
824
  };
821
- function p(r, e) {
825
+ function A(r, e) {
822
826
  const n = r.mode ?? "both";
823
827
  return n === "both" || n === e;
824
828
  }
825
- function k(r, e) {
826
- return r.filter((n) => p(n, e));
829
+ function E(r, e) {
830
+ return r.filter((n) => A(n, e));
827
831
  }
828
- function E(r) {
832
+ function y(r) {
829
833
  const e = /* @__PURE__ */ new Set();
830
834
  for (const n of r) {
831
835
  if (e.has(n.name))
@@ -834,10 +838,10 @@ function E(r) {
834
838
  }
835
839
  }
836
840
  function i(r, e, n, t) {
837
- const d = k(r, e);
841
+ const d = E(r, e);
838
842
  return n && d.some((F) => F.name === n) ? n : t && d.some((F) => F.name === t) ? t : d[0]?.name;
839
843
  }
840
- function h(r, e, n = {}) {
844
+ function f(r, e, n = {}) {
841
845
  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;
842
846
  return {
843
847
  version: 1,
@@ -845,15 +849,15 @@ function h(r, e, n = {}) {
845
849
  dark: i(e, "dark", c, n.dark)
846
850
  };
847
851
  }
848
- E(B);
852
+ y(k);
849
853
  export {
850
- y as BUILT_IN_SHELL_THEME_DEFAULTS,
851
- A as REQUIRED_SHELL_THEME_TOKENS,
852
- E as assertUniqueThemePresetNames,
853
- B as builtInShellThemePresets,
854
+ D as BUILT_IN_SHELL_THEME_DEFAULTS,
855
+ C as REQUIRED_SHELL_THEME_TOKENS,
856
+ y as assertUniqueThemePresetNames,
857
+ k as builtInShellThemePresets,
854
858
  o as createShellThemePreset,
855
- k as getShellThemePresetsForMode,
856
- h as normalizeShellThemeSelection,
857
- p as presetSupportsMode,
859
+ E as getShellThemePresetsForMode,
860
+ f as normalizeShellThemeSelection,
861
+ A as presetSupportsMode,
858
862
  i as resolveShellThemePresetName
859
863
  };
@@ -0,0 +1,2 @@
1
+ export { BUILT_IN_SHELL_THEME_DEFAULTS, REQUIRED_SHELL_THEME_TOKENS, assertUniqueThemePresetNames, builtInShellThemePresets, getShellThemePresetsForMode, normalizeShellThemeSelection, presetSupportsMode, resolveShellThemePresetName, type FloeShellThemeDefaults, type FloeShellThemeMode, type FloeShellThemeSelection, } from './styles/themes/presets';
2
+ export type { FloeMonacoThemeDefinition, FloeMonacoTokenRule, FloeThemePreset, FloeThemePresetMode, FloeThemeTokenMap, FloeThemeTokenOverrides, } from './styles/themes';
package/dist/themes.js ADDED
@@ -0,0 +1,11 @@
1
+ import { BUILT_IN_SHELL_THEME_DEFAULTS as r, REQUIRED_SHELL_THEME_TOKENS as s, assertUniqueThemePresetNames as t, builtInShellThemePresets as E, getShellThemePresetsForMode as S, normalizeShellThemeSelection as T, presetSupportsMode as h, resolveShellThemePresetName as m } from "./styles/themes/presets.js";
2
+ export {
3
+ r as BUILT_IN_SHELL_THEME_DEFAULTS,
4
+ s as REQUIRED_SHELL_THEME_TOKENS,
5
+ t as assertUniqueThemePresetNames,
6
+ E as builtInShellThemePresets,
7
+ S as getShellThemePresetsForMode,
8
+ T as normalizeShellThemeSelection,
9
+ h as presetSupportsMode,
10
+ m as resolveShellThemePresetName
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-core",
3
- "version": "0.39.0",
3
+ "version": "0.39.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -75,6 +75,10 @@
75
75
  "types": "./dist/terminal.d.ts",
76
76
  "import": "./dist/terminal.js"
77
77
  },
78
+ "./themes": {
79
+ "types": "./dist/themes.d.ts",
80
+ "import": "./dist/themes.js"
81
+ },
78
82
  "./workbench": {
79
83
  "types": "./dist/workbench.d.ts",
80
84
  "import": "./dist/workbench.js"