@hjmds/design-contracts 1.27.1 → 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 (155) 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 +9 -1
  9. package/dist/base-recipes.d.ts.map +1 -1
  10. package/dist/base-recipes.js +7 -1
  11. package/dist/base-recipes.js.map +1 -1
  12. package/dist/behaviors.d.ts +1 -1
  13. package/dist/breadcrumb.d.ts +1 -1
  14. package/dist/breadcrumb.js +1 -1
  15. package/dist/breadcrumb.js.map +1 -1
  16. package/dist/calendar.d.ts +1 -1
  17. package/dist/calendar.js +2 -2
  18. package/dist/calendar.js.map +1 -1
  19. package/dist/catalog.d.ts +148 -89
  20. package/dist/catalog.d.ts.map +1 -1
  21. package/dist/component-contracts.d.ts +1 -1
  22. package/dist/component-contracts.js +1 -1
  23. package/dist/component-contracts.js.map +1 -1
  24. package/dist/component-recipes.d.ts +105 -60
  25. package/dist/component-recipes.d.ts.map +1 -1
  26. package/dist/component-recipes.js +138 -69
  27. package/dist/component-recipes.js.map +1 -1
  28. package/dist/conversation-row.d.ts +2 -2
  29. package/dist/conversation-row.d.ts.map +1 -1
  30. package/dist/conversation-row.js +6 -4
  31. package/dist/conversation-row.js.map +1 -1
  32. package/dist/counter-badge-recipe.d.ts +1 -1
  33. package/dist/counter-badge-recipe.js +1 -1
  34. package/dist/counter-badge-recipe.js.map +1 -1
  35. package/dist/data-table.d.ts +4 -4
  36. package/dist/data-table.js +4 -4
  37. package/dist/data-table.js.map +1 -1
  38. package/dist/date-picker.d.ts +1 -1
  39. package/dist/design-profile.d.ts.map +1 -1
  40. package/dist/design-profile.js +19 -16
  41. package/dist/design-profile.js.map +1 -1
  42. package/dist/file-picker.d.ts +1 -1
  43. package/dist/file-picker.js +1 -1
  44. package/dist/file-picker.js.map +1 -1
  45. package/dist/foundations.d.ts +18 -14
  46. package/dist/foundations.d.ts.map +1 -1
  47. package/dist/foundations.js +18 -13
  48. package/dist/foundations.js.map +1 -1
  49. package/dist/heading.d.ts +13 -13
  50. package/dist/heading.js.map +1 -1
  51. package/dist/icon-button-recipe.d.ts +23 -0
  52. package/dist/icon-button-recipe.d.ts.map +1 -1
  53. package/dist/icon-button-recipe.js +20 -1
  54. package/dist/icon-button-recipe.js.map +1 -1
  55. package/dist/number-field.d.ts +1 -1
  56. package/dist/otp-field.d.ts +1 -1
  57. package/dist/password-field.d.ts +1 -1
  58. package/dist/result.d.ts +1 -1
  59. package/dist/result.js +2 -2
  60. package/dist/result.js.map +1 -1
  61. package/dist/screen-patterns.d.ts +12 -1
  62. package/dist/screen-patterns.d.ts.map +1 -1
  63. package/dist/screen-patterns.js +12 -1
  64. package/dist/screen-patterns.js.map +1 -1
  65. package/dist/semantic-colors.d.ts +10 -0
  66. package/dist/semantic-colors.d.ts.map +1 -1
  67. package/dist/semantic-colors.js +6 -0
  68. package/dist/semantic-colors.js.map +1 -1
  69. package/dist/sheet.d.ts +7 -4
  70. package/dist/sheet.d.ts.map +1 -1
  71. package/dist/sheet.js +8 -5
  72. package/dist/sheet.js.map +1 -1
  73. package/dist/side-panel.d.ts +1 -1
  74. package/dist/side-panel.js +2 -2
  75. package/dist/side-panel.js.map +1 -1
  76. package/dist/steps.d.ts +1 -1
  77. package/dist/steps.js +1 -1
  78. package/dist/steps.js.map +1 -1
  79. package/dist/tag.d.ts +1 -1
  80. package/dist/tag.js +1 -1
  81. package/dist/tag.js.map +1 -1
  82. package/dist/timeline.d.ts +1 -1
  83. package/dist/timeline.js +1 -1
  84. package/dist/timeline.js.map +1 -1
  85. package/dist/top.d.ts +4 -4
  86. package/dist/top.d.ts.map +1 -1
  87. package/dist/top.js +3 -1
  88. package/dist/top.js.map +1 -1
  89. package/dist/version.d.ts +1 -1
  90. package/dist/version.js +1 -1
  91. package/dist/version.js.map +1 -1
  92. package/docs/activity-chip.md +5 -1
  93. package/docs/auth-screen.md +2 -0
  94. package/docs/design-profile.md +14 -10
  95. package/docs/generated/component-maturity.md +1 -1
  96. package/docs/generated/renderer-evidence.json +9 -5
  97. package/docs/generated/renderer-evidence.md +1 -1
  98. package/docs/generated/showcase-manifest.json +1 -1
  99. package/docs/heading.md +14 -9
  100. package/docs/sheet.md +2 -0
  101. package/docs/top.md +4 -3
  102. package/docs/usage/README.md +1 -1
  103. package/docs/usage/components/auth-screen-layout.md +26 -9
  104. package/docs/usage/components/bottom-cta.md +6 -2
  105. package/docs/usage/components/bottom-navigation.md +5 -1
  106. package/docs/usage/components/breadcrumb.md +5 -1
  107. package/docs/usage/components/button.md +2 -0
  108. package/docs/usage/components/chat-message.md +6 -2
  109. package/docs/usage/components/checkbox-group.md +5 -1
  110. package/docs/usage/components/collapsible.md +1 -0
  111. package/docs/usage/components/comment-thread-row.md +1 -1
  112. package/docs/usage/components/effect-surface.md +2 -2
  113. package/docs/usage/components/heading.md +14 -12
  114. package/docs/usage/components/icon-button.md +5 -0
  115. package/docs/usage/components/inline-edit.md +1 -1
  116. package/docs/usage/components/list-detail-screen.md +1 -1
  117. package/docs/usage/components/list-row.md +23 -11
  118. package/docs/usage/components/list.md +10 -5
  119. package/docs/usage/components/notice.md +5 -1
  120. package/docs/usage/components/notification-item.md +5 -1
  121. package/docs/usage/components/photo-source-sheet.md +1 -1
  122. package/docs/usage/components/repeatable-field-group.md +1 -1
  123. package/docs/usage/components/saved-items-screen.md +1 -1
  124. package/docs/usage/components/screen-layout.md +10 -6
  125. package/docs/usage/components/search-screen.md +2 -2
  126. package/docs/usage/components/section.md +5 -1
  127. package/docs/usage/components/segmented-control.md +1 -1
  128. package/docs/usage/components/sheet.md +17 -13
  129. package/docs/usage/components/skeleton.md +41 -15
  130. package/docs/usage/components/statistic.md +5 -1
  131. package/docs/usage/components/switch.md +3 -2
  132. package/docs/usage/components/table-column-settings.md +1 -1
  133. package/docs/usage/components/tag.md +5 -1
  134. package/docs/usage/components/text.md +6 -4
  135. package/docs/usage/components/timeline.md +5 -1
  136. package/docs/usage/components/toast.md +10 -1
  137. package/docs/usage/components/top-bar.md +5 -1
  138. package/docs/usage/components/top.md +1 -1
  139. package/docs/usage/components/upload-item.md +1 -1
  140. package/docs/usage/compositions/adaptive-content.md +5 -1
  141. package/docs/usage/compositions/compound-controls.md +2 -1
  142. package/docs/usage/compositions/design-profile-comparison.md +1 -1
  143. package/docs/usage/compositions/family-drawer.md +5 -3
  144. package/docs/usage/compositions/input-sheet.md +1 -1
  145. package/docs/usage/compositions/interaction-flow-apply.md +3 -3
  146. package/docs/usage/compositions/photo-source.md +3 -3
  147. package/docs/usage/compositions/selection-motion.md +5 -1
  148. package/docs/usage/compositions/toast-layout.md +4 -4
  149. package/docs/usage/compositions/visual-foundations.md +5 -4
  150. package/docs/usage/screens/common-login.md +9 -7
  151. package/docs/usage/screens/common-search.md +1 -1
  152. package/docs/usage/screens/landing.md +15 -14
  153. package/docs/usage/screens/notification-settings.md +4 -2
  154. package/docs/usage/tokens/typography.md +21 -13
  155. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"foundations.js","sourceRoot":"","sources":["../src/foundations.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,CAAC;IACN,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,EAAE;CACA,CAAC;AAEX,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EA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AG,iBAAiB,OAAO,CAAC,KAAK,GAAG,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC;KACX;CACO,CAAC","sourcesContent":["/** Numeric units are consumed as CSS pixels on web and density-independent points on native. */\nexport const spacing = {\n xxs: 4,\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n xxl: 32,\n xxxl: 40,\n} as const;\n\nexport const radius = {\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n full: 999,\n} as const;\n\n/**\n * Ordered fallbacks keep the contract platform-neutral: Web renderers join\n * the list as a CSS stack, while native renderers request the first named\n * family (or their OS default mapping), rather than receiving a CSS stack.\n */\nexport const fontFamily = {\n // Pretendard is bundled by HJM (Web `@hjmds/react/fonts/pretendard.css`, Native `@hjmds/react-native/fonts`)\n // so every device renders the same face (2026-10-17: Inter/Pretendard were listed but never loaded, so the\n // result depended on what each device had installed). System fonts remain the fallback until it loads.\n ui: [\n \"Pretendard Variable\",\n \"Pretendard\",\n \"-apple-system\",\n \"BlinkMacSystemFont\",\n \"Segoe UI\",\n \"sans-serif\",\n ],\n // Chrome ignores ui-monospace and cannot address SF Mono as \"SFMono-Regular\", so name the macOS/\n // Windows monospace faces before the generic fallback (2026-10-17: Chrome rendered code in Courier).\n code: [\n \"ui-monospace\",\n \"SFMono-Regular\",\n \"SF Mono\",\n \"Menlo\",\n \"Monaco\",\n \"Cascadia Mono\",\n \"Consolas\",\n \"Liberation Mono\",\n \"monospace\",\n ],\n} as const;\n\nexport type FontFamily = keyof typeof fontFamily;\n\n/**\n * Native has no variable-weight selection on every platform, so each weight is its own registered face.\n * Keys match the asset map exported by `@hjmds/react-native/fonts`; 400 doubles as the family name inputs use.\n */\nexport const pretendardNativeFaces = {\n \"400\": \"Pretendard\",\n \"500\": \"Pretendard-Medium\",\n \"600\": \"Pretendard-SemiBold\",\n \"700\": \"Pretendard-Bold\",\n \"800\": \"Pretendard-ExtraBold\",\n} as const;\n\n/** Nearest bundled face for a CSS/RN font weight (\"normal\", \"bold\", 100–900). */\nexport function resolvePretendardNativeFace(weight: string | number | undefined): (typeof pretendardNativeFaces)[keyof typeof pretendardNativeFaces] {\n const numeric = weight === undefined || weight === \"normal\" ? 400 : weight === \"bold\" ? 700 : Number(weight);\n const steps = [400, 500, 600, 700, 800] as const;\n const nearest = Number.isFinite(numeric) ? steps.reduce((best, step) => Math.abs(step - numeric) < Math.abs(best - numeric) ? step : best, 400) : 400;\n return pretendardNativeFaces[String(nearest) as keyof typeof pretendardNativeFaces];\n}\n\n/** Display/reading roles are optional so existing ui/code product profiles retain their fonts. */\nexport type FontRole = \"ui\" | \"display\" | \"reading\" | \"code\";\nexport type FontFamilyRoles = Readonly<{ ui: readonly string[]; code: readonly string[]; display?: readonly string[]; reading?: readonly string[] }>;\n\nexport function resolveFontFamilyStack(families: FontFamilyRoles, role: FontRole): readonly string[] {\n if (![\"ui\", \"display\", \"reading\", \"code\"].includes(role)) throw new TypeError(\"Unsupported font role\");\n // Unspecified reading/display follow the current ui stack, rather than a\n // frozen neutral stack that would silently undo an app's existing ui override.\n return families[role] ?? families.ui;\n}\n\n\n/** String weights translate unchanged to CSS and React Native text styles. */\nexport const fontWeight = {\n regular: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n heavy: \"800\",\n} as const;\n\nexport type FontWeight = keyof typeof fontWeight;\nexport type FontWeightValue = (typeof fontWeight)[FontWeight];\n\n/** Numeric tracking uses CSS pixels on Web and density-independent points on Native. */\nexport const letterSpacing = {\n tight: -0.2,\n normal: 0,\n wide: 0.2,\n} as const;\n\nexport type LetterSpacing = keyof typeof letterSpacing;\n\n/** Renderers map the shared intent to `font-variant-numeric` / `fontVariant`. */\nexport const numeric = {\n proportional: \"proportional-nums\",\n tabular: \"tabular-nums\",\n} as const;\n\nexport type NumericVariant = keyof typeof numeric;\n\nexport const typography = {\n caption: { fontSize: 11, lineHeight: 16, fontWeight: fontWeight.regular },\n // Label (form labels, section subtitles) sits between body 400 and titles 600: at 600 it competed with\n // titles, and Text rendered it 400 outside a profile, too weak against body (2026-10-17 user decision).\n label: { fontSize: 12, lineHeight: 18, fontWeight: fontWeight.medium },\n body: { fontSize: 14, lineHeight: 20, fontWeight: fontWeight.regular },\n bodyLarge: { fontSize: 16, lineHeight: 24, fontWeight: fontWeight.regular },\n // Title steps are semibold (2026-10-17 user review: 800, then 700, still read too heavy on route\n // titles). Display levels 1–2 are bold, see `heading`.\n title: { fontSize: 18, lineHeight: 26, fontWeight: fontWeight.semibold },\n titleLarge: { fontSize: 20, lineHeight: 28, fontWeight: fontWeight.semibold },\n heading: { fontSize: 24, lineHeight: 32, fontWeight: fontWeight.semibold },\n} as const;\n\nexport type TextVariant = keyof typeof typography;\n\n/** Visual variants choose a default family role; semantics and sizes remain independent. */\nexport function resolveTextFontRole(variant: TextVariant, role?: FontRole): FontRole {\n if (role !== undefined) {\n if (![\"ui\", \"display\", \"reading\", \"code\"].includes(role)) throw new TypeError(\"Unsupported font role\");\n return role;\n }\n if (variant === \"body\" || variant === \"bodyLarge\") return \"reading\";\n if (variant === \"title\" || variant === \"titleLarge\" || variant === \"heading\") return \"display\";\n return \"ui\";\n}\n\n\n/**\n * Document heading hierarchy without widening the established `TextVariant`\n * union. Levels 3–5 reuse the existing semantic styles; larger levels are\n * additive display roles for dense product pages and documentation.\n */\nexport const heading = {\n // Bold, not heavy: Pretendard 800 read heavy and rough at 32–40px (2026-10-17 user decision), while\n // staying one step above the semibold title levels 3–5.\n level1: { fontSize: 40, lineHeight: 48, fontWeight: fontWeight.bold },\n level2: { fontSize: 32, lineHeight: 40, fontWeight: fontWeight.bold },\n level3: typography.heading,\n level4: typography.titleLarge,\n level5: typography.title,\n} as const;\n\nexport type HeadingLevel = keyof typeof heading;\n\n/** Glyphs include icons and avatars; they do not inherit paragraph line-height. */\nexport const glyph = {\n xs: 14,\n sm: 20,\n md: 24,\n lg: 28,\n xl: 32,\n xxl: 44,\n xxxl: 48,\n} as const;\n\nexport type GlyphSize = keyof typeof glyph;\n\nexport const motion = {\n fast: 120,\n normal: 200,\n slow: 320,\n} as const;\n\n/**\n * Curves are stored as normalized cubic-bezier tuples so CSS and native\n * animation drivers can translate the same motion intent without sharing a\n * renderer dependency.\n */\nexport const easing = {\n standard: [0.2, 0, 0, 1],\n enter: [0, 0, 0, 1],\n exit: [0.3, 0, 1, 1],\n emphasized: [0.2, 0, 0, 1],\n} as const;\n\nexport type ReducedMotionBehavior = \"instant\" | \"opacity\" | \"static\";\n\n/** Shared transition intent; renderers translate easing tuples to their animation API. */\nexport const motionPreset = {\n micro: {\n duration: motion.fast,\n easing: \"standard\",\n reducedMotion: \"instant\",\n },\n enter: {\n duration: motion.normal,\n easing: \"enter\",\n reducedMotion: \"opacity\",\n },\n exit: {\n duration: motion.fast,\n easing: \"exit\",\n reducedMotion: \"instant\",\n },\n context: {\n duration: motion.slow,\n easing: \"emphasized\",\n reducedMotion: \"opacity\",\n },\n} as const satisfies Record<\n \"micro\" | \"enter\" | \"exit\" | \"context\",\n {\n duration: number;\n easing: keyof typeof easing;\n reducedMotion: ReducedMotionBehavior;\n }\n>;\n\n/** Native renderers may use these values directly; web renderers use easing. */\nexport const spring = {\n responsive: { stiffness: 760, damping: 52, mass: 1 },\n expressive: { stiffness: 520, damping: 38, mass: 1 },\n} as const;\n\n/** Reusable state strengths. Components still decide which states are valid. */\nexport const opacity = {\n disabled: 0.5,\n muted: 0.72,\n pressed: 0.86,\n dragged: 0.64,\n} as const;\n\n/** Overlaying the content color at these strengths creates predictable states. */\nexport const stateLayer = {\n hover: 0.06,\n focus: 0.08,\n pressed: 0.1,\n selected: 0.1,\n} as const;\n\nexport const stroke = {\n subtle: 1,\n default: 1,\n strong: 2,\n focus: 2,\n} as const;\n\nexport const control = {\n minTouchTarget: 44,\n buttonHeight: {\n small: 36,\n medium: 44,\n large: 52,\n },\n buttonHitSlop: {\n small: 4,\n medium: 0,\n large: 0,\n },\n fieldHeight: 44,\n chipHeight: {\n small: 36,\n medium: 44,\n },\n selectionIndicator: 24,\n} as const;\n\n/**\n * Font scale at which components switch to a large-text layout. One decision,\n * previously two literals in `segmentedControlRecipe` and `topBarRecipe`; see\n * issue #20 for why it sits with the tokens instead of beside the scale axis.\n */\nexport const largeTextThreshold = 1.6;\n\n/** Product renderers may narrow these widths, but should not invent new rhythm. */\nexport const layout = {\n pagePadding: {\n compact: spacing.md,\n regular: spacing.lg,\n spacious: spacing.xl,\n },\n sectionGap: spacing.xl,\n contentGap: spacing.md,\n rowHeight: {\n singleLine: 56,\n twoLine: 68,\n },\n readingMaxWidth: 720,\n contentMaxWidth: 1200,\n} as const;\n\n/** Width thresholds use CSS pixels on Web and density-independent points on Native. */\nexport const breakpoint = {\n compact: 0,\n medium: 600,\n expanded: 960,\n wide: 1280,\n} as const;\n\n/** Shared stacking intent. Values remain sparse to leave room for app layers. */\nexport const layer = {\n base: 0,\n sticky: 100,\n dropdown: 400,\n overlay: 800,\n modal: 900,\n tooltip: 950,\n toast: 1000,\n} as const;\n\nexport const overlay = {\n scrim: 0.6,\n veil: 0.25,\n} as const;\n\nexport type BackdropReference = Readonly<{\n color: \"#000000\";\n opacity: number;\n}>;\n\n/** Fixed backdrop contracts avoid renderer-specific names such as CSS `scrim`. */\nexport const backdrop = {\n modal: { color: \"#000000\", opacity: overlay.scrim },\n veil: { color: \"#000000\", opacity: overlay.veil },\n} as const satisfies Record<\"modal\" | \"veil\", BackdropReference>;\n\nexport const scrim = `rgba(0, 0, 0, ${overlay.scrim})`;\n\n/** Renderers translate this contract to box-shadow or native shadow/elevation properties. */\nexport const shadow = {\n raised: {\n color: \"#000000\",\n opacity: 0.08,\n radius: 4,\n offsetY: 1,\n },\n floating: {\n color: \"#000000\",\n opacity: 0.12,\n radius: 12,\n offsetY: 4,\n },\n overlay: {\n color: \"#000000\",\n opacity: 0.16,\n radius: 24,\n offsetY: 8,\n },\n} as const;\n"]}
1
+ {"version":3,"file":"foundations.js","sourceRoot":"","sources":["../src/foundations.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,EAAE,CAAC;IACN,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,EAAE;CACA,CAAC;AAEX,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,IAAI,EAAE,GAAG;CACD,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,6GAA6G;IAC7G,2GAA2G;IAC3G,uGAAuG;IACvG,EAAE,EAAE;QACF,qBAAqB;QACrB,YAAY;QACZ,eAAe;QACf,oBAAoB;QACpB,UAAU;QACV,YAAY;KACb;IACD,iGAAiG;IACjG,qGAAqG;IACrG,IAAI,EAAE;QACJ,cAAc;QACd,gBAAgB;QAChB,SAAS;QACT,OAAO;QACP,QAAQ;QACR,eAAe;QACf,UAAU;QACV,iBAAiB;QACjB,WAAW;KACZ;CACO,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,mBAAmB;IA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AAE,IAAI;CACF,CAAC;AAEX,iFAAiF;AACjF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,GAAG;IACb,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,IAAI;CACH,CAAC;AAEX,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,IAAI;CACF,CAAC;AAOX,kFAAkF;AAClF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE;IACnD,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,EAAE;CACa,CAAC;AAEjE,MAAM,CAAC,MAAM,KAAK,GAAG,iBAAiB,OAAO,CAAC,KAAK,GAAG,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,CAAC;QACT,OAAO,EAAE,CAAC;KACX;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC;KACX;IACD,OAAO,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC;KACX;CACO,CAAC","sourcesContent":["/** Numeric units are consumed as CSS pixels on web and density-independent points on native. */\nexport const spacing = {\n xxs: 4,\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n xxl: 32,\n xxxl: 40,\n} as const;\n\nexport const radius = {\n sm: 8,\n md: 12,\n lg: 16,\n xl: 24,\n full: 999,\n} as const;\n\n/**\n * Ordered fallbacks keep the contract platform-neutral: Web renderers join\n * the list as a CSS stack, while native renderers request the first named\n * family (or their OS default mapping), rather than receiving a CSS stack.\n */\nexport const fontFamily = {\n // Pretendard is bundled by HJM (Web `@hjmds/react/fonts/pretendard.css`, Native `@hjmds/react-native/fonts`)\n // so every device renders the same face (2026-10-17: Inter/Pretendard were listed but never loaded, so the\n // result depended on what each device had installed). System fonts remain the fallback until it loads.\n ui: [\n \"Pretendard Variable\",\n \"Pretendard\",\n \"-apple-system\",\n \"BlinkMacSystemFont\",\n \"Segoe UI\",\n \"sans-serif\",\n ],\n // Chrome ignores ui-monospace and cannot address SF Mono as \"SFMono-Regular\", so name the macOS/\n // Windows monospace faces before the generic fallback (2026-10-17: Chrome rendered code in Courier).\n code: [\n \"ui-monospace\",\n \"SFMono-Regular\",\n \"SF Mono\",\n \"Menlo\",\n \"Monaco\",\n \"Cascadia Mono\",\n \"Consolas\",\n \"Liberation Mono\",\n \"monospace\",\n ],\n} as const;\n\nexport type FontFamily = keyof typeof fontFamily;\n\n/**\n * Native has no variable-weight selection on every platform, so each weight is its own registered face.\n * Keys match the asset map exported by `@hjmds/react-native/fonts`; 400 doubles as the family name inputs use.\n */\nexport const pretendardNativeFaces = {\n \"400\": \"Pretendard\",\n \"500\": \"Pretendard-Medium\",\n \"600\": \"Pretendard-SemiBold\",\n \"700\": \"Pretendard-Bold\",\n \"800\": \"Pretendard-ExtraBold\",\n} as const;\n\n/** Nearest bundled face for a CSS/RN font weight (\"normal\", \"bold\", 100–900). */\nexport function resolvePretendardNativeFace(weight: string | number | undefined): (typeof pretendardNativeFaces)[keyof typeof pretendardNativeFaces] {\n const numeric = weight === undefined || weight === \"normal\" ? 400 : weight === \"bold\" ? 700 : Number(weight);\n const steps = [400, 500, 600, 700, 800] as const;\n const nearest = Number.isFinite(numeric) ? steps.reduce((best, step) => Math.abs(step - numeric) < Math.abs(best - numeric) ? step : best, 400) : 400;\n return pretendardNativeFaces[String(nearest) as keyof typeof pretendardNativeFaces];\n}\n\n/** Display/reading roles are optional so existing ui/code product profiles retain their fonts. */\nexport type FontRole = \"ui\" | \"display\" | \"reading\" | \"code\";\nexport type FontFamilyRoles = Readonly<{ ui: readonly string[]; code: readonly string[]; display?: readonly string[]; reading?: readonly string[] }>;\n\nexport function resolveFontFamilyStack(families: FontFamilyRoles, role: FontRole): readonly string[] {\n if (![\"ui\", \"display\", \"reading\", \"code\"].includes(role)) throw new TypeError(\"Unsupported font role\");\n // Unspecified reading/display follow the current ui stack, rather than a\n // frozen neutral stack that would silently undo an app's existing ui override.\n return families[role] ?? families.ui;\n}\n\n\n/** String weights translate unchanged to CSS and React Native text styles. */\nexport const fontWeight = {\n regular: \"400\",\n medium: \"500\",\n semibold: \"600\",\n bold: \"700\",\n heavy: \"800\",\n} as const;\n\nexport type FontWeight = keyof typeof fontWeight;\nexport type FontWeightValue = (typeof fontWeight)[FontWeight];\n\n/** Numeric tracking uses CSS pixels on Web and density-independent points on Native. */\nexport const letterSpacing = {\n tight: -0.2,\n normal: 0,\n wide: 0.2,\n} as const;\n\nexport type LetterSpacing = keyof typeof letterSpacing;\n\n/** Renderers map the shared intent to `font-variant-numeric` / `fontVariant`. */\nexport const numeric = {\n proportional: \"proportional-nums\",\n tabular: \"tabular-nums\",\n} as const;\n\nexport type NumericVariant = keyof typeof numeric;\n\nexport const typography = {\n caption: { fontSize: 11, lineHeight: 16, fontWeight: fontWeight.regular },\n // Label (form labels, section subtitles) stays 500 between body 400 and the titles: at 600 it competed\n // with titles, and Text rendered it 400 outside a profile, too weak against body (2026-10-17 user decision).\n label: { fontSize: 12, lineHeight: 18, fontWeight: fontWeight.medium },\n body: { fontSize: 14, lineHeight: 20, fontWeight: fontWeight.regular },\n bodyLarge: { fontSize: 16, lineHeight: 24, fontWeight: fontWeight.regular },\n // Title steps are medium (2026-10-17 user review: 800, then 700, then 600 still read too heavy —\n // \"굵기 좀더 줄여\").\n title: { fontSize: 18, lineHeight: 26, fontWeight: fontWeight.medium },\n titleLarge: { fontSize: 20, lineHeight: 28, fontWeight: fontWeight.medium },\n // `heading` is the largest text HJM draws. 2026-10-17 user decision (\"글자 너무 커\", \"큰 글자 정책은 없애\"):\n // the 40/32 display tier looked far too big on the service-intro screen and was removed; design profiles\n // reject any type step above this size (design-profile.ts `merge`).\n heading: { fontSize: 24, lineHeight: 32, fontWeight: fontWeight.medium },\n} as const;\n\nexport type TextVariant = keyof typeof typography;\n\n/** Visual variants choose a default family role; semantics and sizes remain independent. */\nexport function resolveTextFontRole(variant: TextVariant, role?: FontRole): FontRole {\n if (role !== undefined) {\n if (![\"ui\", \"display\", \"reading\", \"code\"].includes(role)) throw new TypeError(\"Unsupported font role\");\n return role;\n }\n if (variant === \"body\" || variant === \"bodyLarge\") return \"reading\";\n if (variant === \"title\" || variant === \"titleLarge\" || variant === \"heading\") return \"display\";\n return \"ui\";\n}\n\n\n/**\n * Document heading hierarchy without widening the established `TextVariant`\n * union. Every level reuses a semantic text style, so no heading exceeds `typography.heading`.\n */\nexport const heading = {\n /**\n * @deprecated Same as `level3` since the display tier was removed (2026-10-17 user decision, \"큰 글자\n * 정책은 없애\"; it was 40/48/600). Kept so existing consumers keep compiling; use `level3`.\n */\n level1: typography.heading,\n /** @deprecated Same as `level3` since the display tier was removed (was 32/40/600); use `level3`. */\n level2: typography.heading,\n level3: typography.heading,\n level4: typography.titleLarge,\n level5: typography.title,\n} as const;\n\nexport type HeadingLevel = keyof typeof heading;\n\n/** Glyphs include icons and avatars; they do not inherit paragraph line-height. */\nexport const glyph = {\n xs: 14,\n sm: 20,\n md: 24,\n lg: 28,\n xl: 32,\n xxl: 44,\n xxxl: 48,\n} as const;\n\nexport type GlyphSize = keyof typeof glyph;\n\nexport const motion = {\n fast: 120,\n normal: 200,\n slow: 320,\n} as const;\n\n/**\n * Curves are stored as normalized cubic-bezier tuples so CSS and native\n * animation drivers can translate the same motion intent without sharing a\n * renderer dependency.\n */\nexport const easing = {\n standard: [0.2, 0, 0, 1],\n enter: [0, 0, 0, 1],\n exit: [0.3, 0, 1, 1],\n emphasized: [0.2, 0, 0, 1],\n} as const;\n\nexport type ReducedMotionBehavior = \"instant\" | \"opacity\" | \"static\";\n\n/** Shared transition intent; renderers translate easing tuples to their animation API. */\nexport const motionPreset = {\n micro: {\n duration: motion.fast,\n easing: \"standard\",\n reducedMotion: \"instant\",\n },\n enter: {\n duration: motion.normal,\n easing: \"enter\",\n reducedMotion: \"opacity\",\n },\n exit: {\n duration: motion.fast,\n easing: \"exit\",\n reducedMotion: \"instant\",\n },\n context: {\n duration: motion.slow,\n easing: \"emphasized\",\n reducedMotion: \"opacity\",\n },\n} as const satisfies Record<\n \"micro\" | \"enter\" | \"exit\" | \"context\",\n {\n duration: number;\n easing: keyof typeof easing;\n reducedMotion: ReducedMotionBehavior;\n }\n>;\n\n/** Native renderers may use these values directly; web renderers use easing. */\nexport const spring = {\n responsive: { stiffness: 760, damping: 52, mass: 1 },\n expressive: { stiffness: 520, damping: 38, mass: 1 },\n} as const;\n\n/** Reusable state strengths. Components still decide which states are valid. */\nexport const opacity = {\n disabled: 0.5,\n muted: 0.72,\n pressed: 0.86,\n dragged: 0.64,\n} as const;\n\n/** Overlaying the content color at these strengths creates predictable states. */\nexport const stateLayer = {\n hover: 0.06,\n focus: 0.08,\n pressed: 0.1,\n selected: 0.1,\n} as const;\n\nexport const stroke = {\n subtle: 1,\n default: 1,\n strong: 2,\n focus: 2,\n} as const;\n\nexport const control = {\n minTouchTarget: 44,\n buttonHeight: {\n small: 36,\n medium: 44,\n large: 52,\n },\n buttonHitSlop: {\n small: 4,\n medium: 0,\n large: 0,\n },\n fieldHeight: 44,\n chipHeight: {\n small: 36,\n medium: 44,\n },\n selectionIndicator: 24,\n} as const;\n\n/**\n * Font scale at which components switch to a large-text layout. One decision,\n * previously two literals in `segmentedControlRecipe` and `topBarRecipe`; see\n * issue #20 for why it sits with the tokens instead of beside the scale axis.\n */\nexport const largeTextThreshold = 1.6;\n\n/** Product renderers may narrow these widths, but should not invent new rhythm. */\nexport const layout = {\n pagePadding: {\n compact: spacing.md,\n regular: spacing.lg,\n spacious: spacing.xl,\n },\n sectionGap: spacing.xl,\n contentGap: spacing.md,\n rowHeight: {\n singleLine: 56,\n twoLine: 68,\n },\n readingMaxWidth: 720,\n contentMaxWidth: 1200,\n} as const;\n\n/** Width thresholds use CSS pixels on Web and density-independent points on Native. */\nexport const breakpoint = {\n compact: 0,\n medium: 600,\n expanded: 960,\n wide: 1280,\n} as const;\n\n/** Shared stacking intent. Values remain sparse to leave room for app layers. */\nexport const layer = {\n base: 0,\n sticky: 100,\n dropdown: 400,\n overlay: 800,\n modal: 900,\n tooltip: 950,\n toast: 1000,\n} as const;\n\nexport const overlay = {\n scrim: 0.6,\n veil: 0.25,\n} as const;\n\nexport type BackdropReference = Readonly<{\n color: \"#000000\";\n opacity: number;\n}>;\n\n/** Fixed backdrop contracts avoid renderer-specific names such as CSS `scrim`. */\nexport const backdrop = {\n modal: { color: \"#000000\", opacity: overlay.scrim },\n veil: { color: \"#000000\", opacity: overlay.veil },\n} as const satisfies Record<\"modal\" | \"veil\", BackdropReference>;\n\nexport const scrim = `rgba(0, 0, 0, ${overlay.scrim})`;\n\n/** Renderers translate this contract to box-shadow or native shadow/elevation properties. */\nexport const shadow = {\n raised: {\n color: \"#000000\",\n opacity: 0.08,\n radius: 4,\n offsetY: 1,\n },\n floating: {\n color: \"#000000\",\n opacity: 0.12,\n radius: 12,\n offsetY: 4,\n },\n overlay: {\n color: \"#000000\",\n opacity: 0.16,\n radius: 24,\n offsetY: 8,\n },\n} as const;\n"]}
package/dist/heading.d.ts CHANGED
@@ -2,10 +2,10 @@ import { type HeadingLevel } from "./foundations.js";
2
2
  /**
3
3
  * 문서 제목 단계를 실제로 그리는 primitive다.
4
4
  *
5
- * `heading`(foundations)에는 이미 level1 40px부터 level5 18px까지 다섯 단계가 있었지만
6
- * **어떤 renderer도 노출하지 않았다** — `Text`는 `TextVariant`(최대 24px)만 받는다.
7
- * 그래서 랜딩 히어로나 큰 숫자가 필요한 화면은 매번 제품 CSS로 폰트 크기를 직접 썼다.
8
- * 이 계약은 새 크기를 만들지 않는다. 있던 스케일을 꺼내 쓸 수 있게 하는 것이 전부다.
5
+ * `heading`(foundations)의 단계를 문서 제목 단계(`h1`~`h6`)와 함께 꺼내 쓰게 한다.
6
+ * 이 계약은 새 크기를 만들지 않는다. 가장 큰 단계는 `typography.heading` 24px이며,
7
+ * level1 40px·level2 32px 큰 글자 단계는 2026-10-17 사용자 결정("큰 글자 정책은 없애")으로
8
+ * 폐지돼 두 이름은 level3과 같은 값이다(소비 코드 호환용, 새 코드는 level3~5).
9
9
  *
10
10
  * `Top`(화면 첫 제목)·`Section`(본문 묶음 제목)과 겹치지 않는다. 그 둘은 **자리**를
11
11
  * 아는 블록이고 자기 여백·보조 문장·보조 행동을 갖는다. `Heading`은 자리를 모르는
@@ -30,29 +30,29 @@ export declare const headingRecipe: {
30
30
  };
31
31
  readonly levels: {
32
32
  readonly level1: {
33
- readonly fontSize: 40;
34
- readonly lineHeight: 48;
35
- readonly fontWeight: "700";
33
+ readonly fontSize: 24;
34
+ readonly lineHeight: 32;
35
+ readonly fontWeight: "500";
36
36
  };
37
37
  readonly level2: {
38
- readonly fontSize: 32;
39
- readonly lineHeight: 40;
40
- readonly fontWeight: "700";
38
+ readonly fontSize: 24;
39
+ readonly lineHeight: 32;
40
+ readonly fontWeight: "500";
41
41
  };
42
42
  readonly level3: {
43
43
  readonly fontSize: 24;
44
44
  readonly lineHeight: 32;
45
- readonly fontWeight: "600";
45
+ readonly fontWeight: "500";
46
46
  };
47
47
  readonly level4: {
48
48
  readonly fontSize: 20;
49
49
  readonly lineHeight: 28;
50
- readonly fontWeight: "600";
50
+ readonly fontWeight: "500";
51
51
  };
52
52
  readonly level5: {
53
53
  readonly fontSize: 18;
54
54
  readonly lineHeight: 26;
55
- readonly fontWeight: "600";
55
+ readonly fontWeight: "500";
56
56
  };
57
57
  };
58
58
  readonly color: Readonly<{
@@ -1 +1 @@
1
- {"version":3,"file":"heading.js","sourceRoot":"","sources":["../src/heading.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,YAAY,GAAsD;IACtE,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,UAA6B;IACrE,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC1D,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,SAAS,CAAC,8BAA8B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChF,CAAC;IACD,IACE,UAAU,CAAC,aAAa,KAAK,SAAS;QACtC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,EACtD,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,sCAAsC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAChG,CAAC;AACH,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,2BAA2B,CACzC,UAA6B;IAE7B,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACtC,OAAO,UAAU,CAAC,aAAa,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,CAAC,MAAM,CAAU;IACxB,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAwB,EAAE;IAC7C,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;IACrC,wCAAwC;IACxC,YAAY,EAAE,OAAO,CAAC,EAAE;CAOzB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU,EAAE,EAAE;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,SAAS,EAAE,EAAE;IACb,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACxD,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IACtD,SAAS,EAAE;QACT,+EAA+E;QAC/E,mEAAmE;QACnE,gFAAgF;QAChF,oEAAoE;KACrE;CACkC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport { heading, spacing, type HeadingLevel } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * 문서 제목 단계를 실제로 그리는 primitive다.\n *\n * `heading`(foundations)에는 이미 level1 40px부터 level5 18px까지 다섯 단계가 있었지만\n * **어떤 renderer도 노출하지 않았다** — `Text`는 `TextVariant`(최대 24px)만 받는다.\n * 그래서 랜딩 히어로나 큰 숫자가 필요한 화면은 매번 제품 CSS로 폰트 크기를 직접 썼다.\n * 이 계약은 새 크기를 만들지 않는다. 있던 스케일을 꺼내 쓸 수 있게 하는 것이 전부다.\n *\n * `Top`(화면 첫 제목)·`Section`(본문 묶음 제목)과 겹치지 않는다. 그 둘은 **자리**를\n * 아는 블록이고 자기 여백·보조 문장·보조 행동을 갖는다. `Heading`은 자리를 모르는\n * 글자 하나다 — 카드 안, 표 위, 빈 상태 안 어디에나 놓인다.\n */\nexport type HeadingDescriptor = Readonly<{\n /** 시각적 크기. 문서 구조상의 단계와 분리돼 있다. */\n level: HeadingLevel;\n /**\n * 실제로 낼 요소 단계. 생략하면 `level`의 숫자를 따른다. 시각적 크기와 문서 구조가\n * 어긋나는 경우(카드 제목이 크지만 h4인 경우)에 따로 지정한다.\n */\n semanticLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n}>;\n\nconst levelNumbers: Readonly<Record<HeadingLevel, 1 | 2 | 3 | 4 | 5>> = {\n level1: 1,\n level2: 2,\n level3: 3,\n level4: 4,\n level5: 5,\n};\n\nexport function validateHeadingDescriptor(descriptor: HeadingDescriptor): void {\n if (descriptor === null || typeof descriptor !== \"object\") {\n throw new TypeError(\"Heading descriptor must be an object\");\n }\n if (!Object.prototype.hasOwnProperty.call(heading, descriptor.level)) {\n throw new TypeError(`Unsupported Heading level: ${String(descriptor.level)}`);\n }\n if (\n descriptor.semanticLevel !== undefined &&\n ![1, 2, 3, 4, 5, 6].includes(descriptor.semanticLevel)\n ) {\n throw new TypeError(`Unsupported Heading semanticLevel: ${String(descriptor.semanticLevel)}`);\n }\n}\n\n/** 시각적 단계에서 문서 단계를 뽑되, 명시된 값이 있으면 그것이 이긴다. */\nexport function resolveHeadingSemanticLevel(\n descriptor: HeadingDescriptor,\n): 1 | 2 | 3 | 4 | 5 | 6 {\n validateHeadingDescriptor(descriptor);\n return descriptor.semanticLevel ?? levelNumbers[descriptor.level];\n}\n\nexport const headingRecipe = {\n slots: [\"root\"] as const,\n defaults: { level: \"level3\" as HeadingLevel },\n levels: heading,\n color: semanticColors.content.primary,\n /** 제목 아래 간격은 제목이 아니라 그것을 담는 블록이 정한다. */\n marginBottom: spacing.xs,\n} as const satisfies {\n slots: readonly [\"root\"];\n defaults: { level: HeadingLevel };\n levels: typeof heading;\n color: ColorReference;\n marginBottom: number;\n};\n\nexport const headingBehavior = {\n controlled: [],\n inputs: [\"level\", \"semanticLevel\"],\n stateAxes: {},\n web: { roles: [\"heading\"], keyboard: [], focus: \"none\" },\n native: { roles: [\"header\"], states: [], actions: [] },\n scenarios: [\n \"visual-size-and-document-level-are-separate-axes-that-may-disagree-on-purpose\",\n \"the-element-is-a-real-heading-so-the-rotor-and-skip-links-find-it\",\n \"no-new-type-sizes-are-introduced-the-existing-heading-scale-is-what-is-exposed\",\n \"heading-owns-no-surrounding-layout-the-block-that-contains-it-does\",\n ],\n} as const satisfies BehaviorContract;\n"]}
1
+ {"version":3,"file":"heading.js","sourceRoot":"","sources":["../src/heading.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAwBtD,MAAM,YAAY,GAAsD;IACtE,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,UAA6B;IACrE,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC1D,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,SAAS,CAAC,8BAA8B,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChF,CAAC;IACD,IACE,UAAU,CAAC,aAAa,KAAK,SAAS;QACtC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,EACtD,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,sCAAsC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAChG,CAAC;AACH,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,2BAA2B,CACzC,UAA6B;IAE7B,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACtC,OAAO,UAAU,CAAC,aAAa,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,CAAC,MAAM,CAAU;IACxB,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAwB,EAAE;IAC7C,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;IACrC,wCAAwC;IACxC,YAAY,EAAE,OAAO,CAAC,EAAE;CAOzB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,UAAU,EAAE,EAAE;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,SAAS,EAAE,EAAE;IACb,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACxD,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IACtD,SAAS,EAAE;QACT,+EAA+E;QAC/E,mEAAmE;QACnE,gFAAgF;QAChF,oEAAoE;KACrE;CACkC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport { heading, spacing, type HeadingLevel } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * 문서 제목 단계를 실제로 그리는 primitive다.\n *\n * `heading`(foundations)의 단계를 문서 제목 단계(`h1`~`h6`)와 함께 꺼내 쓰게 한다.\n * 이 계약은 새 크기를 만들지 않는다. 가장 큰 단계는 `typography.heading` 24px이며,\n * level1 40px·level2 32px 큰 글자 단계는 2026-10-17 사용자 결정(\"큰 글자 정책은 없애\")으로\n * 폐지돼 두 이름은 level3과 같은 값이다(소비 코드 호환용, 새 코드는 level3~5).\n *\n * `Top`(화면 첫 제목)·`Section`(본문 묶음 제목)과 겹치지 않는다. 그 둘은 **자리**를\n * 아는 블록이고 자기 여백·보조 문장·보조 행동을 갖는다. `Heading`은 자리를 모르는\n * 글자 하나다 — 카드 안, 표 위, 빈 상태 안 어디에나 놓인다.\n */\nexport type HeadingDescriptor = Readonly<{\n /** 시각적 크기. 문서 구조상의 단계와 분리돼 있다. */\n level: HeadingLevel;\n /**\n * 실제로 낼 요소 단계. 생략하면 `level`의 숫자를 따른다. 시각적 크기와 문서 구조가\n * 어긋나는 경우(카드 제목이 크지만 h4인 경우)에 따로 지정한다.\n */\n semanticLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n}>;\n\nconst levelNumbers: Readonly<Record<HeadingLevel, 1 | 2 | 3 | 4 | 5>> = {\n level1: 1,\n level2: 2,\n level3: 3,\n level4: 4,\n level5: 5,\n};\n\nexport function validateHeadingDescriptor(descriptor: HeadingDescriptor): void {\n if (descriptor === null || typeof descriptor !== \"object\") {\n throw new TypeError(\"Heading descriptor must be an object\");\n }\n if (!Object.prototype.hasOwnProperty.call(heading, descriptor.level)) {\n throw new TypeError(`Unsupported Heading level: ${String(descriptor.level)}`);\n }\n if (\n descriptor.semanticLevel !== undefined &&\n ![1, 2, 3, 4, 5, 6].includes(descriptor.semanticLevel)\n ) {\n throw new TypeError(`Unsupported Heading semanticLevel: ${String(descriptor.semanticLevel)}`);\n }\n}\n\n/** 시각적 단계에서 문서 단계를 뽑되, 명시된 값이 있으면 그것이 이긴다. */\nexport function resolveHeadingSemanticLevel(\n descriptor: HeadingDescriptor,\n): 1 | 2 | 3 | 4 | 5 | 6 {\n validateHeadingDescriptor(descriptor);\n return descriptor.semanticLevel ?? levelNumbers[descriptor.level];\n}\n\nexport const headingRecipe = {\n slots: [\"root\"] as const,\n defaults: { level: \"level3\" as HeadingLevel },\n levels: heading,\n color: semanticColors.content.primary,\n /** 제목 아래 간격은 제목이 아니라 그것을 담는 블록이 정한다. */\n marginBottom: spacing.xs,\n} as const satisfies {\n slots: readonly [\"root\"];\n defaults: { level: HeadingLevel };\n levels: typeof heading;\n color: ColorReference;\n marginBottom: number;\n};\n\nexport const headingBehavior = {\n controlled: [],\n inputs: [\"level\", \"semanticLevel\"],\n stateAxes: {},\n web: { roles: [\"heading\"], keyboard: [], focus: \"none\" },\n native: { roles: [\"header\"], states: [], actions: [] },\n scenarios: [\n \"visual-size-and-document-level-are-separate-axes-that-may-disagree-on-purpose\",\n \"the-element-is-a-real-heading-so-the-rotor-and-skip-links-find-it\",\n \"no-new-type-sizes-are-introduced-the-existing-heading-scale-is-what-is-exposed\",\n \"heading-owns-no-surrounding-layout-the-block-that-contains-it-does\",\n ],\n} as const satisfies BehaviorContract;\n"]}
@@ -2,6 +2,13 @@ import { type ColorReferencePalette } from "./color-references.js";
2
2
  export type IconButtonSize = "small" | "medium" | "large";
3
3
  export type IconButtonShape = "rounded" | "circle";
4
4
  export type IconButtonTone = "primary" | "secondary" | "ghost" | "danger";
5
+ /**
6
+ * Which container edge a ghost IconButton sits on (logical: `start`/`end` follow the reading direction). The
7
+ * button keeps its full touch target but overhangs that edge so its glyph slot, not the transparent hit area,
8
+ * sets the visible inset (2026-10-17 measured audit: glyphs sat 10–15px inside the row/header inset).
9
+ */
10
+ export type IconButtonEdge = "start" | "end" | "both";
11
+ export declare const iconButtonEdges: readonly ["start", "end", "both"];
5
12
  export declare const iconButtonRecipe: {
6
13
  readonly slots: readonly ["root", "icon", "spinner"];
7
14
  readonly defaults: {
@@ -84,6 +91,16 @@ export declare const iconButtonRecipe: {
84
91
  readonly rounded: "md";
85
92
  readonly circle: "full";
86
93
  };
94
+ /**
95
+ * Edge alignment (2026-10-17 measured audit): a ghost IconButton at a row/header edge overhangs that edge by
96
+ * (visible diameter − glyph slot) / 2, so the glyph slot lines up with the container inset like text does while
97
+ * the hit area stays whole. Only `ghost` overhangs — filled and outlined tones show their frame, and the frame is
98
+ * what aligns. Renderers read `resolveIconButtonEdgeOverhang` so a raised visible diameter (minimumVisualTarget)
99
+ * moves the glyph slot by the same amount on Web and Native.
100
+ */
101
+ readonly edge: {
102
+ readonly tones: readonly ["ghost"];
103
+ };
87
104
  readonly states: {
88
105
  readonly selected: {
89
106
  readonly background: Readonly<{
@@ -109,4 +126,10 @@ export type ResolvedIconButtonPresentation = Readonly<{
109
126
  }>;
110
127
  /** Resolve one recipe tone for non-CSS renderers without a second tone table. */
111
128
  export declare function resolveIconButtonPresentation(tone: IconButtonTone, palette: ColorReferencePalette, selected?: boolean): ResolvedIconButtonPresentation;
129
+ /**
130
+ * Negative margin a ghost IconButton applies on its `edge` side(s): (visible diameter − glyph slot) / 2, e.g. 10 for
131
+ * medium (44 − 24). 0 for tones that draw a frame. `visibleDiameter` is the rendered size after the Provider's
132
+ * minimumVisualTarget axis (`visibleControlHeight`), so the overhang tracks what is actually drawn.
133
+ */
134
+ export declare function resolveIconButtonEdgeOverhang(tone: IconButtonTone, size: IconButtonSize, visibleDiameter?: number): number;
112
135
  //# sourceMappingURL=icon-button-recipe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button-recipe.d.ts","sourceRoot":"","sources":["../src/icon-button-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AACnD,MAAM,MAAM,cAAc,GA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U,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC,CAAC;AAEH,iFAAiF;AACjF,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,UAAQ,GACf,8BAA8B,CAiBhC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,cAAc,EACpB,eAAe,GAAE,MAA8C,GAC9D,MAAM,CAGR"}
@@ -1,6 +1,7 @@
1
1
  import { resolveColorReference, } from "./color-references.js";
2
- import { opacity, radius, } from "./foundations.js";
2
+ import { glyph, opacity, radius, } from "./foundations.js";
3
3
  import { semanticColors } from "./semantic-colors.js";
4
+ export const iconButtonEdges = ["start", "end", "both"];
4
5
  export const iconButtonRecipe = {
5
6
  slots: ["root", "icon", "spinner"],
6
7
  defaults: { tone: "ghost", size: "medium", shape: "rounded" },
@@ -32,6 +33,14 @@ export const iconButtonRecipe = {
32
33
  large: { diameter: 52, hitSlop: 0, glyph: "lg" },
33
34
  },
34
35
  shapes: { rounded: "md", circle: "full" },
36
+ /**
37
+ * Edge alignment (2026-10-17 measured audit): a ghost IconButton at a row/header edge overhangs that edge by
38
+ * (visible diameter − glyph slot) / 2, so the glyph slot lines up with the container inset like text does while
39
+ * the hit area stays whole. Only `ghost` overhangs — filled and outlined tones show their frame, and the frame is
40
+ * what aligns. Renderers read `resolveIconButtonEdgeOverhang` so a raised visible diameter (minimumVisualTarget)
41
+ * moves the glyph slot by the same amount on Web and Native.
42
+ */
43
+ edge: { tones: ["ghost"] },
35
44
  states: {
36
45
  // `aria-pressed` / `accessibilityState.selected` already carried the toggle
37
46
  // state; without a paired visual every consumer painted the pressed icon
@@ -59,4 +68,14 @@ export function resolveIconButtonPresentation(tone, palette, selected = false) {
59
68
  : resolveColorReference(contract.border, palette),
60
69
  };
61
70
  }
71
+ /**
72
+ * Negative margin a ghost IconButton applies on its `edge` side(s): (visible diameter − glyph slot) / 2, e.g. 10 for
73
+ * medium (44 − 24). 0 for tones that draw a frame. `visibleDiameter` is the rendered size after the Provider's
74
+ * minimumVisualTarget axis (`visibleControlHeight`), so the overhang tracks what is actually drawn.
75
+ */
76
+ export function resolveIconButtonEdgeOverhang(tone, size, visibleDiameter = iconButtonRecipe.sizes[size].diameter) {
77
+ if (!iconButtonRecipe.edge.tones.includes(tone))
78
+ return 0;
79
+ return Math.max(0, (visibleDiameter - glyph[iconButtonRecipe.sizes[size].glyph]) / 2);
80
+ }
62
81
  //# sourceMappingURL=icon-button-recipe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button-recipe.js","sourceRoot":"","sources":["../src/icon-button-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,OAAO,EACP,MAAM,GAEP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAMtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAU;IAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IAC7D,KAAK,EAAE;QACL,OAAO,EAAE;YACP,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU;YAClD,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO;YAC5C,MAAM,EAAE,IAAI;SACb;QACD,SAAS,EAAE;YACT,UAAU,EAAE,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU;YACpD,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO;YAC9C,MAAM,EAA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AAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/E,OAAO;QACL,UAAU,EACR,QAAQ,CAAC,UAAU,KAAK,IAAI;YAC1B,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QACzD,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QACzD,MAAM,EACJ,QAAQ,CAAC,MAAM,KAAK,IAAI;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KACtD,CAAC;AACJ,CAAC","sourcesContent":["import {\n resolveColorReference,\n type ColorReference,\n type ColorReferencePalette,\n} from \"./color-references.js\";\nimport {\n opacity,\n radius,\n type GlyphSize,\n} from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type IconButtonSize = \"small\" | \"medium\" | \"large\";\nexport type IconButtonShape = \"rounded\" | \"circle\";\nexport type IconButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n\nexport const iconButtonRecipe = {\n slots: [\"root\", \"icon\", \"spinner\"] as const,\n defaults: { tone: \"ghost\", size: \"medium\", shape: \"rounded\" },\n tones: {\n primary: {\n background: semanticColors.action.brand.background,\n content: semanticColors.action.brand.content,\n border: null,\n },\n secondary: {\n background: semanticColors.action.neutral.background,\n content: semanticColors.action.neutral.content,\n border: semanticColors.action.neutral.border,\n },\n ghost: {\n background: null,\n content: semanticColors.content.secondary,\n border: null,\n },\n danger: {\n background: semanticColors.action.danger.background,\n content: semanticColors.action.danger.content,\n border: null,\n },\n },\n sizes: {\n small: { diameter: 36, hitSlop: 4, glyph: \"sm\" },\n medium: { diameter: 44, hitSlop: 0, glyph: \"md\" },\n large: { diameter: 52, hitSlop: 0, glyph: \"lg\" },\n },\n shapes: { rounded: \"md\", circle: \"full\" },\n states: {\n // `aria-pressed` / `accessibilityState.selected` already carried the toggle\n // state; without a paired visual every consumer painted the pressed icon\n // button in product styles. Mirrors `buttonRecipe.states.selected`.\n selected: {\n background: semanticColors.canvas,\n content: semanticColors.content.brand,\n // Match Button: selection changes color without introducing an outline.\n border: null,\n },\n pressedOpacity: opacity.pressed,\n disabledOpacity: opacity.disabled,\n },\n} as const satisfies {\n slots: readonly string[];\n defaults: {\n tone: IconButtonTone;\n size: IconButtonSize;\n shape: IconButtonShape;\n };\n tones: Record<\n IconButtonTone,\n { background: ColorReference | null; content: ColorReference; border: ColorReference | null }\n >;\n sizes: Record<IconButtonSize, { diameter: number; hitSlop: number; glyph: GlyphSize }>;\n shapes: Record<IconButtonShape, keyof typeof radius>;\n states: {\n selected: { background: ColorReference; content: ColorReference; border: ColorReference | null };\n pressedOpacity: number;\n disabledOpacity: number;\n };\n};\n\nexport type ResolvedIconButtonPresentation = Readonly<{\n background: string | null;\n content: string;\n border: string | null;\n}>;\n\n/** Resolve one recipe tone for non-CSS renderers without a second tone table. */\nexport function resolveIconButtonPresentation(\n tone: IconButtonTone,\n palette: ColorReferencePalette,\n selected = false,\n): ResolvedIconButtonPresentation {\n const contract: {\n background: ColorReference | null;\n content: ColorReference;\n border: ColorReference | null;\n } = selected ? iconButtonRecipe.states.selected : iconButtonRecipe.tones[tone];\n return {\n background:\n contract.background === null\n ? null\n : resolveColorReference(contract.background, palette),\n content: resolveColorReference(contract.content, palette),\n border:\n contract.border === null\n ? null\n : resolveColorReference(contract.border, palette),\n };\n}\n"]}
1
+ {"version":3,"file":"icon-button-recipe.js","sourceRoot":"","sources":["../src/icon-button-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,EACL,OAAO,EACP,MAAM,GAEP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAWtD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAA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gBAAgB,CAAC,IAAI,CAAC,KAAmC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACzF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,eAAe,GAAG,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACxF,CAAC","sourcesContent":["import {\n resolveColorReference,\n type ColorReference,\n type ColorReferencePalette,\n} from \"./color-references.js\";\nimport {\n glyph,\n opacity,\n radius,\n type GlyphSize,\n} from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type IconButtonSize = \"small\" | \"medium\" | \"large\";\nexport type IconButtonShape = \"rounded\" | \"circle\";\nexport type IconButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n/**\n * Which container edge a ghost IconButton sits on (logical: `start`/`end` follow the reading direction). The\n * button keeps its full touch target but overhangs that edge so its glyph slot, not the transparent hit area,\n * sets the visible inset (2026-10-17 measured audit: glyphs sat 10–15px inside the row/header inset).\n */\nexport type IconButtonEdge = \"start\" | \"end\" | \"both\";\nexport const iconButtonEdges = [\"start\", \"end\", \"both\"] as const satisfies readonly IconButtonEdge[];\n\nexport const iconButtonRecipe = {\n slots: [\"root\", \"icon\", \"spinner\"] as const,\n defaults: { tone: \"ghost\", size: \"medium\", shape: \"rounded\" },\n tones: {\n primary: {\n background: semanticColors.action.brand.background,\n content: semanticColors.action.brand.content,\n border: null,\n },\n secondary: {\n background: semanticColors.action.neutral.background,\n content: semanticColors.action.neutral.content,\n border: semanticColors.action.neutral.border,\n },\n ghost: {\n background: null,\n content: semanticColors.content.secondary,\n border: null,\n },\n danger: {\n background: semanticColors.action.danger.background,\n content: semanticColors.action.danger.content,\n border: null,\n },\n },\n sizes: {\n small: { diameter: 36, hitSlop: 4, glyph: \"sm\" },\n medium: { diameter: 44, hitSlop: 0, glyph: \"md\" },\n large: { diameter: 52, hitSlop: 0, glyph: \"lg\" },\n },\n shapes: { rounded: \"md\", circle: \"full\" },\n /**\n * Edge alignment (2026-10-17 measured audit): a ghost IconButton at a row/header edge overhangs that edge by\n * (visible diameter − glyph slot) / 2, so the glyph slot lines up with the container inset like text does while\n * the hit area stays whole. Only `ghost` overhangs — filled and outlined tones show their frame, and the frame is\n * what aligns. Renderers read `resolveIconButtonEdgeOverhang` so a raised visible diameter (minimumVisualTarget)\n * moves the glyph slot by the same amount on Web and Native.\n */\n edge: { tones: [\"ghost\"] as const },\n states: {\n // `aria-pressed` / `accessibilityState.selected` already carried the toggle\n // state; without a paired visual every consumer painted the pressed icon\n // button in product styles. Mirrors `buttonRecipe.states.selected`.\n selected: {\n background: semanticColors.canvas,\n content: semanticColors.content.brand,\n // Match Button: selection changes color without introducing an outline.\n border: null,\n },\n pressedOpacity: opacity.pressed,\n disabledOpacity: opacity.disabled,\n },\n} as const satisfies {\n slots: readonly string[];\n defaults: {\n tone: IconButtonTone;\n size: IconButtonSize;\n shape: IconButtonShape;\n };\n tones: Record<\n IconButtonTone,\n { background: ColorReference | null; content: ColorReference; border: ColorReference | null }\n >;\n sizes: Record<IconButtonSize, { diameter: number; hitSlop: number; glyph: GlyphSize }>;\n shapes: Record<IconButtonShape, keyof typeof radius>;\n edge: { tones: readonly IconButtonTone[] };\n states: {\n selected: { background: ColorReference; content: ColorReference; border: ColorReference | null };\n pressedOpacity: number;\n disabledOpacity: number;\n };\n};\n\nexport type ResolvedIconButtonPresentation = Readonly<{\n background: string | null;\n content: string;\n border: string | null;\n}>;\n\n/** Resolve one recipe tone for non-CSS renderers without a second tone table. */\nexport function resolveIconButtonPresentation(\n tone: IconButtonTone,\n palette: ColorReferencePalette,\n selected = false,\n): ResolvedIconButtonPresentation {\n const contract: {\n background: ColorReference | null;\n content: ColorReference;\n border: ColorReference | null;\n } = selected ? iconButtonRecipe.states.selected : iconButtonRecipe.tones[tone];\n return {\n background:\n contract.background === null\n ? null\n : resolveColorReference(contract.background, palette),\n content: resolveColorReference(contract.content, palette),\n border:\n contract.border === null\n ? null\n : resolveColorReference(contract.border, palette),\n };\n}\n\n/**\n * Negative margin a ghost IconButton applies on its `edge` side(s): (visible diameter − glyph slot) / 2, e.g. 10 for\n * medium (44 − 24). 0 for tones that draw a frame. `visibleDiameter` is the rendered size after the Provider's\n * minimumVisualTarget axis (`visibleControlHeight`), so the overhang tracks what is actually drawn.\n */\nexport function resolveIconButtonEdgeOverhang(\n tone: IconButtonTone,\n size: IconButtonSize,\n visibleDiameter: number = iconButtonRecipe.sizes[size].diameter,\n): number {\n if (!(iconButtonRecipe.edge.tones as readonly IconButtonTone[]).includes(tone)) return 0;\n return Math.max(0, (visibleDiameter - glyph[iconButtonRecipe.sizes[size].glyph]) / 2);\n}\n"]}
@@ -112,7 +112,7 @@ export declare const numberFieldRecipe: {
112
112
  alpha?: number;
113
113
  }>;
114
114
  readonly textVariant: "body";
115
- readonly fontWeight: "600";
115
+ readonly fontWeight: "500";
116
116
  };
117
117
  readonly hint: {
118
118
  readonly color: Readonly<{
@@ -56,7 +56,7 @@ export declare const otpFieldRecipe: {
56
56
  alpha?: number;
57
57
  }>;
58
58
  readonly textVariant: "body";
59
- readonly fontWeight: "600";
59
+ readonly fontWeight: "500";
60
60
  };
61
61
  readonly hint: {
62
62
  readonly color: Readonly<{
@@ -89,7 +89,7 @@ export declare const passwordFieldRecipe: {
89
89
  alpha?: number;
90
90
  }>;
91
91
  readonly textVariant: "body";
92
- readonly fontWeight: "600";
92
+ readonly fontWeight: "500";
93
93
  };
94
94
  readonly hint: {
95
95
  readonly color: Readonly<{
package/dist/result.d.ts CHANGED
@@ -105,7 +105,7 @@ export declare const resultRecipe: {
105
105
  key: "text";
106
106
  alpha?: number;
107
107
  }>;
108
- readonly fontWeight: "700";
108
+ readonly fontWeight: "500";
109
109
  };
110
110
  readonly description: {
111
111
  readonly textVariant: "body";
package/dist/result.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { semanticColors } from "./semantic-colors.js";
2
- import { fontWeight, spacing } from "./foundations.js";
2
+ import { spacing, typography } from "./foundations.js";
3
3
  export const resultDefaults = {
4
4
  status: "info",
5
5
  };
@@ -91,7 +91,7 @@ export const resultRecipe = {
91
91
  title: {
92
92
  textVariant: "titleLarge",
93
93
  color: semanticColors.content.primary,
94
- fontWeight: fontWeight.bold,
94
+ fontWeight: typography.titleLarge.fontWeight,
95
95
  },
96
96
  description: {
97
97
  textVariant: "body",
@@ -1 +1 @@
1
- {"version":3,"file":"result.js","sourceRoot":"","sources":["../src/result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AASvD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,MAAM;CACuC,CAAC;AAsCxD,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,UAAU,KAAK,oBAAoB,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,MAA8B,EAC9B,KAAa;IAEb,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,CAAC;IAC3C,IAAI,MAAM,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QAC5C,UAAU,CAAC,MAAM,CAAC,kBAAkB,EAAE,GAAG,KAAK,qBAAqB,CAAC,CAAC;IACvE,CAAC;IACD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1C,MAAM,IAAI,SAAS,CAAC,UAAU,KAAK,8BAA8B,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,UAA4B;IACnE,IACE,U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AW,EAAE;QACX,WAAW,EAAE,MAAM;QACnB,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS;KACxC;IACD,UAAU,EAAE,OAAO,CAAC,EAAE;CACd,CAAC","sourcesContent":["import { semanticColors } from \"./semantic-colors.js\";\nimport { fontWeight, spacing } from \"./foundations.js\";\n\n/**\n * Web-page HTTP status vocabulary (403/404/500) does not belong in a\n * platform-neutral contract. Products/adapters translate those into\n * `failure` with their own localized copy.\n */\nexport type ResultStatus = \"success\" | \"failure\" | \"info\";\n\nexport const resultDefaults = {\n status: \"info\",\n} as const satisfies Readonly<{ status: ResultStatus }>;\n\nexport type ResultActionDescriptor = Readonly<{\n label: string;\n accessibilityLabel?: string;\n onAction(): void;\n}>;\n\n/**\n * A flow terminus screen (success, failure, 404-equivalent). Unlike\n * `EmptyState`, which describes a place that can still be filled, Result\n * means this flow ends here — there is no pending content to wait for.\n *\n * `actions` holds at most one primary and one optional secondary action;\n * the first entry is the primary. A third action is refused, not silently\n * dropped, so a screen author notices instead of shipping a truncated row.\n */\nexport type ResultDescriptor = Readonly<{\n status: ResultStatus;\n title: string;\n description?: string;\n actions?: readonly ResultActionDescriptor[];\n}>;\n\nexport type ResolvedResultActionDescriptor = Readonly<{\n label: string;\n accessibilityLabel: string;\n onAction(): void;\n}>;\n\nexport type ResolvedResultDescriptor = Readonly<{\n status: ResultStatus;\n title: string;\n description: string | null;\n primaryAction: ResolvedResultActionDescriptor | null;\n secondaryAction: ResolvedResultActionDescriptor | null;\n}>;\n\nfunction assertCopy(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Result ${field} must not be empty`);\n }\n}\n\nexport function validateResultAction(\n action: ResultActionDescriptor,\n field: string,\n): void {\n assertCopy(action.label, `${field}.label`);\n if (action.accessibilityLabel !== undefined) {\n assertCopy(action.accessibilityLabel, `${field}.accessibilityLabel`);\n }\n if (typeof action.onAction !== \"function\") {\n throw new TypeError(`Result ${field}.onAction must be a function`);\n }\n}\n\nexport function validateResultDescriptor(descriptor: ResultDescriptor): void {\n if (\n descriptor.status !== \"success\" &&\n descriptor.status !== \"failure\" &&\n descriptor.status !== \"info\"\n ) {\n throw new TypeError(`Unsupported Result status: ${String(descriptor.status)}`);\n }\n assertCopy(descriptor.title, \"title\");\n if (descriptor.description !== undefined) {\n assertCopy(descriptor.description, \"description\");\n }\n const actions = descriptor.actions ?? [];\n if (actions.length > 2) {\n throw new RangeError(\n \"Result supports at most one primary and one secondary action\",\n );\n }\n actions.forEach((action, index) => {\n validateResultAction(action, index === 0 ? \"primaryAction\" : \"secondaryAction\");\n });\n}\n\nfunction resolveAction(\n action: ResultActionDescriptor | undefined,\n): ResolvedResultActionDescriptor | null {\n if (!action) return null;\n return {\n label: action.label,\n accessibilityLabel: action.accessibilityLabel ?? action.label,\n onAction: action.onAction,\n };\n}\n\nexport function resolveResultDescriptor(\n descriptor: ResultDescriptor,\n): ResolvedResultDescriptor {\n validateResultDescriptor(descriptor);\n const actions = descriptor.actions ?? [];\n return {\n status: descriptor.status,\n title: descriptor.title,\n description: descriptor.description ?? null,\n primaryAction: resolveAction(actions[0]),\n secondaryAction: resolveAction(actions[1]),\n };\n}\n\nexport const resultRecipe = {\n slots: [\n \"root\",\n \"icon\",\n \"title\",\n \"description\",\n \"primaryAction\",\n \"secondaryAction\",\n ] as const,\n defaults: resultDefaults,\n tones: {\n success: {\n icon: semanticColors.feedback.success.foreground,\n iconBackground: semanticColors.feedback.success.badgeBackground,\n },\n failure: {\n icon: semanticColors.feedback.danger.foreground,\n iconBackground: semanticColors.feedback.danger.badgeBackground,\n },\n info: {\n icon: semanticColors.feedback.info.foreground,\n iconBackground: semanticColors.feedback.info.badgeBackground,\n },\n },\n iconSize: \"xl\",\n /**\n * Status mark drawn when the host passes no icon. Web painted these from CSS `::before` literals while Native drew\n * an empty circle (2026-10-17 review F N1); the recipe owns them so both renderers draw the same mark.\n */\n glyphs: { success: \"✓\", failure: \"!\", info: \"i\" },\n paddingVertical: spacing.xxxl,\n paddingHorizontal: spacing.xl,\n gap: spacing.sm,\n title: {\n textVariant: \"titleLarge\",\n color: semanticColors.content.primary,\n fontWeight: fontWeight.bold,\n },\n description: {\n textVariant: \"body\",\n color: semanticColors.content.secondary,\n },\n actionsGap: spacing.sm,\n} as const;\n"]}
1
+ {"version":3,"file":"result.js","sourceRoot":"","sources":["../src/result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AASvD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,MAAM;CACuC,CAAC;AAsCxD,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,UAAU,KAAK,oBAAoB,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,MAA8B,EAC9B,KAAa;IAEb,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,CAAC;IAC3C,IAAI,MAAM,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QAC5C,UAAU,CAAC,MAAM,CAAC,kBAAkB,EAAE,GAAG,KAAK,qBAAqB,CAAC,CAAC;IACvE,CAAC;IACD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1C,MAAM,IAAI,SAAS,CAAC,UAAU,KAAK,8BAA8B,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,UAA4B;IACnE,IACE,UAAU,CAAC,MAAM,KAAK,SAAS;QAC/B,UAAU,CAAC,MAAM,KAAK,SAAS;QAC/B,UAAU,CAAC,MAAM,KAAK,MAAM,EAC5B,CAAC;QACD,MAAM,I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AAE;CACd,CAAC","sourcesContent":["import { semanticColors } from \"./semantic-colors.js\";\nimport { spacing, typography } from \"./foundations.js\";\n\n/**\n * Web-page HTTP status vocabulary (403/404/500) does not belong in a\n * platform-neutral contract. Products/adapters translate those into\n * `failure` with their own localized copy.\n */\nexport type ResultStatus = \"success\" | \"failure\" | \"info\";\n\nexport const resultDefaults = {\n status: \"info\",\n} as const satisfies Readonly<{ status: ResultStatus }>;\n\nexport type ResultActionDescriptor = Readonly<{\n label: string;\n accessibilityLabel?: string;\n onAction(): void;\n}>;\n\n/**\n * A flow terminus screen (success, failure, 404-equivalent). Unlike\n * `EmptyState`, which describes a place that can still be filled, Result\n * means this flow ends here — there is no pending content to wait for.\n *\n * `actions` holds at most one primary and one optional secondary action;\n * the first entry is the primary. A third action is refused, not silently\n * dropped, so a screen author notices instead of shipping a truncated row.\n */\nexport type ResultDescriptor = Readonly<{\n status: ResultStatus;\n title: string;\n description?: string;\n actions?: readonly ResultActionDescriptor[];\n}>;\n\nexport type ResolvedResultActionDescriptor = Readonly<{\n label: string;\n accessibilityLabel: string;\n onAction(): void;\n}>;\n\nexport type ResolvedResultDescriptor = Readonly<{\n status: ResultStatus;\n title: string;\n description: string | null;\n primaryAction: ResolvedResultActionDescriptor | null;\n secondaryAction: ResolvedResultActionDescriptor | null;\n}>;\n\nfunction assertCopy(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Result ${field} must not be empty`);\n }\n}\n\nexport function validateResultAction(\n action: ResultActionDescriptor,\n field: string,\n): void {\n assertCopy(action.label, `${field}.label`);\n if (action.accessibilityLabel !== undefined) {\n assertCopy(action.accessibilityLabel, `${field}.accessibilityLabel`);\n }\n if (typeof action.onAction !== \"function\") {\n throw new TypeError(`Result ${field}.onAction must be a function`);\n }\n}\n\nexport function validateResultDescriptor(descriptor: ResultDescriptor): void {\n if (\n descriptor.status !== \"success\" &&\n descriptor.status !== \"failure\" &&\n descriptor.status !== \"info\"\n ) {\n throw new TypeError(`Unsupported Result status: ${String(descriptor.status)}`);\n }\n assertCopy(descriptor.title, \"title\");\n if (descriptor.description !== undefined) {\n assertCopy(descriptor.description, \"description\");\n }\n const actions = descriptor.actions ?? [];\n if (actions.length > 2) {\n throw new RangeError(\n \"Result supports at most one primary and one secondary action\",\n );\n }\n actions.forEach((action, index) => {\n validateResultAction(action, index === 0 ? \"primaryAction\" : \"secondaryAction\");\n });\n}\n\nfunction resolveAction(\n action: ResultActionDescriptor | undefined,\n): ResolvedResultActionDescriptor | null {\n if (!action) return null;\n return {\n label: action.label,\n accessibilityLabel: action.accessibilityLabel ?? action.label,\n onAction: action.onAction,\n };\n}\n\nexport function resolveResultDescriptor(\n descriptor: ResultDescriptor,\n): ResolvedResultDescriptor {\n validateResultDescriptor(descriptor);\n const actions = descriptor.actions ?? [];\n return {\n status: descriptor.status,\n title: descriptor.title,\n description: descriptor.description ?? null,\n primaryAction: resolveAction(actions[0]),\n secondaryAction: resolveAction(actions[1]),\n };\n}\n\nexport const resultRecipe = {\n slots: [\n \"root\",\n \"icon\",\n \"title\",\n \"description\",\n \"primaryAction\",\n \"secondaryAction\",\n ] as const,\n defaults: resultDefaults,\n tones: {\n success: {\n icon: semanticColors.feedback.success.foreground,\n iconBackground: semanticColors.feedback.success.badgeBackground,\n },\n failure: {\n icon: semanticColors.feedback.danger.foreground,\n iconBackground: semanticColors.feedback.danger.badgeBackground,\n },\n info: {\n icon: semanticColors.feedback.info.foreground,\n iconBackground: semanticColors.feedback.info.badgeBackground,\n },\n },\n iconSize: \"xl\",\n /**\n * Status mark drawn when the host passes no icon. Web painted these from CSS `::before` literals while Native drew\n * an empty circle (2026-10-17 review F N1); the recipe owns them so both renderers draw the same mark.\n */\n glyphs: { success: \"✓\", failure: \"!\", info: \"i\" },\n paddingVertical: spacing.xxxl,\n paddingHorizontal: spacing.xl,\n gap: spacing.sm,\n title: {\n textVariant: \"titleLarge\",\n color: semanticColors.content.primary,\n fontWeight: typography.titleLarge.fontWeight,\n },\n description: {\n textVariant: \"body\",\n color: semanticColors.content.secondary,\n },\n actionsGap: spacing.sm,\n} as const;\n"]}
@@ -103,7 +103,7 @@ export declare function canSubmitMessage({ value, disabled, pending, attachmentC
103
103
  * avatar ~34, avatar gap 8). Brand colors and artwork are not copied; surfaces stay semantic tokens.
104
104
  */
105
105
  export declare const chatMessageRecipe: {
106
- readonly avatarSize: 36;
106
+ readonly avatarSize: 32;
107
107
  readonly avatarGap: 8;
108
108
  readonly authorGap: 4;
109
109
  readonly metaGap: 4;
@@ -200,6 +200,17 @@ export declare const commentThreadRecipe: {
200
200
  readonly mediaMaxWidth: 160;
201
201
  readonly mediaRadius: 12;
202
202
  readonly menuGlyphSize: 20;
203
+ /**
204
+ * Trailing actions (like, product actions, more) centre their 44 targets on the identity's first line instead of
205
+ * top-aligning the target box (2026-10-17 measured audit: avatar 168 / author line 162 / glyphs 174). The cluster
206
+ * shifts by (first-line height − visible target) / 2 — negative while the line is shorter than the target — and the
207
+ * last control takes IconButton `edge="end"` so its glyph slot ends on the row inset like the avatar starts on it.
208
+ * The first line is the author caption, or the body line when the author runs inline with `bodyText`.
209
+ */
210
+ readonly actionAnchor: {
211
+ readonly authorTextVariant: "caption";
212
+ readonly inlineTextVariant: "body";
213
+ };
203
214
  };
204
215
  /**
205
216
  * Items of the HJM-owned per-comment "more" menu (2026-10-17: message/comment structure belongs to HJM, review S4#7).
@@ -1 +1 @@
1
- {"version":3,"file":"screen-patterns.d.ts","sourceRoot":"","sources":["../src/screen-patterns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,0FAA0F;AAC1F,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,GAC3B,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WA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eAAO,MAAM,cAAc;;;;;;;;EAA6J,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { glyph, layout, radius, spacing } from "./foundations.js";
2
+ import { avatarRecipe } from "./component-recipes.js";
2
3
  export function resolveScreenContentState(state = { kind: "ready" }) {
3
4
  if (!["ready", "loading", "empty", "error", "restricted"].includes(state.kind)) {
4
5
  throw new TypeError("Unknown screen content state");
@@ -82,7 +83,9 @@ export function canSubmitMessage({ value, disabled = false, pending = false, att
82
83
  * avatar ~34, avatar gap 8). Brand colors and artwork are not copied; surfaces stay semantic tokens.
83
84
  */
84
85
  export const chatMessageRecipe = {
85
- avatarSize: 36,
86
+ // Must be a size the Avatar renders on both platforms: 36 was no Web Avatar step (32/40/48/64), so Web drew a 32
87
+ // avatar in a 36 slot while Native drew 36 (2026-10-17 measured audit). `small` is the step nearest the ~34 reference.
88
+ avatarSize: avatarRecipe.sizes.small,
86
89
  avatarGap: spacing.xs,
87
90
  authorGap: spacing.xxs,
88
91
  metaGap: spacing.xxs,
@@ -185,6 +188,14 @@ export const commentThreadRecipe = {
185
188
  mediaRadius: radius.md,
186
189
  // The trailing vertical-dots menu glyph; the button keeps the shared 44pt IconButton target.
187
190
  menuGlyphSize: glyph.sm,
191
+ /**
192
+ * Trailing actions (like, product actions, more) centre their 44 targets on the identity's first line instead of
193
+ * top-aligning the target box (2026-10-17 measured audit: avatar 168 / author line 162 / glyphs 174). The cluster
194
+ * shifts by (first-line height − visible target) / 2 — negative while the line is shorter than the target — and the
195
+ * last control takes IconButton `edge="end"` so its glyph slot ends on the row inset like the avatar starts on it.
196
+ * The first line is the author caption, or the body line when the author runs inline with `bodyText`.
197
+ */
198
+ actionAnchor: { authorTextVariant: "caption", inlineTextVariant: "body" },
188
199
  };
189
200
  /** Danger actions (delete, block) always sit last so a destructive row is never the first target; order is otherwise kept. */
190
201
  export function resolveCommentMenuItems(items) {