@airframeui/tokens 0.0.1
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/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1 -0
- package/dist/tokens.css +721 -0
- package/dist/tokens.js +357 -0
- package/dist/tokens.json +357 -0
- package/package.json +37 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Airframeui
|
|
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,49 @@
|
|
|
1
|
+
# @airframeui/tokens
|
|
2
|
+
|
|
3
|
+
**CSS is the source of truth** for all @airframeui tokens. Tokens are defined in CSS source files and automatically generated into multiple formats.
|
|
4
|
+
|
|
5
|
+
## Source Files (Edit These)
|
|
6
|
+
|
|
7
|
+
All tokens are defined in CSS files in `src/`:
|
|
8
|
+
|
|
9
|
+
- `tokens.base.css` - Base primitives (colors, spacing, typography, breakpoints)
|
|
10
|
+
- `tokens.light.css` - Light theme semantic tokens
|
|
11
|
+
- `tokens.dark.css` - Dark theme tokens
|
|
12
|
+
- `tokens.high-contrast.css` - High contrast theme tokens
|
|
13
|
+
|
|
14
|
+
## Generated Outputs (Auto-generated)
|
|
15
|
+
|
|
16
|
+
Running `npm run build` generates:
|
|
17
|
+
|
|
18
|
+
- `dist/tokens.css` - Combined CSS with all tokens (used by `@airframeui/core`)
|
|
19
|
+
- `dist/tokens.json` - Machine-readable token map for docs/lint/migrate/tools
|
|
20
|
+
- `dist/tokens.js` - JavaScript module export
|
|
21
|
+
- `dist/index.d.ts` - TypeScript definitions
|
|
22
|
+
|
|
23
|
+
## Token model (v1)
|
|
24
|
+
|
|
25
|
+
- **Primitives**: literal values (hex colors, base sizes) - defined in `tokens.base.css`
|
|
26
|
+
- **Semantic tokens**: meaningful aliases that components consume - defined in theme CSS files
|
|
27
|
+
- **Interaction knobs**: global percentages for hover/active/soft generation
|
|
28
|
+
|
|
29
|
+
Primitives are intentionally easy to override:
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
:root {
|
|
33
|
+
--af-base-primary: #018183;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Building
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm run build # Build once
|
|
41
|
+
npm run dev # Build and watch for changes
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
Airframe core libraries are licensed under the MIT License.
|
|
47
|
+
|
|
48
|
+
Commercial tooling, premium themes, and hosted services
|
|
49
|
+
may be offered under separate commercial licenses.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type AirframeTokens = {
|
|
2
|
+
meta: { version: string; generatedAt: string };
|
|
3
|
+
primitives: Record<string, string>;
|
|
4
|
+
breakpoints?: Record<string, string>;
|
|
5
|
+
knobs: Record<string, string>;
|
|
6
|
+
semantic: Record<string, string>;
|
|
7
|
+
components: Record<string, string>;
|
|
8
|
+
themes?: Record<string, {
|
|
9
|
+
primitives?: Record<string, string>;
|
|
10
|
+
semantic?: Record<string, string>;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
export declare const tokens: AirframeTokens;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tokens.js';
|