@vantageos/mosaic 0.3.0-alpha.1 → 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 +145 -0
- package/README.md +12 -0
- package/dist/{Alert.schema-BQsZGG6P.d.cts → Alert.schema-LPJE5gFP.d.cts} +31 -1
- package/dist/{Alert.schema-BQsZGG6P.d.ts → Alert.schema-LPJE5gFP.d.ts} +31 -1
- package/dist/MarkdownRenderer.schema-Rx7kIeVA.d.cts +22 -0
- package/dist/MarkdownRenderer.schema-Rx7kIeVA.d.ts +22 -0
- package/dist/ProgressBar.schema-CdVYx0Wq.d.cts +22 -0
- package/dist/ProgressBar.schema-CdVYx0Wq.d.ts +22 -0
- package/dist/StatusBadge.schema-1tOjB4Ir.d.cts +22 -0
- package/dist/StatusBadge.schema-1tOjB4Ir.d.ts +22 -0
- package/dist/artifacts.cjs +126 -2
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.d.cts +3 -21
- package/dist/artifacts.d.ts +3 -21
- package/dist/artifacts.js +126 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/confirmation.cjs +126 -2
- package/dist/confirmation.cjs.map +1 -1
- package/dist/confirmation.d.cts +3 -32
- package/dist/confirmation.d.ts +3 -32
- package/dist/confirmation.js +126 -2
- package/dist/confirmation.js.map +1 -1
- package/dist/display.cjs +129 -2
- package/dist/display.cjs.map +1 -1
- package/dist/display.d.cts +132 -2
- package/dist/display.d.ts +132 -2
- package/dist/display.js +129 -2
- package/dist/display.js.map +1 -1
- package/dist/forms.cjs +20 -17
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +20 -17
- package/dist/forms.js.map +1 -1
- package/dist/index.cjs +129 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +129 -2
- package/dist/index.js.map +1 -1
- package/dist/media.cjs +126 -2
- package/dist/media.cjs.map +1 -1
- package/dist/media.d.cts +3 -21
- package/dist/media.d.ts +3 -21
- package/dist/media.js +126 -2
- package/dist/media.js.map +1 -1
- package/dist/preact/artifacts.d.ts +39 -1
- package/dist/preact/artifacts.js +234 -0
- package/dist/preact/artifacts.js.map +1 -1
- package/dist/preact/confirmation.d.ts +31 -1
- package/dist/preact/confirmation.js +245 -5
- package/dist/preact/confirmation.js.map +1 -1
- package/dist/preact/display.d.ts +127 -1
- package/dist/preact/display.js +419 -11
- package/dist/preact/display.js.map +1 -1
- package/dist/preact/forms.js +22 -19
- package/dist/preact/forms.js.map +1 -1
- package/dist/preact/input.js +2 -2
- package/dist/preact/progress.d.ts +35 -1
- package/dist/preact/progress.js +263 -0
- package/dist/preact/progress.js.map +1 -1
- package/dist/progress.cjs +126 -2
- package/dist/progress.cjs.map +1 -1
- package/dist/progress.d.cts +3 -21
- package/dist/progress.d.ts +3 -21
- package/dist/progress.js +126 -2
- package/dist/progress.js.map +1 -1
- package/dist/react/artifacts.cjs +241 -0
- package/dist/react/artifacts.cjs.map +1 -1
- package/dist/react/artifacts.d.cts +20 -1
- package/dist/react/artifacts.d.ts +20 -1
- package/dist/react/artifacts.js +234 -0
- package/dist/react/artifacts.js.map +1 -1
- package/dist/react/confirmation.cjs +248 -2
- package/dist/react/confirmation.cjs.map +1 -1
- package/dist/react/confirmation.d.cts +3 -3
- package/dist/react/confirmation.d.ts +3 -3
- package/dist/react/confirmation.js +244 -4
- package/dist/react/confirmation.js.map +1 -1
- package/dist/react/display.cjs +418 -2
- package/dist/react/display.cjs.map +1 -1
- package/dist/react/display.d.cts +20 -3
- package/dist/react/display.d.ts +20 -3
- package/dist/react/display.js +413 -4
- package/dist/react/display.js.map +1 -1
- package/dist/react/forms.cjs +20 -17
- package/dist/react/forms.cjs.map +1 -1
- package/dist/react/forms.js +20 -17
- package/dist/react/forms.js.map +1 -1
- package/dist/react/progress.cjs +266 -0
- package/dist/react/progress.cjs.map +1 -1
- package/dist/react/progress.d.cts +17 -1
- package/dist/react/progress.d.ts +17 -1
- package/dist/react/progress.js +263 -0
- package/dist/react/progress.js.map +1 -1
- package/package.json +15 -13
- package/registry.yaml +34 -21
- package/dist/Skeleton.schema-BO0ca2UX.d.cts +0 -135
- package/dist/Skeleton.schema-BO0ca2UX.d.ts +0 -135
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* EmptyState component props schema.
|
|
6
|
-
*
|
|
7
|
-
* Empty-set illustration + title + description + optional CTA.
|
|
8
|
-
* Consumer-driven i18n: caller passes already-localized strings.
|
|
9
|
-
*
|
|
10
|
-
* icon — optional ReactNode / PreactNode passed by the caller
|
|
11
|
-
* title — required heading (h2, consumer-driven i18n)
|
|
12
|
-
* description — optional supporting text
|
|
13
|
-
* action — optional CTA: { label, onClick, variant? }
|
|
14
|
-
*/
|
|
15
|
-
declare const EmptyStatePropsSchema: z.ZodObject<{
|
|
16
|
-
title: z.ZodString;
|
|
17
|
-
description: z.ZodOptional<z.ZodString>;
|
|
18
|
-
action: z.ZodOptional<z.ZodObject<{
|
|
19
|
-
label: z.ZodString;
|
|
20
|
-
variant: z.ZodDefault<z.ZodEnum<["primary", "secondary"]>>;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
label: string;
|
|
23
|
-
variant: "primary" | "secondary";
|
|
24
|
-
}, {
|
|
25
|
-
label: string;
|
|
26
|
-
variant?: "primary" | "secondary" | undefined;
|
|
27
|
-
}>>;
|
|
28
|
-
locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
locale: "en" | "fr";
|
|
31
|
-
title: string;
|
|
32
|
-
description?: string | undefined;
|
|
33
|
-
action?: {
|
|
34
|
-
label: string;
|
|
35
|
-
variant: "primary" | "secondary";
|
|
36
|
-
} | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
title: string;
|
|
39
|
-
locale?: "en" | "fr" | undefined;
|
|
40
|
-
description?: string | undefined;
|
|
41
|
-
action?: {
|
|
42
|
-
label: string;
|
|
43
|
-
variant?: "primary" | "secondary" | undefined;
|
|
44
|
-
} | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
type EmptyStatePropsSchemaInput = z.input<typeof EmptyStatePropsSchema>;
|
|
47
|
-
type EmptyStatePropsSchemaOutput = z.output<typeof EmptyStatePropsSchema>;
|
|
48
|
-
/**
|
|
49
|
-
* Full EmptyState props including framework-specific node types and callback.
|
|
50
|
-
* `icon` and `action.onClick` are excluded from Zod (functions/nodes are not serializable).
|
|
51
|
-
*
|
|
52
|
-
* Note: action.variant is optional for callers — Zod applies "primary" default at parse time.
|
|
53
|
-
*/
|
|
54
|
-
type EmptyStateProps = Omit<EmptyStatePropsSchemaOutput, "action"> & {
|
|
55
|
-
icon?: any;
|
|
56
|
-
action?: {
|
|
57
|
-
label: string;
|
|
58
|
-
variant?: "primary" | "secondary";
|
|
59
|
-
onClick: () => void;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
declare function validateEmptyStateProps(raw: unknown): EmptyStatePropsSchemaOutput;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Skeleton — cross-runtime loading placeholder (React 19 implementation).
|
|
66
|
-
*
|
|
67
|
-
* Accepts `Record<string, unknown>` for MCP postMessage injection safety.
|
|
68
|
-
* Zod validation narrows before render. Invalid props → accessible error span.
|
|
69
|
-
*
|
|
70
|
-
* Animation "none" is auto-applied when prefers-reduced-motion is set (via
|
|
71
|
-
* Tailwind's animate-pulse which respects the media query natively), or by
|
|
72
|
-
* passing animation="none" explicitly.
|
|
73
|
-
*
|
|
74
|
-
* WCAG-AA:
|
|
75
|
-
* - role="status" + aria-busy="true" on the container
|
|
76
|
-
* - aria-label resolves via t() in EN/FR
|
|
77
|
-
* - aria-hidden="true" on individual line spans (status role covers the group)
|
|
78
|
-
*/
|
|
79
|
-
declare function Skeleton(raw: Record<string, unknown>): react_jsx_runtime.JSX.Element;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Skeleton component props schema.
|
|
83
|
-
*
|
|
84
|
-
* variant — shape of the placeholder:
|
|
85
|
-
* "rect" → rectangular block (default)
|
|
86
|
-
* "circle" → circular avatar / icon placeholder
|
|
87
|
-
* "text" → single or multi-line text placeholder
|
|
88
|
-
*
|
|
89
|
-
* width / height — CSS values (string) or pixels (number).
|
|
90
|
-
* "rect" defaults: width="100%", height=100
|
|
91
|
-
* "circle" defaults: width=height (equal, square rendered as circle)
|
|
92
|
-
* "text" defaults: width="100%", height=16
|
|
93
|
-
*
|
|
94
|
-
* count — number of text line spans (only meaningful for variant="text").
|
|
95
|
-
* Default 1. Ignored for rect/circle.
|
|
96
|
-
*
|
|
97
|
-
* animation — shimmer style:
|
|
98
|
-
* "pulse" → opacity pulse (default)
|
|
99
|
-
* "wave" → left-to-right gradient sweep
|
|
100
|
-
* "none" → static placeholder (auto-selected when prefers-reduced-motion)
|
|
101
|
-
*/
|
|
102
|
-
declare const SkeletonPropsSchema: z.ZodObject<{
|
|
103
|
-
variant: z.ZodDefault<z.ZodEnum<["rect", "circle", "text"]>>;
|
|
104
|
-
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
105
|
-
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
106
|
-
count: z.ZodDefault<z.ZodNumber>;
|
|
107
|
-
animation: z.ZodDefault<z.ZodEnum<["pulse", "wave", "none"]>>;
|
|
108
|
-
locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
|
|
109
|
-
}, "strip", z.ZodTypeAny, {
|
|
110
|
-
locale: "en" | "fr";
|
|
111
|
-
variant: "text" | "rect" | "circle";
|
|
112
|
-
count: number;
|
|
113
|
-
animation: "none" | "pulse" | "wave";
|
|
114
|
-
width?: string | number | undefined;
|
|
115
|
-
height?: string | number | undefined;
|
|
116
|
-
}, {
|
|
117
|
-
locale?: "en" | "fr" | undefined;
|
|
118
|
-
width?: string | number | undefined;
|
|
119
|
-
variant?: "text" | "rect" | "circle" | undefined;
|
|
120
|
-
count?: number | undefined;
|
|
121
|
-
height?: string | number | undefined;
|
|
122
|
-
animation?: "none" | "pulse" | "wave" | undefined;
|
|
123
|
-
}>;
|
|
124
|
-
type SkeletonProps = z.infer<typeof SkeletonPropsSchema>;
|
|
125
|
-
declare function validateSkeletonProps(raw: unknown): SkeletonProps;
|
|
126
|
-
/**
|
|
127
|
-
* Resolve final width/height CSS values given the variant and raw props.
|
|
128
|
-
* Centralised here so React + Preact runtimes share identical defaults.
|
|
129
|
-
*/
|
|
130
|
-
declare function resolveSkeletonDimensions(variant: SkeletonProps["variant"], width: SkeletonProps["width"], height: SkeletonProps["height"]): {
|
|
131
|
-
widthCss: string;
|
|
132
|
-
heightCss: string;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export { type EmptyStateProps as E, Skeleton as S, EmptyStatePropsSchema as a, type EmptyStatePropsSchemaInput as b, type EmptyStatePropsSchemaOutput as c, type SkeletonProps as d, SkeletonPropsSchema as e, validateSkeletonProps as f, resolveSkeletonDimensions as r, validateEmptyStateProps as v };
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* EmptyState component props schema.
|
|
6
|
-
*
|
|
7
|
-
* Empty-set illustration + title + description + optional CTA.
|
|
8
|
-
* Consumer-driven i18n: caller passes already-localized strings.
|
|
9
|
-
*
|
|
10
|
-
* icon — optional ReactNode / PreactNode passed by the caller
|
|
11
|
-
* title — required heading (h2, consumer-driven i18n)
|
|
12
|
-
* description — optional supporting text
|
|
13
|
-
* action — optional CTA: { label, onClick, variant? }
|
|
14
|
-
*/
|
|
15
|
-
declare const EmptyStatePropsSchema: z.ZodObject<{
|
|
16
|
-
title: z.ZodString;
|
|
17
|
-
description: z.ZodOptional<z.ZodString>;
|
|
18
|
-
action: z.ZodOptional<z.ZodObject<{
|
|
19
|
-
label: z.ZodString;
|
|
20
|
-
variant: z.ZodDefault<z.ZodEnum<["primary", "secondary"]>>;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
label: string;
|
|
23
|
-
variant: "primary" | "secondary";
|
|
24
|
-
}, {
|
|
25
|
-
label: string;
|
|
26
|
-
variant?: "primary" | "secondary" | undefined;
|
|
27
|
-
}>>;
|
|
28
|
-
locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
locale: "en" | "fr";
|
|
31
|
-
title: string;
|
|
32
|
-
description?: string | undefined;
|
|
33
|
-
action?: {
|
|
34
|
-
label: string;
|
|
35
|
-
variant: "primary" | "secondary";
|
|
36
|
-
} | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
title: string;
|
|
39
|
-
locale?: "en" | "fr" | undefined;
|
|
40
|
-
description?: string | undefined;
|
|
41
|
-
action?: {
|
|
42
|
-
label: string;
|
|
43
|
-
variant?: "primary" | "secondary" | undefined;
|
|
44
|
-
} | undefined;
|
|
45
|
-
}>;
|
|
46
|
-
type EmptyStatePropsSchemaInput = z.input<typeof EmptyStatePropsSchema>;
|
|
47
|
-
type EmptyStatePropsSchemaOutput = z.output<typeof EmptyStatePropsSchema>;
|
|
48
|
-
/**
|
|
49
|
-
* Full EmptyState props including framework-specific node types and callback.
|
|
50
|
-
* `icon` and `action.onClick` are excluded from Zod (functions/nodes are not serializable).
|
|
51
|
-
*
|
|
52
|
-
* Note: action.variant is optional for callers — Zod applies "primary" default at parse time.
|
|
53
|
-
*/
|
|
54
|
-
type EmptyStateProps = Omit<EmptyStatePropsSchemaOutput, "action"> & {
|
|
55
|
-
icon?: any;
|
|
56
|
-
action?: {
|
|
57
|
-
label: string;
|
|
58
|
-
variant?: "primary" | "secondary";
|
|
59
|
-
onClick: () => void;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
declare function validateEmptyStateProps(raw: unknown): EmptyStatePropsSchemaOutput;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Skeleton — cross-runtime loading placeholder (React 19 implementation).
|
|
66
|
-
*
|
|
67
|
-
* Accepts `Record<string, unknown>` for MCP postMessage injection safety.
|
|
68
|
-
* Zod validation narrows before render. Invalid props → accessible error span.
|
|
69
|
-
*
|
|
70
|
-
* Animation "none" is auto-applied when prefers-reduced-motion is set (via
|
|
71
|
-
* Tailwind's animate-pulse which respects the media query natively), or by
|
|
72
|
-
* passing animation="none" explicitly.
|
|
73
|
-
*
|
|
74
|
-
* WCAG-AA:
|
|
75
|
-
* - role="status" + aria-busy="true" on the container
|
|
76
|
-
* - aria-label resolves via t() in EN/FR
|
|
77
|
-
* - aria-hidden="true" on individual line spans (status role covers the group)
|
|
78
|
-
*/
|
|
79
|
-
declare function Skeleton(raw: Record<string, unknown>): react_jsx_runtime.JSX.Element;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Skeleton component props schema.
|
|
83
|
-
*
|
|
84
|
-
* variant — shape of the placeholder:
|
|
85
|
-
* "rect" → rectangular block (default)
|
|
86
|
-
* "circle" → circular avatar / icon placeholder
|
|
87
|
-
* "text" → single or multi-line text placeholder
|
|
88
|
-
*
|
|
89
|
-
* width / height — CSS values (string) or pixels (number).
|
|
90
|
-
* "rect" defaults: width="100%", height=100
|
|
91
|
-
* "circle" defaults: width=height (equal, square rendered as circle)
|
|
92
|
-
* "text" defaults: width="100%", height=16
|
|
93
|
-
*
|
|
94
|
-
* count — number of text line spans (only meaningful for variant="text").
|
|
95
|
-
* Default 1. Ignored for rect/circle.
|
|
96
|
-
*
|
|
97
|
-
* animation — shimmer style:
|
|
98
|
-
* "pulse" → opacity pulse (default)
|
|
99
|
-
* "wave" → left-to-right gradient sweep
|
|
100
|
-
* "none" → static placeholder (auto-selected when prefers-reduced-motion)
|
|
101
|
-
*/
|
|
102
|
-
declare const SkeletonPropsSchema: z.ZodObject<{
|
|
103
|
-
variant: z.ZodDefault<z.ZodEnum<["rect", "circle", "text"]>>;
|
|
104
|
-
width: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
105
|
-
height: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
106
|
-
count: z.ZodDefault<z.ZodNumber>;
|
|
107
|
-
animation: z.ZodDefault<z.ZodEnum<["pulse", "wave", "none"]>>;
|
|
108
|
-
locale: z.ZodDefault<z.ZodEnum<["en", "fr"]>>;
|
|
109
|
-
}, "strip", z.ZodTypeAny, {
|
|
110
|
-
locale: "en" | "fr";
|
|
111
|
-
variant: "text" | "rect" | "circle";
|
|
112
|
-
count: number;
|
|
113
|
-
animation: "none" | "pulse" | "wave";
|
|
114
|
-
width?: string | number | undefined;
|
|
115
|
-
height?: string | number | undefined;
|
|
116
|
-
}, {
|
|
117
|
-
locale?: "en" | "fr" | undefined;
|
|
118
|
-
width?: string | number | undefined;
|
|
119
|
-
variant?: "text" | "rect" | "circle" | undefined;
|
|
120
|
-
count?: number | undefined;
|
|
121
|
-
height?: string | number | undefined;
|
|
122
|
-
animation?: "none" | "pulse" | "wave" | undefined;
|
|
123
|
-
}>;
|
|
124
|
-
type SkeletonProps = z.infer<typeof SkeletonPropsSchema>;
|
|
125
|
-
declare function validateSkeletonProps(raw: unknown): SkeletonProps;
|
|
126
|
-
/**
|
|
127
|
-
* Resolve final width/height CSS values given the variant and raw props.
|
|
128
|
-
* Centralised here so React + Preact runtimes share identical defaults.
|
|
129
|
-
*/
|
|
130
|
-
declare function resolveSkeletonDimensions(variant: SkeletonProps["variant"], width: SkeletonProps["width"], height: SkeletonProps["height"]): {
|
|
131
|
-
widthCss: string;
|
|
132
|
-
heightCss: string;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export { type EmptyStateProps as E, Skeleton as S, EmptyStatePropsSchema as a, type EmptyStatePropsSchemaInput as b, type EmptyStatePropsSchemaOutput as c, type SkeletonProps as d, SkeletonPropsSchema as e, validateSkeletonProps as f, resolveSkeletonDimensions as r, validateEmptyStateProps as v };
|