@floegence/floe-webapp-core 0.101.34 → 0.101.36

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/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { FloeProvider as r } from "./app/FloeProvider.js";
2
- import { applyShellThemeAttribute as i, applySurfaceStyleAttribute as s, applyTheme as a, builtInThemes as n, 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 R } from "./styles/tokens.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 c, syncThemeTokenOverrides as T } from "./styles/themes/index.js";
3
+ import { floeColorTokenCategories as x, floeDesignTokens as g, floeFontFamilyTokens as C, floeMotionTokens as y, floeRadiusTokens as S, floeSharedCssVariables as h, floeSpacingTokens as v, floeSurfaceTokens as F, floeThemeColorVariables as P, floeTypographyTokens as k, getFloeColorTokenValue as R } from "./styles/tokens.js";
4
4
  import { BUILT_IN_SHELL_THEME_DEFAULTS as D, REQUIRED_SHELL_THEME_TOKENS as E, assertUniqueThemePresetNames as L, builtInShellThemePresets as b, createShellThemePreset as _, getShellThemePresetsForMode as A, normalizeShellThemeSelection as M, presetSupportsMode as O, resolveShellThemePresetName as N } 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";
7
7
  import { DEFAULT_FLOE_CONFIG as j, FloeConfigProvider as J, useFloeConfig as X, useResolvedFloeConfig as Z } from "./context/FloeConfigContext.js";
8
8
  import { DeckProvider as ee, createDeckService as oe, useDeck as re } from "./context/DeckContext.js";
9
- import { FLOE_GEOMETRY_SURFACE_ATTR as ie, FLOE_HOT_INTERACTION_ATTR as se, startHotInteraction as ae } from "./utils/hotInteraction.js";
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 ue, useMobileLayout as ce } from "./context/LayoutContext.js";
12
- import { LocaleProvider as ge, defaultFloeMessages as ye, useFloeLocale as Ce } from "./context/LocaleContext.js";
13
- import { NotificationContainer as he, NotificationProvider as Fe, createNotificationService as ve, useNotification as Pe } from "./context/NotificationContext.js";
11
+ import { LayoutProvider as de, createLayoutService as ce, useLayout as Te, useMobileLayout as ue } from "./context/LayoutContext.js";
12
+ import { LocaleProvider as ge, defaultFloeMessages as Ce, useFloeLocale as ye } from "./context/LocaleContext.js";
13
+ import { NotificationContainer as he, NotificationProvider as ve, createNotificationService as Fe, useNotification as Pe } from "./context/NotificationContext.js";
14
14
  import { ThemeProvider as Re, createThemeService as Ie, useTheme as De } from "./context/ThemeContext.js";
15
15
  import { ViewActivationProvider as Le, useViewActivation as be } from "./context/ViewActivationContext.js";
16
16
  import { WidgetRegistryProvider as Ae, createWidgetRegistry as Me, useWidgetRegistry as Oe } from "./context/WidgetRegistry.js";
@@ -19,25 +19,26 @@ import { applyDragDelta as We, applyResizeDelta as Ke, getGridCellSize as Ve, pi
19
19
  import { calculateFitScale as je } from "./utils/fitScale.js";
20
20
  import { checkCollision as Xe, constrainPosition as Ze, findFreePosition as $e, hasCollision as eo, sameGridPosition as oo } from "./utils/gridCollision.js";
21
21
  import { cn as to } from "./utils/cn.js";
22
- import { createAdaptiveSidebar as so } from "./hooks/createAdaptiveSidebar.js";
23
- import { createRetainedContent as no } from "./hooks/createRetainedContent.js";
24
- import { createSimpleContext as lo } from "./context/createSimpleContext.js";
25
- import { createUIFirstSelection as fo } from "./utils/uiFirstSelection.js";
26
- import { deferAfterPaint as uo, deferNonBlocking as co } from "./utils/defer.js";
27
- import { duration as go, easing as yo, fadeIn as Co, listContainer as So, listItem as ho, panelResize as Fo, popIn as vo, scaleIn as Po, sidebarVariants as ko, slideInFromBottom as Ro, slideInFromLeft as Io, slideInFromRight as Do, slideInFromTop as Eo, springConfig as Lo } from "./utils/animations.js";
28
- import { formatKeybind as _o, isMacLikePlatform as Ao, isPrimaryModKeyPressed as Mo, matchKeybind as Oo, parseKeybind as No } from "./utils/keybind.js";
29
- import { isTypingElement as Uo, shouldIgnoreHotkeys as wo } from "./utils/dom.js";
30
- import { lockBodyStyle as Ho } from "./utils/bodyStyleLock.js";
31
- import { registerCommandContributions as Ko, useCommandContributions as Vo } from "./hooks/useCommandContributions.js";
32
- import { secureRandomUUID as Qo } from "./utils/secureRandom.js";
33
- import { useDebounce as Yo } from "./hooks/useDebounce.js";
34
- import { useDeckDrag as Jo } from "./hooks/useDeckDrag.js";
35
- import { useFileBrowserDropTarget as Zo, useFileBrowserItemDrag as $o } from "./hooks/useFileBrowserDrag.js";
36
- import { useKeybind as or } from "./hooks/useKeybind.js";
37
- import { useMediaQuery as tr } from "./hooks/useMediaQuery.js";
38
- import { useOverlayMask as sr } from "./hooks/useOverlayMask.js";
39
- import { usePersisted as nr } from "./hooks/usePersisted.js";
40
- import { useResizeObserver as lr } from "./hooks/useResizeObserver.js";
22
+ import { composedClosest as so, composedContains as no, composedEventTarget as ao, composedParent as mo, deepActiveElement as lo } from "./utils/domScope.js";
23
+ import { createAdaptiveSidebar as fo } from "./hooks/createAdaptiveSidebar.js";
24
+ import { createRetainedContent as To } from "./hooks/createRetainedContent.js";
25
+ import { createSimpleContext as xo } from "./context/createSimpleContext.js";
26
+ import { createUIFirstSelection as Co } from "./utils/uiFirstSelection.js";
27
+ import { deferAfterPaint as So, deferNonBlocking as ho } from "./utils/defer.js";
28
+ import { duration as Fo, easing as Po, fadeIn as ko, listContainer as Ro, listItem as Io, panelResize as Do, popIn as Eo, scaleIn as Lo, sidebarVariants as bo, slideInFromBottom as _o, slideInFromLeft as Ao, slideInFromRight as Mo, slideInFromTop as Oo, springConfig as No } from "./utils/animations.js";
29
+ import { formatKeybind as Uo, isMacLikePlatform as wo, isPrimaryModKeyPressed as Go, matchKeybind as Ho, parseKeybind as Wo } from "./utils/keybind.js";
30
+ import { isTypingElement as Vo, shouldIgnoreHotkeys as zo } from "./utils/dom.js";
31
+ import { lockBodyStyle as qo } from "./utils/bodyStyleLock.js";
32
+ import { registerCommandContributions as jo, useCommandContributions as Jo } from "./hooks/useCommandContributions.js";
33
+ import { secureRandomUUID as Zo } from "./utils/secureRandom.js";
34
+ import { useDebounce as er } from "./hooks/useDebounce.js";
35
+ import { useDeckDrag as rr } from "./hooks/useDeckDrag.js";
36
+ import { useFileBrowserDropTarget as ir, useFileBrowserItemDrag as sr } from "./hooks/useFileBrowserDrag.js";
37
+ import { useKeybind as ar } from "./hooks/useKeybind.js";
38
+ import { useMediaQuery as lr } from "./hooks/useMediaQuery.js";
39
+ import { useOverlayMask as fr } from "./hooks/useOverlayMask.js";
40
+ import { usePersisted as cr } from "./hooks/usePersisted.js";
41
+ import { useResizeObserver as ur } from "./hooks/useResizeObserver.js";
41
42
  export {
42
43
  D as BUILT_IN_SHELL_THEME_DEFAULTS,
43
44
  U as CommandProvider,
@@ -52,7 +53,7 @@ export {
52
53
  de as LayoutProvider,
53
54
  ge as LocaleProvider,
54
55
  he as NotificationContainer,
55
- Fe as NotificationProvider,
56
+ ve as NotificationProvider,
56
57
  E as REQUIRED_SHELL_THEME_TOKENS,
57
58
  Re as ThemeProvider,
58
59
  Le as ViewActivationProvider,
@@ -62,44 +63,49 @@ export {
62
63
  Ke as applyResizeDelta,
63
64
  i as applyShellThemeAttribute,
64
65
  s as applySurfaceStyleAttribute,
65
- a as applyTheme,
66
+ n as applyTheme,
66
67
  L as assertUniqueThemePresetNames,
67
68
  b as builtInShellThemePresets,
68
- n as builtInThemes,
69
+ a as builtInThemes,
69
70
  je as calculateFitScale,
70
71
  Xe as checkCollision,
71
72
  to as cn,
73
+ so as composedClosest,
74
+ no as composedContains,
75
+ ao as composedEventTarget,
76
+ mo as composedParent,
72
77
  Ze as constrainPosition,
73
- so as createAdaptiveSidebar,
78
+ fo as createAdaptiveSidebar,
74
79
  w as createCommandService,
75
80
  K as createComponentRegistry,
76
81
  oe as createDeckService,
77
- Te as createLayoutService,
78
- ve as createNotificationService,
79
- no as createRetainedContent,
82
+ ce as createLayoutService,
83
+ Fe as createNotificationService,
84
+ To as createRetainedContent,
80
85
  _ as createShellThemePreset,
81
- lo as createSimpleContext,
86
+ xo as createSimpleContext,
82
87
  Ie as createThemeService,
83
- fo as createUIFirstSelection,
88
+ Co as createUIFirstSelection,
84
89
  Me as createWidgetRegistry,
85
- ye as defaultFloeMessages,
86
- uo as deferAfterPaint,
87
- co as deferNonBlocking,
88
- go as duration,
89
- yo as easing,
90
- Co as fadeIn,
90
+ lo as deepActiveElement,
91
+ Ce as defaultFloeMessages,
92
+ So as deferAfterPaint,
93
+ ho as deferNonBlocking,
94
+ Fo as duration,
95
+ Po as easing,
96
+ ko as fadeIn,
91
97
  $e as findFreePosition,
92
98
  x as floeColorTokenCategories,
93
99
  g as floeDesignTokens,
94
- y as floeFontFamilyTokens,
95
- C as floeMotionTokens,
100
+ C as floeFontFamilyTokens,
101
+ y as floeMotionTokens,
96
102
  S as floeRadiusTokens,
97
103
  h as floeSharedCssVariables,
98
- F as floeSpacingTokens,
99
- v as floeSurfaceTokens,
104
+ v as floeSpacingTokens,
105
+ F as floeSurfaceTokens,
100
106
  P as floeThemeColorVariables,
101
107
  k as floeTypographyTokens,
102
- _o as formatKeybind,
108
+ Uo as formatKeybind,
103
109
  R as getFloeColorTokenValue,
104
110
  Ve as getGridCellSize,
105
111
  A as getShellThemePresetsForMode,
@@ -108,61 +114,61 @@ export {
108
114
  V as hasComponentRegistryContext,
109
115
  le as hasFileBrowserDragContext,
110
116
  l as isFloeSurfaceStyle,
111
- Ao as isMacLikePlatform,
112
- Mo as isPrimaryModKeyPressed,
117
+ wo as isMacLikePlatform,
118
+ Go as isPrimaryModKeyPressed,
113
119
  p as isThemeType,
114
- Uo as isTypingElement,
115
- So as listContainer,
116
- ho as listItem,
117
- Ho as lockBodyStyle,
118
- Oo as matchKeybind,
120
+ Vo as isTypingElement,
121
+ Ro as listContainer,
122
+ Io as listItem,
123
+ qo as lockBodyStyle,
124
+ Ho as matchKeybind,
119
125
  f as mergeThemeTokenMaps,
120
126
  M as normalizeShellThemeSelection,
121
- Fo as panelResize,
122
- No as parseKeybind,
127
+ Do as panelResize,
128
+ Wo as parseKeybind,
123
129
  ze as pixelDeltaToGridDelta,
124
- vo as popIn,
130
+ Eo as popIn,
125
131
  Qe as positionToGridArea,
126
132
  O as presetSupportsMode,
127
- Ko as registerCommandContributions,
133
+ jo as registerCommandContributions,
128
134
  N as resolveShellThemePresetName,
129
135
  d as resolveThemeTokenOverrides,
130
- T as resolveThemeTokens,
136
+ c as resolveThemeTokens,
131
137
  oo as sameGridPosition,
132
- Po as scaleIn,
133
- Qo as secureRandomUUID,
134
- wo as shouldIgnoreHotkeys,
135
- ko as sidebarVariants,
136
- Ro as slideInFromBottom,
137
- Io as slideInFromLeft,
138
- Do as slideInFromRight,
139
- Eo as slideInFromTop,
138
+ Lo as scaleIn,
139
+ Zo as secureRandomUUID,
140
+ zo as shouldIgnoreHotkeys,
141
+ bo as sidebarVariants,
142
+ _o as slideInFromBottom,
143
+ Ao as slideInFromLeft,
144
+ Mo as slideInFromRight,
145
+ Oo as slideInFromTop,
140
146
  qe as snapToGrid,
141
- Lo as springConfig,
142
- ae as startHotInteraction,
143
- u as syncThemeTokenOverrides,
147
+ No as springConfig,
148
+ ne as startHotInteraction,
149
+ T as syncThemeTokenOverrides,
144
150
  G as useCommand,
145
- Vo as useCommandContributions,
151
+ Jo as useCommandContributions,
146
152
  z as useComponentContextFactory,
147
153
  Q as useComponentRegistry,
148
154
  Ue as useCurrentWidgetId,
149
- Yo as useDebounce,
155
+ er as useDebounce,
150
156
  re as useDeck,
151
- Jo as useDeckDrag,
157
+ rr as useDeckDrag,
152
158
  pe as useFileBrowserDrag,
153
- Zo as useFileBrowserDropTarget,
154
- $o as useFileBrowserItemDrag,
159
+ ir as useFileBrowserDropTarget,
160
+ sr as useFileBrowserItemDrag,
155
161
  X as useFloeConfig,
156
- Ce as useFloeLocale,
157
- or as useKeybind,
158
- ue as useLayout,
159
- tr as useMediaQuery,
160
- ce as useMobileLayout,
162
+ ye as useFloeLocale,
163
+ ar as useKeybind,
164
+ Te as useLayout,
165
+ lr as useMediaQuery,
166
+ ue as useMobileLayout,
161
167
  Pe as useNotification,
162
168
  q as useOptionalComponentRegistry,
163
- sr as useOverlayMask,
164
- nr as usePersisted,
165
- lr as useResizeObserver,
169
+ fr as useOverlayMask,
170
+ cr as usePersisted,
171
+ ur as useResizeObserver,
166
172
  Z as useResolvedFloeConfig,
167
173
  De as useTheme,
168
174
  be as useViewActivation,
@@ -7,7 +7,8 @@
7
7
  * imported last silently won. What stays here is what `language.css` does not
8
8
  * own, plus the touch overrides that must land on `body` instead of `:root`.
9
9
  */
10
- :root {
10
+ :root,
11
+ [data-floe-theme] {
11
12
  /* `--radius` predates the language ladder and is still read by downstream
12
13
  * consumers. Point it at the ladder rather than hard-coding a second control
13
14
  * radius; the reference resolves at computed-value time, so import order no
@@ -34,7 +35,8 @@
34
35
 
35
36
  /* Compact visual controls retain usable, non-overlapping touch geometry. */
36
37
  @media (pointer: coarse) {
37
- body {
38
+ body,
39
+ [data-floe-theme] {
38
40
  --floe-type-control: 0.8125rem;
39
41
  --floe-type-body: 0.875rem;
40
42
  --floe-line-control: 1.25rem;