@floegence/floe-webapp-core 0.78.10 → 0.79.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/layout/Shell.d.ts +2 -0
- package/dist/components/layout/Shell.js +268 -207
- 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 +331 -328
- package/dist/hooks/createAdaptiveSidebar.d.ts +12 -0
- package/dist/hooks/createAdaptiveSidebar.js +12 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -4
- package/dist/hooks/useMediaQuery.js +12 -11
- package/dist/index.js +102 -99
- 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
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ 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';
|
|
@@ -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
|
-
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
|
|
3
|
-
import { floeColorTokenCategories as
|
|
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 u } from "./styles/themes/index.js";
|
|
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 k, getFloeColorTokenValue as I } 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,33 @@ 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
|
|
14
|
-
import { ViewActivationProvider as
|
|
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 {
|
|
11
|
+
import { LayoutProvider as de, createLayoutService as Te, useLayout as ue, useMobileLayout as ce } 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
|
+
import { ViewActivationProvider as Ie, useViewActivation as Re } from "./context/ViewActivationContext.js";
|
|
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 { createSimpleContext as to } from "./context/createSimpleContext.js";
|
|
23
|
+
import { createUIFirstSelection as so } from "./utils/uiFirstSelection.js";
|
|
24
|
+
import { deferAfterPaint as ao, deferNonBlocking as mo } from "./utils/defer.js";
|
|
25
|
+
import { duration as po, easing as fo, fadeIn as To, listContainer as uo, listItem as co, panelResize as xo, popIn as go, scaleIn as yo, sidebarVariants as Co, slideInFromBottom as So, slideInFromLeft as ho, slideInFromRight as Fo, slideInFromTop as vo, springConfig as Po } from "./utils/animations.js";
|
|
26
|
+
import { formatKeybind as Io, isMacLikePlatform as Ro, isPrimaryModKeyPressed as Do, matchKeybind as Eo, parseKeybind as bo } from "./utils/keybind.js";
|
|
27
|
+
import { isTypingElement as _o, shouldIgnoreHotkeys as Ao } from "./utils/dom.js";
|
|
28
|
+
import { lockBodyStyle as Oo } from "./utils/bodyStyleLock.js";
|
|
29
|
+
import { registerCommandContributions as Bo, useCommandContributions as Uo } from "./hooks/useCommandContributions.js";
|
|
30
|
+
import { secureRandomUUID as Go } from "./utils/secureRandom.js";
|
|
31
|
+
import { useDebounce as Wo } from "./hooks/useDebounce.js";
|
|
32
|
+
import { useDeckDrag as Vo } from "./hooks/useDeckDrag.js";
|
|
33
|
+
import { useFileBrowserDropTarget as Qo, useFileBrowserItemDrag as qo } from "./hooks/useFileBrowserDrag.js";
|
|
34
|
+
import { useKeybind as jo } from "./hooks/useKeybind.js";
|
|
35
|
+
import { useMediaQuery as Xo } from "./hooks/useMediaQuery.js";
|
|
36
|
+
import { usePersisted as $o } from "./hooks/usePersisted.js";
|
|
37
|
+
import { useResizeObserver as or } from "./hooks/useResizeObserver.js";
|
|
37
38
|
export {
|
|
38
39
|
D as BUILT_IN_SHELL_THEME_DEFAULTS,
|
|
39
40
|
U as CommandProvider,
|
|
@@ -47,115 +48,117 @@ export {
|
|
|
47
48
|
r as FloeProvider,
|
|
48
49
|
de as LayoutProvider,
|
|
49
50
|
ge as NotificationContainer,
|
|
50
|
-
|
|
51
|
+
ye as NotificationProvider,
|
|
51
52
|
E as REQUIRED_SHELL_THEME_TOKENS,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
Fe as ThemeProvider,
|
|
54
|
+
Ie as ViewActivationProvider,
|
|
55
|
+
Ee as WidgetRegistryProvider,
|
|
56
|
+
Ae as WidgetStateProvider,
|
|
57
|
+
Ue as applyDragDelta,
|
|
58
|
+
we as applyResizeDelta,
|
|
58
59
|
i as applyShellThemeAttribute,
|
|
59
60
|
s as applySurfaceStyleAttribute,
|
|
60
61
|
n as applyTheme,
|
|
61
62
|
b as assertUniqueThemePresetNames,
|
|
62
63
|
L as builtInShellThemePresets,
|
|
63
64
|
a as builtInThemes,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
ze as calculateFitScale,
|
|
66
|
+
qe as checkCollision,
|
|
67
|
+
$e as cn,
|
|
68
|
+
Ye as constrainPosition,
|
|
69
|
+
oo as createAdaptiveSidebar,
|
|
68
70
|
w as createCommandService,
|
|
69
71
|
K as createComponentRegistry,
|
|
70
72
|
oe as createDeckService,
|
|
71
73
|
Te as createLayoutService,
|
|
72
|
-
|
|
74
|
+
Ce as createNotificationService,
|
|
73
75
|
_ as createShellThemePreset,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
to as createSimpleContext,
|
|
77
|
+
ve as createThemeService,
|
|
78
|
+
so as createUIFirstSelection,
|
|
79
|
+
be as createWidgetRegistry,
|
|
80
|
+
ao as deferAfterPaint,
|
|
81
|
+
mo as deferNonBlocking,
|
|
82
|
+
po as duration,
|
|
83
|
+
fo as easing,
|
|
84
|
+
To as fadeIn,
|
|
85
|
+
je as findFreePosition,
|
|
86
|
+
x as floeColorTokenCategories,
|
|
87
|
+
g as floeDesignTokens,
|
|
86
88
|
y as floeFontFamilyTokens,
|
|
87
89
|
C as floeMotionTokens,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
S as floeRadiusTokens,
|
|
91
|
+
h as floeSharedCssVariables,
|
|
90
92
|
F as floeSpacingTokens,
|
|
91
93
|
v as floeSurfaceTokens,
|
|
92
94
|
P as floeThemeColorVariables,
|
|
93
95
|
k as floeTypographyTokens,
|
|
94
|
-
|
|
96
|
+
Io as formatKeybind,
|
|
95
97
|
I as getFloeColorTokenValue,
|
|
96
|
-
|
|
98
|
+
Ge as getGridCellSize,
|
|
97
99
|
A as getShellThemePresetsForMode,
|
|
98
100
|
m as getSystemTheme,
|
|
99
|
-
|
|
101
|
+
Je as hasCollision,
|
|
100
102
|
V as hasComponentRegistryContext,
|
|
101
103
|
le as hasFileBrowserDragContext,
|
|
102
104
|
l as isFloeSurfaceStyle,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
Ro as isMacLikePlatform,
|
|
106
|
+
Do as isPrimaryModKeyPressed,
|
|
105
107
|
p as isThemeType,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
_o as isTypingElement,
|
|
109
|
+
uo as listContainer,
|
|
110
|
+
co as listItem,
|
|
111
|
+
Oo as lockBodyStyle,
|
|
112
|
+
Eo as matchKeybind,
|
|
111
113
|
f as mergeThemeTokenMaps,
|
|
112
114
|
N as normalizeShellThemeSelection,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
xo as panelResize,
|
|
116
|
+
bo as parseKeybind,
|
|
117
|
+
He as pixelDeltaToGridDelta,
|
|
118
|
+
go as popIn,
|
|
119
|
+
We as positionToGridArea,
|
|
118
120
|
O as presetSupportsMode,
|
|
119
|
-
|
|
121
|
+
Bo as registerCommandContributions,
|
|
120
122
|
M as resolveShellThemePresetName,
|
|
121
123
|
d as resolveThemeTokenOverrides,
|
|
122
124
|
T as resolveThemeTokens,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
125
|
+
Xe as sameGridPosition,
|
|
126
|
+
yo as scaleIn,
|
|
127
|
+
Go as secureRandomUUID,
|
|
128
|
+
Ao as shouldIgnoreHotkeys,
|
|
129
|
+
Co as sidebarVariants,
|
|
130
|
+
So as slideInFromBottom,
|
|
131
|
+
ho as slideInFromLeft,
|
|
132
|
+
Fo as slideInFromRight,
|
|
133
|
+
vo as slideInFromTop,
|
|
134
|
+
Ke as snapToGrid,
|
|
135
|
+
Po as springConfig,
|
|
134
136
|
ne as startHotInteraction,
|
|
135
|
-
|
|
137
|
+
u as syncThemeTokenOverrides,
|
|
136
138
|
G as useCommand,
|
|
137
|
-
|
|
139
|
+
Uo as useCommandContributions,
|
|
138
140
|
z as useComponentContextFactory,
|
|
139
141
|
Q as useComponentRegistry,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
Ne as useCurrentWidgetId,
|
|
143
|
+
Wo as useDebounce,
|
|
142
144
|
re as useDeck,
|
|
143
|
-
|
|
145
|
+
Vo as useDeckDrag,
|
|
144
146
|
pe as useFileBrowserDrag,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
Qo as useFileBrowserDropTarget,
|
|
148
|
+
qo as useFileBrowserItemDrag,
|
|
147
149
|
X as useFloeConfig,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
jo as useKeybind,
|
|
151
|
+
ue as useLayout,
|
|
152
|
+
Xo as useMediaQuery,
|
|
153
|
+
ce as useMobileLayout,
|
|
154
|
+
Se as useNotification,
|
|
152
155
|
q as useOptionalComponentRegistry,
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
$o as usePersisted,
|
|
157
|
+
or as useResizeObserver,
|
|
155
158
|
Z as useResolvedFloeConfig,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Pe as useTheme,
|
|
160
|
+
Re as useViewActivation,
|
|
161
|
+
Le as useWidgetRegistry,
|
|
162
|
+
Oe as useWidgetState,
|
|
163
|
+
Me as useWidgetStateContext
|
|
161
164
|
};
|