@3fn/core 14.0.0 → 14.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.
Files changed (96) hide show
  1. package/.kiro/steering/Civitas-System-Overview.md +3 -12
  2. package/.kiro/steering/Spec-Feedback-Protocol.md +2 -11
  3. package/.kiro/steering/Task-Completion-Protocol.md +7 -7
  4. package/.kiro/steering/start-up-tasks.md +4 -4
  5. package/dist/ComponentTokens.android.kt +12 -12
  6. package/dist/ComponentTokens.ios.swift +12 -12
  7. package/dist/ComponentTokens.web.css +3 -3
  8. package/dist/DesignTokens.android.kt +1 -1
  9. package/dist/DesignTokens.dtcg.json +2 -2
  10. package/dist/DesignTokens.ios.swift +1 -1
  11. package/dist/DesignTokens.web.css +1 -1
  12. package/dist/android/DesignTokens.android.kt +1 -1
  13. package/dist/browser/designerpunk.esm.js +14 -9
  14. package/dist/browser/designerpunk.esm.min.js +7 -7
  15. package/dist/browser/designerpunk.umd.js +14 -9
  16. package/dist/browser/designerpunk.umd.min.js +12 -12
  17. package/dist/browser/tokens.css +3 -3
  18. package/dist/build/tokens/defineComponentTokens.d.ts +10 -0
  19. package/dist/build/tokens/defineComponentTokens.js +26 -0
  20. package/dist/components/core/Avatar-Base/avatar.tokens.d.ts +21 -26
  21. package/dist/components/core/Avatar-Base/avatar.tokens.js +31 -34
  22. package/dist/components/core/Avatar-Base/index.d.ts +1 -1
  23. package/dist/components/core/Avatar-Base/index.js +2 -2
  24. package/dist/components/core/Button-Icon/buttonIcon.tokens.d.ts +28 -14
  25. package/dist/components/core/Button-Icon/buttonIcon.tokens.js +35 -20
  26. package/dist/generators/TokenFileGenerator.js +7 -2
  27. package/dist/ios/DesignTokens.ios.swift +1 -1
  28. package/dist/tokens/component/progress.d.ts +65 -5
  29. package/dist/tokens/component/progress.js +79 -18
  30. package/dist/types/generated/TokenTypes.d.ts +1 -1
  31. package/dist/types/generated/TokenTypes.js +1 -1
  32. package/dist/web/DesignTokens.web.css +1 -1
  33. package/governance/BUILD-SYSTEM-SETUP.md +1 -2
  34. package/governance/Component-Development-Guide.md +1 -1
  35. package/governance/Component-Development-Standards.md +19 -18
  36. package/governance/Component-Family-Avatar.md +6 -6
  37. package/governance/Component-Family-Badge.md +19 -19
  38. package/governance/Component-Family-Button.md +26 -26
  39. package/governance/Component-Family-Chip.md +14 -14
  40. package/governance/Component-Family-Container.md +12 -12
  41. package/governance/Component-Family-Form-Inputs.md +61 -61
  42. package/governance/Component-Family-Icon.md +8 -8
  43. package/governance/Component-Family-Navigation.md +1 -1
  44. package/governance/Component-Inheritance-Structures.md +29 -28
  45. package/governance/Component-Readiness-Status.md +6 -7
  46. package/governance/Component-Templates.md +26 -26
  47. package/governance/Contract-System-Reference.md +1 -1
  48. package/governance/Process-Development-Workflow.md +4 -4
  49. package/governance/Process-File-Organization.md +1 -4
  50. package/governance/Process-Hook-Operations.md +6 -7
  51. package/governance/Process-Spec-Planning.md +8 -14
  52. package/governance/Rosetta-System-Architecture.md +7 -5
  53. package/governance/Token-Quick-Reference.md +35 -22
  54. package/governance/Web-Authoring-Standards.md +1 -1
  55. package/governance/classification-map.md +109 -3
  56. package/governance/completion-documentation-guide.md +14 -31
  57. package/governance/platform-implementation-guidelines.md +1 -2
  58. package/governance/release-management-system.md +28 -63
  59. package/package.json +2 -6
  60. package/src/build/tokens/__tests__/defineComponentTokens.test.ts +113 -0
  61. package/src/build/tokens/defineComponentTokens.ts +43 -1
  62. package/src/components/core/Avatar-Base/avatar.tokens.ts +31 -34
  63. package/src/components/core/Avatar-Base/index.ts +1 -1
  64. package/src/components/core/Button-Icon/buttonIcon.tokens.ts +43 -27
  65. package/src/generators/TokenFileGenerator.ts +7 -2
  66. package/src/tokens/__tests__/ProgressTokenCompliance.test.ts +5 -3
  67. package/src/tokens/__tests__/ProgressTokenFormulas.test.ts +11 -11
  68. package/src/tokens/__tests__/ProgressTokenTranslation.test.ts +22 -20
  69. package/src/tokens/component/progress.ts +83 -21
  70. package/src/types/generated/TokenTypes.ts +1 -1
  71. package/token-index/components.yaml +8 -8
  72. package/src/tools/release/__tests__/ChangeClassifier.test.ts +0 -133
  73. package/src/tools/release/__tests__/ChangeExtractor.test.ts +0 -222
  74. package/src/tools/release/__tests__/GitHubPublisher.test.ts +0 -240
  75. package/src/tools/release/__tests__/NotesRenderer.test.ts +0 -142
  76. package/src/tools/release/__tests__/NpmPublisher.test.ts +0 -289
  77. package/src/tools/release/__tests__/PipelineIntegration.test.ts +0 -188
  78. package/src/tools/release/__tests__/ReleasePipeline.test.ts +0 -192
  79. package/src/tools/release/__tests__/SemanticVersionValidator.test.ts +0 -49
  80. package/src/tools/release/__tests__/SummaryScanner.test.ts +0 -141
  81. package/src/tools/release/__tests__/TagResolver.test.ts +0 -91
  82. package/src/tools/release/__tests__/VersionCalculator.test.ts +0 -270
  83. package/src/tools/release/__tests__/helpers/NpmMockHelper.ts +0 -80
  84. package/src/tools/release/cli/ReleasePipeline.ts +0 -165
  85. package/src/tools/release/cli/release-tool.ts +0 -107
  86. package/src/tools/release/pipeline/ChangeClassifier.ts +0 -61
  87. package/src/tools/release/pipeline/ChangeExtractor.ts +0 -87
  88. package/src/tools/release/pipeline/NotesRenderer.ts +0 -66
  89. package/src/tools/release/pipeline/SummaryScanner.ts +0 -70
  90. package/src/tools/release/pipeline/TagResolver.ts +0 -40
  91. package/src/tools/release/pipeline/VersionCalculator.ts +0 -375
  92. package/src/tools/release/publishers/GitHubPublisher.ts +0 -228
  93. package/src/tools/release/publishers/NpmPublisher.ts +0 -196
  94. package/src/tools/release/release-config.json +0 -5
  95. package/src/tools/release/types/index.ts +0 -282
  96. package/src/tools/release/validators/SemanticVersionValidator.ts +0 -67
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * DesignerPunk Design System - Web Tokens
3
- * Generated: 2026-08-12T03:23:16.987Z
3
+ * Generated: 2026-08-26T14:15:24.233Z
4
4
  * Version: 1.0.0
5
5
  * Platform: Web (CSS Custom Properties)
6
6
  *
@@ -998,6 +998,8 @@
998
998
  --inputradio-box-lg: var(--size-500);
999
999
 
1000
1000
  /* Progress Component Tokens */
1001
+ /* Connector line thickness (1px). References borderDefault primitive for consistent border treatment across the design system. */
1002
+ --progress-connector-thickness: var(--border-width-100);
1001
1003
  /* Small node base size (12px). Inactive dots in compact mobile contexts. */
1002
1004
  --progress-node-size-sm: var(--size-150);
1003
1005
  /* Medium node base size (16px). Default inactive dot size. */
@@ -1016,8 +1018,6 @@
1016
1018
  --progress-node-gap-md: var(--space-100);
1017
1019
  /* Large gap between nodes (12px = 1.5× base). Generous spacing for detailed steppers with labels in desktop contexts. */
1018
1020
  --progress-node-gap-lg: var(--space-150);
1019
- /* Connector line thickness (1px). References borderDefault primitive for consistent border treatment across the design system. */
1020
- --progress-connector-thickness: var(--border-width-100);
1021
1021
 
1022
1022
  /* VerticalListItem Component Tokens */
1023
1023
  /* Block padding at rest state (1px border). 11px padding + 1px border = 12px per side, achieving 48px total with 24px content. Uses TokenWithValue pattern as no primitive token exists for 11px. */
@@ -60,6 +60,16 @@ export interface PrimitiveTokenReference {
60
60
  name: string;
61
61
  /** Unitless base value from the primitive token */
62
62
  baseValue: number;
63
+ /**
64
+ * Primitive token family (the `category` field of a `PrimitiveToken`, e.g. 'spacing',
65
+ * 'sizing', 'radius'). OPTIONAL for backward compatibility: minimal `{ name, baseValue }`
66
+ * reference literals remain valid.
67
+ *
68
+ * When present, it is cross-checked against the call's declared `family` by the
69
+ * family-mismatch guard in {@link defineComponentTokens}. Real primitives from
70
+ * src/tokens/** always carry it, so the guard is active for all production authoring.
71
+ */
72
+ category?: string;
63
73
  }
64
74
  /**
65
75
  * Token definition with primitive reference
@@ -125,6 +125,32 @@ function defineComponentTokens(config) {
125
125
  if (isTokenWithReference(definition)) {
126
126
  // Token with primitive reference
127
127
  const primitiveToken = definition.reference;
128
+ // FAMILY-MISMATCH GUARD.
129
+ // The call's `family` is stamped onto every token it registers, and the generator
130
+ // derives platform output from it — notably the primitive class name used for
131
+ // reference-path tokens (getFamilyClassName) and the Android `.dp` suffix. A call
132
+ // that declares one family but references another family's primitive therefore emits
133
+ // a member that does not exist on the target platform. That is exactly the Button-Icon
134
+ // defect: a `family: 'spacing'` call referencing `sizingTokens.size600` generated
135
+ // `SpacingTokens.size600`, a non-existent member (PR #126).
136
+ //
137
+ // Only enforced when the reference carries a `category` — minimal `{ name, baseValue }`
138
+ // literals (used widely in tests) are intentionally exempt rather than rejected.
139
+ //
140
+ // Escape hatch: a token that legitimately needs another family's VALUE should use the
141
+ // value path (`value:`), which asserts no cross-family token-chain claim.
142
+ if (typeof primitiveToken.category === 'string' &&
143
+ primitiveToken.category !== family) {
144
+ throw new Error(`Token family mismatch in defineComponentTokens() for component '${component}': ` +
145
+ `token '${key}' is declared in a '${family}' family call but references primitive ` +
146
+ `'${primitiveToken.name}' from the '${primitiveToken.category}' family. ` +
147
+ `Every token in a call is stamped with that call's family, which drives platform ` +
148
+ `output (e.g. the generated '${family.charAt(0).toUpperCase() + family.slice(1)}Tokens' ` +
149
+ `class reference), so this would emit a non-existent platform member. ` +
150
+ `Fix: move '${key}' into a separate defineComponentTokens() call with ` +
151
+ `family: '${primitiveToken.category}', or use the value path if no token-chain ` +
152
+ `relationship is intended.`);
153
+ }
128
154
  const value = primitiveToken.baseValue;
129
155
  values[key] = value;
130
156
  registeredTokens.push({
@@ -34,6 +34,15 @@
34
34
  * - xs: calc(icon.size050 × 0.75) = 12px
35
35
  * - xxl: calc(icon.size050 × 4) = 64px
36
36
  *
37
+ * TOKEN FAMILY: all dimensional Avatar tokens (container `size.*` AND icon
38
+ * `icon.size.*` gap fillers) are registered by the single sizing-family call
39
+ * `AvatarSizingTokens` below. The `icon.size.*` pair previously lived in a
40
+ * separate `AvatarTokens` call stamped `family: 'spacing'` — a mislabel, since
41
+ * both are dimensional sizing values. `AvatarTokens` is removed; consumers use
42
+ * `AvatarSizingTokens` or the `getAvatarIconSize()` / `getAvatarSize()` accessors.
43
+ * Generated platform output is unaffected: both calls declare `component: 'Avatar'`,
44
+ * so all tokens still land in one `AvatarTokens` Swift enum / Kotlin object.
45
+ *
37
46
  * COLOR TOKENS (Spec 058):
38
47
  * Avatar color tokens are defined in this file following the Rosetta System architecture
39
48
  * which mandates component tokens live at src/components/[ComponentName]/tokens.ts.
@@ -52,13 +61,24 @@
52
61
  * @see .kiro/specs/058-component-token-architecture-cleanup for color token migration
53
62
  */
54
63
  /**
55
- * Avatar sizing tokens — container dimensions for each size variant.
64
+ * Avatar sizing tokens — container dimensions and icon dimensions for each size variant.
56
65
  *
57
66
  * Previously in a separate file (avatar-sizing.tokens.ts). Inlined to prevent
58
67
  * architectural anomaly (no other component splits tokens across files) and
59
68
  * simplify the package surface for sync.
60
69
  *
70
+ * ONE CALL PER FAMILY. Every token registered by a single defineComponentTokens()
71
+ * call is stamped with that call's `family`, and the family drives platform output
72
+ * (Swift type, Kotlin `.dp` suffix, primitive class name). The `icon.size.*` gap
73
+ * fillers below are dimensional sizing values, so they live in this sizing-family
74
+ * call — they were previously mis-stamped `family: 'spacing'` in a separate
75
+ * `AvatarTokens` call, the same latent mislabel class fixed for Button-Icon.
76
+ * Do NOT spread/merge this result with another call's result — the rich metadata
77
+ * rides on a non-enumerable brand (see src/build/tokens/defineComponentTokens.ts,
78
+ * TOKEN_CONTRACT_BRAND) that a spread would silently drop.
79
+ *
61
80
  * @see .kiro/specs/092-sizing-token-family/design.md
81
+ * @see src/components/core/Button-Icon/buttonIcon.tokens.ts for the two-call pattern
62
82
  */
63
83
  export declare const AvatarSizingTokens: import("../../../build/tokens").ComponentTokenValues<{
64
84
  'size.xs': {
@@ -85,31 +105,6 @@ export declare const AvatarSizingTokens: import("../../../build/tokens").Compone
85
105
  reference: import("../../../types").PrimitiveToken;
86
106
  reasoning: string;
87
107
  };
88
- }>;
89
- /**
90
- * Avatar component tokens defined using the hybrid authoring API.
91
- *
92
- * Each token either references a primitive spacing token or uses a family-conformant
93
- * derivation, and includes reasoning explaining why the token exists.
94
- *
95
- * NOTE: Web platform uses CSS calc() with icon tokens for sizing (see Avatar.styles.css).
96
- * These component tokens are primarily used for iOS/Android platforms and documentation.
97
- *
98
- * Size token values:
99
- * - size.xs: 24px (3 × base, references size300)
100
- * - size.sm: 32px (4 × base, references size400)
101
- * - size.md: 40px (5 × base, references size500)
102
- * - size.lg: 48px (6 × base, references size600)
103
- * - size.xl: 80px (10 × base, derivation)
104
- * - size.xxl: 128px (16 × base, derivation)
105
- *
106
- * Icon size token values (gap fillers - web uses calc() instead):
107
- * - icon.size.xs: 12px (1.5 × base, derivation) - web uses calc(icon.size050 × 0.75)
108
- * - icon.size.xxl: 64px (8 × base, derivation) - web uses calc(icon.size050 × 4)
109
- *
110
- * @see Requirements 2.1-2.6, 3.1, 3.6 in .kiro/specs/042-avatar-component/requirements.md
111
- */
112
- export declare const AvatarTokens: import("../../../build/tokens").ComponentTokenValues<{
113
108
  'icon.size.xs': {
114
109
  value: number;
115
110
  reasoning: string;
@@ -35,6 +35,15 @@
35
35
  * - xs: calc(icon.size050 × 0.75) = 12px
36
36
  * - xxl: calc(icon.size050 × 4) = 64px
37
37
  *
38
+ * TOKEN FAMILY: all dimensional Avatar tokens (container `size.*` AND icon
39
+ * `icon.size.*` gap fillers) are registered by the single sizing-family call
40
+ * `AvatarSizingTokens` below. The `icon.size.*` pair previously lived in a
41
+ * separate `AvatarTokens` call stamped `family: 'spacing'` — a mislabel, since
42
+ * both are dimensional sizing values. `AvatarTokens` is removed; consumers use
43
+ * `AvatarSizingTokens` or the `getAvatarIconSize()` / `getAvatarSize()` accessors.
44
+ * Generated platform output is unaffected: both calls declare `component: 'Avatar'`,
45
+ * so all tokens still land in one `AvatarTokens` Swift enum / Kotlin object.
46
+ *
38
47
  * COLOR TOKENS (Spec 058):
39
48
  * Avatar color tokens are defined in this file following the Rosetta System architecture
40
49
  * which mandates component tokens live at src/components/[ComponentName]/tokens.ts.
@@ -53,7 +62,7 @@
53
62
  * @see .kiro/specs/058-component-token-architecture-cleanup for color token migration
54
63
  */
55
64
  Object.defineProperty(exports, "__esModule", { value: true });
56
- exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.AvatarColorTokens = exports.AvatarTokens = exports.AvatarSizingTokens = void 0;
65
+ exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.AvatarColorTokens = exports.AvatarSizingTokens = void 0;
57
66
  exports.getAvatarColorToken = getAvatarColorToken;
58
67
  exports.getAvatarSize = getAvatarSize;
59
68
  exports.getAvatarIconSize = getAvatarIconSize;
@@ -62,13 +71,24 @@ exports.getAvatarIconSizeTokenReference = getAvatarIconSizeTokenReference;
62
71
  const tokens_1 = require("../../../build/tokens");
63
72
  const SizingTokens_1 = require("../../../tokens/SizingTokens");
64
73
  /**
65
- * Avatar sizing tokens — container dimensions for each size variant.
74
+ * Avatar sizing tokens — container dimensions and icon dimensions for each size variant.
66
75
  *
67
76
  * Previously in a separate file (avatar-sizing.tokens.ts). Inlined to prevent
68
77
  * architectural anomaly (no other component splits tokens across files) and
69
78
  * simplify the package surface for sync.
70
79
  *
80
+ * ONE CALL PER FAMILY. Every token registered by a single defineComponentTokens()
81
+ * call is stamped with that call's `family`, and the family drives platform output
82
+ * (Swift type, Kotlin `.dp` suffix, primitive class name). The `icon.size.*` gap
83
+ * fillers below are dimensional sizing values, so they live in this sizing-family
84
+ * call — they were previously mis-stamped `family: 'spacing'` in a separate
85
+ * `AvatarTokens` call, the same latent mislabel class fixed for Button-Icon.
86
+ * Do NOT spread/merge this result with another call's result — the rich metadata
87
+ * rides on a non-enumerable brand (see src/build/tokens/defineComponentTokens.ts,
88
+ * TOKEN_CONTRACT_BRAND) that a spread would silently drop.
89
+ *
71
90
  * @see .kiro/specs/092-sizing-token-family/design.md
91
+ * @see src/components/core/Button-Icon/buttonIcon.tokens.ts for the two-call pattern
72
92
  */
73
93
  exports.AvatarSizingTokens = (0, tokens_1.defineComponentTokens)({
74
94
  component: 'Avatar',
@@ -98,37 +118,14 @@ exports.AvatarSizingTokens = (0, tokens_1.defineComponentTokens)({
98
118
  reference: SizingTokens_1.sizingTokens.size1600,
99
119
  reasoning: 'Extra extra large avatar (128px). Full profile view, onboarding.',
100
120
  },
101
- },
102
- });
103
- /**
104
- * Avatar component tokens defined using the hybrid authoring API.
105
- *
106
- * Each token either references a primitive spacing token or uses a family-conformant
107
- * derivation, and includes reasoning explaining why the token exists.
108
- *
109
- * NOTE: Web platform uses CSS calc() with icon tokens for sizing (see Avatar.styles.css).
110
- * These component tokens are primarily used for iOS/Android platforms and documentation.
111
- *
112
- * Size token values:
113
- * - size.xs: 24px (3 × base, references size300)
114
- * - size.sm: 32px (4 × base, references size400)
115
- * - size.md: 40px (5 × base, references size500)
116
- * - size.lg: 48px (6 × base, references size600)
117
- * - size.xl: 80px (10 × base, derivation)
118
- * - size.xxl: 128px (16 × base, derivation)
119
- *
120
- * Icon size token values (gap fillers - web uses calc() instead):
121
- * - icon.size.xs: 12px (1.5 × base, derivation) - web uses calc(icon.size050 × 0.75)
122
- * - icon.size.xxl: 64px (8 × base, derivation) - web uses calc(icon.size050 × 4)
123
- *
124
- * @see Requirements 2.1-2.6, 3.1, 3.6 in .kiro/specs/042-avatar-component/requirements.md
125
- */
126
- exports.AvatarTokens = (0, tokens_1.defineComponentTokens)({
127
- component: 'Avatar',
128
- family: 'spacing',
129
- tokens: {
130
- // Icon size tokens (gap fillers for sizes without existing icon tokens)
131
- // These fill gaps where no standard icon token exists at the required 50% ratio
121
+ // Icon size tokens (gap fillers for sizes without an existing icon token).
122
+ // Kept on the VALUE path deliberately: sizing primitives exist at both values
123
+ // (size150 = 12, size800 = 64), but the reference path currently emits a
124
+ // fabricated `SizingTokens.<name>` class on iOS/Android that no generated or
125
+ // hand-written platform file defines. Switching these to `reference:` would
126
+ // trade compiling output (`12.dp`) for non-compiling output and break
127
+ // Avatar.android.kt's `val iconSizeXs: Dp = GeneratedAvatarTokens.iconSizeXs`.
128
+ // Revisit once TokenFileGenerator.getFamilyClassName emits a real platform type.
132
129
  'icon.size.xs': {
133
130
  value: SizingTokens_1.SIZING_BASE_VALUE * 1.5,
134
131
  reasoning: 'Icon size for xs avatar (12px = 1.5× base) maintains 50% ratio (12/24). No existing icon token at this size, so component token fills the gap.',
@@ -254,7 +251,7 @@ function getAvatarSize(variant) {
254
251
  * @see Requirements 3.1, 3.6 in .kiro/specs/042-avatar-component/requirements.md
255
252
  */
256
253
  function getAvatarIconSize(variant) {
257
- return exports.AvatarTokens[`icon.size.${variant}`];
254
+ return exports.AvatarSizingTokens[`icon.size.${variant}`];
258
255
  }
259
256
  /**
260
257
  * Semantic token references for Avatar size values
@@ -6,7 +6,7 @@
6
6
  */
7
7
  export type { AvatarProps, AvatarType, AvatarSize } from './types';
8
8
  export { AVATAR_DEFAULTS } from './types';
9
- export { AvatarTokens, getAvatarSize, getAvatarIconSize, getAvatarSizeTokenReference, getAvatarIconSizeTokenReference, AvatarSizeTokenReferences, AvatarIconSizeTokenReferences, } from './avatar.tokens';
9
+ export { AvatarSizingTokens, getAvatarSize, getAvatarIconSize, getAvatarSizeTokenReference, getAvatarIconSizeTokenReference, AvatarSizeTokenReferences, AvatarIconSizeTokenReferences, } from './avatar.tokens';
10
10
  export type { AvatarSizeVariant, AvatarIconSizeVariant } from './avatar.tokens';
11
11
  export { AvatarBaseElement } from './platforms/web/Avatar.web';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -6,12 +6,12 @@
6
6
  * @see .kiro/specs/042-avatar-component/requirements.md for requirements
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.AvatarBaseElement = exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.getAvatarIconSizeTokenReference = exports.getAvatarSizeTokenReference = exports.getAvatarIconSize = exports.getAvatarSize = exports.AvatarTokens = exports.AVATAR_DEFAULTS = void 0;
9
+ exports.AvatarBaseElement = exports.AvatarIconSizeTokenReferences = exports.AvatarSizeTokenReferences = exports.getAvatarIconSizeTokenReference = exports.getAvatarSizeTokenReference = exports.getAvatarIconSize = exports.getAvatarSize = exports.AvatarSizingTokens = exports.AVATAR_DEFAULTS = void 0;
10
10
  var types_1 = require("./types");
11
11
  Object.defineProperty(exports, "AVATAR_DEFAULTS", { enumerable: true, get: function () { return types_1.AVATAR_DEFAULTS; } });
12
12
  // Token exports
13
13
  var avatar_tokens_1 = require("./avatar.tokens");
14
- Object.defineProperty(exports, "AvatarTokens", { enumerable: true, get: function () { return avatar_tokens_1.AvatarTokens; } });
14
+ Object.defineProperty(exports, "AvatarSizingTokens", { enumerable: true, get: function () { return avatar_tokens_1.AvatarSizingTokens; } });
15
15
  Object.defineProperty(exports, "getAvatarSize", { enumerable: true, get: function () { return avatar_tokens_1.getAvatarSize; } });
16
16
  Object.defineProperty(exports, "getAvatarIconSize", { enumerable: true, get: function () { return avatar_tokens_1.getAvatarIconSize; } });
17
17
  Object.defineProperty(exports, "getAvatarSizeTokenReference", { enumerable: true, get: function () { return avatar_tokens_1.getAvatarSizeTokenReference; } });
@@ -8,18 +8,27 @@
8
8
  * Uses the defineComponentTokens() API to register tokens with the global
9
9
  * ComponentTokenRegistry for pipeline integration.
10
10
  *
11
+ * Two separate defineComponentTokens() calls are used — one per token family
12
+ * (spacing, sizing) — following the Avatar-Base pattern (avatar.tokens.ts). Every
13
+ * token registered by a single call is stamped with that call's `family`, so inset
14
+ * (spacing) and size (sizing) tokens must NOT share a call even though they live in
15
+ * the same file. The two branded results are exported separately and must NOT be
16
+ * spread/merged into one object — the rich metadata rides on a non-enumerable brand
17
+ * (see src/build/tokens/defineComponentTokens.ts, TOKEN_CONTRACT_BRAND) that a spread
18
+ * would silently drop.
19
+ *
11
20
  * The build system generates platform-specific values from these definitions:
12
21
  * - Web: CSS custom properties (var(--buttonicon-inset-large))
13
22
  * - iOS: Swift constants (ButtonIconTokens.insetLarge)
14
23
  * - Android: Kotlin constants (ButtonIconTokens.insetLarge)
15
24
  *
16
25
  * Token Relationships:
17
- * - buttonIcon.inset.large (12px) references space150
18
- * - buttonIcon.inset.medium (10px) references space125 (strategic flexibility token)
19
- * - buttonIcon.inset.small (8px) references space100
20
- * - buttonIcon.size.large (48px) references size600
21
- * - buttonIcon.size.medium (40px) references size500
22
- * - buttonIcon.size.small (32px) references size400
26
+ * - buttonIcon.inset.large (12px) references space150 — family: spacing
27
+ * - buttonIcon.inset.medium (10px) references space125 (strategic flexibility token) — family: spacing
28
+ * - buttonIcon.inset.small (8px) references space100 — family: spacing
29
+ * - buttonIcon.size.large (48px) references size600 — family: sizing
30
+ * - buttonIcon.size.medium (40px) references size500 — family: sizing
31
+ * - buttonIcon.size.small (32px) references size400 — family: sizing
23
32
  *
24
33
  * @see .kiro/specs/035-button-icon-component/design.md for token consumption strategy
25
34
  * @see .kiro/specs/034-component-architecture-system for Stemma System details
@@ -27,24 +36,18 @@
27
36
  * @see .kiro/specs/040-component-alignment/requirements.md Requirements 6.1, 6.2, 6.3
28
37
  */
29
38
  /**
30
- * Button-Icon component tokens defined using the hybrid authoring API.
39
+ * Button-Icon inset (padding) tokens — reference spacing primitives.
31
40
  *
32
41
  * Each token references a primitive token and includes reasoning
33
42
  * explaining why the token exists and its purpose in the component.
34
43
  *
35
- * Inset (padding) token values — reference spacing primitives:
36
44
  * - inset.large: 12px (1.5 × base, references space150)
37
45
  * - inset.medium: 10px (1.25 × base, references space125 strategic flexibility token)
38
46
  * - inset.small: 8px (1 × base, references space100)
39
47
  *
40
- * Size (width/height) token values:
41
- * - size.large: 48px (6 × base, references size600)
42
- * - size.medium: 40px (5 × base, references size500)
43
- * - size.small: 32px (4 × base, references size400)
44
- *
45
48
  * @see Requirements 6.1, 6.2, 6.3 in .kiro/specs/040-component-alignment/requirements.md
46
49
  */
47
- export declare const ButtonIconTokens: import("../../../build/tokens").ComponentTokenValues<{
50
+ export declare const ButtonIconInsetTokens: import("../../../build/tokens").ComponentTokenValues<{
48
51
  'inset.large': {
49
52
  reference: import("../../../types").PrimitiveToken;
50
53
  reasoning: string;
@@ -57,6 +60,17 @@ export declare const ButtonIconTokens: import("../../../build/tokens").Component
57
60
  reference: import("../../../types").PrimitiveToken;
58
61
  reasoning: string;
59
62
  };
63
+ }>;
64
+ /**
65
+ * Button-Icon size (width/height) tokens — reference sizing primitives, not spacing.
66
+ *
67
+ * - size.large: 48px (6 × base, references size600)
68
+ * - size.medium: 40px (5 × base, references size500)
69
+ * - size.small: 32px (4 × base, references size400)
70
+ *
71
+ * @see Requirements 6.1, 6.2, 6.3 in .kiro/specs/040-component-alignment/requirements.md
72
+ */
73
+ export declare const ButtonIconSizeTokens: import("../../../build/tokens").ComponentTokenValues<{
60
74
  'size.large': {
61
75
  reference: import("../../../types").PrimitiveToken;
62
76
  reasoning: string;
@@ -9,18 +9,27 @@
9
9
  * Uses the defineComponentTokens() API to register tokens with the global
10
10
  * ComponentTokenRegistry for pipeline integration.
11
11
  *
12
+ * Two separate defineComponentTokens() calls are used — one per token family
13
+ * (spacing, sizing) — following the Avatar-Base pattern (avatar.tokens.ts). Every
14
+ * token registered by a single call is stamped with that call's `family`, so inset
15
+ * (spacing) and size (sizing) tokens must NOT share a call even though they live in
16
+ * the same file. The two branded results are exported separately and must NOT be
17
+ * spread/merged into one object — the rich metadata rides on a non-enumerable brand
18
+ * (see src/build/tokens/defineComponentTokens.ts, TOKEN_CONTRACT_BRAND) that a spread
19
+ * would silently drop.
20
+ *
12
21
  * The build system generates platform-specific values from these definitions:
13
22
  * - Web: CSS custom properties (var(--buttonicon-inset-large))
14
23
  * - iOS: Swift constants (ButtonIconTokens.insetLarge)
15
24
  * - Android: Kotlin constants (ButtonIconTokens.insetLarge)
16
25
  *
17
26
  * Token Relationships:
18
- * - buttonIcon.inset.large (12px) references space150
19
- * - buttonIcon.inset.medium (10px) references space125 (strategic flexibility token)
20
- * - buttonIcon.inset.small (8px) references space100
21
- * - buttonIcon.size.large (48px) references size600
22
- * - buttonIcon.size.medium (40px) references size500
23
- * - buttonIcon.size.small (32px) references size400
27
+ * - buttonIcon.inset.large (12px) references space150 — family: spacing
28
+ * - buttonIcon.inset.medium (10px) references space125 (strategic flexibility token) — family: spacing
29
+ * - buttonIcon.inset.small (8px) references space100 — family: spacing
30
+ * - buttonIcon.size.large (48px) references size600 — family: sizing
31
+ * - buttonIcon.size.medium (40px) references size500 — family: sizing
32
+ * - buttonIcon.size.small (32px) references size400 — family: sizing
24
33
  *
25
34
  * @see .kiro/specs/035-button-icon-component/design.md for token consumption strategy
26
35
  * @see .kiro/specs/034-component-architecture-system for Stemma System details
@@ -28,7 +37,7 @@
28
37
  * @see .kiro/specs/040-component-alignment/requirements.md Requirements 6.1, 6.2, 6.3
29
38
  */
30
39
  Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.ButtonIconSizeTokenReferences = exports.ButtonIconInsetTokenReferences = exports.ButtonIconTokens = void 0;
40
+ exports.ButtonIconSizeTokenReferences = exports.ButtonIconInsetTokenReferences = exports.ButtonIconSizeTokens = exports.ButtonIconInsetTokens = void 0;
32
41
  exports.getButtonIconInset = getButtonIconInset;
33
42
  exports.getButtonIconSize = getButtonIconSize;
34
43
  exports.getButtonIconInsetTokenReference = getButtonIconInsetTokenReference;
@@ -37,28 +46,21 @@ const tokens_1 = require("../../../build/tokens");
37
46
  const SpacingTokens_1 = require("../../../tokens/SpacingTokens");
38
47
  const SizingTokens_1 = require("../../../tokens/SizingTokens");
39
48
  /**
40
- * Button-Icon component tokens defined using the hybrid authoring API.
49
+ * Button-Icon inset (padding) tokens — reference spacing primitives.
41
50
  *
42
51
  * Each token references a primitive token and includes reasoning
43
52
  * explaining why the token exists and its purpose in the component.
44
53
  *
45
- * Inset (padding) token values — reference spacing primitives:
46
54
  * - inset.large: 12px (1.5 × base, references space150)
47
55
  * - inset.medium: 10px (1.25 × base, references space125 strategic flexibility token)
48
56
  * - inset.small: 8px (1 × base, references space100)
49
57
  *
50
- * Size (width/height) token values:
51
- * - size.large: 48px (6 × base, references size600)
52
- * - size.medium: 40px (5 × base, references size500)
53
- * - size.small: 32px (4 × base, references size400)
54
- *
55
58
  * @see Requirements 6.1, 6.2, 6.3 in .kiro/specs/040-component-alignment/requirements.md
56
59
  */
57
- exports.ButtonIconTokens = (0, tokens_1.defineComponentTokens)({
60
+ exports.ButtonIconInsetTokens = (0, tokens_1.defineComponentTokens)({
58
61
  component: 'ButtonIcon',
59
62
  family: 'spacing',
60
63
  tokens: {
61
- // Inset (padding) tokens
62
64
  'inset.large': {
63
65
  reference: SpacingTokens_1.spacingTokens.space150,
64
66
  reasoning: 'Large button variant requires 12px padding (1.5× base) for comfortable touch target and visual balance with larger icon sizes',
@@ -71,8 +73,21 @@ exports.ButtonIconTokens = (0, tokens_1.defineComponentTokens)({
71
73
  reference: SpacingTokens_1.spacingTokens.space100,
72
74
  reasoning: 'Small button variant uses 8px padding (1× base) for minimal footprint in dense UI layouts while meeting minimum touch target requirements',
73
75
  },
74
- // Size (width/height) tokens — reference sizing primitives, not spacing
75
- // @see Requirements 6.1, 6.2, 6.3
76
+ },
77
+ });
78
+ /**
79
+ * Button-Icon size (width/height) tokens — reference sizing primitives, not spacing.
80
+ *
81
+ * - size.large: 48px (6 × base, references size600)
82
+ * - size.medium: 40px (5 × base, references size500)
83
+ * - size.small: 32px (4 × base, references size400)
84
+ *
85
+ * @see Requirements 6.1, 6.2, 6.3 in .kiro/specs/040-component-alignment/requirements.md
86
+ */
87
+ exports.ButtonIconSizeTokens = (0, tokens_1.defineComponentTokens)({
88
+ component: 'ButtonIcon',
89
+ family: 'sizing',
90
+ tokens: {
76
91
  'size.large': {
77
92
  reference: SizingTokens_1.sizingTokens.size600,
78
93
  reasoning: 'Large button size (48px = 6× base) provides generous touch target exceeding tapAreaRecommended, calculated as icon (24px) + padding (12px × 2)',
@@ -101,7 +116,7 @@ exports.ButtonIconTokens = (0, tokens_1.defineComponentTokens)({
101
116
  * ```
102
117
  */
103
118
  function getButtonIconInset(variant) {
104
- return exports.ButtonIconTokens[`inset.${variant}`];
119
+ return exports.ButtonIconInsetTokens[`inset.${variant}`];
105
120
  }
106
121
  /**
107
122
  * Get Button-Icon size (width/height) value for a given size variant
@@ -119,7 +134,7 @@ function getButtonIconInset(variant) {
119
134
  * @see Requirements 6.1, 6.2, 6.3 in .kiro/specs/040-component-alignment/requirements.md
120
135
  */
121
136
  function getButtonIconSize(variant) {
122
- return exports.ButtonIconTokens[`size.${variant}`];
137
+ return exports.ButtonIconSizeTokens[`size.${variant}`];
123
138
  }
124
139
  /**
125
140
  * Semantic token references for Button-Icon inset values
@@ -400,6 +400,7 @@ class TokenFileGenerator {
400
400
  getiOSComponentTokenType(token) {
401
401
  switch (token.family) {
402
402
  case 'spacing':
403
+ case 'sizing':
403
404
  case 'radius':
404
405
  case 'fontSize':
405
406
  case 'tapArea':
@@ -449,8 +450,12 @@ class TokenFileGenerator {
449
450
  const familyClass = this.getFamilyClassName(token.family);
450
451
  return `${familyClass}.${token.primitiveReference}`;
451
452
  }
452
- // Dimensional families need .dp suffix to match primitive token output (Task 1.4)
453
- const dimensionalFamilies = ['spacing', 'radius', 'tapArea', 'fontSize', 'borderWidth'];
453
+ // Dimensional families need .dp suffix to match primitive token output (Task 1.4).
454
+ // 'sizing' is dimensional (component width/height) and belongs here: without it, a
455
+ // value-path sizing token emits a bare Int, which fails to compile against consumers
456
+ // that type the member as Dp (e.g. Avatar.android.kt's
457
+ // `val iconSizeXs: Dp = GeneratedAvatarTokens.iconSizeXs`).
458
+ const dimensionalFamilies = ['spacing', 'sizing', 'radius', 'tapArea', 'fontSize', 'borderWidth'];
454
459
  if (dimensionalFamilies.includes(token.family)) {
455
460
  return `${token.value}.dp`;
456
461
  }
@@ -1,6 +1,6 @@
1
1
  ///
2
2
  /// DesignerPunk Design System - iOS Tokens
3
- /// Generated: 2026-08-02T19:49:06.802Z
3
+ /// Generated: 2026-08-26T02:25:48.234Z
4
4
  /// Version: 1.0.0
5
5
  /// Platform: iOS (Swift Constants)
6
6
  ///
@@ -19,16 +19,34 @@
19
19
  * @see .kiro/specs/048-progress-family/requirements.md (Requirements 5.7-5.15)
20
20
  * @see .kiro/specs/048-progress-family/design.md (Size Variant, Token Usage sections)
21
21
  */
22
+ import type { RegisteredComponentToken } from '../../registries/ComponentTokenRegistry';
22
23
  /**
23
- * Progress Indicator component tokens defined using the hybrid authoring API.
24
+ * ONE CALL PER FAMILY.
25
+ *
26
+ * Every token registered by a single defineComponentTokens() call is stamped with that
27
+ * call's `family`, and the family drives platform output — notably the primitive class
28
+ * name emitted for reference-path tokens (TokenFileGenerator.getFamilyClassName) and the
29
+ * Android `.dp` suffix. These 10 tokens span THREE primitive families, so they require
30
+ * three calls. A single `family: 'spacing'` call previously produced
31
+ * `SpacingTokens.size150` / `SpacingTokens.borderWidth100` — members no generated platform
32
+ * file defines — the same defect fixed for Button-Icon in PR #126.
33
+ *
34
+ * The three branded results MUST NOT be spread/merged into one registration object: the
35
+ * rich metadata rides on a non-enumerable brand (src/build/tokens/defineComponentTokens.ts,
36
+ * TOKEN_CONTRACT_BRAND) that a spread silently drops. The harvest in loadComponentTokens
37
+ * collects each branded export separately. Use {@link progressTokenValues} for flat
38
+ * value lookups and {@link getProgressRegisteredTokens} for the rich metadata.
39
+ *
40
+ * All three calls declare `component: 'Progress'`, so platform output is still a single
41
+ * `ProgressTokens` Swift enum / Kotlin object.
42
+ */
43
+ /**
44
+ * Node dimension tokens — reference sizing primitives (dimensions, not spacing).
24
45
  *
25
- * 13 tokens organized by concept:
26
46
  * - node.size.{sm|md|lg} — base node dimensions
27
47
  * - node.size.{sm|md|lg}.current — emphasized node dimensions (+4px)
28
- * - node.gap.{sm|md|lg} — spacing between nodes
29
- * - connector.thickness — connector line width
30
48
  */
31
- export declare const ProgressTokens: import("../../build/tokens").ComponentTokenValues<{
49
+ export declare const ProgressSizingTokens: import("../../build/tokens").ComponentTokenValues<{
32
50
  'node.size.sm': {
33
51
  reference: import("../../types").PrimitiveToken;
34
52
  reasoning: string;
@@ -53,6 +71,13 @@ export declare const ProgressTokens: import("../../build/tokens").ComponentToken
53
71
  reference: import("../../types").PrimitiveToken;
54
72
  reasoning: string;
55
73
  };
74
+ }>;
75
+ /**
76
+ * Node gap tokens — reference spacing primitives (gaps are spacing, not sizing).
77
+ *
78
+ * - node.gap.{sm|md|lg} — spacing between nodes
79
+ */
80
+ export declare const ProgressSpacingTokens: import("../../build/tokens").ComponentTokenValues<{
56
81
  'node.gap.sm': {
57
82
  reference: import("../../types").PrimitiveToken;
58
83
  reasoning: string;
@@ -65,11 +90,46 @@ export declare const ProgressTokens: import("../../build/tokens").ComponentToken
65
90
  reference: import("../../types").PrimitiveToken;
66
91
  reasoning: string;
67
92
  };
93
+ }>;
94
+ /**
95
+ * Connector tokens — line connecting nodes in steppers. References a borderWidth primitive.
96
+ *
97
+ * - connector.thickness — connector line width
98
+ */
99
+ export declare const ProgressBorderWidthTokens: import("../../build/tokens").ComponentTokenValues<{
68
100
  'connector.thickness': {
69
101
  reference: import("../../types").PrimitiveToken;
70
102
  reasoning: string;
71
103
  };
72
104
  }>;
105
+ /**
106
+ * Flat value map across all three Progress token calls — a READ-ONLY convenience for
107
+ * value lookups (`progressTokenValues['node.size.md']`).
108
+ *
109
+ * NOT a registration surface: spreading drops the non-enumerable brand, so this object
110
+ * deliberately harvests to zero and cannot double-register. For the rich metadata use
111
+ * {@link getProgressRegisteredTokens}, never `getTokenContract(progressTokenValues)`.
112
+ */
113
+ export declare const progressTokenValues: {
114
+ 'connector.thickness': number;
115
+ 'node.gap.sm': number;
116
+ 'node.gap.md': number;
117
+ 'node.gap.lg': number;
118
+ 'node.size.sm': number;
119
+ 'node.size.md': number;
120
+ 'node.size.lg': number;
121
+ 'node.size.sm.current': number;
122
+ 'node.size.md.current': number;
123
+ 'node.size.lg.current': number;
124
+ };
125
+ /**
126
+ * All Progress component tokens with their rich metadata, concatenated across the three
127
+ * family calls in declaration order (sizing → spacing → borderWidth).
128
+ *
129
+ * This is the brand-safe replacement for `getTokenContract(ProgressTokens)`, which is no
130
+ * longer meaningful now that Progress registers through three calls.
131
+ */
132
+ export declare function getProgressRegisteredTokens(): RegisteredComponentToken[];
73
133
  /**
74
134
  * Expected token count for governance validation
75
135
  *