@hjmds/design-contracts 1.29.0 → 1.31.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 (97) hide show
  1. package/dist/behaviors.d.ts +1 -0
  2. package/dist/behaviors.d.ts.map +1 -1
  3. package/dist/bottom-navigation.d.ts +24 -0
  4. package/dist/bottom-navigation.d.ts.map +1 -1
  5. package/dist/bottom-navigation.js +34 -0
  6. package/dist/bottom-navigation.js.map +1 -1
  7. package/dist/carousel.d.ts +30 -0
  8. package/dist/carousel.d.ts.map +1 -1
  9. package/dist/carousel.js +32 -0
  10. package/dist/carousel.js.map +1 -1
  11. package/dist/catalog.d.ts +382 -64
  12. package/dist/catalog.d.ts.map +1 -1
  13. package/dist/catalog.js +147 -131
  14. package/dist/catalog.js.map +1 -1
  15. package/dist/component-definitions.d.ts +21 -131
  16. package/dist/component-definitions.d.ts.map +1 -1
  17. package/dist/component-definitions.js +9 -132
  18. package/dist/component-definitions.js.map +1 -1
  19. package/dist/component-recipes.d.ts +87 -0
  20. package/dist/component-recipes.d.ts.map +1 -1
  21. package/dist/component-recipes.js +44 -1
  22. package/dist/component-recipes.js.map +1 -1
  23. package/dist/icon.d.ts +58 -1
  24. package/dist/icon.d.ts.map +1 -1
  25. package/dist/icon.js +69 -0
  26. package/dist/icon.js.map +1 -1
  27. package/dist/image-choice.d.ts +7 -0
  28. package/dist/image-choice.d.ts.map +1 -1
  29. package/dist/image-choice.js +7 -0
  30. package/dist/image-choice.js.map +1 -1
  31. package/dist/index.d.ts +4 -4
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +3 -3
  34. package/dist/index.js.map +1 -1
  35. package/dist/recipes.d.ts +1 -1
  36. package/dist/recipes.d.ts.map +1 -1
  37. package/dist/recipes.js.map +1 -1
  38. package/dist/screen-patterns.d.ts +100 -0
  39. package/dist/screen-patterns.d.ts.map +1 -1
  40. package/dist/screen-patterns.js +98 -3
  41. package/dist/screen-patterns.js.map +1 -1
  42. package/dist/showcase.d.ts.map +1 -1
  43. package/dist/showcase.js +10 -0
  44. package/dist/showcase.js.map +1 -1
  45. package/dist/steps.d.ts +16 -7
  46. package/dist/steps.d.ts.map +1 -1
  47. package/dist/steps.js +6 -1
  48. package/dist/steps.js.map +1 -1
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/dist/version.js.map +1 -1
  52. package/docs/architecture.md +18 -0
  53. package/docs/bottom-navigation.md +10 -0
  54. package/docs/carousel.md +8 -0
  55. package/docs/dialog.md +23 -0
  56. package/docs/generated/component-maturity.md +32 -29
  57. package/docs/generated/renderer-evidence.json +1551 -1118
  58. package/docs/generated/renderer-evidence.md +243 -237
  59. package/docs/generated/showcase-manifest.json +688 -69
  60. package/docs/icon.md +9 -0
  61. package/docs/screen-patterns.md +18 -0
  62. package/docs/stable-core.md +22 -0
  63. package/docs/steps.md +4 -3
  64. package/docs/usage/README.md +28 -25
  65. package/docs/usage/SELECTION.md +1 -1
  66. package/docs/usage/components/auth-screen-layout.md +15 -5
  67. package/docs/usage/components/bottom-navigation.md +65 -2
  68. package/docs/usage/components/card.md +36 -5
  69. package/docs/usage/components/carousel.md +1 -0
  70. package/docs/usage/components/chat-date-separator.md +86 -0
  71. package/docs/usage/components/chat-message.md +10 -1
  72. package/docs/usage/components/chat-screen.md +3 -2
  73. package/docs/usage/components/comment-thread-row.md +11 -3
  74. package/docs/usage/components/comment-thread-screen.md +1 -1
  75. package/docs/usage/components/dialog.md +69 -0
  76. package/docs/usage/components/editor-screen.md +6 -2
  77. package/docs/usage/components/field.md +13 -0
  78. package/docs/usage/components/icon-button.md +1 -0
  79. package/docs/usage/components/icon-tile.md +10 -1
  80. package/docs/usage/components/icon.md +45 -6
  81. package/docs/usage/components/image-choice-group.md +3 -1
  82. package/docs/usage/components/media-selection-screen.md +17 -0
  83. package/docs/usage/components/message-composer.md +4 -1
  84. package/docs/usage/components/moderation-screen.md +88 -2
  85. package/docs/usage/components/page-indicator.md +102 -0
  86. package/docs/usage/components/profile-screen.md +9 -3
  87. package/docs/usage/components/profile-summary.md +3 -3
  88. package/docs/usage/components/screen-layout.md +9 -0
  89. package/docs/usage/components/steps.md +14 -7
  90. package/docs/usage/components/tabs.md +21 -1
  91. package/docs/usage/components/text.md +30 -1
  92. package/docs/usage/components/typing-indicator.md +89 -0
  93. package/docs/usage/screens/common-login.md +3 -1
  94. package/docs/usage/screens/common-profile.md +3 -3
  95. package/docs/usage/screens/flow-editor.md +13 -2
  96. package/docs/usage/screens/flow-moderation.md +31 -3
  97. package/package.json +2 -1
@@ -401,6 +401,7 @@ export declare const behaviorRegistry: {
401
401
  readonly labels: "visible";
402
402
  readonly selection: "emphasis";
403
403
  readonly surface: "flat";
404
+ readonly iconSize: "standard";
404
405
  readonly minItems: 2;
405
406
  readonly maxItems: 6;
406
407
  };
@@ -1 +1 @@
1
- {"version":3,"file":"behaviors.d.ts","sourceRoot":"","sources":["../src/behaviors.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAC;AAEhC,gFAAgF;AAChF,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,OAAO,GACP,cAAc,GACd,SAAS,GACT,SAAS,CAAC;AACd,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAC7E,MAAM,MAAM,UAAU,GAClB,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,UAAU,GACV,MAAM,GACN,UAAU,CAAC;AACf,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;AAClD,MAAM,MAAM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E,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C,CAAC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,uBAAuB,GAAG,yBAAyB,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,CAAC;AACrD,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,OAAO,CAAC"}
@@ -28,8 +28,15 @@ export type BottomNavigationConfiguration = Readonly<{
28
28
  * product supplies colors through palette roles instead of deprecated styles.
29
29
  */
30
30
  surface?: BottomNavigationSurface;
31
+ /**
32
+ * Icon slot size. `standard` keeps the density glyph; `large`/`xlarge` reserve an app-icon sized slot
33
+ * (`bottomNavigationRecipe.iconSizes`) for artwork rendered through `renderIcon`. Added 2026-10-18 for
34
+ * Utilverse's dock, which drew its own Surface/Button row to show 38-54pt app icons.
35
+ */
36
+ iconSize?: BottomNavigationIconSize;
31
37
  }>;
32
38
  export type BottomNavigationSurface = "flat" | "raised";
39
+ export type BottomNavigationIconSize = "standard" | "large" | "xlarge";
33
40
  export type ResolvedBottomNavigationConfiguration = Readonly<{
34
41
  presentation: BottomNavigationPresentation;
35
42
  distribution: BottomNavigationDistribution;
@@ -39,6 +46,7 @@ export type ResolvedBottomNavigationConfiguration = Readonly<{
39
46
  labels: BottomNavigationLabels;
40
47
  selection: "emphasis" | "tile";
41
48
  surface: BottomNavigationSurface;
49
+ iconSize: BottomNavigationIconSize;
42
50
  }>;
43
51
  /**
44
52
  * Bottom navigation only accepts numeric counters. A silent status dot is too
@@ -79,6 +87,13 @@ export type BottomNavigationItemDescriptor<Key extends string = string, IconName
79
87
  icon: BottomNavigationIconDescriptor<IconName>;
80
88
  badge?: BottomNavigationCounterBadge;
81
89
  disabled?: boolean;
90
+ /**
91
+ * Raised center destination: a selectable route drawn as a lifted brand circle above the bar, with its label
92
+ * below. Only the middle item of an odd item count may be prominent. Unlike `primaryAction` it is a real
93
+ * destination (selected state, reselect, router-owned). Added 2026-10-18 for Diairy's "write" tab, which
94
+ * replaced the shared bar with Expo Router's default tab bar to draw it.
95
+ */
96
+ prominent?: boolean;
82
97
  }>;
83
98
  /** The router owns selectedKey; the design-system never keeps a second copy. */
84
99
  export type BottomNavigationDescriptor<Key extends string = string, IconName extends string = SemanticIconName> = Readonly<{
@@ -102,6 +117,7 @@ export type ResolvedBottomNavigationItemDescriptor<Key extends string = string,
102
117
  disabled: boolean;
103
118
  badge: ResolvedBottomNavigationCounterBadge | null;
104
119
  resolvedAccessibilityLabel: string;
120
+ prominent: boolean;
105
121
  }>;
106
122
  export type ResolvedBottomNavigationDescriptor<Key extends string = string, IconName extends string = SemanticIconName> = Readonly<{
107
123
  accessibilityLabel: string;
@@ -124,12 +140,20 @@ export declare const bottomNavigationBehaviorDefaults: {
124
140
  readonly labels: "visible";
125
141
  readonly selection: "emphasis";
126
142
  readonly surface: "flat";
143
+ readonly iconSize: "standard";
127
144
  readonly minItems: 2;
128
145
  readonly maxItems: 6;
129
146
  };
130
147
  export declare function validateBottomNavigationConfiguration(configuration: BottomNavigationConfiguration, itemCount: number): void;
131
148
  export declare function resolveBottomNavigationConfiguration(configuration: BottomNavigationConfiguration, itemCount: number): ResolvedBottomNavigationConfiguration;
132
149
  export declare function validateBottomNavigationDescriptor<Key extends string, IconName extends string>(descriptor: BottomNavigationDescriptor<Key, IconName>): void;
150
+ /**
151
+ * A prominent destination needs the plain row: center-gap reserves the same slot for a primaryAction, capsule
152
+ * places actions beside the surface, and a tile card would paint behind the lifted circle.
153
+ */
154
+ export declare function validateBottomNavigationProminence(items: readonly Readonly<{
155
+ prominent?: boolean;
156
+ }>[], configuration: ResolvedBottomNavigationConfiguration): void;
133
157
  export declare function resolveBottomNavigationItem<Key extends string, IconName extends string>(item: BottomNavigationItemDescriptor<Key, IconName>): ResolvedBottomNavigationItemDescriptor<Key, IconName>;
134
158
  export declare function resolveBottomNavigationDescriptor<Key extends string, IconName extends string>(descriptor: BottomNavigationDescriptor<Key, IconName>): ResolvedBottomNavigationDescriptor<Key, IconName>;
135
159
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-navigation.d.ts","sourceRoot":"","sources":["../src/bottom-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EAElC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAC9D,MAAM,MAAM,gCAAgC,GAAG,MAAM,GAAG,QAAQ,CAAC;AACjE;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE1D,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,gBAAgB,CAAC,EAAE,gCAAgC,CAAC;IACpD,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAChC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,MAAM,MAAM,qCAAqC,GAAG,QAAQ,CAAC;IAC3D,YAAY,EAAE,4BAA4B,CAAC;IAC3C,YAAY,EAAE,4BAA4B,CAAC;IAC3C,OAAO,EAAE,uBAAuB,CAAC;IACjC,SAAS,EAAE,yBAAyB,CAAC;IACrC,gBAAgB,EAAE,gCAAgC,CAAC;IACnD,MAAM,EAAE,s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HH,wBAAgB,qCAAqC,CACnD,aAAa,EAAE,6BAA6B,EAC5C,SAAS,EAAE,MAAM,GAChB,IAAI,CAqFN;AAED,wBAAgB,oCAAoC,CAClD,aAAa,EAAE,6BAA6B,EAC5C,SAAS,EAAE,MAAM,GAChB,qCAAqC,CAiBvC;AAED,wBAAgB,kCAAkC,CAChD,GAAG,SAAS,MAAM,EAClB,QAAQ,SAAS,MAAM,EACvB,UAAU,EAAE,0BAA0B,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,IAAI,CA0D7D;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,SAAS,QAAQ,CAAC;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,EACnD,aAAa,EAAE,qCAAqC,GACnD,IAAI,CAWN;AAED,wBAAgB,2BAA2B,CACzC,GAAG,SAAS,MAAM,EAClB,QAAQ,SAAS,MAAM,EAEvB,IAAI,EAAE,8BAA8B,CAAC,GAAG,EAAE,QAAQ,CAAC,GAClD,sCAAsC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAyBvD;AAED,wBAAgB,iCAAiC,CAC/C,GAAG,SAAS,MAAM,EAClB,QAAQ,SAAS,MAAM,EAEvB,UAAU,EAAE,0BAA0B,CAAC,GAAG,EAAE,QAAQ,CAAC,GACpD,kCAAkC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAOnD;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,SAAS,MAAM,EAClB,QAAQ,SAAS,MAAM,EAEvB,UAAU,EAAE,0BAA0B,CAAC,GAAG,EAAE,QAAQ,CAAC,EACrD,GAAG,EAAE,GAAG,GACP,0BAA0B,CAAC,GAAG,CAAC,GAAG,IAAI,CAQxC"}
@@ -13,6 +13,7 @@ export const bottomNavigationBehaviorDefaults = {
13
13
  labels: "visible",
14
14
  selection: "emphasis",
15
15
  surface: "flat",
16
+ iconSize: "standard",
16
17
  minItems: 2,
17
18
  maxItems: 6,
18
19
  };
@@ -36,6 +37,7 @@ const configurationKeys = new Set([
36
37
  "labels",
37
38
  "selection",
38
39
  "surface",
40
+ "iconSize",
39
41
  ]);
40
42
  const descriptorKeys = new Set(["accessibilityLabel", "items", "selectedKey"]);
41
43
  const itemKeys = new Set([
@@ -45,6 +47,7 @@ const itemKeys = new Set([
45
47
  "icon",
46
48
  "badge",
47
49
  "disabled",
50
+ "prominent",
48
51
  ]);
49
52
  const iconKeys = new Set(["name", "decorative"]);
50
53
  const badgeKeys = new Set(["count", "max", "accessibilityLabel"]);
@@ -98,6 +101,9 @@ function validateItem(item) {
98
101
  }
99
102
  if (item.badge !== undefined)
100
103
  validateBadge(item.badge);
104
+ if (item.prominent !== undefined && typeof item.prominent !== "boolean") {
105
+ throw new TypeError("BottomNavigation item prominent must be a boolean");
106
+ }
101
107
  }
102
108
  const presentations = new Set(["bar", "floating", "capsule"]);
103
109
  const distributions = new Set(["equal", "center-gap"]);
@@ -108,6 +114,7 @@ const keyboardBehaviors = new Set([
108
114
  "remain",
109
115
  ]);
110
116
  const labelModes = new Set(["visible", "hidden"]);
117
+ const iconSizes = new Set(["standard", "large", "xlarge"]);
111
118
  export function validateBottomNavigationConfiguration(configuration, itemCount) {
112
119
  if (!isObject(configuration)) {
113
120
  throw new TypeError("BottomNavigation configuration must be an object");
@@ -159,6 +166,9 @@ export function validateBottomNavigationConfiguration(configuration, itemCount)
159
166
  if (configuration.presentation === "capsule" && configuration.distribution === "center-gap") {
160
167
  throw new TypeError("BottomNavigation capsule uses an adjacent action, not center-gap");
161
168
  }
169
+ if (configuration.iconSize !== undefined && !iconSizes.has(configuration.iconSize)) {
170
+ throw new TypeError(`Unsupported BottomNavigation iconSize: ${String(configuration.iconSize)}`);
171
+ }
162
172
  if (configuration.distribution === "center-gap" && itemCount % 2 !== 0) {
163
173
  throw new RangeError("BottomNavigation center-gap distribution requires an even destination count");
164
174
  }
@@ -175,6 +185,7 @@ export function resolveBottomNavigationConfiguration(configuration, itemCount) {
175
185
  labels: configuration.labels ?? bottomNavigationBehaviorDefaults.labels,
176
186
  selection: configuration.selection ?? bottomNavigationBehaviorDefaults.selection,
177
187
  surface: configuration.surface ?? bottomNavigationBehaviorDefaults.surface,
188
+ iconSize: configuration.iconSize ?? bottomNavigationBehaviorDefaults.iconSize,
178
189
  };
179
190
  }
180
191
  export function validateBottomNavigationDescriptor(descriptor) {
@@ -206,6 +217,28 @@ export function validateBottomNavigationDescriptor(descriptor) {
206
217
  if (selected.disabled) {
207
218
  throw new RangeError("BottomNavigation selected destination must be enabled");
208
219
  }
220
+ const prominentIndex = descriptor.items.findIndex((item) => item.prominent === true);
221
+ if (prominentIndex !== -1) {
222
+ // The lifted circle is centered over the bar; any other slot would sit off-center and overlap a neighbour.
223
+ if (descriptor.items.length % 2 === 0 ||
224
+ prominentIndex !== (descriptor.items.length - 1) / 2 ||
225
+ descriptor.items.filter((item) => item.prominent === true).length > 1) {
226
+ throw new RangeError("BottomNavigation prominent destination must be the single middle item of an odd item count");
227
+ }
228
+ }
229
+ }
230
+ /**
231
+ * A prominent destination needs the plain row: center-gap reserves the same slot for a primaryAction, capsule
232
+ * places actions beside the surface, and a tile card would paint behind the lifted circle.
233
+ */
234
+ export function validateBottomNavigationProminence(items, configuration) {
235
+ if (!items.some((item) => item.prominent === true))
236
+ return;
237
+ if (configuration.distribution !== "equal" ||
238
+ configuration.presentation === "capsule" ||
239
+ configuration.selection === "tile") {
240
+ throw new TypeError("BottomNavigation prominent destination requires equal distribution, bar or floating presentation and emphasis selection");
241
+ }
209
242
  }
210
243
  export function resolveBottomNavigationItem(item) {
211
244
  validateItem(item);
@@ -224,6 +257,7 @@ export function resolveBottomNavigationItem(item) {
224
257
  label: item.label,
225
258
  icon: { name: item.icon.name, decorative: true },
226
259
  disabled: item.disabled ?? false,
260
+ prominent: item.prominent ?? false,
227
261
  badge,
228
262
  resolvedAccessibilityLabel: badge && item.badge
229
263
  ? `${baseAccessibilityLabel}, ${item.badge.accessibilityL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,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;IACxE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO;QACL,GAAG;QACH,MAAM,EAAE,GAAG,KAAK,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;KACjE,CAAC;AACJ,CAAC","sourcesContent":["import {\n type BottomNavigationDensity,\n type BottomNavigationDistribution,\n type BottomNavigationPresentation,\n bottomNavigationRecipeDefaults,\n} from \"./bottom-navigation-defaults.js\";\nimport { formatCounterBadgeCount } from \"./counter-badge.js\";\nimport {\n type SemanticIconName,\n} from \"./icon.js\";\nimport type { DesignSystemDirection } from \"./design-system-provider.js\";\n\nexport type BottomNavigationDirection = DesignSystemDirection;\nexport type BottomNavigationKeyboardBehavior = \"hide\" | \"remain\";\n/**\n * `hidden` drops the visible destination name and keeps it as the item's\n * accessible name. Icon-only bars rely on the icon stroke/scale emphasis (and\n * any product selection mark) for non-color selected evidence, so products\n * choose it deliberately; the default keeps labels visible. Added 2026-10-10\n * for BurnTok's icon-only dock instead of letting the app hide labels with\n * deprecated styles or transparent palette overrides.\n */\nexport type BottomNavigationLabels = \"visible\" | \"hidden\";\n\nexport type BottomNavigationConfiguration = Readonly<{\n presentation?: BottomNavigationPresentation;\n distribution?: BottomNavigationDistribution;\n density?: BottomNavigationDensity;\n direction?: BottomNavigationDirection;\n keyboardBehavior?: BottomNavigationKeyboardBehavior;\n labels?: BottomNavigationLabels;\n /** Inset selected destination card, with equal widths and persistent labels. Floating only. */\n selection?: \"emphasis\" | \"tile\";\n /**\n * `raised` paints the tile bar as a thick plank: a sunken surface role with a\n * control-colored lower edge, and a darker lower edge under the selected tile.\n * Tile selection only. Added 2026-10-13 for Spint's wooden-sign tab bar so the\n * product supplies colors through palette roles instead of deprecated styles.\n */\n surface?: BottomNavigationSurface;\n}>;\n\nexport type BottomNavigationSurface = \"flat\" | \"raised\";\n\nexport type ResolvedBottomNavigationConfiguration = Readonly<{\n presentation: BottomNavigationPresentation;\n distribution: BottomNavigationDistribution;\n density: BottomNavigationDensity;\n direction: BottomNavigationDirection;\n keyboardBehavior: BottomNavigationKeyboardBehavior;\n labels: BottomNavigationLabels;\n selection: \"emphasis\" | \"tile\";\n surface: BottomNavigationSurface;\n}>;\n\n/**\n * Bottom navigation only accepts numeric counters. A silent status dot is too\n * ambiguous for a persistent, top-level destination.\n */\nexport type BottomNavigationCounterBadge = Readonly<{\n count: number;\n max?: number;\n /** Product-localized copy, for example \"3 unread messages\". */\n accessibilityLabel: string;\n}>;\n\n/**\n * BottomNavigation owns icon appearance through its density and state recipe.\n * Products may extend the semantic name registry, but never override size,\n * tone, stroke weight, accessibility, or logical direction at the call site.\n */\nexport type BottomNavigationIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n name: IconName;\n decorative?: true;\n accessibilityLabel?: never;\n size?: never;\n tone?: never;\n weight?: never;\n directionality?: never;\n}>;\n\nexport type ResolvedBottomNavigationIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n name: IconName;\n decorative: true;\n}>;\n\n/**\n * Items are stable top-level destinations, never actions. The icon is always\n * decorative because the visible/item accessibility label already names it.\n */\nexport type BottomNavigationItemDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n id: Key;\n label: string;\n accessibilityLabel?: string;\n icon: BottomNavigationIconDescriptor<IconName>;\n badge?: BottomNavigationCounterBadge;\n disabled?: boolean;\n}>;\n\n/** The router owns selectedKey; the design-system never keeps a second copy. */\nexport type BottomNavigationDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n accessibilityLabel: string;\n items: readonly BottomNavigationItemDescriptor<Key, IconName>[];\n selectedKey: Key;\n}>;\n\n/**\n * The resolved badge intentionally has no accessible label. Renderers hide its\n * subtree and use only the item's resolvedAccessibilityLabel, preventing the\n * counter from being announced twice.\n */\nexport type ResolvedBottomNavigationCounterBadge = Readonly<{\n visibleLabel: string;\n hiddenFromAccessibility: true;\n}>;\n\nexport type ResolvedBottomNavigationItemDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n id: Key;\n label: string;\n icon: ResolvedBottomNavigationIconDescriptor<IconName>;\n disabled: boolean;\n badge: ResolvedBottomNavigationCounterBadge | null;\n resolvedAccessibilityLabel: string;\n}>;\n\nexport type ResolvedBottomNavigationDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n accessibilityLabel: string;\n items: readonly ResolvedBottomNavigationItemDescriptor<Key, IconName>[];\n selectedKey: Key;\n}>;\n\nexport type BottomNavigationActivation<Key extends string = string> = Readonly<{\n key: Key;\n reason: \"navigate\" | \"reselect\";\n}>;\n\n/**\n * `maxItems` follows the platform bars rather than Material's five-destination\n * guidance: iOS tab bars and Android navigation bars both render six labelled\n * destinations without collapsing, and products that ship six need the shared\n * contract to describe them instead of routing around it.\n */\nexport const bottomNavigationBehaviorDefaults = {\n direction: \"ltr\",\n keyboardBehavior: \"hide\",\n labels: \"visible\",\n selection: \"emphasis\",\n surface: \"flat\",\n minItems: 2,\n maxItems: 6,\n} as const satisfies Readonly<{\n direction: BottomNavigationDirection;\n keyboardBehavior: BottomNavigationKeyboardBehavior;\n labels: BottomNavigationLabels;\n selection: \"emphasis\" | \"tile\";\n surface: BottomNavigationSurface;\n minItems: number;\n maxItems: number;\n}>;\n\nfunction validateTrimmedCopy(value: unknown, field: string): asserts value is string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`${field} must not be empty`);\n }\n if (value !== value.trim()) {\n throw new TypeError(`${field} must not start or end with whitespace`);\n }\n}\n\nfunction isObject(value: unknown): value is Readonly<Record<string, unknown>> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nconst configurationKeys = new Set([\n \"presentation\",\n \"distribution\",\n \"density\",\n \"direction\",\n \"keyboardBehavior\",\n \"labels\",\n \"selection\",\n \"surface\",\n]);\nconst descriptorKeys = new Set([\"accessibilityLabel\", \"items\", \"selectedKey\"]);\nconst itemKeys = new Set([\n \"id\",\n \"label\",\n \"accessibilityLabel\",\n \"icon\",\n \"badge\",\n \"disabled\",\n]);\nconst iconKeys = new Set([\"name\", \"decorative\"]);\nconst badgeKeys = new Set([\"count\", \"max\", \"accessibilityLabel\"]);\n\nfunction rejectUnknownKeys(\n value: Readonly<Record<string, unknown>>,\n allowed: ReadonlySet<string>,\n field: string,\n): void {\n for (const key of Object.keys(value)) {\n if (!allowed.has(key)) {\n throw new TypeError(`Unsupported BottomNavigation ${field} field: ${key}`);\n }\n }\n}\n\nfunction normalizedCopy(value: string): string {\n return value.normalize(\"NFKC\").toLocaleLowerCase();\n}\n\nfunction validateBadge(badge: BottomNavigationCounterBadge): void {\n if (!isObject(badge)) {\n throw new TypeError(\"BottomNavigation badge must be an object\");\n }\n rejectUnknownKeys(badge, badgeKeys, \"badge\");\n if (!Number.isSafeInteger(badge.count) || badge.count < 0) {\n throw new TypeError(\"BottomNavigation badge count must be a non-negative safe integer\");\n }\n if (\n badge.max !== undefined &&\n (!Number.isSafeInteger(badge.max) || badge.max < 1)\n ) {\n throw new TypeError(\"BottomNavigation badge max must be a positive safe integer\");\n }\n validateTrimmedCopy(\n badge.accessibilityLabel,\n \"BottomNavigation badge accessibilityLabel\",\n );\n}\n\nfunction validateItem<Key extends string, IconName extends string>(\n item: BottomNavigationItemDescriptor<Key, IconName>,\n): void {\n if (!isObject(item)) {\n throw new TypeError(\"BottomNavigation item must be an object\");\n }\n rejectUnknownKeys(item, itemKeys, \"item\");\n validateTrimmedCopy(item.id, \"BottomNavigation item id\");\n validateTrimmedCopy(item.label, \"BottomNavigation item label\");\n if (item.accessibilityLabel !== undefined) {\n validateTrimmedCopy(\n item.accessibilityLabel,\n \"BottomNavigation item accessibilityLabel\",\n );\n if (\n !normalizedCopy(item.accessibilityLabel).includes(\n normalizedCopy(item.label),\n )\n ) {\n throw new TypeError(\n \"BottomNavigation item accessibilityLabel must include the visible label\",\n );\n }\n }\n if (!isObject(item.icon)) {\n throw new TypeError(\"BottomNavigation item icon must be an object\");\n }\n if (item.icon.decorative !== undefined && item.icon.decorative !== true) {\n throw new TypeError(\"BottomNavigation item icon must be decorative\");\n }\n rejectUnknownKeys(item.icon, iconKeys, \"item icon\");\n validateTrimmedCopy(item.icon.name, \"BottomNavigation item icon name\");\n if (item.disabled !== undefined && typeof item.disabled !== \"boolean\") {\n throw new TypeError(\"BottomNavigation item disabled must be a boolean\");\n }\n if (item.badge !== undefined) validateBadge(item.badge);\n}\n\nconst presentations = new Set<BottomNavigationPresentation>([\"bar\", \"floating\", \"capsule\"]);\nconst distributions = new Set<BottomNavigationDistribution>([\"equal\", \"center-gap\"]);\nconst densities = new Set<BottomNavigationDensity>([\"compact\", \"regular\"]);\nconst directions = new Set<BottomNavigationDirection>([\"ltr\", \"rtl\"]);\nconst keyboardBehaviors = new Set<BottomNavigationKeyboardBehavior>([\n \"hide\",\n \"remain\",\n]);\nconst labelModes = new Set<BottomNavigationLabels>([\"visible\", \"hidden\"]);\n\nexport function validateBottomNavigationConfiguration(\n configuration: BottomNavigationConfiguration,\n itemCount: number,\n): void {\n if (!isObject(configuration)) {\n throw new TypeError(\"BottomNavigation configuration must be an object\");\n }\n rejectUnknownKeys(configuration, configurationKeys, \"configuration\");\n if (\n !Number.isSafeInteger(itemCount) ||\n itemCount < bottomNavigationBehaviorDefaults.minItems ||\n itemCount > bottomNavigationBehaviorDefaults.maxItems\n ) {\n throw new RangeError(\n `BottomNavigation configuration requires ${bottomNavigationBehaviorDefaults.minItems} to ${bottomNavigationBehaviorDefaults.maxItems} destinations`,\n );\n }\n if (\n configuration.presentation !== undefined &&\n !presentations.has(configuration.presentation)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation presentation: ${String(configuration.presentation)}`,\n );\n }\n if (\n configuration.distribution !== undefined &&\n !distributions.has(configuration.distribution)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation distribution: ${String(configuration.distribution)}`,\n );\n }\n if (configuration.density !== undefined && !densities.has(configuration.density)) {\n throw new TypeError(\n `Unsupported BottomNavigation density: ${String(configuration.density)}`,\n );\n }\n if (\n configuration.direction !== undefined &&\n !directions.has(configuration.direction)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation direction: ${String(configuration.direction)}`,\n );\n }\n if (\n configuration.keyboardBehavior !== undefined &&\n !keyboardBehaviors.has(configuration.keyboardBehavior)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation keyboardBehavior: ${String(configuration.keyboardBehavior)}`,\n );\n }\n if (configuration.labels !== undefined && !labelModes.has(configuration.labels)) {\n throw new TypeError(\n `Unsupported BottomNavigation labels: ${String(configuration.labels)}`,\n );\n }\n if (configuration.selection !== undefined && ![\"emphasis\", \"tile\"].includes(configuration.selection)) {\n throw new TypeError(\"Unsupported BottomNavigation selection\");\n }\n // Spint's selected card must not inherit capsule's hidden names or unequal widths.\n if (configuration.selection === \"tile\" &&\n (configuration.presentation !== \"floating\" || configuration.distribution === \"center-gap\" || configuration.labels === \"hidden\")) {\n throw new TypeError(\"BottomNavigation tile selection requires floating, equal distribution and visible labels\");\n }\n if (configuration.surface !== undefined && ![\"flat\", \"raised\"].includes(configuration.surface)) {\n throw new TypeError(\"Unsupported BottomNavigation surface\");\n }\n // The lower edges belong to the tile row; an emphasis bar has no selected card to lift.\n if (configuration.surface === \"raised\" && configuration.selection !== \"tile\") {\n throw new TypeError(\"BottomNavigation raised surface requires tile selection\");\n }\n // Capsule actions sit beside the destination surface, so reserving a central gap would duplicate their space.\n if (configuration.presentation === \"capsule\" && configuration.distribution === \"center-gap\") {\n throw new TypeError(\"BottomNavigation capsule uses an adjacent action, not center-gap\");\n }\n if (configuration.distribution === \"center-gap\" && itemCount % 2 !== 0) {\n throw new RangeError(\n \"BottomNavigation center-gap distribution requires an even destination count\",\n );\n }\n}\n\nexport function resolveBottomNavigationConfiguration(\n configuration: BottomNavigationConfiguration,\n itemCount: number,\n): ResolvedBottomNavigationConfiguration {\n validateBottomNavigationConfiguration(configuration, itemCount);\n return {\n presentation:\n configuration.presentation ?? bottomNavigationRecipeDefaults.presentation,\n distribution:\n configuration.distribution ?? bottomNavigationRecipeDefaults.distribution,\n density: configuration.density ?? bottomNavigationRecipeDefaults.density,\n direction: configuration.direction ?? bottomNavigationBehaviorDefaults.direction,\n keyboardBehavior:\n configuration.keyboardBehavior ??\n bottomNavigationBehaviorDefaults.keyboardBehavior,\n labels: configuration.labels ?? bottomNavigationBehaviorDefaults.labels,\n selection: configuration.selection ?? bottomNavigationBehaviorDefaults.selection,\n surface: configuration.surface ?? bottomNavigationBehaviorDefaults.surface,\n };\n}\n\nexport function validateBottomNavigationDescriptor<\n Key extends string,\n IconName extends string,\n>(descriptor: BottomNavigationDescriptor<Key, IconName>): void {\n if (!isObject(descriptor)) {\n throw new TypeError(\"BottomNavigation descriptor must be an object\");\n }\n rejectUnknownKeys(descriptor, descriptorKeys, \"descriptor\");\n validateTrimmedCopy(\n descriptor.accessibilityLabel,\n \"BottomNavigation accessibilityLabel\",\n );\n if (!Array.isArray(descriptor.items)) {\n throw new TypeError(\"BottomNavigation items must be an array\");\n }\n validateTrimmedCopy(\n descriptor.selectedKey,\n \"BottomNavigation selectedKey\",\n );\n if (\n descriptor.items.length < bottomNavigationBehaviorDefaults.minItems ||\n descriptor.items.length > bottomNavigationBehaviorDefaults.maxItems\n ) {\n throw new RangeError(\n `BottomNavigation must contain ${bottomNavigationBehaviorDefaults.minItems} to ${bottomNavigationBehaviorDefaults.maxItems} destinations`,\n );\n }\n\n const ids = new Set<Key>();\n for (const item of descriptor.items) {\n validateItem(item);\n if (ids.has(item.id)) {\n throw new TypeError(`Duplicate BottomNavigation item id: ${item.id}`);\n }\n ids.add(item.id);\n }\n\n const selected = descriptor.items.find(\n (item) => item.id === descriptor.selectedKey,\n );\n if (!selected) {\n throw new RangeError(\n `BottomNavigation selectedKey must exist: ${descriptor.selectedKey}`,\n );\n }\n if (selected.disabled) {\n throw new RangeError(\"BottomNavigation selected destination must be enabled\");\n }\n}\n\nexport function resolveBottomNavigationItem<\n Key extends string,\n IconName extends string,\n>(\n item: BottomNavigationItemDescriptor<Key, IconName>,\n): ResolvedBottomNavigationItemDescriptor<Key, IconName> {\n validateItem(item);\n const baseAccessibilityLabel = item.accessibilityLabel ?? item.label;\n const visibleBadgeLabel = item.badge\n ? formatCounterBadgeCount(item.badge.count, item.badge.max)\n : null;\n const badge = visibleBadgeLabel\n ? ({\n visibleLabel: visibleBadgeLabel,\n hiddenFromAccessibility: true,\n } as const)\n : null;\n\n return {\n id: item.id,\n label: item.label,\n icon: { name: item.icon.name, decorative: true },\n disabled: item.disabled ?? false,\n badge,\n resolvedAccessibilityLabel:\n badge && item.badge\n ? `${baseAccessibilityLabel}, ${item.badge.accessibilityLabel}`\n : baseAccessibilityLabel,\n };\n}\n\nexport function resolveBottomNavigationDescriptor<\n Key extends string,\n IconName extends string,\n>(\n descriptor: BottomNavigationDescriptor<Key, IconName>,\n): ResolvedBottomNavigationDescriptor<Key, IconName> {\n validateBottomNavigationDescriptor(descriptor);\n return {\n accessibilityLabel: descriptor.accessibilityLabel,\n items: descriptor.items.map(resolveBottomNavigationItem),\n selectedKey: descriptor.selectedKey,\n };\n}\n\n/**\n * Produces navigation intent without mutating selectedKey. A renderer forwards\n * the request to its router, which updates selectedKey only after navigation.\n */\nexport function resolveBottomNavigationActivation<\n Key extends string,\n IconName extends string,\n>(\n descriptor: BottomNavigationDescriptor<Key, IconName>,\n key: Key,\n): BottomNavigationActivation<Key> | null {\n validateBottomNavigationDescriptor(descriptor);\n const item = descriptor.items.find((candidate) => candidate.id === key);\n if (!item || item.disabled) return null;\n return {\n key,\n reason: key === descriptor.selectedKey ? \"reselect\" : \"navigate\",\n };\n}\n"]}
1
+ {"version":3,"file":"bottom-navigation.js","sourceRoot":"","sources":["../src/bottom-navigation.ts"],"names":[],"mappings":"AAAA,OAAO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B,CAAC;QACxD,WAAW,EAAE,UAAU,CAAC,WAAW;KACpC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iCAAiC,CAI/C,UAAqD,EACrD,GAAQ;IAER,kCAAkC,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;IACxE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO;QACL,GAAG;QACH,MAAM,EAAE,GAAG,KAAK,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;KACjE,CAAC;AACJ,CAAC","sourcesContent":["import {\n type BottomNavigationDensity,\n type BottomNavigationDistribution,\n type BottomNavigationPresentation,\n bottomNavigationRecipeDefaults,\n} from \"./bottom-navigation-defaults.js\";\nimport { formatCounterBadgeCount } from \"./counter-badge.js\";\nimport {\n type SemanticIconName,\n} from \"./icon.js\";\nimport type { DesignSystemDirection } from \"./design-system-provider.js\";\n\nexport type BottomNavigationDirection = DesignSystemDirection;\nexport type BottomNavigationKeyboardBehavior = \"hide\" | \"remain\";\n/**\n * `hidden` drops the visible destination name and keeps it as the item's\n * accessible name. Icon-only bars rely on the icon stroke/scale emphasis (and\n * any product selection mark) for non-color selected evidence, so products\n * choose it deliberately; the default keeps labels visible. Added 2026-10-10\n * for BurnTok's icon-only dock instead of letting the app hide labels with\n * deprecated styles or transparent palette overrides.\n */\nexport type BottomNavigationLabels = \"visible\" | \"hidden\";\n\nexport type BottomNavigationConfiguration = Readonly<{\n presentation?: BottomNavigationPresentation;\n distribution?: BottomNavigationDistribution;\n density?: BottomNavigationDensity;\n direction?: BottomNavigationDirection;\n keyboardBehavior?: BottomNavigationKeyboardBehavior;\n labels?: BottomNavigationLabels;\n /** Inset selected destination card, with equal widths and persistent labels. Floating only. */\n selection?: \"emphasis\" | \"tile\";\n /**\n * `raised` paints the tile bar as a thick plank: a sunken surface role with a\n * control-colored lower edge, and a darker lower edge under the selected tile.\n * Tile selection only. Added 2026-10-13 for Spint's wooden-sign tab bar so the\n * product supplies colors through palette roles instead of deprecated styles.\n */\n surface?: BottomNavigationSurface;\n /**\n * Icon slot size. `standard` keeps the density glyph; `large`/`xlarge` reserve an app-icon sized slot\n * (`bottomNavigationRecipe.iconSizes`) for artwork rendered through `renderIcon`. Added 2026-10-18 for\n * Utilverse's dock, which drew its own Surface/Button row to show 38-54pt app icons.\n */\n iconSize?: BottomNavigationIconSize;\n}>;\n\nexport type BottomNavigationSurface = \"flat\" | \"raised\";\nexport type BottomNavigationIconSize = \"standard\" | \"large\" | \"xlarge\";\n\nexport type ResolvedBottomNavigationConfiguration = Readonly<{\n presentation: BottomNavigationPresentation;\n distribution: BottomNavigationDistribution;\n density: BottomNavigationDensity;\n direction: BottomNavigationDirection;\n keyboardBehavior: BottomNavigationKeyboardBehavior;\n labels: BottomNavigationLabels;\n selection: \"emphasis\" | \"tile\";\n surface: BottomNavigationSurface;\n iconSize: BottomNavigationIconSize;\n}>;\n\n/**\n * Bottom navigation only accepts numeric counters. A silent status dot is too\n * ambiguous for a persistent, top-level destination.\n */\nexport type BottomNavigationCounterBadge = Readonly<{\n count: number;\n max?: number;\n /** Product-localized copy, for example \"3 unread messages\". */\n accessibilityLabel: string;\n}>;\n\n/**\n * BottomNavigation owns icon appearance through its density and state recipe.\n * Products may extend the semantic name registry, but never override size,\n * tone, stroke weight, accessibility, or logical direction at the call site.\n */\nexport type BottomNavigationIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n name: IconName;\n decorative?: true;\n accessibilityLabel?: never;\n size?: never;\n tone?: never;\n weight?: never;\n directionality?: never;\n}>;\n\nexport type ResolvedBottomNavigationIconDescriptor<\n IconName extends string = SemanticIconName,\n> = Readonly<{\n name: IconName;\n decorative: true;\n}>;\n\n/**\n * Items are stable top-level destinations, never actions. The icon is always\n * decorative because the visible/item accessibility label already names it.\n */\nexport type BottomNavigationItemDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n id: Key;\n label: string;\n accessibilityLabel?: string;\n icon: BottomNavigationIconDescriptor<IconName>;\n badge?: BottomNavigationCounterBadge;\n disabled?: boolean;\n /**\n * Raised center destination: a selectable route drawn as a lifted brand circle above the bar, with its label\n * below. Only the middle item of an odd item count may be prominent. Unlike `primaryAction` it is a real\n * destination (selected state, reselect, router-owned). Added 2026-10-18 for Diairy's \"write\" tab, which\n * replaced the shared bar with Expo Router's default tab bar to draw it.\n */\n prominent?: boolean;\n}>;\n\n/** The router owns selectedKey; the design-system never keeps a second copy. */\nexport type BottomNavigationDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n accessibilityLabel: string;\n items: readonly BottomNavigationItemDescriptor<Key, IconName>[];\n selectedKey: Key;\n}>;\n\n/**\n * The resolved badge intentionally has no accessible label. Renderers hide its\n * subtree and use only the item's resolvedAccessibilityLabel, preventing the\n * counter from being announced twice.\n */\nexport type ResolvedBottomNavigationCounterBadge = Readonly<{\n visibleLabel: string;\n hiddenFromAccessibility: true;\n}>;\n\nexport type ResolvedBottomNavigationItemDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n id: Key;\n label: string;\n icon: ResolvedBottomNavigationIconDescriptor<IconName>;\n disabled: boolean;\n badge: ResolvedBottomNavigationCounterBadge | null;\n resolvedAccessibilityLabel: string;\n prominent: boolean;\n}>;\n\nexport type ResolvedBottomNavigationDescriptor<\n Key extends string = string,\n IconName extends string = SemanticIconName,\n> = Readonly<{\n accessibilityLabel: string;\n items: readonly ResolvedBottomNavigationItemDescriptor<Key, IconName>[];\n selectedKey: Key;\n}>;\n\nexport type BottomNavigationActivation<Key extends string = string> = Readonly<{\n key: Key;\n reason: \"navigate\" | \"reselect\";\n}>;\n\n/**\n * `maxItems` follows the platform bars rather than Material's five-destination\n * guidance: iOS tab bars and Android navigation bars both render six labelled\n * destinations without collapsing, and products that ship six need the shared\n * contract to describe them instead of routing around it.\n */\nexport const bottomNavigationBehaviorDefaults = {\n direction: \"ltr\",\n keyboardBehavior: \"hide\",\n labels: \"visible\",\n selection: \"emphasis\",\n surface: \"flat\",\n iconSize: \"standard\",\n minItems: 2,\n maxItems: 6,\n} as const satisfies Readonly<{\n direction: BottomNavigationDirection;\n keyboardBehavior: BottomNavigationKeyboardBehavior;\n labels: BottomNavigationLabels;\n selection: \"emphasis\" | \"tile\";\n surface: BottomNavigationSurface;\n iconSize: BottomNavigationIconSize;\n minItems: number;\n maxItems: number;\n}>;\n\nfunction validateTrimmedCopy(value: unknown, field: string): asserts value is string {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`${field} must not be empty`);\n }\n if (value !== value.trim()) {\n throw new TypeError(`${field} must not start or end with whitespace`);\n }\n}\n\nfunction isObject(value: unknown): value is Readonly<Record<string, unknown>> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nconst configurationKeys = new Set([\n \"presentation\",\n \"distribution\",\n \"density\",\n \"direction\",\n \"keyboardBehavior\",\n \"labels\",\n \"selection\",\n \"surface\",\n \"iconSize\",\n]);\nconst descriptorKeys = new Set([\"accessibilityLabel\", \"items\", \"selectedKey\"]);\nconst itemKeys = new Set([\n \"id\",\n \"label\",\n \"accessibilityLabel\",\n \"icon\",\n \"badge\",\n \"disabled\",\n \"prominent\",\n]);\nconst iconKeys = new Set([\"name\", \"decorative\"]);\nconst badgeKeys = new Set([\"count\", \"max\", \"accessibilityLabel\"]);\n\nfunction rejectUnknownKeys(\n value: Readonly<Record<string, unknown>>,\n allowed: ReadonlySet<string>,\n field: string,\n): void {\n for (const key of Object.keys(value)) {\n if (!allowed.has(key)) {\n throw new TypeError(`Unsupported BottomNavigation ${field} field: ${key}`);\n }\n }\n}\n\nfunction normalizedCopy(value: string): string {\n return value.normalize(\"NFKC\").toLocaleLowerCase();\n}\n\nfunction validateBadge(badge: BottomNavigationCounterBadge): void {\n if (!isObject(badge)) {\n throw new TypeError(\"BottomNavigation badge must be an object\");\n }\n rejectUnknownKeys(badge, badgeKeys, \"badge\");\n if (!Number.isSafeInteger(badge.count) || badge.count < 0) {\n throw new TypeError(\"BottomNavigation badge count must be a non-negative safe integer\");\n }\n if (\n badge.max !== undefined &&\n (!Number.isSafeInteger(badge.max) || badge.max < 1)\n ) {\n throw new TypeError(\"BottomNavigation badge max must be a positive safe integer\");\n }\n validateTrimmedCopy(\n badge.accessibilityLabel,\n \"BottomNavigation badge accessibilityLabel\",\n );\n}\n\nfunction validateItem<Key extends string, IconName extends string>(\n item: BottomNavigationItemDescriptor<Key, IconName>,\n): void {\n if (!isObject(item)) {\n throw new TypeError(\"BottomNavigation item must be an object\");\n }\n rejectUnknownKeys(item, itemKeys, \"item\");\n validateTrimmedCopy(item.id, \"BottomNavigation item id\");\n validateTrimmedCopy(item.label, \"BottomNavigation item label\");\n if (item.accessibilityLabel !== undefined) {\n validateTrimmedCopy(\n item.accessibilityLabel,\n \"BottomNavigation item accessibilityLabel\",\n );\n if (\n !normalizedCopy(item.accessibilityLabel).includes(\n normalizedCopy(item.label),\n )\n ) {\n throw new TypeError(\n \"BottomNavigation item accessibilityLabel must include the visible label\",\n );\n }\n }\n if (!isObject(item.icon)) {\n throw new TypeError(\"BottomNavigation item icon must be an object\");\n }\n if (item.icon.decorative !== undefined && item.icon.decorative !== true) {\n throw new TypeError(\"BottomNavigation item icon must be decorative\");\n }\n rejectUnknownKeys(item.icon, iconKeys, \"item icon\");\n validateTrimmedCopy(item.icon.name, \"BottomNavigation item icon name\");\n if (item.disabled !== undefined && typeof item.disabled !== \"boolean\") {\n throw new TypeError(\"BottomNavigation item disabled must be a boolean\");\n }\n if (item.badge !== undefined) validateBadge(item.badge);\n if (item.prominent !== undefined && typeof item.prominent !== \"boolean\") {\n throw new TypeError(\"BottomNavigation item prominent must be a boolean\");\n }\n}\n\nconst presentations = new Set<BottomNavigationPresentation>([\"bar\", \"floating\", \"capsule\"]);\nconst distributions = new Set<BottomNavigationDistribution>([\"equal\", \"center-gap\"]);\nconst densities = new Set<BottomNavigationDensity>([\"compact\", \"regular\"]);\nconst directions = new Set<BottomNavigationDirection>([\"ltr\", \"rtl\"]);\nconst keyboardBehaviors = new Set<BottomNavigationKeyboardBehavior>([\n \"hide\",\n \"remain\",\n]);\nconst labelModes = new Set<BottomNavigationLabels>([\"visible\", \"hidden\"]);\nconst iconSizes = new Set<BottomNavigationIconSize>([\"standard\", \"large\", \"xlarge\"]);\n\nexport function validateBottomNavigationConfiguration(\n configuration: BottomNavigationConfiguration,\n itemCount: number,\n): void {\n if (!isObject(configuration)) {\n throw new TypeError(\"BottomNavigation configuration must be an object\");\n }\n rejectUnknownKeys(configuration, configurationKeys, \"configuration\");\n if (\n !Number.isSafeInteger(itemCount) ||\n itemCount < bottomNavigationBehaviorDefaults.minItems ||\n itemCount > bottomNavigationBehaviorDefaults.maxItems\n ) {\n throw new RangeError(\n `BottomNavigation configuration requires ${bottomNavigationBehaviorDefaults.minItems} to ${bottomNavigationBehaviorDefaults.maxItems} destinations`,\n );\n }\n if (\n configuration.presentation !== undefined &&\n !presentations.has(configuration.presentation)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation presentation: ${String(configuration.presentation)}`,\n );\n }\n if (\n configuration.distribution !== undefined &&\n !distributions.has(configuration.distribution)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation distribution: ${String(configuration.distribution)}`,\n );\n }\n if (configuration.density !== undefined && !densities.has(configuration.density)) {\n throw new TypeError(\n `Unsupported BottomNavigation density: ${String(configuration.density)}`,\n );\n }\n if (\n configuration.direction !== undefined &&\n !directions.has(configuration.direction)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation direction: ${String(configuration.direction)}`,\n );\n }\n if (\n configuration.keyboardBehavior !== undefined &&\n !keyboardBehaviors.has(configuration.keyboardBehavior)\n ) {\n throw new TypeError(\n `Unsupported BottomNavigation keyboardBehavior: ${String(configuration.keyboardBehavior)}`,\n );\n }\n if (configuration.labels !== undefined && !labelModes.has(configuration.labels)) {\n throw new TypeError(\n `Unsupported BottomNavigation labels: ${String(configuration.labels)}`,\n );\n }\n if (configuration.selection !== undefined && ![\"emphasis\", \"tile\"].includes(configuration.selection)) {\n throw new TypeError(\"Unsupported BottomNavigation selection\");\n }\n // Spint's selected card must not inherit capsule's hidden names or unequal widths.\n if (configuration.selection === \"tile\" &&\n (configuration.presentation !== \"floating\" || configuration.distribution === \"center-gap\" || configuration.labels === \"hidden\")) {\n throw new TypeError(\"BottomNavigation tile selection requires floating, equal distribution and visible labels\");\n }\n if (configuration.surface !== undefined && ![\"flat\", \"raised\"].includes(configuration.surface)) {\n throw new TypeError(\"Unsupported BottomNavigation surface\");\n }\n // The lower edges belong to the tile row; an emphasis bar has no selected card to lift.\n if (configuration.surface === \"raised\" && configuration.selection !== \"tile\") {\n throw new TypeError(\"BottomNavigation raised surface requires tile selection\");\n }\n // Capsule actions sit beside the destination surface, so reserving a central gap would duplicate their space.\n if (configuration.presentation === \"capsule\" && configuration.distribution === \"center-gap\") {\n throw new TypeError(\"BottomNavigation capsule uses an adjacent action, not center-gap\");\n }\n if (configuration.iconSize !== undefined && !iconSizes.has(configuration.iconSize)) {\n throw new TypeError(\n `Unsupported BottomNavigation iconSize: ${String(configuration.iconSize)}`,\n );\n }\n if (configuration.distribution === \"center-gap\" && itemCount % 2 !== 0) {\n throw new RangeError(\n \"BottomNavigation center-gap distribution requires an even destination count\",\n );\n }\n}\n\nexport function resolveBottomNavigationConfiguration(\n configuration: BottomNavigationConfiguration,\n itemCount: number,\n): ResolvedBottomNavigationConfiguration {\n validateBottomNavigationConfiguration(configuration, itemCount);\n return {\n presentation:\n configuration.presentation ?? bottomNavigationRecipeDefaults.presentation,\n distribution:\n configuration.distribution ?? bottomNavigationRecipeDefaults.distribution,\n density: configuration.density ?? bottomNavigationRecipeDefaults.density,\n direction: configuration.direction ?? bottomNavigationBehaviorDefaults.direction,\n keyboardBehavior:\n configuration.keyboardBehavior ??\n bottomNavigationBehaviorDefaults.keyboardBehavior,\n labels: configuration.labels ?? bottomNavigationBehaviorDefaults.labels,\n selection: configuration.selection ?? bottomNavigationBehaviorDefaults.selection,\n surface: configuration.surface ?? bottomNavigationBehaviorDefaults.surface,\n iconSize: configuration.iconSize ?? bottomNavigationBehaviorDefaults.iconSize,\n };\n}\n\nexport function validateBottomNavigationDescriptor<\n Key extends string,\n IconName extends string,\n>(descriptor: BottomNavigationDescriptor<Key, IconName>): void {\n if (!isObject(descriptor)) {\n throw new TypeError(\"BottomNavigation descriptor must be an object\");\n }\n rejectUnknownKeys(descriptor, descriptorKeys, \"descriptor\");\n validateTrimmedCopy(\n descriptor.accessibilityLabel,\n \"BottomNavigation accessibilityLabel\",\n );\n if (!Array.isArray(descriptor.items)) {\n throw new TypeError(\"BottomNavigation items must be an array\");\n }\n validateTrimmedCopy(\n descriptor.selectedKey,\n \"BottomNavigation selectedKey\",\n );\n if (\n descriptor.items.length < bottomNavigationBehaviorDefaults.minItems ||\n descriptor.items.length > bottomNavigationBehaviorDefaults.maxItems\n ) {\n throw new RangeError(\n `BottomNavigation must contain ${bottomNavigationBehaviorDefaults.minItems} to ${bottomNavigationBehaviorDefaults.maxItems} destinations`,\n );\n }\n\n const ids = new Set<Key>();\n for (const item of descriptor.items) {\n validateItem(item);\n if (ids.has(item.id)) {\n throw new TypeError(`Duplicate BottomNavigation item id: ${item.id}`);\n }\n ids.add(item.id);\n }\n\n const selected = descriptor.items.find(\n (item) => item.id === descriptor.selectedKey,\n );\n if (!selected) {\n throw new RangeError(\n `BottomNavigation selectedKey must exist: ${descriptor.selectedKey}`,\n );\n }\n if (selected.disabled) {\n throw new RangeError(\"BottomNavigation selected destination must be enabled\");\n }\n const prominentIndex = descriptor.items.findIndex((item) => item.prominent === true);\n if (prominentIndex !== -1) {\n // The lifted circle is centered over the bar; any other slot would sit off-center and overlap a neighbour.\n if (\n descriptor.items.length % 2 === 0 ||\n prominentIndex !== (descriptor.items.length - 1) / 2 ||\n descriptor.items.filter((item) => item.prominent === true).length > 1\n ) {\n throw new RangeError(\n \"BottomNavigation prominent destination must be the single middle item of an odd item count\",\n );\n }\n }\n}\n\n/**\n * A prominent destination needs the plain row: center-gap reserves the same slot for a primaryAction, capsule\n * places actions beside the surface, and a tile card would paint behind the lifted circle.\n */\nexport function validateBottomNavigationProminence(\n items: readonly Readonly<{ prominent?: boolean }>[],\n configuration: ResolvedBottomNavigationConfiguration,\n): void {\n if (!items.some((item) => item.prominent === true)) return;\n if (\n configuration.distribution !== \"equal\" ||\n configuration.presentation === \"capsule\" ||\n configuration.selection === \"tile\"\n ) {\n throw new TypeError(\n \"BottomNavigation prominent destination requires equal distribution, bar or floating presentation and emphasis selection\",\n );\n }\n}\n\nexport function resolveBottomNavigationItem<\n Key extends string,\n IconName extends string,\n>(\n item: BottomNavigationItemDescriptor<Key, IconName>,\n): ResolvedBottomNavigationItemDescriptor<Key, IconName> {\n validateItem(item);\n const baseAccessibilityLabel = item.accessibilityLabel ?? item.label;\n const visibleBadgeLabel = item.badge\n ? formatCounterBadgeCount(item.badge.count, item.badge.max)\n : null;\n const badge = visibleBadgeLabel\n ? ({\n visibleLabel: visibleBadgeLabel,\n hiddenFromAccessibility: true,\n } as const)\n : null;\n\n return {\n id: item.id,\n label: item.label,\n icon: { name: item.icon.name, decorative: true },\n disabled: item.disabled ?? false,\n prominent: item.prominent ?? false,\n badge,\n resolvedAccessibilityLabel:\n badge && item.badge\n ? `${baseAccessibilityLabel}, ${item.badge.accessibilityLabel}`\n : baseAccessibilityLabel,\n };\n}\n\nexport function resolveBottomNavigationDescriptor<\n Key extends string,\n IconName extends string,\n>(\n descriptor: BottomNavigationDescriptor<Key, IconName>,\n): ResolvedBottomNavigationDescriptor<Key, IconName> {\n validateBottomNavigationDescriptor(descriptor);\n return {\n accessibilityLabel: descriptor.accessibilityLabel,\n items: descriptor.items.map(resolveBottomNavigationItem),\n selectedKey: descriptor.selectedKey,\n };\n}\n\n/**\n * Produces navigation intent without mutating selectedKey. A renderer forwards\n * the request to its router, which updates selectedKey only after navigation.\n */\nexport function resolveBottomNavigationActivation<\n Key extends string,\n IconName extends string,\n>(\n descriptor: BottomNavigationDescriptor<Key, IconName>,\n key: Key,\n): BottomNavigationActivation<Key> | null {\n validateBottomNavigationDescriptor(descriptor);\n const item = descriptor.items.find((candidate) => candidate.id === key);\n if (!item || item.disabled) return null;\n return {\n key,\n reason: key === descriptor.selectedKey ? \"reselect\" : \"navigate\",\n };\n}\n"]}
@@ -121,6 +121,36 @@ export declare const carouselBehavior: {
121
121
  };
122
122
  readonly scenarios: readonly ["current-position-is-announced-with-a-readable-name-not-dots-alone", "inactive-slide-content-is-excluded-from-focus-and-the-accessibility-tree", "previous-next-and-dot-controls-stay-in-tab-order-regardless-of-current-slide", "arrow-keys-move-one-slide-on-web-swipe-moves-one-slide-on-native", "boundary-slides-clamp-instead-of-wrapping-because-loop-is-out-of-scope", "autoplay-is-opt-in-and-off-by-default", "autoplay-never-runs-when-reduced-motion-is-active", "autoplay-pauses-on-hover-focus-or-drag-and-does-not-announce-automatic-transitions"];
123
123
  };
124
+ /**
125
+ * PageIndicator is Carousel's position dot row on its own, for a product-owned pager (a paging FlatList or
126
+ * scroll-snap row) that Carousel cannot host because Carousel owns its slides. It reuses `carouselRecipe.dot`
127
+ * and the same clamped navigation, so both rows look and behave the same. Added 2026-10-18 for the Utilverse
128
+ * launcher, which drew its own dots under a native pager.
129
+ */
130
+ export type PageIndicatorDescriptor = Readonly<{
131
+ /** Number of pages, at least 1. */
132
+ count: number;
133
+ /** Zero-based current page. */
134
+ currentIndex: number;
135
+ }>;
136
+ export type PageIndicatorAccessibleNameInfo = Readonly<{
137
+ position: number;
138
+ total: number;
139
+ }>;
140
+ /** Product-owned copy for one page, e.g. "Home page 2 of 5" — counter grammar is not the renderer's. */
141
+ export type ComposePageIndicatorAccessibleName = (info: PageIndicatorAccessibleNameInfo) => string;
142
+ export type ResolvedPageIndicatorDot = Readonly<{
143
+ index: number;
144
+ /** 1-indexed reading position. */
145
+ position: number;
146
+ total: number;
147
+ current: boolean;
148
+ accessibleName: string;
149
+ }>;
150
+ export declare function validatePageIndicatorDescriptor(descriptor: PageIndicatorDescriptor): void;
151
+ export declare function resolvePageIndicator(descriptor: PageIndicatorDescriptor, composeAccessibleName: ComposePageIndicatorAccessibleName): readonly ResolvedPageIndicatorDot[];
152
+ /** Clamps like getCarouselNavigationTarget: a pager indicator has an end, it never wraps. */
153
+ export declare function getPageIndicatorTarget(descriptor: PageIndicatorDescriptor, intent: CarouselNavigationIntent): number;
124
154
  export type CarouselSize = "medium";
125
155
  export declare const carouselRecipe: {
126
156
  readonly slots: readonly ["root", "track", "slide", "dots", "dot", "previousControl", "nextControl"];
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../src/carousel.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,CAAC;IACzE,EAAE,EAAE,EAAE,CAAC;IACP,wGAAwG;IACxG,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,CAAC;IAC7E,UAAU,EAAE,EAAE,CAAC;IACf,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAC1B,kBAAkB,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;CACnC,CAAC,CAAC;AAEH;;+EAE+E;AAC/E,MAAM,MAAM,6BAA6B,CAAC,EAAE,SAAS,MA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AAU,EAAE,uBAAuB,GAAG,IAAI,CAWzF;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,uBAAuB,EACnC,qBAAqB,EAAE,kCAAkC,GACxD,SAAS,wBAAwB,EAAE,CAYrC;AAED,6FAA6F;AAC7F,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,uBAAuB,EACnC,MAAM,EAAE,wBAAwB,GAC/B,MAAM,CAKR;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;AAEpC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0BzB,2GAA2G;;;;;;;;;;;;;;;;;;;IAW3G;;;;OAIG;;;;;;CAsBJ,CAAC"}
package/dist/carousel.js CHANGED
@@ -125,6 +125,38 @@ export const carouselBehavior = {
125
125
  "autoplay-pauses-on-hover-focus-or-drag-and-does-not-announce-automatic-transitions",
126
126
  ],
127
127
  };
128
+ export function validatePageIndicatorDescriptor(descriptor) {
129
+ if (!Number.isSafeInteger(descriptor.count) || descriptor.count < 1) {
130
+ throw new RangeError("PageIndicator count must be a positive integer");
131
+ }
132
+ if (!Number.isSafeInteger(descriptor.currentIndex) ||
133
+ descriptor.currentIndex < 0 ||
134
+ descriptor.currentIndex >= descriptor.count) {
135
+ throw new RangeError(`PageIndicator currentIndex is out of range: ${String(descriptor.currentIndex)}`);
136
+ }
137
+ }
138
+ export function resolvePageIndicator(descriptor, composeAccessibleName) {
139
+ validatePageIndicatorDescriptor(descriptor);
140
+ if (typeof composeAccessibleName !== "function") {
141
+ throw new TypeError("PageIndicator composeAccessibleName must be a function");
142
+ }
143
+ return Array.from({ length: descriptor.count }, (_, index) => {
144
+ const accessibleName = composeAccessibleName({ position: index + 1, total: descriptor.count });
145
+ if (typeof accessibleName !== "string" || accessibleName.trim().length === 0) {
146
+ throw new TypeError("PageIndicator composeAccessibleName must return a non-empty string");
147
+ }
148
+ return { index, position: index + 1, total: descriptor.count, current: index === descriptor.currentIndex, accessibleName };
149
+ });
150
+ }
151
+ /** Clamps like getCarouselNavigationTarget: a pager indicator has an end, it never wraps. */
152
+ export function getPageIndicatorTarget(descriptor, intent) {
153
+ validatePageIndicatorDescriptor(descriptor);
154
+ if (intent === "first")
155
+ return 0;
156
+ if (intent === "last")
157
+ return descriptor.count - 1;
158
+ return Math.min(Math.max(descriptor.currentIndex + (intent === "next" ? 1 : -1), 0), descriptor.count - 1);
159
+ }
128
160
  export const carouselRecipe = {
129
161
  slots: [
130
162
  "root",
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.js","sourceRoot":"","sources":["../src/carousel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmDtD,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,YAAY,KAAK,oBAAoB,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,KAAkC;IAElC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACrC,IAAI,KAAK,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QACjC,MAAM,IAAI,SAAS,CAAC,yDAAyD,CAAC,CAAC;IACjF,CAAC;IACD,cAAc,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,QAAgC;IAEhC,kBAAkB,CAAC,QAAQ,CAAC,UAAU,EAAE,q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AAS,EAAE;QACT,mEAAmE;QACnE,0EAA0E;QAC1E,8EAA8E;QAC9E,kEAAkE;QAClE,wEAAwE;QACxE,uCAAuC;QACvC,mDAAmD;QACnD,oFAAoF;KACrF;CACkC,CAAC;AAItC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,KAAK,EAAE;QACL,MAAM;QACN,OAAO;QACP,OAAO;QACP,MAAM;QACN,KAAK;QACL,iBAAiB;QACjB,aAAa;KACL;IACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,KAAK,EAAE;QACL,MAAM,EAAE;YACN,GAAG,EAAE,OAAO,CAAC,EAAE;YACf,gBAAgB,EAAE,OAAO,CAAC,cAAc;YACxC,WAAW,EAAE,IAAI;SAClB;KACF;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,OAAO,CAAC,cAAc;QACjC,KAAK,EAAE;YACL,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM;YACtC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK;SACtC;KACF;IACD,2GAA2G;IAC3G,OAAO,EAAE;QACP,KAAK,EAAE;YACL,QAAQ,EAAE,cAAc;YACxB,IAAI,EAAE,YAAY;SACiE;KACtF;IACD,MAAM,EAAE;QACN,KAAK,EAAE,sBAAsB;QAC7B,cAAc,EAAE,OAAO,CAAC,OAAO;KAChC;IACD;;;;OAIG;IACH,UAAU,EAAE,YAAY,CAAC,OAAO;CAqBjC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport type { SemanticIconName } from \"./icon.js\";\nimport { focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, motionPreset, opacity, spacing } from \"./foundations.js\";\nimport { assertFiniteNumber } from \"./number-field.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * Ant Design Carousel's default infinite loop is intentionally not reproduced;\n * autoplay remains opt-in in both libraries — automatic movement can obscure what this contract treats as\n * non-negotiable: a reliable answer to \"where am I, and where does it end\".\n * See docs/carousel.md for the accessibility rationale on every point below.\n */\nexport type CarouselSlideDescriptor<Id extends string = string> = Readonly<{\n id: Id;\n /** Accessible name for the slide, e.g. \"8/19 두산 vs LG\". The slide's visual content is product-owned. */\n label: string;\n}>;\n\nexport type CarouselAutoplayConfig = Readonly<{\n /** Minimum time a slide stays current before an automatic advance. */\n intervalMs: number;\n}>;\n\n/**\n * Renderer-facing prop shape only — mirrors SelectSelection's controlled/\n * uncontrolled duality, but the resolver below always takes a concrete,\n * already-resolved `currentKey` (see CarouselDescriptor) so validation and\n * position math never have to branch on which mode the product chose.\n */\nexport type ControlledCarouselSelection<Id extends string = string> = Readonly<{\n currentKey: Id;\n defaultCurrentKey?: never;\n onCurrentKeyChange(key: Id): void;\n}>;\n\n/** After mount, removing the current slide selects the slide at its previous\n * position, clamped to the new last position, and emits onCurrentKeyChange once.\n * An invalid initial default and an empty collection still fail validation. */\nexport type UncontrolledCarouselSelection<Id extends string = string> = Readonly<{\n currentKey?: never;\n defaultCurrentKey?: Id;\n onCurrentKeyChange?: (key: Id) => void;\n}>;\n\nexport type CarouselSelection<Id extends string = string> =\n | ControlledCarouselSelection<Id>\n | UncontrolledCarouselSelection<Id>;\n\nexport type CarouselDescriptor<Id extends string = string> = Readonly<{\n slides: readonly CarouselSlideDescriptor<Id>[];\n currentKey: Id;\n /** Absent by default. Autoplay is opt-in — see docs/carousel.md. */\n autoplay?: CarouselAutoplayConfig;\n}>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Carousel ${field} must not be empty`);\n }\n}\n\nexport function validateCarouselSlide<Id extends string>(\n slide: CarouselSlideDescriptor<Id>,\n): void {\n assertNonEmpty(slide.id, \"slide id\");\n if (slide.id !== slide.id.trim()) {\n throw new TypeError(\"Carousel slide id must not start or end with whitespace\");\n }\n assertNonEmpty(slide.label, \"slide label\");\n}\n\nexport function validateCarouselAutoplayConfig(\n autoplay: CarouselAutoplayConfig,\n): void {\n assertFiniteNumber(autoplay.intervalMs, \"autoplay.intervalMs\");\n if (autoplay.intervalMs <= 0) {\n throw new RangeError(\"Carousel autoplay.intervalMs must be greater than zero\");\n }\n}\n\nexport function validateCarouselDescriptor<Id extends string>(\n descriptor: CarouselDescriptor<Id>,\n): void {\n if (descriptor.slides.length === 0) {\n throw new RangeError(\"Carousel must contain at least one slide\");\n }\n const ids = new Set<Id>();\n for (const slide of descriptor.slides) {\n validateCarouselSlide(slide);\n if (ids.has(slide.id)) {\n throw new TypeError(`Duplicate Carousel slide id: ${slide.id}`);\n }\n ids.add(slide.id);\n }\n if (!ids.has(descriptor.currentKey)) {\n throw new RangeError(\n `Carousel currentKey does not match any slide id: ${String(descriptor.currentKey)}`,\n );\n }\n if (descriptor.autoplay) {\n validateCarouselAutoplayConfig(descriptor.autoplay);\n }\n}\n\nexport type CarouselAccessibleNameInfo = Readonly<{\n position: number;\n total: number;\n label: string;\n}>;\n\n/**\n * Same reason Steps and Timeline do not assemble their own accessible name:\n * counter-word grammar and phrase order are product-owned copy decisions.\n */\nexport type ComposeCarouselAccessibleName = (\n info: CarouselAccessibleNameInfo,\n) => string;\n\nexport type ResolvedCarouselSlideDescriptor<Id extends string = string> =\n CarouselSlideDescriptor<Id> &\n Readonly<{\n /** 1-indexed so position and label both preserve reading order for renderers. */\n position: number;\n total: number;\n current: boolean;\n /**\n * True for every slide but the current one. A renderer must exclude an\n * inert slide's interactive content from both focus and the\n * accessibility tree — a hidden slide whose link can still receive\n * focus is worse than one that is simply unreachable until the user\n * advances to it (see docs/carousel.md).\n */\n inert: boolean;\n accessibleName: string;\n }>;\n\nexport type ResolveCarouselOptions = Readonly<{\n composeAccessibleName: ComposeCarouselAccessibleName;\n}>;\n\n/**\n * Attaches order, current/inert, and the composed accessible name used by\n * both the slide group and its indicator dot — one composer, reused for\n * every render target, the same way Steps reuses a single composer.\n */\nexport function resolveCarouselDescriptor<Id extends string>(\n descriptor: CarouselDescriptor<Id>,\n options: ResolveCarouselOptions,\n): readonly ResolvedCarouselSlideDescriptor<Id>[] {\n validateCarouselDescriptor(descriptor);\n if (typeof options.composeAccessibleName !== \"function\") {\n throw new TypeError(\"Carousel composeAccessibleName must be a function\");\n }\n\n const total = descriptor.slides.length;\n return descriptor.slides.map((slide, index) => {\n const position = index + 1;\n const current = slide.id === descriptor.currentKey;\n const accessibleName = options.composeAccessibleName({\n position,\n total,\n label: slide.label,\n });\n if (typeof accessibleName !== \"string\" || accessibleName.trim().length === 0) {\n throw new TypeError(\n \"Carousel composeAccessibleName must return a non-empty string\",\n );\n }\n return { ...slide, position, total, current, inert: !current, accessibleName };\n });\n}\n\nexport type CarouselNavigationIntent = \"next\" | \"previous\" | \"first\" | \"last\";\n\n/**\n * Clamps at the first/last slide instead of wrapping — infinite loop is out\n * of scope (see docs/carousel.md), so there is no modulo here at all, unlike\n * getCollectionNavigationTarget's `loop` parameter elsewhere in this package.\n */\nexport function getCarouselNavigationTarget<Id extends string>(\n descriptor: CarouselDescriptor<Id>,\n intent: CarouselNavigationIntent,\n): Id {\n validateCarouselDescriptor(descriptor);\n const { slides, currentKey } = descriptor;\n if (intent === \"first\") return slides[0]!.id;\n if (intent === \"last\") return slides.at(-1)!.id;\n const currentIndex = slides.findIndex((slide) => slide.id === currentKey);\n const delta = intent === \"next\" ? 1 : -1;\n const clampedIndex = Math.min(\n Math.max(currentIndex + delta, 0),\n slides.length - 1,\n );\n return slides[clampedIndex]!.id;\n}\n\nexport type CarouselAutoplayInputs = Readonly<{\n /** True whenever a platform reduce-motion preference is active. */\n reducedMotion: boolean;\n /** Renderer-combined pointer hover, focus-within, and drag signal. */\n paused: boolean;\n}>;\n\n/**\n * Autoplay is never active without an explicit config, under reduce motion,\n * or while the user is hovering, focusing, or dragging the carousel — the\n * three guards the brief requires are one function so a renderer cannot wire\n * an autoplay timer that forgets one of them.\n */\nexport function isCarouselAutoplayActive(\n autoplay: CarouselAutoplayConfig | undefined,\n inputs: CarouselAutoplayInputs,\n): boolean {\n if (!autoplay) return false;\n validateCarouselAutoplayConfig(autoplay);\n return !inputs.reducedMotion && !inputs.paused;\n}\n\nexport const carouselBehaviorDefaults = {\n autoplay: false,\n} as const satisfies Readonly<{ autoplay: boolean }>;\n\nexport const carouselBehavior = {\n controlled: [\"currentKey\", \"defaultCurrentKey\", \"onCurrentKeyChange\"],\n inputs: [\"autoplay\", \"reducedMotion\", \"dragged\"],\n defaults: carouselBehaviorDefaults,\n stateAxes: {\n interaction: [\"idle\", \"dragged\"],\n value: [\"selected\"],\n },\n web: {\n roles: [\"region\", \"group\"],\n keyboard: [\"Tab\", \"Enter\", \"Space\", \"ArrowLeft\", \"ArrowRight\"],\n focus: \"native\",\n },\n native: {\n roles: [\"adjustable\"],\n states: [\"selected\"],\n actions: [\"increment\", \"decrement\"],\n },\n scenarios: [\n \"current-position-is-announced-with-a-readable-name-not-dots-alone\",\n \"inactive-slide-content-is-excluded-from-focus-and-the-accessibility-tree\",\n \"previous-next-and-dot-controls-stay-in-tab-order-regardless-of-current-slide\",\n \"arrow-keys-move-one-slide-on-web-swipe-moves-one-slide-on-native\",\n \"boundary-slides-clamp-instead-of-wrapping-because-loop-is-out-of-scope\",\n \"autoplay-is-opt-in-and-off-by-default\",\n \"autoplay-never-runs-when-reduced-motion-is-active\",\n \"autoplay-pauses-on-hover-focus-or-drag-and-does-not-announce-automatic-transitions\",\n ],\n} as const satisfies BehaviorContract;\n\nexport type CarouselSize = \"medium\";\n\nexport const carouselRecipe = {\n slots: [\n \"root\",\n \"track\",\n \"slide\",\n \"dots\",\n \"dot\",\n \"previousControl\",\n \"nextControl\",\n ] as const,\n defaults: { size: \"medium\" },\n sizes: {\n medium: {\n gap: spacing.sm,\n controlHitTarget: control.minTouchTarget,\n controlIcon: \"sm\",\n },\n },\n dot: {\n diameter: 8,\n hitTarget: control.minTouchTarget,\n color: {\n inactive: semanticColors.border.strong,\n current: semanticColors.content.brand,\n },\n },\n /** Previous/next chrome is composed from IconButton (ghost tone) rather than owning new button visuals. */\n control: {\n icons: {\n previous: \"chevronStart\",\n next: \"chevronEnd\",\n } as const satisfies Readonly<{ previous: SemanticIconName; next: SemanticIconName }>,\n },\n states: {\n focus: focusIndicatorContract,\n draggedOpacity: opacity.dragged,\n },\n /**\n * Manual slide-to-slide movement crossfades rather than snapping under\n * Reduce Motion, reusing the existing \"context\" preset instead of a new\n * token — autoplay itself simply does not run at all (isCarouselAutoplayActive).\n */\n transition: motionPreset.context,\n} as const satisfies {\n slots: readonly string[];\n defaults: { size: CarouselSize };\n sizes: Record<\n CarouselSize,\n { gap: number; controlHitTarget: number; controlIcon: string }\n >;\n dot: {\n diameter: number;\n hitTarget: number;\n color: Record<\"inactive\" | \"current\", ColorReference>;\n };\n control: {\n icons: Readonly<{ previous: SemanticIconName; next: SemanticIconName }>;\n };\n states: {\n focus: typeof focusIndicatorContract;\n draggedOpacity: number;\n };\n transition: typeof motionPreset.context;\n};\n"]}
1
+ {"version":3,"file":"carousel.js","sourceRoot":"","sources":["../src/carousel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmDtD,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,YAAY,KAAK,oBAAoB,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,KAAkC;IAElC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;I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AAK,EAAE;QACL,MAAM,EAAE;YACN,GAAG,EAAE,OAAO,CAAC,EAAE;YACf,gBAAgB,EAAE,OAAO,CAAC,cAAc;YACxC,WAAW,EAAE,IAAI;SAClB;KACF;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,CAAC;QACX,SAAS,EAAE,OAAO,CAAC,cAAc;QACjC,KAAK,EAAE;YACL,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM;YACtC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK;SACtC;KACF;IACD,2GAA2G;IAC3G,OAAO,EAAE;QACP,KAAK,EAAE;YACL,QAAQ,EAAE,cAAc;YACxB,IAAI,EAAE,YAAY;SACiE;KACtF;IACD,MAAM,EAAE;QACN,KAAK,EAAE,sBAAsB;QAC7B,cAAc,EAAE,OAAO,CAAC,OAAO;KAChC;IACD;;;;OAIG;IACH,UAAU,EAAE,YAAY,CAAC,OAAO;CAqBjC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport type { SemanticIconName } from \"./icon.js\";\nimport { focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, motionPreset, opacity, spacing } from \"./foundations.js\";\nimport { assertFiniteNumber } from \"./number-field.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * Ant Design Carousel's default infinite loop is intentionally not reproduced;\n * autoplay remains opt-in in both libraries — automatic movement can obscure what this contract treats as\n * non-negotiable: a reliable answer to \"where am I, and where does it end\".\n * See docs/carousel.md for the accessibility rationale on every point below.\n */\nexport type CarouselSlideDescriptor<Id extends string = string> = Readonly<{\n id: Id;\n /** Accessible name for the slide, e.g. \"8/19 두산 vs LG\". The slide's visual content is product-owned. */\n label: string;\n}>;\n\nexport type CarouselAutoplayConfig = Readonly<{\n /** Minimum time a slide stays current before an automatic advance. */\n intervalMs: number;\n}>;\n\n/**\n * Renderer-facing prop shape only — mirrors SelectSelection's controlled/\n * uncontrolled duality, but the resolver below always takes a concrete,\n * already-resolved `currentKey` (see CarouselDescriptor) so validation and\n * position math never have to branch on which mode the product chose.\n */\nexport type ControlledCarouselSelection<Id extends string = string> = Readonly<{\n currentKey: Id;\n defaultCurrentKey?: never;\n onCurrentKeyChange(key: Id): void;\n}>;\n\n/** After mount, removing the current slide selects the slide at its previous\n * position, clamped to the new last position, and emits onCurrentKeyChange once.\n * An invalid initial default and an empty collection still fail validation. */\nexport type UncontrolledCarouselSelection<Id extends string = string> = Readonly<{\n currentKey?: never;\n defaultCurrentKey?: Id;\n onCurrentKeyChange?: (key: Id) => void;\n}>;\n\nexport type CarouselSelection<Id extends string = string> =\n | ControlledCarouselSelection<Id>\n | UncontrolledCarouselSelection<Id>;\n\nexport type CarouselDescriptor<Id extends string = string> = Readonly<{\n slides: readonly CarouselSlideDescriptor<Id>[];\n currentKey: Id;\n /** Absent by default. Autoplay is opt-in — see docs/carousel.md. */\n autoplay?: CarouselAutoplayConfig;\n}>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Carousel ${field} must not be empty`);\n }\n}\n\nexport function validateCarouselSlide<Id extends string>(\n slide: CarouselSlideDescriptor<Id>,\n): void {\n assertNonEmpty(slide.id, \"slide id\");\n if (slide.id !== slide.id.trim()) {\n throw new TypeError(\"Carousel slide id must not start or end with whitespace\");\n }\n assertNonEmpty(slide.label, \"slide label\");\n}\n\nexport function validateCarouselAutoplayConfig(\n autoplay: CarouselAutoplayConfig,\n): void {\n assertFiniteNumber(autoplay.intervalMs, \"autoplay.intervalMs\");\n if (autoplay.intervalMs <= 0) {\n throw new RangeError(\"Carousel autoplay.intervalMs must be greater than zero\");\n }\n}\n\nexport function validateCarouselDescriptor<Id extends string>(\n descriptor: CarouselDescriptor<Id>,\n): void {\n if (descriptor.slides.length === 0) {\n throw new RangeError(\"Carousel must contain at least one slide\");\n }\n const ids = new Set<Id>();\n for (const slide of descriptor.slides) {\n validateCarouselSlide(slide);\n if (ids.has(slide.id)) {\n throw new TypeError(`Duplicate Carousel slide id: ${slide.id}`);\n }\n ids.add(slide.id);\n }\n if (!ids.has(descriptor.currentKey)) {\n throw new RangeError(\n `Carousel currentKey does not match any slide id: ${String(descriptor.currentKey)}`,\n );\n }\n if (descriptor.autoplay) {\n validateCarouselAutoplayConfig(descriptor.autoplay);\n }\n}\n\nexport type CarouselAccessibleNameInfo = Readonly<{\n position: number;\n total: number;\n label: string;\n}>;\n\n/**\n * Same reason Steps and Timeline do not assemble their own accessible name:\n * counter-word grammar and phrase order are product-owned copy decisions.\n */\nexport type ComposeCarouselAccessibleName = (\n info: CarouselAccessibleNameInfo,\n) => string;\n\nexport type ResolvedCarouselSlideDescriptor<Id extends string = string> =\n CarouselSlideDescriptor<Id> &\n Readonly<{\n /** 1-indexed so position and label both preserve reading order for renderers. */\n position: number;\n total: number;\n current: boolean;\n /**\n * True for every slide but the current one. A renderer must exclude an\n * inert slide's interactive content from both focus and the\n * accessibility tree — a hidden slide whose link can still receive\n * focus is worse than one that is simply unreachable until the user\n * advances to it (see docs/carousel.md).\n */\n inert: boolean;\n accessibleName: string;\n }>;\n\nexport type ResolveCarouselOptions = Readonly<{\n composeAccessibleName: ComposeCarouselAccessibleName;\n}>;\n\n/**\n * Attaches order, current/inert, and the composed accessible name used by\n * both the slide group and its indicator dot — one composer, reused for\n * every render target, the same way Steps reuses a single composer.\n */\nexport function resolveCarouselDescriptor<Id extends string>(\n descriptor: CarouselDescriptor<Id>,\n options: ResolveCarouselOptions,\n): readonly ResolvedCarouselSlideDescriptor<Id>[] {\n validateCarouselDescriptor(descriptor);\n if (typeof options.composeAccessibleName !== \"function\") {\n throw new TypeError(\"Carousel composeAccessibleName must be a function\");\n }\n\n const total = descriptor.slides.length;\n return descriptor.slides.map((slide, index) => {\n const position = index + 1;\n const current = slide.id === descriptor.currentKey;\n const accessibleName = options.composeAccessibleName({\n position,\n total,\n label: slide.label,\n });\n if (typeof accessibleName !== \"string\" || accessibleName.trim().length === 0) {\n throw new TypeError(\n \"Carousel composeAccessibleName must return a non-empty string\",\n );\n }\n return { ...slide, position, total, current, inert: !current, accessibleName };\n });\n}\n\nexport type CarouselNavigationIntent = \"next\" | \"previous\" | \"first\" | \"last\";\n\n/**\n * Clamps at the first/last slide instead of wrapping — infinite loop is out\n * of scope (see docs/carousel.md), so there is no modulo here at all, unlike\n * getCollectionNavigationTarget's `loop` parameter elsewhere in this package.\n */\nexport function getCarouselNavigationTarget<Id extends string>(\n descriptor: CarouselDescriptor<Id>,\n intent: CarouselNavigationIntent,\n): Id {\n validateCarouselDescriptor(descriptor);\n const { slides, currentKey } = descriptor;\n if (intent === \"first\") return slides[0]!.id;\n if (intent === \"last\") return slides.at(-1)!.id;\n const currentIndex = slides.findIndex((slide) => slide.id === currentKey);\n const delta = intent === \"next\" ? 1 : -1;\n const clampedIndex = Math.min(\n Math.max(currentIndex + delta, 0),\n slides.length - 1,\n );\n return slides[clampedIndex]!.id;\n}\n\nexport type CarouselAutoplayInputs = Readonly<{\n /** True whenever a platform reduce-motion preference is active. */\n reducedMotion: boolean;\n /** Renderer-combined pointer hover, focus-within, and drag signal. */\n paused: boolean;\n}>;\n\n/**\n * Autoplay is never active without an explicit config, under reduce motion,\n * or while the user is hovering, focusing, or dragging the carousel — the\n * three guards the brief requires are one function so a renderer cannot wire\n * an autoplay timer that forgets one of them.\n */\nexport function isCarouselAutoplayActive(\n autoplay: CarouselAutoplayConfig | undefined,\n inputs: CarouselAutoplayInputs,\n): boolean {\n if (!autoplay) return false;\n validateCarouselAutoplayConfig(autoplay);\n return !inputs.reducedMotion && !inputs.paused;\n}\n\nexport const carouselBehaviorDefaults = {\n autoplay: false,\n} as const satisfies Readonly<{ autoplay: boolean }>;\n\nexport const carouselBehavior = {\n controlled: [\"currentKey\", \"defaultCurrentKey\", \"onCurrentKeyChange\"],\n inputs: [\"autoplay\", \"reducedMotion\", \"dragged\"],\n defaults: carouselBehaviorDefaults,\n stateAxes: {\n interaction: [\"idle\", \"dragged\"],\n value: [\"selected\"],\n },\n web: {\n roles: [\"region\", \"group\"],\n keyboard: [\"Tab\", \"Enter\", \"Space\", \"ArrowLeft\", \"ArrowRight\"],\n focus: \"native\",\n },\n native: {\n roles: [\"adjustable\"],\n states: [\"selected\"],\n actions: [\"increment\", \"decrement\"],\n },\n scenarios: [\n \"current-position-is-announced-with-a-readable-name-not-dots-alone\",\n \"inactive-slide-content-is-excluded-from-focus-and-the-accessibility-tree\",\n \"previous-next-and-dot-controls-stay-in-tab-order-regardless-of-current-slide\",\n \"arrow-keys-move-one-slide-on-web-swipe-moves-one-slide-on-native\",\n \"boundary-slides-clamp-instead-of-wrapping-because-loop-is-out-of-scope\",\n \"autoplay-is-opt-in-and-off-by-default\",\n \"autoplay-never-runs-when-reduced-motion-is-active\",\n \"autoplay-pauses-on-hover-focus-or-drag-and-does-not-announce-automatic-transitions\",\n ],\n} as const satisfies BehaviorContract;\n\n/**\n * PageIndicator is Carousel's position dot row on its own, for a product-owned pager (a paging FlatList or\n * scroll-snap row) that Carousel cannot host because Carousel owns its slides. It reuses `carouselRecipe.dot`\n * and the same clamped navigation, so both rows look and behave the same. Added 2026-10-18 for the Utilverse\n * launcher, which drew its own dots under a native pager.\n */\nexport type PageIndicatorDescriptor = Readonly<{\n /** Number of pages, at least 1. */\n count: number;\n /** Zero-based current page. */\n currentIndex: number;\n}>;\n\nexport type PageIndicatorAccessibleNameInfo = Readonly<{ position: number; total: number }>;\n\n/** Product-owned copy for one page, e.g. \"Home page 2 of 5\" — counter grammar is not the renderer's. */\nexport type ComposePageIndicatorAccessibleName = (info: PageIndicatorAccessibleNameInfo) => string;\n\nexport type ResolvedPageIndicatorDot = Readonly<{\n index: number;\n /** 1-indexed reading position. */\n position: number;\n total: number;\n current: boolean;\n accessibleName: string;\n}>;\n\nexport function validatePageIndicatorDescriptor(descriptor: PageIndicatorDescriptor): void {\n if (!Number.isSafeInteger(descriptor.count) || descriptor.count < 1) {\n throw new RangeError(\"PageIndicator count must be a positive integer\");\n }\n if (\n !Number.isSafeInteger(descriptor.currentIndex) ||\n descriptor.currentIndex < 0 ||\n descriptor.currentIndex >= descriptor.count\n ) {\n throw new RangeError(`PageIndicator currentIndex is out of range: ${String(descriptor.currentIndex)}`);\n }\n}\n\nexport function resolvePageIndicator(\n descriptor: PageIndicatorDescriptor,\n composeAccessibleName: ComposePageIndicatorAccessibleName,\n): readonly ResolvedPageIndicatorDot[] {\n validatePageIndicatorDescriptor(descriptor);\n if (typeof composeAccessibleName !== \"function\") {\n throw new TypeError(\"PageIndicator composeAccessibleName must be a function\");\n }\n return Array.from({ length: descriptor.count }, (_, index) => {\n const accessibleName = composeAccessibleName({ position: index + 1, total: descriptor.count });\n if (typeof accessibleName !== \"string\" || accessibleName.trim().length === 0) {\n throw new TypeError(\"PageIndicator composeAccessibleName must return a non-empty string\");\n }\n return { index, position: index + 1, total: descriptor.count, current: index === descriptor.currentIndex, accessibleName };\n });\n}\n\n/** Clamps like getCarouselNavigationTarget: a pager indicator has an end, it never wraps. */\nexport function getPageIndicatorTarget(\n descriptor: PageIndicatorDescriptor,\n intent: CarouselNavigationIntent,\n): number {\n validatePageIndicatorDescriptor(descriptor);\n if (intent === \"first\") return 0;\n if (intent === \"last\") return descriptor.count - 1;\n return Math.min(Math.max(descriptor.currentIndex + (intent === \"next\" ? 1 : -1), 0), descriptor.count - 1);\n}\n\nexport type CarouselSize = \"medium\";\n\nexport const carouselRecipe = {\n slots: [\n \"root\",\n \"track\",\n \"slide\",\n \"dots\",\n \"dot\",\n \"previousControl\",\n \"nextControl\",\n ] as const,\n defaults: { size: \"medium\" },\n sizes: {\n medium: {\n gap: spacing.sm,\n controlHitTarget: control.minTouchTarget,\n controlIcon: \"sm\",\n },\n },\n dot: {\n diameter: 8,\n hitTarget: control.minTouchTarget,\n color: {\n inactive: semanticColors.border.strong,\n current: semanticColors.content.brand,\n },\n },\n /** Previous/next chrome is composed from IconButton (ghost tone) rather than owning new button visuals. */\n control: {\n icons: {\n previous: \"chevronStart\",\n next: \"chevronEnd\",\n } as const satisfies Readonly<{ previous: SemanticIconName; next: SemanticIconName }>,\n },\n states: {\n focus: focusIndicatorContract,\n draggedOpacity: opacity.dragged,\n },\n /**\n * Manual slide-to-slide movement crossfades rather than snapping under\n * Reduce Motion, reusing the existing \"context\" preset instead of a new\n * token — autoplay itself simply does not run at all (isCarouselAutoplayActive).\n */\n transition: motionPreset.context,\n} as const satisfies {\n slots: readonly string[];\n defaults: { size: CarouselSize };\n sizes: Record<\n CarouselSize,\n { gap: number; controlHitTarget: number; controlIcon: string }\n >;\n dot: {\n diameter: number;\n hitTarget: number;\n color: Record<\"inactive\" | \"current\", ColorReference>;\n };\n control: {\n icons: Readonly<{ previous: SemanticIconName; next: SemanticIconName }>;\n };\n states: {\n focus: typeof focusIndicatorContract;\n draggedOpacity: number;\n };\n transition: typeof motionPreset.context;\n};\n"]}