@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.
Files changed (161) hide show
  1. package/LICENSE.md +11 -0
  2. package/README.md +7 -0
  3. package/dist/ak/ak.cssState.transform.d.ts +2 -0
  4. package/dist/ak/ak.cssState.transform.js +60 -0
  5. package/dist/ak/ak.cssState.types.d.ts +2 -0
  6. package/dist/ak/ak.cssState.types.js +1 -0
  7. package/dist/ak/ak.responsive.types.d.ts +18 -0
  8. package/dist/ak/ak.responsive.types.js +1 -0
  9. package/dist/ak/ak.tokens.d.ts +10 -0
  10. package/dist/ak/ak.tokens.js +10 -0
  11. package/dist/ak/ak.tokens.registry.d.ts +10 -0
  12. package/dist/ak/ak.tokens.registry.js +45 -0
  13. package/dist/ak/authoring-surface.shared.d.ts +31 -0
  14. package/dist/ak/authoring-surface.shared.js +185 -0
  15. package/dist/ak/configured-core.shared.d.ts +7 -0
  16. package/dist/ak/configured-core.shared.js +16 -0
  17. package/dist/ak/configured-surfaces.shared.d.ts +67 -0
  18. package/dist/ak/configured-surfaces.shared.js +144 -0
  19. package/dist/ak/index.d.ts +16 -0
  20. package/dist/ak/index.js +16 -0
  21. package/dist/ak/project-entry.d.ts +57 -0
  22. package/dist/ak/project-entry.js +260 -0
  23. package/dist/ak/project-surface-adapters.shared.d.ts +33 -0
  24. package/dist/ak/project-surface-adapters.shared.js +83 -0
  25. package/dist/ak/public-entry.shared.d.ts +16 -0
  26. package/dist/ak/public-entry.shared.js +18 -0
  27. package/dist/ak/resolved-layout-marker.shared.d.ts +3 -0
  28. package/dist/ak/resolved-layout-marker.shared.js +19 -0
  29. package/dist/ak/runtime-surface.shared.d.ts +31 -0
  30. package/dist/ak/runtime-surface.shared.js +221 -0
  31. package/dist/ak/style-execution.d.ts +13 -0
  32. package/dist/ak/style-execution.js +91 -0
  33. package/dist/ak/style-schema.d.ts +16 -0
  34. package/dist/ak/style-schema.js +6 -0
  35. package/dist/ak/useAk.shared.d.ts +3 -0
  36. package/dist/ak/useAk.shared.js +36 -0
  37. package/dist/authoring/authoringEffectKinds.d.ts +2 -0
  38. package/dist/authoring/authoringEffectKinds.js +48 -0
  39. package/dist/authoring/index.d.ts +1 -0
  40. package/dist/authoring/index.js +1 -0
  41. package/dist/cms/CMSPresenterSchemaTypes.d.ts +108 -0
  42. package/dist/cms/CMSPresenterSchemaTypes.js +6 -0
  43. package/dist/cms/CMSSchema.d.ts +27 -0
  44. package/dist/cms/CMSSchema.js +89 -0
  45. package/dist/cms/CMSSchemaTypes.d.ts +141 -0
  46. package/dist/cms/CMSSchemaTypes.js +1 -0
  47. package/dist/cms/index.d.ts +3 -0
  48. package/dist/cms/index.js +1 -0
  49. package/dist/design-system/DesignSystemSnapshotFactory.d.ts +34 -0
  50. package/dist/design-system/DesignSystemSnapshotFactory.js +38 -0
  51. package/dist/design-system/ProjectDesignSystemFactory.d.ts +39 -0
  52. package/dist/design-system/ProjectDesignSystemFactory.js +32 -0
  53. package/dist/design-system/index.d.ts +8 -0
  54. package/dist/design-system/index.js +7 -0
  55. package/dist/design-system/ops/ops.types.d.ts +22 -0
  56. package/dist/design-system/ops/ops.types.js +1 -0
  57. package/dist/design-system/resolvers/ds.resolvers.d.ts +3 -0
  58. package/dist/design-system/resolvers/ds.resolvers.js +24 -0
  59. package/dist/design-system/resolvers/ds.responsive.d.ts +12 -0
  60. package/dist/design-system/resolvers/ds.responsive.js +28 -0
  61. package/dist/design-system/tokens/TokenSchemas.types.d.ts +48 -0
  62. package/dist/design-system/tokens/TokenSchemas.types.js +3 -0
  63. package/dist/design-system/tokens/coreTokenFamilies.types.d.ts +2 -0
  64. package/dist/design-system/tokens/coreTokenFamilies.types.js +1 -0
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.js +1 -0
  67. package/dist/layout/index.d.ts +1 -0
  68. package/dist/layout/index.js +1 -0
  69. package/dist/layout/layoutRuntime.d.ts +12 -0
  70. package/dist/layout/layoutRuntime.js +88 -0
  71. package/dist/schema/LayoutBindingEditorPolicyMetadata.d.ts +7 -0
  72. package/dist/schema/LayoutBindingEditorPolicyMetadata.js +19 -0
  73. package/dist/schema/LayoutBindingEditorSectionMetadata.d.ts +7 -0
  74. package/dist/schema/LayoutBindingEditorSectionMetadata.js +19 -0
  75. package/dist/schema/LayoutDefinitionMeta.d.ts +54 -0
  76. package/dist/schema/LayoutDefinitionMeta.js +1 -0
  77. package/dist/schema/LayoutFieldIntentMetadata.d.ts +22 -0
  78. package/dist/schema/LayoutFieldIntentMetadata.js +38 -0
  79. package/dist/schema/LayoutFieldUiMetadata.d.ts +30 -0
  80. package/dist/schema/LayoutFieldUiMetadata.js +19 -0
  81. package/dist/schema/LayoutSchema.d.ts +39 -0
  82. package/dist/schema/LayoutSchema.js +53 -0
  83. package/dist/schema/LayoutVariantBindings.d.ts +55 -0
  84. package/dist/schema/LayoutVariantBindings.js +107 -0
  85. package/dist/schema/SlotSchema.d.ts +10 -0
  86. package/dist/schema/SlotSchema.js +3 -0
  87. package/dist/schema/StyleSchema.d.ts +16 -0
  88. package/dist/schema/StyleSchema.js +6 -0
  89. package/dist/schema/index.d.ts +9 -0
  90. package/dist/schema/index.js +9 -0
  91. package/dist/theme-contract/CompositeFieldOpByFamily.d.ts +126 -0
  92. package/dist/theme-contract/CompositeFieldOpByFamily.js +126 -0
  93. package/dist/theme-contract/index.d.ts +7 -0
  94. package/dist/theme-contract/index.js +7 -0
  95. package/dist/theme-contract/ops/coreOps.d.ts +697 -0
  96. package/dist/theme-contract/ops/coreOps.js +748 -0
  97. package/dist/theme-contract/ops/delegateValidation.types.d.ts +46 -0
  98. package/dist/theme-contract/ops/delegateValidation.types.js +4 -0
  99. package/dist/theme-contract/ops/emitters.d.ts +24 -0
  100. package/dist/theme-contract/ops/emitters.js +151 -0
  101. package/dist/theme-contract/ops/op.config.d.ts +711 -0
  102. package/dist/theme-contract/ops/op.config.js +15 -0
  103. package/dist/theme-contract/tokens/coreTokenFamilies.d.ts +9 -0
  104. package/dist/theme-contract/tokens/coreTokenFamilies.js +6 -0
  105. package/dist/theme-contract/tokens/cssLengthConversion.d.ts +2 -0
  106. package/dist/theme-contract/tokens/cssLengthConversion.js +39 -0
  107. package/dist/theme-contract/tokens/defineProjectTokenFamilySchema.d.ts +1 -0
  108. package/dist/theme-contract/tokens/defineProjectTokenFamilySchema.js +1 -0
  109. package/dist/theme-contract/tokens/defineTokenFamilySchema.d.ts +3 -0
  110. package/dist/theme-contract/tokens/defineTokenFamilySchema.js +5 -0
  111. package/dist/theme-contract/tokens/runtimeTokenFamilies.types.d.ts +5 -0
  112. package/dist/theme-contract/tokens/runtimeTokenFamilies.types.js +1 -0
  113. package/dist/theme-contract/tokens/schemas/aspect.token.schema.d.ts +20 -0
  114. package/dist/theme-contract/tokens/schemas/aspect.token.schema.js +19 -0
  115. package/dist/theme-contract/tokens/schemas/blur.token.schema.d.ts +21 -0
  116. package/dist/theme-contract/tokens/schemas/blur.token.schema.js +19 -0
  117. package/dist/theme-contract/tokens/schemas/border.token.schema.d.ts +54 -0
  118. package/dist/theme-contract/tokens/schemas/border.token.schema.js +43 -0
  119. package/dist/theme-contract/tokens/schemas/breakpoint.token.schema.d.ts +19 -0
  120. package/dist/theme-contract/tokens/schemas/breakpoint.token.schema.js +18 -0
  121. package/dist/theme-contract/tokens/schemas/color.token.schema.d.ts +24 -0
  122. package/dist/theme-contract/tokens/schemas/color.token.schema.js +23 -0
  123. package/dist/theme-contract/tokens/schemas/container.token.schema.d.ts +26 -0
  124. package/dist/theme-contract/tokens/schemas/container.token.schema.js +30 -0
  125. package/dist/theme-contract/tokens/schemas/font.token.schema.d.ts +17 -0
  126. package/dist/theme-contract/tokens/schemas/font.token.schema.js +15 -0
  127. package/dist/theme-contract/tokens/schemas/fontWeight.token.schema.d.ts +24 -0
  128. package/dist/theme-contract/tokens/schemas/fontWeight.token.schema.js +22 -0
  129. package/dist/theme-contract/tokens/schemas/leading.token.schema.d.ts +20 -0
  130. package/dist/theme-contract/tokens/schemas/leading.token.schema.js +18 -0
  131. package/dist/theme-contract/tokens/schemas/radius.token.schema.d.ts +23 -0
  132. package/dist/theme-contract/tokens/schemas/radius.token.schema.js +22 -0
  133. package/dist/theme-contract/tokens/schemas/shadow.token.schema.d.ts +108 -0
  134. package/dist/theme-contract/tokens/schemas/shadow.token.schema.js +73 -0
  135. package/dist/theme-contract/tokens/schemas/size.token.schema.d.ts +20 -0
  136. package/dist/theme-contract/tokens/schemas/size.token.schema.js +19 -0
  137. package/dist/theme-contract/tokens/schemas/spacing.token.schema.d.ts +21 -0
  138. package/dist/theme-contract/tokens/schemas/spacing.token.schema.js +20 -0
  139. package/dist/theme-contract/tokens/schemas/text.token.schema.d.ts +87 -0
  140. package/dist/theme-contract/tokens/schemas/text.token.schema.js +30 -0
  141. package/dist/theme-contract/tokens/schemas/textSize.token.schema.d.ts +28 -0
  142. package/dist/theme-contract/tokens/schemas/textSize.token.schema.js +27 -0
  143. package/dist/theme-contract/tokens/schemas/title.token.schema.d.ts +85 -0
  144. package/dist/theme-contract/tokens/schemas/title.token.schema.js +30 -0
  145. package/dist/theme-contract/tokens/schemas/tracking.token.schema.d.ts +20 -0
  146. package/dist/theme-contract/tokens/schemas/tracking.token.schema.js +18 -0
  147. package/dist/theme-contract/tokens/schemas/zIndex.token.schema.d.ts +18 -0
  148. package/dist/theme-contract/tokens/schemas/zIndex.token.schema.js +17 -0
  149. package/dist/theme-contract/tokens/tokens.schema.d.ts +531 -0
  150. package/dist/theme-contract/tokens/tokens.schema.js +32 -0
  151. package/dist/types/LayoutResolvedTs.types.d.ts +18 -0
  152. package/dist/types/LayoutResolvedTs.types.js +1 -0
  153. package/dist/types/authoredTree.types.d.ts +112 -0
  154. package/dist/types/authoredTree.types.js +1 -0
  155. package/dist/types/blockRegistry.types.d.ts +37 -0
  156. package/dist/types/blockRegistry.types.js +1 -0
  157. package/dist/types/index.d.ts +4 -0
  158. package/dist/types/index.js +1 -0
  159. package/dist/types/layout.types.d.ts +30 -0
  160. package/dist/types/layout.types.js +1 -0
  161. package/package.json +65 -0
@@ -0,0 +1,15 @@
1
+ import { CORE_DESIGN_OP_CONFIG } from './coreOps.js';
2
+ export const OP_CONFIG = CORE_DESIGN_OP_CONFIG;
3
+ export const DESIGN_OPS = Object.keys(OP_CONFIG);
4
+ export const AUTHORING_EFFECTS_BY_OP = Object.fromEntries(Object.entries(OP_CONFIG).flatMap(([op, config]) => 'authoringEffect' in config && config.authoringEffect ? [[op, config.authoringEffect]] : []));
5
+ export const PUBLIC_DESIGN_OPS = DESIGN_OPS.filter((op) => {
6
+ const config = OP_CONFIG[op];
7
+ if (typeof config !== 'object' || config === null)
8
+ return true;
9
+ if (!('private' in config))
10
+ return true;
11
+ return config.private !== true;
12
+ });
13
+ export function getTokenFamilyForDesignOp(op) {
14
+ return OP_CONFIG[op].tokenFamily;
15
+ }
@@ -0,0 +1,9 @@
1
+ export declare const CORE_TOKEN_FAMILIES: {
2
+ readonly textAlign: readonly ["left", "center", "right", "justify"];
3
+ readonly textTransform: readonly ["uppercase", "lowercase", "capitalize", "normal-case"];
4
+ readonly align: readonly ["left", "center", "right"];
5
+ readonly inset: readonly ["0", "px", "1/2", "full"];
6
+ };
7
+ export type CoreTokenFamilies = typeof CORE_TOKEN_FAMILIES;
8
+ export type CoreTokenFamilyName = keyof CoreTokenFamilies & string;
9
+ export type CoreTokenKeysOfFamily<F extends CoreTokenFamilyName> = CoreTokenFamilies[F][number];
@@ -0,0 +1,6 @@
1
+ export const CORE_TOKEN_FAMILIES = {
2
+ textAlign: ['left', 'center', 'right', 'justify'],
3
+ textTransform: ['uppercase', 'lowercase', 'capitalize', 'normal-case'],
4
+ align: ['left', 'center', 'right'],
5
+ inset: ['0', 'px', '1/2', 'full'],
6
+ };
@@ -0,0 +1,2 @@
1
+ export declare const THEME_SCALE_BASE_PX = 16;
2
+ export declare function pxTokenToRemValue(tokenValue: string, basePx?: number): string;
@@ -0,0 +1,39 @@
1
+ export const THEME_SCALE_BASE_PX = 16;
2
+ const CSS_LENGTH_PATTERN = /^(-?\d+(?:\.\d+)?)(?:\s*(px|rem))?$/i;
3
+ function roundLengthValue(value) {
4
+ if (!Number.isFinite(value))
5
+ return value;
6
+ return Math.round(value * 1_000_000) / 1_000_000;
7
+ }
8
+ function formatLengthValue(value) {
9
+ const normalized = Object.is(value, -0) ? 0 : roundLengthValue(value);
10
+ return `${normalized}`;
11
+ }
12
+ function parseLength(raw) {
13
+ const trimmed = raw.trim();
14
+ if (trimmed.length === 0)
15
+ return null;
16
+ const match = CSS_LENGTH_PATTERN.exec(trimmed);
17
+ if (!match)
18
+ return null;
19
+ const value = Number(match[1]);
20
+ if (!Number.isFinite(value))
21
+ return null;
22
+ return {
23
+ value,
24
+ unit: match[2]?.toLowerCase() ?? null,
25
+ };
26
+ }
27
+ export function pxTokenToRemValue(tokenValue, basePx = THEME_SCALE_BASE_PX) {
28
+ const trimmed = tokenValue.trim();
29
+ if (trimmed.length === 0)
30
+ return tokenValue;
31
+ const parsed = parseLength(trimmed);
32
+ if (!parsed)
33
+ return tokenValue;
34
+ if (parsed.unit === 'rem') {
35
+ return parsed.value === 0 ? '0' : `${formatLengthValue(parsed.value)}rem`;
36
+ }
37
+ const remValue = parsed.value / basePx;
38
+ return remValue === 0 ? '0' : `${formatLengthValue(remValue)}rem`;
39
+ }
@@ -0,0 +1 @@
1
+ export { defineTokenFamilySchema, defineTokenFamilySchema as defineProjectTokenFamilySchema } from './defineTokenFamilySchema.js';
@@ -0,0 +1 @@
1
+ export { defineTokenFamilySchema, defineTokenFamilySchema as defineProjectTokenFamilySchema } from './defineTokenFamilySchema.js';
@@ -0,0 +1,3 @@
1
+ import type { TokenFamilySchema } from '../../design-system/tokens/TokenSchemas.types.js';
2
+ export declare function defineTokenFamilySchema<const T extends TokenFamilySchema>(schema: T): T;
3
+ export declare const defineProjectTokenFamilySchema: typeof defineTokenFamilySchema;
@@ -0,0 +1,5 @@
1
+ import { defineTokenFamilySchema as defineFrameworkTokenFamilySchema } from '../../design-system/tokens/TokenSchemas.types.js';
2
+ export function defineTokenFamilySchema(schema) {
3
+ return defineFrameworkTokenFamilySchema(schema);
4
+ }
5
+ export const defineProjectTokenFamilySchema = defineTokenFamilySchema;
@@ -0,0 +1,5 @@
1
+ import type { CoreTokenFamilyName } from './coreTokenFamilies.js';
2
+ import { TOKEN_SCHEMAS } from './tokens.schema.js';
3
+ type SchemaTokenFamily = (typeof TOKEN_SCHEMAS)[number]['name'];
4
+ export type RuntimeTokenFamily = SchemaTokenFamily | CoreTokenFamilyName;
5
+ export {};
@@ -0,0 +1 @@
1
+ import { TOKEN_SCHEMAS } from './tokens.schema.js';
@@ -0,0 +1,20 @@
1
+ export declare const aspectTokenSchema: {
2
+ readonly name: "aspect";
3
+ readonly description: "Aspect ratio presets.";
4
+ readonly semanticType: "aspect-ratio";
5
+ readonly responsive: false;
6
+ readonly order: {
7
+ readonly type: "custom";
8
+ };
9
+ readonly initialTokens: {
10
+ readonly auto: "auto";
11
+ readonly square: "1 / 1";
12
+ readonly video: "16 / 9";
13
+ readonly '16-9': "16 / 9";
14
+ readonly '4-3': "4 / 3";
15
+ readonly '3-2': "3 / 2";
16
+ readonly '1-1': "1 / 1";
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
+ export const aspectTokenSchema = defineTokenFamilySchema({
3
+ name: 'aspect',
4
+ description: 'Aspect ratio presets.',
5
+ semanticType: 'aspect-ratio',
6
+ responsive: false,
7
+ order: { type: 'custom' },
8
+ initialTokens: {
9
+ auto: 'auto',
10
+ square: '1 / 1',
11
+ video: '16 / 9',
12
+ '16-9': '16 / 9',
13
+ '4-3': '4 / 3',
14
+ '3-2': '3 / 2',
15
+ '1-1': '1 / 1',
16
+ },
17
+ toCssVarName: (tokenKey) => `--aspect-${tokenKey}`,
18
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
19
+ });
@@ -0,0 +1,21 @@
1
+ export declare const blurTokenSchema: {
2
+ readonly name: "blur";
3
+ readonly description: "Blur radius tokens.";
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: "4px";
12
+ readonly sm: "8px";
13
+ readonly md: "12px";
14
+ readonly lg: "16px";
15
+ readonly xl: "24px";
16
+ readonly '2xl': "40px";
17
+ readonly '3xl': "64px";
18
+ };
19
+ readonly toCssVarName: (tokenKey: string) => string;
20
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
21
+ };
@@ -0,0 +1,19 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ export const blurTokenSchema = defineTokenFamilySchema({
3
+ name: 'blur',
4
+ description: 'Blur radius tokens.',
5
+ semanticType: 'px',
6
+ responsive: true,
7
+ order: { type: 'numeric', direction: 'asc' },
8
+ initialTokens: {
9
+ xs: '4px',
10
+ sm: '8px',
11
+ md: '12px',
12
+ lg: '16px',
13
+ xl: '24px',
14
+ '2xl': '40px',
15
+ '3xl': '64px',
16
+ },
17
+ toCssVarName: (tokenKey) => `--blur-${tokenKey}`,
18
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
19
+ });
@@ -0,0 +1,54 @@
1
+ export declare const borderTokenSchema: {
2
+ readonly name: "border";
3
+ readonly description: "Border composite tokens (color + width + style).";
4
+ readonly semanticType: "composite";
5
+ readonly responsive: false;
6
+ readonly order: {
7
+ readonly type: "custom";
8
+ };
9
+ readonly fields: readonly [{
10
+ readonly key: "color";
11
+ readonly op: "borderColor";
12
+ readonly description: "Border color token";
13
+ }, {
14
+ readonly key: "width";
15
+ readonly op: "borderWidth";
16
+ readonly description: "Border width token";
17
+ }, {
18
+ readonly key: "style";
19
+ readonly op: "borderStyle";
20
+ readonly description: "Border style token";
21
+ }];
22
+ readonly defaults: {
23
+ readonly color: "primary";
24
+ readonly width: 2;
25
+ readonly style: "solid";
26
+ };
27
+ readonly initialTokens: {
28
+ readonly default: {
29
+ readonly color: "primary";
30
+ readonly width: 2;
31
+ readonly style: "solid";
32
+ };
33
+ };
34
+ };
35
+ export declare const borderStyleTokenSchema: {
36
+ readonly name: "borderStyle";
37
+ readonly description: "border style tokens.";
38
+ readonly semanticType: "string";
39
+ readonly responsive: false;
40
+ readonly editorVisible: false;
41
+ readonly order: {
42
+ readonly type: "custom";
43
+ };
44
+ readonly initialTokens: {
45
+ readonly none: "none";
46
+ readonly solid: "solid";
47
+ readonly dashed: "dashed";
48
+ readonly dotted: "dotted";
49
+ readonly double: "double";
50
+ readonly hidden: "hidden";
51
+ };
52
+ readonly toCssVarName: (tokenKey: string) => string;
53
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
54
+ };
@@ -0,0 +1,43 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ export const borderTokenSchema = defineTokenFamilySchema({
3
+ name: 'border',
4
+ description: 'Border composite tokens (color + width + style).',
5
+ semanticType: 'composite',
6
+ responsive: false,
7
+ order: { type: 'custom' },
8
+ fields: [
9
+ { key: 'color', op: 'borderColor', description: 'Border color token' },
10
+ { key: 'width', op: 'borderWidth', description: 'Border width token' },
11
+ { key: 'style', op: 'borderStyle', description: 'Border style token' },
12
+ ],
13
+ defaults: {
14
+ color: 'primary',
15
+ width: 2,
16
+ style: 'solid',
17
+ },
18
+ initialTokens: {
19
+ default: {
20
+ color: 'primary',
21
+ width: 2,
22
+ style: 'solid',
23
+ },
24
+ },
25
+ });
26
+ export const borderStyleTokenSchema = defineTokenFamilySchema({
27
+ name: 'borderStyle',
28
+ description: 'border style tokens.',
29
+ semanticType: 'string',
30
+ responsive: false,
31
+ editorVisible: false,
32
+ order: { type: 'custom' },
33
+ initialTokens: {
34
+ none: 'none',
35
+ solid: 'solid',
36
+ dashed: 'dashed',
37
+ dotted: 'dotted',
38
+ double: 'double',
39
+ hidden: 'hidden',
40
+ },
41
+ toCssVarName: (tokenKey) => `--border-${tokenKey}`,
42
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
43
+ });
@@ -0,0 +1,19 @@
1
+ export declare const breakpointTokenSchema: {
2
+ readonly name: "breakpoint";
3
+ readonly description: "Tailwind responsive breakpoints (min-width).";
4
+ readonly semanticType: "px";
5
+ readonly responsive: false;
6
+ readonly order: {
7
+ readonly type: "numeric";
8
+ readonly direction: "asc";
9
+ };
10
+ readonly initialTokens: {
11
+ readonly sm: "640px";
12
+ readonly md: "768px";
13
+ readonly lg: "1024px";
14
+ readonly xl: "1280px";
15
+ readonly '2xl': "1536px";
16
+ };
17
+ readonly toCssVarName: (tokenKey: string) => string;
18
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
19
+ };
@@ -0,0 +1,18 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ import { pxTokenToRemValue } from '../cssLengthConversion.js';
3
+ export const breakpointTokenSchema = defineTokenFamilySchema({
4
+ name: 'breakpoint',
5
+ description: 'Tailwind responsive breakpoints (min-width).',
6
+ semanticType: 'px',
7
+ responsive: false,
8
+ order: { type: 'numeric', direction: 'asc' },
9
+ initialTokens: {
10
+ sm: '640px',
11
+ md: '768px',
12
+ lg: '1024px',
13
+ xl: '1280px',
14
+ '2xl': '1536px',
15
+ },
16
+ toCssVarName: (tokenKey) => `--breakpoint-${tokenKey}`,
17
+ toCssVarValue: (_tokenKey, tokenValue) => pxTokenToRemValue(tokenValue),
18
+ });
@@ -0,0 +1,24 @@
1
+ export declare const colorTokenSchema: {
2
+ readonly name: "color";
3
+ readonly description: "Design system color tokens.";
4
+ readonly semanticType: "css-color";
5
+ readonly responsive: false;
6
+ readonly tokenDescriptions: true;
7
+ readonly order: {
8
+ readonly type: "custom";
9
+ };
10
+ readonly initialTokens: {
11
+ readonly primary: "#000000";
12
+ readonly secondary: "#ffffff";
13
+ readonly muted: "#ffffff";
14
+ readonly accent: "#ffffff";
15
+ readonly success: "#ffffff";
16
+ readonly warning: "#fbf9f9";
17
+ readonly destructive: "#e63946";
18
+ readonly foreground: "#101010";
19
+ readonly background: "#ffffff";
20
+ readonly subtle: "#fcfcfd";
21
+ };
22
+ readonly toCssVarName: (tokenKey: string) => string;
23
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
24
+ };
@@ -0,0 +1,23 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ export const colorTokenSchema = defineTokenFamilySchema({
3
+ name: 'color',
4
+ description: 'Design system color tokens.',
5
+ semanticType: 'css-color',
6
+ responsive: false,
7
+ tokenDescriptions: true,
8
+ order: { type: 'custom' },
9
+ initialTokens: {
10
+ primary: '#000000',
11
+ secondary: '#ffffff',
12
+ muted: '#ffffff',
13
+ accent: '#ffffff',
14
+ success: '#ffffff',
15
+ warning: '#fbf9f9',
16
+ destructive: '#e63946',
17
+ foreground: '#101010',
18
+ background: '#ffffff',
19
+ subtle: '#fcfcfd',
20
+ },
21
+ toCssVarName: (tokenKey) => `--color-${tokenKey}`,
22
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
23
+ });
@@ -0,0 +1,26 @@
1
+ export declare const containerTokenSchema: {
2
+ readonly name: "container";
3
+ readonly description: "Named size tokens used for w/h/min*/max* (container scale + specials).";
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 full: "full";
12
+ readonly screen: "screen";
13
+ readonly fit: "fit";
14
+ readonly min: "min";
15
+ readonly max: "max";
16
+ readonly xs: "320px";
17
+ readonly sm: "384px";
18
+ readonly md: "448px";
19
+ readonly lg: "512px";
20
+ readonly xl: "576px";
21
+ readonly '2xl': "672px";
22
+ };
23
+ readonly toCssVarName: (tokenKey: string) => string | null;
24
+ readonly toCssVarAliases: (tokenKey: string) => string[];
25
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
26
+ };
@@ -0,0 +1,30 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ import { pxTokenToRemValue } from '../cssLengthConversion.js';
3
+ const SPECIAL_CONTAINER_KEYS = new Set(['full', 'screen', 'fit', 'min', 'max']);
4
+ export const containerTokenSchema = defineTokenFamilySchema({
5
+ name: 'container',
6
+ description: 'Named size tokens used for w/h/min*/max* (container scale + specials).',
7
+ semanticType: 'px',
8
+ responsive: true,
9
+ order: { type: 'numeric', direction: 'asc' },
10
+ initialTokens: {
11
+ full: 'full',
12
+ screen: 'screen',
13
+ fit: 'fit',
14
+ min: 'min',
15
+ max: 'max',
16
+ xs: '320px',
17
+ sm: '384px',
18
+ md: '448px',
19
+ lg: '512px',
20
+ xl: '576px',
21
+ '2xl': '672px',
22
+ },
23
+ toCssVarName: (tokenKey) => {
24
+ if (SPECIAL_CONTAINER_KEYS.has(tokenKey))
25
+ return null;
26
+ return `--container-${tokenKey}`;
27
+ },
28
+ toCssVarAliases: (tokenKey) => [`--max-width-${tokenKey}`],
29
+ toCssVarValue: (_tokenKey, tokenValue) => pxTokenToRemValue(tokenValue),
30
+ });
@@ -0,0 +1,17 @@
1
+ export declare const fontTokenSchema: {
2
+ readonly name: "font";
3
+ readonly description: "Font family tokens.";
4
+ readonly semanticType: "string";
5
+ readonly responsive: true;
6
+ readonly order: {
7
+ readonly type: "alpha";
8
+ readonly direction: "asc";
9
+ };
10
+ readonly initialTokens: {
11
+ readonly body: "ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif";
12
+ readonly display: "ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif";
13
+ readonly mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace";
14
+ };
15
+ readonly toCssVarName: (tokenKey: string) => string;
16
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
17
+ };
@@ -0,0 +1,15 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ export const fontTokenSchema = defineTokenFamilySchema({
3
+ name: 'font',
4
+ description: 'Font family tokens.',
5
+ semanticType: 'string',
6
+ responsive: true,
7
+ order: { type: 'alpha', direction: 'asc' },
8
+ initialTokens: {
9
+ body: 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif',
10
+ display: 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
11
+ mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
12
+ },
13
+ toCssVarName: (tokenKey) => `--font-${tokenKey}`,
14
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
15
+ });
@@ -0,0 +1,24 @@
1
+ export declare const fontWeightTokenSchema: {
2
+ readonly name: "fontWeight";
3
+ readonly description: "Font weight scale.";
4
+ readonly semanticType: "number";
5
+ readonly responsive: true;
6
+ readonly editorVisible: false;
7
+ readonly order: {
8
+ readonly type: "numeric";
9
+ readonly direction: "asc";
10
+ };
11
+ readonly initialTokens: {
12
+ readonly thin: "100";
13
+ readonly extralight: "200";
14
+ readonly light: "300";
15
+ readonly normal: "400";
16
+ readonly medium: "500";
17
+ readonly semibold: "600";
18
+ readonly bold: "700";
19
+ readonly extrabold: "800";
20
+ readonly black: "900";
21
+ };
22
+ readonly toCssVarName: (tokenKey: string) => string;
23
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
24
+ };
@@ -0,0 +1,22 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ export const fontWeightTokenSchema = defineTokenFamilySchema({
3
+ name: 'fontWeight',
4
+ description: 'Font weight scale.',
5
+ semanticType: 'number',
6
+ responsive: true,
7
+ editorVisible: false,
8
+ order: { type: 'numeric', direction: 'asc' },
9
+ initialTokens: {
10
+ thin: '100',
11
+ extralight: '200',
12
+ light: '300',
13
+ normal: '400',
14
+ medium: '500',
15
+ semibold: '600',
16
+ bold: '700',
17
+ extrabold: '800',
18
+ black: '900',
19
+ },
20
+ toCssVarName: (tokenKey) => `--font-weight-${tokenKey}`,
21
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
22
+ });
@@ -0,0 +1,20 @@
1
+ export declare const leadingTokenSchema: {
2
+ readonly name: "leading";
3
+ readonly description: "Line-height scale.";
4
+ readonly semanticType: "number";
5
+ readonly responsive: true;
6
+ readonly order: {
7
+ readonly type: "numeric";
8
+ readonly direction: "asc";
9
+ };
10
+ readonly initialTokens: {
11
+ readonly none: "1";
12
+ readonly tight: "1.25";
13
+ readonly snug: "1.375";
14
+ readonly normal: "1.5";
15
+ readonly relaxed: "1.625";
16
+ readonly loose: "2";
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 leadingTokenSchema = defineTokenFamilySchema({
3
+ name: 'leading',
4
+ description: 'Line-height scale.',
5
+ semanticType: 'number',
6
+ responsive: true,
7
+ order: { type: 'numeric', direction: 'asc' },
8
+ initialTokens: {
9
+ none: '1',
10
+ tight: '1.25',
11
+ snug: '1.375',
12
+ normal: '1.5',
13
+ relaxed: '1.625',
14
+ loose: '2',
15
+ },
16
+ toCssVarName: (tokenKey) => `--leading-${tokenKey}`,
17
+ toCssVarValue: (_tokenKey, tokenValue) => tokenValue,
18
+ });
@@ -0,0 +1,23 @@
1
+ export declare const radiusTokenSchema: {
2
+ readonly name: "radius";
3
+ readonly description: "Border radius tokens.";
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 none: "0px";
12
+ readonly xs: "2px";
13
+ readonly sm: "4px";
14
+ readonly md: "6px";
15
+ readonly lg: "8px";
16
+ readonly xl: "12px";
17
+ readonly '2xl': "16px";
18
+ readonly '3xl': "24px";
19
+ readonly '4xl': "32px";
20
+ };
21
+ readonly toCssVarName: (tokenKey: string) => string;
22
+ readonly toCssVarValue: (_tokenKey: string, tokenValue: string) => string;
23
+ };
@@ -0,0 +1,22 @@
1
+ import { defineTokenFamilySchema } from '../defineTokenFamilySchema.js';
2
+ import { pxTokenToRemValue } from '../cssLengthConversion.js';
3
+ export const radiusTokenSchema = defineTokenFamilySchema({
4
+ name: 'radius',
5
+ description: 'Border radius tokens.',
6
+ semanticType: 'px',
7
+ responsive: true,
8
+ order: { type: 'numeric', direction: 'asc' },
9
+ initialTokens: {
10
+ none: '0px',
11
+ xs: '2px',
12
+ sm: '4px',
13
+ md: '6px',
14
+ lg: '8px',
15
+ xl: '12px',
16
+ '2xl': '16px',
17
+ '3xl': '24px',
18
+ '4xl': '32px',
19
+ },
20
+ toCssVarName: (tokenKey) => `--radius-${tokenKey}`,
21
+ toCssVarValue: (_tokenKey, tokenValue) => pxTokenToRemValue(tokenValue),
22
+ });