@floegence/floe-webapp-core 0.86.62 → 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/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/layout/ActivityBar.js +55 -54
- package/dist/components/layout/DisplayModeSwitcher.d.ts +10 -0
- package/dist/components/layout/DisplayModeSwitcher.js +102 -33
- package/dist/components/layout/Shell.d.ts +0 -6
- package/dist/components/layout/Shell.js +212 -258
- package/dist/components/layout/ThemeToggle.d.ts +19 -0
- package/dist/components/layout/ThemeToggle.js +39 -0
- package/dist/components/layout/index.d.ts +1 -1
- package/dist/components/ui/Button.js +22 -14
- package/dist/components/ui/Tabs.js +172 -159
- 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/index.d.ts +1 -1
- package/dist/display-mode.css +2 -45
- package/dist/full.js +681 -673
- package/dist/icons.js +112 -102
- package/dist/layout.js +33 -35
- package/dist/styles.css +1 -1
- package/dist/surface.css +53 -1
- 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
|
};
|
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;
|