veilkit 0.0.0-stage → 0.2.1

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 (64) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/LICENSE +21 -0
  3. package/README.md +801 -2
  4. package/dist/angular/index.cjs +660 -0
  5. package/dist/angular/index.cjs.map +1 -0
  6. package/dist/angular/index.d.cts +113 -0
  7. package/dist/angular/index.d.ts +113 -0
  8. package/dist/angular/index.js +660 -0
  9. package/dist/angular/index.js.map +1 -0
  10. package/dist/cli/index.cjs +25 -0
  11. package/dist/cli/index.cjs.map +1 -0
  12. package/dist/cli/index.d.cts +1 -0
  13. package/dist/cli/index.d.ts +1 -0
  14. package/dist/cli/index.js +25 -0
  15. package/dist/cli/index.js.map +1 -0
  16. package/dist/controller-B6kFsWzi.d.cts +195 -0
  17. package/dist/controller-Ceub9kLC.d.ts +195 -0
  18. package/dist/element/index.cjs +660 -0
  19. package/dist/element/index.cjs.map +1 -0
  20. package/dist/element/index.d.cts +48 -0
  21. package/dist/element/index.d.ts +48 -0
  22. package/dist/element/index.js +660 -0
  23. package/dist/element/index.js.map +1 -0
  24. package/dist/index.cjs +660 -0
  25. package/dist/index.cjs.map +1 -0
  26. package/dist/index.d.cts +211 -0
  27. package/dist/index.d.ts +211 -0
  28. package/dist/index.js +660 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/native/index.cjs +2 -0
  31. package/dist/native/index.cjs.map +1 -0
  32. package/dist/native/index.d.cts +54 -0
  33. package/dist/native/index.d.ts +54 -0
  34. package/dist/native/index.js +2 -0
  35. package/dist/native/index.js.map +1 -0
  36. package/dist/react/index.cjs +660 -0
  37. package/dist/react/index.cjs.map +1 -0
  38. package/dist/react/index.d.cts +121 -0
  39. package/dist/react/index.d.ts +121 -0
  40. package/dist/react/index.js +660 -0
  41. package/dist/react/index.js.map +1 -0
  42. package/dist/styles.css +509 -0
  43. package/dist/svelte/index.cjs +660 -0
  44. package/dist/svelte/index.cjs.map +1 -0
  45. package/dist/svelte/index.d.cts +48 -0
  46. package/dist/svelte/index.d.ts +48 -0
  47. package/dist/svelte/index.js +660 -0
  48. package/dist/svelte/index.js.map +1 -0
  49. package/dist/themes/index.cjs +2 -0
  50. package/dist/themes/index.cjs.map +1 -0
  51. package/dist/themes/index.d.cts +18 -0
  52. package/dist/themes/index.d.ts +18 -0
  53. package/dist/themes/index.js +2 -0
  54. package/dist/themes/index.js.map +1 -0
  55. package/dist/types-CnR-rU97.d.cts +176 -0
  56. package/dist/types-CnR-rU97.d.ts +176 -0
  57. package/dist/veilkit.min.js +659 -0
  58. package/dist/vue/index.cjs +660 -0
  59. package/dist/vue/index.cjs.map +1 -0
  60. package/dist/vue/index.d.cts +512 -0
  61. package/dist/vue/index.d.ts +512 -0
  62. package/dist/vue/index.js +660 -0
  63. package/dist/vue/index.js.map +1 -0
  64. package/package.json +254 -4
@@ -0,0 +1,121 @@
1
+ import * as react from 'react';
2
+ import react__default, { ReactNode, ButtonHTMLAttributes } from 'react';
3
+ import { d as VeilGlobalConfig, V as VeilThemeName, C as CustomThemeInput, a as VeilAnimationName, S as SkeletonProps, A as AutoMeasureOptions, P as PresetProps, c as SpinnerProps, b as ProgressProps, O as OverlayProps, L as LoadingButtonProps, m as LazyImageProps } from '../types-CnR-rU97.cjs';
4
+
5
+ interface VeilContextValue extends VeilGlobalConfig {
6
+ theme?: VeilThemeName | CustomThemeInput;
7
+ animation?: VeilAnimationName;
8
+ }
9
+ interface VeilProviderProps extends VeilGlobalConfig {
10
+ children?: ReactNode;
11
+ }
12
+ declare function VeilProvider({ children, theme, animation, nonce, locale, labels, antiFlicker, }: VeilProviderProps): react.JSX.Element;
13
+ declare function useVeil(): VeilContextValue;
14
+
15
+ interface UseDelayedLoadingOptions {
16
+ delay?: number;
17
+ minVisible?: number;
18
+ }
19
+ /**
20
+ * Suppresses loading state if brief (delay) and prevents rapid flickering (minVisible)
21
+ */
22
+ declare function useDelayedLoading(loading: boolean, options?: UseDelayedLoadingOptions): boolean;
23
+ /**
24
+ * Tracks promise execution and returns state + execute trigger
25
+ */
26
+ declare function useLoading<T, Args extends any[]>(asyncFn: (...args: Args) => Promise<T>, options?: UseDelayedLoadingOptions): {
27
+ loading: boolean;
28
+ rawLoading: boolean;
29
+ data: T | null;
30
+ error: Error | null;
31
+ execute: (...args: Args) => Promise<T>;
32
+ };
33
+ /**
34
+ * Controls top progress bar from React
35
+ */
36
+ declare function useProgress(): {
37
+ start: () => void;
38
+ set: (n: number) => void;
39
+ inc: (amount?: number) => void;
40
+ done: () => void;
41
+ fail: () => void;
42
+ };
43
+
44
+ interface ReactSkeletonProps extends SkeletonProps {
45
+ children?: ReactNode;
46
+ circle?: boolean;
47
+ }
48
+ declare function Skeleton({ type, circle, width, height, radius, count, gap, lines, lastLineWidth, animation, theme, direction, speed, className, style, ariaLabel, children, }: ReactSkeletonProps): react.JSX.Element;
49
+ interface VeilWrapperProps extends AutoMeasureOptions {
50
+ loading: boolean;
51
+ children: ReactNode;
52
+ skeletonProps?: SkeletonProps;
53
+ }
54
+ /**
55
+ * Auto-Measure wrapper component
56
+ * Wraps real content, measures layout upon loading, and reveals cleanly with no hydration mismatches
57
+ */
58
+ declare function Veil({ loading, children, cacheKey, persistCache, ignoreSelector, observeResize, observeMutations, preserveBackground, reveal, revealDuration, revealEasing, delay, minVisible, skeletonProps, }: VeilWrapperProps): react.JSX.Element;
59
+
60
+ declare function SkeletonPreset(props: PresetProps): react.JSX.Element;
61
+ declare const SkeletonCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
62
+ declare const SkeletonProductCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
63
+ declare const SkeletonProductGrid: (props: Omit<PresetProps, "name">) => react.JSX.Element;
64
+ declare const SkeletonList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
65
+ declare const SkeletonListItem: (props: Omit<PresetProps, "name">) => react.JSX.Element;
66
+ declare const SkeletonTable: (props: Omit<PresetProps, "name">) => react.JSX.Element;
67
+ declare const SkeletonProfile: (props: Omit<PresetProps, "name">) => react.JSX.Element;
68
+ declare const SkeletonFeedPost: (props: Omit<PresetProps, "name">) => react.JSX.Element;
69
+ declare const SkeletonArticle: (props: Omit<PresetProps, "name">) => react.JSX.Element;
70
+ declare const SkeletonDashboard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
71
+ declare const SkeletonForm: (props: Omit<PresetProps, "name">) => react.JSX.Element;
72
+ declare const SkeletonNavbar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
73
+ declare const SkeletonSidebar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
74
+ declare const SkeletonProductDetail: (props: Omit<PresetProps, "name">) => react.JSX.Element;
75
+ declare const SkeletonNewsFeed: (props: Omit<PresetProps, "name">) => react.JSX.Element;
76
+ declare const SkeletonInboxList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
77
+ declare const SkeletonNotificationList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
78
+ declare const SkeletonOrderList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
79
+ declare const SkeletonKpiCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
80
+ declare const SkeletonChartBar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
81
+ declare const SkeletonChartLine: (props: Omit<PresetProps, "name">) => react.JSX.Element;
82
+ declare const SkeletonChartPie: (props: Omit<PresetProps, "name">) => react.JSX.Element;
83
+ declare const SkeletonSearchResults: (props: Omit<PresetProps, "name">) => react.JSX.Element;
84
+ declare const SkeletonVideoPlayer: (props: Omit<PresetProps, "name">) => react.JSX.Element;
85
+ declare const SkeletonMusicPlayer: (props: Omit<PresetProps, "name">) => react.JSX.Element;
86
+ declare const SkeletonStoriesRow: (props: Omit<PresetProps, "name">) => react.JSX.Element;
87
+ declare const SkeletonReels: (props: Omit<PresetProps, "name">) => react.JSX.Element;
88
+ declare const SkeletonTabs: (props: Omit<PresetProps, "name">) => react.JSX.Element;
89
+ declare const SkeletonCalendar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
90
+ declare const SkeletonKanban: (props: Omit<PresetProps, "name">) => react.JSX.Element;
91
+ declare const SkeletonTimeline: (props: Omit<PresetProps, "name">) => react.JSX.Element;
92
+ declare const SkeletonMapCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
93
+ declare const SkeletonPricingCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
94
+ declare const SkeletonTestimonial: (props: Omit<PresetProps, "name">) => react.JSX.Element;
95
+ declare const SkeletonFaqAccordion: (props: Omit<PresetProps, "name">) => react.JSX.Element;
96
+
97
+ declare function Spinner(props: SpinnerProps): react.JSX.Element;
98
+
99
+ declare function ProgressBar(props: ProgressProps): react.JSX.Element;
100
+ interface RouteProgressProps {
101
+ color?: string;
102
+ }
103
+ /**
104
+ * Route Progress Bar for Next.js and React SPA routers
105
+ */
106
+ declare function RouteProgress({ color }: RouteProgressProps): null;
107
+
108
+ interface ReactOverlayProps extends OverlayProps {
109
+ children?: react__default.ReactNode;
110
+ }
111
+ declare function Overlay({ visible, blur, opacity, color, spinner, message, lockScroll, className, zIndex, children, }: ReactOverlayProps): react__default.JSX.Element;
112
+
113
+ interface ReactLoadingButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>, LoadingButtonProps {
114
+ children?: ReactNode;
115
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<any> | void;
116
+ }
117
+ declare function LoadingButton({ status, loading, styleType, spinner, spinnerPlacement, loadingText, successText, errorText, resetAfter, progress, pressFeedback, resultAnimation, haptics, disabled, children, className, onStatusChange, onClick, ...rest }: ReactLoadingButtonProps): react.JSX.Element;
118
+
119
+ declare function LazyImage(props: LazyImageProps): react.JSX.Element;
120
+
121
+ export { LazyImage, LoadingButton, Overlay, ProgressBar, type ReactLoadingButtonProps, type ReactOverlayProps, type ReactSkeletonProps, RouteProgress, type RouteProgressProps, Skeleton, SkeletonArticle, SkeletonCalendar, SkeletonCard, SkeletonChartBar, SkeletonChartLine, SkeletonChartPie, SkeletonDashboard, SkeletonFaqAccordion, SkeletonFeedPost, SkeletonForm, SkeletonInboxList, SkeletonKanban, SkeletonKpiCard, SkeletonList, SkeletonListItem, SkeletonMapCard, SkeletonMusicPlayer, SkeletonNavbar, SkeletonNewsFeed, SkeletonNotificationList, SkeletonOrderList, SkeletonPreset, SkeletonPricingCard, SkeletonProductCard, SkeletonProductDetail, SkeletonProductGrid, SkeletonProfile, SkeletonReels, SkeletonSearchResults, SkeletonSidebar, SkeletonStoriesRow, SkeletonTable, SkeletonTabs, SkeletonTestimonial, SkeletonTimeline, SkeletonVideoPlayer, Spinner, type UseDelayedLoadingOptions, Veil, VeilProvider, type VeilProviderProps, type VeilWrapperProps, useDelayedLoading, useLoading, useProgress, useVeil };
@@ -0,0 +1,121 @@
1
+ import * as react from 'react';
2
+ import react__default, { ReactNode, ButtonHTMLAttributes } from 'react';
3
+ import { d as VeilGlobalConfig, V as VeilThemeName, C as CustomThemeInput, a as VeilAnimationName, S as SkeletonProps, A as AutoMeasureOptions, P as PresetProps, c as SpinnerProps, b as ProgressProps, O as OverlayProps, L as LoadingButtonProps, m as LazyImageProps } from '../types-CnR-rU97.js';
4
+
5
+ interface VeilContextValue extends VeilGlobalConfig {
6
+ theme?: VeilThemeName | CustomThemeInput;
7
+ animation?: VeilAnimationName;
8
+ }
9
+ interface VeilProviderProps extends VeilGlobalConfig {
10
+ children?: ReactNode;
11
+ }
12
+ declare function VeilProvider({ children, theme, animation, nonce, locale, labels, antiFlicker, }: VeilProviderProps): react.JSX.Element;
13
+ declare function useVeil(): VeilContextValue;
14
+
15
+ interface UseDelayedLoadingOptions {
16
+ delay?: number;
17
+ minVisible?: number;
18
+ }
19
+ /**
20
+ * Suppresses loading state if brief (delay) and prevents rapid flickering (minVisible)
21
+ */
22
+ declare function useDelayedLoading(loading: boolean, options?: UseDelayedLoadingOptions): boolean;
23
+ /**
24
+ * Tracks promise execution and returns state + execute trigger
25
+ */
26
+ declare function useLoading<T, Args extends any[]>(asyncFn: (...args: Args) => Promise<T>, options?: UseDelayedLoadingOptions): {
27
+ loading: boolean;
28
+ rawLoading: boolean;
29
+ data: T | null;
30
+ error: Error | null;
31
+ execute: (...args: Args) => Promise<T>;
32
+ };
33
+ /**
34
+ * Controls top progress bar from React
35
+ */
36
+ declare function useProgress(): {
37
+ start: () => void;
38
+ set: (n: number) => void;
39
+ inc: (amount?: number) => void;
40
+ done: () => void;
41
+ fail: () => void;
42
+ };
43
+
44
+ interface ReactSkeletonProps extends SkeletonProps {
45
+ children?: ReactNode;
46
+ circle?: boolean;
47
+ }
48
+ declare function Skeleton({ type, circle, width, height, radius, count, gap, lines, lastLineWidth, animation, theme, direction, speed, className, style, ariaLabel, children, }: ReactSkeletonProps): react.JSX.Element;
49
+ interface VeilWrapperProps extends AutoMeasureOptions {
50
+ loading: boolean;
51
+ children: ReactNode;
52
+ skeletonProps?: SkeletonProps;
53
+ }
54
+ /**
55
+ * Auto-Measure wrapper component
56
+ * Wraps real content, measures layout upon loading, and reveals cleanly with no hydration mismatches
57
+ */
58
+ declare function Veil({ loading, children, cacheKey, persistCache, ignoreSelector, observeResize, observeMutations, preserveBackground, reveal, revealDuration, revealEasing, delay, minVisible, skeletonProps, }: VeilWrapperProps): react.JSX.Element;
59
+
60
+ declare function SkeletonPreset(props: PresetProps): react.JSX.Element;
61
+ declare const SkeletonCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
62
+ declare const SkeletonProductCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
63
+ declare const SkeletonProductGrid: (props: Omit<PresetProps, "name">) => react.JSX.Element;
64
+ declare const SkeletonList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
65
+ declare const SkeletonListItem: (props: Omit<PresetProps, "name">) => react.JSX.Element;
66
+ declare const SkeletonTable: (props: Omit<PresetProps, "name">) => react.JSX.Element;
67
+ declare const SkeletonProfile: (props: Omit<PresetProps, "name">) => react.JSX.Element;
68
+ declare const SkeletonFeedPost: (props: Omit<PresetProps, "name">) => react.JSX.Element;
69
+ declare const SkeletonArticle: (props: Omit<PresetProps, "name">) => react.JSX.Element;
70
+ declare const SkeletonDashboard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
71
+ declare const SkeletonForm: (props: Omit<PresetProps, "name">) => react.JSX.Element;
72
+ declare const SkeletonNavbar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
73
+ declare const SkeletonSidebar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
74
+ declare const SkeletonProductDetail: (props: Omit<PresetProps, "name">) => react.JSX.Element;
75
+ declare const SkeletonNewsFeed: (props: Omit<PresetProps, "name">) => react.JSX.Element;
76
+ declare const SkeletonInboxList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
77
+ declare const SkeletonNotificationList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
78
+ declare const SkeletonOrderList: (props: Omit<PresetProps, "name">) => react.JSX.Element;
79
+ declare const SkeletonKpiCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
80
+ declare const SkeletonChartBar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
81
+ declare const SkeletonChartLine: (props: Omit<PresetProps, "name">) => react.JSX.Element;
82
+ declare const SkeletonChartPie: (props: Omit<PresetProps, "name">) => react.JSX.Element;
83
+ declare const SkeletonSearchResults: (props: Omit<PresetProps, "name">) => react.JSX.Element;
84
+ declare const SkeletonVideoPlayer: (props: Omit<PresetProps, "name">) => react.JSX.Element;
85
+ declare const SkeletonMusicPlayer: (props: Omit<PresetProps, "name">) => react.JSX.Element;
86
+ declare const SkeletonStoriesRow: (props: Omit<PresetProps, "name">) => react.JSX.Element;
87
+ declare const SkeletonReels: (props: Omit<PresetProps, "name">) => react.JSX.Element;
88
+ declare const SkeletonTabs: (props: Omit<PresetProps, "name">) => react.JSX.Element;
89
+ declare const SkeletonCalendar: (props: Omit<PresetProps, "name">) => react.JSX.Element;
90
+ declare const SkeletonKanban: (props: Omit<PresetProps, "name">) => react.JSX.Element;
91
+ declare const SkeletonTimeline: (props: Omit<PresetProps, "name">) => react.JSX.Element;
92
+ declare const SkeletonMapCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
93
+ declare const SkeletonPricingCard: (props: Omit<PresetProps, "name">) => react.JSX.Element;
94
+ declare const SkeletonTestimonial: (props: Omit<PresetProps, "name">) => react.JSX.Element;
95
+ declare const SkeletonFaqAccordion: (props: Omit<PresetProps, "name">) => react.JSX.Element;
96
+
97
+ declare function Spinner(props: SpinnerProps): react.JSX.Element;
98
+
99
+ declare function ProgressBar(props: ProgressProps): react.JSX.Element;
100
+ interface RouteProgressProps {
101
+ color?: string;
102
+ }
103
+ /**
104
+ * Route Progress Bar for Next.js and React SPA routers
105
+ */
106
+ declare function RouteProgress({ color }: RouteProgressProps): null;
107
+
108
+ interface ReactOverlayProps extends OverlayProps {
109
+ children?: react__default.ReactNode;
110
+ }
111
+ declare function Overlay({ visible, blur, opacity, color, spinner, message, lockScroll, className, zIndex, children, }: ReactOverlayProps): react__default.JSX.Element;
112
+
113
+ interface ReactLoadingButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'>, LoadingButtonProps {
114
+ children?: ReactNode;
115
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<any> | void;
116
+ }
117
+ declare function LoadingButton({ status, loading, styleType, spinner, spinnerPlacement, loadingText, successText, errorText, resetAfter, progress, pressFeedback, resultAnimation, haptics, disabled, children, className, onStatusChange, onClick, ...rest }: ReactLoadingButtonProps): react.JSX.Element;
118
+
119
+ declare function LazyImage(props: LazyImageProps): react.JSX.Element;
120
+
121
+ export { LazyImage, LoadingButton, Overlay, ProgressBar, type ReactLoadingButtonProps, type ReactOverlayProps, type ReactSkeletonProps, RouteProgress, type RouteProgressProps, Skeleton, SkeletonArticle, SkeletonCalendar, SkeletonCard, SkeletonChartBar, SkeletonChartLine, SkeletonChartPie, SkeletonDashboard, SkeletonFaqAccordion, SkeletonFeedPost, SkeletonForm, SkeletonInboxList, SkeletonKanban, SkeletonKpiCard, SkeletonList, SkeletonListItem, SkeletonMapCard, SkeletonMusicPlayer, SkeletonNavbar, SkeletonNewsFeed, SkeletonNotificationList, SkeletonOrderList, SkeletonPreset, SkeletonPricingCard, SkeletonProductCard, SkeletonProductDetail, SkeletonProductGrid, SkeletonProfile, SkeletonReels, SkeletonSearchResults, SkeletonSidebar, SkeletonStoriesRow, SkeletonTable, SkeletonTabs, SkeletonTestimonial, SkeletonTimeline, SkeletonVideoPlayer, Spinner, type UseDelayedLoadingOptions, Veil, VeilProvider, type VeilProviderProps, type VeilWrapperProps, useDelayedLoading, useLoading, useProgress, useVeil };