@floegence/floe-webapp-core 0.78.10 → 0.79.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.
- package/dist/components/layout/Shell.d.ts +2 -0
- package/dist/components/layout/Shell.js +262 -195
- package/dist/components/notes/notesOverlayHelpers.d.ts +0 -1
- package/dist/components/notes/notesOverlayHelpers.js +26 -27
- package/dist/components/notes/useNotesOverlayModel.js +196 -201
- package/dist/components/ui/Dialog.d.ts +2 -0
- package/dist/components/ui/Dialog.js +78 -74
- package/dist/components/ui/FloatingWindow.js +86 -85
- package/dist/context/LayoutContext.d.ts +2 -0
- package/dist/context/LayoutContext.js +43 -30
- package/dist/context/index.d.ts +1 -1
- package/dist/floe.css +10 -0
- package/dist/full.js +333 -328
- package/dist/hooks/createAdaptiveSidebar.d.ts +12 -0
- package/dist/hooks/createAdaptiveSidebar.js +12 -0
- package/dist/hooks/createRetainedContent.d.ts +7 -0
- package/dist/hooks/createRetainedContent.js +15 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -4
- package/dist/hooks/useMediaQuery.js +12 -11
- package/dist/index.js +100 -95
- package/dist/styles.css +1 -1
- package/dist/widgets/TerminalWidget.js +71 -72
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Accessor } from 'solid-js';
|
|
2
|
+
export type AdaptiveSidebarPresentation = 'inline' | 'overlay';
|
|
3
|
+
export interface AdaptiveSidebarOptions {
|
|
4
|
+
/** Stable layout region shared by the sidebar and main content. */
|
|
5
|
+
container: Accessor<HTMLElement | null | undefined>;
|
|
6
|
+
/** Preferred inline width, including separators. Never mutated by this policy. */
|
|
7
|
+
sidebarWidth: Accessor<number>;
|
|
8
|
+
/** Space reserved for the main content in local CSS pixels. */
|
|
9
|
+
minContentWidth: Accessor<number>;
|
|
10
|
+
}
|
|
11
|
+
/** Space allocation only; the host retains navigation, disclosure and persistence. */
|
|
12
|
+
export declare function createAdaptiveSidebar(options: AdaptiveSidebarOptions): Accessor<AdaptiveSidebarPresentation>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createMemo as n } from "solid-js";
|
|
2
|
+
import { useResizeObserver as i } from "./useResizeObserver.js";
|
|
3
|
+
function d(e) {
|
|
4
|
+
const t = i(e.container, { preserveWhenHidden: !0 });
|
|
5
|
+
return n(() => {
|
|
6
|
+
const r = t();
|
|
7
|
+
return r && r.width < e.sidebarWidth() + e.minContentWidth() ? "overlay" : "inline";
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
d as createAdaptiveSidebar
|
|
12
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Component, type JSX } from 'solid-js';
|
|
2
|
+
/**
|
|
3
|
+
* Create content once under its owner's lifetime, then mount it in one location
|
|
4
|
+
* at a time. Placement changes preserve native scroll offsets as well as nodes.
|
|
5
|
+
* Disclosure, focus, and business state remain owned by the caller.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createRetainedContent(render: () => JSX.Element): Component;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { children as c, onMount as f, onCleanup as s } from "solid-js";
|
|
2
|
+
function i(l) {
|
|
3
|
+
const r = c(l);
|
|
4
|
+
let e = [];
|
|
5
|
+
return () => (f(() => {
|
|
6
|
+
for (const { element: t, left: o, top: n } of e)
|
|
7
|
+
t.scrollLeft = o, t.scrollTop = n;
|
|
8
|
+
}), s(() => {
|
|
9
|
+
if (typeof HTMLElement > "u") return;
|
|
10
|
+
e = r.toArray().filter((o) => o instanceof HTMLElement).flatMap((o) => [o, ...o.querySelectorAll("*")]).filter((o) => o.scrollTop !== 0 || o.scrollLeft !== 0).map((o) => ({ element: o, left: o.scrollLeft, top: o.scrollTop }));
|
|
11
|
+
}), r());
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
i as createRetainedContent
|
|
15
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ export { useMediaQuery } from './useMediaQuery';
|
|
|
2
2
|
export { useDebounce } from './useDebounce';
|
|
3
3
|
export { useCommandContributions, registerCommandContributions, type CommandContributionsInput } from './useCommandContributions';
|
|
4
4
|
export { useResizeObserver, type Size } from './useResizeObserver';
|
|
5
|
+
export { createAdaptiveSidebar, type AdaptiveSidebarOptions, type AdaptiveSidebarPresentation } from './createAdaptiveSidebar';
|
|
5
6
|
export { useKeybind } from './useKeybind';
|
|
6
7
|
export { usePersisted } from './usePersisted';
|
|
7
8
|
export { useDeckDrag } from './useDeckDrag';
|
|
8
9
|
export { useFileBrowserItemDrag, useFileBrowserDropTarget, type UseFileBrowserItemDragOptions, type FileBrowserItemDragHandlers, type UseFileBrowserDropTargetOptions, type FileBrowserDropTargetResult, } from './useFileBrowserDrag';
|
|
10
|
+
export { createRetainedContent } from './createRetainedContent';
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { type Accessor } from 'solid-js';
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export declare function useMediaQuery(query: string): Accessor<boolean>;
|
|
2
|
+
/** Observe a query synchronously, including reactive configuration changes. */
|
|
3
|
+
export declare function useMediaQuery(query: string | Accessor<string>): Accessor<boolean>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { createSignal as
|
|
2
|
-
function
|
|
3
|
-
const [o,
|
|
4
|
-
|
|
1
|
+
import { createSignal as s, createEffect as r, onCleanup as f } from "solid-js";
|
|
2
|
+
function m(e) {
|
|
3
|
+
const t = () => typeof e == "function" ? e() : e, [o, a] = s(
|
|
4
|
+
typeof window < "u" && window.matchMedia(t()).matches
|
|
5
|
+
);
|
|
6
|
+
return r(() => {
|
|
7
|
+
const i = t();
|
|
5
8
|
if (typeof window > "u") return;
|
|
6
|
-
const
|
|
7
|
-
n
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
e.addEventListener("change", t), s(() => e.removeEventListener("change", t));
|
|
9
|
+
const n = window.matchMedia(i);
|
|
10
|
+
a(n.matches);
|
|
11
|
+
const c = (d) => a(d.matches);
|
|
12
|
+
n.addEventListener("change", c), f(() => n.removeEventListener("change", c));
|
|
12
13
|
}), o;
|
|
13
14
|
}
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
+
m as useMediaQuery
|
|
16
17
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FloeProvider as r } from "./app/FloeProvider.js";
|
|
2
2
|
import { applyShellThemeAttribute as i, applySurfaceStyleAttribute as s, applyTheme as n, builtInThemes as a, getSystemTheme as m, isFloeSurfaceStyle as l, isThemeType as p, mergeThemeTokenMaps as f, resolveThemeTokenOverrides as d, resolveThemeTokens as T, syncThemeTokenOverrides as c } from "./styles/themes/index.js";
|
|
3
|
-
import { floeColorTokenCategories as
|
|
3
|
+
import { floeColorTokenCategories as x, floeDesignTokens as g, floeFontFamilyTokens as y, floeMotionTokens as C, floeRadiusTokens as S, floeSharedCssVariables as h, floeSpacingTokens as F, floeSurfaceTokens as v, floeThemeColorVariables as P, floeTypographyTokens as R, getFloeColorTokenValue as k } from "./styles/tokens.js";
|
|
4
4
|
import { BUILT_IN_SHELL_THEME_DEFAULTS as D, REQUIRED_SHELL_THEME_TOKENS as E, assertUniqueThemePresetNames as b, builtInShellThemePresets as L, createShellThemePreset as _, getShellThemePresetsForMode as A, normalizeShellThemeSelection as N, presetSupportsMode as O, resolveShellThemePresetName as M } from "./styles/themes/presets.js";
|
|
5
5
|
import { CommandProvider as U, createCommandService as w, useCommand as G } from "./context/CommandContext.js";
|
|
6
6
|
import { ComponentRegistryProvider as W, createComponentRegistry as K, hasComponentRegistryContext as V, useComponentContextFactory as z, useComponentRegistry as Q, useOptionalComponentRegistry as q } from "./context/ComponentRegistry.js";
|
|
@@ -8,32 +8,34 @@ import { DEFAULT_FLOE_CONFIG as j, FloeConfigProvider as J, useFloeConfig as X,
|
|
|
8
8
|
import { DeckProvider as ee, createDeckService as oe, useDeck as re } from "./context/DeckContext.js";
|
|
9
9
|
import { FLOE_GEOMETRY_SURFACE_ATTR as ie, FLOE_HOT_INTERACTION_ATTR as se, startHotInteraction as ne } from "./utils/hotInteraction.js";
|
|
10
10
|
import { FileBrowserDragProvider as me, hasFileBrowserDragContext as le, useFileBrowserDrag as pe } from "./context/FileBrowserDragContext.js";
|
|
11
|
-
import { LayoutProvider as de, createLayoutService as Te, useLayout as ce } from "./context/LayoutContext.js";
|
|
12
|
-
import { NotificationContainer as ge, NotificationProvider as
|
|
13
|
-
import { ThemeProvider as
|
|
11
|
+
import { LayoutProvider as de, createLayoutService as Te, useLayout as ce, useMobileLayout as ue } from "./context/LayoutContext.js";
|
|
12
|
+
import { NotificationContainer as ge, NotificationProvider as ye, createNotificationService as Ce, useNotification as Se } from "./context/NotificationContext.js";
|
|
13
|
+
import { ThemeProvider as Fe, createThemeService as ve, useTheme as Pe } from "./context/ThemeContext.js";
|
|
14
14
|
import { ViewActivationProvider as ke, useViewActivation as Ie } from "./context/ViewActivationContext.js";
|
|
15
|
-
import { WidgetRegistryProvider as
|
|
16
|
-
import { WidgetStateProvider as
|
|
17
|
-
import { applyDragDelta as
|
|
18
|
-
import { calculateFitScale as
|
|
19
|
-
import { checkCollision as
|
|
20
|
-
import { cn as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
15
|
+
import { WidgetRegistryProvider as Ee, createWidgetRegistry as be, useWidgetRegistry as Le } from "./context/WidgetRegistry.js";
|
|
16
|
+
import { WidgetStateProvider as Ae, useCurrentWidgetId as Ne, useWidgetState as Oe, useWidgetStateContext as Me } from "./context/WidgetStateContext.js";
|
|
17
|
+
import { applyDragDelta as Ue, applyResizeDelta as we, getGridCellSize as Ge, pixelDeltaToGridDelta as He, positionToGridArea as We, snapToGrid as Ke } from "./utils/gridLayout.js";
|
|
18
|
+
import { calculateFitScale as ze } from "./utils/fitScale.js";
|
|
19
|
+
import { checkCollision as qe, constrainPosition as Ye, findFreePosition as je, hasCollision as Je, sameGridPosition as Xe } from "./utils/gridCollision.js";
|
|
20
|
+
import { cn as $e } from "./utils/cn.js";
|
|
21
|
+
import { createAdaptiveSidebar as oo } from "./hooks/createAdaptiveSidebar.js";
|
|
22
|
+
import { createRetainedContent as to } from "./hooks/createRetainedContent.js";
|
|
23
|
+
import { createSimpleContext as so } from "./context/createSimpleContext.js";
|
|
24
|
+
import { createUIFirstSelection as ao } from "./utils/uiFirstSelection.js";
|
|
25
|
+
import { deferAfterPaint as lo, deferNonBlocking as po } from "./utils/defer.js";
|
|
26
|
+
import { duration as To, easing as co, fadeIn as uo, listContainer as xo, listItem as go, panelResize as yo, popIn as Co, scaleIn as So, sidebarVariants as ho, slideInFromBottom as Fo, slideInFromLeft as vo, slideInFromRight as Po, slideInFromTop as Ro, springConfig as ko } from "./utils/animations.js";
|
|
27
|
+
import { formatKeybind as Do, isMacLikePlatform as Eo, isPrimaryModKeyPressed as bo, matchKeybind as Lo, parseKeybind as _o } from "./utils/keybind.js";
|
|
28
|
+
import { isTypingElement as No, shouldIgnoreHotkeys as Oo } from "./utils/dom.js";
|
|
29
|
+
import { lockBodyStyle as Bo } from "./utils/bodyStyleLock.js";
|
|
30
|
+
import { registerCommandContributions as wo, useCommandContributions as Go } from "./hooks/useCommandContributions.js";
|
|
31
|
+
import { secureRandomUUID as Wo } from "./utils/secureRandom.js";
|
|
32
|
+
import { useDebounce as Vo } from "./hooks/useDebounce.js";
|
|
33
|
+
import { useDeckDrag as Qo } from "./hooks/useDeckDrag.js";
|
|
34
|
+
import { useFileBrowserDropTarget as Yo, useFileBrowserItemDrag as jo } from "./hooks/useFileBrowserDrag.js";
|
|
35
|
+
import { useKeybind as Xo } from "./hooks/useKeybind.js";
|
|
36
|
+
import { useMediaQuery as $o } from "./hooks/useMediaQuery.js";
|
|
37
|
+
import { usePersisted as or } from "./hooks/usePersisted.js";
|
|
38
|
+
import { useResizeObserver as tr } from "./hooks/useResizeObserver.js";
|
|
37
39
|
export {
|
|
38
40
|
D as BUILT_IN_SHELL_THEME_DEFAULTS,
|
|
39
41
|
U as CommandProvider,
|
|
@@ -47,115 +49,118 @@ export {
|
|
|
47
49
|
r as FloeProvider,
|
|
48
50
|
de as LayoutProvider,
|
|
49
51
|
ge as NotificationContainer,
|
|
50
|
-
|
|
52
|
+
ye as NotificationProvider,
|
|
51
53
|
E as REQUIRED_SHELL_THEME_TOKENS,
|
|
52
|
-
|
|
54
|
+
Fe as ThemeProvider,
|
|
53
55
|
ke as ViewActivationProvider,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
Ee as WidgetRegistryProvider,
|
|
57
|
+
Ae as WidgetStateProvider,
|
|
58
|
+
Ue as applyDragDelta,
|
|
59
|
+
we as applyResizeDelta,
|
|
58
60
|
i as applyShellThemeAttribute,
|
|
59
61
|
s as applySurfaceStyleAttribute,
|
|
60
62
|
n as applyTheme,
|
|
61
63
|
b as assertUniqueThemePresetNames,
|
|
62
64
|
L as builtInShellThemePresets,
|
|
63
65
|
a as builtInThemes,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
ze as calculateFitScale,
|
|
67
|
+
qe as checkCollision,
|
|
68
|
+
$e as cn,
|
|
69
|
+
Ye as constrainPosition,
|
|
70
|
+
oo as createAdaptiveSidebar,
|
|
68
71
|
w as createCommandService,
|
|
69
72
|
K as createComponentRegistry,
|
|
70
73
|
oe as createDeckService,
|
|
71
74
|
Te as createLayoutService,
|
|
72
|
-
|
|
75
|
+
Ce as createNotificationService,
|
|
76
|
+
to as createRetainedContent,
|
|
73
77
|
_ as createShellThemePreset,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
so as createSimpleContext,
|
|
79
|
+
ve as createThemeService,
|
|
80
|
+
ao as createUIFirstSelection,
|
|
81
|
+
be as createWidgetRegistry,
|
|
82
|
+
lo as deferAfterPaint,
|
|
83
|
+
po as deferNonBlocking,
|
|
84
|
+
To as duration,
|
|
85
|
+
co as easing,
|
|
86
|
+
uo as fadeIn,
|
|
87
|
+
je as findFreePosition,
|
|
88
|
+
x as floeColorTokenCategories,
|
|
89
|
+
g as floeDesignTokens,
|
|
86
90
|
y as floeFontFamilyTokens,
|
|
87
91
|
C as floeMotionTokens,
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
S as floeRadiusTokens,
|
|
93
|
+
h as floeSharedCssVariables,
|
|
90
94
|
F as floeSpacingTokens,
|
|
91
95
|
v as floeSurfaceTokens,
|
|
92
96
|
P as floeThemeColorVariables,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
R as floeTypographyTokens,
|
|
98
|
+
Do as formatKeybind,
|
|
99
|
+
k as getFloeColorTokenValue,
|
|
100
|
+
Ge as getGridCellSize,
|
|
97
101
|
A as getShellThemePresetsForMode,
|
|
98
102
|
m as getSystemTheme,
|
|
99
|
-
|
|
103
|
+
Je as hasCollision,
|
|
100
104
|
V as hasComponentRegistryContext,
|
|
101
105
|
le as hasFileBrowserDragContext,
|
|
102
106
|
l as isFloeSurfaceStyle,
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
Eo as isMacLikePlatform,
|
|
108
|
+
bo as isPrimaryModKeyPressed,
|
|
105
109
|
p as isThemeType,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
No as isTypingElement,
|
|
111
|
+
xo as listContainer,
|
|
112
|
+
go as listItem,
|
|
113
|
+
Bo as lockBodyStyle,
|
|
114
|
+
Lo as matchKeybind,
|
|
111
115
|
f as mergeThemeTokenMaps,
|
|
112
116
|
N as normalizeShellThemeSelection,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
yo as panelResize,
|
|
118
|
+
_o as parseKeybind,
|
|
119
|
+
He as pixelDeltaToGridDelta,
|
|
120
|
+
Co as popIn,
|
|
121
|
+
We as positionToGridArea,
|
|
118
122
|
O as presetSupportsMode,
|
|
119
|
-
|
|
123
|
+
wo as registerCommandContributions,
|
|
120
124
|
M as resolveShellThemePresetName,
|
|
121
125
|
d as resolveThemeTokenOverrides,
|
|
122
126
|
T as resolveThemeTokens,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
Xe as sameGridPosition,
|
|
128
|
+
So as scaleIn,
|
|
129
|
+
Wo as secureRandomUUID,
|
|
130
|
+
Oo as shouldIgnoreHotkeys,
|
|
131
|
+
ho as sidebarVariants,
|
|
132
|
+
Fo as slideInFromBottom,
|
|
133
|
+
vo as slideInFromLeft,
|
|
134
|
+
Po as slideInFromRight,
|
|
135
|
+
Ro as slideInFromTop,
|
|
136
|
+
Ke as snapToGrid,
|
|
137
|
+
ko as springConfig,
|
|
134
138
|
ne as startHotInteraction,
|
|
135
139
|
c as syncThemeTokenOverrides,
|
|
136
140
|
G as useCommand,
|
|
137
|
-
|
|
141
|
+
Go as useCommandContributions,
|
|
138
142
|
z as useComponentContextFactory,
|
|
139
143
|
Q as useComponentRegistry,
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
Ne as useCurrentWidgetId,
|
|
145
|
+
Vo as useDebounce,
|
|
142
146
|
re as useDeck,
|
|
143
|
-
|
|
147
|
+
Qo as useDeckDrag,
|
|
144
148
|
pe as useFileBrowserDrag,
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
Yo as useFileBrowserDropTarget,
|
|
150
|
+
jo as useFileBrowserItemDrag,
|
|
147
151
|
X as useFloeConfig,
|
|
148
|
-
|
|
152
|
+
Xo as useKeybind,
|
|
149
153
|
ce as useLayout,
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
$o as useMediaQuery,
|
|
155
|
+
ue as useMobileLayout,
|
|
156
|
+
Se as useNotification,
|
|
152
157
|
q as useOptionalComponentRegistry,
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
or as usePersisted,
|
|
159
|
+
tr as useResizeObserver,
|
|
155
160
|
Z as useResolvedFloeConfig,
|
|
156
|
-
|
|
161
|
+
Pe as useTheme,
|
|
157
162
|
Ie as useViewActivation,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
Le as useWidgetRegistry,
|
|
164
|
+
Oe as useWidgetState,
|
|
165
|
+
Me as useWidgetStateContext
|
|
161
166
|
};
|