veload 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.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +699 -3
  3. package/dist/components/VLoader/index.vue.d.ts +12 -0
  4. package/dist/components/VLoader/loaders.d.ts +38 -0
  5. package/dist/components/VLoader/types.d.ts +28 -0
  6. package/dist/components/VLoading/index.vue.d.ts +21 -0
  7. package/dist/components/VLoading/types.d.ts +27 -0
  8. package/dist/components/VLoadingButton/index.vue.d.ts +21 -0
  9. package/dist/components/VLoadingButton/types.d.ts +29 -0
  10. package/dist/components/VPatternSkeleton/index.vue.d.ts +18 -0
  11. package/dist/components/VPatternSkeleton/presets.d.ts +26 -0
  12. package/dist/components/VPatternSkeleton/types.d.ts +48 -0
  13. package/dist/components/VProgress/index.vue.d.ts +10 -0
  14. package/dist/components/VProgress/types.d.ts +45 -0
  15. package/dist/components/VSkeleton/index.vue.d.ts +7 -0
  16. package/dist/components/VSkeleton/types.d.ts +37 -0
  17. package/dist/components/VSkeletonGroup/index.vue.d.ts +17 -0
  18. package/dist/components/VSkeletonGroup/types.d.ts +8 -0
  19. package/dist/components/VSkeletonSwitch/index.vue.d.ts +31 -0
  20. package/dist/components/VSkeletonSwitch/types.d.ts +5 -0
  21. package/dist/components/VSpinner/index.vue.d.ts +9 -0
  22. package/dist/components/VSpinner/types.d.ts +29 -0
  23. package/dist/composables/useDelayedLoading.d.ts +32 -0
  24. package/dist/composables/useLoading.d.ts +28 -0
  25. package/dist/composables/useLoadingGroup.d.ts +25 -0
  26. package/dist/index.cjs +1 -0
  27. package/dist/index.d.ts +24 -0
  28. package/dist/index.js +851 -0
  29. package/dist/style.css +2 -0
  30. package/dist/utils/css.d.ts +7 -0
  31. package/package.json +56 -6
@@ -0,0 +1,12 @@
1
+ import { type VLoaderProps } from "./types";
2
+ declare const __VLS_export: import("vue").DefineComponent<VLoaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VLoaderProps> & Readonly<{}>, {
3
+ size: number;
4
+ color: string;
5
+ label: string;
6
+ decorative: boolean;
7
+ variant: "bars" | "blob" | "bounce" | "breathing" | "card-flip" | "dot-sweep" | "dots" | "dual-arc" | "element" | "equalizer" | "fallback" | "flow" | "gradient-ring" | "grid" | "hashtag" | "heatmap" | "liquid" | "logo-spin" | "morph" | "orbit-dots" | "orbit" | "plane" | "progress-ring" | "pulse" | "ring" | "ripple" | "rotate" | "signal" | "sliding-bars" | "snake" | "spin-dots" | "spin" | "squares" | "stair" | "typing" | "wave";
8
+ value: number | null;
9
+ duration: number;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { type DefineComponent } from "vue";
2
+ import type { NamedLoaderProps } from "./types";
3
+ export declare const VBarsLoader: DefineComponent<NamedLoaderProps>;
4
+ export declare const VBlobLoader: DefineComponent<NamedLoaderProps>;
5
+ export declare const VBounceLoader: DefineComponent<NamedLoaderProps>;
6
+ export declare const VBreathingLoader: DefineComponent<NamedLoaderProps>;
7
+ export declare const VCardFlipLoader: DefineComponent<NamedLoaderProps>;
8
+ export declare const VDotSweepLoader: DefineComponent<NamedLoaderProps>;
9
+ export declare const VDotsLoader: DefineComponent<NamedLoaderProps>;
10
+ export declare const VDualArcLoader: DefineComponent<NamedLoaderProps>;
11
+ export declare const VElementLoader: DefineComponent<NamedLoaderProps>;
12
+ export declare const VEqualizerLoader: DefineComponent<NamedLoaderProps>;
13
+ export declare const VFallbackLoader: DefineComponent<NamedLoaderProps>;
14
+ export declare const VFlowLoader: DefineComponent<NamedLoaderProps>;
15
+ export declare const VGradientRingLoader: DefineComponent<NamedLoaderProps>;
16
+ export declare const VGridLoader: DefineComponent<NamedLoaderProps>;
17
+ export declare const VHashtagLoader: DefineComponent<NamedLoaderProps>;
18
+ export declare const VHeatmapLoader: DefineComponent<NamedLoaderProps>;
19
+ export declare const VLiquidLoader: DefineComponent<NamedLoaderProps>;
20
+ export declare const VLogoSpinLoader: DefineComponent<NamedLoaderProps>;
21
+ export declare const VMorphLoader: DefineComponent<NamedLoaderProps>;
22
+ export declare const VOrbitDotsLoader: DefineComponent<NamedLoaderProps>;
23
+ export declare const VOrbitLoader: DefineComponent<NamedLoaderProps>;
24
+ export declare const VPlaneLoader: DefineComponent<NamedLoaderProps>;
25
+ export declare const VProgressRingLoader: DefineComponent<NamedLoaderProps>;
26
+ export declare const VPulseLoader: DefineComponent<NamedLoaderProps>;
27
+ export declare const VRingLoader: DefineComponent<NamedLoaderProps>;
28
+ export declare const VRippleLoader: DefineComponent<NamedLoaderProps>;
29
+ export declare const VRotateLoader: DefineComponent<NamedLoaderProps>;
30
+ export declare const VSignalLoader: DefineComponent<NamedLoaderProps>;
31
+ export declare const VSlidingBarsLoader: DefineComponent<NamedLoaderProps>;
32
+ export declare const VSnakeLoader: DefineComponent<NamedLoaderProps>;
33
+ export declare const VSpinDotsLoader: DefineComponent<NamedLoaderProps>;
34
+ export declare const VSpinLoader: DefineComponent<NamedLoaderProps>;
35
+ export declare const VSquaresLoader: DefineComponent<NamedLoaderProps>;
36
+ export declare const VStairLoader: DefineComponent<NamedLoaderProps>;
37
+ export declare const VTypingLoader: DefineComponent<NamedLoaderProps>;
38
+ export declare const VWaveLoader: DefineComponent<NamedLoaderProps>;
@@ -0,0 +1,28 @@
1
+ export declare const loaderVariants: readonly ["bars", "blob", "bounce", "breathing", "card-flip", "dot-sweep", "dots", "dual-arc", "element", "equalizer", "fallback", "flow", "gradient-ring", "grid", "hashtag", "heatmap", "liquid", "logo-spin", "morph", "orbit-dots", "orbit", "plane", "progress-ring", "pulse", "ring", "ripple", "rotate", "signal", "sliding-bars", "snake", "spin-dots", "spin", "squares", "stair", "typing", "wave"];
2
+ export type LoaderVariant = (typeof loaderVariants)[number];
3
+ export interface VLoaderProps {
4
+ /** Visual treatment used by the loader. */
5
+ variant?: LoaderVariant;
6
+ /** Primary color. @default "currentColor" */
7
+ color?: string;
8
+ /** Base size in pixels; repeated treatments may grow to fit count. @default 40 */
9
+ size?: number;
10
+ /** Animation duration in milliseconds. @default 1000 */
11
+ duration?: number;
12
+ /** Accessible name announced by the status region. @default "Loading" */
13
+ label?: string;
14
+ /** Hides the loader from assistive technology. @default false */
15
+ decorative?: boolean;
16
+ /** Repeated marks, rounded and clamped to 1–12. Fixed-shape treatments ignore it. @default 4 */
17
+ count?: number;
18
+ /** Optional completion value for the progress-ring treatment, from 0 to 100. */
19
+ value?: number | null;
20
+ }
21
+ export type NamedLoaderProps = Omit<VLoaderProps, "variant">;
22
+ /** Props shared by treatments that render repeated marks. */
23
+ export type VMarkLoaderProps = Omit<NamedLoaderProps, "value">;
24
+ /** Props specific to the determinate or indeterminate progress-ring treatment. */
25
+ export interface VProgressRingLoaderProps extends Omit<NamedLoaderProps, "value"> {
26
+ /** Completion percentage from 0 to 100. Omit for an indeterminate ring. */
27
+ value?: number | null;
28
+ }
@@ -0,0 +1,21 @@
1
+ import type { VLoadingProps } from "./types";
2
+ declare var __VLS_1: {}, __VLS_3: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ indicator?: (props: typeof __VLS_3) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<VLoadingProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VLoadingProps> & Readonly<{}>, {
9
+ label: string;
10
+ loading: boolean;
11
+ inertContent: boolean;
12
+ indicatorSize: number;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,27 @@
1
+ export interface VLoadingProps {
2
+ /**
3
+ * Whether the loading overlay is active.
4
+ *
5
+ * @default false
6
+ */
7
+ loading?: boolean;
8
+ /**
9
+ * Accessible loading message. The text is visually hidden by default.
10
+ *
11
+ * @default "Loading"
12
+ */
13
+ label?: string;
14
+ /**
15
+ * Makes the wrapped content inert while the overlay is active. This prevents
16
+ * pointer and keyboard interaction with content beneath the overlay.
17
+ *
18
+ * @default true
19
+ */
20
+ inertContent?: boolean;
21
+ /**
22
+ * Diameter of the default spinner in pixels.
23
+ *
24
+ * @default 28
25
+ */
26
+ indicatorSize?: number;
27
+ }
@@ -0,0 +1,21 @@
1
+ import type { LoadingButtonType, VLoadingButtonProps } from "./types";
2
+ declare var __VLS_1: {}, __VLS_3: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ indicator?: (props: typeof __VLS_3) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<VLoadingButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VLoadingButtonProps> & Readonly<{}>, {
9
+ type: LoadingButtonType;
10
+ loading: boolean;
11
+ indicatorSize: number;
12
+ disabled: boolean;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,29 @@
1
+ export type LoadingButtonType = "button" | "submit" | "reset";
2
+ export interface VLoadingButtonProps {
3
+ /**
4
+ * Whether the button is performing work. While loading, the button is
5
+ * disabled, exposes `aria-busy`, and shows an indicator.
6
+ *
7
+ * @default false
8
+ */
9
+ loading?: boolean;
10
+ /**
11
+ * Native disabled state. The button is also disabled while loading.
12
+ *
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ /**
17
+ * Native button type. Defaults to `"button"` so the component does not
18
+ * accidentally submit a surrounding form.
19
+ *
20
+ * @default "button"
21
+ */
22
+ type?: LoadingButtonType;
23
+ /**
24
+ * Diameter of the default indicator in pixels.
25
+ *
26
+ * @default 16
27
+ */
28
+ indicatorSize?: number;
29
+ }
@@ -0,0 +1,18 @@
1
+ import type { SkeletonPattern, VPatternSkeletonProps } from "./types";
2
+ declare const __VLS_export: import("vue").DefineComponent<VPatternSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VPatternSkeletonProps> & Readonly<{}>, {
3
+ pattern: SkeletonPattern;
4
+ animated: boolean;
5
+ rows: number;
6
+ columns: number;
7
+ showMedia: boolean;
8
+ showAvatar: boolean;
9
+ showHeader: boolean;
10
+ showChart: boolean;
11
+ showStats: boolean;
12
+ showSubmit: boolean;
13
+ showRating: boolean;
14
+ showPrice: boolean;
15
+ showCta: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,26 @@
1
+ import { type DefineComponent } from "vue";
2
+ import type { VSkeletonSwitchProps } from "../VSkeletonSwitch/types";
3
+ import type { VArticleSkeletonProps, VCardSkeletonProps, VDashboardSkeletonProps, VFeedSkeletonProps, VFormSkeletonProps, VListSkeletonProps, VMediaCardSkeletonProps, VProductCardSkeletonProps, VProfileSkeletonProps, VTableSkeletonProps } from "./types";
4
+ export declare const VSkeletonLoader: DefineComponent<import("../VSkeleton/types.js").VSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("../VSkeleton/types.js").VSkeletonProps> & Readonly<{}>, {
5
+ variant: import("../VSkeleton/types.js").SkeletonVariant;
6
+ animated: boolean;
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export declare const VArticleSkeleton: DefineComponent<VArticleSkeletonProps>;
9
+ export declare const VCardSkeleton: DefineComponent<VCardSkeletonProps>;
10
+ export declare const VDashboardSkeleton: DefineComponent<VDashboardSkeletonProps>;
11
+ export declare const VFeedSkeleton: DefineComponent<VFeedSkeletonProps>;
12
+ export declare const VFormSkeleton: DefineComponent<VFormSkeletonProps>;
13
+ export declare const VListSkeleton: DefineComponent<VListSkeletonProps>;
14
+ export declare const VMediaCardSkeleton: DefineComponent<VMediaCardSkeletonProps>;
15
+ export declare const VProductCardSkeleton: DefineComponent<VProductCardSkeletonProps>;
16
+ export declare const VProfileSkeleton: DefineComponent<VProfileSkeletonProps>;
17
+ export declare const VTableSkeleton: DefineComponent<VTableSkeletonProps>;
18
+ /**
19
+ * A safe content switcher for Vue skeleton states.
20
+ *
21
+ * Unlike React Loadly's experimental DOM-inference API, this component never
22
+ * executes or inspects slot content. It renders a supplied skeleton slot or a
23
+ * selected Veloader pattern while loading, then renders the default slot.
24
+ */
25
+ export type VAutoSkeletonProps = VSkeletonSwitchProps;
26
+ export declare const VAutoSkeleton: DefineComponent<VAutoSkeletonProps>;
@@ -0,0 +1,48 @@
1
+ export type SkeletonPattern = "lines" | "article" | "card" | "profile" | "list" | "table" | "media" | "form" | "dashboard" | "feed" | "product";
2
+ export interface SkeletonAppearanceProps {
3
+ color?: string;
4
+ highlightColor?: string;
5
+ animated?: boolean;
6
+ label?: string;
7
+ }
8
+ export interface VPatternSkeletonProps extends SkeletonAppearanceProps {
9
+ /** Layout pattern. @default "lines" */
10
+ pattern?: SkeletonPattern;
11
+ /** Repeated lines, items, fields, or data rows (1–12). Table/dashboard headers are separate; dashboard always includes one header. @default 3 */
12
+ rows?: number;
13
+ /** Table column count. @default 3 */
14
+ columns?: number;
15
+ /** Image or media height in pixels or a CSS length. */
16
+ mediaHeight?: number | string;
17
+ /** Avatar diameter in pixels. */
18
+ avatarSize?: number;
19
+ /** Enables optional media blocks where the pattern supports them. @default true */
20
+ showMedia?: boolean;
21
+ /** Enables optional avatar blocks where the pattern supports them. @default true */
22
+ showAvatar?: boolean;
23
+ /** Enables a table header. @default true */
24
+ showHeader?: boolean;
25
+ /** Enables the dashboard chart block. @default true */
26
+ showChart?: boolean;
27
+ /** Enables profile or dashboard statistic blocks. @default true */
28
+ showStats?: boolean;
29
+ /** Enables the form submit block. @default true */
30
+ showSubmit?: boolean;
31
+ /** Enables the product rating block. @default true */
32
+ showRating?: boolean;
33
+ /** Enables the product price block. @default true */
34
+ showPrice?: boolean;
35
+ /** Enables the product call-to-action block. @default true */
36
+ showCta?: boolean;
37
+ }
38
+ export type NamedSkeletonProps = Omit<VPatternSkeletonProps, "pattern">;
39
+ export type VArticleSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight" | "showMedia"> & SkeletonAppearanceProps;
40
+ export type VCardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight" | "showMedia" | "showAvatar"> & SkeletonAppearanceProps;
41
+ export type VDashboardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "columns" | "showChart" | "showStats"> & SkeletonAppearanceProps;
42
+ export type VFeedSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showAvatar"> & SkeletonAppearanceProps;
43
+ export type VFormSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showSubmit"> & SkeletonAppearanceProps;
44
+ export type VListSkeletonProps = Pick<NamedSkeletonProps, "rows" | "showAvatar" | "avatarSize"> & SkeletonAppearanceProps;
45
+ export type VMediaCardSkeletonProps = Pick<NamedSkeletonProps, "rows" | "mediaHeight"> & SkeletonAppearanceProps;
46
+ export type VProductCardSkeletonProps = Pick<NamedSkeletonProps, "mediaHeight" | "showRating" | "showPrice" | "showCta"> & SkeletonAppearanceProps;
47
+ export type VProfileSkeletonProps = Pick<NamedSkeletonProps, "rows" | "avatarSize" | "showStats"> & SkeletonAppearanceProps;
48
+ export type VTableSkeletonProps = Pick<NamedSkeletonProps, "rows" | "columns" | "showHeader"> & SkeletonAppearanceProps;
@@ -0,0 +1,10 @@
1
+ import type { VProgressProps } from "./types";
2
+ declare const __VLS_export: import("vue").DefineComponent<VProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VProgressProps> & Readonly<{}>, {
3
+ label: string;
4
+ height: string | number;
5
+ value: number | null;
6
+ min: number;
7
+ max: number;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,45 @@
1
+ export interface VProgressProps {
2
+ /**
3
+ * Current progress value. Omit, pass `null`, or pass a non-finite value to
4
+ * render an indeterminate progress bar.
5
+ */
6
+ value?: number | null;
7
+ /**
8
+ * Lower bound of the value range.
9
+ *
10
+ * @default 0
11
+ */
12
+ min?: number;
13
+ /**
14
+ * Upper bound of the value range. When `max` is not greater than `min`, the
15
+ * bar renders as indeterminate.
16
+ *
17
+ * @default 100
18
+ */
19
+ max?: number;
20
+ /**
21
+ * Accessible name for the progress bar.
22
+ *
23
+ * @default "Progress"
24
+ */
25
+ label?: string;
26
+ /**
27
+ * Optional human-readable value text, for example `"3 of 10 files"`.
28
+ * Only applied while determinate.
29
+ */
30
+ valueText?: string;
31
+ /**
32
+ * Thickness of the bar as a pixel number or any CSS length.
33
+ *
34
+ * @default 8
35
+ */
36
+ height?: number | string;
37
+ /**
38
+ * Color of the filled portion. Overrides `--v-progress-color`.
39
+ */
40
+ color?: string;
41
+ /**
42
+ * Color of the unfilled track. Overrides `--v-progress-track-color`.
43
+ */
44
+ trackColor?: string;
45
+ }
@@ -0,0 +1,7 @@
1
+ import type { SkeletonVariant, VSkeletonProps } from "./types";
2
+ declare const __VLS_export: import("vue").DefineComponent<VSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSkeletonProps> & Readonly<{}>, {
3
+ variant: SkeletonVariant;
4
+ animated: boolean;
5
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,37 @@
1
+ export type SkeletonVariant = "text" | "rect" | "circle";
2
+ export interface VSkeletonProps {
3
+ /**
4
+ * Shape of the placeholder.
5
+ *
6
+ * @default "text"
7
+ */
8
+ variant?: SkeletonVariant;
9
+ /**
10
+ * Width as a pixel number or any CSS length. Defaults to `100%`, except for
11
+ * circular skeletons, which default to `40px`.
12
+ */
13
+ width?: number | string;
14
+ /**
15
+ * Height as a pixel number or any CSS length. Circular skeletons use a
16
+ * square aspect ratio when no height is supplied.
17
+ */
18
+ height?: number | string;
19
+ /**
20
+ * Border radius as a pixel number or any CSS length. When omitted, a shape
21
+ * appropriate default is used.
22
+ */
23
+ borderRadius?: number | string;
24
+ /**
25
+ * Enables the shimmer animation. Reduced-motion preferences always disable
26
+ * the animation in CSS.
27
+ *
28
+ * @default true
29
+ */
30
+ animated?: boolean;
31
+ /**
32
+ * Optional accessible name. When supplied, the skeleton becomes a
33
+ * `role="status"` placeholder. When omitted, it is decorative and hidden
34
+ * from assistive technology.
35
+ */
36
+ label?: string;
37
+ }
@@ -0,0 +1,17 @@
1
+ import type { VSkeletonGroupProps } from "./types";
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<VSkeletonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSkeletonGroupProps> & Readonly<{}>, {
7
+ decorative: boolean;
8
+ gap: string;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,8 @@
1
+ export interface VSkeletonGroupProps {
2
+ /** Accessible loading message for the complete group. */
3
+ label?: string;
4
+ /** CSS gap between child placeholders. @default "0.75rem" */
5
+ gap?: string;
6
+ /** Hides the entire group from assistive technology. @default false */
7
+ decorative?: boolean;
8
+ }
@@ -0,0 +1,31 @@
1
+ import type { VSkeletonSwitchProps } from "./types";
2
+ declare var __VLS_1: {}, __VLS_3: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ skeleton?: (props: typeof __VLS_3) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<VSkeletonSwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSkeletonSwitchProps> & Readonly<{}>, {
9
+ label: string;
10
+ pattern: import("../VPatternSkeleton/types.js").SkeletonPattern;
11
+ animated: boolean;
12
+ loading: boolean;
13
+ rows: number;
14
+ showMedia: boolean;
15
+ showAvatar: boolean;
16
+ showHeader: boolean;
17
+ showChart: boolean;
18
+ showStats: boolean;
19
+ showSubmit: boolean;
20
+ showRating: boolean;
21
+ showPrice: boolean;
22
+ showCta: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,5 @@
1
+ import type { VPatternSkeletonProps } from "../VPatternSkeleton/types";
2
+ export interface VSkeletonSwitchProps extends VPatternSkeletonProps {
3
+ /** Whether to show the skeleton slot or pattern. @default true */
4
+ loading?: boolean;
5
+ }
@@ -0,0 +1,9 @@
1
+ import type { VSpinnerProps } from "./types";
2
+ declare const __VLS_export: import("vue").DefineComponent<VSpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VSpinnerProps> & Readonly<{}>, {
3
+ size: number;
4
+ color: string;
5
+ label: string;
6
+ decorative: boolean;
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,29 @@
1
+ export interface VSpinnerProps {
2
+ /**
3
+ * Diameter of the spinner in pixels. Non-finite and negative values are
4
+ * safely normalized.
5
+ *
6
+ * @default 24
7
+ */
8
+ size?: number;
9
+ /**
10
+ * Accent color of the active edge. The remaining track uses
11
+ * `--v-spinner-track-color` (falling back to `currentColor`).
12
+ *
13
+ * @default "currentColor"
14
+ */
15
+ color?: string;
16
+ /**
17
+ * Accessible name announced by the status element.
18
+ *
19
+ * @default "Loading"
20
+ */
21
+ label?: string;
22
+ /**
23
+ * Hides the spinner from assistive technology. Use this when an ancestor
24
+ * already exposes a loading status, such as `VLoading`.
25
+ *
26
+ * @default false
27
+ */
28
+ decorative?: boolean;
29
+ }
@@ -0,0 +1,32 @@
1
+ import type { UseLoadingReturn } from "./useLoading";
2
+ export interface UseDelayedLoadingOptions {
3
+ /**
4
+ * Delay in milliseconds before the loading indicator becomes visible.
5
+ * Negative values are treated as `0`; non-finite values use the default.
6
+ *
7
+ * @default 200
8
+ */
9
+ delay?: number;
10
+ /**
11
+ * Minimum time in milliseconds the loading indicator remains visible once
12
+ * it has appeared. This prevents a brief flash when an operation finishes
13
+ * just after the delay. `0` disables the minimum.
14
+ *
15
+ * The minimum is measured from the moment the indicator becomes visible,
16
+ * not from the moment the operation starts.
17
+ *
18
+ * @default 0
19
+ */
20
+ minVisibleDuration?: number;
21
+ }
22
+ export type UseDelayedLoadingReturn = UseLoadingReturn;
23
+ /**
24
+ * Tracks asynchronous operations like {@link useLoading}, but delays showing
25
+ * the loading indicator until the work has remained pending for `delay`
26
+ * milliseconds.
27
+ *
28
+ * The operation itself starts immediately. Once visible, the indicator can be
29
+ * kept on screen for at least `minVisibleDuration` milliseconds to avoid a
30
+ * short flash.
31
+ */
32
+ export declare function useDelayedLoading(options?: UseDelayedLoadingOptions | number): UseDelayedLoadingReturn;
@@ -0,0 +1,28 @@
1
+ import { type Ref } from "vue";
2
+ /**
3
+ * Reactive state returned by {@link useLoading}.
4
+ */
5
+ export interface UseLoadingReturn {
6
+ /**
7
+ * `true` while at least one tracked operation is pending.
8
+ */
9
+ isLoading: Readonly<Ref<boolean>>;
10
+ /**
11
+ * Number of currently pending operations for this instance.
12
+ */
13
+ pendingCount: Readonly<Ref<number>>;
14
+ /**
15
+ * Runs an asynchronous operation and tracks it until it settles.
16
+ *
17
+ * The operation's return value and rejection reason are preserved.
18
+ */
19
+ execute: <T>(operation: () => Promise<T>) => Promise<T>;
20
+ }
21
+ /**
22
+ * Tracks concurrent asynchronous operations for a single loading state.
23
+ *
24
+ * Each call to `execute` increments the pending count before invoking the
25
+ * operation and decrements it in a `finally` block. The operation result or
26
+ * error is passed through unchanged.
27
+ */
28
+ export declare function useLoading(): UseLoadingReturn;
@@ -0,0 +1,25 @@
1
+ import { type ComputedRef, type Ref } from "vue";
2
+ /**
3
+ * A reactive boolean source or a getter that returns one.
4
+ *
5
+ * Typically this is the `isLoading` ref from another composable instance.
6
+ */
7
+ export type LoadingSource = Readonly<Ref<boolean>> | (() => boolean);
8
+ export interface UseLoadingGroupReturn {
9
+ /**
10
+ * `true` when at least one source is active.
11
+ */
12
+ isLoading: ComputedRef<boolean>;
13
+ /**
14
+ * Number of sources that are currently active.
15
+ */
16
+ activeCount: ComputedRef<number>;
17
+ }
18
+ /**
19
+ * Aggregates independent loading sources into a single loading state.
20
+ *
21
+ * Pass an array for a fixed set of sources, or a getter when the set of
22
+ * sources changes dynamically. The group does not own the sources; it only
23
+ * reads them.
24
+ */
25
+ export declare function useLoadingGroup(sources: readonly LoadingSource[] | (() => readonly LoadingSource[])): UseLoadingGroupReturn;