@floegence/floe-webapp-core 0.86.60 → 0.86.63
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/app/FloeRegistryContributions.js +0 -3
- package/dist/components/chat/blocks/BlockRenderer.js +1 -1
- package/dist/components/chat/blocks/CodeDiffBlock.js +56 -56
- package/dist/components/chat/blocks/ImageBlock.js +1 -1
- package/dist/components/chat/blocks/ToolCallBlock.js +57 -57
- package/dist/components/chat/status/ConnectionStatus.js +10 -10
- package/dist/components/deck/DeckCell.js +25 -25
- package/dist/components/deck/DeckContextMenu.js +20 -20
- package/dist/components/deck/DeckGrid.js +1 -1
- package/dist/components/deck/DeckTopBar.js +42 -42
- package/dist/components/deck/DropZonePreview.js +6 -6
- package/dist/components/deck/LayoutSelector.js +53 -53
- package/dist/components/deck/WidgetFrame.js +28 -28
- package/dist/components/deck/WidgetPalette.js +31 -31
- package/dist/components/deck/WidgetTypeSwitcher.js +31 -31
- package/dist/components/file-browser/Breadcrumb.js +27 -27
- package/dist/components/file-browser/DirectoryTree.js +15 -15
- package/dist/components/file-browser/DragPreview.js +58 -58
- package/dist/components/file-browser/FileBrowser.js +17 -17
- package/dist/components/file-browser/FileBrowserStatusBar.js +18 -18
- package/dist/components/file-browser/FileBrowserToolbar.js +27 -27
- package/dist/components/file-browser/FileContextMenu.js +47 -47
- package/dist/components/file-browser/FileGridView.js +53 -51
- package/dist/components/file-browser/FileItemDecorations.js +30 -27
- package/dist/components/file-browser/FileListView.js +114 -114
- package/dist/components/icons/ActivityRailIcons.d.ts +30 -0
- package/dist/components/icons/ActivityRailIcons.js +68 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/icons/index.js +1357 -1357
- package/dist/components/launchpad/Launchpad.js +14 -14
- package/dist/components/launchpad/LaunchpadGrid.js +7 -7
- package/dist/components/launchpad/LaunchpadItem.js +11 -11
- package/dist/components/launchpad/LaunchpadPagination.js +16 -16
- package/dist/components/launchpad/LaunchpadSearch.js +9 -9
- package/dist/components/layout/ActivityBar.js +61 -63
- package/dist/components/layout/DisplayModeSwitcher.d.ts +10 -0
- package/dist/components/layout/DisplayModeSwitcher.js +102 -33
- package/dist/components/layout/MobileNavigationPanel.js +36 -36
- package/dist/components/layout/MobileTabBar.js +39 -39
- package/dist/components/layout/Panel.js +16 -16
- package/dist/components/layout/ResizeHandle.js +19 -19
- package/dist/components/layout/Shell.d.ts +0 -6
- package/dist/components/layout/Shell.js +208 -254
- package/dist/components/layout/Sidebar.js +37 -36
- package/dist/components/layout/SidebarPane.js +19 -19
- package/dist/components/layout/ThemeToggle.d.ts +19 -0
- package/dist/components/layout/ThemeToggle.js +39 -0
- package/dist/components/layout/TopBar.js +16 -16
- package/dist/components/layout/TopBarIconButton.js +15 -15
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/loading/LoadingOverlay.js +9 -9
- package/dist/components/loading/Skeleton.js +11 -11
- package/dist/components/ui/Button.js +44 -36
- package/dist/components/ui/Card.d.ts +11 -62
- package/dist/components/ui/Card.js +64 -237
- package/dist/components/ui/Checkbox.js +79 -79
- package/dist/components/ui/CommandPalette.js +56 -55
- package/dist/components/ui/Dialog.js +91 -93
- package/dist/components/ui/DirectoryInput.js +22 -22
- package/dist/components/ui/DirectoryPicker.js +8 -8
- package/dist/components/ui/Dropdown.js +89 -87
- package/dist/components/ui/FeedbackIndicator.js +57 -57
- package/dist/components/ui/FileOpenPicker.js +37 -37
- package/dist/components/ui/FileSavePicker.js +41 -41
- package/dist/components/ui/FloatingWindow.js +213 -205
- package/dist/components/ui/Form.js +76 -76
- package/dist/components/ui/HighlightBlock.js +14 -14
- package/dist/components/ui/Input.js +106 -109
- package/dist/components/ui/Pagination.js +86 -86
- package/dist/components/ui/Popover.d.ts +33 -0
- package/dist/components/ui/Popover.js +133 -0
- package/dist/components/ui/ProcessingIndicator.js +344 -345
- package/dist/components/ui/Progress.js +94 -97
- package/dist/components/ui/QuoteBlock.js +25 -25
- package/dist/components/ui/Radio.js +91 -91
- package/dist/components/ui/SegmentedControl.js +24 -24
- package/dist/components/ui/Stepper.js +68 -60
- package/dist/components/ui/Switch.js +25 -25
- package/dist/components/ui/Tabs.js +188 -163
- package/dist/components/ui/Tag.js +12 -9
- package/dist/components/ui/Tooltip.js +30 -30
- package/dist/components/ui/floatingPresence.d.ts +7 -0
- package/dist/components/ui/floatingPresence.js +80 -39
- package/dist/components/ui/index.d.ts +2 -1
- package/dist/components/ui/picker/DirectoryFavorites.js +27 -27
- package/dist/components/ui/picker/PickerBase.js +107 -107
- package/dist/context/ComponentRegistry.d.ts +0 -8
- package/dist/context/ComponentRegistry.js +61 -67
- package/dist/context/FloeConfigContext.d.ts +0 -6
- package/dist/context/FloeConfigContext.js +9 -15
- package/dist/context/NotificationContext.js +4 -4
- package/dist/context/ThemeContext.js +71 -70
- package/dist/context/index.d.ts +1 -1
- package/dist/display-mode.css +2 -45
- package/dist/floe.css +205 -43
- package/dist/full.js +701 -695
- package/dist/icons.js +112 -102
- package/dist/language.css +320 -0
- package/dist/layout.js +33 -35
- package/dist/primitives.css +23 -17
- package/dist/standalone.css +1 -0
- package/dist/styles/themes/classicSemanticTokens.d.ts +122 -122
- package/dist/styles/themes/classicSemanticTokens.js +140 -138
- package/dist/styles/themes/index.d.ts +3 -1
- package/dist/styles/themes/index.js +10 -10
- package/dist/styles/themes/presets.d.ts +2 -2
- package/dist/styles/themes/presets.js +34 -34
- package/dist/styles/tokens.d.ts +152 -68
- package/dist/styles/tokens.js +87 -49
- package/dist/styles.css +1 -1
- package/dist/surface.css +214 -117
- package/dist/themes/dark.css +64 -64
- package/dist/themes/light.css +64 -64
- package/dist/ui.css +171 -255
- package/dist/ui.js +176 -178
- package/dist/utils/hotInteraction.d.ts +7 -0
- package/dist/utils/hotInteraction.js +12 -12
- package/dist/widgets/TerminalWidget.js +28 -28
- package/dist/workbench-composition.css +15 -15
- package/package.json +1 -1
- package/dist/components/layout/BottomBar.d.ts +0 -29
- package/dist/components/layout/BottomBar.js +0 -70
|
@@ -2,8 +2,8 @@ import { createSignal as C } from "solid-js";
|
|
|
2
2
|
import { createSimpleContext as h } from "./createSimpleContext.js";
|
|
3
3
|
import { useResolvedFloeConfig as w } from "./FloeConfigContext.js";
|
|
4
4
|
import { useTheme as x } from "./ThemeContext.js";
|
|
5
|
-
import { useLayout as
|
|
6
|
-
import { useCommand as
|
|
5
|
+
import { useLayout as b } from "./LayoutContext.js";
|
|
6
|
+
import { useCommand as v } from "./CommandContext.js";
|
|
7
7
|
import { useNotification as R } from "./NotificationContext.js";
|
|
8
8
|
import { deferNonBlocking as M } from "../utils/defer.js";
|
|
9
9
|
function S(r) {
|
|
@@ -23,8 +23,8 @@ function A(r, i) {
|
|
|
23
23
|
remove: (a) => M(() => r.remove(n + a))
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const r = x(), i =
|
|
26
|
+
function z() {
|
|
27
|
+
const r = x(), i = b(), n = v(), a = R(), m = w();
|
|
28
28
|
return (l, p) => ({
|
|
29
29
|
protocol: p?.protocol,
|
|
30
30
|
theme: r,
|
|
@@ -37,37 +37,37 @@ function D() {
|
|
|
37
37
|
}
|
|
38
38
|
const f = h({
|
|
39
39
|
name: "ComponentRegistry",
|
|
40
|
-
init:
|
|
41
|
-
}),
|
|
42
|
-
function
|
|
40
|
+
init: k
|
|
41
|
+
}), D = f.Provider;
|
|
42
|
+
function G() {
|
|
43
43
|
return f.use();
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function H() {
|
|
46
46
|
return f.useOptional();
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function J() {
|
|
49
49
|
return f.has();
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const [r, i] = C(/* @__PURE__ */ new Map()), [n, a] = C(/* @__PURE__ */ new Set()), m = /* @__PURE__ */ new Map(), l = (
|
|
53
|
-
i((
|
|
54
|
-
}, p = (
|
|
55
|
-
const
|
|
56
|
-
return i((
|
|
57
|
-
const c = new Map(
|
|
58
|
-
return
|
|
51
|
+
function k() {
|
|
52
|
+
const [r, i] = C(/* @__PURE__ */ new Map()), [n, a] = C(/* @__PURE__ */ new Set()), m = /* @__PURE__ */ new Map(), l = (e) => {
|
|
53
|
+
i((o) => new Map(o).set(e.id, e));
|
|
54
|
+
}, p = (e) => {
|
|
55
|
+
const o = e.map((t) => t.id).filter((t) => !!t);
|
|
56
|
+
return i((t) => {
|
|
57
|
+
const c = new Map(t);
|
|
58
|
+
return e.forEach((u) => c.set(u.id, u)), c;
|
|
59
59
|
}), () => {
|
|
60
|
-
|
|
61
|
-
y(
|
|
60
|
+
o.forEach((t) => {
|
|
61
|
+
y(t);
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
}, d = async (
|
|
65
|
-
const
|
|
66
|
-
if (!
|
|
64
|
+
}, d = async (e, o) => {
|
|
65
|
+
const t = r().get(e);
|
|
66
|
+
if (!t || n().has(e)) return;
|
|
67
67
|
const c = [];
|
|
68
68
|
try {
|
|
69
|
-
if (
|
|
70
|
-
const u =
|
|
69
|
+
if (t.commands?.length) {
|
|
70
|
+
const u = t.commands.map((s) => ({
|
|
71
71
|
id: s.id,
|
|
72
72
|
title: s.title,
|
|
73
73
|
description: s.description,
|
|
@@ -75,32 +75,32 @@ function B() {
|
|
|
75
75
|
keybind: s.keybind,
|
|
76
76
|
allowWhileTyping: s.allowWhileTyping,
|
|
77
77
|
category: s.category,
|
|
78
|
-
execute: () => s.execute(
|
|
78
|
+
execute: () => s.execute(o)
|
|
79
79
|
}));
|
|
80
|
-
c.push(
|
|
80
|
+
c.push(o.commands.registerAll(u));
|
|
81
81
|
}
|
|
82
|
-
await
|
|
82
|
+
await t.onMount?.(o), c.length && m.set(e, () => c.forEach((u) => u())), a((u) => {
|
|
83
83
|
const s = new Set(u);
|
|
84
|
-
return s.add(
|
|
84
|
+
return s.add(e), s;
|
|
85
85
|
});
|
|
86
86
|
} catch (u) {
|
|
87
87
|
throw c.forEach((s) => s()), u;
|
|
88
88
|
}
|
|
89
|
-
}, g = async (
|
|
90
|
-
const
|
|
91
|
-
if (
|
|
89
|
+
}, g = async (e) => {
|
|
90
|
+
const o = r().get(e);
|
|
91
|
+
if (o && n().has(e))
|
|
92
92
|
try {
|
|
93
|
-
await
|
|
93
|
+
await o.onUnmount?.();
|
|
94
94
|
} finally {
|
|
95
|
-
m.get(
|
|
96
|
-
const c = new Set(
|
|
97
|
-
return c.delete(
|
|
95
|
+
m.get(e)?.(), m.delete(e), a((t) => {
|
|
96
|
+
const c = new Set(t);
|
|
97
|
+
return c.delete(e), c;
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
}, y = async (
|
|
101
|
-
await g(
|
|
102
|
-
const
|
|
103
|
-
return
|
|
100
|
+
}, y = async (e) => {
|
|
101
|
+
await g(e), i((o) => {
|
|
102
|
+
const t = new Map(o);
|
|
103
|
+
return t.delete(e), t;
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
106
|
return {
|
|
@@ -109,45 +109,39 @@ function B() {
|
|
|
109
109
|
unregister: y,
|
|
110
110
|
mount: d,
|
|
111
111
|
unmount: g,
|
|
112
|
-
mountAll: async (
|
|
113
|
-
for (const
|
|
114
|
-
await d(
|
|
112
|
+
mountAll: async (e) => {
|
|
113
|
+
for (const o of r().keys())
|
|
114
|
+
await d(o, e(o));
|
|
115
115
|
},
|
|
116
116
|
unmountAll: async () => {
|
|
117
|
-
for (const
|
|
118
|
-
await g(
|
|
117
|
+
for (const e of n())
|
|
118
|
+
await g(e);
|
|
119
119
|
},
|
|
120
120
|
components: r,
|
|
121
121
|
mountedComponents: n,
|
|
122
122
|
sidebarItems: () => {
|
|
123
|
-
const
|
|
124
|
-
for (const
|
|
125
|
-
|
|
126
|
-
...
|
|
127
|
-
order:
|
|
123
|
+
const e = [];
|
|
124
|
+
for (const o of r().values())
|
|
125
|
+
o.sidebar && e.push({
|
|
126
|
+
...o,
|
|
127
|
+
order: o.sidebar.order ?? 100
|
|
128
128
|
});
|
|
129
|
-
return
|
|
129
|
+
return e.sort((o, t) => o.order - t.order);
|
|
130
130
|
},
|
|
131
131
|
allCommands: () => {
|
|
132
|
-
const
|
|
133
|
-
for (const
|
|
134
|
-
|
|
135
|
-
return
|
|
136
|
-
},
|
|
137
|
-
statusBarItems: () => {
|
|
138
|
-
const t = [];
|
|
139
|
-
for (const e of r().values())
|
|
140
|
-
e.statusBar && t.push(...e.statusBar);
|
|
141
|
-
return t;
|
|
132
|
+
const e = [];
|
|
133
|
+
for (const o of r().values())
|
|
134
|
+
o.commands && e.push(...o.commands);
|
|
135
|
+
return e;
|
|
142
136
|
},
|
|
143
|
-
getComponent: (
|
|
137
|
+
getComponent: (e) => r().get(e)
|
|
144
138
|
};
|
|
145
139
|
}
|
|
146
140
|
export {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
141
|
+
D as ComponentRegistryProvider,
|
|
142
|
+
k as createComponentRegistry,
|
|
143
|
+
J as hasComponentRegistryContext,
|
|
144
|
+
z as useComponentContextFactory,
|
|
145
|
+
G as useComponentRegistry,
|
|
146
|
+
H as useOptionalComponentRegistry
|
|
153
147
|
};
|
|
@@ -168,12 +168,6 @@ export interface FloeStrings {
|
|
|
168
168
|
cancel: string;
|
|
169
169
|
confirm: string;
|
|
170
170
|
};
|
|
171
|
-
statusIndicator: {
|
|
172
|
-
connected: string;
|
|
173
|
-
disconnected: string;
|
|
174
|
-
connecting: string;
|
|
175
|
-
error: string;
|
|
176
|
-
};
|
|
177
171
|
}
|
|
178
172
|
export interface FloeConfig {
|
|
179
173
|
storage: FloeStorageConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createContext as
|
|
1
|
+
import { createComponent as L } from "solid-js/web";
|
|
2
|
+
import { createContext as C, createMemo as u, createEffect as S, onCleanup as F, useContext as v } from "solid-js";
|
|
3
3
|
const m = {
|
|
4
4
|
storage: {
|
|
5
5
|
namespace: "floe",
|
|
@@ -71,16 +71,10 @@ const m = {
|
|
|
71
71
|
confirmDialog: {
|
|
72
72
|
cancel: "Cancel",
|
|
73
73
|
confirm: "Confirm"
|
|
74
|
-
},
|
|
75
|
-
statusIndicator: {
|
|
76
|
-
connected: "Connected",
|
|
77
|
-
disconnected: "Disconnected",
|
|
78
|
-
connecting: "Connecting",
|
|
79
|
-
error: "Error"
|
|
80
74
|
}
|
|
81
75
|
}
|
|
82
76
|
};
|
|
83
|
-
function
|
|
77
|
+
function k() {
|
|
84
78
|
if (!(typeof window > "u"))
|
|
85
79
|
return {
|
|
86
80
|
getItem: (e) => localStorage.getItem(e),
|
|
@@ -90,7 +84,7 @@ function I() {
|
|
|
90
84
|
};
|
|
91
85
|
}
|
|
92
86
|
function h(e) {
|
|
93
|
-
const t = e.adapter ??
|
|
87
|
+
const t = e.adapter ?? k(), c = e.namespace ? `${e.namespace}-` : "", r = (o) => `${c}${o}`, n = () => e.enabled && !!t, i = /* @__PURE__ */ new Map(), d = () => {
|
|
94
88
|
if (n()) {
|
|
95
89
|
for (const [o, a] of i.entries()) {
|
|
96
90
|
clearTimeout(a.timer);
|
|
@@ -167,7 +161,7 @@ function h(e) {
|
|
|
167
161
|
}
|
|
168
162
|
};
|
|
169
163
|
}
|
|
170
|
-
function
|
|
164
|
+
function I(e) {
|
|
171
165
|
if (typeof window > "u") return () => {
|
|
172
166
|
};
|
|
173
167
|
const t = () => {
|
|
@@ -207,11 +201,11 @@ function b(e, t) {
|
|
|
207
201
|
}
|
|
208
202
|
return c;
|
|
209
203
|
}
|
|
210
|
-
const y =
|
|
204
|
+
const y = C();
|
|
211
205
|
function N(e) {
|
|
212
206
|
const t = u(() => b(m, e.config)), c = u(() => h(t().storage));
|
|
213
207
|
S(() => {
|
|
214
|
-
const n = c(), d = t().storage.enabled ?
|
|
208
|
+
const n = c(), d = t().storage.enabled ? I(n) : () => {
|
|
215
209
|
};
|
|
216
210
|
F(() => {
|
|
217
211
|
d(), n.dispose?.();
|
|
@@ -221,7 +215,7 @@ function N(e) {
|
|
|
221
215
|
config: t(),
|
|
222
216
|
persist: c()
|
|
223
217
|
}));
|
|
224
|
-
return
|
|
218
|
+
return L(y.Provider, {
|
|
225
219
|
get value() {
|
|
226
220
|
return r();
|
|
227
221
|
},
|
|
@@ -246,7 +240,7 @@ function D() {
|
|
|
246
240
|
export {
|
|
247
241
|
m as DEFAULT_FLOE_CONFIG,
|
|
248
242
|
N as FloeConfigProvider,
|
|
249
|
-
|
|
243
|
+
I as installPersistFlushListeners,
|
|
250
244
|
O as useFloeConfig,
|
|
251
245
|
D as useResolvedFloeConfig
|
|
252
246
|
};
|
|
@@ -97,8 +97,8 @@ function R(i) {
|
|
|
97
97
|
error: () => A()
|
|
98
98
|
}, s = () => i.notification.type === "error" || i.notification.type === "warning" ? "alert" : "status", f = () => s() === "alert" ? "assertive" : "polite";
|
|
99
99
|
return (() => {
|
|
100
|
-
var t = z(), e = t.firstChild, l = e.firstChild, r = l.nextSibling,
|
|
101
|
-
return u(l, () => n[i.notification.type]()), u(
|
|
100
|
+
var t = z(), e = t.firstChild, l = e.firstChild, r = l.nextSibling, b = r.firstChild, p = r.nextSibling;
|
|
101
|
+
return u(l, () => n[i.notification.type]()), u(b, () => i.notification.title), u(r, d(x, {
|
|
102
102
|
get when() {
|
|
103
103
|
return i.notification.message;
|
|
104
104
|
},
|
|
@@ -114,8 +114,8 @@ function R(i) {
|
|
|
114
114
|
var o = j();
|
|
115
115
|
return o.$$click = () => i.notification.action?.onClick(), u(o, () => i.notification.action.label), o;
|
|
116
116
|
}
|
|
117
|
-
}), null),
|
|
118
|
-
var m = N("animate-in slide-in-from-right fade-in duration-
|
|
117
|
+
}), null), p.$$click = () => i.onDismiss(), k((o) => {
|
|
118
|
+
var m = N("animate-in slide-in-from-right fade-in duration-[var(--floe-duration-base)]", "rounded-control border border-border border-l-[3px] p-3.5", "shadow-md", "bg-card text-card-foreground", a[i.notification.type]), v = s(), g = f();
|
|
119
119
|
return m !== o.e && $(t, o.e = m), v !== o.t && h(t, "role", o.t = v), g !== o.a && h(t, "aria-live", o.a = g), o;
|
|
120
120
|
}, {
|
|
121
121
|
e: void 0,
|
|
@@ -1,117 +1,118 @@
|
|
|
1
|
-
import { createSignal as u, createEffect as p, createMemo as
|
|
2
|
-
import { createSimpleContext as
|
|
3
|
-
import { useResolvedFloeConfig as
|
|
4
|
-
import { isFloeSurfaceStyle as
|
|
5
|
-
import { normalizeShellThemeSelection as
|
|
6
|
-
function S(s,
|
|
7
|
-
if (
|
|
8
|
-
return s &&
|
|
1
|
+
import { createSignal as u, createEffect as p, createMemo as z, onCleanup as O } from "solid-js";
|
|
2
|
+
import { createSimpleContext as ee } from "./createSimpleContext.js";
|
|
3
|
+
import { useResolvedFloeConfig as te } from "./FloeConfigContext.js";
|
|
4
|
+
import { isFloeSurfaceStyle as b, applySurfaceStyleAttribute as Q, isThemeType as se, getSystemTheme as re, applyTheme as oe, applyShellThemeAttribute as R, syncThemeTokenOverrides as V, resolveThemeTokens as ne } from "../styles/themes/index.js";
|
|
5
|
+
import { normalizeShellThemeSelection as j, presetSupportsMode as B } from "../styles/themes/presets.js";
|
|
6
|
+
function S(s, o, l) {
|
|
7
|
+
if (o.length !== 0)
|
|
8
|
+
return s && o.some((m) => m.name === s) ? s : l && o.some((m) => m.name === l) ? l : o[0]?.name;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
const s =
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
function ce() {
|
|
11
|
+
const s = te(), o = () => s.config.theme.storageKey, l = () => s.config.theme.defaultTheme, m = () => s.config.theme.surfaceStyleStorageKey ?? `${o()}-surface-style`, T = "soft-neumorphic", y = s.persist.load(m(), T);
|
|
12
|
+
b(y) || s.persist.remove(m());
|
|
13
|
+
const [w, D] = u(b(y) ? y : T), G = (e) => {
|
|
14
|
+
D(b(e) ? e : T);
|
|
14
15
|
};
|
|
15
|
-
p(() =>
|
|
16
|
-
const
|
|
16
|
+
p(() => Q(w()));
|
|
17
|
+
const H = () => s.config.theme.tokens, c = () => s.config.theme.presets ?? [], v = () => s.config.theme.presetStorageKey ?? `${o()}-preset`, a = () => S(s.config.theme.defaultPreset, c()), h = () => s.config.theme.shellPresets ?? [], M = () => s.config.theme.shellPresetStorageKey ?? `${o()}-shell-preset`, $ = () => s.config.theme.defaultShellPreset ?? {}, C = s.persist.load(o(), l()), I = se(C) ? C : l(), [P, J] = u(I), U = s.persist.load(v(), a()), [k, E] = u(S(U, c(), a())), W = s.persist.load(M(), void 0), [K, A] = u(j(W, h(), $())), [X, Y] = u(re());
|
|
17
18
|
let g = [];
|
|
18
|
-
const
|
|
19
|
-
const e = S(
|
|
19
|
+
const F = z(() => {
|
|
20
|
+
const e = S(k(), c(), a());
|
|
20
21
|
if (e)
|
|
21
22
|
return c().find((t) => t.name === e);
|
|
22
23
|
}), f = () => {
|
|
23
|
-
const e =
|
|
24
|
-
return e === "system" ?
|
|
25
|
-
},
|
|
26
|
-
const t =
|
|
24
|
+
const e = P();
|
|
25
|
+
return e === "system" ? X() : e;
|
|
26
|
+
}, N = (e) => {
|
|
27
|
+
const t = K()[e];
|
|
27
28
|
if (t)
|
|
28
|
-
return
|
|
29
|
-
},
|
|
29
|
+
return h().find((r) => r.name === t && B(r, e));
|
|
30
|
+
}, L = z(() => N(f()));
|
|
30
31
|
if (p(() => {
|
|
31
|
-
const e = S(
|
|
32
|
-
|
|
32
|
+
const e = S(k(), c(), a());
|
|
33
|
+
k() !== e && E(e);
|
|
33
34
|
}), p(() => {
|
|
34
|
-
const e =
|
|
35
|
-
(e.light !== t.light || e.dark !== t.dark) &&
|
|
35
|
+
const e = K(), t = j(e, h(), $());
|
|
36
|
+
(e.light !== t.light || e.dark !== t.dark) && A(t);
|
|
36
37
|
}), typeof window < "u") {
|
|
37
|
-
const e = window.matchMedia("(prefers-color-scheme: dark)"), t = (
|
|
38
|
-
|
|
38
|
+
const e = window.matchMedia("(prefers-color-scheme: dark)"), t = (r) => {
|
|
39
|
+
Y(r.matches ? "dark" : "light");
|
|
39
40
|
};
|
|
40
|
-
e.addEventListener("change", t),
|
|
41
|
+
e.addEventListener("change", t), O(() => e.removeEventListener("change", t));
|
|
41
42
|
}
|
|
42
43
|
p(() => {
|
|
43
|
-
const e =
|
|
44
|
-
oe(e),
|
|
44
|
+
const e = P(), t = f(), r = L();
|
|
45
|
+
oe(e), R(r?.name), g = V(ne(t, H(), r?.tokens, F()?.tokens), g), typeof document < "u" && queueMicrotask(() => {
|
|
45
46
|
const i = /* @__PURE__ */ new Set();
|
|
46
47
|
for (; ; ) {
|
|
47
48
|
const d = (document.documentElement.getAnimations?.({
|
|
48
49
|
subtree: !0
|
|
49
|
-
}) ?? []).filter((
|
|
50
|
+
}) ?? []).filter((n) => !i.has(n) && "transitionProperty" in n && /(^|-)color$|^(fill|stroke|box-shadow)$/.test(String(n.transitionProperty)));
|
|
50
51
|
if (d.length === 0) break;
|
|
51
|
-
for (const
|
|
52
|
-
i.add(
|
|
52
|
+
for (const n of d)
|
|
53
|
+
i.add(n), n.finish();
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
|
-
}),
|
|
56
|
-
|
|
56
|
+
}), O(() => {
|
|
57
|
+
Q(void 0), R(void 0), g = V(void 0, g);
|
|
57
58
|
});
|
|
58
59
|
const x = (e) => {
|
|
59
|
-
|
|
60
|
-
},
|
|
60
|
+
J(e), s.persist.debouncedSave(o(), e);
|
|
61
|
+
}, Z = () => {
|
|
61
62
|
const e = f();
|
|
62
63
|
x(e === "light" ? "dark" : "light");
|
|
63
|
-
},
|
|
64
|
-
const t = S(e, c(),
|
|
65
|
-
if (
|
|
66
|
-
s.persist.remove(
|
|
64
|
+
}, _ = (e) => {
|
|
65
|
+
const t = S(e, c(), a());
|
|
66
|
+
if (E(t), !t) {
|
|
67
|
+
s.persist.remove(v());
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
|
-
s.persist.debouncedSave(
|
|
70
|
-
},
|
|
71
|
-
const
|
|
72
|
-
if (!
|
|
73
|
-
const i =
|
|
74
|
-
if (i[e] ===
|
|
70
|
+
s.persist.debouncedSave(v(), t);
|
|
71
|
+
}, q = (e, t) => {
|
|
72
|
+
const r = h().find((n) => n.name === t && B(n, e));
|
|
73
|
+
if (!r) return !1;
|
|
74
|
+
const i = K();
|
|
75
|
+
if (i[e] === r.name) return !0;
|
|
75
76
|
const d = {
|
|
76
77
|
...i,
|
|
77
78
|
version: 1,
|
|
78
|
-
[e]:
|
|
79
|
+
[e]: r.name
|
|
79
80
|
};
|
|
80
|
-
return
|
|
81
|
+
return A(d), s.persist.debouncedSave(M(), d), !0;
|
|
81
82
|
};
|
|
82
83
|
return {
|
|
83
|
-
surfaceStyle:
|
|
84
|
-
setSurfaceStyle:
|
|
85
|
-
theme:
|
|
84
|
+
surfaceStyle: w,
|
|
85
|
+
setSurfaceStyle: G,
|
|
86
|
+
theme: P,
|
|
86
87
|
resolvedTheme: f,
|
|
87
88
|
setTheme: x,
|
|
88
|
-
toggleTheme:
|
|
89
|
+
toggleTheme: Z,
|
|
89
90
|
themePresets: c,
|
|
90
|
-
themePreset:
|
|
91
|
-
setThemePreset:
|
|
92
|
-
shellPresets:
|
|
93
|
-
shellPreset:
|
|
94
|
-
shellPresetForMode:
|
|
91
|
+
themePreset: F,
|
|
92
|
+
setThemePreset: _,
|
|
93
|
+
shellPresets: h,
|
|
94
|
+
shellPreset: L,
|
|
95
|
+
shellPresetForMode: N,
|
|
95
96
|
setShellPreset: (e) => {
|
|
96
|
-
const t =
|
|
97
|
+
const t = h().find((i) => i.name === e);
|
|
97
98
|
if (!t) return;
|
|
98
|
-
const
|
|
99
|
-
|
|
99
|
+
const r = t.mode === "light" || t.mode === "dark" ? t.mode : f();
|
|
100
|
+
q(r, e);
|
|
100
101
|
},
|
|
101
102
|
selectShellTheme: (e, t) => {
|
|
102
|
-
|
|
103
|
+
q(e, t) && x(e);
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
106
|
}
|
|
106
107
|
const {
|
|
107
|
-
Provider:
|
|
108
|
-
use:
|
|
109
|
-
} =
|
|
108
|
+
Provider: ue,
|
|
109
|
+
use: Se
|
|
110
|
+
} = ee({
|
|
110
111
|
name: "Theme",
|
|
111
|
-
init:
|
|
112
|
+
init: ce
|
|
112
113
|
});
|
|
113
114
|
export {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
ue as ThemeProvider,
|
|
116
|
+
ce as createThemeService,
|
|
117
|
+
Se as useTheme
|
|
117
118
|
};
|
package/dist/context/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { ThemeProvider, useTheme, createThemeService, type ThemeContextValue } f
|
|
|
4
4
|
export { LayoutProvider, useLayout, useMobileLayout, createLayoutService, type LayoutContextValue } from './LayoutContext';
|
|
5
5
|
export { CommandProvider, useCommand, createCommandService, type Command, type CommandContextValue } from './CommandContext';
|
|
6
6
|
export { NotificationProvider, useNotification, createNotificationService, NotificationContainer, type Notification, type NotificationType, type NotificationContextValue, } from './NotificationContext';
|
|
7
|
-
export { ComponentRegistryProvider, useComponentRegistry, useOptionalComponentRegistry, hasComponentRegistryContext, useComponentContextFactory, createComponentRegistry, type FloeComponent, type ComponentContext, type CommandContribution, type
|
|
7
|
+
export { ComponentRegistryProvider, useComponentRegistry, useOptionalComponentRegistry, hasComponentRegistryContext, useComponentContextFactory, createComponentRegistry, type FloeComponent, type ComponentContext, type CommandContribution, type ComponentRegistryValue, } from './ComponentRegistry';
|
|
8
8
|
export { WidgetRegistryProvider, useWidgetRegistry, createWidgetRegistry, type WidgetDefinition, type WidgetProps, type WidgetRegistryValue, } from './WidgetRegistry';
|
|
9
9
|
export { DeckProvider, useDeck, createDeckService, type DeckWidget, type DeckLayout, type DragState, type ResizeState, type DeckContextValue, } from './DeckContext';
|
|
10
10
|
export { WidgetStateProvider, useWidgetStateContext, useWidgetState, useCurrentWidgetId, type WidgetStateContextValue, type WidgetStateProviderProps, } from './WidgetStateContext';
|
package/dist/display-mode.css
CHANGED
|
@@ -14,51 +14,8 @@
|
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
align-items: center;
|
|
20
|
-
gap: 1px;
|
|
21
|
-
padding: 2px;
|
|
22
|
-
border: 1px solid color-mix(in srgb, var(--border, #e5e5e5) 60%, transparent);
|
|
23
|
-
border-radius: 8px;
|
|
24
|
-
background: color-mix(in srgb, var(--muted, #f1f1f1) 70%, transparent);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.display-mode-switcher__pill {
|
|
28
|
-
position: relative;
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
gap: 5px;
|
|
32
|
-
padding: 4px 9px;
|
|
33
|
-
border: none;
|
|
34
|
-
border-radius: 6px;
|
|
35
|
-
background: transparent;
|
|
36
|
-
color: var(--muted-foreground, #888);
|
|
37
|
-
font-size: 11px;
|
|
38
|
-
font-weight: 600;
|
|
39
|
-
letter-spacing: -0.005em;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
isolation: isolate;
|
|
42
|
-
transition: color 140ms ease;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.display-mode-switcher__pill:hover,
|
|
46
|
-
.display-mode-switcher__pill.is-active {
|
|
47
|
-
color: var(--foreground, #111);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.display-mode-switcher__pill-bg {
|
|
51
|
-
position: absolute;
|
|
52
|
-
inset: 0;
|
|
53
|
-
z-index: -1;
|
|
54
|
-
border: 1px solid color-mix(in srgb, var(--border, #e5e5e5) 70%, transparent);
|
|
55
|
-
border-radius: 6px;
|
|
56
|
-
background: var(--card, #fff);
|
|
57
|
-
box-shadow:
|
|
58
|
-
0 1px 2px color-mix(in srgb, var(--foreground, #000) 6%, transparent),
|
|
59
|
-
0 1px 0 color-mix(in srgb, white 60%, transparent) inset;
|
|
60
|
-
}
|
|
61
|
-
|
|
17
|
+
/* The switcher's geometry, fill and radius come from the shared rail and
|
|
18
|
+
* raised surfaces; this file only keeps what is specific to the mode set. */
|
|
62
19
|
.display-mode-switcher__icon {
|
|
63
20
|
width: 12px;
|
|
64
21
|
height: 12px;
|