veilkit 0.1.0 → 0.3.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 +48 -0
- package/README.md +768 -99
- package/assets/demo-button.gif +0 -0
- package/assets/demo-hero.gif +0 -0
- package/assets/demo-presets.gif +0 -0
- package/assets/demo-spinners.gif +0 -0
- package/dist/angular/index.cjs +280 -14
- package/dist/angular/index.cjs.map +1 -1
- package/dist/angular/index.d.cts +39 -4
- package/dist/angular/index.d.ts +39 -4
- package/dist/angular/index.js +280 -14
- package/dist/angular/index.js.map +1 -1
- package/dist/{controller-Co5bvnaB.d.ts → controller-Cmc3Hp1j.d.ts} +5 -3
- package/dist/{controller-5OzP0U8X.d.cts → controller-CzNTbEGd.d.cts} +5 -3
- package/dist/element/index.cjs +285 -20
- package/dist/element/index.cjs.map +1 -1
- package/dist/element/index.d.cts +7 -1
- package/dist/element/index.d.ts +7 -1
- package/dist/element/index.js +285 -20
- package/dist/element/index.js.map +1 -1
- package/dist/index.cjs +288 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -11
- package/dist/index.d.ts +36 -11
- package/dist/index.js +288 -14
- package/dist/index.js.map +1 -1
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.cjs.map +1 -1
- package/dist/native/index.d.cts +10 -4
- package/dist/native/index.d.ts +10 -4
- package/dist/native/index.js +1 -1
- package/dist/native/index.js.map +1 -1
- package/dist/react/index.cjs +280 -14
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +38 -4
- package/dist/react/index.d.ts +38 -4
- package/dist/react/index.js +280 -14
- package/dist/react/index.js.map +1 -1
- package/dist/styles.css +133 -1
- package/dist/svelte/index.cjs +286 -20
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.d.cts +9 -2
- package/dist/svelte/index.d.ts +9 -2
- package/dist/svelte/index.js +286 -20
- package/dist/svelte/index.js.map +1 -1
- package/dist/themes/index.d.cts +1 -1
- package/dist/themes/index.d.ts +1 -1
- package/dist/{types-Ciu5e5xt.d.cts → types-D2ryMkLU.d.cts} +45 -5
- package/dist/{types-Ciu5e5xt.d.ts → types-D2ryMkLU.d.ts} +45 -5
- package/dist/veilkit.min.js +288 -14
- package/dist/vue/index.cjs +270 -4
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.cts +148 -2
- package/dist/vue/index.d.ts +148 -2
- package/dist/vue/index.js +270 -4
- package/dist/vue/index.js.map +1 -1
- package/package.json +41 -24
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as VeilAnimationName,
|
|
2
|
-
export { C as CustomThemeInput, O as OverlayProps,
|
|
1
|
+
import { a as VeilAnimationName, o as VeilDirection, p as VeilRevealTransition, A as AutoMeasureOptions, S as SkeletonProps, f as VeilSpinnerType, c as SpinnerProps, e as ButtonLoadingStyle, L as LoadingButtonProps, B as ButtonStatus, m as LazyImageProps, T as TextLoaderProps, n as CustomSkeletonConfig } from './types-D2ryMkLU.cjs';
|
|
2
|
+
export { j as ButtonPressFeedback, k as ButtonResultAnimation, q as CustomSkeletonNode, r as CustomSkeletonNodeType, C as CustomThemeInput, O as OverlayProps, P as PresetProps, b as ProgressProps, l as SkeletonController, d as VeilGlobalConfig, g as VeilPresetName, i as VeilPrimitiveType, h as VeilShapeStyle, V as VeilThemeName, s as VeilThemeTokens } from './types-D2ryMkLU.cjs';
|
|
3
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-
|
|
4
|
+
export { L as LoadingManager, O as OverlayController, P as PRESET_NAMES, 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-CzNTbEGd.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Veilkit - Animation Engine
|
|
8
|
-
*
|
|
8
|
+
* 30 GPU-Accelerated Animation Definitions (transform & opacity only)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
interface AnimationConfig {
|
|
@@ -17,7 +17,7 @@ interface AnimationConfig {
|
|
|
17
17
|
}
|
|
18
18
|
declare const ANIMATION_NAMES: VeilAnimationName[];
|
|
19
19
|
/**
|
|
20
|
-
* Generates the CSS keyframes and utility rules for all
|
|
20
|
+
* Generates the CSS keyframes and utility rules for all 30 animations.
|
|
21
21
|
* Strictly uses transform and opacity for 60fps GPU execution.
|
|
22
22
|
*/
|
|
23
23
|
declare function getAnimationKeyframesCSS(): string;
|
|
@@ -169,9 +169,8 @@ declare function createAutoMeasureOverlay(container: HTMLElement, options?: Auto
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* Veilkit -
|
|
173
|
-
*
|
|
174
|
-
* ios-activity, glass-orb, morph, progress-circle
|
|
172
|
+
* Veilkit - 30 Spinner Loaders
|
|
173
|
+
* Complete catalog of GPU-accelerated spinners
|
|
175
174
|
*/
|
|
176
175
|
|
|
177
176
|
declare const SPINNER_TYPES: VeilSpinnerType[];
|
|
@@ -182,12 +181,15 @@ declare function createSpinner(props?: SpinnerProps): HTMLElement;
|
|
|
182
181
|
|
|
183
182
|
/**
|
|
184
183
|
* Veilkit - Loading Button Controller
|
|
185
|
-
*
|
|
186
|
-
*
|
|
184
|
+
* 16 Loading Styles, State Machine (idle -> loading -> success | error -> idle),
|
|
185
|
+
* Result Animations (checkmark, cross, shake, success-burst), and Press Feedback.
|
|
187
186
|
*/
|
|
188
187
|
|
|
188
|
+
declare const BUTTON_LOADING_STYLES: ButtonLoadingStyle[];
|
|
189
189
|
declare function wrapLoadingButton(buttonEl: HTMLButtonElement, props?: LoadingButtonProps): {
|
|
190
|
+
setStatus: (status: ButtonStatus, customText?: string) => void;
|
|
190
191
|
setLoading: (loading: boolean, loadingText?: string) => void;
|
|
192
|
+
getStatus: () => ButtonStatus;
|
|
191
193
|
destroy: () => void;
|
|
192
194
|
};
|
|
193
195
|
|
|
@@ -206,4 +208,27 @@ declare function createLazyImage(props: LazyImageProps): HTMLElement;
|
|
|
206
208
|
|
|
207
209
|
declare function createTextLoader(props?: TextLoaderProps): HTMLElement;
|
|
208
210
|
|
|
209
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Veilkit - Custom Skeleton Builder & Declarative Layout Engine
|
|
213
|
+
* Allows developers to create custom skeleton layouts matching their website's exact UI structure.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
declare function createCustomSkeleton(config: CustomSkeletonConfig): HTMLElement;
|
|
217
|
+
declare class SkeletonBuilder {
|
|
218
|
+
private config;
|
|
219
|
+
constructor(options?: Partial<CustomSkeletonConfig>);
|
|
220
|
+
row(builderFn: (row: SkeletonBuilder) => void, gap?: number | string): this;
|
|
221
|
+
col(builderFn: (col: SkeletonBuilder) => void, gap?: number | string): this;
|
|
222
|
+
card(builderFn: (card: SkeletonBuilder) => void, gap?: number | string): this;
|
|
223
|
+
avatar(size?: number | string): this;
|
|
224
|
+
heading(width?: number | string, height?: number | string): this;
|
|
225
|
+
lines(count?: number, gap?: number | string): this;
|
|
226
|
+
button(width?: number | string, height?: number | string): this;
|
|
227
|
+
rect(width?: number | string, height?: number | string, radius?: number | string): this;
|
|
228
|
+
badge(width?: number | string, height?: number | string): this;
|
|
229
|
+
toConfig(): CustomSkeletonConfig;
|
|
230
|
+
build(): HTMLElement;
|
|
231
|
+
toCode(framework?: 'react' | 'vue' | 'svelte' | 'angular' | 'html'): string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export { ANIMATION_NAMES, type AnimationConfig, AntiFlickerController, type AntiFlickerOptions, AutoMeasureOptions, BUTTON_LOADING_STYLES, ButtonLoadingStyle, ButtonStatus, type CachedLayout, CustomSkeletonConfig, LazyImageProps, type LeafBox, LoadingButtonProps, type RevealOptions, SPINNER_TYPES, SkeletonBuilder, SkeletonProps, SpinnerProps, TextLoaderProps, VeilAnimationName, VeilDirection, VeilRevealTransition, VeilSpinnerType, applyReveal, createAutoMeasureOverlay, createCustomSkeleton, createLazyImage, createSpinner, createTextLoader, getAnimationKeyframesCSS, getCachedLayout, getStylesCSS, getSyncDelay, getTimelineOrigin, injectStyles, measureContainer, observeOffscreen, parseDurationMs, setCachedLayout, setNonce, setupVisibilityObserver, teardownObservers, wrapLoadingButton };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as VeilAnimationName,
|
|
2
|
-
export { C as CustomThemeInput, O as OverlayProps,
|
|
1
|
+
import { a as VeilAnimationName, o as VeilDirection, p as VeilRevealTransition, A as AutoMeasureOptions, S as SkeletonProps, f as VeilSpinnerType, c as SpinnerProps, e as ButtonLoadingStyle, L as LoadingButtonProps, B as ButtonStatus, m as LazyImageProps, T as TextLoaderProps, n as CustomSkeletonConfig } from './types-D2ryMkLU.js';
|
|
2
|
+
export { j as ButtonPressFeedback, k as ButtonResultAnimation, q as CustomSkeletonNode, r as CustomSkeletonNodeType, C as CustomThemeInput, O as OverlayProps, P as PresetProps, b as ProgressProps, l as SkeletonController, d as VeilGlobalConfig, g as VeilPresetName, i as VeilPrimitiveType, h as VeilShapeStyle, V as VeilThemeName, s as VeilThemeTokens } from './types-D2ryMkLU.js';
|
|
3
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-
|
|
4
|
+
export { L as LoadingManager, O as OverlayController, P as PRESET_NAMES, 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-Cmc3Hp1j.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Veilkit - Animation Engine
|
|
8
|
-
*
|
|
8
|
+
* 30 GPU-Accelerated Animation Definitions (transform & opacity only)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
interface AnimationConfig {
|
|
@@ -17,7 +17,7 @@ interface AnimationConfig {
|
|
|
17
17
|
}
|
|
18
18
|
declare const ANIMATION_NAMES: VeilAnimationName[];
|
|
19
19
|
/**
|
|
20
|
-
* Generates the CSS keyframes and utility rules for all
|
|
20
|
+
* Generates the CSS keyframes and utility rules for all 30 animations.
|
|
21
21
|
* Strictly uses transform and opacity for 60fps GPU execution.
|
|
22
22
|
*/
|
|
23
23
|
declare function getAnimationKeyframesCSS(): string;
|
|
@@ -169,9 +169,8 @@ declare function createAutoMeasureOverlay(container: HTMLElement, options?: Auto
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* Veilkit -
|
|
173
|
-
*
|
|
174
|
-
* ios-activity, glass-orb, morph, progress-circle
|
|
172
|
+
* Veilkit - 30 Spinner Loaders
|
|
173
|
+
* Complete catalog of GPU-accelerated spinners
|
|
175
174
|
*/
|
|
176
175
|
|
|
177
176
|
declare const SPINNER_TYPES: VeilSpinnerType[];
|
|
@@ -182,12 +181,15 @@ declare function createSpinner(props?: SpinnerProps): HTMLElement;
|
|
|
182
181
|
|
|
183
182
|
/**
|
|
184
183
|
* Veilkit - Loading Button Controller
|
|
185
|
-
*
|
|
186
|
-
*
|
|
184
|
+
* 16 Loading Styles, State Machine (idle -> loading -> success | error -> idle),
|
|
185
|
+
* Result Animations (checkmark, cross, shake, success-burst), and Press Feedback.
|
|
187
186
|
*/
|
|
188
187
|
|
|
188
|
+
declare const BUTTON_LOADING_STYLES: ButtonLoadingStyle[];
|
|
189
189
|
declare function wrapLoadingButton(buttonEl: HTMLButtonElement, props?: LoadingButtonProps): {
|
|
190
|
+
setStatus: (status: ButtonStatus, customText?: string) => void;
|
|
190
191
|
setLoading: (loading: boolean, loadingText?: string) => void;
|
|
192
|
+
getStatus: () => ButtonStatus;
|
|
191
193
|
destroy: () => void;
|
|
192
194
|
};
|
|
193
195
|
|
|
@@ -206,4 +208,27 @@ declare function createLazyImage(props: LazyImageProps): HTMLElement;
|
|
|
206
208
|
|
|
207
209
|
declare function createTextLoader(props?: TextLoaderProps): HTMLElement;
|
|
208
210
|
|
|
209
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Veilkit - Custom Skeleton Builder & Declarative Layout Engine
|
|
213
|
+
* Allows developers to create custom skeleton layouts matching their website's exact UI structure.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
declare function createCustomSkeleton(config: CustomSkeletonConfig): HTMLElement;
|
|
217
|
+
declare class SkeletonBuilder {
|
|
218
|
+
private config;
|
|
219
|
+
constructor(options?: Partial<CustomSkeletonConfig>);
|
|
220
|
+
row(builderFn: (row: SkeletonBuilder) => void, gap?: number | string): this;
|
|
221
|
+
col(builderFn: (col: SkeletonBuilder) => void, gap?: number | string): this;
|
|
222
|
+
card(builderFn: (card: SkeletonBuilder) => void, gap?: number | string): this;
|
|
223
|
+
avatar(size?: number | string): this;
|
|
224
|
+
heading(width?: number | string, height?: number | string): this;
|
|
225
|
+
lines(count?: number, gap?: number | string): this;
|
|
226
|
+
button(width?: number | string, height?: number | string): this;
|
|
227
|
+
rect(width?: number | string, height?: number | string, radius?: number | string): this;
|
|
228
|
+
badge(width?: number | string, height?: number | string): this;
|
|
229
|
+
toConfig(): CustomSkeletonConfig;
|
|
230
|
+
build(): HTMLElement;
|
|
231
|
+
toCode(framework?: 'react' | 'vue' | 'svelte' | 'angular' | 'html'): string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export { ANIMATION_NAMES, type AnimationConfig, AntiFlickerController, type AntiFlickerOptions, AutoMeasureOptions, BUTTON_LOADING_STYLES, ButtonLoadingStyle, ButtonStatus, type CachedLayout, CustomSkeletonConfig, LazyImageProps, type LeafBox, LoadingButtonProps, type RevealOptions, SPINNER_TYPES, SkeletonBuilder, SkeletonProps, SpinnerProps, TextLoaderProps, VeilAnimationName, VeilDirection, VeilRevealTransition, VeilSpinnerType, applyReveal, createAutoMeasureOverlay, createCustomSkeleton, createLazyImage, createSpinner, createTextLoader, getAnimationKeyframesCSS, getCachedLayout, getStylesCSS, getSyncDelay, getTimelineOrigin, injectStyles, measureContainer, observeOffscreen, parseDurationMs, setCachedLayout, setNonce, setupVisibilityObserver, teardownObservers, wrapLoadingButton };
|