@ultralabs/glass 0.0.0-stage → 0.1.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/CHANGELOG.md +318 -0
- package/DESIGN.md +682 -0
- package/LICENSE +21 -0
- package/README.md +690 -2
- package/dist/esm/index.js +20872 -0
- package/dist/types/src/charts/ULCartesianChart.d.ts +177 -0
- package/dist/types/src/charts/ULDonutChart.d.ts +65 -0
- package/dist/types/src/charts/ULFunnelChart.d.ts +64 -0
- package/dist/types/src/charts/ULHeatmapChart.d.ts +40 -0
- package/dist/types/src/charts/ULRadarChart.d.ts +19 -0
- package/dist/types/src/charts/ULRadialChart.d.ts +48 -0
- package/dist/types/src/charts/ULScatterChart.d.ts +49 -0
- package/dist/types/src/charts/core.d.ts +287 -0
- package/dist/types/src/charts/decimate.d.ts +8 -0
- package/dist/types/src/charts/nav.d.ts +368 -0
- package/dist/types/src/charts/quadtree.d.ts +9 -0
- package/dist/types/src/charts/scales.d.ts +59 -0
- package/dist/types/src/charts/timeseries.d.ts +56 -0
- package/dist/types/src/components/ULAnchoredSurface/ULAnchoredSurface.d.ts +72 -0
- package/dist/types/src/components/ULBatch2/carousel.d.ts +31 -0
- package/dist/types/src/components/ULBatch2/hovercard.d.ts +40 -0
- package/dist/types/src/components/ULBatch2/layout.d.ts +16 -0
- package/dist/types/src/components/ULBatch2/menubar.d.ts +29 -0
- package/dist/types/src/components/ULBatch2/navmenu.d.ts +51 -0
- package/dist/types/src/components/ULBatch2/resizable.d.ts +48 -0
- package/dist/types/src/components/ULBatch2/typography.d.ts +55 -0
- package/dist/types/src/components/ULButton/ULButton.d.ts +87 -0
- package/dist/types/src/components/ULContainers/ULCard.d.ts +54 -0
- package/dist/types/src/components/ULContainers/ULDialog.d.ts +57 -0
- package/dist/types/src/components/ULContainers/ULLayout.d.ts +81 -0
- package/dist/types/src/components/ULContainers/ULMenu.d.ts +99 -0
- package/dist/types/src/components/ULContainers/ULOverlays.d.ts +113 -0
- package/dist/types/src/components/ULContainers/contextTarget.d.ts +91 -0
- package/dist/types/src/components/ULData/ULData.d.ts +225 -0
- package/dist/types/src/components/ULData/ULKpi.d.ts +159 -0
- package/dist/types/src/components/ULField/ULField.d.ts +93 -0
- package/dist/types/src/components/ULForms/fieldContext.d.ts +39 -0
- package/dist/types/src/components/ULForms/forms.d.ts +143 -0
- package/dist/types/src/components/ULIsland/ULIsland.d.ts +39 -0
- package/dist/types/src/components/ULIsland/headerConfig.d.ts +43 -0
- package/dist/types/src/components/ULIsland/navIndicator.d.ts +26 -0
- package/dist/types/src/components/ULListbox/ULListbox.d.ts +75 -0
- package/dist/types/src/components/ULPickers/ULPickers.d.ts +141 -0
- package/dist/types/src/components/ULSegmented/ULSegmented.d.ts +50 -0
- package/dist/types/src/components/ULSelection/ULSelection.d.ts +71 -0
- package/dist/types/src/components/ULSlider/ULSlider.d.ts +43 -0
- package/dist/types/src/components/ULSpinner/ULSpinner.d.ts +8 -0
- package/dist/types/src/components/ULStructure/kbd.d.ts +22 -0
- package/dist/types/src/components/ULStructure/structure.d.ts +154 -0
- package/dist/types/src/components/ULTabs/ULTabs.d.ts +28 -0
- package/dist/types/src/components/ULTooltip/anchoredTooltip.d.ts +22 -0
- package/dist/types/src/components/actions/actions.d.ts +175 -0
- package/dist/types/src/components/actions/core.d.ts +346 -0
- package/dist/types/src/components/dashboard/blocks.d.ts +583 -0
- package/dist/types/src/components/dashboard/blocks2.d.ts +297 -0
- package/dist/types/src/components/dashboard/columnsDrag.d.ts +27 -0
- package/dist/types/src/components/shared/ULCheckMark.d.ts +9 -0
- package/dist/types/src/components/shared/dev.d.ts +13 -0
- package/dist/types/src/components/shared/icons.d.ts +23 -0
- package/dist/types/src/glass/ULGlass.d.ts +78 -0
- package/dist/types/src/glass/ULGlassGroup.d.ts +16 -0
- package/dist/types/src/glass/accent.d.ts +31 -0
- package/dist/types/src/glass/contrast.d.ts +78 -0
- package/dist/types/src/glass/engine.d.ts +177 -0
- package/dist/types/src/glass/glassDebug.d.ts +27 -0
- package/dist/types/src/glass/material.d.ts +49 -0
- package/dist/types/src/glass/radius.d.ts +2 -0
- package/dist/types/src/hooks/useAnchoredMorph.d.ts +20 -0
- package/dist/types/src/hooks/usePointerLight.d.ts +6 -0
- package/dist/types/src/hooks/useReducedMotion.d.ts +3 -0
- package/dist/types/src/index.d.ts +150 -0
- package/dist/types/src/island/sectionAccent.d.ts +18 -0
- package/dist/types/src/live/ULLiveStatus.d.ts +18 -0
- package/dist/types/src/live/liveQueue.d.ts +13 -0
- package/dist/types/src/live/liveSource.d.ts +149 -0
- package/dist/types/src/live/liveStore.d.ts +72 -0
- package/dist/types/src/motion/anchoredMorph.d.ts +163 -0
- package/dist/types/src/motion/goo.d.ts +3 -0
- package/dist/types/src/motion/lensBubble.d.ts +143 -0
- package/dist/types/src/motion/lensSelect.d.ts +31 -0
- package/dist/types/src/motion/overlayStack.d.ts +13 -0
- package/dist/types/src/motion/placement.d.ts +18 -0
- package/dist/types/src/motion/spring.d.ts +20 -0
- package/dist/types/src/motion/topLayer.d.ts +13 -0
- package/dist/types/src/motion/viewSwap.d.ts +33 -0
- package/dist/types/src/motion/virtualAnchor.d.ts +28 -0
- package/dist/ul-glass.css +10508 -0
- package/dist/ul-glass.js +20915 -0
- package/dist/ul-glass.min.js +14 -0
- package/dist/ul-glass.min.js.map +7 -0
- package/icons/arrow-up-down.svg +5 -0
- package/icons/bell.svg +3 -0
- package/icons/bold.svg +2 -0
- package/icons/calendar.svg +5 -0
- package/icons/check.svg +2 -0
- package/icons/chevron-down.svg +2 -0
- package/icons/chevron-left.svg +2 -0
- package/icons/chevron-right.svg +2 -0
- package/icons/chevrons-right.svg +3 -0
- package/icons/circle-check.svg +3 -0
- package/icons/circle-x.svg +4 -0
- package/icons/circle.svg +2 -0
- package/icons/copy.svg +3 -0
- package/icons/ellipsis.svg +4 -0
- package/icons/eye.svg +3 -0
- package/icons/filter.svg +2 -0
- package/icons/flags/LICENSE.md +2 -0
- package/icons/flags/cs.svg +1 -0
- package/icons/flags/de.svg +1 -0
- package/icons/flags/en.svg +1 -0
- package/icons/flags/sk.svg +1 -0
- package/icons/folder-kanban.svg +5 -0
- package/icons/icons.json +1 -0
- package/icons/inbox.svg +3 -0
- package/icons/info.svg +4 -0
- package/icons/layout-dashboard.svg +5 -0
- package/icons/layout-grid.svg +5 -0
- package/icons/loader-circle.svg +2 -0
- package/icons/lock.svg +3 -0
- package/icons/mail.svg +3 -0
- package/icons/menu.svg +4 -0
- package/icons/minus.svg +2 -0
- package/icons/panel-left-close.svg +4 -0
- package/icons/plus.svg +3 -0
- package/icons/refresh-cw.svg +5 -0
- package/icons/search.svg +3 -0
- package/icons/shield-check.svg +3 -0
- package/icons/shopping-bag.svg +4 -0
- package/icons/sparkles.svg +6 -0
- package/icons/trash-2.svg +6 -0
- package/icons/triangle-alert.svg +4 -0
- package/icons/upload.svg +4 -0
- package/icons/users.svg +5 -0
- package/icons/x.svg +3 -0
- package/package.json +62 -4
- package/tokens/tokens.css +799 -0
- package/tokens/tokens.json +1017 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
export type GlassTier = 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
/** refract = full (SVG lens). lite = blur + saturate (Chromium, governed). fallback = blur-only because the browser can't refract. flat = no backdrop-filter. */
|
|
3
|
+
export type GlassMode = 'refract' | 'lite' | 'fallback' | 'flat';
|
|
4
|
+
/** Requested quality. auto (default) lets the governor decide within the refraction budget. */
|
|
5
|
+
export type GlassQuality = 'full' | 'lite' | 'flat' | 'auto';
|
|
6
|
+
/** Governor priority: overlay > focused/hovered > island > closest to viewport center. */
|
|
7
|
+
export type GlassPriority = 'overlay' | 'island' | 'normal';
|
|
8
|
+
/** Lens profile. standard: edge-normal bend. polar: radial bend from center. prominent: wider, stronger bezel. */
|
|
9
|
+
export type LensMode = 'standard' | 'polar' | 'prominent';
|
|
10
|
+
export interface GlassOptions {
|
|
11
|
+
/** Multiplier on the displacement scale. 0 disables the lens. */
|
|
12
|
+
refraction?: number;
|
|
13
|
+
/** Pointer-tracked specular light + rim rotation. Default true. */
|
|
14
|
+
light?: boolean;
|
|
15
|
+
/** Paint the displacement map instead of the material. */
|
|
16
|
+
debug?: boolean;
|
|
17
|
+
mode?: LensMode;
|
|
18
|
+
/**
|
|
19
|
+
* Elastic surface: hover pulls it a few px toward the pointer; press/drag
|
|
20
|
+
* stretches it along the motion. Default false. Controls only (buttons,
|
|
21
|
+
* chips, thumbs, segmented lens, FAB); never cards, panels, sheets.
|
|
22
|
+
*/
|
|
23
|
+
interactive?: boolean;
|
|
24
|
+
/** Overrides the size-tier factor (--ul-elasticity-sm/md/lg/xl). Still × --ul-elasticity. */
|
|
25
|
+
elasticity?: number;
|
|
26
|
+
/** Press feedback: scale down + flare at the pointer. */
|
|
27
|
+
pressable?: boolean;
|
|
28
|
+
/** Pressed scale. Default .965; menu items use .98. */
|
|
29
|
+
pressScale?: number;
|
|
30
|
+
/** full | lite | flat | auto (default). */
|
|
31
|
+
quality?: GlassQuality;
|
|
32
|
+
/** Governor priority. Default: overlay for [role=dialog] / anchored surfaces, else normal. */
|
|
33
|
+
priority?: GlassPriority;
|
|
34
|
+
/** @internal Showcase-only: the first, over-strong elasticity model, for comparison. Remove after tuning. */
|
|
35
|
+
legacyElastic?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface GlassConfig {
|
|
38
|
+
strength: number;
|
|
39
|
+
forceFallback: boolean;
|
|
40
|
+
/** Apply the mobile policy on any device (showcase / testing). */
|
|
41
|
+
forceMobile: boolean;
|
|
42
|
+
/** Refraction budget in px² of refracted area per viewport: 'auto' (governed, starts at --ul-perf-refraction-area) or fixed (Infinity = unlimited area and count). */
|
|
43
|
+
budget: 'auto' | number;
|
|
44
|
+
/** Pointer light on/off (measurement / debugging). Default true. */
|
|
45
|
+
light: boolean;
|
|
46
|
+
/** Debug (?glass=full|lite|flat): one tier for every surface, overrides per-surface quality. null = per surface. */
|
|
47
|
+
forceQuality: Exclude<GlassQuality, 'auto'> | null;
|
|
48
|
+
}
|
|
49
|
+
export interface DisplacementMaps {
|
|
50
|
+
map: string;
|
|
51
|
+
rim: string;
|
|
52
|
+
width: number;
|
|
53
|
+
height: number; /** both images decoded (a filter only references decoded maps) */
|
|
54
|
+
ready?: boolean;
|
|
55
|
+
decoded?: Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
/** Arrow outline (overlays + tooltips, full tier only): the map is built from body ∪ arrow, so the bezel bends into the arrow base. */
|
|
58
|
+
export interface MapArrow {
|
|
59
|
+
edge: 'top' | 'bottom' | 'left' | 'right';
|
|
60
|
+
pos: number;
|
|
61
|
+
half: number;
|
|
62
|
+
depth: number;
|
|
63
|
+
}
|
|
64
|
+
export interface MapOptions {
|
|
65
|
+
mode?: LensMode;
|
|
66
|
+
magnify?: number;
|
|
67
|
+
scale?: number;
|
|
68
|
+
arrow?: MapArrow;
|
|
69
|
+
}
|
|
70
|
+
/** Map generation cost (ms), for the perf report: last plain map, last arrow map, count of each. */
|
|
71
|
+
export declare const mapCost: {
|
|
72
|
+
plain: number;
|
|
73
|
+
arrow: number;
|
|
74
|
+
nPlain: number;
|
|
75
|
+
nArrow: number;
|
|
76
|
+
maxArrow: number;
|
|
77
|
+
};
|
|
78
|
+
export interface GlassStats {
|
|
79
|
+
instances: number;
|
|
80
|
+
visible: number;
|
|
81
|
+
refract: number;
|
|
82
|
+
lite: number;
|
|
83
|
+
fallback: number;
|
|
84
|
+
flat: number;
|
|
85
|
+
/** Refracted-area budget (px²) now / configured; area and count granted at the last governor run. */
|
|
86
|
+
budget: number;
|
|
87
|
+
maxBudget: number;
|
|
88
|
+
maxCount: number;
|
|
89
|
+
areaUsed: number;
|
|
90
|
+
refractCount: number;
|
|
91
|
+
degraded: boolean;
|
|
92
|
+
filters: number;
|
|
93
|
+
maps: number;
|
|
94
|
+
lightWrites: number;
|
|
95
|
+
}
|
|
96
|
+
/** Diagnostics only (scroll flash bisect): each switch disables one subsystem. configureGlass({ bisect: { … } }). */
|
|
97
|
+
export interface GlassBisect {
|
|
98
|
+
noAberration?: boolean;
|
|
99
|
+
noTint?: boolean;
|
|
100
|
+
noGovern?: boolean;
|
|
101
|
+
noIO?: boolean;
|
|
102
|
+
noAccentObserver?: boolean;
|
|
103
|
+
noMapRegen?: boolean;
|
|
104
|
+
noHover?: boolean;
|
|
105
|
+
/** Legacy look: R/G/B displaced in three passes (the scroll-flash suspect). Default is ONE pass + CSS bezel fringe. */
|
|
106
|
+
threePass?: boolean;
|
|
107
|
+
/** With threePass: recombine the isolated channels with feComposite arithmetic (exact sum) instead of feBlend screen. */
|
|
108
|
+
compositeRecombine?: boolean;
|
|
109
|
+
/** Cap the filter region (px per side) — tests large-region fallback at tile boundaries. */
|
|
110
|
+
capRegion?: number;
|
|
111
|
+
}
|
|
112
|
+
export declare function prewarmGlass(): void;
|
|
113
|
+
/** True while a scroll is in progress (tests, owners). */
|
|
114
|
+
export declare const isGlassScrolling: () => boolean;
|
|
115
|
+
/** Mobile policy (phones and small tablets with touch): refraction is reduced and only kept on small surfaces. */
|
|
116
|
+
export declare const isMobileGlass: () => boolean;
|
|
117
|
+
/** backdrop-filter: url(#svg) only renders in Chromium. Everything else gets blur + saturate. */
|
|
118
|
+
export declare function supportsRefraction(): boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Displacement map rendered on canvas, returned as PNG. R/G encode the x/y
|
|
121
|
+
* sample offset (128 = neutral).
|
|
122
|
+
* - Bezel: a FIXED-width band (`bezel` px, independent of element size) with a
|
|
123
|
+
* steep convex profile (1 − s)^exp — maximum at the very edge, smoothly
|
|
124
|
+
* reaching neutral `bezel` px inside. Follows `radius`.
|
|
125
|
+
* - Center: a gentle linear gradient that samples toward the center, giving a
|
|
126
|
+
* `magnify`× lens (needs the real displacement `scale` to compute).
|
|
127
|
+
* Also returns a rim mask used to light the outer 2px with the backdrop's color.
|
|
128
|
+
*/
|
|
129
|
+
export declare function generateDisplacementMap(width: number, height: number, radius: number | [number, number, number, number], bezel: number, opts?: MapOptions): DisplacementMaps;
|
|
130
|
+
/** Material "flat" (nearest data-ul-material attribute, stamped by useMaterial or set by hand): the reduced-transparency look, outside the budget. */
|
|
131
|
+
export declare function isFlatMaterial(el: Element): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Decide the tier BEFORE an open morph starts (AnchoredMorph.enter, before data-ul-morphing); it then stays constant for
|
|
134
|
+
* the whole animation. Refract only if its map is decoded right now; otherwise the surface opens on the calm lite state and
|
|
135
|
+
* upgrades after the morph settles (releaseGlassTier → the normal crossfade). Never builds a map here (no first-frame cost).
|
|
136
|
+
*/
|
|
137
|
+
export declare function decideGlassTier(el: HTMLElement): void;
|
|
138
|
+
/** Apply a tier change that was held back during a morph (called by AnchoredMorph when it ends). */
|
|
139
|
+
export declare function releaseGlassTier(el: HTMLElement): void;
|
|
140
|
+
/**
|
|
141
|
+
* Make a just-shown surface (display:none → block) count as visible NOW instead of waiting for the IntersectionObserver,
|
|
142
|
+
* measure it at its current size and resolve its tier in the same frame (lens bubble). on = false hides it again.
|
|
143
|
+
*/
|
|
144
|
+
export declare function wakeGlass(el: HTMLElement, on?: boolean): void;
|
|
145
|
+
/** Treat a surface as pressed/active for the governor (same as hover/focus: promoted, 3-pass aberration on small surfaces if allowed). */
|
|
146
|
+
export declare function setGlassHot(el: HTMLElement, on: boolean): void;
|
|
147
|
+
/** Sets the materialize factor (0..1) that multiplies the displacement scale. Used by motion helpers. */
|
|
148
|
+
export declare function setGlassMaterialize(el: HTMLElement, k: number): void;
|
|
149
|
+
/** Rescale the existing map/filter region to the element's animated size (no regeneration). No args = restore. */
|
|
150
|
+
export declare function setGlassGeometry(el: HTMLElement, w?: number, h?: number): void;
|
|
151
|
+
/** Generate the map synchronously (before a morph starts, while geometry is final). */
|
|
152
|
+
export declare function measureGlassNow(el: HTMLElement): void;
|
|
153
|
+
/** Crossfade from the blur fallback into refraction: ramps the lens 0 → 1 (no opacity change). */
|
|
154
|
+
export declare function rampGlass(el: HTMLElement, ms?: number): void;
|
|
155
|
+
/** Re-read tokens on every surface (e.g. after changing --ul-elasticity at runtime). */
|
|
156
|
+
export declare function refreshGlass(): void;
|
|
157
|
+
/** Attach (or update) the glass material on an element that has class `ul-glass`. */
|
|
158
|
+
export declare function attachGlass(el: HTMLElement, opts?: GlassOptions): void;
|
|
159
|
+
export declare function detachGlass(el: HTMLElement): void;
|
|
160
|
+
/** Global knobs (showcase / debugging). `forceFallback` rebuilds every surface. `budget`: 'auto' | number | Infinity. */
|
|
161
|
+
export declare function configureGlass(next: Partial<GlassConfig> & {
|
|
162
|
+
bisect?: GlassBisect;
|
|
163
|
+
}): GlassConfig;
|
|
164
|
+
export declare function getGlassMode(el: HTMLElement): GlassMode | undefined;
|
|
165
|
+
export declare function getGlassMaps(el: HTMLElement): DisplacementMaps | undefined;
|
|
166
|
+
/** Counters for the perf HUD and tests. */
|
|
167
|
+
export declare function getGlassStats(): GlassStats;
|
|
168
|
+
/**
|
|
169
|
+
* Materialize instead of fade: the refraction scale grows from 0 with opacity
|
|
170
|
+
* so the lens forms; hiding collapses the lens first, then fades.
|
|
171
|
+
*/
|
|
172
|
+
export declare function materialize(el: HTMLElement, visible: boolean, opts?: {
|
|
173
|
+
immediate?: boolean;
|
|
174
|
+
duration?: number;
|
|
175
|
+
}): Promise<void>;
|
|
176
|
+
export declare function trackPointer(el: HTMLElement): void;
|
|
177
|
+
export declare function untrackPointer(el: HTMLElement): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface GlassDebugFlags {
|
|
2
|
+
noTopLayer?: boolean;
|
|
3
|
+
noViewSwap?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const debugFlags: () => GlassDebugFlags;
|
|
6
|
+
export declare function recordScroll(step?: number, frames?: number): Promise<string>;
|
|
7
|
+
export declare function initGlassDebug(): void;
|
|
8
|
+
/** Programmatic access for tests: set switches by key (same keys as the panel). */
|
|
9
|
+
export declare function setGlassDebug(keys: string[]): void;
|
|
10
|
+
export declare function startGlassRecorder(): void;
|
|
11
|
+
export interface RecorderReport {
|
|
12
|
+
perFrame: {
|
|
13
|
+
t: number;
|
|
14
|
+
n: number;
|
|
15
|
+
props: string[];
|
|
16
|
+
}[];
|
|
17
|
+
frames: number;
|
|
18
|
+
p95: number;
|
|
19
|
+
flagged: number;
|
|
20
|
+
maxSurfaces: number;
|
|
21
|
+
maxWritesPerFrame: number;
|
|
22
|
+
defFrames: number;
|
|
23
|
+
animFrames: number;
|
|
24
|
+
props: Record<string, number>;
|
|
25
|
+
examples: string[];
|
|
26
|
+
}
|
|
27
|
+
export declare function stopGlassRecorder(): RecorderReport | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Material: "glass" | "flat". ONE resolver for every component.
|
|
4
|
+
* Order (most specific wins): instance prop > nearest ULProvider scope > category default > global default.
|
|
5
|
+
* Flat = the reduced-transparency fallback layer (same CSS, same tokens): no backdrop-filter, refraction, gloss rim,
|
|
6
|
+
* pointer light or goo; never counted toward the refraction budget. Non-React path: data-ul-material="glass|flat"
|
|
7
|
+
* on any element (nearest attribute wins; read by the engine and by ULGlass.css).
|
|
8
|
+
*/
|
|
9
|
+
export type Material = 'glass' | 'flat';
|
|
10
|
+
export type MaterialCategory = 'inputs' | 'controls' | 'surfaces' | 'overlays' | 'chrome';
|
|
11
|
+
/** A single material for every category, or per category (+ `default` for the categories not named). */
|
|
12
|
+
export type MaterialConfig = Material | Partial<Record<'default' | MaterialCategory, Material>>;
|
|
13
|
+
export declare const MATERIAL_CATEGORIES: readonly MaterialCategory[];
|
|
14
|
+
/** Category defaults: inputs flat, everything else glass. */
|
|
15
|
+
export declare const MATERIAL_DEFAULTS: Readonly<Record<MaterialCategory, Material>>;
|
|
16
|
+
export declare const GLOBAL_MATERIAL: Material;
|
|
17
|
+
type Scope = Partial<Record<MaterialCategory, Material>>;
|
|
18
|
+
/** Pure resolver (tests / non-React callers). `scope` = the merged nearest-scope map. */
|
|
19
|
+
export declare function resolveMaterial(category: MaterialCategory | undefined, instance?: Material, scope?: Scope): {
|
|
20
|
+
material: Material;
|
|
21
|
+
source: 'instance' | 'scope' | 'category' | 'global';
|
|
22
|
+
};
|
|
23
|
+
/** Merge a provider config onto the parent scope: what this scope names wins; the rest is inherited. */
|
|
24
|
+
export declare function mergeMaterialScope(parent: Scope, config: MaterialConfig | undefined): Scope;
|
|
25
|
+
/**
|
|
26
|
+
* The one hook every component asks. Returns the resolved material and the attribute to stamp on the component root
|
|
27
|
+
* (`data-ul-material` is stamped when the value is flat or was set explicitly, so a non-React ancestor attribute still
|
|
28
|
+
* applies to defaulted glass).
|
|
29
|
+
*/
|
|
30
|
+
export declare function useMaterial(category: MaterialCategory, instance?: Material): {
|
|
31
|
+
material: Material;
|
|
32
|
+
flat: boolean;
|
|
33
|
+
attr: Material | undefined;
|
|
34
|
+
};
|
|
35
|
+
export interface ULProviderProps {
|
|
36
|
+
/**
|
|
37
|
+
* Material for this subtree: "glass" | "flat" for every category, or per category
|
|
38
|
+
* `{ default?, inputs?, controls?, surfaces?, overlays?, chrome? }`. Nearest provider wins per category.
|
|
39
|
+
* @default undefined (inherit; category defaults: inputs "flat", the rest "glass")
|
|
40
|
+
*/
|
|
41
|
+
material?: MaterialConfig;
|
|
42
|
+
/** Subtree that resolves its material from this scope. */
|
|
43
|
+
children?: React.ReactNode;
|
|
44
|
+
}
|
|
45
|
+
/** Scope provider (no DOM). Currently carries `material`. */
|
|
46
|
+
export declare function ULProvider({ material, children }: ULProviderProps): React.JSX.Element;
|
|
47
|
+
/** Nearest `data-ul-material` attribute (non-React path). */
|
|
48
|
+
export declare function domMaterial(el: Element | null): Material | null;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AnchoredMorph, type MorphOptions } from '../motion/anchoredMorph.js';
|
|
3
|
+
export interface UseAnchoredMorphOptions extends MorphOptions {
|
|
4
|
+
open: boolean;
|
|
5
|
+
anchorRef: React.RefObject<HTMLElement | null>;
|
|
6
|
+
/** Soft scrim whose opacity rides the morph timeline (modals, drawers). */
|
|
7
|
+
scrimRef?: React.RefObject<HTMLElement | null>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The single enter/exit implementation for anchored overlays. Returns refs for
|
|
11
|
+
* the surface, the content stage and the goo layer, plus `mounted`, which
|
|
12
|
+
* stays true until the exit animation has been absorbed into the anchor.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useAnchoredMorph({ open, anchorRef, side, align, offset, scrollBehavior, onAnchorHidden, onRequestClose, layout, manual, anchorOnTop, coverAnchor, overlap, scrimRef }: UseAnchoredMorphOptions): {
|
|
15
|
+
mounted: boolean;
|
|
16
|
+
surfaceRef: React.RefObject<HTMLElement | null>;
|
|
17
|
+
stageRef: React.RefObject<HTMLElement | null>;
|
|
18
|
+
gooRef: React.RefObject<HTMLElement | null>;
|
|
19
|
+
morphRef: React.RefObject<AnchoredMorph | null>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Writes --mx / --my / --ul-light / --ul-rim-angle onto any element from the
|
|
4
|
+
* shared rAF-throttled pointer loop. ULGlass already does this for itself.
|
|
5
|
+
*/
|
|
6
|
+
export declare function usePointerLight<T extends HTMLElement>(ref: React.RefObject<T>, enabled?: boolean): void;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
export { ULGlass } from './glass/ULGlass.js';
|
|
2
|
+
export type { ULGlassProps, GlassVariant } from './glass/ULGlass.js';
|
|
3
|
+
export { ULGlassGroup, GlassGroupContext } from './glass/ULGlassGroup.js';
|
|
4
|
+
export type { ULGlassGroupProps } from './glass/ULGlassGroup.js';
|
|
5
|
+
export { attachGlass, detachGlass, configureGlass, supportsRefraction, generateDisplacementMap, materialize, rampGlass, isMobileGlass, refreshGlass, setGlassMaterialize, setGlassGeometry, measureGlassNow, releaseGlassTier, setGlassHot, wakeGlass, getGlassMode, getGlassMaps, getGlassStats, trackPointer, untrackPointer, mapCost, isGlassScrolling, prewarmGlass, } from './glass/engine.js';
|
|
6
|
+
export type { MapArrow, GlassTier, GlassMode, GlassQuality, GlassPriority, GlassStats, LensMode, MapOptions, GlassOptions, GlassConfig, DisplacementMaps } from './glass/engine.js';
|
|
7
|
+
export { concentric } from './glass/radius.js';
|
|
8
|
+
export { initGlassDebug, setGlassDebug, recordScroll, debugFlags, startGlassRecorder, stopGlassRecorder } from './glass/glassDebug.js';
|
|
9
|
+
export { createSpring, springs } from './motion/spring.js';
|
|
10
|
+
export type { Spring, SpringParams, SpringName } from './motion/spring.js';
|
|
11
|
+
export { usePointerLight } from './hooks/usePointerLight.js';
|
|
12
|
+
export { useMediaQuery, useReducedMotion, useReducedTransparency } from './hooks/useReducedMotion.js';
|
|
13
|
+
export { computePlacement } from './motion/placement.js';
|
|
14
|
+
export type { Side, Align, Placement, PlacementOptions } from './motion/placement.js';
|
|
15
|
+
export { AnchoredMorph, configureMorph, getMorphTimeScale, readMorphTokens, isMorphReduced, lockPageScroll, unlockPageScroll, isPageScrollLocked } from './motion/anchoredMorph.js';
|
|
16
|
+
export type { MorphTokens, MorphParts, MorphOptions } from './motion/anchoredMorph.js';
|
|
17
|
+
export { ensureGooFilter } from './motion/goo.js';
|
|
18
|
+
export { LensBubble, readLensTokens, rubberBand } from './motion/lensBubble.js';
|
|
19
|
+
export type { LensTokens, LensOptions, LensGeometry, LensKind } from './motion/lensBubble.js';
|
|
20
|
+
export { createLensSelect } from './motion/lensSelect.js';
|
|
21
|
+
export type { LensSelect, LensSelectOptions } from './motion/lensSelect.js';
|
|
22
|
+
export { ULTabs } from './components/ULTabs/ULTabs.js';
|
|
23
|
+
export type { ULTabsProps, TabItem } from './components/ULTabs/ULTabs.js';
|
|
24
|
+
export { useAnchoredMorph } from './hooks/useAnchoredMorph.js';
|
|
25
|
+
export { ULAnchoredSurface } from './components/ULAnchoredSurface/ULAnchoredSurface.js';
|
|
26
|
+
export type { ULAnchoredSurfaceProps } from './components/ULAnchoredSurface/ULAnchoredSurface.js';
|
|
27
|
+
export { ACCENT_PRESETS, ACCENT_STRENGTHS, isAccentPreset, accentAttrs, setAccent, ULAccentScope } from './glass/accent.js';
|
|
28
|
+
export type { Accent, AccentPreset, AccentStrength, Backdrop, ULAccentScopeProps } from './glass/accent.js';
|
|
29
|
+
export { toRGB, contrastRatio, luminance, readContrastTokens, worstSurface, accentContrastReport, minScrim, guardAccent, toOklch, fromOklch } from './glass/contrast.js';
|
|
30
|
+
export type { ContrastRow, GlassContrastTokens, AccentGuard } from './glass/contrast.js';
|
|
31
|
+
export { ULIsland, ULIslandTool } from './components/ULIsland/ULIsland.js';
|
|
32
|
+
export type { ULIslandProps, ULIslandToolProps, IslandState } from './components/ULIsland/ULIsland.js';
|
|
33
|
+
export { observeSectionAccent } from './island/sectionAccent.js';
|
|
34
|
+
export type { SectionAccentOptions } from './island/sectionAccent.js';
|
|
35
|
+
export { createNavIndicator } from './components/ULIsland/navIndicator.js';
|
|
36
|
+
export type { NavIndicator, NavIndicatorOptions } from './components/ULIsland/navIndicator.js';
|
|
37
|
+
export { createAnchoredTooltip } from './components/ULTooltip/anchoredTooltip.js';
|
|
38
|
+
export type { AnchoredTooltip, AnchoredTooltipOptions } from './components/ULTooltip/anchoredTooltip.js';
|
|
39
|
+
export { HEADER_DEFAULTS, STUDIO_URL, resolveHeaderConfig } from './components/ULIsland/headerConfig.js';
|
|
40
|
+
export type { HeaderConfig, HeaderLeading, HeaderNavItem, HeaderCta, HeaderPopper } from './components/ULIsland/headerConfig.js';
|
|
41
|
+
export { ULSpinner } from './components/ULSpinner/ULSpinner.js';
|
|
42
|
+
export type { ULSpinnerProps } from './components/ULSpinner/ULSpinner.js';
|
|
43
|
+
export { ULButton, ULToggleButton, ULButtonGroup, ULSplitButton, ULFab } from './components/ULButton/ULButton.js';
|
|
44
|
+
export type { ULButtonProps, ULToggleButtonProps, ULButtonGroupProps, ULSplitButtonProps, ULFabProps, SplitItem, ButtonVariant, ButtonSize, ButtonShape } from './components/ULButton/ULButton.js';
|
|
45
|
+
export { ULTextField, ULTextArea, ULNumberField, ULOtpField, ULTagField } from './components/ULField/ULField.js';
|
|
46
|
+
export type { FieldBaseProps, ULTextFieldProps, ULTextAreaProps, ULNumberFieldProps, ULOtpFieldProps, ULTagFieldProps } from './components/ULField/ULField.js';
|
|
47
|
+
export { Icon as ULIcon } from './components/shared/icons.js';
|
|
48
|
+
export { ULCheckbox, ULRadio, ULRadioGroup, ULSwitch } from './components/ULSelection/ULSelection.js';
|
|
49
|
+
export type { ULCheckboxProps, ULRadioProps, ULRadioGroupProps, ULSwitchProps } from './components/ULSelection/ULSelection.js';
|
|
50
|
+
export { ULSlider, ULRangeSlider } from './components/ULSlider/ULSlider.js';
|
|
51
|
+
export type { ULSliderProps, ULRangeSliderProps } from './components/ULSlider/ULSlider.js';
|
|
52
|
+
export { ULSegmentedControl, ULStepper } from './components/ULSegmented/ULSegmented.js';
|
|
53
|
+
export type { ULSegmentedControlProps, SegmentOption, ULStepperProps, StepItem } from './components/ULSegmented/ULSegmented.js';
|
|
54
|
+
export { ULSelect, ULCombobox, ULNativeSelect } from './components/ULListbox/ULListbox.js';
|
|
55
|
+
export type { ULSelectProps, ULComboboxProps, ListOption, ULNativeSelectProps, NativeOptGroup } from './components/ULListbox/ULListbox.js';
|
|
56
|
+
export { ULDatePicker, ULDateRangePicker, ULColorPicker, ULCalendar } from './components/ULPickers/ULPickers.js';
|
|
57
|
+
export type { ULDatePickerProps, ULDateRangePickerProps, ULCalendarProps, DateRange, ULColorPickerProps, ULColorPreset, PickerLocale } from './components/ULPickers/ULPickers.js';
|
|
58
|
+
export { ULCheckMark, animateCheck } from './components/shared/ULCheckMark.js';
|
|
59
|
+
export type { ULCheckMarkProps } from './components/shared/ULCheckMark.js';
|
|
60
|
+
export { isDev, surfaceBehind } from './components/shared/dev.js';
|
|
61
|
+
export { createVirtualAnchor, edgeRect, centerRect, pointRect } from './motion/virtualAnchor.js';
|
|
62
|
+
export type { VirtualAnchor, VirtualRect, Edge } from './motion/virtualAnchor.js';
|
|
63
|
+
export { pushOverlay, isTopOverlay, inLaterOverlay, overlayDepth, trapFocus, focusables } from './motion/overlayStack.js';
|
|
64
|
+
export { overshootEase } from './motion/anchoredMorph.js';
|
|
65
|
+
export { ULCard, ULPanel } from './components/ULContainers/ULCard.js';
|
|
66
|
+
export type { ULCardProps, ULPanelProps } from './components/ULContainers/ULCard.js';
|
|
67
|
+
export { ULModal, ULSheet, ULDrawer, ULPopover, ULTooltip, ULToast, ULToastProvider, useToast } from './components/ULContainers/ULOverlays.js';
|
|
68
|
+
export type { ULModalProps, ULDrawerProps, ULPopoverProps, ULTooltipProps, ULToastProps, ULToastProviderProps, ToastOptions, ToastTone } from './components/ULContainers/ULOverlays.js';
|
|
69
|
+
export { ULDialogProvider, ULDialogSurface, useDialog } from './components/ULContainers/ULDialog.js';
|
|
70
|
+
export type { DialogView, DialogApi, DialogSurfaceProps } from './components/ULContainers/ULDialog.js';
|
|
71
|
+
export { ULAccordion, ULSidebar, ULToolbar } from './components/ULContainers/ULLayout.js';
|
|
72
|
+
export type { ULAccordionProps, AccordionItem, ULSidebarProps, SidebarItem, SidebarSection, ULToolbarProps, ToolbarItem, ToolbarGroup } from './components/ULContainers/ULLayout.js';
|
|
73
|
+
export { ULMenu, ULMenuButton, ULContextMenu, ULCommandPalette, fuzzyScore } from './components/ULContainers/ULMenu.js';
|
|
74
|
+
export type { MenuItem, ULMenuProps, ULContextMenuProps, CommandItem, ULCommandPaletteProps } from './components/ULContainers/ULMenu.js';
|
|
75
|
+
export { ULBadge, ULAvatar, ULAvatarGroup, ULProgress, ULSkeleton, ULEmptyState, ULBreadcrumbs, ULPagination, pageRange, ULStatTile, ULTable } from './components/ULData/ULData.js';
|
|
76
|
+
export type { Tone, ULBadgeProps, ULAvatarProps, ULAvatarGroupProps, ULProgressProps, ULSkeletonProps, ULEmptyStateProps, Crumb, ULBreadcrumbsProps, ULPaginationProps, ULStatTileProps, TableColumn, SortState, ULTableProps, ChartSeries, ULChartProps } from './components/ULData/ULData.js';
|
|
77
|
+
export { ULRollingNumber, ULKpiCard, ULKpiDelta, ULKpiGoal, ULKpiGrid, ULSparkline, numberFormat, resolveLocale } from './components/ULData/ULKpi.js';
|
|
78
|
+
export type { ULRollingNumberProps, ULKpiCardProps, ULKpiDeltaProps, ULKpiGoalProps, ULKpiGridProps, ULSparklineProps } from './components/ULData/ULKpi.js';
|
|
79
|
+
export { pageSlots } from './components/ULData/ULData.js';
|
|
80
|
+
export type { TableLiveOptions } from './components/ULData/ULData.js';
|
|
81
|
+
export { createLiveSource, websocket, sse, polling, mock, checkLiveUrl } from './live/liveSource.js';
|
|
82
|
+
export type { LiveSource, LiveSourceOptions, LiveStatus, LiveStats, Transport, TransportContext, MockOptions, MockControls, RateLimit } from './live/liveSource.js';
|
|
83
|
+
export { createLiveStore, useLiveStore, useLiveKeys, useLiveRow, useLiveSelector, useLiveStatus } from './live/liveStore.js';
|
|
84
|
+
export type { LiveStore, LiveStoreOptions, LiveOp, LiveCommit } from './live/liveStore.js';
|
|
85
|
+
export { ULLiveStatus } from './live/ULLiveStatus.js';
|
|
86
|
+
export type { ULLiveStatusProps } from './live/ULLiveStatus.js';
|
|
87
|
+
export { runViewSwap, cancelSwap, newSwapAnims } from './motion/viewSwap.js';
|
|
88
|
+
export { ULContextTarget, useContextMenuTarget, resolveMenu, withContextMenu } from './components/ULContainers/contextTarget.js';
|
|
89
|
+
export type { ContextTarget, ContextMenuSpec, ContextMenuProps, ULContextTargetProps } from './components/ULContainers/contextTarget.js';
|
|
90
|
+
export type { ChartTargetData } from './components/ULData/ULData.js';
|
|
91
|
+
export { keepOnTop, toTopLayer, topLayerOrder } from './motion/topLayer.js';
|
|
92
|
+
export { ULActionButton, setActionTimeScale, getActionTimeScale, useAsyncAction, useCoalescedAction, useActionTooltip, actionText, announce, ACTION_CANCEL, SwapText } from './components/actions/core.js';
|
|
93
|
+
export type { CoalesceMode, CoalescedStatus, CoalescedOptions, CoalescedAction, ULActionButtonProps, ActionStatus, AsyncActionOptions, AsyncAction, ActionSlots, ActionLocale } from './components/actions/core.js';
|
|
94
|
+
export { ULTypeToConfirm } from './components/actions/actions.js';
|
|
95
|
+
export { ULCopyButton, copyText, ULPublishButton, ULSaveButton, ULSaveStatus, useUnsavedChangesGuard, ULSubmitButton, ULConfirmAction, ULDownloadButton, ULExportButton, ULRefreshButton, ULToggleIconButton, ULShareButton, ULUndoToast } from './components/actions/actions.js';
|
|
96
|
+
export type { ULCopyButtonProps, ULPublishButtonProps, ULSaveButtonProps, ULSaveStatusProps, SaveState, ULSubmitButtonProps, ULConfirmActionProps, ULDownloadButtonProps, ExportResult, ULRefreshButtonProps, ULToggleIconButtonProps, ULShareButtonProps, ULUndoToastProps } from './components/actions/actions.js';
|
|
97
|
+
export { ULBulkActionBar, ULColumnsMenu, columnsMenuItems, applyColumns, useColumnsState, defaultColumnsState, ULFilterBar, filtersToQuery, filtersFromQuery, applyFilters, OPS as FILTER_OPS, ULTimeAgo, ULTimestamp, useSharedNow, relTime, timeAgoStats, ULCellStatus, ULCellProgress, ULCellPerson, ULCellNumber, ULCellTime, ULCellSparkline, ULCellTags, ULCellId, ULCellActions, ULCellBool, ULCellLink, ULTimeRange, ULRefreshControl, resolveRange, ULCopyField, ULStatusDot, ULStatusPill, ULBanner, ULBannerQueue, ULUsageMeter, ULErrorState, ULDescriptionList, ULKeyValue, ULTruncatedText, blockText } from './components/dashboard/blocks.js';
|
|
98
|
+
export type { BulkAction, ULBulkActionBarProps, ColumnsState, ULColumnsMenuProps, FilterField, Filter, FilterOp, FilterType, SavedView, ULFilterBarProps, ULTimeAgoProps, RangePreset, TimeRangeValue, ULTimeRangeProps, ULRefreshControlProps, ULCopyFieldProps, OpStatus, BannerTone, BannerItem, ULBannerProps, ULUsageMeterProps, ULErrorStateProps, KeyValueItem } from './components/dashboard/blocks.js';
|
|
99
|
+
/** @internal test hooks (columns drag maths + counters) */
|
|
100
|
+
export { reorderKeys, dragSlot, columnsDragStats } from './components/dashboard/columnsDrag.js';
|
|
101
|
+
export { ULInlineEdit, ULNotificationCenter, ULActivityFeed, ULCodeBlock, ULJsonViewer, tokenizeLine, block2Text } from './components/dashboard/blocks2.js';
|
|
102
|
+
export type { ULInlineEditProps, NotificationItem, ULNotificationCenterProps, ActivityEvent, ULActivityFeedProps, CodeSample, ULCodeBlockProps, ULJsonViewerProps } from './components/dashboard/blocks2.js';
|
|
103
|
+
export { useLiveQueue, useThrottledAnnounce } from './live/liveQueue.js';
|
|
104
|
+
export type { LiveQueue } from './live/liveQueue.js';
|
|
105
|
+
export { ULCartesianChart, ULLineChart, ULAreaChart, ULBarChart, ULComboChart, ULChart } from './charts/ULCartesianChart.js';
|
|
106
|
+
export type { ULCartesianChartProps, ChartSeriesDef, ChartReference, ChartThreshold, ChartAxisConfig, ChartPointTarget, ChartTone, ULChartLegacyProps } from './charts/ULCartesianChart.js';
|
|
107
|
+
export { ULDonutChart, ULPieChart, ULSparkChart } from './charts/ULDonutChart.js';
|
|
108
|
+
export type { ULDonutChartProps, ULSparkChartProps } from './charts/ULDonutChart.js';
|
|
109
|
+
export { ChartFrame, ChartLegend, ChartDataTable, ChartSkeleton, SeriesKey, chartText, useChartTween, useHoverLayer, useWidth as useChartWidth, tableToCsv, SERIES_DASH, usePatternPolicy } from './charts/core.js';
|
|
110
|
+
export type { ChartState, ChartTable, HoverApi, HoverPoint, LegendItem, PatternMode, PatternPolicy } from './charts/core.js';
|
|
111
|
+
export { ULRadialChart, ULGaugeChart } from './charts/ULRadialChart.js';
|
|
112
|
+
export type { ULRadialChartProps, ULGaugeChartProps, GaugeThreshold } from './charts/ULRadialChart.js';
|
|
113
|
+
export { ULRadarChart } from './charts/ULRadarChart.js';
|
|
114
|
+
export type { ULRadarChartProps } from './charts/ULRadarChart.js';
|
|
115
|
+
export { ULScatterChart, shapePath, SCATTER_SHAPES } from './charts/ULScatterChart.js';
|
|
116
|
+
export type { ULScatterChartProps, ScatterShape } from './charts/ULScatterChart.js';
|
|
117
|
+
export { buildQuadtree, nearestBrute } from './charts/quadtree.js';
|
|
118
|
+
export type { QuadTree } from './charts/quadtree.js';
|
|
119
|
+
export { ULHeatmapChart, ULCalendarHeatmap } from './charts/ULHeatmapChart.js';
|
|
120
|
+
export type { ULHeatmapChartProps, ULCalendarHeatmapProps } from './charts/ULHeatmapChart.js';
|
|
121
|
+
export { ULFunnelChart, ULHistogramChart, ULTreemapChart, squarify, binValues, quantile } from './charts/ULFunnelChart.js';
|
|
122
|
+
export type { ULFunnelChartProps, ULHistogramChartProps, ULTreemapChartProps, TreeNode } from './charts/ULFunnelChart.js';
|
|
123
|
+
export { ULStreamChart, createChartStream, zoomAt, panBy, clampView, sliceFor, rangeValue } from './charts/timeseries.js';
|
|
124
|
+
export type { ChartStream, ChartStreamOptions, ChartStreamSnapshot, ULStreamChartProps } from './charts/timeseries.js';
|
|
125
|
+
export { lttb, canvasThreshold } from './charts/decimate.js';
|
|
126
|
+
export { useMarkNav, advText, useBrush, ChartAxes, colorScale, ColorLegend, useCellIndicator } from './charts/nav.js';
|
|
127
|
+
export type { ChartBaseProps, MarkNavOptions } from './charts/nav.js';
|
|
128
|
+
export { scaleLinear, scaleLog, scaleBand, scalePoint, scaleTime, niceDomain, linearTicks, makeNumberFormat, makeTimeFormat, linePath, areaPath, arcPath } from './charts/scales.js';
|
|
129
|
+
export { ULField, ULLabel, ULFieldError, ULFieldGroup, ULFieldSet, ULInputGroup, ULInputGroupInput, ULInputGroupButton, formText } from './components/ULForms/forms.js';
|
|
130
|
+
export type { ULFieldProps, ULLabelProps, ULFieldErrorProps, ULFieldGroupProps, ULFieldSetProps, ULInputGroupProps, FieldControlProps } from './components/ULForms/forms.js';
|
|
131
|
+
export { FieldCtx, InputGroupCtx, useFieldCtx, useInputGroupCtx, fieldAria } from './components/ULForms/fieldContext.js';
|
|
132
|
+
export { ULKbd, formatKeys, detectPlatform, ULSeparator, ULAlert, ULAlertDialog, useAlertDialog, ULConfirmPopover, ULToggleGroup, ULItem, ULItemGroup, ULCollapsible, ULScrollArea, scrollThumb } from './components/ULStructure/structure.js';
|
|
133
|
+
export type { ULKbdProps, ULSeparatorProps, ULAlertProps, AlertTone, ULAlertDialogProps, ULConfirmPopoverProps, ToggleItem, ULToggleGroupProps, ULItemProps, ULCollapsibleProps, ULScrollAreaProps } from './components/ULStructure/structure.js';
|
|
134
|
+
export { ULHoverCard } from './components/ULBatch2/hovercard.js';
|
|
135
|
+
export type { ULHoverCardProps } from './components/ULBatch2/hovercard.js';
|
|
136
|
+
export { ULMenubar } from './components/ULBatch2/menubar.js';
|
|
137
|
+
export type { ULMenubarProps, MenubarMenu } from './components/ULBatch2/menubar.js';
|
|
138
|
+
export { ULNavigationMenu } from './components/ULBatch2/navmenu.js';
|
|
139
|
+
export type { ULNavigationMenuProps, NavMenuItem, NavLink } from './components/ULBatch2/navmenu.js';
|
|
140
|
+
export { ULAspectRatio } from './components/ULBatch2/layout.js';
|
|
141
|
+
export type { ULAspectRatioProps } from './components/ULBatch2/layout.js';
|
|
142
|
+
export { ULResizablePanelGroup, ULResizablePanel, ULResizableHandle } from './components/ULBatch2/resizable.js';
|
|
143
|
+
export type { ULResizablePanelGroupProps, ULResizablePanelProps, ULResizableHandleProps, ResizableApi } from './components/ULBatch2/resizable.js';
|
|
144
|
+
export { ULCarousel } from './components/ULBatch2/carousel.js';
|
|
145
|
+
export type { ULCarouselProps } from './components/ULBatch2/carousel.js';
|
|
146
|
+
export { ULHeading, ULText, ULCode, ULBlockquote, ULList, ULLink, ULProse } from './components/ULBatch2/typography.js';
|
|
147
|
+
export type { ULHeadingProps, ULTextProps, ULBlockquoteProps, ULListProps, ULLinkProps, TypeSize } from './components/ULBatch2/typography.js';
|
|
148
|
+
export { ULProvider, useMaterial, resolveMaterial, mergeMaterialScope, MATERIAL_DEFAULTS, MATERIAL_CATEGORIES } from './glass/material.js';
|
|
149
|
+
export type { Material, MaterialCategory, MaterialConfig, ULProviderProps } from './glass/material.js';
|
|
150
|
+
export { isFlatMaterial } from './glass/engine.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SectionAccentOptions {
|
|
2
|
+
/** The island (or any element whose vertical center is the sampling line). */
|
|
3
|
+
island: HTMLElement;
|
|
4
|
+
/** Where to look for candidates. Default: document. */
|
|
5
|
+
scope?: ParentNode;
|
|
6
|
+
/** Scroll container (IntersectionObserver root). Default: viewport. */
|
|
7
|
+
root?: Element | null;
|
|
8
|
+
selector?: string;
|
|
9
|
+
/** Reported when no candidate is under the island. */
|
|
10
|
+
fallback?: string | null;
|
|
11
|
+
/** Called with the accent under the island (or the fallback) after it settles. */
|
|
12
|
+
onValueChange: (accent: string | null, el: Element | null) => void;
|
|
13
|
+
/** ms of stability before switching. Default --ul-island-switch-delay (140). */
|
|
14
|
+
delay?: number;
|
|
15
|
+
/** px past the current element's edge before it loses. Default --ul-island-hysteresis (24). */
|
|
16
|
+
hysteresis?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function observeSectionAccent(o: SectionAccentOptions): () => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { LiveSource, LiveStatus } from './liveSource.js';
|
|
3
|
+
import './ULLive.css';
|
|
4
|
+
export interface ULLiveStatusProps {
|
|
5
|
+
/** Live source (createLiveSource) whose status is shown; null = offline. */ source: LiveSource | null;
|
|
6
|
+
/** Visible pause / resume control (WCAG 2.2.2 moving content). Default true. */
|
|
7
|
+
pauseControl?: boolean;
|
|
8
|
+
/** Override labels per status ("connecting", "live", "paused", "reconnecting", "offline", "stale"). */ labels?: Partial<Record<LiveStatus, string>> & {
|
|
9
|
+
pause?: string;
|
|
10
|
+
resume?: string;
|
|
11
|
+
retry?: (s: number) => string;
|
|
12
|
+
};
|
|
13
|
+
/** Extra stores / tables paused together with the source. */
|
|
14
|
+
onPausedChange?: (paused: boolean) => void;
|
|
15
|
+
/** Extra class on the root element. */ className?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Dot + label (+ pause / resume). The status is announced politely on change; the dot pulses only while live (not under reduced motion). */
|
|
18
|
+
export declare function ULLiveStatus({ source, pauseControl, labels, onPausedChange, className }: ULLiveStatusProps): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface LiveQueue {
|
|
2
|
+
shown: string[];
|
|
3
|
+
pending: number;
|
|
4
|
+
apply: () => void;
|
|
5
|
+
interacting: boolean; /** Callback ref for the list root (pointer / focus tracking + insert animation). */
|
|
6
|
+
ref: (el: HTMLElement | null) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useLiveQueue(keys: string[], o?: {
|
|
9
|
+
hold?: boolean;
|
|
10
|
+
animate?: boolean;
|
|
11
|
+
}): LiveQueue;
|
|
12
|
+
/** Throttled polite summary (one message per --ul-live-announce-gap). */
|
|
13
|
+
export declare function useThrottledAnnounce(say: (msg: string) => void): (n: number, f: (n: number) => string) => void;
|