@hjmds/design-contracts 1.27.2 → 1.28.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 (129) hide show
  1. package/dist/activity-chip.d.ts +1 -1
  2. package/dist/activity-chip.js +1 -1
  3. package/dist/activity-chip.js.map +1 -1
  4. package/dist/auth-screen.d.ts +71 -5
  5. package/dist/auth-screen.d.ts.map +1 -1
  6. package/dist/auth-screen.js +60 -2
  7. package/dist/auth-screen.js.map +1 -1
  8. package/dist/base-recipes.d.ts +1 -1
  9. package/dist/base-recipes.js +1 -1
  10. package/dist/base-recipes.js.map +1 -1
  11. package/dist/behaviors.d.ts +1 -1
  12. package/dist/breadcrumb.d.ts +1 -1
  13. package/dist/breadcrumb.js +1 -1
  14. package/dist/breadcrumb.js.map +1 -1
  15. package/dist/calendar.d.ts +1 -1
  16. package/dist/calendar.js +2 -2
  17. package/dist/calendar.js.map +1 -1
  18. package/dist/catalog.d.ts +131 -87
  19. package/dist/catalog.d.ts.map +1 -1
  20. package/dist/component-contracts.d.ts +1 -1
  21. package/dist/component-contracts.js +1 -1
  22. package/dist/component-contracts.js.map +1 -1
  23. package/dist/component-recipes.d.ts +85 -57
  24. package/dist/component-recipes.d.ts.map +1 -1
  25. package/dist/component-recipes.js +95 -60
  26. package/dist/component-recipes.js.map +1 -1
  27. package/dist/conversation-row.d.ts +2 -2
  28. package/dist/conversation-row.d.ts.map +1 -1
  29. package/dist/conversation-row.js +6 -4
  30. package/dist/conversation-row.js.map +1 -1
  31. package/dist/counter-badge-recipe.d.ts +1 -1
  32. package/dist/counter-badge-recipe.js +1 -1
  33. package/dist/counter-badge-recipe.js.map +1 -1
  34. package/dist/data-table.d.ts +4 -4
  35. package/dist/data-table.js +4 -4
  36. package/dist/data-table.js.map +1 -1
  37. package/dist/date-picker.d.ts +1 -1
  38. package/dist/design-profile.d.ts.map +1 -1
  39. package/dist/design-profile.js +19 -16
  40. package/dist/design-profile.js.map +1 -1
  41. package/dist/file-picker.d.ts +1 -1
  42. package/dist/file-picker.js +1 -1
  43. package/dist/file-picker.js.map +1 -1
  44. package/dist/foundations.d.ts +18 -14
  45. package/dist/foundations.d.ts.map +1 -1
  46. package/dist/foundations.js +18 -13
  47. package/dist/foundations.js.map +1 -1
  48. package/dist/heading.d.ts +13 -13
  49. package/dist/heading.js.map +1 -1
  50. package/dist/number-field.d.ts +1 -1
  51. package/dist/otp-field.d.ts +1 -1
  52. package/dist/password-field.d.ts +1 -1
  53. package/dist/result.d.ts +1 -1
  54. package/dist/result.js +2 -2
  55. package/dist/result.js.map +1 -1
  56. package/dist/semantic-colors.d.ts +10 -0
  57. package/dist/semantic-colors.d.ts.map +1 -1
  58. package/dist/semantic-colors.js +6 -0
  59. package/dist/semantic-colors.js.map +1 -1
  60. package/dist/sheet.d.ts +7 -4
  61. package/dist/sheet.d.ts.map +1 -1
  62. package/dist/sheet.js +8 -5
  63. package/dist/sheet.js.map +1 -1
  64. package/dist/side-panel.d.ts +1 -1
  65. package/dist/side-panel.js +2 -2
  66. package/dist/side-panel.js.map +1 -1
  67. package/dist/steps.d.ts +1 -1
  68. package/dist/steps.js +1 -1
  69. package/dist/steps.js.map +1 -1
  70. package/dist/tag.d.ts +1 -1
  71. package/dist/tag.js +1 -1
  72. package/dist/tag.js.map +1 -1
  73. package/dist/timeline.d.ts +1 -1
  74. package/dist/timeline.js +1 -1
  75. package/dist/timeline.js.map +1 -1
  76. package/dist/top.d.ts +4 -4
  77. package/dist/top.d.ts.map +1 -1
  78. package/dist/top.js +3 -1
  79. package/dist/top.js.map +1 -1
  80. package/dist/version.d.ts +1 -1
  81. package/dist/version.js +1 -1
  82. package/dist/version.js.map +1 -1
  83. package/docs/activity-chip.md +5 -1
  84. package/docs/auth-screen.md +2 -0
  85. package/docs/design-profile.md +14 -10
  86. package/docs/generated/component-maturity.md +1 -1
  87. package/docs/generated/renderer-evidence.json +9 -5
  88. package/docs/generated/renderer-evidence.md +1 -1
  89. package/docs/generated/showcase-manifest.json +1 -1
  90. package/docs/heading.md +14 -9
  91. package/docs/sheet.md +2 -0
  92. package/docs/top.md +4 -3
  93. package/docs/usage/README.md +1 -1
  94. package/docs/usage/components/auth-screen-layout.md +26 -9
  95. package/docs/usage/components/bottom-cta.md +6 -2
  96. package/docs/usage/components/breadcrumb.md +5 -1
  97. package/docs/usage/components/checkbox-group.md +5 -1
  98. package/docs/usage/components/collapsible.md +1 -0
  99. package/docs/usage/components/effect-surface.md +2 -2
  100. package/docs/usage/components/heading.md +14 -12
  101. package/docs/usage/components/list-row.md +7 -3
  102. package/docs/usage/components/list.md +5 -4
  103. package/docs/usage/components/notification-item.md +5 -1
  104. package/docs/usage/components/photo-source-sheet.md +1 -1
  105. package/docs/usage/components/screen-layout.md +7 -3
  106. package/docs/usage/components/search-screen.md +1 -1
  107. package/docs/usage/components/section.md +5 -1
  108. package/docs/usage/components/segmented-control.md +1 -1
  109. package/docs/usage/components/sheet.md +17 -13
  110. package/docs/usage/components/skeleton.md +41 -15
  111. package/docs/usage/components/statistic.md +5 -1
  112. package/docs/usage/components/switch.md +3 -2
  113. package/docs/usage/components/tag.md +5 -1
  114. package/docs/usage/components/text.md +6 -4
  115. package/docs/usage/components/top.md +1 -1
  116. package/docs/usage/compositions/adaptive-content.md +5 -1
  117. package/docs/usage/compositions/compound-controls.md +2 -1
  118. package/docs/usage/compositions/design-profile-comparison.md +1 -1
  119. package/docs/usage/compositions/family-drawer.md +5 -3
  120. package/docs/usage/compositions/input-sheet.md +1 -1
  121. package/docs/usage/compositions/interaction-flow-apply.md +3 -3
  122. package/docs/usage/compositions/photo-source.md +3 -3
  123. package/docs/usage/compositions/selection-motion.md +5 -1
  124. package/docs/usage/compositions/visual-foundations.md +5 -4
  125. package/docs/usage/screens/common-login.md +9 -7
  126. package/docs/usage/screens/landing.md +15 -14
  127. package/docs/usage/screens/notification-settings.md +4 -2
  128. package/docs/usage/tokens/typography.md +21 -13
  129. package/package.json +1 -1
@@ -7,7 +7,7 @@ export declare const conversationRowRecipe: {
7
7
  readonly paddingBlock: 10;
8
8
  readonly contentGap: 2;
9
9
  readonly titleWeight: "500";
10
- readonly unreadTitleWeight: "800";
11
- readonly unreadPreviewWeight: "700";
10
+ readonly unreadTitleWeight: "600";
11
+ readonly unreadPreviewWeight: "600";
12
12
  };
13
13
  //# sourceMappingURL=conversation-row.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-row.d.ts","sourceRoot":"","sources":["../src/conversation-row.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB;;;;;;;;;;CAUxB,CAAC"}
1
+ {"version":3,"file":"conversation-row.d.ts","sourceRoot":"","sources":["../src/conversation-row.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB;;;;;;;;;;CAYxB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { spacing } from "./foundations.js";
1
+ import { fontWeight, spacing, typography } from "./foundations.js";
2
2
  /** Conversation previews reserve metadata and unread status while truncating the message. */
3
3
  export const conversationRowRecipe = {
4
4
  avatarSize: 56,
@@ -7,8 +7,10 @@ export const conversationRowRecipe = {
7
7
  paddingInline: spacing.md,
8
8
  paddingBlock: 10,
9
9
  contentGap: 2,
10
- titleWeight: "500",
11
- unreadTitleWeight: "800",
12
- unreadPreviewWeight: "700",
10
+ // Read rows use the title weight; unread rows step up to semibold, the heaviest non-display weight
11
+ // (800/700 before the 2026-10-17 lighter scale, "굵기 좀더 줄여").
12
+ titleWeight: typography.title.fontWeight,
13
+ unreadTitleWeight: fontWeight.semibold,
14
+ unreadPreviewWeight: fontWeight.semibold,
13
15
  };
14
16
  //# sourceMappingURL=conversation-row.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-row.js","sourceRoot":"","sources":["../src/conversation-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,6FAA6F;AAC7F,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,GAAG,EAAE,OAAO,CAAC,EAAE;IACf,aAAa,EAAE,OAAO,CAAC,EAAE;IACzB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK;IACxB,mBAAmB,EAAE,KAAK;CAClB,CAAC","sourcesContent":["import { spacing } from \"./foundations.js\";\n\n/** Conversation previews reserve metadata and unread status while truncating the message. */\nexport const conversationRowRecipe = {\n avatarSize: 56,\n unreadSize: 10,\n gap: spacing.sm,\n paddingInline: spacing.md,\n paddingBlock: 10,\n contentGap: 2,\n titleWeight: \"500\",\n unreadTitleWeight: \"800\",\n unreadPreviewWeight: \"700\",\n} as const;\n"]}
1
+ {"version":3,"file":"conversation-row.js","sourceRoot":"","sources":["../src/conversation-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnE,6FAA6F;AAC7F,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,GAAG,EAAE,OAAO,CAAC,EAAE;IACf,aAAa,EAAE,OAAO,CAAC,EAAE;IACzB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,CAAC;IACb,mGAAmG;IACnG,6DAA6D;IAC7D,WAAW,EAAE,UAAU,CAAC,KAAK,CAAC,UAAU;IACxC,iBAAiB,EAAE,UAAU,CAAC,QAAQ;IACtC,mBAAmB,EAAE,UAAU,CAAC,QAAQ;CAChC,CAAC","sourcesContent":["import { fontWeight, spacing, typography } from \"./foundations.js\";\n\n/** Conversation previews reserve metadata and unread status while truncating the message. */\nexport const conversationRowRecipe = {\n avatarSize: 56,\n unreadSize: 10,\n gap: spacing.sm,\n paddingInline: spacing.md,\n paddingBlock: 10,\n contentGap: 2,\n // Read rows use the title weight; unread rows step up to semibold, the heaviest non-display weight\n // (800/700 before the 2026-10-17 lighter scale, \"굵기 좀더 줄여\").\n titleWeight: typography.title.fontWeight,\n unreadTitleWeight: fontWeight.semibold,\n unreadPreviewWeight: fontWeight.semibold,\n} as const;\n"]}
@@ -80,6 +80,6 @@ export declare const counterBadgeRecipe: {
80
80
  };
81
81
  };
82
82
  readonly radius: "full";
83
- readonly fontWeight: "700";
83
+ readonly fontWeight: "500";
84
84
  };
85
85
  //# sourceMappingURL=counter-badge-recipe.d.ts.map
@@ -44,6 +44,6 @@ export const counterBadgeRecipe = {
44
44
  floating: { border: semanticColors.canvas, borderWidth: stroke.strong },
45
45
  },
46
46
  radius: "full",
47
- fontWeight: fontWeight.bold,
47
+ fontWeight: fontWeight.medium,
48
48
  };
49
49
  //# sourceMappingURL=counter-badge-recipe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"counter-badge-recipe.js","sourceRoot":"","sources":["../src/counter-badge-recipe.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,MAAM,EACN,OAAO,EACP,MAAM,GAGP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,oBAAoB,GAIrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GAIxB,MAAM,oBAAoB,CAAC;AAE5B,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;IACjC;;;OAGG;IACH,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,oBAAoB;IAC9B,KAAK,EAAE;QACL,MAAM,EAAE;YACN,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU;YACnD,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;SAC9C;QACD,KAAK,EAAE;YACL,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU;YAClD,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,IAAI;YACvC,OAAO,EAAE,cAAc,CAAC,MAAM;SAC/B;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,OAAO,CAAC,GAAG;YAC9B,WAAW,EAAE,SAAS;SACvB;QACD,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,OAAO,CAAC,EAAE;YAC7B,WAAW,EAAE,SAAS;SACvB;KACF;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE;QACxC,QAAQ,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE;KACxE;IACD,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU,CAAC,IAAI;CA6B5B,CAAC","sourcesContent":["import type { ColorReference } from \"./color-references.js\";\nimport {\n fontWeight,\n radius,\n spacing,\n stroke,\n type FontWeightValue,\n type TextVariant,\n} from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\nimport {\n counterBadgeDefaults,\n type CounterBadgeSize,\n type CounterBadgeTone,\n type CounterBadgeVariant,\n} from \"./counter-badge.js\";\n\nexport {\n counterBadgeDefaults,\n formatCounterBadgeCount,\n type CounterBadgeSize,\n type CounterBadgeTone,\n type CounterBadgeVariant,\n} from \"./counter-badge.js\";\n\n/** Numeric counters use a compact solid plate, distinct from status badges. */\nexport const counterBadgeRecipe = {\n slots: [\"root\", \"label\"] as const,\n /**\n * 숫자 없이 \"새것이 있다\"만 말하는 점. 0이 아닌 개수를 모르거나 셀 필요가 없는\n * 자리(탭 배지, 사이드바 항목)에서 숫자를 지어내지 않기 위해 별도 크기로 둔다.\n */\n dotSize: 8,\n defaults: counterBadgeDefaults,\n tones: {\n danger: {\n background: semanticColors.action.danger.background,\n content: semanticColors.action.danger.content,\n },\n brand: {\n background: semanticColors.action.brand.background,\n content: semanticColors.action.brand.content,\n },\n neutral: {\n background: semanticColors.content.body,\n content: semanticColors.canvas,\n },\n },\n sizes: {\n small: {\n height: 16,\n minWidth: 16,\n paddingHorizontal: spacing.xxs,\n textVariant: \"caption\",\n },\n medium: {\n height: 20,\n minWidth: 20,\n paddingHorizontal: spacing.xs,\n textVariant: \"caption\",\n },\n },\n variants: {\n inline: { border: null, borderWidth: 0 },\n floating: { border: semanticColors.canvas, borderWidth: stroke.strong },\n },\n radius: \"full\",\n fontWeight: fontWeight.bold,\n} as const satisfies {\n slots: readonly [\"root\", \"label\"];\n dotSize: number;\n defaults: {\n tone: CounterBadgeTone;\n size: CounterBadgeSize;\n variant: CounterBadgeVariant;\n max: number;\n };\n tones: Record<\n CounterBadgeTone,\n { background: ColorReference; content: ColorReference }\n >;\n sizes: Record<\n CounterBadgeSize,\n {\n height: number;\n minWidth: number;\n paddingHorizontal: number;\n textVariant: TextVariant;\n }\n >;\n variants: Record<\n CounterBadgeVariant,\n { border: ColorReference | null; borderWidth: number }\n >;\n radius: keyof typeof radius;\n fontWeight: FontWeightValue;\n};\n"]}
1
+ {"version":3,"file":"counter-badge-recipe.js","sourceRoot":"","sources":["../src/counter-badge-recipe.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,MAAM,EACN,OAAO,EACP,MAAM,GAGP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,oBAAoB,GAIrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GAIxB,MAAM,oBAAoB,CAAC;AAE5B,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAU;IACjC;;;OAGG;IACH,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,oBAAoB;IAC9B,KAAK,EAAE;QACL,MAAM,EAAE;YACN,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU;YACnD,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;SAC9C;QACD,KAAK,EAAE;YACL,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU;YAClD,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,IAAI;YACvC,OAAO,EAAE,cAAc,CAAC,MAAM;SAC/B;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,OAAO,CAAC,GAAG;YAC9B,WAAW,EAAE,SAAS;SACvB;QACD,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,OAAO,CAAC,EAAE;YAC7B,WAAW,EAAE,SAAS;SACvB;KACF;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE;QACxC,QAAQ,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE;KACxE;IACD,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,UAAU,CAAC,MAAM;CA6B9B,CAAC","sourcesContent":["import type { ColorReference } from \"./color-references.js\";\nimport {\n fontWeight,\n radius,\n spacing,\n stroke,\n type FontWeightValue,\n type TextVariant,\n} from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\nimport {\n counterBadgeDefaults,\n type CounterBadgeSize,\n type CounterBadgeTone,\n type CounterBadgeVariant,\n} from \"./counter-badge.js\";\n\nexport {\n counterBadgeDefaults,\n formatCounterBadgeCount,\n type CounterBadgeSize,\n type CounterBadgeTone,\n type CounterBadgeVariant,\n} from \"./counter-badge.js\";\n\n/** Numeric counters use a compact solid plate, distinct from status badges. */\nexport const counterBadgeRecipe = {\n slots: [\"root\", \"label\"] as const,\n /**\n * 숫자 없이 \"새것이 있다\"만 말하는 점. 0이 아닌 개수를 모르거나 셀 필요가 없는\n * 자리(탭 배지, 사이드바 항목)에서 숫자를 지어내지 않기 위해 별도 크기로 둔다.\n */\n dotSize: 8,\n defaults: counterBadgeDefaults,\n tones: {\n danger: {\n background: semanticColors.action.danger.background,\n content: semanticColors.action.danger.content,\n },\n brand: {\n background: semanticColors.action.brand.background,\n content: semanticColors.action.brand.content,\n },\n neutral: {\n background: semanticColors.content.body,\n content: semanticColors.canvas,\n },\n },\n sizes: {\n small: {\n height: 16,\n minWidth: 16,\n paddingHorizontal: spacing.xxs,\n textVariant: \"caption\",\n },\n medium: {\n height: 20,\n minWidth: 20,\n paddingHorizontal: spacing.xs,\n textVariant: \"caption\",\n },\n },\n variants: {\n inline: { border: null, borderWidth: 0 },\n floating: { border: semanticColors.canvas, borderWidth: stroke.strong },\n },\n radius: \"full\",\n fontWeight: fontWeight.medium,\n} as const satisfies {\n slots: readonly [\"root\", \"label\"];\n dotSize: number;\n defaults: {\n tone: CounterBadgeTone;\n size: CounterBadgeSize;\n variant: CounterBadgeVariant;\n max: number;\n };\n tones: Record<\n CounterBadgeTone,\n { background: ColorReference; content: ColorReference }\n >;\n sizes: Record<\n CounterBadgeSize,\n {\n height: number;\n minWidth: number;\n paddingHorizontal: number;\n textVariant: TextVariant;\n }\n >;\n variants: Record<\n CounterBadgeVariant,\n { border: ColorReference | null; borderWidth: number }\n >;\n radius: keyof typeof radius;\n fontWeight: FontWeightValue;\n};\n"]}
@@ -132,7 +132,7 @@ export declare const dataTableRecipe: {
132
132
  alpha?: number;
133
133
  }>;
134
134
  readonly textVariant: "label";
135
- readonly fontWeight: "700";
135
+ readonly fontWeight: "500";
136
136
  readonly borderBottom: Readonly<{
137
137
  source: "theme";
138
138
  key: "border";
@@ -319,7 +319,7 @@ export declare const dataTableFamilyRecipe: {
319
319
  key: "text";
320
320
  alpha?: number;
321
321
  }>;
322
- readonly fontWeight: "700";
322
+ readonly fontWeight: "500";
323
323
  };
324
324
  readonly positive: {
325
325
  readonly color: Readonly<{
@@ -327,7 +327,7 @@ export declare const dataTableFamilyRecipe: {
327
327
  key: "danger";
328
328
  alpha?: number;
329
329
  }>;
330
- readonly fontWeight: "700";
330
+ readonly fontWeight: "500";
331
331
  };
332
332
  readonly negative: {
333
333
  readonly color: Readonly<{
@@ -335,7 +335,7 @@ export declare const dataTableFamilyRecipe: {
335
335
  key: "info";
336
336
  alpha?: number;
337
337
  }>;
338
- readonly fontWeight: "700";
338
+ readonly fontWeight: "500";
339
339
  };
340
340
  readonly muted: {
341
341
  readonly color: Readonly<{
@@ -178,7 +178,7 @@ export const dataTableRecipe = {
178
178
  background: semanticColors.canvas,
179
179
  color: semanticColors.content.secondary,
180
180
  textVariant: "label",
181
- fontWeight: fontWeight.bold,
181
+ fontWeight: fontWeight.medium,
182
182
  borderBottom: semanticColors.border.default,
183
183
  },
184
184
  row: {
@@ -353,9 +353,9 @@ export const dataTableFamilyRecipe = {
353
353
  heatAlpha: { 1: 0.14, 2: 0.26, 3: 0.42 },
354
354
  heat: { high: themeColor("danger"), low: accentColor("info") },
355
355
  tone: {
356
- leader: { color: semanticColors.content.primary, fontWeight: fontWeight.bold },
357
- positive: { color: themeColor("danger"), fontWeight: fontWeight.bold },
358
- negative: { color: accentColor("info"), fontWeight: fontWeight.bold },
356
+ leader: { color: semanticColors.content.primary, fontWeight: fontWeight.medium },
357
+ positive: { color: themeColor("danger"), fontWeight: fontWeight.medium },
358
+ negative: { color: accentColor("info"), fontWeight: fontWeight.medium },
359
359
  muted: { color: semanticColors.content.tertiary, fontWeight: fontWeight.regular },
360
360
  },
361
361
  groupRow: { background: semanticColors.surface.sunken, color: semanticColors.content.secondary, textVariant: "label" },
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../src/data-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAuB,MAAM,uBAAuB,CAAC;AAQrF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAA0C,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,KAAK;CAC0D,CAAC;AAE5E,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,SAAS,CAAC,aAAa,KAAK,oBAAoB,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAkD;IAElD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CAAC,4CAA4C,CAAC,CAAC;IACpE,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAO,CAAC;IAC3B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,cAAc,CAAC,MAAM,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;QACvC,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CA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AE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1J,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,4FAA4F;IAC5F,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAClH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;AAChF,CAAC","sourcesContent":["import { accentColor, themeColor, type ColorReference } from \"./color-references.js\";\nimport type {\n AsyncCollectionState,\n BehaviorContract,\n CheckboxState,\n CollectionKey,\n CollectionSelectionModel,\n} from \"./behaviors.js\";\nimport { collectionItemContract, focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, fontWeight, spacing, type FontWeightValue, type TextVariant } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type DataTableAlign = \"start\" | \"center\" | \"end\";\n\nexport type DataTableColumnDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n /** Visible column header text; also the columnheader's accessible name. */\n header: string;\n align?: DataTableAlign;\n sortable?: boolean;\n /** Layout hint only (px or flex-basis); renderers may ignore or clamp it. */\n width?: number;\n /**\n * First press sorts descending (TanStack Table `sortDescFirst`). Stat tables read \"highest first\";\n * lower-is-better columns (ERA, rank) leave it false. Added 2026-10-14 with the Native renderer.\n */\n sortDescFirst?: boolean;\n /**\n * Keeps the column visible while the others scroll horizontally (AG Grid / TanStack column\n * pinning, start edge only). Only a leading run of pinned columns is honored.\n */\n pinned?: \"start\";\n}>;\n\nexport const dataTableColumnDefaults = {\n align: \"start\",\n sortable: false,\n} as const satisfies Readonly<{ align: DataTableAlign; sortable: boolean }>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`DataTable ${field} must not be empty`);\n }\n}\n\nexport function validateDataTableColumns<Key extends CollectionKey>(\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (columns.length === 0) {\n throw new TypeError(\"DataTable must declare at least one column\");\n }\n const ids = new Set<Key>();\n for (const column of columns) {\n assertNonEmpty(column.id, \"column id\");\n if (ids.has(column.id)) {\n throw new TypeError(`Duplicate DataTable column id: ${column.id}`);\n }\n ids.add(column.id);\n assertNonEmpty(column.header, `column \"${column.id}\" header`);\n if (column.width !== undefined && (!Number.isFinite(column.width) || column.width <= 0)) {\n throw new RangeError(`DataTable column \"${column.id}\" width must be a positive finite number`);\n }\n }\n}\n\n/**\n * Row identity and selection deliberately do NOT reuse `CollectionItemDescriptor`\n * verbatim: a table row has no single visible `label`/`textValue` the way a\n * Menu or Select item does — its \"content\" is however many columns the\n * product renders per row. Only the parts of the Collection base contract\n * that are genuinely row-shaped (`CollectionKey` identity, `disabled`) apply.\n */\nexport type DataTableRowDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n disabled?: boolean;\n /** Sub-row nesting (TanStack `depth`): 1 indents a substitute under a starter. 0–3. */\n depth?: number;\n}>;\n\nexport function validateDataTableRows<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n): void {\n const ids = new Set<Key>();\n for (const row of rows) {\n assertNonEmpty(row.id, \"row id\");\n if (ids.has(row.id)) {\n throw new TypeError(`Duplicate DataTable row id: ${row.id}`);\n }\n ids.add(row.id);\n if (row.depth !== undefined && (!Number.isInteger(row.depth) || row.depth < 0 || row.depth > 3)) {\n throw new RangeError(`DataTable row \"${String(row.id)}\" depth must be an integer from 0 to 3`);\n }\n }\n}\n\n/** Row selection is the unmodified Collection base contract — no DataTable-only selection shape. */\nexport type DataTableSelection<Key extends CollectionKey = CollectionKey> =\n CollectionSelectionModel<Key>;\n\n/**\n * Header \"select all\" state as the same tri-state `CheckboxState` the\n * selection column's checkbox already renders (check/dash), instead of a new\n * `\"none\" | \"some\" | \"all\"` enum the recipe would have to translate again.\n * Disabled rows are excluded from both the denominator and the count.\n */\nexport function resolveDataTableSelectAllState<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n selectedKeys: ReadonlySet<Key>,\n): CheckboxState {\n const selectable = rows.filter((row) => !row.disabled);\n if (selectable.length === 0) return false;\n const selectedCount = selectable.filter((row) => selectedKeys.has(row.id)).length;\n if (selectedCount === 0) return false;\n if (selectedCount === selectable.length) return true;\n return \"mixed\";\n}\n\n/**\n * Values are the literal `aria-sort` vocabulary (minus `\"none\"`, which is\n * `null`) so the Web renderer passes them through without a translation\n * table — the same \"pass the platform value through\" choice Slider makes\n * for `valueText`.\n */\nexport type DataTableSortDirection = \"ascending\" | \"descending\";\n\nexport type DataTableSortState<Key extends CollectionKey = CollectionKey> = Readonly<{\n columnId: Key;\n direction: DataTableSortDirection;\n}> | null;\n\nexport type DataTableSortCycle = \"two-state\" | \"three-state\";\n\nexport const dataTableDefaults = {\n sortCycle: \"three-state\",\n} as const satisfies Readonly<{ sortCycle: DataTableSortCycle }>;\n\nexport function validateDataTableSortState<Key extends CollectionKey>(\n state: DataTableSortState<Key>,\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (state === null) return;\n if (state.direction !== \"ascending\" && state.direction !== \"descending\") {\n throw new TypeError(`Unsupported DataTable sort direction: ${String(state.direction)}`);\n }\n const column = columns.find((candidate) => candidate.id === state.columnId);\n if (!column) {\n throw new TypeError(`DataTable sort references unknown column id: ${String(state.columnId)}`);\n }\n if (!column.sortable) {\n throw new TypeError(`DataTable column \"${String(state.columnId)}\" is not sortable`);\n }\n}\n\n/**\n * Pure toggle: does not read or write product data. The product still owns\n * actually re-sorting rows (Combobox's local/external filtering split is the\n * same boundary — HJM judges intent, never executes the data operation).\n */\nexport function getNextDataTableSortState<Key extends CollectionKey>(\n current: DataTableSortState<Key>,\n columnId: Key,\n cycle: DataTableSortCycle = dataTableDefaults.sortCycle,\n firstDirection: DataTableSortDirection = \"ascending\",\n): DataTableSortState<Key> {\n const second: DataTableSortDirection = firstDirection === \"ascending\" ? \"descending\" : \"ascending\";\n if (current === null || current.columnId !== columnId) {\n return { columnId, direction: firstDirection };\n }\n if (current.direction === firstDirection) {\n return { columnId, direction: second };\n }\n return cycle === \"three-state\" ? null : { columnId, direction: firstDirection };\n}\n\n/** The first direction a column's header applies, from `sortDescFirst`. */\nexport function dataTableFirstSortDirection(column: Pick<DataTableColumnDescriptor, \"sortDescFirst\">): DataTableSortDirection {\n return column.sortDescFirst ? \"descending\" : \"ascending\";\n}\n\nexport type DataTableSortValue = number | string | null | undefined;\n\n/**\n * Sort key for a displayed cell string: \"0.340\", \".340\", \"36 ⅓\", \"13.5억\", \"61.0%\" → numbers;\n * text such as \"7승0무3패\" or names stay strings; \"—\", \"-\" and \"\" are missing.\n */\nexport function toDataTableSortValue(value: unknown): DataTableSortValue {\n if (value === null || value === undefined) return null;\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n const text = String(value).trim();\n if (!text || text === \"—\" || text === \"-\" || text === \"–\") return null;\n // Two or more letters (any script) mean a label, not a number with a unit.\n if (/\\p{L}.*\\p{L}/u.test(text.replace(/[⅓⅔]/g, \"\"))) return text;\n const number = Number.parseFloat(text.replace(/[^0-9.+-]/g, \"\"));\n return Number.isFinite(number) ? number : text;\n}\n\n/**\n * Pure comparison: numbers numerically, strings with `localeCompare`, numbers before strings.\n * Missing values are not compared here; `sortDataTableRows` always sinks them.\n */\nexport function compareDataTableValues(a: Exclude<DataTableSortValue, null | undefined>, b: Exclude<DataTableSortValue, null | undefined>, locale?: string): number {\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (typeof a === \"number\") return -1;\n if (typeof b === \"number\") return 1;\n return a.localeCompare(b, locale);\n}\n\n/**\n * Optional row-model helper (TanStack `getSortedRowModel` with `sortUndefined: \"last\"`): stable,\n * missing values always last in both directions. 1.20 left all sorting to products; Yajalal and\n * other stat tables reimplemented the same rules, so the shared helper exists now. Products with\n * server-side sorting keep calling `getNextDataTableSortState` only.\n */\nexport function sortDataTableRows<Row, Key extends CollectionKey>(\n rows: readonly Row[],\n sort: DataTableSortState<Key>,\n getValue: (row: Row, columnId: Key) => DataTableSortValue,\n options: Readonly<{ locale?: string }> = {},\n): Row[] {\n const indexed = rows.map((row, index) => ({ row, index }));\n if (!sort) return indexed.map(item => item.row);\n const sign = sort.direction === \"ascending\" ? 1 : -1;\n return indexed.sort((x, y) => {\n const a = getValue(x.row, sort.columnId), b = getValue(y.row, sort.columnId);\n const missingA = a === null || a === undefined, missingB = b === null || b === undefined;\n if (missingA || missingB) return missingA === missingB ? x.index - y.index : missingA ? 1 : -1;\n return sign * compareDataTableValues(a, b, options.locale) || x.index - y.index;\n }).map(item => item.row);\n}\n\n/** Leading pinned columns (only an unbroken run from the start is pinned). */\nexport function splitPinnedDataTableColumns<Column extends Pick<DataTableColumnDescriptor, \"pinned\">>(columns: readonly Column[]): Readonly<{ pinned: readonly Column[]; scrolling: readonly Column[] }> {\n let count = 0;\n while (count < columns.length && columns[count]!.pinned === \"start\") count++;\n return { pinned: columns.slice(0, count), scrolling: columns.slice(count) };\n}\n\n/** The whole table's row-loading status — the unmodified Collection base async contract. */\nexport type DataTableAsyncState = AsyncCollectionState;\n\nexport type DataTableDensity = \"compact\" | \"regular\";\n\n/**\n * Reuses `collectionItemContract`'s hover/selected/focus tokens instead of a\n * second set of row-interaction colors — Menu, Select, and DataTable rows\n * stay one visual vocabulary.\n */\nexport const dataTableRecipe = {\n slots: [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ] as const,\n defaults: { density: \"regular\" },\n density: {\n compact: { paddingVertical: spacing.xs, paddingHorizontal: spacing.sm },\n regular: { paddingVertical: spacing.sm, paddingHorizontal: spacing.md },\n },\n header: {\n background: semanticColors.canvas,\n color: semanticColors.content.secondary,\n textVariant: \"label\",\n fontWeight: fontWeight.bold,\n borderBottom: semanticColors.border.default,\n },\n row: {\n borderBottom: semanticColors.border.subtle,\n hoverBackground: collectionItemContract.highlightedBackground,\n selectedBackground: collectionItemContract.selectedBackground,\n },\n cell: {\n color: semanticColors.content.body,\n textVariant: \"body\",\n },\n sortButton: {\n minTarget: control.minTouchTarget,\n color: semanticColors.content.secondary,\n activeColor: semanticColors.content.brand,\n },\n selectionCell: {\n width: control.minTouchTarget,\n },\n emptyState: {\n color: semanticColors.content.secondary,\n textVariant: \"body\",\n },\n errorState: {\n color: semanticColors.content.danger,\n textVariant: \"body\",\n },\n states: {\n focus: focusIndicatorContract,\n },\n} as const satisfies {\n slots: readonly [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ];\n defaults: { density: DataTableDensity };\n density: Record<DataTableDensity, { paddingVertical: number; paddingHorizontal: number }>;\n header: {\n background: ColorReference;\n color: ColorReference;\n textVariant: TextVariant;\n fontWeight: FontWeightValue;\n borderBottom: ColorReference;\n };\n row: {\n borderBottom: ColorReference;\n hoverBackground: ColorReference;\n selectedBackground: ColorReference;\n };\n cell: { color: ColorReference; textVariant: TextVariant };\n sortButton: { minTarget: number; color: ColorReference; activeColor: ColorReference };\n selectionCell: { width: number };\n emptyState: { color: ColorReference; textVariant: TextVariant };\n errorState: { color: ColorReference; textVariant: TextVariant };\n states: { focus: typeof focusIndicatorContract };\n};\n\nexport const dataTableFamilyScenarios = [\n \"header-groups-span-contiguous-leaf-columns-and-pad-ungrouped-columns\",\n \"row-groups-insert-a-section-label-before-their-rows\",\n \"cell-tone-and-heat-are-product-decided-semantic-emphasis\",\n \"percentile-rank-flips-for-lower-is-better-stats-and-ties-take-the-midpoint\",\n \"bounded-height-tables-keep-the-header-fixed-while-the-body-scrolls\",\n \"line-score-pads-to-nine-periods-and-extends-for-extra-periods\",\n \"matrix-diagonal-is-a-blank-self-cell\",\n \"comparison-bars-favor-the-better-side-even-when-lower-is-better\",\n] as const;\n\n/**\n * No roving-tabindex grid keyboard navigation (arrow keys between cells):\n * no product using this contract has measured demand for full ARIA-grid\n * traversal, and it is a materially bigger accessibility surface than a\n * sortable header button plus native checkbox/radio tab stops.\n */\nexport const dataTableBehavior = {\n controlled: [\"selection\"],\n inputs: [\"columns\", \"rows\", \"sortState\", \"asyncState\"],\n events: [\"onSortChange\"],\n configuration: { sortCycle: [\"two-state\", \"three-state\"] },\n defaults: dataTableDefaults,\n stateAxes: {\n value: [\"selected\"],\n content: [\"idle\", \"loading\", \"loadingMore\", \"empty\", \"error\"],\n },\n web: {\n roles: [\"table\", \"row\", \"columnheader\", \"cell\", \"button\", \"checkbox\", \"radio\"],\n keyboard: [\"Tab\", \"Enter\", \"Space\"],\n focus: \"native\",\n },\n native: { roles: [\"button\", \"header\"], states: [\"selected\"], actions: [\"activate\"] },\n scenarios: [\n \"sort-desc-first-columns-start-descending-and-cycle-back\",\n \"missing-values-sink-to-the-bottom-in-both-directions\",\n \"pinned-start-columns-stay-visible-while-the-rest-scrolls\",\n \"row-selection-reuses-the-shared-collection-selection-model-unchanged\",\n \"select-all-reuses-the-shared-tri-state-checkbox-value\",\n \"async-state-reuses-the-shared-collection-async-state-unchanged\",\n \"sortable-header-is-a-button-inside-the-columnheader-not-the-header-itself\",\n \"sort-direction-values-pass-through-to-aria-sort-without-translation\",\n \"disabled-rows-are-excluded-from-select-all-accounting\",\n \"pagination-or-load-more-is-composed-beneath-the-table-not-owned-by-it\",\n \"row-expansion-is-not-owned-here-compose-the-disclosure-group-contract-per-row\",\n \"a-data-cell-exposes-at-most-one-focusable-control\",\n \"no-roving-tabindex-grid-navigation-is-implied\",\n ...dataTableFamilyScenarios,\n ],\n} as const satisfies BehaviorContract;\n\n/* ------------------------------------------------------------------------------------------------\n * Table family, 2026-10-14 (user request: research table libraries and absorb several table types).\n * Concepts re-derived, nothing vendored:\n * - column header groups (TanStack Table `getHeaderGroups`, AG Grid column groups),\n * - row groups with a section label and indented sub-rows (AG Grid row grouping, TanStack expanding),\n * - conditional cell tone and percentile heat (AG Grid `cellClassRules`/cellStyle heatmaps,\n * Baseball Savant percentile color: deeper red toward the best, deeper blue toward the worst),\n * - a vertically bounded body with a fixed header (react-native-sticky-table, CSS sticky headers),\n * - sports layouts that products kept hand-building: line score (period columns + totals, MLB/ESPN),\n * cross-table matrix (head-to-head records), and two-sided comparison rows (ESPN matchup).\n * ---------------------------------------------------------------------------------------------- */\n\n/** One header band above leaf columns. Columns not listed in any group get an empty placeholder cell. */\nexport type DataTableColumnGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n header: string;\n columns: readonly Key[];\n}>;\n\nexport type DataTableHeaderBand = Readonly<{ id: string; header: string | null; span: number; columnIds: readonly string[] }>;\n\n/**\n * Resolves group bands over the given (already pinned-split) column order. A group must cover a\n * contiguous run; columns outside every group become placeholder bands so leaf widths still line up.\n */\nexport function resolveDataTableHeaderBands<Key extends CollectionKey>(\n columns: readonly Pick<DataTableColumnDescriptor<Key>, \"id\">[],\n groups: readonly DataTableColumnGroup<Key>[],\n): DataTableHeaderBand[] {\n const owner = new Map<Key, DataTableColumnGroup<Key>>();\n for (const group of groups) {\n assertNonEmpty(group.id, \"column group id\");\n assertNonEmpty(group.header, `column group \"${group.id}\" header`);\n for (const id of group.columns) {\n if (owner.has(id)) throw new TypeError(`DataTable column \"${String(id)}\" belongs to two groups`);\n owner.set(id, group);\n }\n }\n const bands: { id: string; header: string | null; columnIds: string[] }[] = [];\n for (const column of columns) {\n const group = owner.get(column.id) ?? null;\n const last = bands.at(-1);\n if (group && last && last.id === group.id) { last.columnIds.push(column.id); continue; }\n if (group && bands.some((band) => band.id === group.id)) throw new TypeError(`DataTable column group \"${group.id}\" must be contiguous`);\n bands.push({ id: group ? group.id : `placeholder-${column.id}`, header: group ? group.header : null, columnIds: [column.id] });\n }\n return bands.map((band) => ({ ...band, span: band.columnIds.length }));\n}\n\n/** Labeled row section (e.g. 선발 / 교체, 동부 / 서부). Rows not in any group render first, ungrouped. */\nexport type DataTableRowGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n label: string;\n rows: readonly Key[];\n}>;\n\nexport type DataTableBodyItem<Key extends CollectionKey = CollectionKey> =\n | Readonly<{ kind: \"group\"; id: string; label: string }>\n | Readonly<{ kind: \"row\"; id: Key }>;\n\n/** Flattens rows + groups into the body order renderers draw. Unknown or duplicated ids throw. */\nexport function resolveDataTableBody<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n groups: readonly DataTableRowGroup<Key>[] = [],\n): DataTableBodyItem<Key>[] {\n if (groups.length === 0) return rows.map((row) => ({ kind: \"row\", id: row.id }));\n const known = new Set(rows.map((row) => row.id)), placed = new Set<Key>();\n const grouped: DataTableBodyItem<Key>[] = [];\n for (const group of groups) {\n assertNonEmpty(group.id, \"row group id\");\n assertNonEmpty(group.label, `row group \"${group.id}\" label`);\n grouped.push({ kind: \"group\", id: group.id, label: group.label });\n for (const id of group.rows) {\n if (!known.has(id)) throw new TypeError(`DataTable row group \"${group.id}\" references unknown row id: ${String(id)}`);\n if (placed.has(id)) throw new TypeError(`DataTable row \"${String(id)}\" belongs to two row groups`);\n placed.add(id);\n grouped.push({ kind: \"row\", id });\n }\n }\n const loose: DataTableBodyItem<Key>[] = rows.filter((row) => !placed.has(row.id)).map((row) => ({ kind: \"row\", id: row.id }));\n return [...loose, ...grouped];\n}\n\n/**\n * Semantic cell emphasis, decided by the product per cell (AG Grid cellClassRules):\n * `leader` marks a league/table best, `positive`/`negative` a direction, `muted` a non-qualifying value.\n */\nexport type DataTableCellTone = \"leader\" | \"positive\" | \"negative\" | \"muted\";\n\n/** Percentile heat (Savant): `high` side toward the best values, `low` toward the worst; strength 1–3. */\nexport type DataTableCellHeat = Readonly<{ side: \"high\" | \"low\"; strength: 1 | 2 | 3 }>;\n\n/**\n * Percentile rank (0–100, best = 100) of `value` among `sample`. `lowerIsBetter` flips ERA-style stats.\n * Ties take the midpoint rank, missing values return null. A one-value sample is the 50th percentile.\n */\nexport function percentileRank(value: number | null | undefined, sample: readonly (number | null | undefined)[], options: Readonly<{ lowerIsBetter?: boolean }> = {}): number | null {\n if (value === null || value === undefined || !Number.isFinite(value)) return null;\n const values = sample.filter((item): item is number => item !== null && item !== undefined && Number.isFinite(item));\n if (values.length <= 1) return 50;\n let below = 0, equal = 0;\n for (const item of values) {\n const better = options.lowerIsBetter ? item > value : item < value;\n if (item === value) equal++;\n else if (better) below++;\n }\n return Math.round(((below + (equal - 1) / 2) / (values.length - 1)) * 100);\n}\n\n/** Maps a percentile to heat: ≥90/≥75/≥60 high, ≤10/≤25/≤40 low, the middle stays neutral (null). */\nexport function percentileHeat(percentile: number | null): DataTableCellHeat | null {\n if (percentile === null) return null;\n if (percentile >= 90) return { side: \"high\", strength: 3 };\n if (percentile >= 75) return { side: \"high\", strength: 2 };\n if (percentile >= 60) return { side: \"high\", strength: 1 };\n if (percentile <= 10) return { side: \"low\", strength: 3 };\n if (percentile <= 25) return { side: \"low\", strength: 2 };\n if (percentile <= 40) return { side: \"low\", strength: 1 };\n return null;\n}\n\nexport const dataTableFamilyRecipe = {\n /** Heat background alpha per strength, over the high/low base colors. */\n heatAlpha: { 1: 0.14, 2: 0.26, 3: 0.42 },\n heat: { high: themeColor(\"danger\"), low: accentColor(\"info\") },\n tone: {\n leader: { color: semanticColors.content.primary, fontWeight: fontWeight.bold },\n positive: { color: themeColor(\"danger\"), fontWeight: fontWeight.bold },\n negative: { color: accentColor(\"info\"), fontWeight: fontWeight.bold },\n muted: { color: semanticColors.content.tertiary, fontWeight: fontWeight.regular },\n },\n groupRow: { background: semanticColors.surface.sunken, color: semanticColors.content.secondary, textVariant: \"label\" as TextVariant },\n /** Indent per sub-row depth level (substitutes under a starter, players under a team). */\n depthIndent: spacing.md,\n headerBand: { color: semanticColors.content.secondary, borderBottom: semanticColors.border.subtle },\n /**\n * Live period (LineScore) and \"my team\" row (MatrixTable). These tables sit on the surface tone, where DataTable's\n * canvas-colored selected row read as a white gap that split the table (2026-10-17 review E17).\n */\n highlight: { background: semanticColors.surface.brand },\n} as const;\n\n/* ---------------------------------------------- Line score ------------------------------------- */\n\nexport type LineScoreTeam = Readonly<{\n id: string;\n name: string;\n /** Runs per period; null = not played yet, \"X\" = home team did not bat in the last inning. */\n periods: readonly (number | \"X\" | null)[];\n /** Totals in display order, e.g. { R: 5, H: 9, E: 0, B: 4 }. */\n totals: Readonly<Record<string, number | null>>;\n}>;\n\nexport type LineScoreColumn = Readonly<{ id: string; header: string; kind: \"period\" | \"total\" }>;\n\n/**\n * Period columns are padded to `minPeriods` (9 innings) and extend for extra innings; totals follow.\n * The current period (live game) is reported so renderers can highlight it.\n */\nexport function resolveLineScore(teams: readonly LineScoreTeam[], options: Readonly<{ minPeriods?: number; totals: readonly string[]; currentPeriod?: number | null }>): Readonly<{ columns: LineScoreColumn[]; currentPeriod: number | null; leaderId: string | null }> {\n if (teams.length < 2) throw new TypeError(\"LineScore needs at least two teams\");\n const ids = new Set<string>();\n for (const team of teams) {\n assertNonEmpty(team.id, \"line score team id\");\n if (ids.has(team.id)) throw new TypeError(`Duplicate LineScore team id: ${team.id}`);\n ids.add(team.id);\n }\n const played = Math.max(...teams.map((team) => team.periods.length));\n const count = Math.max(options.minPeriods ?? 9, played);\n const columns: LineScoreColumn[] = Array.from({ length: count }, (_, i) => ({ id: `p${i + 1}`, header: String(i + 1), kind: \"period\" }));\n for (const total of options.totals) columns.push({ id: `t-${total}`, header: total, kind: \"total\" });\n const runs = options.totals[0];\n let leaderId: string | null = null;\n if (runs) {\n const scores = teams.map((team) => ({ id: team.id, value: team.totals[runs] ?? null }));\n const best = Math.max(...scores.map((score) => score.value ?? -Infinity));\n const leaders = scores.filter((score) => score.value === best && Number.isFinite(best));\n leaderId = leaders.length === 1 ? leaders[0]!.id : null;\n }\n const current = options.currentPeriod ?? null;\n return { columns, currentPeriod: current !== null && current >= 1 && current <= count ? current : null, leaderId };\n}\n\nexport function formatLineScoreCell(value: number | \"X\" | null | undefined): string {\n return value === null || value === undefined ? \"\" : String(value);\n}\n\n/* ---------------------------------------------- Matrix table ----------------------------------- */\n\nexport type MatrixCell = Readonly<{ label: string; tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }>;\n\n/**\n * Square cross table (team × team head-to-head). Rows and columns share one id list; the diagonal is\n * a self cell and renders blank. `getCell(row, column)` returns null for no record.\n */\nexport function resolveMatrix<Key extends string>(ids: readonly Key[], getCell: (row: Key, column: Key) => MatrixCell | null): readonly (readonly (MatrixCell | \"self\" | null)[])[] {\n if (new Set(ids).size !== ids.length) throw new TypeError(\"Matrix ids must be unique\");\n return ids.map((row) => ids.map((column) => (row === column ? \"self\" : getCell(row, column))));\n}\n\n/* ---------------------------------------------- Comparison table ------------------------------- */\n\nexport type ComparisonRow = Readonly<{\n id: string;\n label: string;\n values: readonly [number | null, number | null];\n /** Display strings; defaults to String(value). */\n display?: readonly [string, string];\n lowerIsBetter?: boolean;\n}>;\n\n/** Which side wins a row (null on ties/missing), and each side's bar share of the pair (0–1). */\nexport function resolveComparisonRow(row: ComparisonRow): Readonly<{ winner: 0 | 1 | null; shares: readonly [number, number] }> {\n const [a, b] = row.values;\n if (a === null || b === null || !Number.isFinite(a) || !Number.isFinite(b)) return { winner: null, shares: [a === null ? 0 : 0.5, b === null ? 0 : 0.5] };\n const winner = a === b ? null : (row.lowerIsBetter ? a < b : a > b) ? 0 : 1;\n // Lower-is-better rows invert the magnitudes so the better side still draws the longer bar.\n const left = Math.abs(row.lowerIsBetter ? b : a), right = Math.abs(row.lowerIsBetter ? a : b), sum = left + right;\n return { winner, shares: sum === 0 ? [0.5, 0.5] : [left / sum, right / sum] };\n}\n\n"]}
1
+ {"version":3,"file":"data-table.js","sourceRoot":"","sources":["../src/data-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAuB,MAAM,uBAAuB,CAAC;AAQrF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAA0C,MAAM,kBAAkB,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,KAAK;CAC0D,CAAC;AAE5E,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,SAAS,CAAC,aAAa,KAAK,oBAAoB,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAkD;IAElD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,SAAS,CAAC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AsyncCollectionState,\n BehaviorContract,\n CheckboxState,\n CollectionKey,\n CollectionSelectionModel,\n} from \"./behaviors.js\";\nimport { collectionItemContract, focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, fontWeight, spacing, type FontWeightValue, type TextVariant } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type DataTableAlign = \"start\" | \"center\" | \"end\";\n\nexport type DataTableColumnDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n /** Visible column header text; also the columnheader's accessible name. */\n header: string;\n align?: DataTableAlign;\n sortable?: boolean;\n /** Layout hint only (px or flex-basis); renderers may ignore or clamp it. */\n width?: number;\n /**\n * First press sorts descending (TanStack Table `sortDescFirst`). Stat tables read \"highest first\";\n * lower-is-better columns (ERA, rank) leave it false. Added 2026-10-14 with the Native renderer.\n */\n sortDescFirst?: boolean;\n /**\n * Keeps the column visible while the others scroll horizontally (AG Grid / TanStack column\n * pinning, start edge only). Only a leading run of pinned columns is honored.\n */\n pinned?: \"start\";\n}>;\n\nexport const dataTableColumnDefaults = {\n align: \"start\",\n sortable: false,\n} as const satisfies Readonly<{ align: DataTableAlign; sortable: boolean }>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`DataTable ${field} must not be empty`);\n }\n}\n\nexport function validateDataTableColumns<Key extends CollectionKey>(\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (columns.length === 0) {\n throw new TypeError(\"DataTable must declare at least one column\");\n }\n const ids = new Set<Key>();\n for (const column of columns) {\n assertNonEmpty(column.id, \"column id\");\n if (ids.has(column.id)) {\n throw new TypeError(`Duplicate DataTable column id: ${column.id}`);\n }\n ids.add(column.id);\n assertNonEmpty(column.header, `column \"${column.id}\" header`);\n if (column.width !== undefined && (!Number.isFinite(column.width) || column.width <= 0)) {\n throw new RangeError(`DataTable column \"${column.id}\" width must be a positive finite number`);\n }\n }\n}\n\n/**\n * Row identity and selection deliberately do NOT reuse `CollectionItemDescriptor`\n * verbatim: a table row has no single visible `label`/`textValue` the way a\n * Menu or Select item does — its \"content\" is however many columns the\n * product renders per row. Only the parts of the Collection base contract\n * that are genuinely row-shaped (`CollectionKey` identity, `disabled`) apply.\n */\nexport type DataTableRowDescriptor<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: Key;\n disabled?: boolean;\n /** Sub-row nesting (TanStack `depth`): 1 indents a substitute under a starter. 0–3. */\n depth?: number;\n}>;\n\nexport function validateDataTableRows<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n): void {\n const ids = new Set<Key>();\n for (const row of rows) {\n assertNonEmpty(row.id, \"row id\");\n if (ids.has(row.id)) {\n throw new TypeError(`Duplicate DataTable row id: ${row.id}`);\n }\n ids.add(row.id);\n if (row.depth !== undefined && (!Number.isInteger(row.depth) || row.depth < 0 || row.depth > 3)) {\n throw new RangeError(`DataTable row \"${String(row.id)}\" depth must be an integer from 0 to 3`);\n }\n }\n}\n\n/** Row selection is the unmodified Collection base contract — no DataTable-only selection shape. */\nexport type DataTableSelection<Key extends CollectionKey = CollectionKey> =\n CollectionSelectionModel<Key>;\n\n/**\n * Header \"select all\" state as the same tri-state `CheckboxState` the\n * selection column's checkbox already renders (check/dash), instead of a new\n * `\"none\" | \"some\" | \"all\"` enum the recipe would have to translate again.\n * Disabled rows are excluded from both the denominator and the count.\n */\nexport function resolveDataTableSelectAllState<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n selectedKeys: ReadonlySet<Key>,\n): CheckboxState {\n const selectable = rows.filter((row) => !row.disabled);\n if (selectable.length === 0) return false;\n const selectedCount = selectable.filter((row) => selectedKeys.has(row.id)).length;\n if (selectedCount === 0) return false;\n if (selectedCount === selectable.length) return true;\n return \"mixed\";\n}\n\n/**\n * Values are the literal `aria-sort` vocabulary (minus `\"none\"`, which is\n * `null`) so the Web renderer passes them through without a translation\n * table — the same \"pass the platform value through\" choice Slider makes\n * for `valueText`.\n */\nexport type DataTableSortDirection = \"ascending\" | \"descending\";\n\nexport type DataTableSortState<Key extends CollectionKey = CollectionKey> = Readonly<{\n columnId: Key;\n direction: DataTableSortDirection;\n}> | null;\n\nexport type DataTableSortCycle = \"two-state\" | \"three-state\";\n\nexport const dataTableDefaults = {\n sortCycle: \"three-state\",\n} as const satisfies Readonly<{ sortCycle: DataTableSortCycle }>;\n\nexport function validateDataTableSortState<Key extends CollectionKey>(\n state: DataTableSortState<Key>,\n columns: readonly DataTableColumnDescriptor<Key>[],\n): void {\n if (state === null) return;\n if (state.direction !== \"ascending\" && state.direction !== \"descending\") {\n throw new TypeError(`Unsupported DataTable sort direction: ${String(state.direction)}`);\n }\n const column = columns.find((candidate) => candidate.id === state.columnId);\n if (!column) {\n throw new TypeError(`DataTable sort references unknown column id: ${String(state.columnId)}`);\n }\n if (!column.sortable) {\n throw new TypeError(`DataTable column \"${String(state.columnId)}\" is not sortable`);\n }\n}\n\n/**\n * Pure toggle: does not read or write product data. The product still owns\n * actually re-sorting rows (Combobox's local/external filtering split is the\n * same boundary — HJM judges intent, never executes the data operation).\n */\nexport function getNextDataTableSortState<Key extends CollectionKey>(\n current: DataTableSortState<Key>,\n columnId: Key,\n cycle: DataTableSortCycle = dataTableDefaults.sortCycle,\n firstDirection: DataTableSortDirection = \"ascending\",\n): DataTableSortState<Key> {\n const second: DataTableSortDirection = firstDirection === \"ascending\" ? \"descending\" : \"ascending\";\n if (current === null || current.columnId !== columnId) {\n return { columnId, direction: firstDirection };\n }\n if (current.direction === firstDirection) {\n return { columnId, direction: second };\n }\n return cycle === \"three-state\" ? null : { columnId, direction: firstDirection };\n}\n\n/** The first direction a column's header applies, from `sortDescFirst`. */\nexport function dataTableFirstSortDirection(column: Pick<DataTableColumnDescriptor, \"sortDescFirst\">): DataTableSortDirection {\n return column.sortDescFirst ? \"descending\" : \"ascending\";\n}\n\nexport type DataTableSortValue = number | string | null | undefined;\n\n/**\n * Sort key for a displayed cell string: \"0.340\", \".340\", \"36 ⅓\", \"13.5억\", \"61.0%\" → numbers;\n * text such as \"7승0무3패\" or names stay strings; \"—\", \"-\" and \"\" are missing.\n */\nexport function toDataTableSortValue(value: unknown): DataTableSortValue {\n if (value === null || value === undefined) return null;\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n const text = String(value).trim();\n if (!text || text === \"—\" || text === \"-\" || text === \"–\") return null;\n // Two or more letters (any script) mean a label, not a number with a unit.\n if (/\\p{L}.*\\p{L}/u.test(text.replace(/[⅓⅔]/g, \"\"))) return text;\n const number = Number.parseFloat(text.replace(/[^0-9.+-]/g, \"\"));\n return Number.isFinite(number) ? number : text;\n}\n\n/**\n * Pure comparison: numbers numerically, strings with `localeCompare`, numbers before strings.\n * Missing values are not compared here; `sortDataTableRows` always sinks them.\n */\nexport function compareDataTableValues(a: Exclude<DataTableSortValue, null | undefined>, b: Exclude<DataTableSortValue, null | undefined>, locale?: string): number {\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n if (typeof a === \"number\") return -1;\n if (typeof b === \"number\") return 1;\n return a.localeCompare(b, locale);\n}\n\n/**\n * Optional row-model helper (TanStack `getSortedRowModel` with `sortUndefined: \"last\"`): stable,\n * missing values always last in both directions. 1.20 left all sorting to products; Yajalal and\n * other stat tables reimplemented the same rules, so the shared helper exists now. Products with\n * server-side sorting keep calling `getNextDataTableSortState` only.\n */\nexport function sortDataTableRows<Row, Key extends CollectionKey>(\n rows: readonly Row[],\n sort: DataTableSortState<Key>,\n getValue: (row: Row, columnId: Key) => DataTableSortValue,\n options: Readonly<{ locale?: string }> = {},\n): Row[] {\n const indexed = rows.map((row, index) => ({ row, index }));\n if (!sort) return indexed.map(item => item.row);\n const sign = sort.direction === \"ascending\" ? 1 : -1;\n return indexed.sort((x, y) => {\n const a = getValue(x.row, sort.columnId), b = getValue(y.row, sort.columnId);\n const missingA = a === null || a === undefined, missingB = b === null || b === undefined;\n if (missingA || missingB) return missingA === missingB ? x.index - y.index : missingA ? 1 : -1;\n return sign * compareDataTableValues(a, b, options.locale) || x.index - y.index;\n }).map(item => item.row);\n}\n\n/** Leading pinned columns (only an unbroken run from the start is pinned). */\nexport function splitPinnedDataTableColumns<Column extends Pick<DataTableColumnDescriptor, \"pinned\">>(columns: readonly Column[]): Readonly<{ pinned: readonly Column[]; scrolling: readonly Column[] }> {\n let count = 0;\n while (count < columns.length && columns[count]!.pinned === \"start\") count++;\n return { pinned: columns.slice(0, count), scrolling: columns.slice(count) };\n}\n\n/** The whole table's row-loading status — the unmodified Collection base async contract. */\nexport type DataTableAsyncState = AsyncCollectionState;\n\nexport type DataTableDensity = \"compact\" | \"regular\";\n\n/**\n * Reuses `collectionItemContract`'s hover/selected/focus tokens instead of a\n * second set of row-interaction colors — Menu, Select, and DataTable rows\n * stay one visual vocabulary.\n */\nexport const dataTableRecipe = {\n slots: [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ] as const,\n defaults: { density: \"regular\" },\n density: {\n compact: { paddingVertical: spacing.xs, paddingHorizontal: spacing.sm },\n regular: { paddingVertical: spacing.sm, paddingHorizontal: spacing.md },\n },\n header: {\n background: semanticColors.canvas,\n color: semanticColors.content.secondary,\n textVariant: \"label\",\n fontWeight: fontWeight.medium,\n borderBottom: semanticColors.border.default,\n },\n row: {\n borderBottom: semanticColors.border.subtle,\n hoverBackground: collectionItemContract.highlightedBackground,\n selectedBackground: collectionItemContract.selectedBackground,\n },\n cell: {\n color: semanticColors.content.body,\n textVariant: \"body\",\n },\n sortButton: {\n minTarget: control.minTouchTarget,\n color: semanticColors.content.secondary,\n activeColor: semanticColors.content.brand,\n },\n selectionCell: {\n width: control.minTouchTarget,\n },\n emptyState: {\n color: semanticColors.content.secondary,\n textVariant: \"body\",\n },\n errorState: {\n color: semanticColors.content.danger,\n textVariant: \"body\",\n },\n states: {\n focus: focusIndicatorContract,\n },\n} as const satisfies {\n slots: readonly [\n \"root\",\n \"header\",\n \"headerCell\",\n \"sortButton\",\n \"sortIcon\",\n \"row\",\n \"cell\",\n \"selectionCell\",\n \"emptyState\",\n \"errorState\",\n ];\n defaults: { density: DataTableDensity };\n density: Record<DataTableDensity, { paddingVertical: number; paddingHorizontal: number }>;\n header: {\n background: ColorReference;\n color: ColorReference;\n textVariant: TextVariant;\n fontWeight: FontWeightValue;\n borderBottom: ColorReference;\n };\n row: {\n borderBottom: ColorReference;\n hoverBackground: ColorReference;\n selectedBackground: ColorReference;\n };\n cell: { color: ColorReference; textVariant: TextVariant };\n sortButton: { minTarget: number; color: ColorReference; activeColor: ColorReference };\n selectionCell: { width: number };\n emptyState: { color: ColorReference; textVariant: TextVariant };\n errorState: { color: ColorReference; textVariant: TextVariant };\n states: { focus: typeof focusIndicatorContract };\n};\n\nexport const dataTableFamilyScenarios = [\n \"header-groups-span-contiguous-leaf-columns-and-pad-ungrouped-columns\",\n \"row-groups-insert-a-section-label-before-their-rows\",\n \"cell-tone-and-heat-are-product-decided-semantic-emphasis\",\n \"percentile-rank-flips-for-lower-is-better-stats-and-ties-take-the-midpoint\",\n \"bounded-height-tables-keep-the-header-fixed-while-the-body-scrolls\",\n \"line-score-pads-to-nine-periods-and-extends-for-extra-periods\",\n \"matrix-diagonal-is-a-blank-self-cell\",\n \"comparison-bars-favor-the-better-side-even-when-lower-is-better\",\n] as const;\n\n/**\n * No roving-tabindex grid keyboard navigation (arrow keys between cells):\n * no product using this contract has measured demand for full ARIA-grid\n * traversal, and it is a materially bigger accessibility surface than a\n * sortable header button plus native checkbox/radio tab stops.\n */\nexport const dataTableBehavior = {\n controlled: [\"selection\"],\n inputs: [\"columns\", \"rows\", \"sortState\", \"asyncState\"],\n events: [\"onSortChange\"],\n configuration: { sortCycle: [\"two-state\", \"three-state\"] },\n defaults: dataTableDefaults,\n stateAxes: {\n value: [\"selected\"],\n content: [\"idle\", \"loading\", \"loadingMore\", \"empty\", \"error\"],\n },\n web: {\n roles: [\"table\", \"row\", \"columnheader\", \"cell\", \"button\", \"checkbox\", \"radio\"],\n keyboard: [\"Tab\", \"Enter\", \"Space\"],\n focus: \"native\",\n },\n native: { roles: [\"button\", \"header\"], states: [\"selected\"], actions: [\"activate\"] },\n scenarios: [\n \"sort-desc-first-columns-start-descending-and-cycle-back\",\n \"missing-values-sink-to-the-bottom-in-both-directions\",\n \"pinned-start-columns-stay-visible-while-the-rest-scrolls\",\n \"row-selection-reuses-the-shared-collection-selection-model-unchanged\",\n \"select-all-reuses-the-shared-tri-state-checkbox-value\",\n \"async-state-reuses-the-shared-collection-async-state-unchanged\",\n \"sortable-header-is-a-button-inside-the-columnheader-not-the-header-itself\",\n \"sort-direction-values-pass-through-to-aria-sort-without-translation\",\n \"disabled-rows-are-excluded-from-select-all-accounting\",\n \"pagination-or-load-more-is-composed-beneath-the-table-not-owned-by-it\",\n \"row-expansion-is-not-owned-here-compose-the-disclosure-group-contract-per-row\",\n \"a-data-cell-exposes-at-most-one-focusable-control\",\n \"no-roving-tabindex-grid-navigation-is-implied\",\n ...dataTableFamilyScenarios,\n ],\n} as const satisfies BehaviorContract;\n\n/* ------------------------------------------------------------------------------------------------\n * Table family, 2026-10-14 (user request: research table libraries and absorb several table types).\n * Concepts re-derived, nothing vendored:\n * - column header groups (TanStack Table `getHeaderGroups`, AG Grid column groups),\n * - row groups with a section label and indented sub-rows (AG Grid row grouping, TanStack expanding),\n * - conditional cell tone and percentile heat (AG Grid `cellClassRules`/cellStyle heatmaps,\n * Baseball Savant percentile color: deeper red toward the best, deeper blue toward the worst),\n * - a vertically bounded body with a fixed header (react-native-sticky-table, CSS sticky headers),\n * - sports layouts that products kept hand-building: line score (period columns + totals, MLB/ESPN),\n * cross-table matrix (head-to-head records), and two-sided comparison rows (ESPN matchup).\n * ---------------------------------------------------------------------------------------------- */\n\n/** One header band above leaf columns. Columns not listed in any group get an empty placeholder cell. */\nexport type DataTableColumnGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n header: string;\n columns: readonly Key[];\n}>;\n\nexport type DataTableHeaderBand = Readonly<{ id: string; header: string | null; span: number; columnIds: readonly string[] }>;\n\n/**\n * Resolves group bands over the given (already pinned-split) column order. A group must cover a\n * contiguous run; columns outside every group become placeholder bands so leaf widths still line up.\n */\nexport function resolveDataTableHeaderBands<Key extends CollectionKey>(\n columns: readonly Pick<DataTableColumnDescriptor<Key>, \"id\">[],\n groups: readonly DataTableColumnGroup<Key>[],\n): DataTableHeaderBand[] {\n const owner = new Map<Key, DataTableColumnGroup<Key>>();\n for (const group of groups) {\n assertNonEmpty(group.id, \"column group id\");\n assertNonEmpty(group.header, `column group \"${group.id}\" header`);\n for (const id of group.columns) {\n if (owner.has(id)) throw new TypeError(`DataTable column \"${String(id)}\" belongs to two groups`);\n owner.set(id, group);\n }\n }\n const bands: { id: string; header: string | null; columnIds: string[] }[] = [];\n for (const column of columns) {\n const group = owner.get(column.id) ?? null;\n const last = bands.at(-1);\n if (group && last && last.id === group.id) { last.columnIds.push(column.id); continue; }\n if (group && bands.some((band) => band.id === group.id)) throw new TypeError(`DataTable column group \"${group.id}\" must be contiguous`);\n bands.push({ id: group ? group.id : `placeholder-${column.id}`, header: group ? group.header : null, columnIds: [column.id] });\n }\n return bands.map((band) => ({ ...band, span: band.columnIds.length }));\n}\n\n/** Labeled row section (e.g. 선발 / 교체, 동부 / 서부). Rows not in any group render first, ungrouped. */\nexport type DataTableRowGroup<Key extends CollectionKey = CollectionKey> = Readonly<{\n id: string;\n label: string;\n rows: readonly Key[];\n}>;\n\nexport type DataTableBodyItem<Key extends CollectionKey = CollectionKey> =\n | Readonly<{ kind: \"group\"; id: string; label: string }>\n | Readonly<{ kind: \"row\"; id: Key }>;\n\n/** Flattens rows + groups into the body order renderers draw. Unknown or duplicated ids throw. */\nexport function resolveDataTableBody<Key extends CollectionKey>(\n rows: readonly DataTableRowDescriptor<Key>[],\n groups: readonly DataTableRowGroup<Key>[] = [],\n): DataTableBodyItem<Key>[] {\n if (groups.length === 0) return rows.map((row) => ({ kind: \"row\", id: row.id }));\n const known = new Set(rows.map((row) => row.id)), placed = new Set<Key>();\n const grouped: DataTableBodyItem<Key>[] = [];\n for (const group of groups) {\n assertNonEmpty(group.id, \"row group id\");\n assertNonEmpty(group.label, `row group \"${group.id}\" label`);\n grouped.push({ kind: \"group\", id: group.id, label: group.label });\n for (const id of group.rows) {\n if (!known.has(id)) throw new TypeError(`DataTable row group \"${group.id}\" references unknown row id: ${String(id)}`);\n if (placed.has(id)) throw new TypeError(`DataTable row \"${String(id)}\" belongs to two row groups`);\n placed.add(id);\n grouped.push({ kind: \"row\", id });\n }\n }\n const loose: DataTableBodyItem<Key>[] = rows.filter((row) => !placed.has(row.id)).map((row) => ({ kind: \"row\", id: row.id }));\n return [...loose, ...grouped];\n}\n\n/**\n * Semantic cell emphasis, decided by the product per cell (AG Grid cellClassRules):\n * `leader` marks a league/table best, `positive`/`negative` a direction, `muted` a non-qualifying value.\n */\nexport type DataTableCellTone = \"leader\" | \"positive\" | \"negative\" | \"muted\";\n\n/** Percentile heat (Savant): `high` side toward the best values, `low` toward the worst; strength 1–3. */\nexport type DataTableCellHeat = Readonly<{ side: \"high\" | \"low\"; strength: 1 | 2 | 3 }>;\n\n/**\n * Percentile rank (0–100, best = 100) of `value` among `sample`. `lowerIsBetter` flips ERA-style stats.\n * Ties take the midpoint rank, missing values return null. A one-value sample is the 50th percentile.\n */\nexport function percentileRank(value: number | null | undefined, sample: readonly (number | null | undefined)[], options: Readonly<{ lowerIsBetter?: boolean }> = {}): number | null {\n if (value === null || value === undefined || !Number.isFinite(value)) return null;\n const values = sample.filter((item): item is number => item !== null && item !== undefined && Number.isFinite(item));\n if (values.length <= 1) return 50;\n let below = 0, equal = 0;\n for (const item of values) {\n const better = options.lowerIsBetter ? item > value : item < value;\n if (item === value) equal++;\n else if (better) below++;\n }\n return Math.round(((below + (equal - 1) / 2) / (values.length - 1)) * 100);\n}\n\n/** Maps a percentile to heat: ≥90/≥75/≥60 high, ≤10/≤25/≤40 low, the middle stays neutral (null). */\nexport function percentileHeat(percentile: number | null): DataTableCellHeat | null {\n if (percentile === null) return null;\n if (percentile >= 90) return { side: \"high\", strength: 3 };\n if (percentile >= 75) return { side: \"high\", strength: 2 };\n if (percentile >= 60) return { side: \"high\", strength: 1 };\n if (percentile <= 10) return { side: \"low\", strength: 3 };\n if (percentile <= 25) return { side: \"low\", strength: 2 };\n if (percentile <= 40) return { side: \"low\", strength: 1 };\n return null;\n}\n\nexport const dataTableFamilyRecipe = {\n /** Heat background alpha per strength, over the high/low base colors. */\n heatAlpha: { 1: 0.14, 2: 0.26, 3: 0.42 },\n heat: { high: themeColor(\"danger\"), low: accentColor(\"info\") },\n tone: {\n leader: { color: semanticColors.content.primary, fontWeight: fontWeight.medium },\n positive: { color: themeColor(\"danger\"), fontWeight: fontWeight.medium },\n negative: { color: accentColor(\"info\"), fontWeight: fontWeight.medium },\n muted: { color: semanticColors.content.tertiary, fontWeight: fontWeight.regular },\n },\n groupRow: { background: semanticColors.surface.sunken, color: semanticColors.content.secondary, textVariant: \"label\" as TextVariant },\n /** Indent per sub-row depth level (substitutes under a starter, players under a team). */\n depthIndent: spacing.md,\n headerBand: { color: semanticColors.content.secondary, borderBottom: semanticColors.border.subtle },\n /**\n * Live period (LineScore) and \"my team\" row (MatrixTable). These tables sit on the surface tone, where DataTable's\n * canvas-colored selected row read as a white gap that split the table (2026-10-17 review E17).\n */\n highlight: { background: semanticColors.surface.brand },\n} as const;\n\n/* ---------------------------------------------- Line score ------------------------------------- */\n\nexport type LineScoreTeam = Readonly<{\n id: string;\n name: string;\n /** Runs per period; null = not played yet, \"X\" = home team did not bat in the last inning. */\n periods: readonly (number | \"X\" | null)[];\n /** Totals in display order, e.g. { R: 5, H: 9, E: 0, B: 4 }. */\n totals: Readonly<Record<string, number | null>>;\n}>;\n\nexport type LineScoreColumn = Readonly<{ id: string; header: string; kind: \"period\" | \"total\" }>;\n\n/**\n * Period columns are padded to `minPeriods` (9 innings) and extend for extra innings; totals follow.\n * The current period (live game) is reported so renderers can highlight it.\n */\nexport function resolveLineScore(teams: readonly LineScoreTeam[], options: Readonly<{ minPeriods?: number; totals: readonly string[]; currentPeriod?: number | null }>): Readonly<{ columns: LineScoreColumn[]; currentPeriod: number | null; leaderId: string | null }> {\n if (teams.length < 2) throw new TypeError(\"LineScore needs at least two teams\");\n const ids = new Set<string>();\n for (const team of teams) {\n assertNonEmpty(team.id, \"line score team id\");\n if (ids.has(team.id)) throw new TypeError(`Duplicate LineScore team id: ${team.id}`);\n ids.add(team.id);\n }\n const played = Math.max(...teams.map((team) => team.periods.length));\n const count = Math.max(options.minPeriods ?? 9, played);\n const columns: LineScoreColumn[] = Array.from({ length: count }, (_, i) => ({ id: `p${i + 1}`, header: String(i + 1), kind: \"period\" }));\n for (const total of options.totals) columns.push({ id: `t-${total}`, header: total, kind: \"total\" });\n const runs = options.totals[0];\n let leaderId: string | null = null;\n if (runs) {\n const scores = teams.map((team) => ({ id: team.id, value: team.totals[runs] ?? null }));\n const best = Math.max(...scores.map((score) => score.value ?? -Infinity));\n const leaders = scores.filter((score) => score.value === best && Number.isFinite(best));\n leaderId = leaders.length === 1 ? leaders[0]!.id : null;\n }\n const current = options.currentPeriod ?? null;\n return { columns, currentPeriod: current !== null && current >= 1 && current <= count ? current : null, leaderId };\n}\n\nexport function formatLineScoreCell(value: number | \"X\" | null | undefined): string {\n return value === null || value === undefined ? \"\" : String(value);\n}\n\n/* ---------------------------------------------- Matrix table ----------------------------------- */\n\nexport type MatrixCell = Readonly<{ label: string; tone?: DataTableCellTone | null; heat?: DataTableCellHeat | null }>;\n\n/**\n * Square cross table (team × team head-to-head). Rows and columns share one id list; the diagonal is\n * a self cell and renders blank. `getCell(row, column)` returns null for no record.\n */\nexport function resolveMatrix<Key extends string>(ids: readonly Key[], getCell: (row: Key, column: Key) => MatrixCell | null): readonly (readonly (MatrixCell | \"self\" | null)[])[] {\n if (new Set(ids).size !== ids.length) throw new TypeError(\"Matrix ids must be unique\");\n return ids.map((row) => ids.map((column) => (row === column ? \"self\" : getCell(row, column))));\n}\n\n/* ---------------------------------------------- Comparison table ------------------------------- */\n\nexport type ComparisonRow = Readonly<{\n id: string;\n label: string;\n values: readonly [number | null, number | null];\n /** Display strings; defaults to String(value). */\n display?: readonly [string, string];\n lowerIsBetter?: boolean;\n}>;\n\n/** Which side wins a row (null on ties/missing), and each side's bar share of the pair (0–1). */\nexport function resolveComparisonRow(row: ComparisonRow): Readonly<{ winner: 0 | 1 | null; shares: readonly [number, number] }> {\n const [a, b] = row.values;\n if (a === null || b === null || !Number.isFinite(a) || !Number.isFinite(b)) return { winner: null, shares: [a === null ? 0 : 0.5, b === null ? 0 : 0.5] };\n const winner = a === b ? null : (row.lowerIsBetter ? a < b : a > b) ? 0 : 1;\n // Lower-is-better rows invert the magnitudes so the better side still draws the longer bar.\n const left = Math.abs(row.lowerIsBetter ? b : a), right = Math.abs(row.lowerIsBetter ? a : b), sum = left + right;\n return { winner, shares: sum === 0 ? [0.5, 0.5] : [left / sum, right / sum] };\n}\n\n"]}
@@ -136,7 +136,7 @@ export declare const datePickerRecipe: {
136
136
  alpha?: number;
137
137
  }>;
138
138
  readonly textVariant: "body";
139
- readonly fontWeight: "600";
139
+ readonly fontWeight: "500";
140
140
  };
141
141
  readonly hint: {
142
142
  readonly color: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"design-profile.d.ts","sourceRoot":"","sources":["../src/design-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAc,UAAU,EAAE,OAAO,EAAE,MAAM,EAAc,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE3I,OAAO,EAAwB,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,KAAK,EAAE,uBAAuB,EAAE,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,gBAAgB,CAAC,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IACpI,YAAY,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACnE,YAAY,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACnE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CAC1D,CAAC,CAAC;AAqQH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAY/E,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,KAAK,GAAE,qBAA0B,GAAG,gBAAgB,CAI1F;AAED;;gFAEgF;AAChF,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,eAAe,GAAG,IAAI,CAOjJ"}
@@ -57,7 +57,7 @@ const presetInputs = {
57
57
  },
58
58
  // minimal, editorial and terminal looked alike in light mode (near-white, only terminal's font differed) at the
59
59
  // 2026-10-17 user review. Each now carries its identity through palette, type, elevation and arrangement together.
60
- // minimal: achromatic hairlines on white, no shadow anywhere (overlays rely on their border and scrim), quiet
60
+ // minimal: achromatic hairlines on white, no shadow anywhere (overlays rely on their border and scrim), the shared
61
61
  // medium-weight headings, airy body leading and framed cards for the generous card padding.
62
62
  minimal: {
63
63
  id: "minimal",
@@ -66,13 +66,13 @@ const presetInputs = {
66
66
  dark: { bg: "#101010", surface: "#151515", surfaceAlt: "#1c1c1c", surfaceAccent: "#2a2a2a", border: "#333333", borderControl: "#8f8f8f", primary: "#6e6e6e", contentBrand: "#e2e2e2", text: "#f2f2f2", textBody: "#dedede", textMuted: "#c6c6c6", textSub: "#a3a3a3", textWeak: "#8a8a8a" },
67
67
  },
68
68
  tokens: { radius: { sm: 4, md: 8, lg: 12, xl: 16 }, shadow: { raised: { opacity: 0 }, floating: { opacity: 0 } },
69
- typography: { heading: { fontWeight: fontWeight.medium }, body: { lineHeight: 26 } },
70
- heading: { level1: { fontWeight: fontWeight.medium }, level2: { fontWeight: fontWeight.medium } } },
69
+ typography: { body: { lineHeight: 26 } } },
71
70
  interactions: { contentTransition: "fade", selectionMotion: "none" },
72
71
  compositions: { collection: "cards", toolbar: "inline" }, screens: { overview: "dashboard" },
73
72
  },
74
- // editorial: serif display and reading roles over a warm ink-on-paper palette with a deep wine accent, the largest
75
- // display scale of the presets, flat print corners, and rows, which the shared layout divides with rule lines.
73
+ // editorial: serif display and reading roles over a warm ink-on-paper palette with a deep wine accent, airy body
74
+ // leading, flat print corners, and rows, which the shared layout divides with rule lines. Its enlarged 56/42/30
75
+ // headings were removed with the display tier (2026-10-17 user decision, "큰 글자 정책은 없애").
76
76
  editorial: {
77
77
  id: "editorial",
78
78
  palette: {
@@ -80,19 +80,20 @@ const presetInputs = {
80
80
  dark: { bg: "#14110e", surface: "#1c1814", surfaceAlt: "#26211b", surfaceAccent: "#3f2430", border: "#5e554b", borderControl: "#a3988b", primary: "#ad4566", contentBrand: "#f2b8c9", text: "#f6f0e7", textBody: "#e6ddd1", textMuted: "#cfc4b6", textSub: "#b0a596", textWeak: "#958a7c" },
81
81
  },
82
82
  tokens: { radius: { sm: 0, md: 2, lg: 2, xl: 4 }, fontFamily: { display: serifStack, reading: serifStack }, shadow: { raised: { opacity: 0 } },
83
- typography: { heading: { fontSize: 30, lineHeight: 40, fontWeight: fontWeight.medium }, body: { lineHeight: 26 } },
84
- heading: { level1: { fontSize: 56, lineHeight: 66, fontWeight: fontWeight.medium }, level2: { fontSize: 42, lineHeight: 52, fontWeight: fontWeight.medium } } },
83
+ typography: { body: { lineHeight: 26 } } },
85
84
  interactions: { contentTransition: "rise", selectionMotion: "none" },
86
85
  compositions: { collection: "rows", toolbar: "collapsible" }, screens: { overview: "editorial" },
87
86
  },
88
87
  brutalist: {
89
88
  id: "brutalist",
90
- // level1/2 stay heavy (800) on purpose: the foundation display headings became bold (700) on 2026-10-17,
91
- // but the user kept brutalist at 800 after comparing it in Storybook, because thick borders and hard
92
- // shadows need the heaviest headings to hold their weight. Do not align this with the 700 default.
89
+ // Headings stay heavy (800) on purpose: the foundation headings became lighter on 2026-10-17, but the user
90
+ // kept brutalist at 800 after comparing it in Storybook, because thick borders and hard shadows need the
91
+ // heaviest headings to hold their weight. Do not align this with the 500 default. Only the weight differs:
92
+ // the enlarged 48/38/30 sizes were removed with the display tier the same day ("큰 글자 정책은 없애"), so
93
+ // sizes follow the shared scale. `typography.heading` carries Heading level1–3 through the profile alias.
93
94
  // docs/design-profile.md documents the same exception.
94
95
  palette: { light: { primary: "#171717", contentBrand: "#171717", surfaceAccent: "#e8ed91", border: "#171717" }, dark: { primary: "#727272", contentBrand: "#f0f3a3", surfaceAccent: "#393a1c", border: "#cccccc" } },
95
- tokens: { radius: { sm: 0, md: 0, lg: 0, xl: 0 }, shadow: { raised: { radius: 0, offsetY: 4, opacity: 0.25 }, floating: { radius: 0, offsetY: 6, opacity: 0.3 } }, typography: { heading: { fontSize: 30, lineHeight: 38, fontWeight: fontWeight.heavy } }, heading: { level1: { fontSize: 48, lineHeight: 56, fontWeight: fontWeight.heavy }, level2: { fontSize: 38, lineHeight: 46, fontWeight: fontWeight.heavy } } },
96
+ tokens: { radius: { sm: 0, md: 0, lg: 0, xl: 0 }, shadow: { raised: { radius: 0, offsetY: 4, opacity: 0.25 }, floating: { radius: 0, offsetY: 6, opacity: 0.3 } }, typography: { heading: { fontWeight: fontWeight.heavy } } },
96
97
  interactions: { contentTransition: "slide", selectionMotion: "none" },
97
98
  compositions: { collection: "cards", toolbar: "inline" }, screens: { overview: "editorial" },
98
99
  },
@@ -172,10 +173,10 @@ function merge(base, input) {
172
173
  };
173
174
  // fromEntries loses fixed keys; iteration over the complete base preserves every role.
174
175
  const type = Object.fromEntries(Object.entries(base.tokens.typography).map(([key, value]) => [key, { ...value, ...input.tokens?.typography?.[key] }]));
175
- // Display levels need their own roles: deriving them from body text would erase
176
- // the hierarchy. Keep the original level3–5 typography aliases, with explicit
177
- // heading overrides last, and preserve inherited heading values on empty input.
178
- const aliases = { level3: "heading", level4: "titleLarge", level5: "title" };
176
+ // Every heading level follows a typography role, with explicit heading overrides last, and preserves
177
+ // inherited heading values on empty input. Deprecated level1/2 follow `heading` like level3 since the
178
+ // display tier was removed (2026-10-17 user decision, "큰 글자 정책은 없애").
179
+ const aliases = { level1: "heading", level2: "heading", level3: "heading", level4: "titleLarge", level5: "title" };
179
180
  for (const key of Object.keys(input.tokens?.heading ?? {})) {
180
181
  if (!Object.prototype.hasOwnProperty.call(heading, key))
181
182
  throw new TypeError("Unsupported design profile heading level");
@@ -230,8 +231,10 @@ function merge(base, input) {
230
231
  // Circles/pills retain their semantic geometry; product corners apply to other roles.
231
232
  if (profile.tokens.radius.full !== radius.full)
232
233
  throw new RangeError("Design profile must preserve full radius");
234
+ // No profile may enlarge text past the HJM ceiling, `typography.heading` (2026-10-17 user decision, "글자 너무 커",
235
+ // "큰 글자 정책은 없애"). Before, up to 96 was allowed and presets drew 30–56px headings.
233
236
  for (const value of [...Object.values(type), ...Object.values(headings)]) {
234
- if (!Number.isFinite(value.fontSize) || value.fontSize < 11 || value.fontSize > 96 || !Number.isFinite(value.lineHeight) || value.lineHeight < value.fontSize || value.lineHeight > 144)
237
+ if (!Number.isFinite(value.fontSize) || value.fontSize < 11 || value.fontSize > typography.heading.fontSize || !Number.isFinite(value.lineHeight) || value.lineHeight < value.fontSize || value.lineHeight > 144)
235
238
  throw new RangeError("Invalid design profile typography");
236
239
  choose(value.fontWeight, ["400", "500", "600", "700", "800"], "fontWeight");
237
240
  }