@hjmds/design-contracts 1.10.0 → 1.12.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 (200) hide show
  1. package/dist/action-session.d.ts +47 -0
  2. package/dist/action-session.d.ts.map +1 -0
  3. package/dist/action-session.js +60 -0
  4. package/dist/action-session.js.map +1 -0
  5. package/dist/activity-heatmap.d.ts +22 -0
  6. package/dist/activity-heatmap.d.ts.map +1 -0
  7. package/dist/activity-heatmap.js +29 -0
  8. package/dist/activity-heatmap.js.map +1 -0
  9. package/dist/auth-screen.d.ts +4 -0
  10. package/dist/auth-screen.d.ts.map +1 -1
  11. package/dist/auth-screen.js +2 -0
  12. package/dist/auth-screen.js.map +1 -1
  13. package/dist/avatar-fallback.d.ts +25 -0
  14. package/dist/avatar-fallback.d.ts.map +1 -0
  15. package/dist/avatar-fallback.js +17 -0
  16. package/dist/avatar-fallback.js.map +1 -0
  17. package/dist/behaviors.d.ts +2 -2
  18. package/dist/bottom-navigation-defaults.d.ts +1 -1
  19. package/dist/bottom-navigation-defaults.d.ts.map +1 -1
  20. package/dist/bottom-navigation-defaults.js.map +1 -1
  21. package/dist/bottom-navigation.d.ts.map +1 -1
  22. package/dist/bottom-navigation.js +5 -1
  23. package/dist/bottom-navigation.js.map +1 -1
  24. package/dist/catalog.d.ts +30 -1
  25. package/dist/catalog.d.ts.map +1 -1
  26. package/dist/code-block.d.ts +23 -0
  27. package/dist/code-block.d.ts.map +1 -0
  28. package/dist/code-block.js +13 -0
  29. package/dist/code-block.js.map +1 -0
  30. package/dist/component-definitions.d.ts +2 -3
  31. package/dist/component-definitions.d.ts.map +1 -1
  32. package/dist/component-definitions.js +1 -2
  33. package/dist/component-definitions.js.map +1 -1
  34. package/dist/component-recipes.d.ts +25 -1
  35. package/dist/component-recipes.d.ts.map +1 -1
  36. package/dist/component-recipes.js +12 -1
  37. package/dist/component-recipes.js.map +1 -1
  38. package/dist/component-references.d.ts +0 -6
  39. package/dist/component-references.d.ts.map +1 -1
  40. package/dist/component-references.js +0 -5
  41. package/dist/component-references.js.map +1 -1
  42. package/dist/content-transition.d.ts +17 -0
  43. package/dist/content-transition.d.ts.map +1 -0
  44. package/dist/content-transition.js +15 -0
  45. package/dist/content-transition.js.map +1 -0
  46. package/dist/duration-field.d.ts +22 -0
  47. package/dist/duration-field.d.ts.map +1 -0
  48. package/dist/duration-field.js +20 -0
  49. package/dist/duration-field.js.map +1 -0
  50. package/dist/effect-surface.d.ts +29 -0
  51. package/dist/effect-surface.d.ts.map +1 -0
  52. package/dist/effect-surface.js +26 -0
  53. package/dist/effect-surface.js.map +1 -0
  54. package/dist/gooey-navigation.d.ts +13 -0
  55. package/dist/gooey-navigation.d.ts.map +1 -0
  56. package/dist/gooey-navigation.js +11 -0
  57. package/dist/gooey-navigation.js.map +1 -0
  58. package/dist/gravity-letters.d.ts +12 -0
  59. package/dist/gravity-letters.d.ts.map +1 -0
  60. package/dist/gravity-letters.js +11 -0
  61. package/dist/gravity-letters.js.map +1 -0
  62. package/dist/grid-reveal.d.ts +8 -0
  63. package/dist/grid-reveal.d.ts.map +1 -0
  64. package/dist/grid-reveal.js +5 -0
  65. package/dist/grid-reveal.js.map +1 -0
  66. package/dist/internal/object-validation.d.ts +3 -0
  67. package/dist/internal/object-validation.d.ts.map +1 -0
  68. package/dist/internal/object-validation.js +12 -0
  69. package/dist/internal/object-validation.js.map +1 -0
  70. package/dist/internal/thinking-orb/braid.d.ts.map +1 -1
  71. package/dist/internal/thinking-orb/braid.js +2 -9
  72. package/dist/internal/thinking-orb/braid.js.map +1 -1
  73. package/dist/internal/thinking-orb/core.d.ts +1 -0
  74. package/dist/internal/thinking-orb/core.d.ts.map +1 -1
  75. package/dist/internal/thinking-orb/core.js +12 -0
  76. package/dist/internal/thinking-orb/core.js.map +1 -1
  77. package/dist/internal/thinking-orb/presentation.d.ts +4 -0
  78. package/dist/internal/thinking-orb/presentation.d.ts.map +1 -0
  79. package/dist/internal/thinking-orb/presentation.js +28 -0
  80. package/dist/internal/thinking-orb/presentation.js.map +1 -0
  81. package/dist/internal/thinking-orb/ribbon.d.ts.map +1 -1
  82. package/dist/internal/thinking-orb/ribbon.js +2 -9
  83. package/dist/internal/thinking-orb/ribbon.js.map +1 -1
  84. package/dist/layout.d.ts +0 -5
  85. package/dist/layout.d.ts.map +1 -1
  86. package/dist/layout.js +0 -7
  87. package/dist/layout.js.map +1 -1
  88. package/dist/otp-field.d.ts +2 -0
  89. package/dist/otp-field.d.ts.map +1 -1
  90. package/dist/otp-field.js.map +1 -1
  91. package/dist/popover.d.ts.map +1 -1
  92. package/dist/popover.js +3 -12
  93. package/dist/popover.js.map +1 -1
  94. package/dist/progress-recipe.d.ts +1 -0
  95. package/dist/progress-recipe.d.ts.map +1 -1
  96. package/dist/progress-recipe.js +2 -1
  97. package/dist/progress-recipe.js.map +1 -1
  98. package/dist/reactions.d.ts +10 -0
  99. package/dist/reactions.d.ts.map +1 -0
  100. package/dist/reactions.js +20 -0
  101. package/dist/reactions.js.map +1 -0
  102. package/dist/scroll-progress.d.ts +8 -0
  103. package/dist/scroll-progress.d.ts.map +1 -0
  104. package/dist/scroll-progress.js +10 -0
  105. package/dist/scroll-progress.js.map +1 -0
  106. package/dist/steps.d.ts +1 -1
  107. package/dist/steps.d.ts.map +1 -1
  108. package/dist/steps.js +2 -1
  109. package/dist/steps.js.map +1 -1
  110. package/dist/task-list.d.ts +7 -0
  111. package/dist/task-list.d.ts.map +1 -0
  112. package/dist/task-list.js +4 -0
  113. package/dist/task-list.js.map +1 -0
  114. package/dist/theme-studio.d.ts +14 -0
  115. package/dist/theme-studio.d.ts.map +1 -0
  116. package/dist/theme-studio.js +16 -0
  117. package/dist/theme-studio.js.map +1 -0
  118. package/dist/thinking-orb.d.ts +4 -2
  119. package/dist/thinking-orb.d.ts.map +1 -1
  120. package/dist/thinking-orb.js +8 -3
  121. package/dist/thinking-orb.js.map +1 -1
  122. package/dist/toast-liquid.d.ts +4 -4
  123. package/dist/toast-liquid.d.ts.map +1 -1
  124. package/dist/toast-liquid.js +11 -10
  125. package/dist/toast-liquid.js.map +1 -1
  126. package/dist/toast.d.ts +4 -4
  127. package/dist/toast.d.ts.map +1 -1
  128. package/dist/toast.js +4 -3
  129. package/dist/toast.js.map +1 -1
  130. package/dist/tooltip.d.ts.map +1 -1
  131. package/dist/tooltip.js +3 -12
  132. package/dist/tooltip.js.map +1 -1
  133. package/dist/version.d.ts +1 -1
  134. package/dist/version.js +1 -1
  135. package/dist/version.js.map +1 -1
  136. package/dist/voice-note.d.ts +20 -0
  137. package/dist/voice-note.d.ts.map +1 -0
  138. package/dist/voice-note.js +16 -0
  139. package/dist/voice-note.js.map +1 -0
  140. package/docs/action-session.md +73 -0
  141. package/docs/activity-heatmap.md +32 -0
  142. package/docs/anchor.md +1 -1
  143. package/docs/auth-screen.md +44 -4
  144. package/docs/authoring-brief.md +5 -0
  145. package/docs/avatar-fallback.md +74 -0
  146. package/docs/bottom-navigation.md +16 -1
  147. package/docs/breadcrumb.md +1 -1
  148. package/docs/calendar.md +1 -1
  149. package/docs/cascader.md +1 -1
  150. package/docs/code-block.md +32 -0
  151. package/docs/command-palette.md +1 -1
  152. package/docs/compound-controls.md +83 -0
  153. package/docs/confirm-popover.md +1 -1
  154. package/docs/consumer-policy.md +30 -23
  155. package/docs/cross-platform-core-normalization.md +23 -21
  156. package/docs/data-table.md +8 -5
  157. package/docs/dialog.md +2 -0
  158. package/docs/effect-surface.md +50 -0
  159. package/docs/floating-action-button.md +1 -1
  160. package/docs/folder-preview.md +26 -0
  161. package/docs/generated/component-maturity.md +1 -1
  162. package/docs/generated/renderer-evidence.json +3 -3
  163. package/docs/generated/renderer-evidence.md +1 -1
  164. package/docs/generated/showcase-manifest.json +1 -1
  165. package/docs/gooey-navigation.md +36 -0
  166. package/docs/gravity-letters.md +26 -0
  167. package/docs/grid-reveal.md +11 -0
  168. package/docs/icon.md +26 -0
  169. package/docs/image.md +2 -2
  170. package/docs/layout.md +1 -2
  171. package/docs/load-more.md +3 -1
  172. package/docs/migration-0.5.md +4 -1
  173. package/docs/migration-native-legacy-removal.md +60 -0
  174. package/docs/navigation-bar.md +28 -0
  175. package/docs/optional-adapters.md +24 -1
  176. package/docs/otp-field.md +23 -1
  177. package/docs/pagination.md +1 -1
  178. package/docs/popover.md +2 -2
  179. package/docs/product-adoption-1.4.md +7 -0
  180. package/docs/product-audit-2026-09-15.md +1 -1
  181. package/docs/progress.md +8 -0
  182. package/docs/provider-button.md +10 -3
  183. package/docs/rating.md +1 -1
  184. package/docs/react-native-completion.md +4 -4
  185. package/docs/screen-chrome.md +2 -2
  186. package/docs/scroll-progress.md +29 -0
  187. package/docs/sheet.md +2 -0
  188. package/docs/sidebar.md +6 -0
  189. package/docs/splitter.md +1 -1
  190. package/docs/step-player.md +16 -0
  191. package/docs/steps.md +9 -3
  192. package/docs/task-list.md +32 -0
  193. package/docs/theme-studio.md +13 -0
  194. package/docs/thinking-orb.md +9 -2
  195. package/docs/time-picker.md +1 -1
  196. package/docs/toast.md +8 -7
  197. package/docs/tour.md +1 -1
  198. package/docs/tree-select.md +2 -2
  199. package/docs/voice-note.md +19 -0
  200. package/package.json +91 -1
package/dist/steps.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"steps.js","sourceRoot":"","sources":["../src/steps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAgCtD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iBAAiB,EAAE,SAAS;CACwC,CAAC;AA0CvE,SAAS,cAAc,CAAC,KAAa,EAAE,KAAa;IAClD,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,SAAS,KAAK,oBAAoB,CAAC,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OAAO,CAAC,OAAO;YACxC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU;SACjD;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,SAAS;QACtB,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS;KACxC;CA0BF,CAAC","sourcesContent":["import type { ColorReference } from \"./color-references.js\";\nimport type { FontWeightValue, TextVariant } from \"./foundations.js\";\nimport type { SemanticIconName } from \"./icon.js\";\nimport { fontWeight, glyph, spacing, stroke } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * Ant Design Steps' full surface (navigation/clickable jump, dot type, custom\n * per-item icon, vertical orientation) is intentionally not reproduced. Both\n * known consumers (Yajalal onboarding, BurnTok sign-up) are single-cursor,\n * horizontal, back-button-driven wizards; see docs/steps.md for the per-axis\n * rationale.\n */\nexport type StepStatus = \"pending\" | \"current\" | \"complete\" | \"error\";\n\n/** Only the cursor step can be \"current\" or \"error\"; every other step is derived. */\nexport type StepCursorStatus = Extract<StepStatus, \"current\" | \"error\">;\n\nexport type StepItemDescriptor<Id extends string = string> = Readonly<{\n id: Id;\n label: string;\n description?: string;\n}>;\n\n/**\n * A single stable cursor (`currentStepId`) is the source of truth instead of a\n * per-item status array, so \"two current steps\" or \"a completed step past an\n * unresolved error\" cannot be represented. Clickable jump is out of scope, so\n * the flow is always linear relative to the cursor.\n */\nexport type StepsDescriptor<Id extends string = string> = Readonly<{\n steps: readonly StepItemDescriptor<Id>[];\n currentStepId: Id;\n currentStepStatus?: StepCursorStatus;\n}>;\n\nexport const stepsDefaults = {\n currentStepStatus: \"current\",\n} as const satisfies Readonly<{ currentStepStatus: StepCursorStatus }>;\n\nexport type StepsStatusLabels = Readonly<{\n pending: string;\n current: string;\n complete: string;\n error: string;\n}>;\n\nexport type StepsAccessibleNameInfo = Readonly<{\n position: number;\n total: number;\n label: string;\n}>;\n\n/**\n * Products own the exact phrase order and counter-word grammar (Korean\n * \"3단계 중 2단계\" does not translate structurally to English \"step 2 of 3\"),\n * so the resolver invokes this composer instead of assembling copy itself.\n */\nexport type ComposeStepsAccessibleName = (\n info: StepsAccessibleNameInfo,\n) => string;\n\nexport type ResolvedStepDescriptor<Id extends string = string> =\n StepItemDescriptor<Id> &\n Readonly<{\n status: StepStatus;\n /** 1-indexed so position and label both preserve reading order for renderers. */\n position: number;\n total: number;\n /** Primary accessible name: order + label. Never says status by itself. */\n accessibleName: string;\n /** Supplementary status announcement (Web aria-describedby text / RN accessibilityHint). */\n statusLabel: string;\n }>;\n\nexport type ResolveStepsOptions = Readonly<{\n statusLabels: StepsStatusLabels;\n composeAccessibleName: ComposeStepsAccessibleName;\n}>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Steps ${field} must not be empty`);\n }\n}\n\nexport function validateStepItemDescriptor<Id extends string>(\n step: StepItemDescriptor<Id>,\n): void {\n assertNonEmpty(step.id, \"item id\");\n if (step.id !== step.id.trim()) {\n throw new TypeError(\"Steps item id must not start or end with whitespace\");\n }\n assertNonEmpty(step.label, \"item label\");\n if (step.description !== undefined) {\n assertNonEmpty(step.description, \"item description\");\n }\n}\n\nexport function validateStepsDescriptor<Id extends string>(\n descriptor: StepsDescriptor<Id>,\n): void {\n if (descriptor.steps.length < 2) {\n throw new RangeError(\"Steps must contain at least two steps\");\n }\n const ids = new Set<Id>();\n for (const step of descriptor.steps) {\n validateStepItemDescriptor(step);\n if (ids.has(step.id)) {\n throw new TypeError(`Duplicate Steps item id: ${step.id}`);\n }\n ids.add(step.id);\n }\n if (!ids.has(descriptor.currentStepId)) {\n throw new RangeError(\n `Steps currentStepId does not match any step id: ${String(descriptor.currentStepId)}`,\n );\n }\n if (\n descriptor.currentStepStatus !== undefined &&\n descriptor.currentStepStatus !== \"current\" &&\n descriptor.currentStepStatus !== \"error\"\n ) {\n throw new TypeError(\n `Unsupported Steps currentStepStatus: ${String(descriptor.currentStepStatus)}`,\n );\n }\n}\n\nexport function validateStepsStatusLabels(labels: StepsStatusLabels): void {\n if (labels === null || typeof labels !== \"object\") {\n throw new TypeError(\"Steps statusLabels must be an object\");\n }\n for (const key of [\"pending\", \"current\", \"complete\", \"error\"] as const) {\n const value = labels[key];\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`Steps statusLabels.${key} must not be empty`);\n }\n }\n}\n\n/** A step is visually and semantically \"reached\" once it is no longer waiting. */\nexport function isStepReached(status: StepStatus): boolean {\n return status !== \"pending\";\n}\n\n/**\n * Derives every step's status from its position relative to the single\n * cursor, then attaches the order-preserving accessible name and the\n * supplementary status announcement. Throws on a malformed descriptor,\n * labels bag, or composer instead of silently rendering an inconsistent flow.\n */\nexport function resolveStepsDescriptor<Id extends string>(\n descriptor: StepsDescriptor<Id>,\n options: ResolveStepsOptions,\n): readonly ResolvedStepDescriptor<Id>[] {\n validateStepsDescriptor(descriptor);\n validateStepsStatusLabels(options.statusLabels);\n if (typeof options.composeAccessibleName !== \"function\") {\n throw new TypeError(\"Steps composeAccessibleName must be a function\");\n }\n\n const currentStepStatus =\n descriptor.currentStepStatus ?? stepsDefaults.currentStepStatus;\n const total = descriptor.steps.length;\n const cursorIndex = descriptor.steps.findIndex(\n (step) => step.id === descriptor.currentStepId,\n );\n\n return descriptor.steps.map((step, index) => {\n const status: StepStatus =\n index < cursorIndex\n ? \"complete\"\n : index > cursorIndex\n ? \"pending\"\n : currentStepStatus;\n const position = index + 1;\n const accessibleName = options.composeAccessibleName({\n position,\n total,\n label: step.label,\n });\n if (typeof accessibleName !== \"string\" || accessibleName.trim().length === 0) {\n throw new TypeError(\n \"Steps composeAccessibleName must return a non-empty string\",\n );\n }\n return {\n ...step,\n status,\n position,\n total,\n accessibleName,\n statusLabel: options.statusLabels[status],\n };\n });\n}\n\nexport const stepsRecipe = {\n slots: [\n \"root\",\n \"step\",\n \"indicator\",\n \"marker\",\n \"connector\",\n \"label\",\n \"description\",\n ] as const,\n gap: spacing.xs,\n indicator: {\n size: glyph.md,\n borderWidth: stroke.default,\n activeBorderWidth: stroke.strong,\n /** null means the renderer shows the step's own position number instead of a glyph. */\n marks: {\n pending: null,\n current: null,\n complete: \"check\",\n error: \"error\",\n },\n border: {\n pending: semanticColors.border.default,\n current: semanticColors.content.brand,\n complete: semanticColors.feedback.success.border,\n error: semanticColors.feedback.danger.border,\n },\n background: {\n pending: null,\n current: null,\n complete: semanticColors.feedback.success.badgeBackground,\n error: semanticColors.feedback.danger.badgeBackground,\n },\n content: {\n pending: semanticColors.content.secondary,\n current: semanticColors.content.brand,\n complete: semanticColors.feedback.success.foreground,\n error: semanticColors.feedback.danger.foreground,\n },\n },\n connector: {\n height: stroke.default,\n tone: {\n reached: semanticColors.content.brand,\n unreached: semanticColors.border.default,\n },\n },\n label: {\n textVariant: \"label\",\n fontWeight: fontWeight.semibold,\n color: {\n pending: semanticColors.content.secondary,\n current: semanticColors.content.primary,\n complete: semanticColors.content.primary,\n error: semanticColors.feedback.danger.foreground,\n },\n },\n description: {\n textVariant: \"caption\",\n color: semanticColors.content.secondary,\n },\n} as const satisfies {\n slots: readonly string[];\n gap: number;\n indicator: {\n size: number;\n borderWidth: number;\n activeBorderWidth: number;\n marks: Record<StepStatus, SemanticIconName | null>;\n border: Record<StepStatus, ColorReference>;\n background: Record<StepStatus, ColorReference | null>;\n content: Record<StepStatus, ColorReference>;\n };\n connector: {\n height: number;\n tone: Record<\"reached\" | \"unreached\", ColorReference>;\n };\n label: {\n textVariant: TextVariant;\n fontWeight: FontWeightValue;\n color: Record<StepStatus, ColorReference>;\n };\n description: {\n textVariant: TextVariant;\n color: ColorReference;\n };\n};\n"]}
1
+ {"version":3,"file":"steps.js","sourceRoot":"","sources":["../src/steps.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAiCtD,M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;YACrC,SAAS,EAAE,cAAc,CAAC,MAAM,CAAC,OAAO;SACzC;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE,OAAO;QACpB,UAAU,EAAE,UAAU,CAAC,QAAQ;QAC/B,KAAK,EAAE;YACL,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS;YACzC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;YACvC,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;YACxC,KAAK,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU;SACjD;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,SAAS;QACtB,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS;KACxC;CA0BF,CAAC","sourcesContent":["import type { ColorReference } from \"./color-references.js\";\nimport type { FontWeightValue, TextVariant } from \"./foundations.js\";\nimport type { SemanticIconName } from \"./icon.js\";\nimport { fontWeight, glyph, spacing, stroke } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * Ant Design Steps' full surface (navigation/clickable jump, dot type, custom\n * per-item icon, vertical orientation) is intentionally not reproduced. Both\n * known consumers (Yajalal onboarding, BurnTok sign-up) are single-cursor,\n * horizontal, back-button-driven wizards; see docs/steps.md for the per-axis\n * rationale.\n */\nexport type StepStatus = \"pending\" | \"current\" | \"complete\" | \"error\";\n\n/** Only the cursor step can be \"current\" or \"error\"; every other step is derived. */\n// \"complete\" marks a finished flow; see docs/steps.md.\nexport type StepCursorStatus = Extract<StepStatus, \"current\" | \"error\" | \"complete\">;\n\nexport type StepItemDescriptor<Id extends string = string> = Readonly<{\n id: Id;\n label: string;\n description?: string;\n}>;\n\n/**\n * A single stable cursor (`currentStepId`) is the source of truth instead of a\n * per-item status array, so \"two current steps\" or \"a completed step past an\n * unresolved error\" cannot be represented. Clickable jump is out of scope, so\n * the flow is always linear relative to the cursor.\n */\nexport type StepsDescriptor<Id extends string = string> = Readonly<{\n steps: readonly StepItemDescriptor<Id>[];\n currentStepId: Id;\n currentStepStatus?: StepCursorStatus;\n}>;\n\nexport const stepsDefaults = {\n currentStepStatus: \"current\",\n} as const satisfies Readonly<{ currentStepStatus: StepCursorStatus }>;\n\nexport type StepsStatusLabels = Readonly<{\n pending: string;\n current: string;\n complete: string;\n error: string;\n}>;\n\nexport type StepsAccessibleNameInfo = Readonly<{\n position: number;\n total: number;\n label: string;\n}>;\n\n/**\n * Products own the exact phrase order and counter-word grammar (Korean\n * \"3단계 중 2단계\" does not translate structurally to English \"step 2 of 3\"),\n * so the resolver invokes this composer instead of assembling copy itself.\n */\nexport type ComposeStepsAccessibleName = (\n info: StepsAccessibleNameInfo,\n) => string;\n\nexport type ResolvedStepDescriptor<Id extends string = string> =\n StepItemDescriptor<Id> &\n Readonly<{\n status: StepStatus;\n /** 1-indexed so position and label both preserve reading order for renderers. */\n position: number;\n total: number;\n /** Primary accessible name: order + label. Never says status by itself. */\n accessibleName: string;\n /** Supplementary status announcement (Web aria-describedby text / RN accessibilityHint). */\n statusLabel: string;\n }>;\n\nexport type ResolveStepsOptions = Readonly<{\n statusLabels: StepsStatusLabels;\n composeAccessibleName: ComposeStepsAccessibleName;\n}>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Steps ${field} must not be empty`);\n }\n}\n\nexport function validateStepItemDescriptor<Id extends string>(\n step: StepItemDescriptor<Id>,\n): void {\n assertNonEmpty(step.id, \"item id\");\n if (step.id !== step.id.trim()) {\n throw new TypeError(\"Steps item id must not start or end with whitespace\");\n }\n assertNonEmpty(step.label, \"item label\");\n if (step.description !== undefined) {\n assertNonEmpty(step.description, \"item description\");\n }\n}\n\nexport function validateStepsDescriptor<Id extends string>(\n descriptor: StepsDescriptor<Id>,\n): void {\n if (descriptor.steps.length < 2) {\n throw new RangeError(\"Steps must contain at least two steps\");\n }\n const ids = new Set<Id>();\n for (const step of descriptor.steps) {\n validateStepItemDescriptor(step);\n if (ids.has(step.id)) {\n throw new TypeError(`Duplicate Steps item id: ${step.id}`);\n }\n ids.add(step.id);\n }\n if (!ids.has(descriptor.currentStepId)) {\n throw new RangeError(\n `Steps currentStepId does not match any step id: ${String(descriptor.currentStepId)}`,\n );\n }\n if (\n descriptor.currentStepStatus !== undefined &&\n descriptor.currentStepStatus !== \"current\" &&\n descriptor.currentStepStatus !== \"error\" &&\n descriptor.currentStepStatus !== \"complete\"\n ) {\n throw new TypeError(\n `Unsupported Steps currentStepStatus: ${String(descriptor.currentStepStatus)}`,\n );\n }\n}\n\nexport function validateStepsStatusLabels(labels: StepsStatusLabels): void {\n if (labels === null || typeof labels !== \"object\") {\n throw new TypeError(\"Steps statusLabels must be an object\");\n }\n for (const key of [\"pending\", \"current\", \"complete\", \"error\"] as const) {\n const value = labels[key];\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`Steps statusLabels.${key} must not be empty`);\n }\n }\n}\n\n/** A step is visually and semantically \"reached\" once it is no longer waiting. */\nexport function isStepReached(status: StepStatus): boolean {\n return status !== \"pending\";\n}\n\n/**\n * Derives every step's status from its position relative to the single\n * cursor, then attaches the order-preserving accessible name and the\n * supplementary status announcement. Throws on a malformed descriptor,\n * labels bag, or composer instead of silently rendering an inconsistent flow.\n */\nexport function resolveStepsDescriptor<Id extends string>(\n descriptor: StepsDescriptor<Id>,\n options: ResolveStepsOptions,\n): readonly ResolvedStepDescriptor<Id>[] {\n validateStepsDescriptor(descriptor);\n validateStepsStatusLabels(options.statusLabels);\n if (typeof options.composeAccessibleName !== \"function\") {\n throw new TypeError(\"Steps composeAccessibleName must be a function\");\n }\n\n const currentStepStatus =\n descriptor.currentStepStatus ?? stepsDefaults.currentStepStatus;\n const total = descriptor.steps.length;\n const cursorIndex = descriptor.steps.findIndex(\n (step) => step.id === descriptor.currentStepId,\n );\n\n return descriptor.steps.map((step, index) => {\n const status: StepStatus =\n index < cursorIndex\n ? \"complete\"\n : index > cursorIndex\n ? \"pending\"\n : currentStepStatus;\n const position = index + 1;\n const accessibleName = options.composeAccessibleName({\n position,\n total,\n label: step.label,\n });\n if (typeof accessibleName !== \"string\" || accessibleName.trim().length === 0) {\n throw new TypeError(\n \"Steps composeAccessibleName must return a non-empty string\",\n );\n }\n return {\n ...step,\n status,\n position,\n total,\n accessibleName,\n statusLabel: options.statusLabels[status],\n };\n });\n}\n\nexport const stepsRecipe = {\n slots: [\n \"root\",\n \"step\",\n \"indicator\",\n \"marker\",\n \"connector\",\n \"label\",\n \"description\",\n ] as const,\n gap: spacing.xs,\n indicator: {\n size: glyph.md,\n borderWidth: stroke.default,\n activeBorderWidth: stroke.strong,\n /** null means the renderer shows the step's own position number instead of a glyph. */\n marks: {\n pending: null,\n current: null,\n complete: \"check\",\n error: \"error\",\n },\n border: {\n pending: semanticColors.border.default,\n current: semanticColors.content.brand,\n complete: semanticColors.feedback.success.border,\n error: semanticColors.feedback.danger.border,\n },\n background: {\n pending: null,\n current: null,\n complete: semanticColors.feedback.success.badgeBackground,\n error: semanticColors.feedback.danger.badgeBackground,\n },\n content: {\n pending: semanticColors.content.secondary,\n current: semanticColors.content.brand,\n complete: semanticColors.feedback.success.foreground,\n error: semanticColors.feedback.danger.foreground,\n },\n },\n connector: {\n height: stroke.default,\n tone: {\n reached: semanticColors.content.brand,\n unreached: semanticColors.border.default,\n },\n },\n label: {\n textVariant: \"label\",\n fontWeight: fontWeight.semibold,\n color: {\n pending: semanticColors.content.secondary,\n current: semanticColors.content.primary,\n complete: semanticColors.content.primary,\n error: semanticColors.feedback.danger.foreground,\n },\n },\n description: {\n textVariant: \"caption\",\n color: semanticColors.content.secondary,\n },\n} as const satisfies {\n slots: readonly string[];\n gap: number;\n indicator: {\n size: number;\n borderWidth: number;\n activeBorderWidth: number;\n marks: Record<StepStatus, SemanticIconName | null>;\n border: Record<StepStatus, ColorReference>;\n background: Record<StepStatus, ColorReference | null>;\n content: Record<StepStatus, ColorReference>;\n };\n connector: {\n height: number;\n tone: Record<\"reached\" | \"unreached\", ColorReference>;\n };\n label: {\n textVariant: TextVariant;\n fontWeight: FontWeightValue;\n color: Record<StepStatus, ColorReference>;\n };\n description: {\n textVariant: TextVariant;\n color: ColorReference;\n };\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import { type SortableItem } from './interaction-adapters.js';
2
+ export type TaskItem = SortableItem & Readonly<{
3
+ completed: boolean;
4
+ description?: string;
5
+ }>;
6
+ export declare function validateTasks(items: readonly TaskItem[]): void;
7
+ //# sourceMappingURL=task-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-list.d.ts","sourceRoot":"","sources":["../src/task-list.ts"],"names":[],"mappings":"AAAA,OAAM,EAAe,KAAK,YAAY,EAAC,MAAI,2BAA2B,CAAC;AACvE,MAAM,MAAM,QAAQ,GAAC,YAAY,GAAG,QAAQ,CAAC;IAAC,SAAS,EAAC,OAAO,CAAC;IAAA,WAAW,CAAC,EAAC,MAAM,CAAA;CAAC,CAAC,CAAC;AACtF,wBAAgB,aAAa,CAAC,KAAK,EAAC,SAAS,QAAQ,EAAE,GAAE,IAAI,CAAqI"}
@@ -0,0 +1,4 @@
1
+ import { validateItems } from './interaction-adapters.js';
2
+ export function validateTasks(items) { validateItems(items); if (items.some(item => typeof item.completed !== 'boolean'))
3
+ throw new TypeError('Task completion must be boolean'); }
4
+ //# sourceMappingURL=task-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-list.js","sourceRoot":"","sources":["../src/task-list.ts"],"names":[],"mappings":"AAAA,OAAM,EAAC,aAAa,EAAmB,MAAI,2BAA2B,CAAC;AAEvE,MAAM,UAAU,aAAa,CAAC,KAAyB,IAAO,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA,IAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA,EAAE,CAAA,OAAO,IAAI,CAAC,SAAS,KAAG,SAAS,CAAC;IAAC,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAA,CAAC","sourcesContent":["import{validateItems,type SortableItem}from'./interaction-adapters.js';\nexport type TaskItem=SortableItem & Readonly<{completed:boolean;description?:string}>;\nexport function validateTasks(items:readonly TaskItem[]):void{validateItems(items);if(items.some(item=>typeof item.completed!=='boolean'))throw new TypeError('Task completion must be boolean');}\n"]}
@@ -0,0 +1,14 @@
1
+ import { type ResolvedTheme, type ThemeColors } from "./colors.js";
2
+ export type StudioPalette = Partial<Record<ResolvedTheme, Partial<ThemeColors>>>;
3
+ export type StudioColorRole = "primary" | "onPrimary" | "contentBrand";
4
+ export declare function applyStudioColor(palette: StudioPalette, theme: ResolvedTheme, role: StudioColorRole, color: string): StudioPalette;
5
+ export declare function studioReport(palette: StudioPalette, theme: ResolvedTheme): {
6
+ ratio: number;
7
+ pass: boolean;
8
+ foreground: keyof ThemeColors;
9
+ background: keyof ThemeColors;
10
+ minimum: number;
11
+ kind: "text" | "non-text";
12
+ }[];
13
+ export declare function exportStudioPalette(palette: StudioPalette): string;
14
+ //# sourceMappingURL=theme-studio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-studio.d.ts","sourceRoot":"","sources":["../src/theme-studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACjF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,cAAc,CAAC;AACvE,wBAAgB,gBAAgB,CAAC,OAAO,EAAC,aAAa,EAAE,KAAK,EAAC,aAAa,EAAE,IAAI,EAAC,eAAe,EAAE,KAAK,EAAC,MAAM,GAAE,aAAa,CAG7H;AACD,wBAAgB,YAAY,CAAC,OAAO,EAAC,aAAa,EAAC,KAAK,EAAC,aAAa;;;;;;;IAGrE;AACD,wBAAgB,mBAAmB,CAAC,OAAO,EAAC,aAAa,UAGxD"}
@@ -0,0 +1,16 @@
1
+ import { THEMES } from "./colors.js";
2
+ import { contrastRatio, paletteContrastRules } from "./palette-contrast.js";
3
+ export function applyStudioColor(palette, theme, role, color) {
4
+ if (!/^#[0-9a-f]{6}$/i.test(color.trim()))
5
+ throw new TypeError("Expected a six-digit hex color");
6
+ return { ...palette, [theme]: { ...palette[theme], [role]: color.trim().toLowerCase() } };
7
+ }
8
+ export function studioReport(palette, theme) {
9
+ const resolved = { ...THEMES[theme], ...palette[theme] };
10
+ return paletteContrastRules.map(rule => ({ ...rule, ratio: contrastRatio(resolved[rule.foreground], resolved[rule.background]), pass: contrastRatio(resolved[rule.foreground], resolved[rule.background]) >= rule.minimum }));
11
+ }
12
+ export function exportStudioPalette(palette) {
13
+ // Export the actual provider overrides, not invented derived hues or product defaults.
14
+ return JSON.stringify({ brandPalette: palette }, null, 2);
15
+ }
16
+ //# sourceMappingURL=theme-studio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-studio.js","sourceRoot":"","sources":["../src/theme-studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAwC,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAG5E,MAAM,UAAU,gBAAgB,CAAC,OAAqB,EAAE,KAAmB,EAAE,IAAoB,EAAE,KAAY;IAC9G,IAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAAC,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;IAC/F,OAAO,EAAC,GAAG,OAAO,EAAC,CAAC,KAAK,CAAC,EAAC,EAAC,GAAG,OAAO,CAAC,KAAK,CAAC,EAAC,CAAC,IAAI,CAAC,EAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,EAAC,EAAC,CAAC;AACnF,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,OAAqB,EAAC,KAAmB;IACrE,MAAM,QAAQ,GAAC,EAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAC,GAAG,OAAO,CAAC,KAAK,CAAC,EAAC,CAAC;IACpD,OAAO,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAA,EAAE,CAAA,CAAC,EAAC,GAAG,IAAI,EAAC,KAAK,EAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAC,IAAI,EAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,EAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAE,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC,CAAC;AACnN,CAAC;AACD,MAAM,UAAU,mBAAmB,CAAC,OAAqB;IACxD,uFAAuF;IACvF,OAAO,IAAI,CAAC,SAAS,CAAC,EAAC,YAAY,EAAC,OAAO,EAAC,EAAC,IAAI,EAAC,CAAC,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import { THEMES, type ResolvedTheme, type ThemeColors } from \"./colors.js\";\nimport { contrastRatio, paletteContrastRules } from \"./palette-contrast.js\";\nexport type StudioPalette = Partial<Record<ResolvedTheme, Partial<ThemeColors>>>;\nexport type StudioColorRole = \"primary\" | \"onPrimary\" | \"contentBrand\";\nexport function applyStudioColor(palette:StudioPalette, theme:ResolvedTheme, role:StudioColorRole, color:string):StudioPalette {\n if(!/^#[0-9a-f]{6}$/i.test(color.trim()))throw new TypeError(\"Expected a six-digit hex color\");\n return {...palette,[theme]:{...palette[theme],[role]:color.trim().toLowerCase()}};\n}\nexport function studioReport(palette:StudioPalette,theme:ResolvedTheme){\n const resolved={...THEMES[theme],...palette[theme]};\n return paletteContrastRules.map(rule=>({...rule,ratio:contrastRatio(resolved[rule.foreground],resolved[rule.background]),pass:contrastRatio(resolved[rule.foreground],resolved[rule.background])>=rule.minimum}));\n}\nexport function exportStudioPalette(palette:StudioPalette){\n // Export the actual provider overrides, not invented derived hues or product defaults.\n return JSON.stringify({brandPalette:palette},null,2);\n}\n"]}
@@ -1,9 +1,11 @@
1
1
  import type { OrbState, OrbSize, OrbFrame } from "./internal/thinking-orb/types.js";
2
2
  export type { OrbState, OrbSize, OrbFrame };
3
3
  export declare const thinkingOrbStates: readonly ["working", "searching", "solving", "listening", "connecting", "weaving", "composing", "breathing", "shaping"];
4
+ export type ThinkingOrbAppearance = "state" | "fluid" | "matrix";
4
5
  export type ThinkingOrbOptions = Readonly<{
5
6
  /** Actual operation phase, supplied by the host; the orb never simulates progress. */
6
7
  state?: OrbState;
8
+ appearance?: ThinkingOrbAppearance;
7
9
  size?: OrbSize;
8
10
  /** Localized description of the current operation. */
9
11
  label: string;
@@ -13,9 +15,9 @@ export type ThinkingOrbOptions = Readonly<{
13
15
  active?: boolean;
14
16
  }>;
15
17
  export { thinkingOrbRecipe } from "./thinking-orb-recipe.js";
16
- export declare function validateThinkingOrb({ state, size, speed, label }: ThinkingOrbOptions): void;
18
+ export declare function validateThinkingOrb({ state, size, speed, label, appearance }: ThinkingOrbOptions): void;
17
19
  /** Theme-free, deterministic geometry; no DOM/React/native imports. */
18
- export declare function buildThinkingOrbFrame(state: OrbState, size: OrbSize, time: number): OrbFrame;
20
+ export declare function buildThinkingOrbFrame(state: OrbState, size: OrbSize, time: number, appearance?: ThinkingOrbAppearance): OrbFrame;
19
21
  /** A local elapsed clock freezes exactly, instead of jumping to wall time after resume. */
20
22
  export declare function createThinkingOrbClock(): {
21
23
  resetDelta(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"thinking-orb.d.ts","sourceRoot":"","sources":["../src/thinking-orb.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACpF,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAE5C,eAAO,M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,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,wBAAgB,mBAAmB,CAAC,EAAE,KAAiB,EAAE,IAAS,EAAE,KAAS,EAAE,KAAK,EAAE,UAAoB,EAAE,EAAE,kBAAkB,GAAG,IAAI,CAMtI;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAE,qBAA+B,GAAG,QAAQ,CAMzI;AAED,2FAA2F;AAC3F,wBAAgB,sBAAsB;;gBAKtB,MAAM,SAAS,MAAM;;EAQpC"}
@@ -1,9 +1,12 @@
1
+ import { buildOrbPresentation } from "./internal/thinking-orb/presentation.js";
1
2
  import { MODE_FRAMES } from "./internal/thinking-orb/registry.js";
2
3
  import { resolvePreset } from "./internal/thinking-orb/presets.js";
3
4
  export const thinkingOrbStates = ["working", "searching", "solving", "listening", "connecting", "weaving", "composing", "breathing", "shaping"];
4
5
  export { thinkingOrbRecipe } from "./thinking-orb-recipe.js";
5
6
  import { thinkingOrbRecipe } from "./thinking-orb-recipe.js";
6
- export function validateThinkingOrb({ state = "working", size = 64, speed = 1, label }) {
7
+ export function validateThinkingOrb({ state = "working", size = 64, speed = 1, label, appearance = "state" }) {
8
+ if (!["state", "fluid", "matrix"].includes(appearance))
9
+ throw new TypeError("Unknown ThinkingOrb appearance");
7
10
  if (!thinkingOrbStates.includes(state))
8
11
  throw new TypeError("Unknown ThinkingOrb state");
9
12
  if (size !== 20 && size !== 64)
@@ -14,10 +17,12 @@ export function validateThinkingOrb({ state = "working", size = 64, speed = 1, l
14
17
  throw new TypeError("ThinkingOrb requires a localized label");
15
18
  }
16
19
  /** Theme-free, deterministic geometry; no DOM/React/native imports. */
17
- export function buildThinkingOrbFrame(state, size, time) {
18
- validateThinkingOrb({ state, size, label: state });
20
+ export function buildThinkingOrbFrame(state, size, time, appearance = "state") {
21
+ validateThinkingOrb({ state, size, label: state, appearance });
19
22
  if (!Number.isFinite(time) || time < 0)
20
23
  throw new RangeError("ThinkingOrb time must be finite and non-negative");
24
+ if (appearance !== "state")
25
+ return buildOrbPresentation(appearance, size, time);
21
26
  const preset = resolvePreset(state, size);
22
27
  return MODE_FRAMES[preset.mode](size, time * preset.speed, preset.opts);
23
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"thinking-orb.js","sourceRoot":"","sources":["../src/thinking-orb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,CAAU,CAAC;AAYzJ,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,UAAU,mBAAmB,CAAC,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAsB;IACxG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACzF,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE;QAAE,MAAM,IAAI,UAAU,CAAC,mCAAmC,CAAC,CAAC;IAC1F,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC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CAAC;QACjB,CAAC;QACD,IAAI,IAAI,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC;KAC/B,CAAC;AACJ,CAAC","sourcesContent":["import { MODE_FRAMES } from \"./internal/thinking-orb/registry.js\";\nimport { resolvePreset } from \"./internal/thinking-orb/presets.js\";\nimport type { OrbState, OrbSize, OrbFrame } from \"./internal/thinking-orb/types.js\";\nexport type { OrbState, OrbSize, OrbFrame };\n\nexport const thinkingOrbStates = [\"working\", \"searching\", \"solving\", \"listening\", \"connecting\", \"weaving\", \"composing\", \"breathing\", \"shaping\"] as const;\nexport type ThinkingOrbOptions = Readonly<{\n /** Actual operation phase, supplied by the host; the orb never simulates progress. */\n state?: OrbState;\n size?: OrbSize;\n /** Localized description of the current operation. */\n label: string;\n speed?: number;\n paused?: boolean;\n /** Host navigation/list visibility; required for mounted but hidden native screens. */\n active?: boolean;\n}>;\nexport { thinkingOrbRecipe } from \"./thinking-orb-recipe.js\";\nimport { thinkingOrbRecipe } from \"./thinking-orb-recipe.js\";\n\nexport function validateThinkingOrb({ state = \"working\", size = 64, speed = 1, label }: ThinkingOrbOptions): void {\n if (!thinkingOrbStates.includes(state)) throw new TypeError(\"Unknown ThinkingOrb state\");\n if (size !== 20 && size !== 64) throw new RangeError(\"ThinkingOrb size must be 20 or 64\");\n if (!Number.isFinite(speed) || speed <= 0 || speed > 4) throw new RangeError(\"ThinkingOrb speed must be > 0 and <= 4\");\n if (typeof label !== \"string\" || !label.trim()) throw new TypeError(\"ThinkingOrb requires a localized label\");\n}\n\n/** Theme-free, deterministic geometry; no DOM/React/native imports. */\nexport function buildThinkingOrbFrame(state: OrbState, size: OrbSize, time: number): OrbFrame {\n validateThinkingOrb({ state, size, label: state });\n if (!Number.isFinite(time) || time < 0) throw new RangeError(\"ThinkingOrb time must be finite and non-negative\");\n const preset = resolvePreset(state, size);\n return MODE_FRAMES[preset.mode](size, time * preset.speed, preset.opts);\n}\n\n/** A local elapsed clock freezes exactly, instead of jumping to wall time after resume. */\nexport function createThinkingOrbClock() {\n let elapsed = 0;\n let previous: number | undefined;\n return {\n resetDelta() { previous = undefined; },\n sample(now: number, speed: number) {\n // Long scheduling gaps are capped so a stalled JS thread cannot jump the animation.\n if (previous !== undefined) elapsed += Math.min(thinkingOrbRecipe.motion.maxDeltaMs, Math.max(0, now - previous)) * speed / 1000;\n previous = now;\n return elapsed;\n },\n get time() { return elapsed; },\n };\n}\n"]}
1
+ {"version":3,"file":"thinking-orb.js","sourceRoot":"","sources":["../src/thinking-orb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAInE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,CAAU,CAAC;AAczJ,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,UAAU,mBAAmB,CAAC,EAAE,KAAK,GAAG,SAAS,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,EAAsB;IAC9H,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;IAC9G,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACzF,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE;QAAE,MAAM,IAA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I,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC;YACjI,QAAQ,GAAG,GAAG,CAAC;YACf,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,IAAI,IAAI,KAAK,OAAO,OAAO,CAAC,CAAC,CAAC;KAC/B,CAAC;AACJ,CAAC","sourcesContent":["import { buildOrbPresentation } from \"./internal/thinking-orb/presentation.js\";\nimport { MODE_FRAMES } from \"./internal/thinking-orb/registry.js\";\nimport { resolvePreset } from \"./internal/thinking-orb/presets.js\";\nimport type { OrbState, OrbSize, OrbFrame } from \"./internal/thinking-orb/types.js\";\nexport type { OrbState, OrbSize, OrbFrame };\n\nexport const thinkingOrbStates = [\"working\", \"searching\", \"solving\", \"listening\", \"connecting\", \"weaving\", \"composing\", \"breathing\", \"shaping\"] as const;\nexport type ThinkingOrbAppearance = \"state\" | \"fluid\" | \"matrix\";\nexport type ThinkingOrbOptions = Readonly<{\n /** Actual operation phase, supplied by the host; the orb never simulates progress. */\n state?: OrbState;\n appearance?: ThinkingOrbAppearance;\n size?: OrbSize;\n /** Localized description of the current operation. */\n label: string;\n speed?: number;\n paused?: boolean;\n /** Host navigation/list visibility; required for mounted but hidden native screens. */\n active?: boolean;\n}>;\nexport { thinkingOrbRecipe } from \"./thinking-orb-recipe.js\";\nimport { thinkingOrbRecipe } from \"./thinking-orb-recipe.js\";\n\nexport function validateThinkingOrb({ state = \"working\", size = 64, speed = 1, label, appearance = \"state\" }: ThinkingOrbOptions): void {\n if (![\"state\", \"fluid\", \"matrix\"].includes(appearance)) throw new TypeError(\"Unknown ThinkingOrb appearance\");\n if (!thinkingOrbStates.includes(state)) throw new TypeError(\"Unknown ThinkingOrb state\");\n if (size !== 20 && size !== 64) throw new RangeError(\"ThinkingOrb size must be 20 or 64\");\n if (!Number.isFinite(speed) || speed <= 0 || speed > 4) throw new RangeError(\"ThinkingOrb speed must be > 0 and <= 4\");\n if (typeof label !== \"string\" || !label.trim()) throw new TypeError(\"ThinkingOrb requires a localized label\");\n}\n\n/** Theme-free, deterministic geometry; no DOM/React/native imports. */\nexport function buildThinkingOrbFrame(state: OrbState, size: OrbSize, time: number, appearance: ThinkingOrbAppearance = \"state\"): OrbFrame {\n validateThinkingOrb({ state, size, label: state, appearance });\n if (!Number.isFinite(time) || time < 0) throw new RangeError(\"ThinkingOrb time must be finite and non-negative\");\n if (appearance !== \"state\") return buildOrbPresentation(appearance, size, time);\n const preset = resolvePreset(state, size);\n return MODE_FRAMES[preset.mode](size, time * preset.speed, preset.opts);\n}\n\n/** A local elapsed clock freezes exactly, instead of jumping to wall time after resume. */\nexport function createThinkingOrbClock() {\n let elapsed = 0;\n let previous: number | undefined;\n return {\n resetDelta() { previous = undefined; },\n sample(now: number, speed: number) {\n // Long scheduling gaps are capped so a stalled JS thread cannot jump the animation.\n if (previous !== undefined) elapsed += Math.min(thinkingOrbRecipe.motion.maxDeltaMs, Math.max(0, now - previous)) * speed / 1000;\n previous = now;\n return elapsed;\n },\n get time() { return elapsed; },\n };\n}\n"]}
@@ -5,13 +5,13 @@
5
5
  */
6
6
  export declare const liquidToastRecipe: {
7
7
  readonly capsule: {
8
- readonly width: 88;
9
- readonly height: 24;
8
+ readonly width: 32;
9
+ readonly height: 32;
10
10
  };
11
- readonly gap: 34;
11
+ readonly gap: 26;
12
12
  readonly minHeight: 74;
13
13
  readonly maxWidth: 396;
14
- readonly radius: 32;
14
+ readonly radius: 12;
15
15
  readonly dropSize: 52;
16
16
  readonly neckWidth: 60;
17
17
  readonly blur: 14.3;
@@ -1 +1 @@
1
- {"version":3,"file":"toast-liquid.d.ts","sourceRoot":"","sources":["../src/toast-liquid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAC;IAClF,YAAY,CAAC,EAAE,QAAQ,CAAC;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnD,CAAC,GAAG,iBAAiB,CA2BrB;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB;;;;;;;;;;;EAyB/F"}
@@ -4,11 +4,15 @@
4
4
  * Kept separate from the lifecycle: animation must never own a second queue.
5
5
  */
6
6
  export const liquidToastRecipe = {
7
- capsule: { width: 88, height: 24 },
8
- gap: 34,
7
+ // 2026-10-02: use a circular in-app origin rather than a second Dynamic Island.
8
+ // Keep the public capsule key; changing geometry does not require callers to migrate.
9
+ capsule: { width: 32, height: 32 },
10
+ // Preserve the settled card top (58) when increasing the anchor height from 24 to 32.
11
+ gap: 26,
9
12
  minHeight: 74,
10
13
  maxWidth: 396,
11
- radius: 32,
14
+ // 2026-10-02 card redesign: the medium 12-unit corner supports a banner silhouette.
15
+ radius: 12,
12
16
  dropSize: 52,
13
17
  neckWidth: 60,
14
18
  blur: 14.3,
@@ -26,9 +30,7 @@ export const liquidToastRecipe = {
26
30
  fade: { duration: 360, dampingRatio: 1 },
27
31
  drag: { duration: 560, dampingRatio: 0.7 },
28
32
  },
29
- // tint waits for the card to start widening. At 110ms the droplet turned white while still inside the Dynamic Island,
30
- // so it read as a gray blob appearing below the island instead of the island itself dripping (2026-09-30 iPhone 17
31
- // iOS 27 video against the expo-dynamic-notifications reference). It now stays anchor-colored for the descent.
33
+ // Keep the drop anchor-colored through descent; early tint looked like a gray blob on iPhone 17 (2026-09-30).
32
34
  delay: { tint: 420, expand: 340, reveal: 560, collapse: 100, return: 280 },
33
35
  swipe: { distance: -18, velocity: -420 },
34
36
  };
@@ -79,22 +81,21 @@ export function buildLiquidToastGeometry(drop, expand, layout) {
79
81
  const mix = (a, b, t) => a + (b - a) * t;
80
82
  const grow = 1 - (1 - clamp(drop / 0.7)) ** 1.25;
81
83
  const n = clamp(drop / 0.82);
82
- // A smooth neck rises and disappears before the card reaches its final location.
83
84
  const peak = 1.6 / 3;
84
85
  const normal = peak ** 1.6 * (1 - peak) ** 1.4;
85
86
  const neck = n <= 0 || n >= 1 ? 0 : (n ** 1.6 * (1 - n) ** 1.4) / normal;
86
87
  const stretch = 1 + 0.38 * neck;
87
- const droplet = 52 * grow;
88
+ const droplet = liquidToastRecipe.dropSize * grow;
88
89
  const width = Math.max(0, Math.min(layout.width, mix(droplet / stretch, layout.cardWidth, expand)));
89
90
  const height = Math.max(0, mix(droplet * stretch, layout.height, expand));
90
91
  const originY = layout.anchorY + layout.anchorHeight * 0.66;
91
92
  const centerY = mix(originY, layout.cardTop + layout.height / 2, drop);
92
93
  const centerX = mix(layout.anchorX + layout.anchorWidth / 2, layout.width / 2, clamp(expand));
93
- const neckWidth = Math.max(0, Math.min(60, width) * neck);
94
+ const neckWidth = Math.max(0, Math.min(liquidToastRecipe.neckWidth, width) * neck);
94
95
  const neckY = layout.anchorY + layout.anchorHeight / 2;
95
96
  return {
96
97
  x: centerX - width / 2, y: centerY - height / 2, width, height,
97
- radius: Math.max(0, Math.min(mix(droplet / 2, 32, expand), width / 2, height / 2)),
98
+ radius: Math.max(0, Math.min(mix(droplet / 2, liquidToastRecipe.radius, expand), width / 2, height / 2)),
98
99
  neckX: layout.anchorX + layout.anchorWidth / 2 - neckWidth / 2,
99
100
  neckY, neckWidth, neckHeight: Math.max(0, centerY - neckY),
100
101
  offsetY: centerY - (layout.cardTop + layout.height / 2),
@@ -1 +1 @@
1
- {"version":3,"file":"toast-liquid.js","sourceRoot":"","sources":["../src/toast-liquid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,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AAC,WAAW,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC;QAC9D,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;QAC1D,OAAO,EAAE,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Geometry adapted from rit3zh/expo-dynamic-notifications, commit 5de059a5cbef.\n * The MIT notice is shipped in THIRD_PARTY_NOTICES.md. See docs/plans/liquid-toast.md.\n * Kept separate from the lifecycle: animation must never own a second queue.\n */\nexport const liquidToastRecipe = {\n capsule: { width: 88, height: 24 },\n gap: 34,\n minHeight: 74,\n maxWidth: 396,\n radius: 32,\n dropSize: 52,\n neckWidth: 60,\n blur: 14.3,\n gain: 22,\n threshold: 0.43,\n // These intentionally exceed general HJM motion: the neck needs time to separate.\n // Original choreography is the comparison baseline, not a new global motion scale.\n spring: {\n drop: { duration: 1150, dampingRatio: 0.82 },\n expand: { duration: 1000, dampingRatio: 0.8 },\n reveal: { duration: 700, dampingRatio: 1 },\n tint: { duration: 700, dampingRatio: 1 },\n collapse: { duration: 660, dampingRatio: 0.92, velocity: 2 },\n return: { duration: 1150, dampingRatio: 0.9 },\n fade: { duration: 360, dampingRatio: 1 },\n drag: { duration: 560, dampingRatio: 0.7 },\n },\n // tint waits for the card to start widening. At 110ms the droplet turned white while still inside the Dynamic Island,\n // so it read as a gray blob appearing below the island instead of the island itself dripping (2026-09-30 iPhone 17\n // iOS 27 video against the expo-dynamic-notifications reference). It now stays anchor-colored for the descent.\n delay: { tint: 420, expand: 340, reveal: 560, collapse: 100, return: 280 },\n swipe: { distance: -18, velocity: -420 },\n} as const;\n\n/** Island frames are explicitly verified window coordinates, never inferred from insets. */\nexport type LiquidToastAnchor = Readonly<{ kind: \"capsule\" }> | Readonly<{\n kind: \"island\";\n frame: Readonly<{ x: number; y: number; width: number; height: number }>;\n}>;\n\nexport function validateLiquidToastAnchor(anchor: LiquidToastAnchor): void {\n if (anchor.kind === \"capsule\") return;\n if (anchor.kind !== \"island\") throw new TypeError(\"Unsupported liquid toast anchor\");\n const frame = anchor.frame;\n if (!frame || ![frame.x, frame.y, frame.width, frame.height].every(Number.isFinite) || frame.x < 0 || frame.y < 0 || frame.width <= 0 || frame.height <= 0) {\n throw new RangeError(\"Liquid Toast island frame must be finite with positive dimensions\");\n }\n}\n\nexport type LiquidToastLayout = Readonly<{\n width: number; height: number; cardWidth: number; cardTop: number; cardLeft: number;\n anchorX: number; anchorY: number; anchorWidth: number; anchorHeight: number;\n canvasTop: number; canvasHeight: number; fits: boolean;\n}>;\n\nexport function resolveLiquidToastLayout(input: Readonly<{\n width: number; height: number; availableHeight: number; anchor: LiquidToastAnchor;\n windowOrigin?: Readonly<{ x: number; y: number }>;\n}>): LiquidToastLayout {\n const { width, height, availableHeight, anchor, windowOrigin } = input;\n validateLiquidToastAnchor(anchor);\n if (![width, height, availableHeight].every(Number.isFinite) || width < 0 || height < 0 || availableHeight < 0) {\n throw new RangeError(\"Liquid Toast measurements must be finite and non-negative\");\n }\n let anchorWidth: number = liquidToastRecipe.capsule.width;\n let anchorHeight: number = liquidToastRecipe.capsule.height;\n let anchorX = (width - anchorWidth) / 2;\n let anchorY = 0;\n if (anchor.kind === \"island\" && windowOrigin) {\n const x = anchor.frame.x - windowOrigin.x;\n const y = anchor.frame.y - windowOrigin.y;\n // Rotation/stale host measurements fall back to capsule instead of drawing over a cutout.\n if (x >= 0 && x + anchor.frame.width <= width && y + anchor.frame.height <= availableHeight) {\n anchorX = x; anchorY = y; anchorWidth = anchor.frame.width; anchorHeight = anchor.frame.height;\n }\n }\n const cardWidth = Math.min(width, liquidToastRecipe.maxWidth);\n const cardTop = Math.max(0, anchorY + anchorHeight + liquidToastRecipe.gap);\n const canvasTop = Math.min(0, anchorY) - liquidToastRecipe.blur * 2;\n return {\n width, height, cardWidth, cardTop, cardLeft: (width - cardWidth) / 2,\n anchorX, anchorY, anchorWidth, anchorHeight, canvasTop,\n canvasHeight: cardTop + height - canvasTop + 32,\n fits: width >= 240 && height > 0 && cardTop + height <= availableHeight,\n };\n}\n\nexport function buildLiquidToastGeometry(drop: number, expand: number, layout: LiquidToastLayout) {\n \"worklet\";\n const clamp = (n: number) => Math.max(0, Math.min(1, n));\n const mix = (a: number, b: number, t: number) => a + (b - a) * t;\n const grow = 1 - (1 - clamp(drop / 0.7)) ** 1.25;\n const n = clamp(drop / 0.82);\n // A smooth neck rises and disappears before the card reaches its final location.\n const peak = 1.6 / 3;\n const normal = peak ** 1.6 * (1 - peak) ** 1.4;\n const neck = n <= 0 || n >= 1 ? 0 : (n ** 1.6 * (1 - n) ** 1.4) / normal;\n const stretch = 1 + 0.38 * neck;\n const droplet = 52 * grow;\n const width = Math.max(0, Math.min(layout.width, mix(droplet / stretch, layout.cardWidth, expand)));\n const height = Math.max(0, mix(droplet * stretch, layout.height, expand));\n const originY = layout.anchorY + layout.anchorHeight * 0.66;\n const centerY = mix(originY, layout.cardTop + layout.height / 2, drop);\n const centerX = mix(layout.anchorX + layout.anchorWidth / 2, layout.width / 2, clamp(expand));\n const neckWidth = Math.max(0, Math.min(60, width) * neck);\n const neckY = layout.anchorY + layout.anchorHeight / 2;\n return {\n x: centerX - width / 2, y: centerY - height / 2, width, height,\n radius: Math.max(0, Math.min(mix(droplet / 2, 32, expand), width / 2, height / 2)),\n neckX: layout.anchorX + layout.anchorWidth / 2 - neckWidth / 2,\n neckY, neckWidth, neckHeight: Math.max(0, centerY - neckY),\n offsetY: centerY - (layout.cardTop + layout.height / 2),\n };\n}\n"]}
1
+ {"version":3,"file":"toast-liquid.js","sourceRoot":"","sources":["../src/toast-liquid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,gFAAgF;IAChF,sFAAsF;IACtF,OAAO,EAAE,EAAE,KAA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AAK,EAAE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC;QAC9D,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;QAC1D,OAAO,EAAE,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Geometry adapted from rit3zh/expo-dynamic-notifications, commit 5de059a5cbef.\n * The MIT notice is shipped in THIRD_PARTY_NOTICES.md. See docs/plans/liquid-toast.md.\n * Kept separate from the lifecycle: animation must never own a second queue.\n */\nexport const liquidToastRecipe = {\n // 2026-10-02: use a circular in-app origin rather than a second Dynamic Island.\n // Keep the public capsule key; changing geometry does not require callers to migrate.\n capsule: { width: 32, height: 32 },\n // Preserve the settled card top (58) when increasing the anchor height from 24 to 32.\n gap: 26,\n minHeight: 74,\n maxWidth: 396,\n // 2026-10-02 card redesign: the medium 12-unit corner supports a banner silhouette.\n radius: 12,\n dropSize: 52,\n neckWidth: 60,\n blur: 14.3,\n gain: 22,\n threshold: 0.43,\n // These intentionally exceed general HJM motion: the neck needs time to separate.\n // Original choreography is the comparison baseline, not a new global motion scale.\n spring: {\n drop: { duration: 1150, dampingRatio: 0.82 },\n expand: { duration: 1000, dampingRatio: 0.8 },\n reveal: { duration: 700, dampingRatio: 1 },\n tint: { duration: 700, dampingRatio: 1 },\n collapse: { duration: 660, dampingRatio: 0.92, velocity: 2 },\n return: { duration: 1150, dampingRatio: 0.9 },\n fade: { duration: 360, dampingRatio: 1 },\n drag: { duration: 560, dampingRatio: 0.7 },\n },\n // Keep the drop anchor-colored through descent; early tint looked like a gray blob on iPhone 17 (2026-09-30).\n delay: { tint: 420, expand: 340, reveal: 560, collapse: 100, return: 280 },\n swipe: { distance: -18, velocity: -420 },\n} as const;\n\n/** Island frames are explicitly verified window coordinates, never inferred from insets. */\nexport type LiquidToastAnchor = Readonly<{ kind: \"capsule\" }> | Readonly<{\n kind: \"island\";\n frame: Readonly<{ x: number; y: number; width: number; height: number }>;\n}>;\n\nexport function validateLiquidToastAnchor(anchor: LiquidToastAnchor): void {\n if (anchor.kind === \"capsule\") return;\n if (anchor.kind !== \"island\") throw new TypeError(\"Unsupported liquid toast anchor\");\n const frame = anchor.frame;\n if (!frame || ![frame.x, frame.y, frame.width, frame.height].every(Number.isFinite) || frame.x < 0 || frame.y < 0 || frame.width <= 0 || frame.height <= 0) {\n throw new RangeError(\"Liquid Toast island frame must be finite with positive dimensions\");\n }\n}\n\nexport type LiquidToastLayout = Readonly<{\n width: number; height: number; cardWidth: number; cardTop: number; cardLeft: number;\n anchorX: number; anchorY: number; anchorWidth: number; anchorHeight: number;\n canvasTop: number; canvasHeight: number; fits: boolean;\n}>;\n\nexport function resolveLiquidToastLayout(input: Readonly<{\n width: number; height: number; availableHeight: number; anchor: LiquidToastAnchor;\n windowOrigin?: Readonly<{ x: number; y: number }>;\n}>): LiquidToastLayout {\n const { width, height, availableHeight, anchor, windowOrigin } = input;\n validateLiquidToastAnchor(anchor);\n if (![width, height, availableHeight].every(Number.isFinite) || width < 0 || height < 0 || availableHeight < 0) {\n throw new RangeError(\"Liquid Toast measurements must be finite and non-negative\");\n }\n let anchorWidth: number = liquidToastRecipe.capsule.width;\n let anchorHeight: number = liquidToastRecipe.capsule.height;\n let anchorX = (width - anchorWidth) / 2;\n let anchorY = 0;\n if (anchor.kind === \"island\" && windowOrigin) {\n const x = anchor.frame.x - windowOrigin.x;\n const y = anchor.frame.y - windowOrigin.y;\n // Rotation/stale host measurements fall back to capsule instead of drawing over a cutout.\n if (x >= 0 && x + anchor.frame.width <= width && y + anchor.frame.height <= availableHeight) {\n anchorX = x; anchorY = y; anchorWidth = anchor.frame.width; anchorHeight = anchor.frame.height;\n }\n }\n const cardWidth = Math.min(width, liquidToastRecipe.maxWidth);\n const cardTop = Math.max(0, anchorY + anchorHeight + liquidToastRecipe.gap);\n const canvasTop = Math.min(0, anchorY) - liquidToastRecipe.blur * 2;\n return {\n width, height, cardWidth, cardTop, cardLeft: (width - cardWidth) / 2,\n anchorX, anchorY, anchorWidth, anchorHeight, canvasTop,\n canvasHeight: cardTop + height - canvasTop + 32,\n fits: width >= 240 && height > 0 && cardTop + height <= availableHeight,\n };\n}\n\nexport function buildLiquidToastGeometry(drop: number, expand: number, layout: LiquidToastLayout) {\n \"worklet\";\n const clamp = (n: number) => Math.max(0, Math.min(1, n));\n const mix = (a: number, b: number, t: number) => a + (b - a) * t;\n const grow = 1 - (1 - clamp(drop / 0.7)) ** 1.25;\n const n = clamp(drop / 0.82);\n const peak = 1.6 / 3;\n const normal = peak ** 1.6 * (1 - peak) ** 1.4;\n const neck = n <= 0 || n >= 1 ? 0 : (n ** 1.6 * (1 - n) ** 1.4) / normal;\n const stretch = 1 + 0.38 * neck;\n const droplet = liquidToastRecipe.dropSize * grow;\n const width = Math.max(0, Math.min(layout.width, mix(droplet / stretch, layout.cardWidth, expand)));\n const height = Math.max(0, mix(droplet * stretch, layout.height, expand));\n const originY = layout.anchorY + layout.anchorHeight * 0.66;\n const centerY = mix(originY, layout.cardTop + layout.height / 2, drop);\n const centerX = mix(layout.anchorX + layout.anchorWidth / 2, layout.width / 2, clamp(expand));\n const neckWidth = Math.max(0, Math.min(liquidToastRecipe.neckWidth, width) * neck);\n const neckY = layout.anchorY + layout.anchorHeight / 2;\n return {\n x: centerX - width / 2, y: centerY - height / 2, width, height,\n radius: Math.max(0, Math.min(mix(droplet / 2, liquidToastRecipe.radius, expand), width / 2, height / 2)),\n neckX: layout.anchorX + layout.anchorWidth / 2 - neckWidth / 2,\n neckY, neckWidth, neckHeight: Math.max(0, centerY - neckY),\n offsetY: centerY - (layout.cardTop + layout.height / 2),\n };\n}\n"]}
package/dist/toast.d.ts CHANGED
@@ -32,7 +32,7 @@ export type ToastDescriptor = Readonly<{
32
32
  priority?: ToastAnnouncementPriority;
33
33
  /** Optional localized announcement when visible copy needs extra context. */
34
34
  announcement?: string;
35
- /** `null` is persistent. Values below the accessible minimum are clamped. */
35
+ /** `null` persists; short durations clamp to the configured floor. */
36
36
  durationMs?: number | null;
37
37
  action?: ToastActionDescriptor;
38
38
  /** Required localized name for the icon-only close affordance. */
@@ -63,8 +63,8 @@ export type ToastAnnouncement = Readonly<{
63
63
  priority: ToastAnnouncementPriority;
64
64
  }>;
65
65
  export declare const toastBehaviorDefaults: {
66
- readonly durationMs: 5000;
67
- readonly minimumDurationMs: 5000;
66
+ readonly durationMs: 3000;
67
+ readonly minimumDurationMs: 3000;
68
68
  readonly priority: "normal";
69
69
  readonly dismissOnAction: true;
70
70
  readonly maxVisible: 1;
@@ -75,7 +75,7 @@ export declare const toastBehaviorDefaults: {
75
75
  };
76
76
  /** Rejects ambiguous identity and inaccessible copy before anything is queued. */
77
77
  export declare function validateToastDescriptor(descriptor: ToastDescriptor): void;
78
- /** Actionable notifications persist by default; every timer has a five-second floor. */
78
+ /** Actions persist by default; timed notices follow the shared 3-second floor. */
79
79
  export declare function resolveToastDuration(descriptor: ToastDescriptor): number | null;
80
80
  export declare function resolveToastDescriptor(descriptor: ToastDescriptor): ResolvedToastDescriptor;
81
81
  export declare function resolveToastAnnouncement(descriptor: ToastDescriptor): ToastAnnouncement;
@@ -1 +1 @@
1
- {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../src/toast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AACrI,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAC7B,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,Q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1
  export { liquidToastRecipe, resolveLiquidToastLayout, buildLiquidToastGeometry, validateLiquidToastAnchor } from "./toast-liquid.js";
2
2
  export const toastBehaviorDefaults = {
3
- durationMs: 5000,
4
- minimumDurationMs: 5000,
3
+ // 2026-10-02: product chose 3s over 5s for both presentations; actions may persist.
4
+ durationMs: 3000,
5
+ minimumDurationMs: 3000,
5
6
  priority: "normal",
6
7
  dismissOnAction: true,
7
8
  maxVisible: 1,
@@ -58,7 +59,7 @@ export function validateToastDescriptor(descriptor) {
58
59
  }
59
60
  }
60
61
  }
61
- /** Actionable notifications persist by default; every timer has a five-second floor. */
62
+ /** Actions persist by default; timed notices follow the shared 3-second floor. */
62
63
  export function resolveToastDuration(descriptor) {
63
64
  validateToastDescriptor(descriptor);
64
65
  if (descriptor.durationMs === null)