veilkit 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 +29 -0
- package/LICENSE +21 -0
- package/README.md +245 -2
- package/dist/angular/index.cjs +394 -0
- package/dist/angular/index.cjs.map +1 -0
- package/dist/angular/index.d.cts +78 -0
- package/dist/angular/index.d.ts +78 -0
- package/dist/angular/index.js +394 -0
- package/dist/angular/index.js.map +1 -0
- package/dist/cli/index.cjs +25 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.cts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +25 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/controller-5OzP0U8X.d.cts +193 -0
- package/dist/controller-Co5bvnaB.d.ts +193 -0
- package/dist/element/index.cjs +395 -0
- package/dist/element/index.cjs.map +1 -0
- package/dist/element/index.d.cts +42 -0
- package/dist/element/index.d.ts +42 -0
- package/dist/element/index.js +395 -0
- package/dist/element/index.js.map +1 -0
- package/dist/index.cjs +394 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +209 -0
- package/dist/index.d.ts +209 -0
- package/dist/index.js +394 -0
- package/dist/index.js.map +1 -0
- package/dist/native/index.cjs +2 -0
- package/dist/native/index.cjs.map +1 -0
- package/dist/native/index.d.cts +48 -0
- package/dist/native/index.d.ts +48 -0
- package/dist/native/index.js +2 -0
- package/dist/native/index.js.map +1 -0
- package/dist/react/index.cjs +394 -0
- package/dist/react/index.cjs.map +1 -0
- package/dist/react/index.d.cts +99 -0
- package/dist/react/index.d.ts +99 -0
- package/dist/react/index.js +394 -0
- package/dist/react/index.js.map +1 -0
- package/dist/styles.css +377 -0
- package/dist/svelte/index.cjs +394 -0
- package/dist/svelte/index.cjs.map +1 -0
- package/dist/svelte/index.d.cts +41 -0
- package/dist/svelte/index.d.ts +41 -0
- package/dist/svelte/index.js +394 -0
- package/dist/svelte/index.js.map +1 -0
- package/dist/themes/index.cjs +2 -0
- package/dist/themes/index.cjs.map +1 -0
- package/dist/themes/index.d.cts +18 -0
- package/dist/themes/index.d.ts +18 -0
- package/dist/themes/index.js +2 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/types-Ciu5e5xt.d.cts +159 -0
- package/dist/types-Ciu5e5xt.d.ts +159 -0
- package/dist/veilkit.min.js +393 -0
- package/dist/vue/index.cjs +394 -0
- package/dist/vue/index.cjs.map +1 -0
- package/dist/vue/index.d.cts +366 -0
- package/dist/vue/index.d.ts +366 -0
- package/dist/vue/index.js +394 -0
- package/dist/vue/index.js.map +1 -0
- package/package.json +238 -4
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { a as VeilAnimationName, i as VeilDirection, j as VeilRevealTransition, A as AutoMeasureOptions, S as SkeletonProps, e as VeilSpinnerType, b as SpinnerProps, L as LoadingButtonProps, h as LazyImageProps, T as TextLoaderProps } from './types-Ciu5e5xt.cjs';
|
|
2
|
+
export { C as CustomThemeInput, O as OverlayProps, f as PresetProps, P as ProgressProps, g as SkeletonController, c as VeilGlobalConfig, k as VeilPresetName, d as VeilPrimitiveType, V as VeilThemeName, l as VeilThemeTokens } from './types-Ciu5e5xt.cjs';
|
|
3
|
+
export { BUILTIN_THEMES, createTheme, getThemeTokens } from './themes/index.cjs';
|
|
4
|
+
export { L as LoadingManager, O as OverlayController, R as RouteProgressController, T as TrackOptions, V as VeilkitController, a as applyA11yLoading, c as createPreset, b as createPrimitive, d as createProgressElement, e as createSkeletonElement, f as createSkeletonParagraph, v as default, g as getLabel, h as getLocale, l as loadingManager, o as overlayController, p as progressController, r as removeA11yLoading, s as setLabels, i as setLocale, t as track, v as veil, w as wrapFetch } from './controller-5OzP0U8X.cjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Veilkit - Animation Engine
|
|
8
|
+
* 12 GPU-Accelerated Animation Definitions (transform & opacity only)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface AnimationConfig {
|
|
12
|
+
name: VeilAnimationName;
|
|
13
|
+
duration?: number | string;
|
|
14
|
+
direction?: VeilDirection;
|
|
15
|
+
speedMultiplier?: number;
|
|
16
|
+
intensity?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const ANIMATION_NAMES: VeilAnimationName[];
|
|
19
|
+
/**
|
|
20
|
+
* Generates the CSS keyframes and utility rules for all 12 animations.
|
|
21
|
+
* Strictly uses transform and opacity for 60fps GPU execution.
|
|
22
|
+
*/
|
|
23
|
+
declare function getAnimationKeyframesCSS(): string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Veilkit - Global Synchronized Timeline
|
|
27
|
+
* Keeps all shimmer animations in lockstep phase via negative animation-delay
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Initializes or gets the baseline global timeline origin
|
|
31
|
+
*/
|
|
32
|
+
declare function getTimelineOrigin(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Computes a negative animation-delay string so that an element mounting right now
|
|
35
|
+
* is in exact phase synchronization with all other animations sharing this duration.
|
|
36
|
+
*
|
|
37
|
+
* @param durationMs Duration in milliseconds (default 1500)
|
|
38
|
+
* @returns CSS animation-delay value, e.g. "-642ms"
|
|
39
|
+
*/
|
|
40
|
+
declare function getSyncDelay(durationMs?: number): string;
|
|
41
|
+
/**
|
|
42
|
+
* Parses duration string (e.g. "1.5s", "800ms") into milliseconds
|
|
43
|
+
*/
|
|
44
|
+
declare function parseDurationMs(duration?: string | number): number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Veilkit - Performance & Offscreen Observers
|
|
48
|
+
* Automatically pauses animations when offscreen or when document is hidden
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* Ensures tab visibility change listener is attached
|
|
52
|
+
*/
|
|
53
|
+
declare function setupVisibilityObserver(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Registers an element to pause CSS animations when outside the viewport
|
|
56
|
+
*/
|
|
57
|
+
declare function observeOffscreen(element: HTMLElement): () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Disconnects all observers
|
|
60
|
+
*/
|
|
61
|
+
declare function teardownObservers(): void;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Veilkit - CSS Engine & Style Injector
|
|
65
|
+
* SSR-safe, adoptedStyleSheets support, CSP nonce, and zero-layout-thrash animations
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* Configure CSP nonce for injected styles
|
|
69
|
+
*/
|
|
70
|
+
declare function setNonce(nonce: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Generates the full CSS stylesheet string
|
|
73
|
+
*/
|
|
74
|
+
declare function getStylesCSS(): string;
|
|
75
|
+
/**
|
|
76
|
+
* Injects CSS into the document head safely (runs only once, SSR safe)
|
|
77
|
+
*/
|
|
78
|
+
declare function injectStyles(nonce?: string): void;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Veilkit - Anti-Flicker Timing Controller
|
|
82
|
+
* Prevents UI flicker:
|
|
83
|
+
* 1. delay (default 150ms): suppresses loading state if task completes very quickly
|
|
84
|
+
* 2. minVisible (default 300ms): guarantees loader stays visible long enough to avoid rapid flashing
|
|
85
|
+
*/
|
|
86
|
+
interface AntiFlickerOptions {
|
|
87
|
+
delay?: number;
|
|
88
|
+
minVisible?: number;
|
|
89
|
+
onShow?: () => void;
|
|
90
|
+
onHide?: () => void;
|
|
91
|
+
}
|
|
92
|
+
declare class AntiFlickerController {
|
|
93
|
+
private delay;
|
|
94
|
+
private minVisible;
|
|
95
|
+
private onShow?;
|
|
96
|
+
private onHide?;
|
|
97
|
+
private delayTimer;
|
|
98
|
+
private minVisibleTimer;
|
|
99
|
+
private shownTimestamp;
|
|
100
|
+
private isVisible;
|
|
101
|
+
private isPending;
|
|
102
|
+
constructor(options?: AntiFlickerOptions);
|
|
103
|
+
/**
|
|
104
|
+
* Request loader to be shown (subject to delay)
|
|
105
|
+
*/
|
|
106
|
+
start(): void;
|
|
107
|
+
private display;
|
|
108
|
+
/**
|
|
109
|
+
* Request loader to be hidden (subject to minVisible)
|
|
110
|
+
*/
|
|
111
|
+
finish(callback?: () => void): void;
|
|
112
|
+
private hide;
|
|
113
|
+
active(): boolean;
|
|
114
|
+
destroy(): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Veilkit - Reveal Transitions Engine
|
|
119
|
+
* Seamless skeleton -> content reveal transitions:
|
|
120
|
+
* fade, blur-in, slide-up, scale, stagger-children, none
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
interface RevealOptions {
|
|
124
|
+
transition?: VeilRevealTransition;
|
|
125
|
+
duration?: number;
|
|
126
|
+
easing?: string;
|
|
127
|
+
onComplete?: () => void;
|
|
128
|
+
}
|
|
129
|
+
declare function applyReveal(element: HTMLElement, options?: RevealOptions): void;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Veilkit - Auto-Measure Skeleton Engine
|
|
133
|
+
* Dynamically measures real DOM trees, generates matching skeleton overlays,
|
|
134
|
+
* updates on resize/mutation, and supports instant layout caching.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
interface LeafBox {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
width: number;
|
|
141
|
+
height: number;
|
|
142
|
+
radius: string;
|
|
143
|
+
shape: 'circle' | 'rect' | 'line';
|
|
144
|
+
}
|
|
145
|
+
interface CachedLayout {
|
|
146
|
+
width: number;
|
|
147
|
+
height: number;
|
|
148
|
+
boxes: LeafBox[];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Retrieve cached layout by key
|
|
152
|
+
*/
|
|
153
|
+
declare function getCachedLayout(cacheKey: string): CachedLayout | null;
|
|
154
|
+
/**
|
|
155
|
+
* Store layout in cache
|
|
156
|
+
*/
|
|
157
|
+
declare function setCachedLayout(cacheKey: string, layout: CachedLayout, persist?: boolean): void;
|
|
158
|
+
/**
|
|
159
|
+
* Measures the leaf elements of a container DOM tree
|
|
160
|
+
*/
|
|
161
|
+
declare function measureContainer(container: HTMLElement, ignoreSelector?: string): CachedLayout;
|
|
162
|
+
/**
|
|
163
|
+
* Creates and attaches an auto-measured skeleton overlay to a container
|
|
164
|
+
*/
|
|
165
|
+
declare function createAutoMeasureOverlay(container: HTMLElement, options?: AutoMeasureOptions, skeletonProps?: SkeletonProps): {
|
|
166
|
+
overlay: HTMLElement;
|
|
167
|
+
refresh: () => void;
|
|
168
|
+
destroy: () => void;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Veilkit - 12 Spinner Loaders
|
|
173
|
+
* Types: ring, dual-ring, dots, bars, pulse, orbit, wave, bounce,
|
|
174
|
+
* ios-activity, glass-orb, morph, progress-circle
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
declare const SPINNER_TYPES: VeilSpinnerType[];
|
|
178
|
+
/**
|
|
179
|
+
* Creates a DOM spinner element with specified type, size, and colors
|
|
180
|
+
*/
|
|
181
|
+
declare function createSpinner(props?: SpinnerProps): HTMLElement;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Veilkit - Loading Button Controller
|
|
185
|
+
* Inline spinner, preserves exact button dimensions to prevent layout shifts,
|
|
186
|
+
* disables clicks, and applies aria-disabled state.
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
declare function wrapLoadingButton(buttonEl: HTMLButtonElement, props?: LoadingButtonProps): {
|
|
190
|
+
setLoading: (loading: boolean, loadingText?: string) => void;
|
|
191
|
+
destroy: () => void;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Veilkit - Lazy Image & Media Placeholder
|
|
196
|
+
* Renders synchronized skeleton placeholder until image loads,
|
|
197
|
+
* then reveals with smooth blur-up transition and handles error fallback.
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
declare function createLazyImage(props: LazyImageProps): HTMLElement;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Veilkit - Text Loader
|
|
204
|
+
* Animated localized typing text with pulsing ellipsis dots
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
declare function createTextLoader(props?: TextLoaderProps): HTMLElement;
|
|
208
|
+
|
|
209
|
+
export { ANIMATION_NAMES, type AnimationConfig, AntiFlickerController, type AntiFlickerOptions, AutoMeasureOptions, type CachedLayout, LazyImageProps, type LeafBox, LoadingButtonProps, type RevealOptions, SPINNER_TYPES, SkeletonProps, SpinnerProps, TextLoaderProps, VeilAnimationName, VeilDirection, VeilRevealTransition, VeilSpinnerType, applyReveal, createAutoMeasureOverlay, createLazyImage, createSpinner, createTextLoader, getAnimationKeyframesCSS, getCachedLayout, getStylesCSS, getSyncDelay, getTimelineOrigin, injectStyles, measureContainer, observeOffscreen, parseDurationMs, setCachedLayout, setNonce, setupVisibilityObserver, teardownObservers, wrapLoadingButton };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { a as VeilAnimationName, i as VeilDirection, j as VeilRevealTransition, A as AutoMeasureOptions, S as SkeletonProps, e as VeilSpinnerType, b as SpinnerProps, L as LoadingButtonProps, h as LazyImageProps, T as TextLoaderProps } from './types-Ciu5e5xt.js';
|
|
2
|
+
export { C as CustomThemeInput, O as OverlayProps, f as PresetProps, P as ProgressProps, g as SkeletonController, c as VeilGlobalConfig, k as VeilPresetName, d as VeilPrimitiveType, V as VeilThemeName, l as VeilThemeTokens } from './types-Ciu5e5xt.js';
|
|
3
|
+
export { BUILTIN_THEMES, createTheme, getThemeTokens } from './themes/index.js';
|
|
4
|
+
export { L as LoadingManager, O as OverlayController, R as RouteProgressController, T as TrackOptions, V as VeilkitController, a as applyA11yLoading, c as createPreset, b as createPrimitive, d as createProgressElement, e as createSkeletonElement, f as createSkeletonParagraph, v as default, g as getLabel, h as getLocale, l as loadingManager, o as overlayController, p as progressController, r as removeA11yLoading, s as setLabels, i as setLocale, t as track, v as veil, w as wrapFetch } from './controller-Co5bvnaB.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Veilkit - Animation Engine
|
|
8
|
+
* 12 GPU-Accelerated Animation Definitions (transform & opacity only)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface AnimationConfig {
|
|
12
|
+
name: VeilAnimationName;
|
|
13
|
+
duration?: number | string;
|
|
14
|
+
direction?: VeilDirection;
|
|
15
|
+
speedMultiplier?: number;
|
|
16
|
+
intensity?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const ANIMATION_NAMES: VeilAnimationName[];
|
|
19
|
+
/**
|
|
20
|
+
* Generates the CSS keyframes and utility rules for all 12 animations.
|
|
21
|
+
* Strictly uses transform and opacity for 60fps GPU execution.
|
|
22
|
+
*/
|
|
23
|
+
declare function getAnimationKeyframesCSS(): string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Veilkit - Global Synchronized Timeline
|
|
27
|
+
* Keeps all shimmer animations in lockstep phase via negative animation-delay
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Initializes or gets the baseline global timeline origin
|
|
31
|
+
*/
|
|
32
|
+
declare function getTimelineOrigin(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Computes a negative animation-delay string so that an element mounting right now
|
|
35
|
+
* is in exact phase synchronization with all other animations sharing this duration.
|
|
36
|
+
*
|
|
37
|
+
* @param durationMs Duration in milliseconds (default 1500)
|
|
38
|
+
* @returns CSS animation-delay value, e.g. "-642ms"
|
|
39
|
+
*/
|
|
40
|
+
declare function getSyncDelay(durationMs?: number): string;
|
|
41
|
+
/**
|
|
42
|
+
* Parses duration string (e.g. "1.5s", "800ms") into milliseconds
|
|
43
|
+
*/
|
|
44
|
+
declare function parseDurationMs(duration?: string | number): number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Veilkit - Performance & Offscreen Observers
|
|
48
|
+
* Automatically pauses animations when offscreen or when document is hidden
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* Ensures tab visibility change listener is attached
|
|
52
|
+
*/
|
|
53
|
+
declare function setupVisibilityObserver(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Registers an element to pause CSS animations when outside the viewport
|
|
56
|
+
*/
|
|
57
|
+
declare function observeOffscreen(element: HTMLElement): () => void;
|
|
58
|
+
/**
|
|
59
|
+
* Disconnects all observers
|
|
60
|
+
*/
|
|
61
|
+
declare function teardownObservers(): void;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Veilkit - CSS Engine & Style Injector
|
|
65
|
+
* SSR-safe, adoptedStyleSheets support, CSP nonce, and zero-layout-thrash animations
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* Configure CSP nonce for injected styles
|
|
69
|
+
*/
|
|
70
|
+
declare function setNonce(nonce: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Generates the full CSS stylesheet string
|
|
73
|
+
*/
|
|
74
|
+
declare function getStylesCSS(): string;
|
|
75
|
+
/**
|
|
76
|
+
* Injects CSS into the document head safely (runs only once, SSR safe)
|
|
77
|
+
*/
|
|
78
|
+
declare function injectStyles(nonce?: string): void;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Veilkit - Anti-Flicker Timing Controller
|
|
82
|
+
* Prevents UI flicker:
|
|
83
|
+
* 1. delay (default 150ms): suppresses loading state if task completes very quickly
|
|
84
|
+
* 2. minVisible (default 300ms): guarantees loader stays visible long enough to avoid rapid flashing
|
|
85
|
+
*/
|
|
86
|
+
interface AntiFlickerOptions {
|
|
87
|
+
delay?: number;
|
|
88
|
+
minVisible?: number;
|
|
89
|
+
onShow?: () => void;
|
|
90
|
+
onHide?: () => void;
|
|
91
|
+
}
|
|
92
|
+
declare class AntiFlickerController {
|
|
93
|
+
private delay;
|
|
94
|
+
private minVisible;
|
|
95
|
+
private onShow?;
|
|
96
|
+
private onHide?;
|
|
97
|
+
private delayTimer;
|
|
98
|
+
private minVisibleTimer;
|
|
99
|
+
private shownTimestamp;
|
|
100
|
+
private isVisible;
|
|
101
|
+
private isPending;
|
|
102
|
+
constructor(options?: AntiFlickerOptions);
|
|
103
|
+
/**
|
|
104
|
+
* Request loader to be shown (subject to delay)
|
|
105
|
+
*/
|
|
106
|
+
start(): void;
|
|
107
|
+
private display;
|
|
108
|
+
/**
|
|
109
|
+
* Request loader to be hidden (subject to minVisible)
|
|
110
|
+
*/
|
|
111
|
+
finish(callback?: () => void): void;
|
|
112
|
+
private hide;
|
|
113
|
+
active(): boolean;
|
|
114
|
+
destroy(): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Veilkit - Reveal Transitions Engine
|
|
119
|
+
* Seamless skeleton -> content reveal transitions:
|
|
120
|
+
* fade, blur-in, slide-up, scale, stagger-children, none
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
interface RevealOptions {
|
|
124
|
+
transition?: VeilRevealTransition;
|
|
125
|
+
duration?: number;
|
|
126
|
+
easing?: string;
|
|
127
|
+
onComplete?: () => void;
|
|
128
|
+
}
|
|
129
|
+
declare function applyReveal(element: HTMLElement, options?: RevealOptions): void;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Veilkit - Auto-Measure Skeleton Engine
|
|
133
|
+
* Dynamically measures real DOM trees, generates matching skeleton overlays,
|
|
134
|
+
* updates on resize/mutation, and supports instant layout caching.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
interface LeafBox {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
width: number;
|
|
141
|
+
height: number;
|
|
142
|
+
radius: string;
|
|
143
|
+
shape: 'circle' | 'rect' | 'line';
|
|
144
|
+
}
|
|
145
|
+
interface CachedLayout {
|
|
146
|
+
width: number;
|
|
147
|
+
height: number;
|
|
148
|
+
boxes: LeafBox[];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Retrieve cached layout by key
|
|
152
|
+
*/
|
|
153
|
+
declare function getCachedLayout(cacheKey: string): CachedLayout | null;
|
|
154
|
+
/**
|
|
155
|
+
* Store layout in cache
|
|
156
|
+
*/
|
|
157
|
+
declare function setCachedLayout(cacheKey: string, layout: CachedLayout, persist?: boolean): void;
|
|
158
|
+
/**
|
|
159
|
+
* Measures the leaf elements of a container DOM tree
|
|
160
|
+
*/
|
|
161
|
+
declare function measureContainer(container: HTMLElement, ignoreSelector?: string): CachedLayout;
|
|
162
|
+
/**
|
|
163
|
+
* Creates and attaches an auto-measured skeleton overlay to a container
|
|
164
|
+
*/
|
|
165
|
+
declare function createAutoMeasureOverlay(container: HTMLElement, options?: AutoMeasureOptions, skeletonProps?: SkeletonProps): {
|
|
166
|
+
overlay: HTMLElement;
|
|
167
|
+
refresh: () => void;
|
|
168
|
+
destroy: () => void;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Veilkit - 12 Spinner Loaders
|
|
173
|
+
* Types: ring, dual-ring, dots, bars, pulse, orbit, wave, bounce,
|
|
174
|
+
* ios-activity, glass-orb, morph, progress-circle
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
declare const SPINNER_TYPES: VeilSpinnerType[];
|
|
178
|
+
/**
|
|
179
|
+
* Creates a DOM spinner element with specified type, size, and colors
|
|
180
|
+
*/
|
|
181
|
+
declare function createSpinner(props?: SpinnerProps): HTMLElement;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Veilkit - Loading Button Controller
|
|
185
|
+
* Inline spinner, preserves exact button dimensions to prevent layout shifts,
|
|
186
|
+
* disables clicks, and applies aria-disabled state.
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
declare function wrapLoadingButton(buttonEl: HTMLButtonElement, props?: LoadingButtonProps): {
|
|
190
|
+
setLoading: (loading: boolean, loadingText?: string) => void;
|
|
191
|
+
destroy: () => void;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Veilkit - Lazy Image & Media Placeholder
|
|
196
|
+
* Renders synchronized skeleton placeholder until image loads,
|
|
197
|
+
* then reveals with smooth blur-up transition and handles error fallback.
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
declare function createLazyImage(props: LazyImageProps): HTMLElement;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Veilkit - Text Loader
|
|
204
|
+
* Animated localized typing text with pulsing ellipsis dots
|
|
205
|
+
*/
|
|
206
|
+
|
|
207
|
+
declare function createTextLoader(props?: TextLoaderProps): HTMLElement;
|
|
208
|
+
|
|
209
|
+
export { ANIMATION_NAMES, type AnimationConfig, AntiFlickerController, type AntiFlickerOptions, AutoMeasureOptions, type CachedLayout, LazyImageProps, type LeafBox, LoadingButtonProps, type RevealOptions, SPINNER_TYPES, SkeletonProps, SpinnerProps, TextLoaderProps, VeilAnimationName, VeilDirection, VeilRevealTransition, VeilSpinnerType, applyReveal, createAutoMeasureOverlay, createLazyImage, createSpinner, createTextLoader, getAnimationKeyframesCSS, getCachedLayout, getStylesCSS, getSyncDelay, getTimelineOrigin, injectStyles, measureContainer, observeOffscreen, parseDurationMs, setCachedLayout, setNonce, setupVisibilityObserver, teardownObservers, wrapLoadingButton };
|