@vantageos/mosaic 0.2.1 → 0.2.2
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/dist/preact/artifacts.d.ts +2 -0
- package/dist/preact/confirmation.d.ts +2 -0
- package/dist/preact/display.d.ts +2 -0
- package/dist/preact/index.d.ts +2 -0
- package/dist/preact/input.d.ts +2 -0
- package/dist/preact/media.d.ts +2 -0
- package/dist/preact/progress.d.ts +2 -0
- package/dist/tokens.d.cts +35 -0
- package/dist/tokens.d.ts +35 -0
- package/package.json +2 -1
- package/registry.yaml +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vantageos/mosaic-tokens — design tokens (T3-B implementation).
|
|
3
|
+
*
|
|
4
|
+
* Framework-free, OKLCH-based, mirror of the CSS custom properties in
|
|
5
|
+
* tokens.css. Consumers can opt for either the CSS surface (Tailwind v4
|
|
6
|
+
* + @theme inline) or the JS surface (typed runtime access in JSX styles,
|
|
7
|
+
* Storybook stories, Playwright assertions, snapshot tests).
|
|
8
|
+
*
|
|
9
|
+
* Size targets (.size-limit.json): JS bundle ≤5 KB gz, CSS ≤3 KB gz.
|
|
10
|
+
*
|
|
11
|
+
* Schema invariants (enforced by mosaic-tokens-coherence-test in T3-C):
|
|
12
|
+
* - Every CSS var has a JS counterpart (and vice versa).
|
|
13
|
+
* - Color shades 50 < 500 < 700 monotonic luminance.
|
|
14
|
+
* - Spacing scale ascending, ratio 1.5x average (4 → 64 px).
|
|
15
|
+
* - Typography scale uses 1.25x ratio (12 → 38 px).
|
|
16
|
+
* - Shadow elevation 0 < 1 < 2 < 3 < 4 < 5 monotonic blur radius.
|
|
17
|
+
* - Radii strictly ascending (none → full).
|
|
18
|
+
*/
|
|
19
|
+
interface MosaicTokens {
|
|
20
|
+
readonly colors: Readonly<Record<string, string>>;
|
|
21
|
+
readonly spacing: Readonly<Record<string, string>>;
|
|
22
|
+
readonly typography: Readonly<Record<string, string>>;
|
|
23
|
+
readonly shadows: Readonly<Record<string, string>>;
|
|
24
|
+
readonly radii: Readonly<Record<string, string>>;
|
|
25
|
+
readonly motion: Readonly<Record<string, string>>;
|
|
26
|
+
}
|
|
27
|
+
declare const colors: MosaicTokens["colors"];
|
|
28
|
+
declare const spacing: MosaicTokens["spacing"];
|
|
29
|
+
declare const typography: MosaicTokens["typography"];
|
|
30
|
+
declare const shadows: MosaicTokens["shadows"];
|
|
31
|
+
declare const radii: MosaicTokens["radii"];
|
|
32
|
+
declare const motion: MosaicTokens["motion"];
|
|
33
|
+
declare const tokens: MosaicTokens;
|
|
34
|
+
|
|
35
|
+
export { type MosaicTokens, colors, tokens as default, motion, radii, shadows, spacing, tokens, typography };
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vantageos/mosaic-tokens — design tokens (T3-B implementation).
|
|
3
|
+
*
|
|
4
|
+
* Framework-free, OKLCH-based, mirror of the CSS custom properties in
|
|
5
|
+
* tokens.css. Consumers can opt for either the CSS surface (Tailwind v4
|
|
6
|
+
* + @theme inline) or the JS surface (typed runtime access in JSX styles,
|
|
7
|
+
* Storybook stories, Playwright assertions, snapshot tests).
|
|
8
|
+
*
|
|
9
|
+
* Size targets (.size-limit.json): JS bundle ≤5 KB gz, CSS ≤3 KB gz.
|
|
10
|
+
*
|
|
11
|
+
* Schema invariants (enforced by mosaic-tokens-coherence-test in T3-C):
|
|
12
|
+
* - Every CSS var has a JS counterpart (and vice versa).
|
|
13
|
+
* - Color shades 50 < 500 < 700 monotonic luminance.
|
|
14
|
+
* - Spacing scale ascending, ratio 1.5x average (4 → 64 px).
|
|
15
|
+
* - Typography scale uses 1.25x ratio (12 → 38 px).
|
|
16
|
+
* - Shadow elevation 0 < 1 < 2 < 3 < 4 < 5 monotonic blur radius.
|
|
17
|
+
* - Radii strictly ascending (none → full).
|
|
18
|
+
*/
|
|
19
|
+
interface MosaicTokens {
|
|
20
|
+
readonly colors: Readonly<Record<string, string>>;
|
|
21
|
+
readonly spacing: Readonly<Record<string, string>>;
|
|
22
|
+
readonly typography: Readonly<Record<string, string>>;
|
|
23
|
+
readonly shadows: Readonly<Record<string, string>>;
|
|
24
|
+
readonly radii: Readonly<Record<string, string>>;
|
|
25
|
+
readonly motion: Readonly<Record<string, string>>;
|
|
26
|
+
}
|
|
27
|
+
declare const colors: MosaicTokens["colors"];
|
|
28
|
+
declare const spacing: MosaicTokens["spacing"];
|
|
29
|
+
declare const typography: MosaicTokens["typography"];
|
|
30
|
+
declare const shadows: MosaicTokens["shadows"];
|
|
31
|
+
declare const radii: MosaicTokens["radii"];
|
|
32
|
+
declare const motion: MosaicTokens["motion"];
|
|
33
|
+
declare const tokens: MosaicTokens;
|
|
34
|
+
|
|
35
|
+
export { type MosaicTokens, colors, tokens as default, motion, radii, shadows, spacing, tokens, typography };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantageos/mosaic",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Fleet-wide MCP UI design system — 6-category taxonomy, Zod-validated, registry-gated, streaming-ready, cross-runtime (React 19 + Preact 10).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -194,6 +194,7 @@
|
|
|
194
194
|
"vitest": "3.2.2"
|
|
195
195
|
},
|
|
196
196
|
"scripts": {
|
|
197
|
+
"prebuild": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
197
198
|
"build": "tsup",
|
|
198
199
|
"dev": "tsup --watch",
|
|
199
200
|
"test": "vitest run",
|
package/registry.yaml
CHANGED