@floegence/floe-webapp-core 0.86.62 → 0.86.64

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.
Files changed (33) hide show
  1. package/dist/app/FloeRegistryContributions.js +0 -3
  2. package/dist/components/icons/ActivityRailIcons.d.ts +30 -0
  3. package/dist/components/icons/ActivityRailIcons.js +68 -0
  4. package/dist/components/icons/index.d.ts +1 -0
  5. package/dist/components/layout/ActivityBar.js +55 -54
  6. package/dist/components/layout/DisplayModeSwitcher.d.ts +10 -0
  7. package/dist/components/layout/DisplayModeSwitcher.js +102 -33
  8. package/dist/components/layout/Shell.d.ts +0 -6
  9. package/dist/components/layout/Shell.js +212 -258
  10. package/dist/components/layout/ThemeToggle.d.ts +19 -0
  11. package/dist/components/layout/ThemeToggle.js +39 -0
  12. package/dist/components/layout/index.d.ts +1 -1
  13. package/dist/components/ui/Button.js +22 -14
  14. package/dist/components/ui/Dialog.js +101 -95
  15. package/dist/components/ui/Tabs.js +172 -159
  16. package/dist/components/ui/dialogHeightMotion.d.ts +9 -0
  17. package/dist/components/ui/dialogHeightMotion.js +49 -0
  18. package/dist/components/ui/index.d.ts +1 -0
  19. package/dist/context/ComponentRegistry.d.ts +0 -8
  20. package/dist/context/ComponentRegistry.js +61 -67
  21. package/dist/context/FloeConfigContext.d.ts +0 -6
  22. package/dist/context/FloeConfigContext.js +9 -15
  23. package/dist/context/index.d.ts +1 -1
  24. package/dist/display-mode.css +2 -45
  25. package/dist/full.js +693 -683
  26. package/dist/icons.js +112 -102
  27. package/dist/layout.js +33 -35
  28. package/dist/styles.css +1 -1
  29. package/dist/surface.css +53 -1
  30. package/dist/ui.js +33 -31
  31. package/package.json +1 -1
  32. package/dist/components/layout/BottomBar.d.ts +0 -29
  33. 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 v } from "./LayoutContext.js";
6
- import { useCommand as b } from "./CommandContext.js";
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 D() {
27
- const r = x(), i = v(), n = b(), a = R(), m = w();
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: B
41
- }), G = f.Provider;
42
- function H() {
40
+ init: k
41
+ }), D = f.Provider;
42
+ function G() {
43
43
  return f.use();
44
44
  }
45
- function J() {
45
+ function H() {
46
46
  return f.useOptional();
47
47
  }
48
- function K() {
48
+ function J() {
49
49
  return f.has();
50
50
  }
51
- function B() {
52
- const [r, i] = C(/* @__PURE__ */ new Map()), [n, a] = C(/* @__PURE__ */ new Set()), m = /* @__PURE__ */ new Map(), l = (t) => {
53
- i((e) => new Map(e).set(t.id, t));
54
- }, p = (t) => {
55
- const e = t.map((o) => o.id).filter((o) => !!o);
56
- return i((o) => {
57
- const c = new Map(o);
58
- return t.forEach((u) => c.set(u.id, u)), c;
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
- e.forEach((o) => {
61
- y(o);
60
+ o.forEach((t) => {
61
+ y(t);
62
62
  });
63
63
  };
64
- }, d = async (t, e) => {
65
- const o = r().get(t);
66
- if (!o || n().has(t)) return;
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 (o.commands?.length) {
70
- const u = o.commands.map((s) => ({
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(e)
78
+ execute: () => s.execute(o)
79
79
  }));
80
- c.push(e.commands.registerAll(u));
80
+ c.push(o.commands.registerAll(u));
81
81
  }
82
- await o.onMount?.(e), c.length && m.set(t, () => c.forEach((u) => u())), a((u) => {
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(t), s;
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 (t) => {
90
- const e = r().get(t);
91
- if (e && n().has(t))
89
+ }, g = async (e) => {
90
+ const o = r().get(e);
91
+ if (o && n().has(e))
92
92
  try {
93
- await e.onUnmount?.();
93
+ await o.onUnmount?.();
94
94
  } finally {
95
- m.get(t)?.(), m.delete(t), a((o) => {
96
- const c = new Set(o);
97
- return c.delete(t), c;
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 (t) => {
101
- await g(t), i((e) => {
102
- const o = new Map(e);
103
- return o.delete(t), o;
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 (t) => {
113
- for (const e of r().keys())
114
- await d(e, t(e));
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 t of n())
118
- await g(t);
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 t = [];
124
- for (const e of r().values())
125
- e.sidebar && t.push({
126
- ...e,
127
- order: e.sidebar.order ?? 100
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 t.sort((e, o) => e.order - o.order);
129
+ return e.sort((o, t) => o.order - t.order);
130
130
  },
131
131
  allCommands: () => {
132
- const t = [];
133
- for (const e of r().values())
134
- e.commands && t.push(...e.commands);
135
- return t;
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: (t) => r().get(t)
137
+ getComponent: (e) => r().get(e)
144
138
  };
145
139
  }
146
140
  export {
147
- G as ComponentRegistryProvider,
148
- B as createComponentRegistry,
149
- K as hasComponentRegistryContext,
150
- D as useComponentContextFactory,
151
- H as useComponentRegistry,
152
- J as useOptionalComponentRegistry
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 C } from "solid-js/web";
2
- import { createContext as L, createMemo as u, createEffect as S, onCleanup as F, useContext as v } from "solid-js";
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 I() {
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 ?? I(), c = e.namespace ? `${e.namespace}-` : "", r = (o) => `${c}${o}`, n = () => e.enabled && !!t, i = /* @__PURE__ */ new Map(), d = () => {
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 k(e) {
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 = L();
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 ? k(n) : () => {
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 C(y.Provider, {
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
- k as installPersistFlushListeners,
243
+ I as installPersistFlushListeners,
250
244
  O as useFloeConfig,
251
245
  D as useResolvedFloeConfig
252
246
  };
@@ -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 StatusBarContribution, type ComponentRegistryValue, } from './ComponentRegistry';
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';
@@ -14,51 +14,8 @@
14
14
  overflow: hidden;
15
15
  }
16
16
 
17
- .display-mode-switcher {
18
- display: inline-flex;
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;