@oods/tokens 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/dist/index.cjs ADDED
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ const tokensJson = require('./tailwind/tokens.json');
4
+ const cssVariablesByScope = require('./css-variables-by-scope.json');
5
+
6
+ const tokens = tokensJson.tokens;
7
+ const flatTokens = tokensJson.flat;
8
+ const cssVariables = tokensJson.cssVariables;
9
+ const meta = tokensJson.meta ?? {};
10
+ const prefix = tokensJson.prefix ?? 'oods';
11
+
12
+ module.exports = {
13
+ tokens,
14
+ flatTokens,
15
+ cssVariables,
16
+ cssVariablesByScope,
17
+ meta,
18
+ prefix,
19
+ default: { tokens, flatTokens, cssVariables, cssVariablesByScope, meta, prefix },
20
+ };
@@ -0,0 +1,35 @@
1
+ export interface TokenMeta {
2
+ generatedAt: string;
3
+ tool: string;
4
+ version: string;
5
+ platform: string;
6
+ }
7
+
8
+ export interface FlatTokenEntry {
9
+ name?: string;
10
+ value: unknown;
11
+ type?: string;
12
+ path?: string[];
13
+ cssVariable: string;
14
+ originalValue?: unknown;
15
+ description?: string;
16
+ [key: string]: unknown;
17
+ }
18
+
19
+ export type TokenTree = Record<string, unknown>;
20
+
21
+ export declare const tokens: TokenTree;
22
+ export declare const flatTokens: Record<string, FlatTokenEntry>;
23
+ export declare const cssVariables: Record<string, string>;
24
+ export declare const cssVariablesByScope: Record<string, Record<'light' | 'dark' | 'hc', Record<string, string>>>;
25
+ export declare const meta: Partial<TokenMeta>;
26
+ export declare const prefix: string;
27
+ declare const bundle: {
28
+ tokens: typeof tokens;
29
+ flatTokens: typeof flatTokens;
30
+ cssVariables: typeof cssVariables;
31
+ cssVariablesByScope: typeof cssVariablesByScope;
32
+ meta: typeof meta;
33
+ prefix: typeof prefix;
34
+ };
35
+ export default bundle;
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import tokensJson from './tailwind/tokens.json' with { type: 'json' };
2
+ import cssVariablesByScope from './css-variables-by-scope.json' with { type: 'json' };
3
+ const source = tokensJson ?? {};
4
+ const tokens = source.tokens ?? {};
5
+ const flatTokens = source.flat ?? {};
6
+ const cssVariables = source.cssVariables ?? {};
7
+ const meta = source.meta ?? {};
8
+ const prefix = source.prefix ?? 'oods';
9
+
10
+ export { tokens, flatTokens, cssVariables, cssVariablesByScope, meta, prefix };
11
+ export default { tokens, flatTokens, cssVariables, cssVariablesByScope, meta, prefix };