@vllnt/ui-core 0.1.0-canary.20260917105553.sha7466647a4ba5
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 +9 -0
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/component-contracts.json +38 -0
- package/component-contracts.schema.json +76 -0
- package/dist/index.d.ts +495 -0
- package/dist/index.js +530 -0
- package/package.json +49 -0
- package/tokens.json +278 -0
- package/tokens.schema.json +162 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 vllnt
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @vllnt/ui-core
|
|
2
|
+
|
|
3
|
+
Platform-neutral design tokens and portable component contracts shared by the VLLNT UI web and React Native renderers.
|
|
4
|
+
|
|
5
|
+
> Experimental and source-only. The first synchronized `canary` publication with `@vllnt/ui-native` is planned but is not available yet.
|
|
6
|
+
|
|
7
|
+
The package base is **0.1.0**. Core and Native will use the same `0.1.0-canary.<run>.sha<commit>` prerelease; this base does not establish npm availability. Workflow publication is unconditionally disabled pending a separate hardening/enabling review. Stable promotion also requires a separate reviewed change after verification; see [releasing](../../docs/RELEASING.md).
|
|
8
|
+
|
|
9
|
+
## Planned install
|
|
10
|
+
|
|
11
|
+
After the first canary publication:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @vllnt/ui-core@canary
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Until then, use this package only from the repository workspace.
|
|
18
|
+
|
|
19
|
+
## Use
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
createNativeTheme,
|
|
24
|
+
designTokens,
|
|
25
|
+
type ButtonVariant,
|
|
26
|
+
} from "@vllnt/ui-core";
|
|
27
|
+
|
|
28
|
+
const theme = createNativeTheme("dark", {
|
|
29
|
+
colors: { primary: "#f5f5f5" },
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Exports include the authored token object, generated React Native-compatible themes, and renderer-neutral option unions for the pilot components. The JSON contracts are also available from `@vllnt/ui-core/tokens.json` and `@vllnt/ui-core/contracts.json`.
|
|
34
|
+
|
|
35
|
+
`packages/design/tokens.json` and `packages/design/component-contracts.json` are the authored sources. Run `pnpm -F @vllnt/design-source tokens:generate` after changing either file. Generated artifacts are committed and checked for drift in CI.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./component-contracts.schema.json",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"components": {
|
|
5
|
+
"badge": {
|
|
6
|
+
"variants": ["default", "destructive", "outline", "secondary"]
|
|
7
|
+
},
|
|
8
|
+
"button": {
|
|
9
|
+
"sizes": ["default", "icon", "lg", "sm"],
|
|
10
|
+
"variants": [
|
|
11
|
+
"default",
|
|
12
|
+
"destructive",
|
|
13
|
+
"ghost",
|
|
14
|
+
"link",
|
|
15
|
+
"outline",
|
|
16
|
+
"secondary"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"card": {
|
|
20
|
+
"parts": [
|
|
21
|
+
"Card",
|
|
22
|
+
"CardHeader",
|
|
23
|
+
"CardTitle",
|
|
24
|
+
"CardDescription",
|
|
25
|
+
"CardContent",
|
|
26
|
+
"CardFooter"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"heading": {
|
|
30
|
+
"levels": [1, 2, 3, 4, 5, 6]
|
|
31
|
+
},
|
|
32
|
+
"text": {
|
|
33
|
+
"sizes": ["base", "caption", "lead", "small"],
|
|
34
|
+
"tones": ["default", "muted"],
|
|
35
|
+
"weights": ["medium", "normal", "semibold"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "VLLNT UI portable component contracts",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["version", "components"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": { "type": "string" },
|
|
8
|
+
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
9
|
+
"components": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["badge", "button", "card", "heading", "text"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"badge": { "$ref": "#/$defs/variants" },
|
|
14
|
+
"button": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["sizes", "variants"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"sizes": { "$ref": "#/$defs/stringList" },
|
|
19
|
+
"variants": { "$ref": "#/$defs/stringList" }
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false
|
|
22
|
+
},
|
|
23
|
+
"card": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": ["parts"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"parts": { "$ref": "#/$defs/stringList" }
|
|
28
|
+
},
|
|
29
|
+
"additionalProperties": false
|
|
30
|
+
},
|
|
31
|
+
"heading": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["levels"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"levels": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "integer", "minimum": 1, "maximum": 6 },
|
|
38
|
+
"minItems": 6,
|
|
39
|
+
"maxItems": 6,
|
|
40
|
+
"uniqueItems": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
},
|
|
45
|
+
"text": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": ["sizes", "tones", "weights"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"sizes": { "$ref": "#/$defs/stringList" },
|
|
50
|
+
"tones": { "$ref": "#/$defs/stringList" },
|
|
51
|
+
"weights": { "$ref": "#/$defs/stringList" }
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"$defs": {
|
|
60
|
+
"stringList": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": { "type": "string", "minLength": 1 },
|
|
63
|
+
"minItems": 1,
|
|
64
|
+
"uniqueItems": true
|
|
65
|
+
},
|
|
66
|
+
"variants": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["variants"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"variants": { "$ref": "#/$defs/stringList" }
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
declare const designTokens: {
|
|
2
|
+
readonly $schema: "./tokens.schema.json";
|
|
3
|
+
readonly name: "VLLNT UI";
|
|
4
|
+
readonly version: "0.4.0";
|
|
5
|
+
readonly source: {
|
|
6
|
+
readonly guide: "../../DESIGN.md";
|
|
7
|
+
readonly theme: "../ui/themes/default.css";
|
|
8
|
+
};
|
|
9
|
+
readonly color: {
|
|
10
|
+
readonly format: "oklch-channel";
|
|
11
|
+
readonly semantic: {
|
|
12
|
+
readonly background: {
|
|
13
|
+
readonly cssVariable: "--background";
|
|
14
|
+
readonly light: "1 0 0";
|
|
15
|
+
readonly dark: "0 0 0";
|
|
16
|
+
readonly role: "Page and app surface";
|
|
17
|
+
};
|
|
18
|
+
readonly foreground: {
|
|
19
|
+
readonly cssVariable: "--foreground";
|
|
20
|
+
readonly light: "0.1445 0 0";
|
|
21
|
+
readonly dark: "0.9848 0 0";
|
|
22
|
+
readonly role: "Primary text and icon color";
|
|
23
|
+
};
|
|
24
|
+
readonly card: {
|
|
25
|
+
readonly cssVariable: "--card";
|
|
26
|
+
readonly light: "1 0 0";
|
|
27
|
+
readonly dark: "0.1445 0 0";
|
|
28
|
+
readonly role: "Card and contained surface";
|
|
29
|
+
};
|
|
30
|
+
readonly cardForeground: {
|
|
31
|
+
readonly cssVariable: "--card-foreground";
|
|
32
|
+
readonly light: "0.1445 0 0";
|
|
33
|
+
readonly dark: "0.9848 0 0";
|
|
34
|
+
readonly role: "Text on card surfaces";
|
|
35
|
+
};
|
|
36
|
+
readonly popover: {
|
|
37
|
+
readonly cssVariable: "--popover";
|
|
38
|
+
readonly light: "1 0 0";
|
|
39
|
+
readonly dark: "0.1445 0 0";
|
|
40
|
+
readonly role: "Popover, menu, and floating surface";
|
|
41
|
+
};
|
|
42
|
+
readonly popoverForeground: {
|
|
43
|
+
readonly cssVariable: "--popover-foreground";
|
|
44
|
+
readonly light: "0.1445 0 0";
|
|
45
|
+
readonly dark: "0.9848 0 0";
|
|
46
|
+
readonly role: "Text on popover surfaces";
|
|
47
|
+
};
|
|
48
|
+
readonly primary: {
|
|
49
|
+
readonly cssVariable: "--primary";
|
|
50
|
+
readonly light: "0.2044 0 0";
|
|
51
|
+
readonly dark: "0.9848 0 0";
|
|
52
|
+
readonly role: "Primary action surface";
|
|
53
|
+
};
|
|
54
|
+
readonly primaryForeground: {
|
|
55
|
+
readonly cssVariable: "--primary-foreground";
|
|
56
|
+
readonly light: "0.9848 0 0";
|
|
57
|
+
readonly dark: "0.2044 0 0";
|
|
58
|
+
readonly role: "Text on primary action surfaces";
|
|
59
|
+
};
|
|
60
|
+
readonly secondary: {
|
|
61
|
+
readonly cssVariable: "--secondary";
|
|
62
|
+
readonly light: "0.9703 0 0";
|
|
63
|
+
readonly dark: "0.2686 0 0";
|
|
64
|
+
readonly role: "Secondary action surface";
|
|
65
|
+
};
|
|
66
|
+
readonly secondaryForeground: {
|
|
67
|
+
readonly cssVariable: "--secondary-foreground";
|
|
68
|
+
readonly light: "0.2044 0 0";
|
|
69
|
+
readonly dark: "0.9848 0 0";
|
|
70
|
+
readonly role: "Text on secondary action surfaces";
|
|
71
|
+
};
|
|
72
|
+
readonly muted: {
|
|
73
|
+
readonly cssVariable: "--muted";
|
|
74
|
+
readonly light: "0.9703 0 0";
|
|
75
|
+
readonly dark: "0.2686 0 0";
|
|
76
|
+
readonly role: "Subtle surface";
|
|
77
|
+
};
|
|
78
|
+
readonly mutedForeground: {
|
|
79
|
+
readonly cssVariable: "--muted-foreground";
|
|
80
|
+
readonly light: "0.5555 0 0";
|
|
81
|
+
readonly dark: "0.7153 0 0";
|
|
82
|
+
readonly role: "Secondary text";
|
|
83
|
+
};
|
|
84
|
+
readonly accent: {
|
|
85
|
+
readonly cssVariable: "--accent";
|
|
86
|
+
readonly light: "0.9703 0 0";
|
|
87
|
+
readonly dark: "0.2686 0 0";
|
|
88
|
+
readonly role: "Hover and active surface";
|
|
89
|
+
};
|
|
90
|
+
readonly accentForeground: {
|
|
91
|
+
readonly cssVariable: "--accent-foreground";
|
|
92
|
+
readonly light: "0.2044 0 0";
|
|
93
|
+
readonly dark: "0.9848 0 0";
|
|
94
|
+
readonly role: "Text on accent surfaces";
|
|
95
|
+
};
|
|
96
|
+
readonly destructive: {
|
|
97
|
+
readonly cssVariable: "--destructive";
|
|
98
|
+
readonly light: "0.6368 0.2078 25.326";
|
|
99
|
+
readonly dark: "0.3959 0.1331 25.721";
|
|
100
|
+
readonly role: "Destructive action and error surface";
|
|
101
|
+
};
|
|
102
|
+
readonly destructiveForeground: {
|
|
103
|
+
readonly cssVariable: "--destructive-foreground";
|
|
104
|
+
readonly light: "0.9848 0 0";
|
|
105
|
+
readonly dark: "0.9848 0 0";
|
|
106
|
+
readonly role: "Text on destructive surfaces";
|
|
107
|
+
};
|
|
108
|
+
readonly border: {
|
|
109
|
+
readonly cssVariable: "--border";
|
|
110
|
+
readonly light: "0.9219 0 0";
|
|
111
|
+
readonly dark: "0.2686 0 0";
|
|
112
|
+
readonly role: "Hairline divider";
|
|
113
|
+
};
|
|
114
|
+
readonly input: {
|
|
115
|
+
readonly cssVariable: "--input";
|
|
116
|
+
readonly light: "0.9219 0 0";
|
|
117
|
+
readonly dark: "0.2686 0 0";
|
|
118
|
+
readonly role: "Input border";
|
|
119
|
+
};
|
|
120
|
+
readonly ring: {
|
|
121
|
+
readonly cssVariable: "--ring";
|
|
122
|
+
readonly light: "0.1445 0 0";
|
|
123
|
+
readonly dark: "0.8697 0 0";
|
|
124
|
+
readonly role: "Focus ring";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly typography: {
|
|
129
|
+
readonly fontFamily: {
|
|
130
|
+
readonly sans: {
|
|
131
|
+
readonly cssVariable: "--font-sans";
|
|
132
|
+
readonly value: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
133
|
+
readonly role: "Body + UI text";
|
|
134
|
+
};
|
|
135
|
+
readonly display: {
|
|
136
|
+
readonly cssVariable: "--font-display";
|
|
137
|
+
readonly value: "var(--font-sans)";
|
|
138
|
+
readonly role: "Heading + Display face — override per theme for a brand type identity (defaults to sans)";
|
|
139
|
+
};
|
|
140
|
+
readonly mono: {
|
|
141
|
+
readonly cssVariable: "--font-mono";
|
|
142
|
+
readonly value: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace";
|
|
143
|
+
readonly role: "Code + tabular";
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly fontWeight: {
|
|
147
|
+
readonly heading: {
|
|
148
|
+
readonly cssVariable: "--font-weight-heading";
|
|
149
|
+
readonly value: 600;
|
|
150
|
+
readonly role: "Heading primitive weight — theme-overridable";
|
|
151
|
+
};
|
|
152
|
+
readonly display: {
|
|
153
|
+
readonly cssVariable: "--font-weight-display";
|
|
154
|
+
readonly value: 600;
|
|
155
|
+
readonly role: "Display primitive weight — theme-overridable";
|
|
156
|
+
};
|
|
157
|
+
readonly body: {
|
|
158
|
+
readonly value: 400;
|
|
159
|
+
};
|
|
160
|
+
readonly caption: {
|
|
161
|
+
readonly value: 500;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly scale: {
|
|
165
|
+
readonly display: {
|
|
166
|
+
readonly cssVariable: "--font-size-display";
|
|
167
|
+
readonly fontSize: "3.75rem";
|
|
168
|
+
readonly lineHeight: "1.05";
|
|
169
|
+
readonly lineHeightCssVariable: "--line-height-display";
|
|
170
|
+
};
|
|
171
|
+
readonly h1: {
|
|
172
|
+
readonly cssVariable: "--font-size-h1";
|
|
173
|
+
readonly fontSize: "3rem";
|
|
174
|
+
readonly lineHeight: "1.1";
|
|
175
|
+
readonly lineHeightCssVariable: "--line-height-h1";
|
|
176
|
+
};
|
|
177
|
+
readonly h2: {
|
|
178
|
+
readonly cssVariable: "--font-size-h2";
|
|
179
|
+
readonly fontSize: "2.25rem";
|
|
180
|
+
readonly lineHeight: "1.2";
|
|
181
|
+
readonly lineHeightCssVariable: "--line-height-h2";
|
|
182
|
+
};
|
|
183
|
+
readonly h3: {
|
|
184
|
+
readonly cssVariable: "--font-size-h3";
|
|
185
|
+
readonly fontSize: "1.875rem";
|
|
186
|
+
readonly lineHeight: "1.25";
|
|
187
|
+
readonly lineHeightCssVariable: "--line-height-h3";
|
|
188
|
+
};
|
|
189
|
+
readonly h4: {
|
|
190
|
+
readonly cssVariable: "--font-size-h4";
|
|
191
|
+
readonly fontSize: "1.5rem";
|
|
192
|
+
readonly lineHeight: "1.3";
|
|
193
|
+
readonly lineHeightCssVariable: "--line-height-h4";
|
|
194
|
+
};
|
|
195
|
+
readonly h5: {
|
|
196
|
+
readonly cssVariable: "--font-size-h5";
|
|
197
|
+
readonly fontSize: "1.25rem";
|
|
198
|
+
readonly lineHeight: "1.4";
|
|
199
|
+
readonly lineHeightCssVariable: "--line-height-h5";
|
|
200
|
+
};
|
|
201
|
+
readonly h6: {
|
|
202
|
+
readonly cssVariable: "--font-size-h6";
|
|
203
|
+
readonly fontSize: "1.125rem";
|
|
204
|
+
readonly lineHeight: "1.5";
|
|
205
|
+
readonly lineHeightCssVariable: "--line-height-h6";
|
|
206
|
+
};
|
|
207
|
+
readonly bodyLarge: {
|
|
208
|
+
readonly cssVariable: "--font-size-body-lg";
|
|
209
|
+
readonly fontSize: "1.125rem";
|
|
210
|
+
readonly lineHeight: "1.7";
|
|
211
|
+
readonly lineHeightCssVariable: "--line-height-body-lg";
|
|
212
|
+
};
|
|
213
|
+
readonly body: {
|
|
214
|
+
readonly cssVariable: "--font-size-body";
|
|
215
|
+
readonly fontSize: "1rem";
|
|
216
|
+
readonly lineHeight: "1.6";
|
|
217
|
+
readonly lineHeightCssVariable: "--line-height-body";
|
|
218
|
+
};
|
|
219
|
+
readonly bodySmall: {
|
|
220
|
+
readonly cssVariable: "--font-size-body-sm";
|
|
221
|
+
readonly fontSize: "0.875rem";
|
|
222
|
+
readonly lineHeight: "1.5";
|
|
223
|
+
readonly lineHeightCssVariable: "--line-height-body-sm";
|
|
224
|
+
};
|
|
225
|
+
readonly caption: {
|
|
226
|
+
readonly cssVariable: "--font-size-caption";
|
|
227
|
+
readonly fontSize: "0.75rem";
|
|
228
|
+
readonly lineHeight: "1.4";
|
|
229
|
+
readonly lineHeightCssVariable: "--line-height-caption";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
readonly spacing: {
|
|
234
|
+
readonly unit: "4px";
|
|
235
|
+
readonly scale: {
|
|
236
|
+
readonly "1": "0.25rem";
|
|
237
|
+
readonly "2": "0.5rem";
|
|
238
|
+
readonly "3": "0.75rem";
|
|
239
|
+
readonly "4": "1rem";
|
|
240
|
+
readonly "6": "1.5rem";
|
|
241
|
+
readonly "8": "2rem";
|
|
242
|
+
readonly "12": "3rem";
|
|
243
|
+
readonly "16": "4rem";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
readonly radius: {
|
|
247
|
+
readonly none: "0";
|
|
248
|
+
readonly sm: "0.25rem";
|
|
249
|
+
readonly md: "0.5rem";
|
|
250
|
+
readonly lg: "0.75rem";
|
|
251
|
+
readonly full: "9999px";
|
|
252
|
+
};
|
|
253
|
+
readonly elevation: {
|
|
254
|
+
readonly none: "none";
|
|
255
|
+
readonly sm: "0 1px 2px rgba(0, 0, 0, 0.05)";
|
|
256
|
+
readonly md: "0 4px 6px -1px rgba(0, 0, 0, 0.1)";
|
|
257
|
+
readonly lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1)";
|
|
258
|
+
};
|
|
259
|
+
readonly motion: {
|
|
260
|
+
readonly duration: {
|
|
261
|
+
readonly fast: "100ms";
|
|
262
|
+
readonly base: "200ms";
|
|
263
|
+
readonly slow: "300ms";
|
|
264
|
+
};
|
|
265
|
+
readonly easing: {
|
|
266
|
+
readonly enter: "ease-out";
|
|
267
|
+
readonly exit: "ease-in";
|
|
268
|
+
readonly layout: "ease-in-out";
|
|
269
|
+
};
|
|
270
|
+
readonly reducedMotion: "Collapse durations to 1ms or skip non-essential motion.";
|
|
271
|
+
};
|
|
272
|
+
readonly iconography: {
|
|
273
|
+
readonly library: "lucide-react";
|
|
274
|
+
readonly size: {
|
|
275
|
+
readonly default: "1rem";
|
|
276
|
+
readonly compact: "0.875rem";
|
|
277
|
+
readonly large: "1.25rem";
|
|
278
|
+
};
|
|
279
|
+
readonly strokeWidth: 2;
|
|
280
|
+
readonly color: "currentColor";
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
declare const componentContracts: {
|
|
284
|
+
readonly $schema: "./component-contracts.schema.json";
|
|
285
|
+
readonly version: "0.1.0";
|
|
286
|
+
readonly components: {
|
|
287
|
+
readonly badge: {
|
|
288
|
+
readonly variants: readonly ["default", "destructive", "outline", "secondary"];
|
|
289
|
+
};
|
|
290
|
+
readonly button: {
|
|
291
|
+
readonly sizes: readonly ["default", "icon", "lg", "sm"];
|
|
292
|
+
readonly variants: readonly ["default", "destructive", "ghost", "link", "outline", "secondary"];
|
|
293
|
+
};
|
|
294
|
+
readonly card: {
|
|
295
|
+
readonly parts: readonly ["Card", "CardHeader", "CardTitle", "CardDescription", "CardContent", "CardFooter"];
|
|
296
|
+
};
|
|
297
|
+
readonly heading: {
|
|
298
|
+
readonly levels: readonly [1, 2, 3, 4, 5, 6];
|
|
299
|
+
};
|
|
300
|
+
readonly text: {
|
|
301
|
+
readonly sizes: readonly ["base", "caption", "lead", "small"];
|
|
302
|
+
readonly tones: readonly ["default", "muted"];
|
|
303
|
+
readonly weights: readonly ["medium", "normal", "semibold"];
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
declare const nativeTokens: {
|
|
308
|
+
readonly color: {
|
|
309
|
+
readonly dark: {
|
|
310
|
+
readonly background: "#050505";
|
|
311
|
+
readonly foreground: "#fafafa";
|
|
312
|
+
readonly card: "#0a0a0a";
|
|
313
|
+
readonly cardForeground: "#fafafa";
|
|
314
|
+
readonly popover: "#0a0a0a";
|
|
315
|
+
readonly popoverForeground: "#fafafa";
|
|
316
|
+
readonly primary: "#fafafa";
|
|
317
|
+
readonly primaryForeground: "#171717";
|
|
318
|
+
readonly secondary: "#262626";
|
|
319
|
+
readonly secondaryForeground: "#fafafa";
|
|
320
|
+
readonly muted: "#262626";
|
|
321
|
+
readonly mutedForeground: "#a3a3a3";
|
|
322
|
+
readonly accent: "#262626";
|
|
323
|
+
readonly accentForeground: "#fafafa";
|
|
324
|
+
readonly destructive: "#7f1d1d";
|
|
325
|
+
readonly destructiveForeground: "#fafafa";
|
|
326
|
+
readonly border: "#262626";
|
|
327
|
+
readonly input: "#262626";
|
|
328
|
+
readonly ring: "#d4d4d4";
|
|
329
|
+
};
|
|
330
|
+
readonly light: {
|
|
331
|
+
readonly background: "#ffffff";
|
|
332
|
+
readonly foreground: "#0a0a0a";
|
|
333
|
+
readonly card: "#ffffff";
|
|
334
|
+
readonly cardForeground: "#0a0a0a";
|
|
335
|
+
readonly popover: "#ffffff";
|
|
336
|
+
readonly popoverForeground: "#0a0a0a";
|
|
337
|
+
readonly primary: "#171717";
|
|
338
|
+
readonly primaryForeground: "#fafafa";
|
|
339
|
+
readonly secondary: "#f5f5f5";
|
|
340
|
+
readonly secondaryForeground: "#171717";
|
|
341
|
+
readonly muted: "#f5f5f5";
|
|
342
|
+
readonly mutedForeground: "#737373";
|
|
343
|
+
readonly accent: "#f5f5f5";
|
|
344
|
+
readonly accentForeground: "#171717";
|
|
345
|
+
readonly destructive: "#c92f32";
|
|
346
|
+
readonly destructiveForeground: "#fafafa";
|
|
347
|
+
readonly border: "#e5e5e5";
|
|
348
|
+
readonly input: "#e5e5e5";
|
|
349
|
+
readonly ring: "#0a0a0a";
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
readonly motion: {
|
|
353
|
+
readonly duration: {
|
|
354
|
+
readonly fast: 100;
|
|
355
|
+
readonly base: 200;
|
|
356
|
+
readonly slow: 300;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
readonly radius: {
|
|
360
|
+
readonly none: 0;
|
|
361
|
+
readonly sm: 4;
|
|
362
|
+
readonly md: 8;
|
|
363
|
+
readonly lg: 12;
|
|
364
|
+
readonly full: 9999;
|
|
365
|
+
};
|
|
366
|
+
readonly spacing: {
|
|
367
|
+
readonly "1": 4;
|
|
368
|
+
readonly "2": 8;
|
|
369
|
+
readonly "3": 12;
|
|
370
|
+
readonly "4": 16;
|
|
371
|
+
readonly "6": 24;
|
|
372
|
+
readonly "8": 32;
|
|
373
|
+
readonly "12": 48;
|
|
374
|
+
readonly "16": 64;
|
|
375
|
+
};
|
|
376
|
+
readonly typography: {
|
|
377
|
+
readonly fontWeight: {
|
|
378
|
+
readonly heading: 600;
|
|
379
|
+
readonly display: 600;
|
|
380
|
+
readonly body: 400;
|
|
381
|
+
readonly caption: 500;
|
|
382
|
+
};
|
|
383
|
+
readonly scale: {
|
|
384
|
+
readonly display: {
|
|
385
|
+
readonly fontSize: 60;
|
|
386
|
+
readonly lineHeight: 63;
|
|
387
|
+
};
|
|
388
|
+
readonly h1: {
|
|
389
|
+
readonly fontSize: 48;
|
|
390
|
+
readonly lineHeight: 52.8;
|
|
391
|
+
};
|
|
392
|
+
readonly h2: {
|
|
393
|
+
readonly fontSize: 36;
|
|
394
|
+
readonly lineHeight: 43.2;
|
|
395
|
+
};
|
|
396
|
+
readonly h3: {
|
|
397
|
+
readonly fontSize: 30;
|
|
398
|
+
readonly lineHeight: 37.5;
|
|
399
|
+
};
|
|
400
|
+
readonly h4: {
|
|
401
|
+
readonly fontSize: 24;
|
|
402
|
+
readonly lineHeight: 31.2;
|
|
403
|
+
};
|
|
404
|
+
readonly h5: {
|
|
405
|
+
readonly fontSize: 20;
|
|
406
|
+
readonly lineHeight: 28;
|
|
407
|
+
};
|
|
408
|
+
readonly h6: {
|
|
409
|
+
readonly fontSize: 18;
|
|
410
|
+
readonly lineHeight: 27;
|
|
411
|
+
};
|
|
412
|
+
readonly bodyLarge: {
|
|
413
|
+
readonly fontSize: 18;
|
|
414
|
+
readonly lineHeight: 30.6;
|
|
415
|
+
};
|
|
416
|
+
readonly body: {
|
|
417
|
+
readonly fontSize: 16;
|
|
418
|
+
readonly lineHeight: 25.6;
|
|
419
|
+
};
|
|
420
|
+
readonly bodySmall: {
|
|
421
|
+
readonly fontSize: 14;
|
|
422
|
+
readonly lineHeight: 21;
|
|
423
|
+
};
|
|
424
|
+
readonly caption: {
|
|
425
|
+
readonly fontSize: 12;
|
|
426
|
+
readonly lineHeight: 16.8;
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
type BadgeVariant = (typeof componentContracts.components.badge.variants)[number];
|
|
432
|
+
type ButtonSize = (typeof componentContracts.components.button.sizes)[number];
|
|
433
|
+
type ButtonVariant = (typeof componentContracts.components.button.variants)[number];
|
|
434
|
+
type CardPart = (typeof componentContracts.components.card.parts)[number];
|
|
435
|
+
type HeadingLevel = (typeof componentContracts.components.heading.levels)[number];
|
|
436
|
+
type TextSize = (typeof componentContracts.components.text.sizes)[number];
|
|
437
|
+
type TextTone = (typeof componentContracts.components.text.tones)[number];
|
|
438
|
+
type TextWeight = (typeof componentContracts.components.text.weights)[number];
|
|
439
|
+
type SemanticColorName = keyof typeof nativeTokens.color.light;
|
|
440
|
+
|
|
441
|
+
/** Renderers represented in VLLNT UI registry metadata. */
|
|
442
|
+
declare const componentPlatforms: readonly ["web", "native"];
|
|
443
|
+
/** A renderer target represented in VLLNT UI registry metadata. */
|
|
444
|
+
type ComponentPlatform = (typeof componentPlatforms)[number];
|
|
445
|
+
/** Returns whether an unknown value is a supported renderer target. */
|
|
446
|
+
declare function isComponentPlatform(value: unknown): value is ComponentPlatform;
|
|
447
|
+
|
|
448
|
+
/** Color modes available to renderer adapters. */
|
|
449
|
+
type ThemeColorScheme = keyof typeof nativeTokens.color;
|
|
450
|
+
type NumberMap<T> = {
|
|
451
|
+
readonly [Key in keyof T]: number;
|
|
452
|
+
};
|
|
453
|
+
type NativeFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
454
|
+
/** Platform-neutral, React Native-compatible theme contract. */
|
|
455
|
+
type NativeTheme = {
|
|
456
|
+
readonly colors: Readonly<Record<SemanticColorName, string>>;
|
|
457
|
+
readonly colorScheme: ThemeColorScheme;
|
|
458
|
+
readonly motion: {
|
|
459
|
+
readonly duration: NumberMap<typeof nativeTokens.motion.duration>;
|
|
460
|
+
};
|
|
461
|
+
readonly radius: NumberMap<typeof nativeTokens.radius>;
|
|
462
|
+
readonly spacing: NumberMap<typeof nativeTokens.spacing>;
|
|
463
|
+
readonly typography: {
|
|
464
|
+
readonly fontWeight: {
|
|
465
|
+
readonly [Key in keyof typeof nativeTokens.typography.fontWeight]: NativeFontWeight;
|
|
466
|
+
};
|
|
467
|
+
readonly scale: {
|
|
468
|
+
readonly [Key in keyof typeof nativeTokens.typography.scale]: {
|
|
469
|
+
readonly fontSize: number;
|
|
470
|
+
readonly lineHeight: number;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
/** Supported semantic overrides for a generated native theme. */
|
|
476
|
+
type NativeThemeOverride = {
|
|
477
|
+
readonly colors?: Partial<NativeTheme["colors"]>;
|
|
478
|
+
readonly motion?: {
|
|
479
|
+
readonly duration?: Partial<NativeTheme["motion"]["duration"]>;
|
|
480
|
+
};
|
|
481
|
+
readonly radius?: Partial<NativeTheme["radius"]>;
|
|
482
|
+
readonly spacing?: Partial<NativeTheme["spacing"]>;
|
|
483
|
+
readonly typography?: {
|
|
484
|
+
readonly fontWeight?: Partial<NativeTheme["typography"]["fontWeight"]>;
|
|
485
|
+
readonly scale?: Partial<NativeTheme["typography"]["scale"]>;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
/** Generated light theme. Values are sRGB colors and density-independent points. */
|
|
489
|
+
declare const lightTheme: NativeTheme;
|
|
490
|
+
/** Generated dark theme. Values are sRGB colors and density-independent points. */
|
|
491
|
+
declare const darkTheme: NativeTheme;
|
|
492
|
+
/** Creates a native theme while preserving every required semantic token. */
|
|
493
|
+
declare function createNativeTheme(colorScheme: ThemeColorScheme, override?: NativeThemeOverride): NativeTheme;
|
|
494
|
+
|
|
495
|
+
export { type BadgeVariant, type ButtonSize, type ButtonVariant, type CardPart, type ComponentPlatform, type HeadingLevel, type NativeTheme, type NativeThemeOverride, type SemanticColorName, type TextSize, type TextTone, type TextWeight, type ThemeColorScheme, componentContracts, componentPlatforms, createNativeTheme, darkTheme, designTokens, isComponentPlatform, lightTheme, nativeTokens };
|