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.
Files changed (57) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +768 -99
  3. package/assets/demo-button.gif +0 -0
  4. package/assets/demo-hero.gif +0 -0
  5. package/assets/demo-presets.gif +0 -0
  6. package/assets/demo-spinners.gif +0 -0
  7. package/dist/angular/index.cjs +280 -14
  8. package/dist/angular/index.cjs.map +1 -1
  9. package/dist/angular/index.d.cts +39 -4
  10. package/dist/angular/index.d.ts +39 -4
  11. package/dist/angular/index.js +280 -14
  12. package/dist/angular/index.js.map +1 -1
  13. package/dist/{controller-Co5bvnaB.d.ts → controller-Cmc3Hp1j.d.ts} +5 -3
  14. package/dist/{controller-5OzP0U8X.d.cts → controller-CzNTbEGd.d.cts} +5 -3
  15. package/dist/element/index.cjs +285 -20
  16. package/dist/element/index.cjs.map +1 -1
  17. package/dist/element/index.d.cts +7 -1
  18. package/dist/element/index.d.ts +7 -1
  19. package/dist/element/index.js +285 -20
  20. package/dist/element/index.js.map +1 -1
  21. package/dist/index.cjs +288 -14
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +36 -11
  24. package/dist/index.d.ts +36 -11
  25. package/dist/index.js +288 -14
  26. package/dist/index.js.map +1 -1
  27. package/dist/native/index.cjs +1 -1
  28. package/dist/native/index.cjs.map +1 -1
  29. package/dist/native/index.d.cts +10 -4
  30. package/dist/native/index.d.ts +10 -4
  31. package/dist/native/index.js +1 -1
  32. package/dist/native/index.js.map +1 -1
  33. package/dist/react/index.cjs +280 -14
  34. package/dist/react/index.cjs.map +1 -1
  35. package/dist/react/index.d.cts +38 -4
  36. package/dist/react/index.d.ts +38 -4
  37. package/dist/react/index.js +280 -14
  38. package/dist/react/index.js.map +1 -1
  39. package/dist/styles.css +133 -1
  40. package/dist/svelte/index.cjs +286 -20
  41. package/dist/svelte/index.cjs.map +1 -1
  42. package/dist/svelte/index.d.cts +9 -2
  43. package/dist/svelte/index.d.ts +9 -2
  44. package/dist/svelte/index.js +286 -20
  45. package/dist/svelte/index.js.map +1 -1
  46. package/dist/themes/index.d.cts +1 -1
  47. package/dist/themes/index.d.ts +1 -1
  48. package/dist/{types-Ciu5e5xt.d.cts → types-D2ryMkLU.d.cts} +45 -5
  49. package/dist/{types-Ciu5e5xt.d.ts → types-D2ryMkLU.d.ts} +45 -5
  50. package/dist/veilkit.min.js +288 -14
  51. package/dist/vue/index.cjs +270 -4
  52. package/dist/vue/index.cjs.map +1 -1
  53. package/dist/vue/index.d.cts +148 -2
  54. package/dist/vue/index.d.ts +148 -2
  55. package/dist/vue/index.js +270 -4
  56. package/dist/vue/index.js.map +1 -1
  57. package/package.json +41 -24
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
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';
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-5OzP0U8X.cjs';
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
- * 12 GPU-Accelerated Animation Definitions (transform & opacity only)
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 12 animations.
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 - 12 Spinner Loaders
173
- * Types: ring, dual-ring, dots, bars, pulse, orbit, wave, bounce,
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
- * Inline spinner, preserves exact button dimensions to prevent layout shifts,
186
- * disables clicks, and applies aria-disabled state.
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
- 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 };
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, 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';
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-Co5bvnaB.js';
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
- * 12 GPU-Accelerated Animation Definitions (transform & opacity only)
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 12 animations.
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 - 12 Spinner Loaders
173
- * Types: ring, dual-ring, dots, bars, pulse, orbit, wave, bounce,
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
- * Inline spinner, preserves exact button dimensions to prevent layout shifts,
186
- * disables clicks, and applies aria-disabled state.
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
- 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 };
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 };