@stylixui/types 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.
- package/dist/compiler.d.ts +44 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +2 -0
- package/dist/compiler.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx.d.ts +29 -0
- package/dist/jsx.d.ts.map +1 -0
- package/dist/jsx.js +12 -0
- package/dist/jsx.js.map +1 -0
- package/dist/schema.d.ts +7 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +158 -0
- package/dist/schema.js.map +1 -0
- package/dist/semantic.d.ts +50 -0
- package/dist/semantic.d.ts.map +1 -0
- package/dist/semantic.js +25 -0
- package/dist/semantic.js.map +1 -0
- package/dist/tokens.d.ts +74 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +2 -0
- package/dist/tokens.js.map +1 -0
- package/package.json +27 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { TokenConfig } from './tokens.js';
|
|
2
|
+
import type { UIComponent } from './semantic.js';
|
|
3
|
+
/** Configuration passed to the Stylix compiler */
|
|
4
|
+
export interface CompilerConfig {
|
|
5
|
+
tokens: TokenConfig;
|
|
6
|
+
/** Which components to generate styles for (defaults to all) */
|
|
7
|
+
components?: UIComponent[];
|
|
8
|
+
/** CSS layer order override */
|
|
9
|
+
layers?: string[];
|
|
10
|
+
/** Custom prefix for CSS variables (default: 'sx') */
|
|
11
|
+
prefix?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A single generated CSS rule */
|
|
14
|
+
export interface CSSRule {
|
|
15
|
+
selector: string;
|
|
16
|
+
properties: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
/** A CSS layer with its rules */
|
|
19
|
+
export interface CSSLayer {
|
|
20
|
+
name: string;
|
|
21
|
+
rules: CSSRule[];
|
|
22
|
+
/** Raw CSS to include directly (e.g., for @media blocks) */
|
|
23
|
+
raw?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Complete compiler output */
|
|
26
|
+
export interface CompilerOutput {
|
|
27
|
+
/** The layer ordering declaration */
|
|
28
|
+
layerOrder: string[];
|
|
29
|
+
/** Generated CSS layers with their rules */
|
|
30
|
+
layers: CSSLayer[];
|
|
31
|
+
/** Full compiled CSS string */
|
|
32
|
+
css: string;
|
|
33
|
+
}
|
|
34
|
+
/** Options for a single component compilation pass */
|
|
35
|
+
export interface ComponentStyleDef {
|
|
36
|
+
component: UIComponent;
|
|
37
|
+
/** Base styles applied to all instances of this component */
|
|
38
|
+
base: Record<string, string>;
|
|
39
|
+
/** Variant styles keyed by semantic dimension + value */
|
|
40
|
+
variants: Record<string, Record<string, Record<string, string>>>;
|
|
41
|
+
/** State styles (hover, focus, disabled, etc.) */
|
|
42
|
+
states?: Record<string, Record<string, string>>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAEhE,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,WAAW,CAAC;IACpB,gEAAgE;IAChE,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,kCAAkC;AAClC,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,iCAAiC;AACjC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,+BAA+B;AAC/B,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,4CAA4C;IAC5C,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACjE,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD"}
|
package/dist/compiler.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.js","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/dist/jsx.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSX type augmentation for Stylix semantic attributes.
|
|
3
|
+
*
|
|
4
|
+
* Import this module in your app to enable `ui`, `tone`, `emphasis`, etc.
|
|
5
|
+
* on all HTML elements in JSX:
|
|
6
|
+
*
|
|
7
|
+
* import '@stylixui/types/jsx';
|
|
8
|
+
*
|
|
9
|
+
* Or add it to your tsconfig types array.
|
|
10
|
+
*/
|
|
11
|
+
declare module 'react' {
|
|
12
|
+
interface HTMLAttributes<T> {
|
|
13
|
+
ui?: string;
|
|
14
|
+
tone?: string;
|
|
15
|
+
emphasis?: string;
|
|
16
|
+
size?: string;
|
|
17
|
+
density?: string;
|
|
18
|
+
surface?: string;
|
|
19
|
+
radius?: string;
|
|
20
|
+
shadow?: string;
|
|
21
|
+
gap?: string;
|
|
22
|
+
align?: string;
|
|
23
|
+
weight?: string;
|
|
24
|
+
direction?: string;
|
|
25
|
+
padding?: string;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=jsx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["../src/jsx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,cAAc,CAAC,CAAC;QACxB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CACF"}
|
package/dist/jsx.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSX type augmentation for Stylix semantic attributes.
|
|
3
|
+
*
|
|
4
|
+
* Import this module in your app to enable `ui`, `tone`, `emphasis`, etc.
|
|
5
|
+
* on all HTML elements in JSX:
|
|
6
|
+
*
|
|
7
|
+
* import '@stylixui/types/jsx';
|
|
8
|
+
*
|
|
9
|
+
* Or add it to your tsconfig types array.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=jsx.js.map
|
package/dist/jsx.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx.js","sourceRoot":"","sources":["../src/jsx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates a JSON Schema object that fully describes the Stylix semantic
|
|
3
|
+
* vocabulary. Intended for consumption by LLMs, AI code generators, and
|
|
4
|
+
* validation tooling so they can produce valid Stylix markup.
|
|
5
|
+
*/
|
|
6
|
+
export declare function generateSchema(): Record<string, unknown>;
|
|
7
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAuFA;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8ExD"}
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { COMPONENT_DIMENSIONS } from './semantic.js';
|
|
2
|
+
/**
|
|
3
|
+
* Descriptions for each UI component type.
|
|
4
|
+
*/
|
|
5
|
+
const COMPONENT_DESCRIPTIONS = {
|
|
6
|
+
button: 'Interactive button element for user actions',
|
|
7
|
+
card: 'Container with visual grouping via surface treatment, shadow, and padding',
|
|
8
|
+
stack: 'Layout component that arranges children in a row or column with gap spacing',
|
|
9
|
+
text: 'Typographic element with semantic size, weight, and tone',
|
|
10
|
+
input: 'Form input field for user data entry',
|
|
11
|
+
section: 'Page-level content region with padding and optional surface treatment',
|
|
12
|
+
badge: 'Small label or status indicator, often paired with tone and emphasis',
|
|
13
|
+
container: 'Centered max-width container for page layout',
|
|
14
|
+
divider: 'Horizontal or vertical divider line for separating content',
|
|
15
|
+
alert: 'Contextual feedback message for user actions or system events',
|
|
16
|
+
select: 'Dropdown selection input for choosing from predefined options',
|
|
17
|
+
textarea: 'Multi-line text input field for longer form content',
|
|
18
|
+
avatar: 'Visual representation of a user or entity, typically circular',
|
|
19
|
+
toggle: 'Binary on/off switch control for boolean settings',
|
|
20
|
+
tabs: 'Tabbed navigation for switching between content panels',
|
|
21
|
+
dialog: 'Modal overlay for focused user interactions or confirmations',
|
|
22
|
+
tooltip: 'Small contextual popup that appears on hover or focus',
|
|
23
|
+
table: 'Structured data display with rows and columns',
|
|
24
|
+
nav: 'Navigation container for organizing links and menu items',
|
|
25
|
+
checkbox: 'Binary selection control for toggling individual options',
|
|
26
|
+
radio: 'Single-selection control within a mutually exclusive group',
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Full definition of each semantic dimension: its allowed values and description.
|
|
30
|
+
*/
|
|
31
|
+
const DIMENSION_DEFINITIONS = {
|
|
32
|
+
tone: {
|
|
33
|
+
description: 'Color intention — what role does this element play?',
|
|
34
|
+
values: ['neutral', 'brand', 'success', 'warning', 'danger'],
|
|
35
|
+
},
|
|
36
|
+
emphasis: {
|
|
37
|
+
description: 'Visual prominence — how loud should this element be?',
|
|
38
|
+
values: ['low', 'medium', 'high'],
|
|
39
|
+
},
|
|
40
|
+
size: {
|
|
41
|
+
description: 'Physical scale of the element',
|
|
42
|
+
values: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
43
|
+
},
|
|
44
|
+
density: {
|
|
45
|
+
description: 'Content density controlling internal spacing',
|
|
46
|
+
values: ['compact', 'comfortable', 'spacious'],
|
|
47
|
+
},
|
|
48
|
+
surface: {
|
|
49
|
+
description: 'Background treatment for container elements',
|
|
50
|
+
values: ['flat', 'subtle', 'elevated'],
|
|
51
|
+
},
|
|
52
|
+
radius: {
|
|
53
|
+
description: 'Corner rounding applied to the element',
|
|
54
|
+
values: ['none', 'sm', 'md', 'lg', 'pill'],
|
|
55
|
+
},
|
|
56
|
+
shadow: {
|
|
57
|
+
description: 'Drop shadow depth for visual elevation',
|
|
58
|
+
values: ['none', 'sm', 'md', 'lg'],
|
|
59
|
+
},
|
|
60
|
+
gap: {
|
|
61
|
+
description: 'Spacing between children in layout components',
|
|
62
|
+
values: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
63
|
+
},
|
|
64
|
+
align: {
|
|
65
|
+
description: 'Content alignment within the element',
|
|
66
|
+
values: ['start', 'center', 'end', 'stretch'],
|
|
67
|
+
},
|
|
68
|
+
weight: {
|
|
69
|
+
description: 'Text or font weight',
|
|
70
|
+
values: ['regular', 'medium', 'semibold', 'bold'],
|
|
71
|
+
},
|
|
72
|
+
direction: {
|
|
73
|
+
description: 'Layout direction for stack-like components',
|
|
74
|
+
values: ['horizontal', 'vertical'],
|
|
75
|
+
},
|
|
76
|
+
padding: {
|
|
77
|
+
description: 'Padding scale applied inside the element',
|
|
78
|
+
values: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Generates a JSON Schema object that fully describes the Stylix semantic
|
|
83
|
+
* vocabulary. Intended for consumption by LLMs, AI code generators, and
|
|
84
|
+
* validation tooling so they can produce valid Stylix markup.
|
|
85
|
+
*/
|
|
86
|
+
export function generateSchema() {
|
|
87
|
+
const components = Object.keys(COMPONENT_DIMENSIONS);
|
|
88
|
+
// Build per-component sub-schemas that list only the relevant dimensions.
|
|
89
|
+
const componentSchemas = {};
|
|
90
|
+
for (const comp of components) {
|
|
91
|
+
const relevantDims = COMPONENT_DIMENSIONS[comp];
|
|
92
|
+
const properties = {};
|
|
93
|
+
for (const dim of relevantDims) {
|
|
94
|
+
if (dim === 'ui')
|
|
95
|
+
continue;
|
|
96
|
+
const def = DIMENSION_DEFINITIONS[dim];
|
|
97
|
+
properties[dim] = {
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: def.description,
|
|
100
|
+
enum: def.values,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
componentSchemas[comp] = {
|
|
104
|
+
description: COMPONENT_DESCRIPTIONS[comp],
|
|
105
|
+
type: 'object',
|
|
106
|
+
properties: {
|
|
107
|
+
ui: { type: 'string', const: comp },
|
|
108
|
+
...properties,
|
|
109
|
+
},
|
|
110
|
+
required: ['ui'],
|
|
111
|
+
additionalProperties: false,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
// Build the full dimension property map (all dimensions, for the top-level
|
|
115
|
+
// "any element" schema).
|
|
116
|
+
const allDimensionProperties = {};
|
|
117
|
+
for (const [key, def] of Object.entries(DIMENSION_DEFINITIONS)) {
|
|
118
|
+
allDimensionProperties[key] = {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: def.description,
|
|
121
|
+
enum: def.values,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
126
|
+
$id: 'https://stylix.dev/schema.json',
|
|
127
|
+
title: 'Stylix Semantic Vocabulary',
|
|
128
|
+
description: 'JSON Schema describing every valid Stylix component, semantic dimension, and their allowed values. Use this to generate or validate Stylix markup.',
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
ui: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Stylix component type',
|
|
134
|
+
enum: components,
|
|
135
|
+
},
|
|
136
|
+
...allDimensionProperties,
|
|
137
|
+
},
|
|
138
|
+
required: ['ui'],
|
|
139
|
+
additionalProperties: true,
|
|
140
|
+
// Conditional schemas: when ui equals a specific component, only its
|
|
141
|
+
// relevant dimensions are included.
|
|
142
|
+
oneOf: components.map((comp) => ({
|
|
143
|
+
$ref: `#/$defs/components/${comp}`,
|
|
144
|
+
})),
|
|
145
|
+
$defs: {
|
|
146
|
+
components: componentSchemas,
|
|
147
|
+
dimensions: Object.fromEntries(Object.entries(DIMENSION_DEFINITIONS).map(([key, def]) => [
|
|
148
|
+
key,
|
|
149
|
+
{
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: def.description,
|
|
152
|
+
enum: def.values,
|
|
153
|
+
},
|
|
154
|
+
])),
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGrD;;GAEG;AACH,MAAM,sBAAsB,GAAgC;IAC1D,MAAM,EAAE,6CAA6C;IACrD,IAAI,EAAE,2EAA2E;IACjF,KAAK,EAAE,6EAA6E;IACpF,IAAI,EAAE,0DAA0D;IAChE,KAAK,EAAE,sCAAsC;IAC7C,OAAO,EAAE,uEAAuE;IAChF,KAAK,EAAE,sEAAsE;IAC7E,SAAS,EAAE,8CAA8C;IACzD,OAAO,EAAE,4DAA4D;IACrE,KAAK,EAAE,+DAA+D;IACtE,MAAM,EAAE,+DAA+D;IACvE,QAAQ,EAAE,qDAAqD;IAC/D,MAAM,EAAE,+DAA+D;IACvE,MAAM,EAAE,mDAAmD;IAC3D,IA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AG;gBACH;oBACE,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,GAAG,CAAC,WAAW;oBAC5B,IAAI,EAAE,GAAG,CAAC,MAAM;iBACjB;aACF,CAAC,CACH;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Primitive UI component types that Stylix understands */
|
|
2
|
+
export type UIComponent = 'button' | 'card' | 'stack' | 'text' | 'input' | 'section' | 'badge' | 'container' | 'divider' | 'alert' | 'select' | 'textarea' | 'avatar' | 'toggle' | 'tabs' | 'dialog' | 'tooltip' | 'table' | 'nav' | 'checkbox' | 'radio';
|
|
3
|
+
/** Color intention — what role does this element play? */
|
|
4
|
+
export type Tone = 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
|
|
5
|
+
/** Visual prominence — how loud should this element be? */
|
|
6
|
+
export type Emphasis = 'low' | 'medium' | 'high';
|
|
7
|
+
/** Physical scale */
|
|
8
|
+
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
+
/** Content density */
|
|
10
|
+
export type Density = 'compact' | 'comfortable' | 'spacious';
|
|
11
|
+
/** Background treatment */
|
|
12
|
+
export type Surface = 'flat' | 'subtle' | 'elevated';
|
|
13
|
+
/** Corner rounding */
|
|
14
|
+
export type Radius = 'none' | 'sm' | 'md' | 'lg' | 'pill';
|
|
15
|
+
/** Drop shadow depth */
|
|
16
|
+
export type Shadow = 'none' | 'sm' | 'md' | 'lg';
|
|
17
|
+
/** Spacing between children (for layout components) */
|
|
18
|
+
export type Gap = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
19
|
+
/** Content alignment */
|
|
20
|
+
export type Align = 'start' | 'center' | 'end' | 'stretch';
|
|
21
|
+
/** Text/font weight */
|
|
22
|
+
export type Weight = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
23
|
+
/** Layout direction for stack-like components */
|
|
24
|
+
export type Direction = 'horizontal' | 'vertical';
|
|
25
|
+
/** Padding scale — reuses Size tokens */
|
|
26
|
+
export type Padding = Size;
|
|
27
|
+
/**
|
|
28
|
+
* The full set of semantic props that any Stylix element can receive.
|
|
29
|
+
* Not every component uses every prop — the compiler handles relevance.
|
|
30
|
+
*/
|
|
31
|
+
export interface SemanticProps {
|
|
32
|
+
ui?: UIComponent;
|
|
33
|
+
tone?: Tone;
|
|
34
|
+
emphasis?: Emphasis;
|
|
35
|
+
size?: Size;
|
|
36
|
+
density?: Density;
|
|
37
|
+
surface?: Surface;
|
|
38
|
+
radius?: Radius;
|
|
39
|
+
shadow?: Shadow;
|
|
40
|
+
gap?: Gap;
|
|
41
|
+
align?: Align;
|
|
42
|
+
weight?: Weight;
|
|
43
|
+
direction?: Direction;
|
|
44
|
+
padding?: Padding;
|
|
45
|
+
}
|
|
46
|
+
/** Keys of SemanticProps for iteration */
|
|
47
|
+
export type SemanticPropKey = keyof SemanticProps;
|
|
48
|
+
/** Map of which semantic dimensions are relevant per component */
|
|
49
|
+
export declare const COMPONENT_DIMENSIONS: Record<UIComponent, SemanticPropKey[]>;
|
|
50
|
+
//# sourceMappingURL=semantic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.d.ts","sourceRoot":"","sources":["../src/semantic.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,SAAS,GACT,OAAO,GACP,WAAW,GACX,SAAS,GACT,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,SAAS,GACT,OAAO,GACP,KAAK,GACL,UAAU,GACV,OAAO,CAAC;AAEZ,0DAA0D;AAC1D,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1E,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG,K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AM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG,MAAM,aAAa,CAAC;AAElD,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,CAsBvE,CAAC"}
|
package/dist/semantic.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Map of which semantic dimensions are relevant per component */
|
|
2
|
+
export const COMPONENT_DIMENSIONS = {
|
|
3
|
+
button: ['tone', 'emphasis', 'size', 'radius'],
|
|
4
|
+
card: ['surface', 'radius', 'shadow', 'padding'],
|
|
5
|
+
stack: ['gap', 'align', 'direction', 'padding'],
|
|
6
|
+
text: ['size', 'weight', 'tone', 'align'],
|
|
7
|
+
input: ['size', 'tone', 'radius'],
|
|
8
|
+
section: ['padding', 'surface', 'gap'],
|
|
9
|
+
badge: ['tone', 'emphasis', 'size', 'radius'],
|
|
10
|
+
container: ['padding'],
|
|
11
|
+
divider: [],
|
|
12
|
+
alert: ['tone', 'emphasis', 'radius', 'padding'],
|
|
13
|
+
select: ['size', 'tone', 'radius'],
|
|
14
|
+
textarea: ['size', 'tone', 'radius'],
|
|
15
|
+
avatar: ['size', 'radius'],
|
|
16
|
+
toggle: ['size', 'tone'],
|
|
17
|
+
tabs: ['size', 'tone', 'gap'],
|
|
18
|
+
dialog: ['surface', 'radius', 'shadow', 'padding'],
|
|
19
|
+
tooltip: ['tone', 'size', 'radius'],
|
|
20
|
+
table: ['size', 'tone'],
|
|
21
|
+
nav: ['direction', 'gap', 'align'],
|
|
22
|
+
checkbox: ['size', 'tone'],
|
|
23
|
+
radio: ['size', 'tone'],
|
|
24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Q,CAAC;IACnC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,OAAO,CAAC;IAClC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Size, Radius, Shadow } from './semantic.js';
|
|
2
|
+
/** A single color scale with numbered stops */
|
|
3
|
+
export interface ColorScale {
|
|
4
|
+
50: string;
|
|
5
|
+
100: string;
|
|
6
|
+
200: string;
|
|
7
|
+
300: string;
|
|
8
|
+
400: string;
|
|
9
|
+
500: string;
|
|
10
|
+
600: string;
|
|
11
|
+
700: string;
|
|
12
|
+
800: string;
|
|
13
|
+
900: string;
|
|
14
|
+
950: string;
|
|
15
|
+
}
|
|
16
|
+
/** Complete color token set */
|
|
17
|
+
export interface ColorTokens {
|
|
18
|
+
neutral: ColorScale;
|
|
19
|
+
brand: ColorScale;
|
|
20
|
+
success: ColorScale;
|
|
21
|
+
warning: ColorScale;
|
|
22
|
+
danger: ColorScale;
|
|
23
|
+
}
|
|
24
|
+
/** Spacing scale */
|
|
25
|
+
export type SpacingTokens = Record<Size | '2xs' | '2xl' | '3xl', string>;
|
|
26
|
+
/** Radius tokens */
|
|
27
|
+
export type RadiusTokens = Record<Exclude<Radius, 'none'> | 'full' | 'pill', string>;
|
|
28
|
+
/** Shadow tokens */
|
|
29
|
+
export type ShadowTokens = Record<Exclude<Shadow, 'none'>, string>;
|
|
30
|
+
/** Typography scale entry */
|
|
31
|
+
export interface TypeStep {
|
|
32
|
+
fontSize: string;
|
|
33
|
+
lineHeight: string;
|
|
34
|
+
letterSpacing?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Typography tokens */
|
|
37
|
+
export type TypographyTokens = Record<Size, TypeStep>;
|
|
38
|
+
/** Font weight values */
|
|
39
|
+
export interface FontWeightTokens {
|
|
40
|
+
regular: number;
|
|
41
|
+
medium: number;
|
|
42
|
+
semibold: number;
|
|
43
|
+
bold: number;
|
|
44
|
+
}
|
|
45
|
+
/** Semantic surface colors for a theme */
|
|
46
|
+
export interface SurfaceTokens {
|
|
47
|
+
background: string;
|
|
48
|
+
foreground: string;
|
|
49
|
+
muted: string;
|
|
50
|
+
mutedForeground: string;
|
|
51
|
+
border: string;
|
|
52
|
+
ring: string;
|
|
53
|
+
}
|
|
54
|
+
/** A complete theme definition */
|
|
55
|
+
export interface ThemeTokens {
|
|
56
|
+
colors: ColorTokens;
|
|
57
|
+
surfaces: SurfaceTokens;
|
|
58
|
+
}
|
|
59
|
+
/** The full token configuration */
|
|
60
|
+
export interface TokenConfig {
|
|
61
|
+
colors: ColorTokens;
|
|
62
|
+
spacing: SpacingTokens;
|
|
63
|
+
radius: RadiusTokens;
|
|
64
|
+
shadows: ShadowTokens;
|
|
65
|
+
typography: TypographyTokens;
|
|
66
|
+
fontWeights: FontWeightTokens;
|
|
67
|
+
fontFamily: {
|
|
68
|
+
sans: string;
|
|
69
|
+
mono: string;
|
|
70
|
+
};
|
|
71
|
+
light: ThemeTokens;
|
|
72
|
+
dark: ThemeTokens;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEhE,+CAA+C;AAC/C,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAA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AAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,kCAAkC;AAClC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,mCAAmC;AACnC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;CACnB"}
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stylixui/types",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared TypeScript types for the Stylix design system compiler",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": ["dist"],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"clean": "rm -rf dist"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/react": "^19.2.14",
|
|
25
|
+
"typescript": "^5.4.0"
|
|
26
|
+
}
|
|
27
|
+
}
|