@floegence/floe-webapp-core 0.50.6 → 0.52.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/dist/components/chat/input/ChatInput.js +8 -8
- package/dist/components/ui/Button.js +16 -13
- package/dist/components/ui/Card.js +125 -119
- package/dist/components/ui/Checkbox.js +178 -132
- package/dist/components/ui/CommandPalette.js +10 -10
- package/dist/components/ui/Dialog.d.ts +7 -0
- package/dist/components/ui/Dialog.js +160 -114
- package/dist/components/ui/DirectoryInput.js +5 -5
- package/dist/components/ui/Dropdown.d.ts +2 -0
- package/dist/components/ui/Dropdown.js +183 -160
- package/dist/components/ui/FloatingWindow.js +211 -199
- package/dist/components/ui/HighlightBlock.js +8 -8
- package/dist/components/ui/Input.js +40 -40
- package/dist/components/ui/Pagination.js +90 -88
- package/dist/components/ui/ProcessingIndicator.js +1 -1
- package/dist/components/ui/Progress.js +99 -88
- package/dist/components/ui/QuoteBlock.js +9 -9
- package/dist/components/ui/Radio.js +151 -127
- package/dist/components/ui/SegmentedControl.js +26 -25
- package/dist/components/ui/Stepper.js +114 -112
- package/dist/components/ui/Switch.js +34 -33
- package/dist/components/ui/Tabs.js +153 -150
- package/dist/components/ui/Tag.js +24 -21
- package/dist/components/ui/Tooltip.js +10 -10
- package/dist/components/ui/floatingPresence.js +40 -30
- package/dist/components/workbench/WorkbenchHud.js +9 -9
- package/dist/components/workbench/WorkbenchLockButton.js +4 -4
- package/dist/components/workbench/WorkbenchWidget.js +46 -43
- package/dist/context/FloeConfigContext.d.ts +5 -1
- package/dist/context/FloeConfigContext.js +10 -9
- package/dist/context/ThemeContext.d.ts +3 -1
- package/dist/context/ThemeContext.js +78 -71
- package/dist/floe.css +32 -0
- package/dist/full.js +839 -836
- package/dist/hooks/useOverlayMask.js +95 -83
- package/dist/index.js +150 -147
- package/dist/input-focus.css +0 -1
- package/dist/styles/themes/index.d.ts +3 -0
- package/dist/styles/themes/index.js +40 -31
- package/dist/styles/tokens.d.ts +36 -0
- package/dist/styles/tokens.js +12 -5
- package/dist/styles.css +1 -1
- package/dist/surface.css +467 -0
- package/dist/themes.d.ts +1 -1
- package/dist/ui.css +9 -0
- package/package.json +1 -1
|
@@ -1,100 +1,107 @@
|
|
|
1
|
-
import { createSignal as
|
|
2
|
-
import { createSimpleContext as
|
|
3
|
-
import { useResolvedFloeConfig as
|
|
4
|
-
import { isThemeType as
|
|
5
|
-
import { normalizeShellThemeSelection as
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
return s &&
|
|
1
|
+
import { createSignal as h, createEffect as S, createMemo as Q, onCleanup as R } from "solid-js";
|
|
2
|
+
import { createSimpleContext as te } from "./createSimpleContext.js";
|
|
3
|
+
import { useResolvedFloeConfig as se } from "./FloeConfigContext.js";
|
|
4
|
+
import { isFloeSurfaceStyle as k, applySurfaceStyleAttribute as V, isThemeType as re, getSystemTheme as ne, applyTheme as oe, applyShellThemeAttribute as j, syncThemeTokenOverrides as q, resolveThemeTokens as ce } from "../styles/themes/index.js";
|
|
5
|
+
import { normalizeShellThemeSelection as B, presetSupportsMode as D } from "../styles/themes/presets.js";
|
|
6
|
+
function d(s, n, c) {
|
|
7
|
+
if (n.length !== 0)
|
|
8
|
+
return s && n.some((l) => l.name === s) ? s : c && n.some((l) => l.name === c) ? c : n[0]?.name;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const s =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
function le() {
|
|
11
|
+
const s = se(), n = () => s.config.theme.storageKey, c = () => s.config.theme.defaultTheme, l = () => s.config.theme.surfaceStyleStorageKey ?? `${n()}-surface-style`, K = s.config.theme.defaultSurfaceStyle, g = k(K) ? K : "standard", x = s.persist.load(l(), g), [b, G] = h(k(x) ? x : g), H = (e) => {
|
|
12
|
+
const t = k(e) ? e : g;
|
|
13
|
+
G(t), s.persist.debouncedSave(l(), t);
|
|
14
|
+
};
|
|
15
|
+
S(() => V(b()));
|
|
16
|
+
const I = () => s.config.theme.tokens, o = () => s.config.theme.presets ?? [], p = () => s.config.theme.presetStorageKey ?? `${n()}-preset`, m = () => d(s.config.theme.defaultPreset, o()), i = () => s.config.theme.shellPresets ?? [], C = () => s.config.theme.shellPresetStorageKey ?? `${n()}-shell-preset`, M = () => s.config.theme.defaultShellPreset ?? {}, w = s.persist.load(n(), c()), J = re(w) ? w : c(), [T, U] = h(J), W = s.persist.load(p(), m()), [y, E] = h(d(W, o(), m())), X = s.persist.load(C(), void 0), [v, F] = h(B(X, i(), M())), [Y, Z] = h(ne());
|
|
17
|
+
let f = [];
|
|
18
|
+
const N = Q(() => {
|
|
19
|
+
const e = d(y(), o(), m());
|
|
15
20
|
if (e)
|
|
16
21
|
return o().find((t) => t.name === e);
|
|
17
|
-
}),
|
|
22
|
+
}), a = () => {
|
|
18
23
|
const e = T();
|
|
19
|
-
return e === "system" ?
|
|
20
|
-
},
|
|
21
|
-
const t =
|
|
24
|
+
return e === "system" ? Y() : e;
|
|
25
|
+
}, $ = (e) => {
|
|
26
|
+
const t = v()[e];
|
|
22
27
|
if (t)
|
|
23
|
-
return
|
|
24
|
-
},
|
|
25
|
-
if (
|
|
26
|
-
const e =
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
const e =
|
|
30
|
-
(e.light !== t.light || e.dark !== t.dark) &&
|
|
28
|
+
return i().find((r) => r.name === t && D(r, e));
|
|
29
|
+
}, A = Q(() => $(a()));
|
|
30
|
+
if (S(() => {
|
|
31
|
+
const e = d(y(), o(), m());
|
|
32
|
+
y() !== e && E(e);
|
|
33
|
+
}), S(() => {
|
|
34
|
+
const e = v(), t = B(e, i(), M());
|
|
35
|
+
(e.light !== t.light || e.dark !== t.dark) && F(t);
|
|
31
36
|
}), typeof window < "u") {
|
|
32
|
-
const e = window.matchMedia("(prefers-color-scheme: dark)"), t = (
|
|
33
|
-
|
|
37
|
+
const e = window.matchMedia("(prefers-color-scheme: dark)"), t = (r) => {
|
|
38
|
+
Z(r.matches ? "dark" : "light");
|
|
34
39
|
};
|
|
35
|
-
e.addEventListener("change", t),
|
|
40
|
+
e.addEventListener("change", t), R(() => e.removeEventListener("change", t));
|
|
36
41
|
}
|
|
37
|
-
|
|
38
|
-
const e = T(), t =
|
|
39
|
-
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
+
S(() => {
|
|
43
|
+
const e = T(), t = a(), r = A();
|
|
44
|
+
oe(e), j(r?.name), f = q(ce(t, I(), r?.tokens, N()?.tokens), f);
|
|
45
|
+
}), R(() => {
|
|
46
|
+
V(void 0), j(void 0), f = q(void 0, f);
|
|
42
47
|
});
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
const e =
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
const t =
|
|
50
|
-
if (
|
|
51
|
-
s.persist.remove(
|
|
48
|
+
const P = (e) => {
|
|
49
|
+
U(e), s.persist.debouncedSave(n(), e);
|
|
50
|
+
}, _ = () => {
|
|
51
|
+
const e = a();
|
|
52
|
+
P(e === "light" ? "dark" : "light");
|
|
53
|
+
}, ee = (e) => {
|
|
54
|
+
const t = d(e, o(), m());
|
|
55
|
+
if (E(t), !t) {
|
|
56
|
+
s.persist.remove(p());
|
|
52
57
|
return;
|
|
53
58
|
}
|
|
54
|
-
s.persist.debouncedSave(
|
|
55
|
-
},
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
61
|
-
...
|
|
59
|
+
s.persist.debouncedSave(p(), t);
|
|
60
|
+
}, L = (e, t) => {
|
|
61
|
+
const r = i().find((O) => O.name === t && D(O, e));
|
|
62
|
+
if (!r) return !1;
|
|
63
|
+
const u = v();
|
|
64
|
+
if (u[e] === r.name) return !0;
|
|
65
|
+
const z = {
|
|
66
|
+
...u,
|
|
62
67
|
version: 1,
|
|
63
|
-
[e]:
|
|
68
|
+
[e]: r.name
|
|
64
69
|
};
|
|
65
|
-
return
|
|
70
|
+
return F(z), s.persist.debouncedSave(C(), z), !0;
|
|
66
71
|
};
|
|
67
72
|
return {
|
|
73
|
+
surfaceStyle: b,
|
|
74
|
+
setSurfaceStyle: H,
|
|
68
75
|
theme: T,
|
|
69
|
-
resolvedTheme:
|
|
70
|
-
setTheme:
|
|
71
|
-
toggleTheme:
|
|
76
|
+
resolvedTheme: a,
|
|
77
|
+
setTheme: P,
|
|
78
|
+
toggleTheme: _,
|
|
72
79
|
themePresets: o,
|
|
73
|
-
themePreset:
|
|
74
|
-
setThemePreset:
|
|
75
|
-
shellPresets:
|
|
76
|
-
shellPreset:
|
|
77
|
-
shellPresetForMode:
|
|
80
|
+
themePreset: N,
|
|
81
|
+
setThemePreset: ee,
|
|
82
|
+
shellPresets: i,
|
|
83
|
+
shellPreset: A,
|
|
84
|
+
shellPresetForMode: $,
|
|
78
85
|
setShellPreset: (e) => {
|
|
79
|
-
const t =
|
|
86
|
+
const t = i().find((u) => u.name === e);
|
|
80
87
|
if (!t) return;
|
|
81
|
-
const
|
|
82
|
-
|
|
88
|
+
const r = t.mode === "light" || t.mode === "dark" ? t.mode : a();
|
|
89
|
+
L(r, e);
|
|
83
90
|
},
|
|
84
91
|
selectShellTheme: (e, t) => {
|
|
85
|
-
|
|
92
|
+
L(e, t) && P(e);
|
|
86
93
|
}
|
|
87
94
|
};
|
|
88
95
|
}
|
|
89
96
|
const {
|
|
90
|
-
Provider:
|
|
91
|
-
use:
|
|
92
|
-
} =
|
|
97
|
+
Provider: Se,
|
|
98
|
+
use: ge
|
|
99
|
+
} = te({
|
|
93
100
|
name: "Theme",
|
|
94
|
-
init:
|
|
101
|
+
init: le
|
|
95
102
|
});
|
|
96
103
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
Se as ThemeProvider,
|
|
105
|
+
le as createThemeService,
|
|
106
|
+
ge as useTheme
|
|
100
107
|
};
|
package/dist/floe.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import './input-focus.css';
|
|
2
|
+
@import './surface.css';
|
|
2
3
|
/*
|
|
3
4
|
* Floe design tokens + base styles + custom utilities.
|
|
4
5
|
*
|
|
@@ -489,6 +490,37 @@
|
|
|
489
490
|
--floe-floating-exit-scale: 0.985;
|
|
490
491
|
}
|
|
491
492
|
|
|
493
|
+
.floe-bottom-drawer-overlay {
|
|
494
|
+
padding: max(1.25rem, env(safe-area-inset-top, 0px))
|
|
495
|
+
max(1.5rem, env(safe-area-inset-right, 0px)) max(1.25rem, env(safe-area-inset-bottom, 0px))
|
|
496
|
+
max(1.5rem, env(safe-area-inset-left, 0px));
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.floe-bottom-drawer-backdrop {
|
|
500
|
+
background: color-mix(in srgb, var(--foreground) 8%, transparent);
|
|
501
|
+
--floe-floating-enter-duration: 240ms;
|
|
502
|
+
--floe-floating-exit-duration: 180ms;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.floe-bottom-drawer-panel {
|
|
506
|
+
--floe-floating-enter-duration: 240ms;
|
|
507
|
+
--floe-floating-exit-duration: 180ms;
|
|
508
|
+
--floe-floating-enter-y: calc(100% + 1.25rem);
|
|
509
|
+
--floe-floating-exit-y: calc(100% + 1.25rem);
|
|
510
|
+
--floe-floating-enter-scale: 1;
|
|
511
|
+
--floe-floating-exit-scale: 1;
|
|
512
|
+
border-radius: 1rem;
|
|
513
|
+
overflow: hidden;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
@media (max-width: 639px) {
|
|
517
|
+
.floe-bottom-drawer-overlay {
|
|
518
|
+
padding: max(0.75rem, env(safe-area-inset-top, 0px))
|
|
519
|
+
max(0.75rem, env(safe-area-inset-right, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px))
|
|
520
|
+
max(0.75rem, env(safe-area-inset-left, 0px));
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
492
524
|
.floe-floating-menu {
|
|
493
525
|
--floe-floating-enter-duration: 120ms;
|
|
494
526
|
--floe-floating-exit-duration: 100ms;
|