@roblawn/devtool-runtime 0.1.0-alpha.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/LICENSE.md +11 -0
- package/README.md +7 -0
- package/dist/ak/ak.cssState.transform.d.ts +2 -0
- package/dist/ak/ak.cssState.transform.js +60 -0
- package/dist/ak/ak.cssState.types.d.ts +2 -0
- package/dist/ak/ak.cssState.types.js +1 -0
- package/dist/ak/ak.responsive.types.d.ts +18 -0
- package/dist/ak/ak.responsive.types.js +1 -0
- package/dist/ak/ak.tokens.d.ts +10 -0
- package/dist/ak/ak.tokens.js +10 -0
- package/dist/ak/ak.tokens.registry.d.ts +10 -0
- package/dist/ak/ak.tokens.registry.js +45 -0
- package/dist/ak/authoring-surface.shared.d.ts +31 -0
- package/dist/ak/authoring-surface.shared.js +185 -0
- package/dist/ak/configured-core.shared.d.ts +7 -0
- package/dist/ak/configured-core.shared.js +16 -0
- package/dist/ak/configured-surfaces.shared.d.ts +67 -0
- package/dist/ak/configured-surfaces.shared.js +144 -0
- package/dist/ak/index.d.ts +16 -0
- package/dist/ak/index.js +16 -0
- package/dist/ak/project-entry.d.ts +57 -0
- package/dist/ak/project-entry.js +260 -0
- package/dist/ak/project-surface-adapters.shared.d.ts +33 -0
- package/dist/ak/project-surface-adapters.shared.js +83 -0
- package/dist/ak/public-entry.shared.d.ts +16 -0
- package/dist/ak/public-entry.shared.js +18 -0
- package/dist/ak/resolved-layout-marker.shared.d.ts +3 -0
- package/dist/ak/resolved-layout-marker.shared.js +19 -0
- package/dist/ak/runtime-surface.shared.d.ts +31 -0
- package/dist/ak/runtime-surface.shared.js +221 -0
- package/dist/ak/style-execution.d.ts +13 -0
- package/dist/ak/style-execution.js +91 -0
- package/dist/ak/style-schema.d.ts +16 -0
- package/dist/ak/style-schema.js +6 -0
- package/dist/ak/useAk.shared.d.ts +3 -0
- package/dist/ak/useAk.shared.js +36 -0
- package/dist/authoring/authoringEffectKinds.d.ts +2 -0
- package/dist/authoring/authoringEffectKinds.js +48 -0
- package/dist/authoring/index.d.ts +1 -0
- package/dist/authoring/index.js +1 -0
- package/dist/cms/CMSPresenterSchemaTypes.d.ts +108 -0
- package/dist/cms/CMSPresenterSchemaTypes.js +6 -0
- package/dist/cms/CMSSchema.d.ts +27 -0
- package/dist/cms/CMSSchema.js +89 -0
- package/dist/cms/CMSSchemaTypes.d.ts +141 -0
- package/dist/cms/CMSSchemaTypes.js +1 -0
- package/dist/cms/index.d.ts +3 -0
- package/dist/cms/index.js +1 -0
- package/dist/design-system/DesignSystemSnapshotFactory.d.ts +34 -0
- package/dist/design-system/DesignSystemSnapshotFactory.js +38 -0
- package/dist/design-system/ProjectDesignSystemFactory.d.ts +39 -0
- package/dist/design-system/ProjectDesignSystemFactory.js +32 -0
- package/dist/design-system/index.d.ts +8 -0
- package/dist/design-system/index.js +7 -0
- package/dist/design-system/ops/ops.types.d.ts +22 -0
- package/dist/design-system/ops/ops.types.js +1 -0
- package/dist/design-system/resolvers/ds.resolvers.d.ts +3 -0
- package/dist/design-system/resolvers/ds.resolvers.js +24 -0
- package/dist/design-system/resolvers/ds.responsive.d.ts +12 -0
- package/dist/design-system/resolvers/ds.responsive.js +28 -0
- package/dist/design-system/tokens/TokenSchemas.types.d.ts +48 -0
- package/dist/design-system/tokens/TokenSchemas.types.js +3 -0
- package/dist/design-system/tokens/coreTokenFamilies.types.d.ts +2 -0
- package/dist/design-system/tokens/coreTokenFamilies.types.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +1 -0
- package/dist/layout/layoutRuntime.d.ts +12 -0
- package/dist/layout/layoutRuntime.js +88 -0
- package/dist/schema/LayoutBindingEditorPolicyMetadata.d.ts +7 -0
- package/dist/schema/LayoutBindingEditorPolicyMetadata.js +19 -0
- package/dist/schema/LayoutBindingEditorSectionMetadata.d.ts +7 -0
- package/dist/schema/LayoutBindingEditorSectionMetadata.js +19 -0
- package/dist/schema/LayoutDefinitionMeta.d.ts +54 -0
- package/dist/schema/LayoutDefinitionMeta.js +1 -0
- package/dist/schema/LayoutFieldIntentMetadata.d.ts +22 -0
- package/dist/schema/LayoutFieldIntentMetadata.js +38 -0
- package/dist/schema/LayoutFieldUiMetadata.d.ts +30 -0
- package/dist/schema/LayoutFieldUiMetadata.js +19 -0
- package/dist/schema/LayoutSchema.d.ts +39 -0
- package/dist/schema/LayoutSchema.js +53 -0
- package/dist/schema/LayoutVariantBindings.d.ts +55 -0
- package/dist/schema/LayoutVariantBindings.js +107 -0
- package/dist/schema/SlotSchema.d.ts +10 -0
- package/dist/schema/SlotSchema.js +3 -0
- package/dist/schema/StyleSchema.d.ts +16 -0
- package/dist/schema/StyleSchema.js +6 -0
- package/dist/schema/index.d.ts +9 -0
- package/dist/schema/index.js +9 -0
- package/dist/theme-contract/CompositeFieldOpByFamily.d.ts +126 -0
- package/dist/theme-contract/CompositeFieldOpByFamily.js +126 -0
- package/dist/theme-contract/index.d.ts +7 -0
- package/dist/theme-contract/index.js +7 -0
- package/dist/theme-contract/ops/coreOps.d.ts +697 -0
- package/dist/theme-contract/ops/coreOps.js +748 -0
- package/dist/theme-contract/ops/delegateValidation.types.d.ts +46 -0
- package/dist/theme-contract/ops/delegateValidation.types.js +4 -0
- package/dist/theme-contract/ops/emitters.d.ts +24 -0
- package/dist/theme-contract/ops/emitters.js +151 -0
- package/dist/theme-contract/ops/op.config.d.ts +711 -0
- package/dist/theme-contract/ops/op.config.js +15 -0
- package/dist/theme-contract/tokens/coreTokenFamilies.d.ts +9 -0
- package/dist/theme-contract/tokens/coreTokenFamilies.js +6 -0
- package/dist/theme-contract/tokens/cssLengthConversion.d.ts +2 -0
- package/dist/theme-contract/tokens/cssLengthConversion.js +39 -0
- package/dist/theme-contract/tokens/defineProjectTokenFamilySchema.d.ts +1 -0
- package/dist/theme-contract/tokens/defineProjectTokenFamilySchema.js +1 -0
- package/dist/theme-contract/tokens/defineTokenFamilySchema.d.ts +3 -0
- package/dist/theme-contract/tokens/defineTokenFamilySchema.js +5 -0
- package/dist/theme-contract/tokens/runtimeTokenFamilies.types.d.ts +5 -0
- package/dist/theme-contract/tokens/runtimeTokenFamilies.types.js +1 -0
- package/dist/theme-contract/tokens/schemas/aspect.token.schema.d.ts +20 -0
- package/dist/theme-contract/tokens/schemas/aspect.token.schema.js +19 -0
- package/dist/theme-contract/tokens/schemas/blur.token.schema.d.ts +21 -0
- package/dist/theme-contract/tokens/schemas/blur.token.schema.js +19 -0
- package/dist/theme-contract/tokens/schemas/border.token.schema.d.ts +54 -0
- package/dist/theme-contract/tokens/schemas/border.token.schema.js +43 -0
- package/dist/theme-contract/tokens/schemas/breakpoint.token.schema.d.ts +19 -0
- package/dist/theme-contract/tokens/schemas/breakpoint.token.schema.js +18 -0
- package/dist/theme-contract/tokens/schemas/color.token.schema.d.ts +24 -0
- package/dist/theme-contract/tokens/schemas/color.token.schema.js +23 -0
- package/dist/theme-contract/tokens/schemas/container.token.schema.d.ts +26 -0
- package/dist/theme-contract/tokens/schemas/container.token.schema.js +30 -0
- package/dist/theme-contract/tokens/schemas/font.token.schema.d.ts +17 -0
- package/dist/theme-contract/tokens/schemas/font.token.schema.js +15 -0
- package/dist/theme-contract/tokens/schemas/fontWeight.token.schema.d.ts +24 -0
- package/dist/theme-contract/tokens/schemas/fontWeight.token.schema.js +22 -0
- package/dist/theme-contract/tokens/schemas/leading.token.schema.d.ts +20 -0
- package/dist/theme-contract/tokens/schemas/leading.token.schema.js +18 -0
- package/dist/theme-contract/tokens/schemas/radius.token.schema.d.ts +23 -0
- package/dist/theme-contract/tokens/schemas/radius.token.schema.js +22 -0
- package/dist/theme-contract/tokens/schemas/shadow.token.schema.d.ts +108 -0
- package/dist/theme-contract/tokens/schemas/shadow.token.schema.js +73 -0
- package/dist/theme-contract/tokens/schemas/size.token.schema.d.ts +20 -0
- package/dist/theme-contract/tokens/schemas/size.token.schema.js +19 -0
- package/dist/theme-contract/tokens/schemas/spacing.token.schema.d.ts +21 -0
- package/dist/theme-contract/tokens/schemas/spacing.token.schema.js +20 -0
- package/dist/theme-contract/tokens/schemas/text.token.schema.d.ts +87 -0
- package/dist/theme-contract/tokens/schemas/text.token.schema.js +30 -0
- package/dist/theme-contract/tokens/schemas/textSize.token.schema.d.ts +28 -0
- package/dist/theme-contract/tokens/schemas/textSize.token.schema.js +27 -0
- package/dist/theme-contract/tokens/schemas/title.token.schema.d.ts +85 -0
- package/dist/theme-contract/tokens/schemas/title.token.schema.js +30 -0
- package/dist/theme-contract/tokens/schemas/tracking.token.schema.d.ts +20 -0
- package/dist/theme-contract/tokens/schemas/tracking.token.schema.js +18 -0
- package/dist/theme-contract/tokens/schemas/zIndex.token.schema.d.ts +18 -0
- package/dist/theme-contract/tokens/schemas/zIndex.token.schema.js +17 -0
- package/dist/theme-contract/tokens/tokens.schema.d.ts +531 -0
- package/dist/theme-contract/tokens/tokens.schema.js +32 -0
- package/dist/types/LayoutResolvedTs.types.d.ts +18 -0
- package/dist/types/LayoutResolvedTs.types.js +1 -0
- package/dist/types/authoredTree.types.d.ts +112 -0
- package/dist/types/authoredTree.types.js +1 -0
- package/dist/types/blockRegistry.types.d.ts +37 -0
- package/dist/types/blockRegistry.types.js +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +1 -0
- package/dist/types/layout.types.d.ts +30 -0
- package/dist/types/layout.types.js +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export declare const shadowTokenSchema: {
|
|
2
|
+
readonly name: "shadow";
|
|
3
|
+
readonly description: "Box-shadow presets.";
|
|
4
|
+
readonly semanticType: "composite";
|
|
5
|
+
readonly responsive: false;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "custom";
|
|
8
|
+
};
|
|
9
|
+
readonly fields: readonly [{
|
|
10
|
+
readonly key: "compose";
|
|
11
|
+
readonly op: "shadowCompose";
|
|
12
|
+
readonly description: "Shadow composition mode";
|
|
13
|
+
}, {
|
|
14
|
+
readonly key: "offsetX1";
|
|
15
|
+
readonly op: "shadowX1";
|
|
16
|
+
readonly description: "Layer 1 horizontal offset token";
|
|
17
|
+
}, {
|
|
18
|
+
readonly key: "offsetY1";
|
|
19
|
+
readonly op: "shadowY1";
|
|
20
|
+
readonly description: "Layer 1 vertical offset token";
|
|
21
|
+
}, {
|
|
22
|
+
readonly key: "blur1";
|
|
23
|
+
readonly op: "shadowBlur1";
|
|
24
|
+
readonly description: "Layer 1 blur token";
|
|
25
|
+
}, {
|
|
26
|
+
readonly key: "spread1";
|
|
27
|
+
readonly op: "shadowSpread1";
|
|
28
|
+
readonly description: "Layer 1 spread token";
|
|
29
|
+
}, {
|
|
30
|
+
readonly key: "opacity1";
|
|
31
|
+
readonly op: "shadowOpacity1";
|
|
32
|
+
readonly description: "Layer 1 opacity token";
|
|
33
|
+
}, {
|
|
34
|
+
readonly key: "offsetX2";
|
|
35
|
+
readonly op: "shadowX2";
|
|
36
|
+
readonly description: "Layer 2 horizontal offset token";
|
|
37
|
+
}, {
|
|
38
|
+
readonly key: "offsetY2";
|
|
39
|
+
readonly op: "shadowY2";
|
|
40
|
+
readonly description: "Layer 2 vertical offset token";
|
|
41
|
+
}, {
|
|
42
|
+
readonly key: "blur2";
|
|
43
|
+
readonly op: "shadowBlur2";
|
|
44
|
+
readonly description: "Layer 2 blur token";
|
|
45
|
+
}, {
|
|
46
|
+
readonly key: "spread2";
|
|
47
|
+
readonly op: "shadowSpread2";
|
|
48
|
+
readonly description: "Layer 2 spread token";
|
|
49
|
+
}, {
|
|
50
|
+
readonly key: "opacity2";
|
|
51
|
+
readonly op: "shadowOpacity2";
|
|
52
|
+
readonly description: "Layer 2 opacity token";
|
|
53
|
+
}];
|
|
54
|
+
readonly defaults: {
|
|
55
|
+
readonly compose: "single";
|
|
56
|
+
readonly offsetX1: 0;
|
|
57
|
+
readonly offsetY1: 1;
|
|
58
|
+
readonly blur1: 2;
|
|
59
|
+
readonly spread1: 0;
|
|
60
|
+
readonly opacity1: 10;
|
|
61
|
+
readonly offsetX2: 0;
|
|
62
|
+
readonly offsetY2: 0;
|
|
63
|
+
readonly blur2: 0;
|
|
64
|
+
readonly spread2: 0;
|
|
65
|
+
readonly opacity2: 0;
|
|
66
|
+
};
|
|
67
|
+
readonly initialTokens: {
|
|
68
|
+
readonly light: {
|
|
69
|
+
readonly compose: "double";
|
|
70
|
+
readonly offsetY1: 4;
|
|
71
|
+
readonly blur1: 6;
|
|
72
|
+
readonly spread1: -1;
|
|
73
|
+
readonly opacity1: 10;
|
|
74
|
+
readonly offsetY2: 2;
|
|
75
|
+
readonly blur2: 4;
|
|
76
|
+
readonly spread2: -2;
|
|
77
|
+
readonly opacity2: 10;
|
|
78
|
+
};
|
|
79
|
+
readonly strong: {
|
|
80
|
+
readonly compose: "double";
|
|
81
|
+
readonly offsetY1: 20;
|
|
82
|
+
readonly blur1: 25;
|
|
83
|
+
readonly spread1: -5;
|
|
84
|
+
readonly opacity1: 10;
|
|
85
|
+
readonly offsetY2: 8;
|
|
86
|
+
readonly blur2: 10;
|
|
87
|
+
readonly spread2: -6;
|
|
88
|
+
readonly opacity2: 10;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export declare const shadowComposeTokenSchema: {
|
|
93
|
+
readonly name: "shadowCompose";
|
|
94
|
+
readonly description: "Shadow composition mode tokens.";
|
|
95
|
+
readonly semanticType: "string";
|
|
96
|
+
readonly responsive: false;
|
|
97
|
+
readonly editorVisible: false;
|
|
98
|
+
readonly order: {
|
|
99
|
+
readonly type: "custom";
|
|
100
|
+
};
|
|
101
|
+
readonly initialTokens: {
|
|
102
|
+
readonly none: "none";
|
|
103
|
+
readonly single: "single";
|
|
104
|
+
readonly double: "double";
|
|
105
|
+
};
|
|
106
|
+
readonly toCssVarName: (tokenKey: string) => string;
|
|
107
|
+
readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
|
|
108
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
export const shadowTokenSchema = defineTokenFamilySchema({
|
|
3
|
+
name: 'shadow',
|
|
4
|
+
description: 'Box-shadow presets.',
|
|
5
|
+
semanticType: 'composite',
|
|
6
|
+
responsive: false,
|
|
7
|
+
order: { type: 'custom' },
|
|
8
|
+
fields: [
|
|
9
|
+
{ key: 'compose', op: 'shadowCompose', description: 'Shadow composition mode' },
|
|
10
|
+
{ key: 'offsetX1', op: 'shadowX1', description: 'Layer 1 horizontal offset token' },
|
|
11
|
+
{ key: 'offsetY1', op: 'shadowY1', description: 'Layer 1 vertical offset token' },
|
|
12
|
+
{ key: 'blur1', op: 'shadowBlur1', description: 'Layer 1 blur token' },
|
|
13
|
+
{ key: 'spread1', op: 'shadowSpread1', description: 'Layer 1 spread token' },
|
|
14
|
+
{ key: 'opacity1', op: 'shadowOpacity1', description: 'Layer 1 opacity token' },
|
|
15
|
+
{ key: 'offsetX2', op: 'shadowX2', description: 'Layer 2 horizontal offset token' },
|
|
16
|
+
{ key: 'offsetY2', op: 'shadowY2', description: 'Layer 2 vertical offset token' },
|
|
17
|
+
{ key: 'blur2', op: 'shadowBlur2', description: 'Layer 2 blur token' },
|
|
18
|
+
{ key: 'spread2', op: 'shadowSpread2', description: 'Layer 2 spread token' },
|
|
19
|
+
{ key: 'opacity2', op: 'shadowOpacity2', description: 'Layer 2 opacity token' },
|
|
20
|
+
],
|
|
21
|
+
defaults: {
|
|
22
|
+
compose: 'single',
|
|
23
|
+
offsetX1: 0,
|
|
24
|
+
offsetY1: 1,
|
|
25
|
+
blur1: 2,
|
|
26
|
+
spread1: 0,
|
|
27
|
+
opacity1: 10,
|
|
28
|
+
offsetX2: 0,
|
|
29
|
+
offsetY2: 0,
|
|
30
|
+
blur2: 0,
|
|
31
|
+
spread2: 0,
|
|
32
|
+
opacity2: 0,
|
|
33
|
+
},
|
|
34
|
+
initialTokens: {
|
|
35
|
+
light: {
|
|
36
|
+
compose: 'double',
|
|
37
|
+
offsetY1: 4,
|
|
38
|
+
blur1: 6,
|
|
39
|
+
spread1: -1,
|
|
40
|
+
opacity1: 10,
|
|
41
|
+
offsetY2: 2,
|
|
42
|
+
blur2: 4,
|
|
43
|
+
spread2: -2,
|
|
44
|
+
opacity2: 10,
|
|
45
|
+
},
|
|
46
|
+
strong: {
|
|
47
|
+
compose: 'double',
|
|
48
|
+
offsetY1: 20,
|
|
49
|
+
blur1: 25,
|
|
50
|
+
spread1: -5,
|
|
51
|
+
opacity1: 10,
|
|
52
|
+
offsetY2: 8,
|
|
53
|
+
blur2: 10,
|
|
54
|
+
spread2: -6,
|
|
55
|
+
opacity2: 10,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
export const shadowComposeTokenSchema = defineTokenFamilySchema({
|
|
60
|
+
name: 'shadowCompose',
|
|
61
|
+
description: 'Shadow composition mode tokens.',
|
|
62
|
+
semanticType: 'string',
|
|
63
|
+
responsive: false,
|
|
64
|
+
editorVisible: false,
|
|
65
|
+
order: { type: 'custom' },
|
|
66
|
+
initialTokens: {
|
|
67
|
+
none: 'none',
|
|
68
|
+
single: 'single',
|
|
69
|
+
double: 'double',
|
|
70
|
+
},
|
|
71
|
+
toCssVarName: (tokenKey) => `--shadow-compose-${tokenKey}`,
|
|
72
|
+
toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
|
|
73
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const sizeTokenSchema: {
|
|
2
|
+
readonly name: "size";
|
|
3
|
+
readonly description: "Component sizing scale (used for width/height/min/max via CSS vars).";
|
|
4
|
+
readonly semanticType: "px";
|
|
5
|
+
readonly responsive: true;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "numeric";
|
|
8
|
+
readonly direction: "asc";
|
|
9
|
+
};
|
|
10
|
+
readonly initialTokens: {
|
|
11
|
+
readonly xs: "320px";
|
|
12
|
+
readonly sm: "384px";
|
|
13
|
+
readonly md: "448px";
|
|
14
|
+
readonly lg: "512px";
|
|
15
|
+
readonly xl: "576px";
|
|
16
|
+
readonly '2xl': "672px";
|
|
17
|
+
};
|
|
18
|
+
readonly toCssVarName: (tokenKey: string) => string;
|
|
19
|
+
readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
import { pxTokenToRemValue } from '../cssLengthConversion.js';
|
|
3
|
+
export const sizeTokenSchema = defineTokenFamilySchema({
|
|
4
|
+
name: 'size',
|
|
5
|
+
description: 'Component sizing scale (used for width/height/min/max via CSS vars).',
|
|
6
|
+
semanticType: 'px',
|
|
7
|
+
responsive: true,
|
|
8
|
+
order: { type: 'numeric', direction: 'asc' },
|
|
9
|
+
initialTokens: {
|
|
10
|
+
xs: '320px',
|
|
11
|
+
sm: '384px',
|
|
12
|
+
md: '448px',
|
|
13
|
+
lg: '512px',
|
|
14
|
+
xl: '576px',
|
|
15
|
+
'2xl': '672px',
|
|
16
|
+
},
|
|
17
|
+
toCssVarName: (tokenKey) => `--size-${tokenKey}`,
|
|
18
|
+
toCssVarValue: (_tokenKey, tokenValue) => pxTokenToRemValue(tokenValue),
|
|
19
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const spacingTokenSchema: {
|
|
2
|
+
readonly name: "spacing";
|
|
3
|
+
readonly description: "Spacing scale.";
|
|
4
|
+
readonly semanticType: "px";
|
|
5
|
+
readonly responsive: true;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "numeric";
|
|
8
|
+
readonly direction: "asc";
|
|
9
|
+
};
|
|
10
|
+
readonly initialTokens: {
|
|
11
|
+
readonly zero: "0px";
|
|
12
|
+
readonly '2xs': "2px";
|
|
13
|
+
readonly xs: "4px";
|
|
14
|
+
readonly sm: "8px";
|
|
15
|
+
readonly md: "12px";
|
|
16
|
+
readonly lg: "16px";
|
|
17
|
+
readonly xl: "24px";
|
|
18
|
+
};
|
|
19
|
+
readonly toCssVarName: (tokenKey: string) => string;
|
|
20
|
+
readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
import { pxTokenToRemValue } from '../cssLengthConversion.js';
|
|
3
|
+
export const spacingTokenSchema = defineTokenFamilySchema({
|
|
4
|
+
name: 'spacing',
|
|
5
|
+
description: 'Spacing scale.',
|
|
6
|
+
semanticType: 'px',
|
|
7
|
+
responsive: true,
|
|
8
|
+
order: { type: 'numeric', direction: 'asc' },
|
|
9
|
+
initialTokens: {
|
|
10
|
+
zero: '0px',
|
|
11
|
+
'2xs': '2px',
|
|
12
|
+
xs: '4px',
|
|
13
|
+
sm: '8px',
|
|
14
|
+
md: '12px',
|
|
15
|
+
lg: '16px',
|
|
16
|
+
xl: '24px',
|
|
17
|
+
},
|
|
18
|
+
toCssVarName: (tokenKey) => `--spacing-${tokenKey}`,
|
|
19
|
+
toCssVarValue: (_tokenKey, tokenValue) => pxTokenToRemValue(tokenValue),
|
|
20
|
+
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const textTokenSchema: {
|
|
2
|
+
readonly name: "text";
|
|
3
|
+
readonly description: "Text composite tokens (font family, size, weight, line height, and letter spacing).";
|
|
4
|
+
readonly semanticType: "composite";
|
|
5
|
+
readonly responsive: true;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "custom";
|
|
8
|
+
};
|
|
9
|
+
readonly fields: readonly [{
|
|
10
|
+
readonly key: "family";
|
|
11
|
+
readonly op: "fontFamily";
|
|
12
|
+
readonly description: "Font family token";
|
|
13
|
+
}, {
|
|
14
|
+
readonly key: "size";
|
|
15
|
+
readonly op: "textSize";
|
|
16
|
+
readonly description: "Font size value";
|
|
17
|
+
}, {
|
|
18
|
+
readonly key: "weight";
|
|
19
|
+
readonly op: "fontWeight";
|
|
20
|
+
readonly description: "Font weight token";
|
|
21
|
+
}, {
|
|
22
|
+
readonly key: "leading";
|
|
23
|
+
readonly op: "leading";
|
|
24
|
+
readonly description: "Line height value";
|
|
25
|
+
}, {
|
|
26
|
+
readonly key: "tracking";
|
|
27
|
+
readonly op: "tracking";
|
|
28
|
+
readonly description: "Letter spacing value";
|
|
29
|
+
}];
|
|
30
|
+
readonly defaults: {
|
|
31
|
+
readonly family: "body";
|
|
32
|
+
readonly weight: "normal";
|
|
33
|
+
readonly leading: 1.5;
|
|
34
|
+
readonly tracking: 0;
|
|
35
|
+
};
|
|
36
|
+
readonly initialTokens: {
|
|
37
|
+
readonly 'subtitle-1': {
|
|
38
|
+
readonly family: "body";
|
|
39
|
+
readonly size: 20;
|
|
40
|
+
readonly weight: "semibold";
|
|
41
|
+
readonly leading: 1.375;
|
|
42
|
+
readonly tracking: 0;
|
|
43
|
+
};
|
|
44
|
+
readonly 'subtitle-2': {
|
|
45
|
+
readonly family: "body";
|
|
46
|
+
readonly size: 18;
|
|
47
|
+
readonly weight: "semibold";
|
|
48
|
+
readonly leading: 1.375;
|
|
49
|
+
readonly tracking: 0;
|
|
50
|
+
};
|
|
51
|
+
readonly 'body-1': {
|
|
52
|
+
readonly family: "body";
|
|
53
|
+
readonly size: 16;
|
|
54
|
+
readonly weight: "normal";
|
|
55
|
+
readonly leading: 1.375;
|
|
56
|
+
readonly tracking: 0;
|
|
57
|
+
};
|
|
58
|
+
readonly 'body-2': {
|
|
59
|
+
readonly family: "body";
|
|
60
|
+
readonly size: 14;
|
|
61
|
+
readonly weight: "normal";
|
|
62
|
+
readonly leading: 1.375;
|
|
63
|
+
readonly tracking: 0;
|
|
64
|
+
};
|
|
65
|
+
readonly caption: {
|
|
66
|
+
readonly family: "body";
|
|
67
|
+
readonly size: 12;
|
|
68
|
+
readonly weight: "medium";
|
|
69
|
+
readonly leading: 1.375;
|
|
70
|
+
readonly tracking: 0;
|
|
71
|
+
};
|
|
72
|
+
readonly button: {
|
|
73
|
+
readonly family: "body";
|
|
74
|
+
readonly size: 12;
|
|
75
|
+
readonly weight: "medium";
|
|
76
|
+
readonly leading: 1.12;
|
|
77
|
+
readonly tracking: 0;
|
|
78
|
+
};
|
|
79
|
+
readonly tiny: {
|
|
80
|
+
readonly family: "body";
|
|
81
|
+
readonly size: 10;
|
|
82
|
+
readonly weight: "normal";
|
|
83
|
+
readonly leading: 1.12;
|
|
84
|
+
readonly tracking: 0;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
export const textTokenSchema = defineTokenFamilySchema({
|
|
3
|
+
name: 'text',
|
|
4
|
+
description: 'Text composite tokens (font family, size, weight, line height, and letter spacing).',
|
|
5
|
+
semanticType: 'composite',
|
|
6
|
+
responsive: true,
|
|
7
|
+
order: { type: 'custom' },
|
|
8
|
+
fields: [
|
|
9
|
+
{ key: 'family', op: 'fontFamily', description: 'Font family token' },
|
|
10
|
+
{ key: 'size', op: 'textSize', description: 'Font size value' },
|
|
11
|
+
{ key: 'weight', op: 'fontWeight', description: 'Font weight token' },
|
|
12
|
+
{ key: 'leading', op: 'leading', description: 'Line height value' },
|
|
13
|
+
{ key: 'tracking', op: 'tracking', description: 'Letter spacing value' },
|
|
14
|
+
],
|
|
15
|
+
defaults: {
|
|
16
|
+
family: 'body',
|
|
17
|
+
weight: 'normal',
|
|
18
|
+
leading: 1.5,
|
|
19
|
+
tracking: 0,
|
|
20
|
+
},
|
|
21
|
+
initialTokens: {
|
|
22
|
+
'subtitle-1': { family: 'body', size: 20, weight: 'semibold', leading: 1.375, tracking: 0 },
|
|
23
|
+
'subtitle-2': { family: 'body', size: 18, weight: 'semibold', leading: 1.375, tracking: 0 },
|
|
24
|
+
'body-1': { family: 'body', size: 16, weight: 'normal', leading: 1.375, tracking: 0 },
|
|
25
|
+
'body-2': { family: 'body', size: 14, weight: 'normal', leading: 1.375, tracking: 0 },
|
|
26
|
+
caption: { family: 'body', size: 12, weight: 'medium', leading: 1.375, tracking: 0 },
|
|
27
|
+
button: { family: 'body', size: 12, weight: 'medium', leading: 1.12, tracking: 0 },
|
|
28
|
+
tiny: { family: 'body', size: 10, weight: 'normal', leading: 1.12, tracking: 0 },
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const textSizeTokenSchema: {
|
|
2
|
+
readonly name: "textSize";
|
|
3
|
+
readonly description: "Font size scale.";
|
|
4
|
+
readonly semanticType: "px";
|
|
5
|
+
readonly responsive: true;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "numeric";
|
|
8
|
+
readonly direction: "asc";
|
|
9
|
+
};
|
|
10
|
+
readonly initialTokens: {
|
|
11
|
+
readonly '2xs': "10px";
|
|
12
|
+
readonly xs: "12px";
|
|
13
|
+
readonly sm: "14px";
|
|
14
|
+
readonly base: "16px";
|
|
15
|
+
readonly lg: "18px";
|
|
16
|
+
readonly xl: "20px";
|
|
17
|
+
readonly '2xl': "24px";
|
|
18
|
+
readonly '3xl': "32px";
|
|
19
|
+
readonly '4xl': "36px";
|
|
20
|
+
readonly '5xl': "48px";
|
|
21
|
+
readonly '6xl': "56px";
|
|
22
|
+
readonly '7xl': "72px";
|
|
23
|
+
readonly '8xl': "96px";
|
|
24
|
+
readonly '9xl': "128px";
|
|
25
|
+
};
|
|
26
|
+
readonly toCssVarName: (tokenKey: string) => string;
|
|
27
|
+
readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
import { pxTokenToRemValue } from '../cssLengthConversion.js';
|
|
3
|
+
export const textSizeTokenSchema = defineTokenFamilySchema({
|
|
4
|
+
name: 'textSize',
|
|
5
|
+
description: 'Font size scale.',
|
|
6
|
+
semanticType: 'px',
|
|
7
|
+
responsive: true,
|
|
8
|
+
order: { type: 'numeric', direction: 'asc' },
|
|
9
|
+
initialTokens: {
|
|
10
|
+
'2xs': '10px',
|
|
11
|
+
xs: '12px',
|
|
12
|
+
sm: '14px',
|
|
13
|
+
base: '16px',
|
|
14
|
+
lg: '18px',
|
|
15
|
+
xl: '20px',
|
|
16
|
+
'2xl': '24px',
|
|
17
|
+
'3xl': '32px',
|
|
18
|
+
'4xl': '36px',
|
|
19
|
+
'5xl': '48px',
|
|
20
|
+
'6xl': '56px',
|
|
21
|
+
'7xl': '72px',
|
|
22
|
+
'8xl': '96px',
|
|
23
|
+
'9xl': '128px',
|
|
24
|
+
},
|
|
25
|
+
toCssVarName: (tokenKey) => `--text-${tokenKey}`,
|
|
26
|
+
toCssVarValue: (_tokenKey, tokenValue) => pxTokenToRemValue(tokenValue),
|
|
27
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export declare const titleTokenSchema: {
|
|
2
|
+
readonly name: "title";
|
|
3
|
+
readonly description: "Title composite tokens (font family, size, weight, line height, and letter spacing).";
|
|
4
|
+
readonly semanticType: "composite";
|
|
5
|
+
readonly responsive: true;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "alpha";
|
|
8
|
+
readonly direction: "asc";
|
|
9
|
+
};
|
|
10
|
+
readonly fields: readonly [{
|
|
11
|
+
readonly key: "family";
|
|
12
|
+
readonly op: "fontFamily";
|
|
13
|
+
readonly description: "Font family token";
|
|
14
|
+
}, {
|
|
15
|
+
readonly key: "size";
|
|
16
|
+
readonly op: "textSize";
|
|
17
|
+
readonly description: "Font size value";
|
|
18
|
+
}, {
|
|
19
|
+
readonly key: "weight";
|
|
20
|
+
readonly op: "fontWeight";
|
|
21
|
+
readonly description: "Font weight token";
|
|
22
|
+
}, {
|
|
23
|
+
readonly key: "leading";
|
|
24
|
+
readonly op: "leading";
|
|
25
|
+
readonly description: "Line height value";
|
|
26
|
+
}, {
|
|
27
|
+
readonly key: "tracking";
|
|
28
|
+
readonly op: "tracking";
|
|
29
|
+
readonly description: "Letter spacing value";
|
|
30
|
+
}, {
|
|
31
|
+
readonly key: "transform";
|
|
32
|
+
readonly op: "textTransform";
|
|
33
|
+
readonly description: "Text capitalisation";
|
|
34
|
+
}];
|
|
35
|
+
readonly defaults: {
|
|
36
|
+
readonly family: "display";
|
|
37
|
+
readonly weight: "bold";
|
|
38
|
+
readonly leading: 1.375;
|
|
39
|
+
readonly tracking: -0.025;
|
|
40
|
+
};
|
|
41
|
+
readonly initialTokens: {
|
|
42
|
+
readonly h1: {
|
|
43
|
+
readonly family: "display";
|
|
44
|
+
readonly size: 56;
|
|
45
|
+
readonly weight: "bold";
|
|
46
|
+
readonly leading: 1;
|
|
47
|
+
readonly tracking: -0.025;
|
|
48
|
+
};
|
|
49
|
+
readonly h2: {
|
|
50
|
+
readonly family: "display";
|
|
51
|
+
readonly size: 48;
|
|
52
|
+
readonly weight: "semibold";
|
|
53
|
+
readonly leading: 1;
|
|
54
|
+
readonly tracking: -0.025;
|
|
55
|
+
};
|
|
56
|
+
readonly h3: {
|
|
57
|
+
readonly family: "display";
|
|
58
|
+
readonly size: 32;
|
|
59
|
+
readonly weight: "bold";
|
|
60
|
+
readonly leading: 1.12;
|
|
61
|
+
readonly tracking: -0.025;
|
|
62
|
+
};
|
|
63
|
+
readonly h4: {
|
|
64
|
+
readonly family: "display";
|
|
65
|
+
readonly size: 24;
|
|
66
|
+
readonly weight: "bold";
|
|
67
|
+
readonly leading: 1.12;
|
|
68
|
+
readonly tracking: 0;
|
|
69
|
+
};
|
|
70
|
+
readonly h5: {
|
|
71
|
+
readonly family: "display";
|
|
72
|
+
readonly size: 20;
|
|
73
|
+
readonly weight: "semibold";
|
|
74
|
+
readonly leading: 1.12;
|
|
75
|
+
readonly tracking: 0;
|
|
76
|
+
};
|
|
77
|
+
readonly h6: {
|
|
78
|
+
readonly family: "display";
|
|
79
|
+
readonly size: 18;
|
|
80
|
+
readonly weight: "semibold";
|
|
81
|
+
readonly leading: 1.12;
|
|
82
|
+
readonly tracking: 0;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
export const titleTokenSchema = defineTokenFamilySchema({
|
|
3
|
+
name: 'title',
|
|
4
|
+
description: 'Title composite tokens (font family, size, weight, line height, and letter spacing).',
|
|
5
|
+
semanticType: 'composite',
|
|
6
|
+
responsive: true,
|
|
7
|
+
order: { type: 'alpha', direction: 'asc' },
|
|
8
|
+
fields: [
|
|
9
|
+
{ key: 'family', op: 'fontFamily', description: 'Font family token' },
|
|
10
|
+
{ key: 'size', op: 'textSize', description: 'Font size value' },
|
|
11
|
+
{ key: 'weight', op: 'fontWeight', description: 'Font weight token' },
|
|
12
|
+
{ key: 'leading', op: 'leading', description: 'Line height value' },
|
|
13
|
+
{ key: 'tracking', op: 'tracking', description: 'Letter spacing value' },
|
|
14
|
+
{ key: 'transform', op: 'textTransform', description: 'Text capitalisation' },
|
|
15
|
+
],
|
|
16
|
+
defaults: {
|
|
17
|
+
family: 'display',
|
|
18
|
+
weight: 'bold',
|
|
19
|
+
leading: 1.375,
|
|
20
|
+
tracking: -0.025,
|
|
21
|
+
},
|
|
22
|
+
initialTokens: {
|
|
23
|
+
h1: { family: 'display', size: 56, weight: 'bold', leading: 1, tracking: -0.025 },
|
|
24
|
+
h2: { family: 'display', size: 48, weight: 'semibold', leading: 1, tracking: -0.025 },
|
|
25
|
+
h3: { family: 'display', size: 32, weight: 'bold', leading: 1.12, tracking: -0.025 },
|
|
26
|
+
h4: { family: 'display', size: 24, weight: 'bold', leading: 1.12, tracking: 0 },
|
|
27
|
+
h5: { family: 'display', size: 20, weight: 'semibold', leading: 1.12, tracking: 0 },
|
|
28
|
+
h6: { family: 'display', size: 18, weight: 'semibold', leading: 1.12, tracking: 0 },
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const trackingTokenSchema: {
|
|
2
|
+
readonly name: "tracking";
|
|
3
|
+
readonly description: "Letter-spacing scale.";
|
|
4
|
+
readonly semanticType: "em";
|
|
5
|
+
readonly responsive: true;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "numeric";
|
|
8
|
+
readonly direction: "asc";
|
|
9
|
+
};
|
|
10
|
+
readonly initialTokens: {
|
|
11
|
+
readonly tighter: "-0.05em";
|
|
12
|
+
readonly tight: "-0.025em";
|
|
13
|
+
readonly normal: "0em";
|
|
14
|
+
readonly wide: "0.025em";
|
|
15
|
+
readonly wider: "0.05em";
|
|
16
|
+
readonly widest: "0.1em";
|
|
17
|
+
};
|
|
18
|
+
readonly toCssVarName: (tokenKey: string) => string;
|
|
19
|
+
readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
export const trackingTokenSchema = defineTokenFamilySchema({
|
|
3
|
+
name: 'tracking',
|
|
4
|
+
description: 'Letter-spacing scale.',
|
|
5
|
+
semanticType: 'em',
|
|
6
|
+
responsive: true,
|
|
7
|
+
order: { type: 'numeric', direction: 'asc' },
|
|
8
|
+
initialTokens: {
|
|
9
|
+
tighter: '-0.05em',
|
|
10
|
+
tight: '-0.025em',
|
|
11
|
+
normal: '0em',
|
|
12
|
+
wide: '0.025em',
|
|
13
|
+
wider: '0.05em',
|
|
14
|
+
widest: '0.1em',
|
|
15
|
+
},
|
|
16
|
+
toCssVarName: (tokenKey) => `--tracking-${tokenKey}`,
|
|
17
|
+
toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
|
|
18
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const zIndexTokenSchema: {
|
|
2
|
+
readonly name: "zIndex";
|
|
3
|
+
readonly description: "Z-Index presets.";
|
|
4
|
+
readonly semanticType: "number";
|
|
5
|
+
readonly responsive: false;
|
|
6
|
+
readonly order: {
|
|
7
|
+
readonly type: "numeric";
|
|
8
|
+
};
|
|
9
|
+
readonly initialTokens: {
|
|
10
|
+
readonly default: "1";
|
|
11
|
+
readonly raised: "10";
|
|
12
|
+
readonly overlay: "100";
|
|
13
|
+
readonly modal: "200";
|
|
14
|
+
readonly topmost: "1000";
|
|
15
|
+
};
|
|
16
|
+
readonly toCssVarName: (tokenKey: string) => string;
|
|
17
|
+
readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
|
|
2
|
+
export const zIndexTokenSchema = defineTokenFamilySchema({
|
|
3
|
+
name: 'zIndex',
|
|
4
|
+
description: 'Z-Index presets.',
|
|
5
|
+
semanticType: 'number',
|
|
6
|
+
responsive: false,
|
|
7
|
+
order: { type: 'numeric' },
|
|
8
|
+
initialTokens: {
|
|
9
|
+
default: '1',
|
|
10
|
+
raised: '10',
|
|
11
|
+
overlay: '100',
|
|
12
|
+
modal: '200',
|
|
13
|
+
topmost: '1000',
|
|
14
|
+
},
|
|
15
|
+
toCssVarName: (tokenKey) => `--z-${tokenKey}`,
|
|
16
|
+
toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
|
|
17
|
+
});
|