@hjmds/design-contracts 1.18.0 → 1.20.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 (251) hide show
  1. package/dist/action-session.d.ts +16 -0
  2. package/dist/action-session.d.ts.map +1 -1
  3. package/dist/action-session.js +18 -0
  4. package/dist/action-session.js.map +1 -1
  5. package/dist/behaviors.d.ts +8 -6
  6. package/dist/behaviors.d.ts.map +1 -1
  7. package/dist/behaviors.js +4 -3
  8. package/dist/behaviors.js.map +1 -1
  9. package/dist/bottom-navigation.d.ts +14 -0
  10. package/dist/bottom-navigation.d.ts.map +1 -1
  11. package/dist/bottom-navigation.js +21 -0
  12. package/dist/bottom-navigation.js.map +1 -1
  13. package/dist/carousel.d.ts +3 -0
  14. package/dist/carousel.d.ts.map +1 -1
  15. package/dist/carousel.js.map +1 -1
  16. package/dist/catalog.d.ts +61 -0
  17. package/dist/catalog.d.ts.map +1 -1
  18. package/dist/component-recipes.d.ts +67 -0
  19. package/dist/component-recipes.d.ts.map +1 -1
  20. package/dist/component-recipes.js +27 -1
  21. package/dist/component-recipes.js.map +1 -1
  22. package/dist/field-group.d.ts +14 -0
  23. package/dist/field-group.d.ts.map +1 -1
  24. package/dist/field-group.js +9 -0
  25. package/dist/field-group.js.map +1 -1
  26. package/dist/form.d.ts.map +1 -1
  27. package/dist/form.js +10 -3
  28. package/dist/form.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/screen-patterns.d.ts +4 -0
  33. package/dist/screen-patterns.d.ts.map +1 -1
  34. package/dist/screen-patterns.js +12 -3
  35. package/dist/screen-patterns.js.map +1 -1
  36. package/dist/semantic-colors.d.ts +9 -0
  37. package/dist/semantic-colors.d.ts.map +1 -1
  38. package/dist/semantic-colors.js +5 -0
  39. package/dist/semantic-colors.js.map +1 -1
  40. package/dist/toast.d.ts +10 -1
  41. package/dist/toast.d.ts.map +1 -1
  42. package/dist/toast.js +43 -2
  43. package/dist/toast.js.map +1 -1
  44. package/dist/version.d.ts +1 -1
  45. package/dist/version.js +1 -1
  46. package/dist/version.js.map +1 -1
  47. package/docs/action-session.md +2 -0
  48. package/docs/asset.md +7 -0
  49. package/docs/bottom-navigation.md +22 -0
  50. package/docs/brand-boundary.md +3 -3
  51. package/docs/collection-rail.md +4 -0
  52. package/docs/compound-controls.md +8 -3
  53. package/docs/consumer-policy.md +39 -120
  54. package/docs/generated/component-maturity.md +1 -1
  55. package/docs/generated/renderer-evidence.json +3 -3
  56. package/docs/generated/renderer-evidence.md +1 -1
  57. package/docs/generated/showcase-manifest.json +1 -1
  58. package/docs/gravity-letters.md +2 -0
  59. package/docs/grid-reveal.md +2 -0
  60. package/docs/layout.md +2 -2
  61. package/docs/load-more.md +5 -0
  62. package/docs/migration-native-legacy-removal.md +30 -17
  63. package/docs/optional-adapters.md +4 -0
  64. package/docs/screen-patterns.md +23 -1
  65. package/docs/toast.md +41 -2
  66. package/docs/usage/README.md +248 -245
  67. package/docs/usage/SELECTION.md +43 -0
  68. package/docs/usage/STANDARD.md +22 -10
  69. package/docs/usage/components/accordion.md +5 -3
  70. package/docs/usage/components/agreement.md +6 -9
  71. package/docs/usage/components/alert-dialog.md +12 -6
  72. package/docs/usage/components/asset.md +10 -4
  73. package/docs/usage/components/auth-provider-button.md +2 -2
  74. package/docs/usage/components/avatar.md +8 -6
  75. package/docs/usage/components/badge.md +4 -4
  76. package/docs/usage/components/bottom-cta.md +4 -4
  77. package/docs/usage/components/bottom-info.md +2 -2
  78. package/docs/usage/components/bottom-navigation.md +30 -6
  79. package/docs/usage/components/button.md +2 -2
  80. package/docs/usage/components/card.md +1 -1
  81. package/docs/usage/components/carousel.md +12 -4
  82. package/docs/usage/components/chat-message.md +6 -2
  83. package/docs/usage/components/chat-screen.md +5 -5
  84. package/docs/usage/components/checkbox-group.md +1 -1
  85. package/docs/usage/components/checkbox.md +2 -2
  86. package/docs/usage/components/chip.md +2 -2
  87. package/docs/usage/components/code-block.md +3 -4
  88. package/docs/usage/components/collapsible.md +6 -4
  89. package/docs/usage/components/combobox.md +2 -2
  90. package/docs/usage/components/command-palette.md +1 -1
  91. package/docs/usage/components/comment-thread-screen.md +7 -4
  92. package/docs/usage/components/container.md +1 -1
  93. package/docs/usage/components/content-transition.md +2 -2
  94. package/docs/usage/components/context-menu.md +2 -2
  95. package/docs/usage/components/counter-badge.md +3 -3
  96. package/docs/usage/components/data-table.md +1 -1
  97. package/docs/usage/components/date-picker.md +4 -4
  98. package/docs/usage/components/description-list.md +3 -3
  99. package/docs/usage/components/design-system-provider.md +2 -2
  100. package/docs/usage/components/dialog.md +14 -3
  101. package/docs/usage/components/divider.md +2 -2
  102. package/docs/usage/components/editor-screen.md +5 -3
  103. package/docs/usage/components/effect-surface.md +1 -1
  104. package/docs/usage/components/empty-state.md +6 -6
  105. package/docs/usage/components/field.md +5 -3
  106. package/docs/usage/components/file-picker.md +6 -3
  107. package/docs/usage/components/form.md +1 -1
  108. package/docs/usage/components/heading.md +3 -3
  109. package/docs/usage/components/icon-button.md +3 -3
  110. package/docs/usage/components/icon.md +1 -1
  111. package/docs/usage/components/image.md +5 -4
  112. package/docs/usage/components/keyboard-dock.md +1 -1
  113. package/docs/usage/components/layout.md +1 -1
  114. package/docs/usage/components/link.md +2 -2
  115. package/docs/usage/components/list-detail-screen.md +6 -6
  116. package/docs/usage/components/list-row.md +13 -4
  117. package/docs/usage/components/list.md +5 -4
  118. package/docs/usage/components/masonry.md +2 -1
  119. package/docs/usage/components/media-selection-screen.md +11 -5
  120. package/docs/usage/components/mentions.md +2 -2
  121. package/docs/usage/components/menu.md +3 -2
  122. package/docs/usage/components/menubar.md +2 -2
  123. package/docs/usage/components/message-composer.md +3 -3
  124. package/docs/usage/components/moderation-screen.md +3 -2
  125. package/docs/usage/components/notice.md +2 -2
  126. package/docs/usage/components/notification-inbox-screen.md +1 -1
  127. package/docs/usage/components/notification-item.md +2 -2
  128. package/docs/usage/components/number-field.md +3 -3
  129. package/docs/usage/components/otp-field.md +1 -1
  130. package/docs/usage/components/overview-screen.md +1 -1
  131. package/docs/usage/components/permission-screen.md +1 -1
  132. package/docs/usage/components/photo-source-sheet.md +1 -1
  133. package/docs/usage/components/popover.md +2 -2
  134. package/docs/usage/components/profile-screen.md +1 -1
  135. package/docs/usage/components/progress.md +2 -2
  136. package/docs/usage/components/qr-code.md +2 -2
  137. package/docs/usage/components/radio-group.md +1 -2
  138. package/docs/usage/components/radio.md +1 -2
  139. package/docs/usage/components/result.md +1 -1
  140. package/docs/usage/components/saved-items-screen.md +4 -2
  141. package/docs/usage/components/screen-layout.md +4 -3
  142. package/docs/usage/components/search-field.md +1 -1
  143. package/docs/usage/components/search-screen.md +4 -4
  144. package/docs/usage/components/section.md +3 -3
  145. package/docs/usage/components/segmented-control.md +4 -4
  146. package/docs/usage/components/select.md +2 -3
  147. package/docs/usage/components/settings-screen.md +11 -49
  148. package/docs/usage/components/sheet.md +10 -5
  149. package/docs/usage/components/sidebar.md +1 -1
  150. package/docs/usage/components/skeleton.md +1 -1
  151. package/docs/usage/components/skip-nav.md +1 -1
  152. package/docs/usage/components/slider.md +2 -2
  153. package/docs/usage/components/spinner.md +2 -2
  154. package/docs/usage/components/splitter.md +1 -1
  155. package/docs/usage/components/statistic.md +5 -4
  156. package/docs/usage/components/steps.md +2 -2
  157. package/docs/usage/components/surface.md +2 -3
  158. package/docs/usage/components/switch.md +1 -1
  159. package/docs/usage/components/tabs.md +4 -4
  160. package/docs/usage/components/tag.md +2 -2
  161. package/docs/usage/components/tags-input.md +4 -4
  162. package/docs/usage/components/text-area.md +2 -3
  163. package/docs/usage/components/text.md +85 -4
  164. package/docs/usage/components/timeline.md +2 -2
  165. package/docs/usage/components/toast.md +17 -7
  166. package/docs/usage/components/toggle-group.md +3 -3
  167. package/docs/usage/components/tooltip.md +1 -1
  168. package/docs/usage/components/top-bar.md +5 -4
  169. package/docs/usage/components/top.md +3 -3
  170. package/docs/usage/components/transfer-list.md +5 -4
  171. package/docs/usage/components/upload-item.md +3 -3
  172. package/docs/usage/components/virtual-list.md +1 -0
  173. package/docs/usage/compositions/action-feedback.md +42 -6
  174. package/docs/usage/compositions/action-recovery-optimistic.md +6 -1
  175. package/docs/usage/compositions/action-recovery-save.md +19 -23
  176. package/docs/usage/compositions/action-recovery-undo.md +6 -1
  177. package/docs/usage/compositions/activity-status.md +11 -5
  178. package/docs/usage/compositions/collection-detail.md +2 -0
  179. package/docs/usage/compositions/command-records.md +15 -5
  180. package/docs/usage/compositions/common-message.md +4 -2
  181. package/docs/usage/compositions/common-notification.md +5 -3
  182. package/docs/usage/compositions/compound-controls.md +13 -5
  183. package/docs/usage/compositions/content-transition-comparison.md +2 -2
  184. package/docs/usage/compositions/date-entry.md +10 -5
  185. package/docs/usage/compositions/date-time-selection.md +3 -3
  186. package/docs/usage/compositions/design-profile-comparison.md +7 -5
  187. package/docs/usage/compositions/disclosure.md +1 -1
  188. package/docs/usage/compositions/document-resource.md +10 -3
  189. package/docs/usage/compositions/expo-interactions.md +3 -2
  190. package/docs/usage/compositions/family-drawer.md +9 -4
  191. package/docs/usage/compositions/field-group.md +7 -1
  192. package/docs/usage/compositions/floating-action-button.md +18 -18
  193. package/docs/usage/compositions/illustrated-outcome.md +3 -2
  194. package/docs/usage/compositions/input-sheet.md +6 -2
  195. package/docs/usage/compositions/interaction-adapters.md +1 -1
  196. package/docs/usage/compositions/interaction-flow-apply.md +6 -3
  197. package/docs/usage/compositions/interaction-flow-draft.md +5 -2
  198. package/docs/usage/compositions/interaction-flow-search.md +5 -2
  199. package/docs/usage/compositions/live-list.md +7 -5
  200. package/docs/usage/compositions/navigation-bar-collection.md +8 -7
  201. package/docs/usage/compositions/optional-adapters.md +1 -1
  202. package/docs/usage/compositions/origin-dialog.md +5 -5
  203. package/docs/usage/compositions/paper-surface.md +1 -1
  204. package/docs/usage/compositions/photo-source.md +1 -1
  205. package/docs/usage/compositions/purpose-input-comment.md +5 -3
  206. package/docs/usage/compositions/purpose-input-message.md +5 -3
  207. package/docs/usage/compositions/reference-first.md +63 -42
  208. package/docs/usage/compositions/reference-review.md +60 -50
  209. package/docs/usage/compositions/reference-settings.md +60 -50
  210. package/docs/usage/compositions/selection-scope.md +48 -35
  211. package/docs/usage/compositions/stea-order-progress.md +1 -0
  212. package/docs/usage/compositions/stea-otp-verify.md +5 -3
  213. package/docs/usage/compositions/stea-pixel-empty.md +3 -3
  214. package/docs/usage/compositions/time-selection.md +6 -5
  215. package/docs/usage/compositions/upload-recovery.md +10 -1
  216. package/docs/usage/compositions/video-dialog.md +10 -3
  217. package/docs/usage/compositions/web-additions.md +5 -5
  218. package/docs/usage/compositions/web-navigation.md +1 -1
  219. package/docs/usage/screens/common-chat.md +21 -8
  220. package/docs/usage/screens/common-comments.md +13 -1
  221. package/docs/usage/screens/common-inbox.md +19 -6
  222. package/docs/usage/screens/common-login.md +19 -7
  223. package/docs/usage/screens/common-profile.md +22 -9
  224. package/docs/usage/screens/common-saved.md +16 -2
  225. package/docs/usage/screens/common-search.md +24 -4
  226. package/docs/usage/screens/common-settings.md +22 -50
  227. package/docs/usage/screens/common-shell.md +14 -2
  228. package/docs/usage/screens/dashboard.md +52 -109
  229. package/docs/usage/screens/discovery-gallery.md +57 -148
  230. package/docs/usage/screens/flow-collection.md +38 -9
  231. package/docs/usage/screens/flow-editor.md +25 -7
  232. package/docs/usage/screens/flow-media.md +23 -7
  233. package/docs/usage/screens/flow-moderation.md +15 -2
  234. package/docs/usage/screens/flow-onboarding.md +3 -3
  235. package/docs/usage/screens/flow-permission.md +17 -3
  236. package/docs/usage/screens/landing.md +37 -20
  237. package/docs/usage/screens/mockup-studio.md +22 -7
  238. package/docs/usage/screens/notification-settings.md +18 -4
  239. package/docs/usage/screens/product-bento.md +18 -9
  240. package/docs/usage/screens/reference-comparison.md +29 -10
  241. package/docs/usage/tokens/color.md +6 -3
  242. package/docs/usage/tokens/elevation-opacity.md +4 -2
  243. package/docs/usage/tokens/font-roles.md +2 -2
  244. package/docs/usage/tokens/layers.md +3 -3
  245. package/docs/usage/tokens/motion.md +2 -2
  246. package/docs/usage/tokens/radius.md +4 -2
  247. package/docs/usage/tokens/spacing.md +3 -3
  248. package/docs/usage/tokens/theme-studio.md +2 -2
  249. package/docs/usage/tokens/typography-studio.md +14 -8
  250. package/docs/usage/tokens/typography.md +15 -5
  251. package/package.json +1 -1
@@ -1,3 +1,17 @@
1
+ export type FieldGroupLayout = "stack" | "inline";
2
+ /** Date and duration parts share grouping, spacing and wrapping rather than rebuilding a fieldset. */
3
+ export declare const fieldGroupRecipe: {
4
+ readonly defaults: {
5
+ readonly layout: "stack";
6
+ };
7
+ readonly gap: "md";
8
+ readonly headingGap: "sm";
9
+ readonly supportGap: "xs";
10
+ readonly inline: {
11
+ readonly minCharacters: 10;
12
+ readonly minWidth: number;
13
+ };
14
+ };
1
15
  /** Related-input grouping contract. Values and submit/validation timing remain product-owned. */
2
16
  export type FieldGroupMember = Readonly<{
3
17
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"field-group.d.ts","sourceRoot":"","sources":["../src/field-group.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,QAAQ,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,SAAS,MAAM,EA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AAC,GAAG,IAAI,EAAE,IAAI,KAAK,IAAI;EAOxG;AAUD,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,oBAAoB,GAAG,QAAQ,CAAC;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAC7C,CAAC,CA2CD"}
@@ -1,3 +1,12 @@
1
+ import { spacing } from "./foundations.js";
2
+ /** Date and duration parts share grouping, spacing and wrapping rather than rebuilding a fieldset. */
3
+ export const fieldGroupRecipe = {
4
+ defaults: { layout: "stack" },
5
+ gap: "md",
6
+ headingGap: "sm",
7
+ supportGap: "xs",
8
+ inline: { minCharacters: 10, minWidth: spacing.xxxl * 3 },
9
+ };
1
10
  function requireText(value, name) {
2
11
  if (typeof value !== "string" || !value.trim())
3
12
  throw new TypeError(`Field group ${name} must be nonempty text`);
@@ -1 +1 @@
1
- {"version":3,"file":"field-group.js","sourceRoot":"","sources":["../src/field-group.ts"],"names":[],"mappings":"AA4BA,SAAS,WAAW,CAAC,KAAc,EAAE,IAAY;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,MAAM,IAAI,SAAS,CAAC,eAAe,IAAI,wBAAwB,CAAC,CAAC;AACnH,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,2BAA2B,CAAC,MAA2C;IACrF,IAAI,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACtF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,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CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;YAC9H,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACpH,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YAClG,IAAI,UAAU,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAChG,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK;gBACnF,+EAA+E;gBAC/E,QAAQ,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS;gBAC/G,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["/** Related-input grouping contract. Values and submit/validation timing remain product-owned. */\nexport type FieldGroupMember = Readonly<{\n id: string;\n label: string;\n description?: string;\n error?: string;\n disabled?: boolean;\n}>;\n\nexport type FieldGroupDescriptor = Readonly<{\n label: string;\n description?: string;\n disabled?: boolean;\n /** An empty fieldIds list is a group-only error, not a reason to mark every field invalid. */\n error?: Readonly<{ message: string; fieldIds: readonly string[] }>;\n fields: readonly FieldGroupMember[];\n}>;\n\nexport type ResolvedFieldGroupMember = Readonly<{\n id: string;\n label: string;\n groupLabel: string;\n disabled: boolean;\n invalid: boolean;\n /** Renderers associate these messages without replacing a field's own help or error. */\n support: readonly Readonly<{ scope: \"group\" | \"field\"; kind: \"description\" | \"error\"; text: string }>[];\n}>;\n\nfunction requireText(value: unknown, name: string): asserts value is string {\n if (typeof value !== \"string\" || !value.trim()) throw new TypeError(`Field group ${name} must be nonempty text`);\n}\n\n/** Late native events and retained callbacks must use the current committed group policy. */\nexport function createFieldGroupEditSession(fields: readonly ResolvedFieldGroupMember[]) {\n let enabled = new Set(fields.filter(field => !field.disabled).map(field => field.id));\n const members = new Map(fields.map(field => [field.id, {}]));\n return {\n update(next: readonly ResolvedFieldGroupMember[]) {\n const current = new Set(next.map(field => field.id));\n // A reused id is a new mounted field after removal. Checking only enabled ids\n // would revive queued events from the old field and overwrite the new draft.\n for (const id of members.keys()) if (!current.has(id)) members.delete(id);\n for (const id of current) if (!members.has(id)) members.set(id, {});\n enabled = new Set(next.filter(field => !field.disabled).map(field => field.id));\n },\n /** Effect cleanup blocks events without treating Strict Mode replay as field removal. */\n suspend() { enabled.clear(); },\n guard<Args extends unknown[]>(id: string, callback: (...args: Args) => void): (...args: Args) => void {\n // A new host binds during render, before its committed policy enables it.\n if (!members.has(id)) members.set(id, {});\n const member = members.get(id);\n return (...args) => { if (members.get(id) === member && enabled.has(id)) callback(...args); };\n },\n };\n}\n\nfunction optionalText(value: unknown, name: string): void {\n if (value !== undefined) requireText(value, name);\n}\n\nfunction optionalBoolean(value: unknown): void {\n if (value !== undefined && typeof value !== \"boolean\") throw new TypeError(\"Field group disabled must be boolean\");\n}\n\nexport function resolveFieldGroup(descriptor: FieldGroupDescriptor): Readonly<{\n label: string;\n description: string | undefined;\n error: string | undefined;\n disabled: boolean;\n fields: readonly ResolvedFieldGroupMember[];\n}> {\n requireText(descriptor.label, \"label\");\n optionalText(descriptor.description, \"description\");\n optionalBoolean(descriptor.disabled);\n if (!Array.isArray(descriptor.fields)) throw new TypeError(\"Field group fields must be an array\");\n const ids = new Set<string>();\n for (const field of descriptor.fields) {\n requireText(field.id, \"field id\");\n requireText(field.label, \"field label\");\n optionalText(field.description, \"field description\");\n optionalText(field.error, \"field error\");\n optionalBoolean(field.disabled);\n if (ids.has(field.id)) throw new TypeError(\"Field group field ids must be unique\");\n ids.add(field.id);\n }\n if (descriptor.error !== undefined) {\n requireText(descriptor.error.message, \"error\");\n const affected = descriptor.error.fieldIds;\n // A typo or removed field must not silently lose its validation feedback.\n // Products update the visible error with their dynamic field list atomically.\n if (!Array.isArray(affected) || new Set(affected).size !== affected.length || affected.some(id => !ids.has(id))) {\n throw new TypeError(\"Field group error must reference distinct current field ids\");\n }\n }\n const disabled = descriptor.disabled ?? false;\n return Object.freeze({\n label: descriptor.label,\n description: descriptor.description,\n error: descriptor.error?.message,\n disabled,\n fields: Object.freeze(descriptor.fields.map(field => {\n const groupError = descriptor.error?.fieldIds.includes(field.id) ? descriptor.error.message : undefined;\n const support: ResolvedFieldGroupMember[\"support\"][number][] = [];\n if (descriptor.description !== undefined) support.push({ scope: \"group\", kind: \"description\", text: descriptor.description });\n if (field.description !== undefined) support.push({ scope: \"field\", kind: \"description\", text: field.description });\n if (field.error !== undefined) support.push({ scope: \"field\", kind: \"error\", text: field.error });\n if (groupError !== undefined) support.push({ scope: \"group\", kind: \"error\", text: groupError });\n return Object.freeze({ id: field.id, label: field.label, groupLabel: descriptor.label,\n // Group unlock restores independently disabled members; it never enables them.\n disabled: disabled || (field.disabled ?? false), invalid: field.error !== undefined || groupError !== undefined,\n support: Object.freeze(support.map(message => Object.freeze(message))) });\n })),\n });\n}\n"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K,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YAClG,IAAI,UAAU,KAAK,SAAS;gBAAE,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YAChG,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK;gBACnF,+EAA+E;gBAC/E,QAAQ,EAAE,QAAQ,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS;gBAC/G,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { spacing } from \"./foundations.js\";\n\nexport type FieldGroupLayout = \"stack\" | \"inline\";\n/** Date and duration parts share grouping, spacing and wrapping rather than rebuilding a fieldset. */\nexport const fieldGroupRecipe = {\n defaults: { layout: \"stack\" },\n gap: \"md\",\n headingGap: \"sm\",\n supportGap: \"xs\",\n inline: { minCharacters: 10, minWidth: spacing.xxxl * 3 },\n} as const;\n\n/** Related-input grouping contract. Values and submit/validation timing remain product-owned. */\nexport type FieldGroupMember = Readonly<{\n id: string;\n label: string;\n description?: string;\n error?: string;\n disabled?: boolean;\n}>;\n\nexport type FieldGroupDescriptor = Readonly<{\n label: string;\n description?: string;\n disabled?: boolean;\n /** An empty fieldIds list is a group-only error, not a reason to mark every field invalid. */\n error?: Readonly<{ message: string; fieldIds: readonly string[] }>;\n fields: readonly FieldGroupMember[];\n}>;\n\nexport type ResolvedFieldGroupMember = Readonly<{\n id: string;\n label: string;\n groupLabel: string;\n disabled: boolean;\n invalid: boolean;\n /** Renderers associate these messages without replacing a field's own help or error. */\n support: readonly Readonly<{ scope: \"group\" | \"field\"; kind: \"description\" | \"error\"; text: string }>[];\n}>;\n\nfunction requireText(value: unknown, name: string): asserts value is string {\n if (typeof value !== \"string\" || !value.trim()) throw new TypeError(`Field group ${name} must be nonempty text`);\n}\n\n/** Late native events and retained callbacks must use the current committed group policy. */\nexport function createFieldGroupEditSession(fields: readonly ResolvedFieldGroupMember[]) {\n let enabled = new Set(fields.filter(field => !field.disabled).map(field => field.id));\n const members = new Map(fields.map(field => [field.id, {}]));\n return {\n update(next: readonly ResolvedFieldGroupMember[]) {\n const current = new Set(next.map(field => field.id));\n // A reused id is a new mounted field after removal. Checking only enabled ids\n // would revive queued events from the old field and overwrite the new draft.\n for (const id of members.keys()) if (!current.has(id)) members.delete(id);\n for (const id of current) if (!members.has(id)) members.set(id, {});\n enabled = new Set(next.filter(field => !field.disabled).map(field => field.id));\n },\n /** Effect cleanup blocks events without treating Strict Mode replay as field removal. */\n suspend() { enabled.clear(); },\n guard<Args extends unknown[]>(id: string, callback: (...args: Args) => void): (...args: Args) => void {\n // A new host binds during render, before its committed policy enables it.\n if (!members.has(id)) members.set(id, {});\n const member = members.get(id);\n return (...args) => { if (members.get(id) === member && enabled.has(id)) callback(...args); };\n },\n };\n}\n\nfunction optionalText(value: unknown, name: string): void {\n if (value !== undefined) requireText(value, name);\n}\n\nfunction optionalBoolean(value: unknown): void {\n if (value !== undefined && typeof value !== \"boolean\") throw new TypeError(\"Field group disabled must be boolean\");\n}\n\nexport function resolveFieldGroup(descriptor: FieldGroupDescriptor): Readonly<{\n label: string;\n description: string | undefined;\n error: string | undefined;\n disabled: boolean;\n fields: readonly ResolvedFieldGroupMember[];\n}> {\n requireText(descriptor.label, \"label\");\n optionalText(descriptor.description, \"description\");\n optionalBoolean(descriptor.disabled);\n if (!Array.isArray(descriptor.fields)) throw new TypeError(\"Field group fields must be an array\");\n const ids = new Set<string>();\n for (const field of descriptor.fields) {\n requireText(field.id, \"field id\");\n requireText(field.label, \"field label\");\n optionalText(field.description, \"field description\");\n optionalText(field.error, \"field error\");\n optionalBoolean(field.disabled);\n if (ids.has(field.id)) throw new TypeError(\"Field group field ids must be unique\");\n ids.add(field.id);\n }\n if (descriptor.error !== undefined) {\n requireText(descriptor.error.message, \"error\");\n const affected = descriptor.error.fieldIds;\n // A typo or removed field must not silently lose its validation feedback.\n // Products update the visible error with their dynamic field list atomically.\n if (!Array.isArray(affected) || new Set(affected).size !== affected.length || affected.some(id => !ids.has(id))) {\n throw new TypeError(\"Field group error must reference distinct current field ids\");\n }\n }\n const disabled = descriptor.disabled ?? false;\n return Object.freeze({\n label: descriptor.label,\n description: descriptor.description,\n error: descriptor.error?.message,\n disabled,\n fields: Object.freeze(descriptor.fields.map(field => {\n const groupError = descriptor.error?.fieldIds.includes(field.id) ? descriptor.error.message : undefined;\n const support: ResolvedFieldGroupMember[\"support\"][number][] = [];\n if (descriptor.description !== undefined) support.push({ scope: \"group\", kind: \"description\", text: descriptor.description });\n if (field.description !== undefined) support.push({ scope: \"field\", kind: \"description\", text: field.description });\n if (field.error !== undefined) support.push({ scope: \"field\", kind: \"error\", text: field.error });\n if (groupError !== undefined) support.push({ scope: \"group\", kind: \"error\", text: groupError });\n return Object.freeze({ id: field.id, label: field.label, groupLabel: descriptor.label,\n // Group unlock restores independently disabled members; it never enables them.\n disabled: disabled || (field.disabled ?? false), invalid: field.error !== undefined || groupError !== undefined,\n support: Object.freeze(support.map(message => Object.freeze(message))) });\n })),\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.ts"],"names":[],"mappings":"AAE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M,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACnD,yFAAyF;IACzF,KAAK,IAAI,OAAO,CAAC;IACjB,OAAO,IAAI,OAAO,CAAC;CACpB,CAAC,CAAC;AAQH,wBAAgB,gCAAgC,CAAC,MAAM,EACrD,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,IAAI,CAKN;AAcD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAC5C,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,iBAAiB,CAAC,MAAM,CAAC,CA0E3B;AAMD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAW1E;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,MAAM,EAAE,GACvD,MAAM,GAAG,IAAI,CAQf;AAMD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;AAEpD,eAAO,MAAM,YAAY;;CAE8B,CAAC;AAExD;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAgBrB,CAAC;AAMH,eAAO,MAAM,oBAAoB;IAC/B,+FAA+F;;CAElB,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;QAT3B,+FAA+F;;;;;;;;;;;;;;;;;;CAsCvF,CAAC"}
package/dist/form.js CHANGED
@@ -51,7 +51,6 @@ export function createFormSubmitSession(options) {
51
51
  if (phase.status === "submitting") {
52
52
  return Promise.resolve({ outcome: "blocked", reason: "already-submitting" });
53
53
  }
54
- transition({ status: "submitting" });
55
54
  return new Promise((resolve) => {
56
55
  let settled = false;
57
56
  const settleOnce = (outcome) => {
@@ -62,20 +61,28 @@ export function createFormSubmitSession(options) {
62
61
  resolve(outcome);
63
62
  };
64
63
  interruptCurrentAttempt = settleOnce;
64
+ // Subscribers may dispose synchronously. Install cancellation before notifying.
65
+ transition({ status: "submitting" });
66
+ if (settled)
67
+ return;
65
68
  (async () => {
66
69
  try {
67
70
  await options.onSubmit(values);
68
71
  if (settled)
69
72
  return;
70
- transition({ status: "succeeded" });
73
+ phase = { status: "succeeded" };
71
74
  settleOnce({ outcome: "succeeded" });
75
+ // A terminal-state subscriber can start the next attempt; do not clear
76
+ // that new attempt's cancellation handle after notifying it.
77
+ notify();
72
78
  }
73
79
  catch (error) {
74
80
  if (settled)
75
81
  return;
76
82
  const message = resolveFailureMessage(options, error);
77
- transition({ status: "failed", message });
83
+ phase = { status: "failed", message };
78
84
  settleOnce({ outcome: "failed", message });
85
+ notify();
79
86
  }
80
87
  })();
81
88
  });
package/dist/form.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../src/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAuD3C,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,QAAQ,KAAK,oBAAoB,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAAyC;IAEzC,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC3C,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;IAC1D,CAAC;IACD,UAAU,CAAC,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,qBAAqB,CAC5B,OAAyC,EACzC,KAAc;IAEd,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,KAAK,CAAC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AAmD;QACnD,qDAAqD;QACrD,kEAAkE;QAClE,0DAA0D;QAC1D,kEAAkE;QAClE,kDAAkD;QAClD,oDAAoD;QACpD,sEAAsE;QACtE,2DAA2D;KAC5D;CACO,CAAC","sourcesContent":["import { spacing } from \"./foundations.js\";\n\n/**\n * Form owns two things only: the vertical rhythm between already-framed\n * Fields, and the repeatable submit session (idle → submitting →\n * succeeded/failed). Field values, registration, dependencies, validateTrigger\n * policy and Form.List-style repeating groups stay product-owned (React Hook\n * Form or equivalent) — see docs/form.md for the full boundary.\n */\n\n// ---------------------------------------------------------------------------\n// Submit session\n// ---------------------------------------------------------------------------\n\nexport type FormSubmitStatus = \"idle\" | \"submitting\" | \"succeeded\" | \"failed\";\n\nexport type FormSubmitPhase =\n | Readonly<{ status: \"idle\" }>\n | Readonly<{ status: \"submitting\" }>\n | Readonly<{ status: \"succeeded\" }>\n | Readonly<{ status: \"failed\"; message: string }>;\n\nexport type FormSubmitOutcome =\n | Readonly<{ outcome: \"succeeded\" }>\n | Readonly<{ outcome: \"failed\"; message: string }>\n | Readonly<{ outcome: \"blocked\"; reason: \"already-submitting\" }>\n | Readonly<{ outcome: \"interrupted\" }>;\n\n/** Rejects to report a submission failure; resolving never implies success. */\nexport type FormSubmitHandler<Values> = (values: Values) => void | Promise<void>;\n\nexport type FormSubmitSessionOptions<Values> = Readonly<{\n onSubmit: FormSubmitHandler<Values>;\n /** Localized fallback shown when `resolveErrorMessage` is absent, throws, or returns empty copy. */\n fallbackErrorMessage: string;\n resolveErrorMessage?: (error: unknown) => string;\n}>;\n\n/**\n * A single submit session is reused across many attempts — unlike\n * AlertDialog's one-shot confirm, a form typically stays mounted and gets\n * resubmitted (edit → retry, or a settings screen saved again later). Each\n * attempt still settles its own returned Promise exactly once, and\n * `submitting` blocks every concurrent attempt the same way AlertDialog's\n * `busy` blocks a second confirm.\n */\nexport type FormSubmitSession<Values> = Readonly<{\n getSnapshot(): FormSubmitPhase;\n subscribe(listener: () => void): () => void;\n submit(values: Values): Promise<FormSubmitOutcome>;\n /** Moves a resting `succeeded`/`failed` phase back to `idle`. No-op while submitting. */\n reset(): boolean;\n dispose(): boolean;\n}>;\n\nfunction assertCopy(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Form ${field} must not be empty`);\n }\n}\n\nexport function validateFormSubmitSessionOptions<Values>(\n options: FormSubmitSessionOptions<Values>,\n): void {\n if (typeof options.onSubmit !== \"function\") {\n throw new TypeError(\"Form onSubmit must be a function\");\n }\n assertCopy(options.fallbackErrorMessage, \"fallbackErrorMessage\");\n}\n\nfunction resolveFailureMessage<Values>(\n options: FormSubmitSessionOptions<Values>,\n error: unknown,\n): string {\n try {\n const resolved = options.resolveErrorMessage?.(error)?.trim();\n return resolved || options.fallbackErrorMessage;\n } catch {\n return options.fallbackErrorMessage;\n }\n}\n\n/**\n * Owns submit re-entrancy and exactly-once settlement. Does not own field\n * values (the caller passes `values` at call time), field-level validation,\n * or when submission is allowed to start (the product decides that from its\n * own dirty/valid state before calling `submit`).\n */\nexport function createFormSubmitSession<Values>(\n options: FormSubmitSessionOptions<Values>,\n): FormSubmitSession<Values> {\n validateFormSubmitSessionOptions(options);\n\n let phase: FormSubmitPhase = { status: \"idle\" };\n let disposed = false;\n let interruptCurrentAttempt: ((outcome: FormSubmitOutcome) => void) | null = null;\n const listeners = new Set<() => void>();\n\n const notify = () => {\n for (const listener of listeners) listener();\n };\n const transition = (next: FormSubmitPhase) => {\n phase = next;\n notify();\n };\n\n return {\n getSnapshot: () => phase,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n submit(values) {\n if (disposed) throw new Error(\"Cannot use a disposed Form submit session\");\n if (phase.status === \"submitting\") {\n return Promise.resolve({ outcome: \"blocked\", reason: \"already-submitting\" });\n }\n\n transition({ status: \"submitting\" });\n\n return new Promise<FormSubmitOutcome>((resolve) => {\n let settled = false;\n const settleOnce = (outcome: FormSubmitOutcome) => {\n if (settled) return;\n settled = true;\n interruptCurrentAttempt = null;\n resolve(outcome);\n };\n interruptCurrentAttempt = settleOnce;\n\n (async () => {\n try {\n await options.onSubmit(values);\n if (settled) return;\n transition({ status: \"succeeded\" });\n settleOnce({ outcome: \"succeeded\" });\n } catch (error) {\n if (settled) return;\n const message = resolveFailureMessage(options, error);\n transition({ status: \"failed\", message });\n settleOnce({ outcome: \"failed\", message });\n }\n })();\n });\n },\n reset() {\n if (disposed) return false;\n if (phase.status === \"idle\" || phase.status === \"submitting\") return false;\n transition({ status: \"idle\" });\n return true;\n },\n dispose() {\n if (disposed) return false;\n disposed = true;\n interruptCurrentAttempt?.({ outcome: \"interrupted\" });\n interruptCurrentAttempt = null;\n return true;\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Submit-failure focus\n// ---------------------------------------------------------------------------\n\n/**\n * Form does not register fields or run validation, so it cannot find the\n * first invalid field on its own. The product supplies its own field render\n * order and the ids it currently considers invalid (e.g. React Hook Form's\n * `formState.errors` keys); Form only fixes which one wins the race — first\n * in render order — so every product answers this the same way.\n */\nexport function validateFormFieldOrder(fieldOrder: readonly string[]): void {\n const seen = new Set<string>();\n fieldOrder.forEach((fieldId, index) => {\n if (fieldId.trim().length === 0) {\n throw new TypeError(`Form field id at index ${index} must not be empty`);\n }\n if (seen.has(fieldId)) {\n throw new TypeError(`Duplicate Form field id: ${fieldId}`);\n }\n seen.add(fieldId);\n });\n}\n\n/**\n * Web renderers call `.focus()` on the resolved field's control; React Native\n * renderers move accessibility focus to it (e.g. `AccessibilityInfo.sendAccessibilityEvent`\n * or a focus-trap ref). Returns `null` when there are no fields yet or none\n * are invalid, in which case a failed submit has no field to focus and the\n * form-level error slot below owns the announcement instead.\n */\nexport function resolveFirstInvalidFieldFocusTarget(\n fieldOrder: readonly string[],\n invalidFieldIds: ReadonlySet<string> | readonly string[],\n): string | null {\n validateFormFieldOrder(fieldOrder);\n const invalid =\n invalidFieldIds instanceof Set ? invalidFieldIds : new Set(invalidFieldIds);\n for (const fieldId of fieldOrder) {\n if (invalid.has(fieldId)) return fieldId;\n }\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Visual recipe — inter-field rhythm only\n// ---------------------------------------------------------------------------\n\nexport type FormDensity = \"compact\" | \"comfortable\";\n\nexport const formDefaults = {\n density: \"comfortable\",\n} as const satisfies Readonly<{ density: FormDensity }>;\n\n/**\n * Anatomy is fixed, not a configurable prop: fields, then the form-level\n * error, then actions. `field` frame styling (background, border, its own\n * label/hint/error gap) belongs to `fieldRecipe`; this recipe only sets the\n * gap *between* one field and the next. `formError` renders as the existing\n * Notice `tone=\"danger\"` contract — Form fixes only its slot position, it\n * does not redeclare Notice's colors. `actions` has no dedicated layout here;\n * composing Button/Stack in that slot is the product's job, same reasoning\n * the roadmap already applies to Stack.\n */\nexport const formRecipe = {\n slots: [\"root\", \"field\", \"formError\", \"actions\"] as const,\n defaults: formDefaults,\n density: {\n compact: { fieldGap: spacing.sm },\n comfortable: { fieldGap: spacing.lg },\n },\n formError: {\n position: \"beforeActions\",\n gap: spacing.sm,\n },\n} as const satisfies Readonly<{\n slots: readonly [\"root\", \"field\", \"formError\", \"actions\"];\n defaults: Readonly<{ density: FormDensity }>;\n density: Record<FormDensity, Readonly<{ fieldGap: number }>>;\n formError: Readonly<{ position: \"beforeActions\"; gap: number }>;\n}>;\n\n// ---------------------------------------------------------------------------\n// Behavior — source for the shared behaviorRegistry wiring\n// ---------------------------------------------------------------------------\n\nexport const formBehaviorDefaults = {\n /** Reuses Toast's own `normal | high` vocabulary: a blocked submission is `high`/assertive. */\n errorAnnouncementPriority: \"high\",\n} as const satisfies Readonly<{ errorAnnouncementPriority: \"normal\" | \"high\" }>;\n\n/**\n * Kept beside the Form contract as the source value wired by\n * `behaviorRegistry.form`; this lets the registry reuse the contract without\n * redeclaring Form's inputs, events, states, or scenarios.\n */\nexport const formBehaviorSpec = {\n /*\n 값은 제품이 소유하므로 controlled prop이 없다. 대신 renderer가 반드시 배선해야 하는\n 것을 `inputs`/`events`로 선언한다 — 공유 불변식이 \"controlled + inputs + events가\n 하나도 없는 behavior는 renderer 테스트가 구동할 대상이 없다\"고 요구하고, 그 지적이\n 옳다. 같은 형태(컨트롤러가 상태를 소유하고 renderer가 구동)인 `loadMore`가 이미\n `controlled: []` + `inputs` + `events`로 선언한 선례를 따른다.\n */\n controlled: [],\n inputs: [\"status\", \"formError\", \"fieldOrder\"],\n events: [\"onSubmit\"],\n defaults: formBehaviorDefaults,\n stateAxes: {\n availability: [\"enabled\", \"busy\"],\n content: [\"idle\", \"loading\", \"error\"],\n },\n web: { roles: [\"alert\"], keyboard: [\"Tab\", \"Enter\"], focus: \"native\" },\n native: { roles: [\"alert\"], states: [\"busy\"], actions: [\"submit\"] },\n scenarios: [\n \"submitting-blocks-every-concurrent-submit-attempt\",\n \"each-submit-attempt-settles-its-result-exactly-once\",\n \"failed-submit-returns-to-a-resting-state-that-still-allows-retry\",\n \"succeeded-submit-remains-resting-and-allows-resubmission\",\n \"dispose-during-submit-settles-the-pending-attempt-as-interrupted\",\n \"disposed-session-rejects-further-submit-attempts\",\n \"form-level-error-never-carries-a-per-field-message\",\n \"first-invalid-field-in-render-order-receives-focus-on-submit-failure\",\n \"form-level-error-is-announced-when-no-field-target-exists\",\n ],\n} as const;\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../src/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAuD3C,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,QAAQ,KAAK,oBAAoB,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,OAAyC;IAEzC,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC3C,MAAM,IAAI,SAAS,CAAC,kCAAkC,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AO,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC;KACtC;IACD,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;IACtE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE;IACnE,SAAS,EAAE;QACT,mDAAmD;QACnD,qDAAqD;QACrD,kEAAkE;QAClE,0DAA0D;QAC1D,kEAAkE;QAClE,kDAAkD;QAClD,oDAAoD;QACpD,sEAAsE;QACtE,2DAA2D;KAC5D;CACO,CAAC","sourcesContent":["import { spacing } from \"./foundations.js\";\n\n/**\n * Form owns two things only: the vertical rhythm between already-framed\n * Fields, and the repeatable submit session (idle → submitting →\n * succeeded/failed). Field values, registration, dependencies, validateTrigger\n * policy and Form.List-style repeating groups stay product-owned (React Hook\n * Form or equivalent) — see docs/form.md for the full boundary.\n */\n\n// ---------------------------------------------------------------------------\n// Submit session\n// ---------------------------------------------------------------------------\n\nexport type FormSubmitStatus = \"idle\" | \"submitting\" | \"succeeded\" | \"failed\";\n\nexport type FormSubmitPhase =\n | Readonly<{ status: \"idle\" }>\n | Readonly<{ status: \"submitting\" }>\n | Readonly<{ status: \"succeeded\" }>\n | Readonly<{ status: \"failed\"; message: string }>;\n\nexport type FormSubmitOutcome =\n | Readonly<{ outcome: \"succeeded\" }>\n | Readonly<{ outcome: \"failed\"; message: string }>\n | Readonly<{ outcome: \"blocked\"; reason: \"already-submitting\" }>\n | Readonly<{ outcome: \"interrupted\" }>;\n\n/** Rejects to report a submission failure; resolving never implies success. */\nexport type FormSubmitHandler<Values> = (values: Values) => void | Promise<void>;\n\nexport type FormSubmitSessionOptions<Values> = Readonly<{\n onSubmit: FormSubmitHandler<Values>;\n /** Localized fallback shown when `resolveErrorMessage` is absent, throws, or returns empty copy. */\n fallbackErrorMessage: string;\n resolveErrorMessage?: (error: unknown) => string;\n}>;\n\n/**\n * A single submit session is reused across many attempts — unlike\n * AlertDialog's one-shot confirm, a form typically stays mounted and gets\n * resubmitted (edit → retry, or a settings screen saved again later). Each\n * attempt still settles its own returned Promise exactly once, and\n * `submitting` blocks every concurrent attempt the same way AlertDialog's\n * `busy` blocks a second confirm.\n */\nexport type FormSubmitSession<Values> = Readonly<{\n getSnapshot(): FormSubmitPhase;\n subscribe(listener: () => void): () => void;\n submit(values: Values): Promise<FormSubmitOutcome>;\n /** Moves a resting `succeeded`/`failed` phase back to `idle`. No-op while submitting. */\n reset(): boolean;\n dispose(): boolean;\n}>;\n\nfunction assertCopy(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Form ${field} must not be empty`);\n }\n}\n\nexport function validateFormSubmitSessionOptions<Values>(\n options: FormSubmitSessionOptions<Values>,\n): void {\n if (typeof options.onSubmit !== \"function\") {\n throw new TypeError(\"Form onSubmit must be a function\");\n }\n assertCopy(options.fallbackErrorMessage, \"fallbackErrorMessage\");\n}\n\nfunction resolveFailureMessage<Values>(\n options: FormSubmitSessionOptions<Values>,\n error: unknown,\n): string {\n try {\n const resolved = options.resolveErrorMessage?.(error)?.trim();\n return resolved || options.fallbackErrorMessage;\n } catch {\n return options.fallbackErrorMessage;\n }\n}\n\n/**\n * Owns submit re-entrancy and exactly-once settlement. Does not own field\n * values (the caller passes `values` at call time), field-level validation,\n * or when submission is allowed to start (the product decides that from its\n * own dirty/valid state before calling `submit`).\n */\nexport function createFormSubmitSession<Values>(\n options: FormSubmitSessionOptions<Values>,\n): FormSubmitSession<Values> {\n validateFormSubmitSessionOptions(options);\n\n let phase: FormSubmitPhase = { status: \"idle\" };\n let disposed = false;\n let interruptCurrentAttempt: ((outcome: FormSubmitOutcome) => void) | null = null;\n const listeners = new Set<() => void>();\n\n const notify = () => {\n for (const listener of listeners) listener();\n };\n const transition = (next: FormSubmitPhase) => {\n phase = next;\n notify();\n };\n\n return {\n getSnapshot: () => phase,\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n submit(values) {\n if (disposed) throw new Error(\"Cannot use a disposed Form submit session\");\n if (phase.status === \"submitting\") {\n return Promise.resolve({ outcome: \"blocked\", reason: \"already-submitting\" });\n }\n\n return new Promise<FormSubmitOutcome>((resolve) => {\n let settled = false;\n const settleOnce = (outcome: FormSubmitOutcome) => {\n if (settled) return;\n settled = true;\n interruptCurrentAttempt = null;\n resolve(outcome);\n };\n interruptCurrentAttempt = settleOnce;\n // Subscribers may dispose synchronously. Install cancellation before notifying.\n transition({ status: \"submitting\" });\n if (settled) return;\n\n (async () => {\n try {\n await options.onSubmit(values);\n if (settled) return;\n phase = { status: \"succeeded\" };\n settleOnce({ outcome: \"succeeded\" });\n // A terminal-state subscriber can start the next attempt; do not clear\n // that new attempt's cancellation handle after notifying it.\n notify();\n } catch (error) {\n if (settled) return;\n const message = resolveFailureMessage(options, error);\n phase = { status: \"failed\", message };\n settleOnce({ outcome: \"failed\", message });\n notify();\n }\n })();\n });\n },\n reset() {\n if (disposed) return false;\n if (phase.status === \"idle\" || phase.status === \"submitting\") return false;\n transition({ status: \"idle\" });\n return true;\n },\n dispose() {\n if (disposed) return false;\n disposed = true;\n interruptCurrentAttempt?.({ outcome: \"interrupted\" });\n interruptCurrentAttempt = null;\n return true;\n },\n };\n}\n\n// ---------------------------------------------------------------------------\n// Submit-failure focus\n// ---------------------------------------------------------------------------\n\n/**\n * Form does not register fields or run validation, so it cannot find the\n * first invalid field on its own. The product supplies its own field render\n * order and the ids it currently considers invalid (e.g. React Hook Form's\n * `formState.errors` keys); Form only fixes which one wins the race — first\n * in render order — so every product answers this the same way.\n */\nexport function validateFormFieldOrder(fieldOrder: readonly string[]): void {\n const seen = new Set<string>();\n fieldOrder.forEach((fieldId, index) => {\n if (fieldId.trim().length === 0) {\n throw new TypeError(`Form field id at index ${index} must not be empty`);\n }\n if (seen.has(fieldId)) {\n throw new TypeError(`Duplicate Form field id: ${fieldId}`);\n }\n seen.add(fieldId);\n });\n}\n\n/**\n * Web renderers call `.focus()` on the resolved field's control; React Native\n * renderers move accessibility focus to it (e.g. `AccessibilityInfo.sendAccessibilityEvent`\n * or a focus-trap ref). Returns `null` when there are no fields yet or none\n * are invalid, in which case a failed submit has no field to focus and the\n * form-level error slot below owns the announcement instead.\n */\nexport function resolveFirstInvalidFieldFocusTarget(\n fieldOrder: readonly string[],\n invalidFieldIds: ReadonlySet<string> | readonly string[],\n): string | null {\n validateFormFieldOrder(fieldOrder);\n const invalid =\n invalidFieldIds instanceof Set ? invalidFieldIds : new Set(invalidFieldIds);\n for (const fieldId of fieldOrder) {\n if (invalid.has(fieldId)) return fieldId;\n }\n return null;\n}\n\n// ---------------------------------------------------------------------------\n// Visual recipe — inter-field rhythm only\n// ---------------------------------------------------------------------------\n\nexport type FormDensity = \"compact\" | \"comfortable\";\n\nexport const formDefaults = {\n density: \"comfortable\",\n} as const satisfies Readonly<{ density: FormDensity }>;\n\n/**\n * Anatomy is fixed, not a configurable prop: fields, then the form-level\n * error, then actions. `field` frame styling (background, border, its own\n * label/hint/error gap) belongs to `fieldRecipe`; this recipe only sets the\n * gap *between* one field and the next. `formError` renders as the existing\n * Notice `tone=\"danger\"` contract — Form fixes only its slot position, it\n * does not redeclare Notice's colors. `actions` has no dedicated layout here;\n * composing Button/Stack in that slot is the product's job, same reasoning\n * the roadmap already applies to Stack.\n */\nexport const formRecipe = {\n slots: [\"root\", \"field\", \"formError\", \"actions\"] as const,\n defaults: formDefaults,\n density: {\n compact: { fieldGap: spacing.sm },\n comfortable: { fieldGap: spacing.lg },\n },\n formError: {\n position: \"beforeActions\",\n gap: spacing.sm,\n },\n} as const satisfies Readonly<{\n slots: readonly [\"root\", \"field\", \"formError\", \"actions\"];\n defaults: Readonly<{ density: FormDensity }>;\n density: Record<FormDensity, Readonly<{ fieldGap: number }>>;\n formError: Readonly<{ position: \"beforeActions\"; gap: number }>;\n}>;\n\n// ---------------------------------------------------------------------------\n// Behavior — source for the shared behaviorRegistry wiring\n// ---------------------------------------------------------------------------\n\nexport const formBehaviorDefaults = {\n /** Reuses Toast's own `normal | high` vocabulary: a blocked submission is `high`/assertive. */\n errorAnnouncementPriority: \"high\",\n} as const satisfies Readonly<{ errorAnnouncementPriority: \"normal\" | \"high\" }>;\n\n/**\n * Kept beside the Form contract as the source value wired by\n * `behaviorRegistry.form`; this lets the registry reuse the contract without\n * redeclaring Form's inputs, events, states, or scenarios.\n */\nexport const formBehaviorSpec = {\n /*\n 값은 제품이 소유하므로 controlled prop이 없다. 대신 renderer가 반드시 배선해야 하는\n 것을 `inputs`/`events`로 선언한다 — 공유 불변식이 \"controlled + inputs + events가\n 하나도 없는 behavior는 renderer 테스트가 구동할 대상이 없다\"고 요구하고, 그 지적이\n 옳다. 같은 형태(컨트롤러가 상태를 소유하고 renderer가 구동)인 `loadMore`가 이미\n `controlled: []` + `inputs` + `events`로 선언한 선례를 따른다.\n */\n controlled: [],\n inputs: [\"status\", \"formError\", \"fieldOrder\"],\n events: [\"onSubmit\"],\n defaults: formBehaviorDefaults,\n stateAxes: {\n availability: [\"enabled\", \"busy\"],\n content: [\"idle\", \"loading\", \"error\"],\n },\n web: { roles: [\"alert\"], keyboard: [\"Tab\", \"Enter\"], focus: \"native\" },\n native: { roles: [\"alert\"], states: [\"busy\"], actions: [\"submit\"] },\n scenarios: [\n \"submitting-blocks-every-concurrent-submit-attempt\",\n \"each-submit-attempt-settles-its-result-exactly-once\",\n \"failed-submit-returns-to-a-resting-state-that-still-allows-retry\",\n \"succeeded-submit-remains-resting-and-allows-resubmission\",\n \"dispose-during-submit-settles-the-pending-attempt-as-interrupted\",\n \"disposed-session-rejects-further-submit-attempts\",\n \"form-level-error-never-carries-a-per-field-message\",\n \"first-invalid-field-in-render-order-receives-focus-on-submit-failure\",\n \"form-level-error-is-announced-when-no-field-target-exists\",\n ],\n} as const;\n"]}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { containerDefaults, containerRecipe, resolveContainerDescriptor, validat
3
3
  export { visuallyHiddenRecipe, type VisuallyHiddenContract, } from "./visually-hidden.js";
4
4
  export { getIconDirectionality, getIconTransform, resolveIconDescriptor, semanticIconNames, validateIconDescriptor, type DecorativeIconDescriptor, type IconDescriptor, type IconDirection, type IconDirectionality, type IconTransform, type InformativeIconDescriptor, type ResolvedIconDescriptor, type SemanticIconName, } from "./icon.js";
5
5
  export { resolveLinkDescriptor, validateLinkDescriptor, validateLinkDestination, type ExternalLinkDestination, type InternalLinkDestination, type LinkDescriptor, type LinkDestination, type LinkIconDescriptor, type ResolvedLinkDescriptor, type ResolvedLinkIconDescriptor, } from "./link.js";
6
- export { bottomNavigationBehaviorDefaults, resolveBottomNavigationActivation, resolveBottomNavigationConfiguration, resolveBottomNavigationDescriptor, resolveBottomNavigationItem, validateBottomNavigationConfiguration, validateBottomNavigationDescriptor, type BottomNavigationActivation, type BottomNavigationConfiguration, type BottomNavigationCounterBadge, type BottomNavigationDescriptor, type BottomNavigationDirection, type BottomNavigationIconDescriptor, type BottomNavigationItemDescriptor, type BottomNavigationKeyboardBehavior, type BottomNavigationLabels, type ResolvedBottomNavigationCounterBadge, type ResolvedBottomNavigationConfiguration, type ResolvedBottomNavigationDescriptor, type ResolvedBottomNavigationIconDescriptor, type ResolvedBottomNavigationItemDescriptor, } from "./bottom-navigation.js";
6
+ export { bottomNavigationBehaviorDefaults, resolveBottomNavigationActivation, resolveBottomNavigationConfiguration, resolveBottomNavigationDescriptor, resolveBottomNavigationItem, validateBottomNavigationConfiguration, validateBottomNavigationDescriptor, type BottomNavigationActivation, type BottomNavigationConfiguration, type BottomNavigationCounterBadge, type BottomNavigationDescriptor, type BottomNavigationDirection, type BottomNavigationIconDescriptor, type BottomNavigationItemDescriptor, type BottomNavigationKeyboardBehavior, type BottomNavigationLabels, type BottomNavigationSurface, type ResolvedBottomNavigationCounterBadge, type ResolvedBottomNavigationConfiguration, type ResolvedBottomNavigationDescriptor, type ResolvedBottomNavigationIconDescriptor, type ResolvedBottomNavigationItemDescriptor, } from "./bottom-navigation.js";
7
7
  export { resolveTooltipDescriptor, tooltipBehaviorDefaults, tooltipDescriptorDefaults, validateTooltipDescriptor, validateTooltipOpenState, type ControlledTooltipOpenState, type ResolvedTooltipDescriptor, type TooltipAlign, type TooltipDescriptor, type TooltipOpenChangeDetails, type TooltipOpenChangeReason, type TooltipOpenState, type TooltipPlacement, type UncontrolledTooltipOpenState, } from "./tooltip.js";
8
8
  export { alertDialogBehaviorDefaults, canDismissAlertDialog, createAlertDialogSession, getAlertDialogInitialFocus, validateAlertDialogRequest, type AlertDialogAsyncState, type AlertDialogCancelReason, type AlertDialogConfirmAction, type AlertDialogDismissReason, type AlertDialogInitialFocus, type AlertDialogMode, type AlertDialogOpenChangeReason, type AlertDialogOpenState, type AlertDialogPhase, type AlertDialogRequest, type AlertDialogResult, type AlertDialogSession, } from "./alert-dialog.js";
9
9
  export { canDismissSheet, createSheetLifecycle, sheetBehaviorDefaults, type SheetDismissPolicy, type SheetDismissReason, type SheetLifecycle, type SheetOpenChangeDetails, type SheetOpenState, } from "./sheet.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,GACnC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,EAC3B,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,oBAAoB,EACpB,KAAK,sBAAsB,GAC5B,MAAM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cAAc,UAAU,CAAC;AAEzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,sBAAsB,CAAC;AAErC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GAKzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,GAK5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,GASvB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAQxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,oCAAoC,EACpC,iCAAiC,EACjC,2BAA2B,EAC3B,qCAAqC,EACrC,kCAAkC,GAenC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GAUzB,MAA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AC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,wGAAwG;AACxG,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAE3B,cAAc,aAAa,CAAC;AAE5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AAEzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,sBAAsB,CAAC;AAErC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC","sourcesContent":["export {\n aspectRatioDefaults,\n aspectRatioRecipe,\n resolveAspectRatioDescriptor,\n validateAspectRatioValue,\n type AspectRatioDescriptor,\n type AspectRatioPreset,\n type AspectRatioValue,\n type ResolvedAspectRatioDescriptor,\n} from \"./aspect-ratio.js\";\n\nexport {\n containerDefaults,\n containerRecipe,\n resolveContainerDescriptor,\n validateContainerDescriptor,\n type ContainerDescriptor,\n type ContainerGutter,\n type ContainerSize,\n type ResolvedContainerDescriptor,\n} from \"./container.js\";\n\nexport {\n visuallyHiddenRecipe,\n type VisuallyHiddenContract,\n} from \"./visually-hidden.js\";\n\nexport {\n getIconDirectionality,\n getIconTransform,\n resolveIconDescriptor,\n semanticIconNames,\n validateIconDescriptor,\n type DecorativeIconDescriptor,\n type IconDescriptor,\n type IconDirection,\n type IconDirectionality,\n type IconTransform,\n type InformativeIconDescriptor,\n type ResolvedIconDescriptor,\n type SemanticIconName,\n} from \"./icon.js\";\n\nexport {\n resolveLinkDescriptor,\n validateLinkDescriptor,\n validateLinkDestination,\n type ExternalLinkDestination,\n type InternalLinkDestination,\n type LinkDescriptor,\n type LinkDestination,\n type LinkIconDescriptor,\n type ResolvedLinkDescriptor,\n type ResolvedLinkIconDescriptor,\n} from \"./link.js\";\n\nexport {\n bottomNavigationBehaviorDefaults,\n resolveBottomNavigationActivation,\n resolveBottomNavigationConfiguration,\n resolveBottomNavigationDescriptor,\n resolveBottomNavigationItem,\n validateBottomNavigationConfiguration,\n validateBottomNavigationDescriptor,\n type BottomNavigationActivation,\n type BottomNavigationConfiguration,\n type BottomNavigationCounterBadge,\n type BottomNavigationDescriptor,\n type BottomNavigationDirection,\n type BottomNavigationIconDescriptor,\n type BottomNavigationItemDescriptor,\n type BottomNavigationKeyboardBehavior,\n type BottomNavigationLabels,\n type ResolvedBottomNavigationCounterBadge,\n type ResolvedBottomNavigationConfiguration,\n type ResolvedBottomNavigationDescriptor,\n type ResolvedBottomNavigationIconDescriptor,\n type ResolvedBottomNavigationItemDescriptor,\n} from \"./bottom-navigation.js\";\n\nexport {\n resolveTooltipDescriptor,\n tooltipBehaviorDefaults,\n tooltipDescriptorDefaults,\n validateTooltipDescriptor,\n validateTooltipOpenState,\n type ControlledTooltipOpenState,\n type ResolvedTooltipDescriptor,\n type TooltipAlign,\n type TooltipDescriptor,\n type TooltipOpenChangeDetails,\n type TooltipOpenChangeReason,\n type TooltipOpenState,\n type TooltipPlacement,\n type UncontrolledTooltipOpenState,\n} from \"./tooltip.js\";\n\nexport {\n alertDialogBehaviorDefaults,\n canDismissAlertDialog,\n createAlertDialogSession,\n getAlertDialogInitialFocus,\n validateAlertDialogRequest,\n type AlertDialogAsyncState,\n type AlertDialogCancelReason,\n type AlertDialogConfirmAction,\n type AlertDialogDismissReason,\n type AlertDialogInitialFocus,\n type AlertDialogMode,\n type AlertDialogOpenChangeReason,\n type AlertDialogOpenState,\n type AlertDialogPhase,\n type AlertDialogRequest,\n type AlertDialogResult,\n type AlertDialogSession,\n} from \"./alert-dialog.js\";\n\nexport {\n canDismissSheet,\n createSheetLifecycle,\n sheetBehaviorDefaults,\n type SheetDismissPolicy,\n type SheetDismissReason,\n type SheetLifecycle,\n type SheetOpenChangeDetails,\n type SheetOpenState,\n} from \"./sheet.js\";\n\nexport {\n createToastSession,\n createToastStore,\n resolveToastAnnouncement,\n resolveToastDescriptor,\n resolveToastDuration,\n liquidToastRecipe,\n resolveLiquidToastLayout,\n buildLiquidToastGeometry,\n validateLiquidToastAnchor,\n type LiquidToastAnchor,\n type LiquidToastLayout,\n type ToastPresentation,\n toastBehaviorDefaults,\n validateToastDescriptor,\n type ResolvedToastActionDescriptor,\n type ResolvedToastDescriptor,\n type ToastActionDescriptor,\n type ToastAnnouncement,\n type ToastAnnouncementPriority,\n type ToastDescriptor,\n type ToastDismissReason,\n type ToastDuplicatePolicy,\n type ToastId,\n type ToastOverflowPolicy,\n type ToastPauseReason,\n type ToastPhase,\n type ToastProgressDescriptor,\n type ToastPublishOptions,\n type ToastPublishResult,\n type ToastSession,\n type ToastSessionSnapshot,\n type ToastStore,\n type ToastStoreOptions,\n type ToastStoreSnapshot,\n type ToastTimerSnapshot,\n type ToastTimerStatus,\n type ToastTimerUpdatePolicy,\n} from \"./toast.js\";\n\nexport {\n resolveStatisticDescriptor,\n statisticDefaults,\n statisticTrendMarks,\n validateStatisticDescriptor,\n validateStatisticGroup,\n type ResolvedStatisticDescriptor,\n type ResolvedStatisticTrendDescriptor,\n type StatisticDescriptor,\n type StatisticGroupDescriptor,\n type StatisticTrendDescriptor,\n type StatisticTrendDirection,\n type StatisticTrendTone,\n} from \"./statistic.js\";\n\nexport {\n canRequestLoadMore,\n createLoadMoreController,\n loadMoreBehaviorDefaults,\n validateLoadMoreDescriptor,\n validateLoadMoreLabels,\n validateLoadMoreState,\n type LoadMoreCompleteState,\n type LoadMoreController,\n type LoadMoreControllerOptions,\n type LoadMoreControllerSnapshot,\n type LoadMoreDescriptor,\n type LoadMoreErrorState,\n type LoadMoreLabels,\n type LoadMoreLoadingState,\n type LoadMoreMode,\n type LoadMoreReadyState,\n type LoadMoreRequest,\n type LoadMoreRequestHandler,\n type LoadMoreRequestOutcome,\n type LoadMoreRequestReason,\n type LoadMoreState,\n} from \"./load-more.js\";\n\nexport {\n collectionValidationDefaults,\n flattenCollectionItems,\n getCollectionNavigationIntent,\n getCollectionNavigationTarget,\n getCollectionTypeaheadMatch,\n isComboboxResultCurrent,\n reconcileSelectSelection,\n resolveComboboxSelectedItem,\n resolveCollectionItem,\n resolveSelectSelectedItem,\n validateCollection,\n type CollectionNavigationIntent,\n type CollectionSource,\n type SelectCollectionSectionDescriptor,\n type SelectCollectionSource,\n type CollectionTypeaheadOptions,\n type CollectionValidationOptions,\n type ComboboxCollectionState,\n type ComboboxState,\n type ReconcileSelectOptions,\n type SelectCollectionState,\n type SelectConfiguration,\n type SelectLabel,\n type SelectOpenChangeReason,\n type SelectOpenState,\n type SelectState,\n} from \"./collection.js\";\n\nexport {\n ACCENTS,\n THEMES,\n accentFill,\n accentTint,\n brandGradient,\n isThemePreference,\n onAccentFill,\n onBrandGradient,\n withAlpha,\n type AccentTone,\n type ResolvedTheme,\n type ThemeColors,\n type ThemePreference,\n} from \"./colors.js\";\n\nexport {\n backdrop,\n breakpoint,\n control,\n easing,\n fontFamily,\n fontWeight,\n glyph,\n heading,\n layer,\n layout,\n letterSpacing,\n motion,\n motionPreset,\n numeric,\n opacity,\n overlay,\n radius,\n scrim,\n shadow,\n spacing,\n spring,\n stateLayer,\n stroke,\n typography,\n type BackdropReference,\n type FontFamily,\n type FontWeight,\n type FontWeightValue,\n type GlyphSize,\n type HeadingLevel,\n type LetterSpacing,\n type NumericVariant,\n type ReducedMotionBehavior,\n type TextVariant,\n} from \"./foundations.js\";\n\nexport {\n resolveResponsiveValue,\n resolveWindowClass,\n validateResponsiveValue,\n windowClassOrder,\n type ResponsiveValue,\n type WindowClass,\n} from \"./responsive.js\";\n\nexport {\n gridDefaults,\n gridGaps,\n gridRecipe,\n resolveGridLayout,\n validateGridDescriptor,\n type GridDescriptor,\n type GridGap,\n type GridGapToken,\n type ResolveGridLayoutOptions,\n type ResolvedGridLayout,\n} from \"./grid.js\";\n\nexport {\n accordionRecipe,\n alertDialogRecipe,\n avatarRecipe,\n badgeRecipe,\n bottomNavigationRecipe,\n bottomCtaRecipe,\n buttonRecipe,\n cardRecipe,\n chipRecipe,\n comboboxRecipe,\n counterBadgeRecipe,\n dialogRecipe,\n dividerRecipe,\n emptyStateRecipe,\n fieldRecipe,\n formatCounterBadgeCount,\n iconButtonRecipe,\n iconRecipe,\n linkRecipe,\n listRecipe,\n listRowRecipe,\n loadMoreRecipe,\n menuRecipe,\n noticeRecipe,\n progressRecipe,\n searchFieldRecipe,\n selectRecipe,\n selectionGroupRecipe,\n sectionRecipe,\n segmentedControlRecipe,\n selectionControlRecipe,\n sheetRecipe,\n skeletonRecipe,\n spinnerRecipe,\n surfaceDefaults,\n surfaceGeometry,\n stackRecipe,\n statisticRecipe,\n surfaceRecipe,\n switchRecipe,\n tabsRecipe,\n textRecipe,\n toastRecipe,\n tooltipRecipe,\n topBarRecipe,\n type AccordionDensity,\n type AlertDialogTone,\n type AvatarShape,\n type AvatarSize,\n type BadgeSize,\n type BadgeTone,\n type BadgeVariant,\n type BottomNavigationDensity,\n type BottomNavigationDistribution,\n type BottomNavigationPresentation,\n type ButtonSize,\n type ButtonTone,\n type CardHeadingLevel,\n type ChipSize,\n type SelectDensity,\n type SelectSize,\n type CounterBadgeSize,\n type CounterBadgeTone,\n type CounterBadgeVariant,\n type DialogSize,\n type FieldShape,\n type FieldVariant,\n type IconButtonShape,\n type IconButtonSize,\n type IconTone,\n type IconWeight,\n type LinkTone,\n type LinkVariant,\n type LoadMoreDensity,\n type ListRowDensity,\n type MenuDensity,\n type MenuItemTone,\n type NoticeTone,\n type ProgressSize,\n type ProgressTone,\n type SearchFieldSize,\n type SegmentedControlSize,\n type SelectionControlKind,\n type SelectionControlPresentation,\n type SelectionControlSize,\n type SelectionGroupOrientation,\n type SelectionGroupPresentation,\n type SpinnerSize,\n type SpinnerTone,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StatisticDensity,\n type StatisticPresentation,\n type SurfaceTone,\n type SurfacePadding,\n type SurfaceRadius,\n type SwitchSize,\n type TabSize,\n type TabsLayout,\n type TabsOverflow,\n type TextEmphasis,\n type TextTone,\n type ToastPlacement,\n type ToastTone,\n type ToastToneMark,\n} from \"./recipes.js\";\n\nexport {\n accentColor,\n resolveColorReference,\n solidAccentColor,\n themeColor,\n type AccentColorReference,\n type AccentFillReference,\n type ColorReference,\n type ColorReferencePalette,\n type ThemeColorReference,\n} from \"./color-references.js\";\n\nexport {\n componentCatalog,\n getComponentSurfaceStatus,\n recipeRegistry,\n summarizeComponentRoadmap,\n type ComponentCatalogEntry,\n type ComponentCategory,\n type ComponentName,\n type ComponentPlatform,\n type ComponentRoadmap,\n type ComponentRoadmapState,\n type ComponentSurface,\n type ComponentSurfaceMaturity,\n type ComponentSurfaceStatus,\n type ComponentStatus,\n type RecipeName,\n} from \"./catalog.js\";\n\nexport { designSystemVersion } from \"./version.js\";\n\nexport {\n antDesignReferenceComponents,\n antDesignReferenceSystem,\n getAntDesignReferencesFor,\n summarizeAntDesignCoverage,\n type AntDesignCategory,\n type AntDesignComponentName,\n type AntDesignReferenceComponent,\n type ReferenceCoverageSummary,\n type ReferenceRelationship,\n} from \"./component-references.js\";\n\nexport {\n componentDefinitions,\n componentIds,\n getComponentDefinition,\n type ComponentDefinition,\n type ComponentId,\n type ComponentKind,\n} from \"./component-definitions.js\";\n\nexport { semanticColors } from \"./semantic-colors.js\";\n\nexport {\n behaviorRegistry,\n checkboxBehaviorDefaults,\n comboboxBehaviorDefaults,\n getCheckboxNextState,\n getRadioNavigationTarget,\n getSelectionNavigationIntent,\n getTabNavigationIntent,\n getTabNavigationTarget,\n reconcileCheckboxSelection,\n reconcileRadioSelection,\n radioGroupBehaviorDefaults,\n resolveInitialRadioValue,\n resolveControlAccessibleName,\n resolveRadioTabStop,\n resolveInitialTabValue,\n selectionGroupBehaviorDefaults,\n selectBehaviorDefaults,\n tabsBehaviorDefaults,\n toggleCheckboxSelection,\n validateCheckboxSelection,\n validateRadioSelection,\n validateSelectionItems,\n type AsyncCollectionState,\n type AvailabilityState,\n type BehaviorContract,\n type BehaviorName,\n type BehaviorStateAxis,\n type CollectionItemDescriptor,\n type CollectionItemTone,\n type CollectionKey,\n type CollectionSectionDescriptor,\n type MenuItemDescriptor,\n type MenuSectionDescriptor,\n type CollectionSelectionModel,\n type ComboboxCommitReason,\n type ComboboxFiltering,\n type ComboboxInput,\n type ControlledComboboxInput,\n type ControlledSelectSelection,\n type ControlledCheckboxGroupSelection,\n type ControlledCheckboxState,\n type ControlledRadioGroupSelection,\n type ContentState,\n type ControlledTabsSelection,\n type InteractionState,\n type MixedCheckboxActivation,\n type MultipleSelectionModel,\n type NativeAccessibilityState,\n type NoSelectionModel,\n type SingleSelectionModel,\n type SelectItemDescriptor,\n type SelectSelection,\n type CheckboxGroupSelection,\n type CheckboxSelection,\n type CheckboxState,\n type RadioGroupSelection,\n type SelectionDirection,\n type SelectionGroupLabel,\n type SelectionItemDescriptor,\n type SelectionNavigationIntent,\n type SelectionOrientation,\n type TabDescriptor,\n type TabNavigationIntent,\n type TabsActivationMode,\n type TabsDirection,\n type TabsMountPolicy,\n type TabsOrientation,\n type TabsPanelMode,\n type TabsSelection,\n type UncontrolledTabsSelection,\n type UncontrolledComboboxInput,\n type UncontrolledSelectSelection,\n type UncontrolledCheckboxGroupSelection,\n type UncontrolledCheckboxState,\n type UncontrolledRadioGroupSelection,\n type ValidationState,\n type ValueState,\n type WebKeyboardKey,\n} from \"./behaviors.js\";\n\nexport {\n collectionItemContract,\n fieldFrameContract,\n floatingSurfaceContract,\n focusIndicatorContract,\n formSupportContract,\n} from \"./component-contracts.js\";\n\nexport {\n assertShowcaseCoverage,\n createShowcaseCoverage,\n createShowcaseManifest,\n getRequiredShowcaseScenarios,\n getRequiredShowcaseEvidence,\n getRequiredShowcaseSurfaces,\n getShowcaseEnvironmentInput,\n getShowcaseStoryId,\n showcaseEnvironmentMatrix,\n showcaseManifest,\n showcaseScenarios,\n summarizeShowcaseMaturity,\n type ShowcaseComponentEntry,\n type ShowcaseCoverageEntry,\n type ShowcaseDirection,\n type ShowcaseEnvironment,\n type ShowcaseEvidenceEntry,\n type ShowcaseEvidenceRequirement,\n type ShowcaseMotionPreference,\n type ShowcaseScenario,\n type ShowcaseScenarioId,\n type ShowcaseSurface,\n type ShowcaseTextScale,\n type ShowcaseTheme,\n} from \"./showcase.js\";\n\nexport {\n assertShowcaseStoryIds,\n compareShowcaseStoryIds,\n createDesignSystemEvidence,\n createDesignSystemEvidenceCoverage,\n defineDesignSystemEvidence,\n designSystemEvidenceSchemaVersion,\n getShowcaseStoryIdsForSurface,\n toShowcaseEvidenceEntries,\n type DesignSystemEvidenceItem,\n type DesignSystemEvidenceManifest,\n type DesignSystemEvidenceSource,\n type DesignSystemEvidenceSourceKind,\n type ShowcaseStoryIdComparison,\n} from \"./evidence.js\";\n\n/*\n Batch 2 — 계약과 recipe가 준비된 컴포넌트.\n\n catalog의 status는 여전히 `planned`다. 로드맵의 maturity gate가 `planned → beta` 승격에\n **실제 제품 vertical slice 한 번**을 요구하므로, 계약이 준비된 것과 검증된 것을 섞지\n 않는다. 여기 있는 심볼은 제품이 renderer를 붙일 수 있다는 뜻이고, 붙여서 검증되면\n 그때 리드가 catalog를 올린다.\n*/\nexport * from \"./breadcrumb.js\";\nexport * from \"./calendar.js\";\nexport * from \"./carousel.js\";\nexport * from \"./command-palette.js\";\nexport * from \"./design-system-provider.js\";\nexport * from \"./floating-action-button.js\";\nexport * from \"./content-state.js\";\nexport * from \"./data-table.js\";\nexport * from \"./mentions.js\";\nexport * from \"./transfer-list.js\";\nexport * from \"./tour.js\";\nexport * from \"./layout.js\";\nexport * from \"./otp-field.js\";\nexport * from \"./password-field.js\";\nexport * from \"./splitter.js\";\nexport * from \"./tree-select.js\";\nexport * from \"./date-picker.js\";\nexport * from \"./side-panel.js\";\nexport * from \"./file-picker.js\";\nexport * from \"./pagination.js\";\nexport * from \"./popover.js\";\nexport * from \"./upload-item.js\";\n// 2026-10-10 panel-toast trigger (composition activity-status); contract-only, no catalog row (frozen).\nexport * from \"./activity-chip.js\";\nexport * from \"./timeline.js\";\nexport * from \"./tree.js\";\nexport * from \"./steps.js\";\nexport * from \"./number-field.js\";\nexport * from \"./slider.js\";\nexport * from \"./form.js\";\nexport * from \"./tag.js\";\nexport * from \"./description-list.js\";\nexport * from \"./result.js\";\nexport * from \"./image.js\";\n\nexport * from \"./anchor.js\";\n\nexport * from \"./agreement.js\";\nexport * from \"./top.js\";\n\nexport * from \"./provider-button.js\";\nexport * from \"./auth-screen.js\";\n\nexport * from \"./heading.js\";\n\nexport * from \"./toggle-group.js\";\nexport * from \"./tags-input.js\";\n\nexport * from \"./skip-nav.js\";\nexport * from \"./bottom-info.js\";\nexport * from \"./sidebar.js\";\n\nexport * from \"./formatters.js\";\n\nexport * from \"./native-platform.js\";\n\nexport * from \"./date-range.js\";\n\nexport * from \"./text-formats.js\";\n\nexport * from \"./collapsible.js\";\nexport * from \"./asset.js\";\nexport * from \"./dataviz.js\";\nexport * from \"./menubar.js\";\nexport * from \"./context-menu.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,GAKzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,2BAA2B,GAK5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,GASvB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,GAQxB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,oCAAoC,EACpC,iCAAiC,EACjC,2BAA2B,EAC3B,qCAAqC,EACrC,kCAAkC,GAgBnC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GAUzB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,GAa3B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,qBAAqB,GAMtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EAIzB,qBAAqB,EACrB,uBAAuB,GAwBxB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,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c,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAE3B,cAAc,aAAa,CAAC;AAE5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AAEzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,cAAc,CAAC;AAE7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,cAAc,iBAAiB,CAAC;AAEhC,cAAc,sBAAsB,CAAC;AAErC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,mBAAmB,CAAC;AAElC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC","sourcesContent":["export {\n aspectRatioDefaults,\n aspectRatioRecipe,\n resolveAspectRatioDescriptor,\n validateAspectRatioValue,\n type AspectRatioDescriptor,\n type AspectRatioPreset,\n type AspectRatioValue,\n type ResolvedAspectRatioDescriptor,\n} from \"./aspect-ratio.js\";\n\nexport {\n containerDefaults,\n containerRecipe,\n resolveContainerDescriptor,\n validateContainerDescriptor,\n type ContainerDescriptor,\n type ContainerGutter,\n type ContainerSize,\n type ResolvedContainerDescriptor,\n} from \"./container.js\";\n\nexport {\n visuallyHiddenRecipe,\n type VisuallyHiddenContract,\n} from \"./visually-hidden.js\";\n\nexport {\n getIconDirectionality,\n getIconTransform,\n resolveIconDescriptor,\n semanticIconNames,\n validateIconDescriptor,\n type DecorativeIconDescriptor,\n type IconDescriptor,\n type IconDirection,\n type IconDirectionality,\n type IconTransform,\n type InformativeIconDescriptor,\n type ResolvedIconDescriptor,\n type SemanticIconName,\n} from \"./icon.js\";\n\nexport {\n resolveLinkDescriptor,\n validateLinkDescriptor,\n validateLinkDestination,\n type ExternalLinkDestination,\n type InternalLinkDestination,\n type LinkDescriptor,\n type LinkDestination,\n type LinkIconDescriptor,\n type ResolvedLinkDescriptor,\n type ResolvedLinkIconDescriptor,\n} from \"./link.js\";\n\nexport {\n bottomNavigationBehaviorDefaults,\n resolveBottomNavigationActivation,\n resolveBottomNavigationConfiguration,\n resolveBottomNavigationDescriptor,\n resolveBottomNavigationItem,\n validateBottomNavigationConfiguration,\n validateBottomNavigationDescriptor,\n type BottomNavigationActivation,\n type BottomNavigationConfiguration,\n type BottomNavigationCounterBadge,\n type BottomNavigationDescriptor,\n type BottomNavigationDirection,\n type BottomNavigationIconDescriptor,\n type BottomNavigationItemDescriptor,\n type BottomNavigationKeyboardBehavior,\n type BottomNavigationLabels,\n type BottomNavigationSurface,\n type ResolvedBottomNavigationCounterBadge,\n type ResolvedBottomNavigationConfiguration,\n type ResolvedBottomNavigationDescriptor,\n type ResolvedBottomNavigationIconDescriptor,\n type ResolvedBottomNavigationItemDescriptor,\n} from \"./bottom-navigation.js\";\n\nexport {\n resolveTooltipDescriptor,\n tooltipBehaviorDefaults,\n tooltipDescriptorDefaults,\n validateTooltipDescriptor,\n validateTooltipOpenState,\n type ControlledTooltipOpenState,\n type ResolvedTooltipDescriptor,\n type TooltipAlign,\n type TooltipDescriptor,\n type TooltipOpenChangeDetails,\n type TooltipOpenChangeReason,\n type TooltipOpenState,\n type TooltipPlacement,\n type UncontrolledTooltipOpenState,\n} from \"./tooltip.js\";\n\nexport {\n alertDialogBehaviorDefaults,\n canDismissAlertDialog,\n createAlertDialogSession,\n getAlertDialogInitialFocus,\n validateAlertDialogRequest,\n type AlertDialogAsyncState,\n type AlertDialogCancelReason,\n type AlertDialogConfirmAction,\n type AlertDialogDismissReason,\n type AlertDialogInitialFocus,\n type AlertDialogMode,\n type AlertDialogOpenChangeReason,\n type AlertDialogOpenState,\n type AlertDialogPhase,\n type AlertDialogRequest,\n type AlertDialogResult,\n type AlertDialogSession,\n} from \"./alert-dialog.js\";\n\nexport {\n canDismissSheet,\n createSheetLifecycle,\n sheetBehaviorDefaults,\n type SheetDismissPolicy,\n type SheetDismissReason,\n type SheetLifecycle,\n type SheetOpenChangeDetails,\n type SheetOpenState,\n} from \"./sheet.js\";\n\nexport {\n createToastSession,\n createToastStore,\n resolveToastAnnouncement,\n resolveToastDescriptor,\n resolveToastDuration,\n liquidToastRecipe,\n resolveLiquidToastLayout,\n buildLiquidToastGeometry,\n validateLiquidToastAnchor,\n type LiquidToastAnchor,\n type LiquidToastLayout,\n type ToastPresentation,\n toastBehaviorDefaults,\n validateToastDescriptor,\n type ResolvedToastActionDescriptor,\n type ResolvedToastDescriptor,\n type ToastActionDescriptor,\n type ToastAnnouncement,\n type ToastAnnouncementPriority,\n type ToastDescriptor,\n type ToastDismissReason,\n type ToastDuplicatePolicy,\n type ToastId,\n type ToastOverflowPolicy,\n type ToastPauseReason,\n type ToastPhase,\n type ToastProgressDescriptor,\n type ToastPublishOptions,\n type ToastPublishResult,\n type ToastSession,\n type ToastSessionSnapshot,\n type ToastStore,\n type ToastStoreOptions,\n type ToastStoreSnapshot,\n type ToastTimerSnapshot,\n type ToastTimerStatus,\n type ToastTimerUpdatePolicy,\n} from \"./toast.js\";\n\nexport {\n resolveStatisticDescriptor,\n statisticDefaults,\n statisticTrendMarks,\n validateStatisticDescriptor,\n validateStatisticGroup,\n type ResolvedStatisticDescriptor,\n type ResolvedStatisticTrendDescriptor,\n type StatisticDescriptor,\n type StatisticGroupDescriptor,\n type StatisticTrendDescriptor,\n type StatisticTrendDirection,\n type StatisticTrendTone,\n} from \"./statistic.js\";\n\nexport {\n canRequestLoadMore,\n createLoadMoreController,\n loadMoreBehaviorDefaults,\n validateLoadMoreDescriptor,\n validateLoadMoreLabels,\n validateLoadMoreState,\n type LoadMoreCompleteState,\n type LoadMoreController,\n type LoadMoreControllerOptions,\n type LoadMoreControllerSnapshot,\n type LoadMoreDescriptor,\n type LoadMoreErrorState,\n type LoadMoreLabels,\n type LoadMoreLoadingState,\n type LoadMoreMode,\n type LoadMoreReadyState,\n type LoadMoreRequest,\n type LoadMoreRequestHandler,\n type LoadMoreRequestOutcome,\n type LoadMoreRequestReason,\n type LoadMoreState,\n} from \"./load-more.js\";\n\nexport {\n collectionValidationDefaults,\n flattenCollectionItems,\n getCollectionNavigationIntent,\n getCollectionNavigationTarget,\n getCollectionTypeaheadMatch,\n isComboboxResultCurrent,\n reconcileSelectSelection,\n resolveComboboxSelectedItem,\n resolveCollectionItem,\n resolveSelectSelectedItem,\n validateCollection,\n type CollectionNavigationIntent,\n type CollectionSource,\n type SelectCollectionSectionDescriptor,\n type SelectCollectionSource,\n type CollectionTypeaheadOptions,\n type CollectionValidationOptions,\n type ComboboxCollectionState,\n type ComboboxState,\n type ReconcileSelectOptions,\n type SelectCollectionState,\n type SelectConfiguration,\n type SelectLabel,\n type SelectOpenChangeReason,\n type SelectOpenState,\n type SelectState,\n} from \"./collection.js\";\n\nexport {\n ACCENTS,\n THEMES,\n accentFill,\n accentTint,\n brandGradient,\n isThemePreference,\n onAccentFill,\n onBrandGradient,\n withAlpha,\n type AccentTone,\n type ResolvedTheme,\n type ThemeColors,\n type ThemePreference,\n} from \"./colors.js\";\n\nexport {\n backdrop,\n breakpoint,\n control,\n easing,\n fontFamily,\n fontWeight,\n glyph,\n heading,\n layer,\n layout,\n letterSpacing,\n motion,\n motionPreset,\n numeric,\n opacity,\n overlay,\n radius,\n scrim,\n shadow,\n spacing,\n spring,\n stateLayer,\n stroke,\n typography,\n type BackdropReference,\n type FontFamily,\n type FontWeight,\n type FontWeightValue,\n type GlyphSize,\n type HeadingLevel,\n type LetterSpacing,\n type NumericVariant,\n type ReducedMotionBehavior,\n type TextVariant,\n} from \"./foundations.js\";\n\nexport {\n resolveResponsiveValue,\n resolveWindowClass,\n validateResponsiveValue,\n windowClassOrder,\n type ResponsiveValue,\n type WindowClass,\n} from \"./responsive.js\";\n\nexport {\n gridDefaults,\n gridGaps,\n gridRecipe,\n resolveGridLayout,\n validateGridDescriptor,\n type GridDescriptor,\n type GridGap,\n type GridGapToken,\n type ResolveGridLayoutOptions,\n type ResolvedGridLayout,\n} from \"./grid.js\";\n\nexport {\n accordionRecipe,\n alertDialogRecipe,\n avatarRecipe,\n badgeRecipe,\n bottomNavigationRecipe,\n bottomCtaRecipe,\n buttonRecipe,\n cardRecipe,\n chipRecipe,\n comboboxRecipe,\n counterBadgeRecipe,\n dialogRecipe,\n dividerRecipe,\n emptyStateRecipe,\n fieldRecipe,\n formatCounterBadgeCount,\n iconButtonRecipe,\n iconRecipe,\n linkRecipe,\n listRecipe,\n listRowRecipe,\n loadMoreRecipe,\n menuRecipe,\n noticeRecipe,\n progressRecipe,\n searchFieldRecipe,\n selectRecipe,\n selectionGroupRecipe,\n sectionRecipe,\n segmentedControlRecipe,\n selectionControlRecipe,\n sheetRecipe,\n skeletonRecipe,\n spinnerRecipe,\n surfaceDefaults,\n surfaceGeometry,\n stackRecipe,\n statisticRecipe,\n surfaceRecipe,\n switchRecipe,\n tabsRecipe,\n textRecipe,\n toastRecipe,\n tooltipRecipe,\n topBarRecipe,\n type AccordionDensity,\n type AlertDialogTone,\n type AvatarShape,\n type AvatarSize,\n type BadgeSize,\n type BadgeTone,\n type BadgeVariant,\n type BottomNavigationDensity,\n type BottomNavigationDistribution,\n type BottomNavigationPresentation,\n type ButtonSize,\n type ButtonTone,\n type CardHeadingLevel,\n type ChipSize,\n type SelectDensity,\n type SelectSize,\n type CounterBadgeSize,\n type CounterBadgeTone,\n type CounterBadgeVariant,\n type DialogSize,\n type FieldShape,\n type FieldVariant,\n type IconButtonShape,\n type IconButtonSize,\n type IconTone,\n type IconWeight,\n type LinkTone,\n type LinkVariant,\n type LoadMoreDensity,\n type ListRowDensity,\n type MenuDensity,\n type MenuItemTone,\n type NoticeTone,\n type ProgressSize,\n type ProgressTone,\n type SearchFieldSize,\n type SegmentedControlSize,\n type SelectionControlKind,\n type SelectionControlPresentation,\n type SelectionControlSize,\n type SelectionGroupOrientation,\n type SelectionGroupPresentation,\n type SpinnerSize,\n type SpinnerTone,\n type StackAlign,\n type StackAxis,\n type StackGap,\n type StackJustify,\n type StatisticDensity,\n type StatisticPresentation,\n type SurfaceTone,\n type SurfacePadding,\n type SurfaceRadius,\n type SwitchSize,\n type TabSize,\n type TabsLayout,\n type TabsOverflow,\n type TextEmphasis,\n type TextTone,\n type ToastPlacement,\n type ToastTone,\n type ToastToneMark,\n} from \"./recipes.js\";\n\nexport {\n accentColor,\n resolveColorReference,\n solidAccentColor,\n themeColor,\n type AccentColorReference,\n type AccentFillReference,\n type ColorReference,\n type ColorReferencePalette,\n type ThemeColorReference,\n} from \"./color-references.js\";\n\nexport {\n componentCatalog,\n getComponentSurfaceStatus,\n recipeRegistry,\n summarizeComponentRoadmap,\n type ComponentCatalogEntry,\n type ComponentCategory,\n type ComponentName,\n type ComponentPlatform,\n type ComponentRoadmap,\n type ComponentRoadmapState,\n type ComponentSurface,\n type ComponentSurfaceMaturity,\n type ComponentSurfaceStatus,\n type ComponentStatus,\n type RecipeName,\n} from \"./catalog.js\";\n\nexport { designSystemVersion } from \"./version.js\";\n\nexport {\n antDesignReferenceComponents,\n antDesignReferenceSystem,\n getAntDesignReferencesFor,\n summarizeAntDesignCoverage,\n type AntDesignCategory,\n type AntDesignComponentName,\n type AntDesignReferenceComponent,\n type ReferenceCoverageSummary,\n type ReferenceRelationship,\n} from \"./component-references.js\";\n\nexport {\n componentDefinitions,\n componentIds,\n getComponentDefinition,\n type ComponentDefinition,\n type ComponentId,\n type ComponentKind,\n} from \"./component-definitions.js\";\n\nexport { semanticColors } from \"./semantic-colors.js\";\n\nexport {\n behaviorRegistry,\n checkboxBehaviorDefaults,\n comboboxBehaviorDefaults,\n getCheckboxNextState,\n getRadioNavigationTarget,\n getSelectionNavigationIntent,\n getTabNavigationIntent,\n getTabNavigationTarget,\n reconcileCheckboxSelection,\n reconcileRadioSelection,\n radioGroupBehaviorDefaults,\n resolveInitialRadioValue,\n resolveControlAccessibleName,\n resolveRadioTabStop,\n resolveInitialTabValue,\n selectionGroupBehaviorDefaults,\n selectBehaviorDefaults,\n tabsBehaviorDefaults,\n toggleCheckboxSelection,\n validateCheckboxSelection,\n validateRadioSelection,\n validateSelectionItems,\n type AsyncCollectionState,\n type AvailabilityState,\n type BehaviorContract,\n type BehaviorName,\n type BehaviorStateAxis,\n type CollectionItemDescriptor,\n type CollectionItemTone,\n type CollectionKey,\n type CollectionSectionDescriptor,\n type MenuItemDescriptor,\n type MenuSectionDescriptor,\n type CollectionSelectionModel,\n type ComboboxCommitReason,\n type ComboboxFiltering,\n type ComboboxInput,\n type ControlledComboboxInput,\n type ControlledSelectSelection,\n type ControlledCheckboxGroupSelection,\n type ControlledCheckboxState,\n type ControlledRadioGroupSelection,\n type ContentState,\n type ControlledTabsSelection,\n type InteractionState,\n type MixedCheckboxActivation,\n type MultipleSelectionModel,\n type NativeAccessibilityState,\n type NoSelectionModel,\n type SingleSelectionModel,\n type SelectItemDescriptor,\n type SelectSelection,\n type CheckboxGroupSelection,\n type CheckboxSelection,\n type CheckboxState,\n type RadioGroupSelection,\n type SelectionDirection,\n type SelectionGroupLabel,\n type SelectionItemDescriptor,\n type SelectionNavigationIntent,\n type SelectionOrientation,\n type TabDescriptor,\n type TabNavigationIntent,\n type TabsActivationMode,\n type TabsDirection,\n type TabsMountPolicy,\n type TabsOrientation,\n type TabsPanelMode,\n type TabsSelection,\n type UncontrolledTabsSelection,\n type UncontrolledComboboxInput,\n type UncontrolledSelectSelection,\n type UncontrolledCheckboxGroupSelection,\n type UncontrolledCheckboxState,\n type UncontrolledRadioGroupSelection,\n type ValidationState,\n type ValueState,\n type WebKeyboardKey,\n} from \"./behaviors.js\";\n\nexport {\n collectionItemContract,\n fieldFrameContract,\n floatingSurfaceContract,\n focusIndicatorContract,\n formSupportContract,\n} from \"./component-contracts.js\";\n\nexport {\n assertShowcaseCoverage,\n createShowcaseCoverage,\n createShowcaseManifest,\n getRequiredShowcaseScenarios,\n getRequiredShowcaseEvidence,\n getRequiredShowcaseSurfaces,\n getShowcaseEnvironmentInput,\n getShowcaseStoryId,\n showcaseEnvironmentMatrix,\n showcaseManifest,\n showcaseScenarios,\n summarizeShowcaseMaturity,\n type ShowcaseComponentEntry,\n type ShowcaseCoverageEntry,\n type ShowcaseDirection,\n type ShowcaseEnvironment,\n type ShowcaseEvidenceEntry,\n type ShowcaseEvidenceRequirement,\n type ShowcaseMotionPreference,\n type ShowcaseScenario,\n type ShowcaseScenarioId,\n type ShowcaseSurface,\n type ShowcaseTextScale,\n type ShowcaseTheme,\n} from \"./showcase.js\";\n\nexport {\n assertShowcaseStoryIds,\n compareShowcaseStoryIds,\n createDesignSystemEvidence,\n createDesignSystemEvidenceCoverage,\n defineDesignSystemEvidence,\n designSystemEvidenceSchemaVersion,\n getShowcaseStoryIdsForSurface,\n toShowcaseEvidenceEntries,\n type DesignSystemEvidenceItem,\n type DesignSystemEvidenceManifest,\n type DesignSystemEvidenceSource,\n type DesignSystemEvidenceSourceKind,\n type ShowcaseStoryIdComparison,\n} from \"./evidence.js\";\n\n/*\n Batch 2 — 계약과 recipe가 준비된 컴포넌트.\n\n catalog의 status는 여전히 `planned`다. 로드맵의 maturity gate가 `planned → beta` 승격에\n **실제 제품 vertical slice 한 번**을 요구하므로, 계약이 준비된 것과 검증된 것을 섞지\n 않는다. 여기 있는 심볼은 제품이 renderer를 붙일 수 있다는 뜻이고, 붙여서 검증되면\n 그때 리드가 catalog를 올린다.\n*/\nexport * from \"./breadcrumb.js\";\nexport * from \"./calendar.js\";\nexport * from \"./carousel.js\";\nexport * from \"./command-palette.js\";\nexport * from \"./design-system-provider.js\";\nexport * from \"./floating-action-button.js\";\nexport * from \"./content-state.js\";\nexport * from \"./data-table.js\";\nexport * from \"./mentions.js\";\nexport * from \"./transfer-list.js\";\nexport * from \"./tour.js\";\nexport * from \"./layout.js\";\nexport * from \"./otp-field.js\";\nexport * from \"./password-field.js\";\nexport * from \"./splitter.js\";\nexport * from \"./tree-select.js\";\nexport * from \"./date-picker.js\";\nexport * from \"./side-panel.js\";\nexport * from \"./file-picker.js\";\nexport * from \"./pagination.js\";\nexport * from \"./popover.js\";\nexport * from \"./upload-item.js\";\n// 2026-10-10 panel-toast trigger (composition activity-status); contract-only, no catalog row (frozen).\nexport * from \"./activity-chip.js\";\nexport * from \"./timeline.js\";\nexport * from \"./tree.js\";\nexport * from \"./steps.js\";\nexport * from \"./number-field.js\";\nexport * from \"./slider.js\";\nexport * from \"./form.js\";\nexport * from \"./tag.js\";\nexport * from \"./description-list.js\";\nexport * from \"./result.js\";\nexport * from \"./image.js\";\n\nexport * from \"./anchor.js\";\n\nexport * from \"./agreement.js\";\nexport * from \"./top.js\";\n\nexport * from \"./provider-button.js\";\nexport * from \"./auth-screen.js\";\n\nexport * from \"./heading.js\";\n\nexport * from \"./toggle-group.js\";\nexport * from \"./tags-input.js\";\n\nexport * from \"./skip-nav.js\";\nexport * from \"./bottom-info.js\";\nexport * from \"./sidebar.js\";\n\nexport * from \"./formatters.js\";\n\nexport * from \"./native-platform.js\";\n\nexport * from \"./date-range.js\";\n\nexport * from \"./text-formats.js\";\n\nexport * from \"./collapsible.js\";\nexport * from \"./asset.js\";\nexport * from \"./dataviz.js\";\nexport * from \"./menubar.js\";\nexport * from \"./context-menu.js\";\n"]}
@@ -150,6 +150,8 @@ export declare function resolveSearchEmptyCause(count: number | null, appliedFil
150
150
  export declare function resolveFocusAfterRemoval(removedIndex: number, remaining: number): number;
151
151
  /** Recipe for the SearchScreen phase sections; geometry stays on shared spacing tokens. */
152
152
  export declare const searchScreenRecipe: {
153
+ /** Debounced typing delay; explicit submit remains a separate host action. */
154
+ readonly debounceMs: 300;
153
155
  /** Recent searches shown before the user types; reference services show 5–10 and let the rest scroll away. */
154
156
  readonly recentVisible: 5;
155
157
  /** Suggestions under the "search for ‘q’" row. */
@@ -163,6 +165,8 @@ export declare const searchScreenRecipe: {
163
165
  /** Between chips in applied filters and suggested queries. */
164
166
  readonly chipGap: 8;
165
167
  };
168
+ /** Keep finite negative delays at zero; reject values whose timer behavior varies by host. */
169
+ export declare function resolveSearchDebounceMs(value?: number): number;
166
170
  /** Horizontal intent preserves vertical scrolling and uses one reveal distance across renderers. */
167
171
  export declare function timestampRevealOffset(dx: number, dy: number): number;
168
172
  //# sourceMappingURL=screen-patterns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screen-patterns.d.ts","sourceRoot":"","sources":["../src/screen-patterns.ts"],"names":[],"mappings":"AAEA,0FAA0F;AAC1F,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,CAAC;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,GAC3B,QAAQ,CAAC;IAAE,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE1G,wBAAgB,yBAAyB,CAAC,KAAK,GAAE,kBAAsC;;;;;EAatF;AAGD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAmBtB,CAAC;AAEX,0GAA0G;AAC1G,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yFAAyF;IACzF,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,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AgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKxF;AAED,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB;IAC7B,8EAA8E;;IAE9E,8GAA8G;;IAE9G,kDAAkD;;IAElD,2DAA2D;;IAE3D,iDAAiD;;IAEjD,wEAAwE;;IAExE,8DAA8D;;CAEtD,CAAC;AAEX,8FAA8F;AAC9F,wBAAgB,uBAAuB,CAAC,KAAK,GAAE,MAAsC,GAAG,MAAM,CAG7F;AAED,oGAAoG;AACpG,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAGpE"}
@@ -117,11 +117,12 @@ export function resolveSearchCommit(value) {
117
117
  return next ? next : null;
118
118
  }
119
119
  export function resolveSearchEmptyCause(count, appliedFilterCount) {
120
- if (count === null || count > 0)
121
- return "none";
122
- if (count < 0 || !Number.isSafeInteger(count) || !Number.isSafeInteger(appliedFilterCount) || appliedFilterCount < 0) {
120
+ // Loading/nonempty results must not bypass the same count contract used by empty results.
121
+ if ((count !== null && (count < 0 || !Number.isSafeInteger(count))) || !Number.isSafeInteger(appliedFilterCount) || appliedFilterCount < 0) {
123
122
  throw new RangeError("Search counts must be nonnegative integers");
124
123
  }
124
+ if (count === null || count > 0)
125
+ return "none";
125
126
  return appliedFilterCount > 0 ? "filters" : "query";
126
127
  }
127
128
  /**
@@ -137,6 +138,8 @@ export function resolveFocusAfterRemoval(removedIndex, remaining) {
137
138
  }
138
139
  /** Recipe for the SearchScreen phase sections; geometry stays on shared spacing tokens. */
139
140
  export const searchScreenRecipe = {
141
+ /** Debounced typing delay; explicit submit remains a separate host action. */
142
+ debounceMs: 300,
140
143
  /** Recent searches shown before the user types; reference services show 5–10 and let the rest scroll away. */
141
144
  recentVisible: 5,
142
145
  /** Suggestions under the "search for ‘q’" row. */
@@ -150,6 +153,12 @@ export const searchScreenRecipe = {
150
153
  /** Between chips in applied filters and suggested queries. */
151
154
  chipGap: spacing.xs,
152
155
  };
156
+ /** Keep finite negative delays at zero; reject values whose timer behavior varies by host. */
157
+ export function resolveSearchDebounceMs(value = searchScreenRecipe.debounceMs) {
158
+ if (!Number.isFinite(value))
159
+ throw new RangeError("Search debounceMs must be finite");
160
+ return Math.max(0, value);
161
+ }
153
162
  /** Horizontal intent preserves vertical scrolling and uses one reveal distance across renderers. */
154
163
  export function timestampRevealOffset(dx, dy) {
155
164
  // A 12px dead zone and 2:1 direction bias avoid turning taps/list scrolling into a time gesture.
@@ -1 +1 @@
1
- {"version":3,"file":"screen-patterns.js","sourceRoot":"","sources":["../src/screen-patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAOnD,MAAM,UAAU,yBAAyB,CAAC,QAA4B,EAAE,IAAI,EAAE,OAAO,EAAE;IACrF,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/E,MAAM,IAAI,SAAS,CAAC,8BAA8B,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAClD,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,eAAe,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;QACvC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,SAAS;QAC9B,YAAY,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;KACrD,CAAC;AACb,CAAC;AAED,qGAAqG;AACrG,MAAM,CAAC,MAAM,mB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E,CAAC;QACzG,MAAM,IAAI,UAAU,CAAC,8CAA8C,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,2FAA2F;AAC3F,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,8GAA8G;IAC9G,aAAa,EAAE,CAAC;IAChB,kDAAkD;IAClD,iBAAiB,EAAE,CAAC;IACpB,2DAA2D;IAC3D,WAAW,EAAE,CAAC;IACd,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAC,EAAE;IACtB,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC,EAAE;IACrB,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC,EAAE;CACX,CAAC;AAEX,oGAAoG;AACpG,MAAM,UAAU,qBAAqB,CAAC,EAAU,EAAE,EAAU;IAC1D,iGAAiG;IACjG,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC","sourcesContent":["import { layout, spacing } from \"./foundations.js\";\n\n/** Initial load replaces the body; refresh/save errors belong beside retained content. */\nexport type ScreenContentState =\n | Readonly<{ kind: \"ready\" }>\n | Readonly<{ kind: \"loading\" | \"empty\" | \"error\" | \"restricted\"; title: string; description?: string }>;\n\nexport function resolveScreenContentState(state: ScreenContentState = { kind: \"ready\" }) {\n if (![\"ready\", \"loading\", \"empty\", \"error\", \"restricted\"].includes(state.kind)) {\n throw new TypeError(\"Unknown screen content state\");\n }\n if (state.kind !== \"ready\" && !state.title.trim()) {\n throw new TypeError(\"Screen state requires a localized title\");\n }\n return {\n kind: state.kind,\n replacesContent: state.kind !== \"ready\",\n busy: state.kind === \"loading\",\n announcement: state.kind === \"error\" ? \"assertive\" : \"polite\",\n } as const;\n}\n\n// Reuse reading-width and spacing tokens; do not derive geometry from a product's device or artwork.\nexport const screenPatternRecipe = {\n maxWidth: layout.readingMaxWidth,\n padding: spacing.md,\n sectionGap: spacing.xl,\n itemGap: spacing.sm,\n stateGap: spacing.md,\n // Compact screens must keep back/title/save on one row; scale this floor for large text instead of reserving a desktop-width title.\n headerMinWidth: layout.readingMaxWidth / 6,\n // Reserve the opposite edge for authorship and cap the composer so history remains visible.\n messageMaxWidth: \"84%\",\n // Social thumbnails stay compact; selection order and removal replace a second toolbar.\n attachmentSize: 80,\n attachmentRemoveSize: 24,\n reactionHoldMs: 450,\n reactionMoveTolerance: 10,\n reactionMenuWidth: 320,\n replySwipeDistance: 60,\n composerMinLines: 1,\n composerMaxLines: 5,\n} as const;\n\n/** Controlled composer: HJM never clears drafts or interprets a fulfilled callback as server delivery. */\nexport type MessageComposerDescriptor = Readonly<{\n value: string;\n label: string;\n sendLabel: string;\n /** Short visual copy may differ from the complete accessible input name. */\n placeholder?: string;\n description?: string;\n error?: string;\n invalid?: boolean;\n /** Newline remains the compatible default; desktop chat may explicitly opt into send. */\n submitMode?: \"newline\" | \"send\";\n disabled?: boolean;\n pending?: boolean;\n attachmentCount?: number;\n}>;\n/** Safari may report the final IME Enter as keyCode 229 after isComposing becomes false. */\nexport function shouldSubmitMessageKey(event: Readonly<{ key: string; shiftKey?: boolean; isComposing?: boolean; keyCode?: number }>, mode: \"newline\" | \"send\" = \"newline\"): boolean {\n return mode === \"send\" && event.key === \"Enter\" && !event.shiftKey && !event.isComposing && event.keyCode !== 229;\n}\nexport function canSubmitMessage({ value, disabled = false, pending = false, attachmentCount = 0 }: MessageComposerDescriptor): boolean {\n if (!Number.isSafeInteger(attachmentCount) || attachmentCount < 0) throw new RangeError(\"Attachment count must be a nonnegative integer\");\n return !disabled && !pending && (value.trim().length > 0 || attachmentCount > 0);\n}\n\n/** Bubble alignment expresses authorship, not delivery; delivery text always comes from the product receipt. */\nexport type ChatMessageDescriptor = Readonly<{\n direction: \"incoming\" | \"outgoing\";\n author: string;\n timestamp: string;\n deliveryLabel?: string;\n /** Inward drag reveals time (incoming right, outgoing left) while delivery state remains visible; default preserves existing captions. */\n timestampPresentation?: \"always\" | \"swipe\";\n /** Connected authorship tip; opt-in keeps existing card-like conversations unchanged. */\n bubbleTail?: boolean;\n}>;\n\n/** A denied permission goes to settings; rendering never requests OS access automatically. */\nexport type PermissionScreenStatus = \"prompt\" | \"denied\" | \"granted\" | \"unavailable\";\nexport function resolvePermissionAction(status:PermissionScreenStatus) {\n switch(status){case \"prompt\":return \"request\";case \"denied\":return \"settings\";case \"granted\":return \"continue\";case \"unavailable\":return null;default:throw new TypeError(\"Unknown permission state\");}\n}\nexport function resolveOnboardingStep(total:number,index:number){\n if(!Number.isInteger(total)||total<1||!Number.isInteger(index)||index<0||index>=total)throw new RangeError(\"Onboarding requires a valid step index\");\n return {first:index===0,last:index===total-1};\n}\n\n/** Replies are one level deep; reject orphaned/duplicate records instead of silently losing them. */\nexport function validateCommentThread(items:readonly {id:string;parentId:string|null}[]){\n const roots=new Set(items.filter(item=>item.parentId===null).map(item=>item.id));const ids=new Set<string>();\n for(const item of items){if(!item.id.trim()||ids.has(item.id))throw new TypeError(\"Comment ids must be unique and nonempty\");ids.add(item.id);if(item.parentId!==null&&(!roots.has(item.parentId)||item.parentId===item.id))throw new TypeError(\"Replies require an existing root comment\");}\n}\n\n/** Source bytes, permission requests, ordering and upload limits remain product-owned. */\nexport type MessageAttachmentDescriptor = Readonly<{ id: string; removeLabel: string; /** Local preparation can lock removal without locking text entry. */ disabled?: boolean }>;\nexport function validateMessageAttachments(attachments: readonly MessageAttachmentDescriptor[]): void {\n const ids = new Set<string>();\n for (const item of attachments) {\n if (!item.id.trim() || ids.has(item.id) || !item.removeLabel.trim()) throw new TypeError(\"Attachments require unique ids and localized removal labels\");\n ids.add(item.id);\n }\n}\n\n/** Require horizontal intent so a timeline scroll cannot accidentally start a reply. */\nexport function isReplySwipe(dx: number, dy: number): boolean {\n return Math.abs(dx) >= screenPatternRecipe.replySwipeDistance && Math.abs(dx) > Math.abs(dy) * 2;\n}\n\n/** The UI never infers permission or camera availability; product adapters own both. */\nexport type PhotoSource = \"library\" | \"camera\";\nexport type PhotoSourceLabels = Readonly<{ title:string; library:string; camera:string; cancel:string }>;\n\nexport type SavedItem = Readonly<{ id: string; title: string }>;\nexport type SavedCollection = Readonly<{ id: string; title: string; itemIds: readonly string[] }>;\nexport type SavedItemsLabels = Readonly<{ allItems: string; privateNotice: string; back: string; empty: string; createCollection: string }>;\n\n/** Unsave removes an item from every collection view without rewriting product-owned membership. */\nexport function resolveSavedItems<T extends SavedItem>(items:readonly T[],collections:readonly SavedCollection[],collectionId:string|null|undefined,selectedItemId:string|null|undefined){\n const ids=new Set<string>(),groups=new Set<string>();\n for(const item of items){if(!item.id.trim()||ids.has(item.id)||!item.title.trim())throw new TypeError(\"Saved items require unique ids and nonempty titles\");ids.add(item.id);}\n for(const group of collections){if(!group.id.trim()||groups.has(group.id)||!group.title.trim())throw new TypeError(\"Saved collections require unique ids and nonempty titles\");groups.add(group.id);}\n const collection=collections.find(item=>item.id===collectionId);\n // A deleted collection returns to the overview instead of showing a mislabeled all-posts view.\n const home=collectionId===undefined||(collectionId!==null&&!collection);\n const visible=home||collectionId===null?items:items.filter(item=>collection?.itemIds.includes(item.id));\n return {home,collection,visible,selected:home?undefined:visible.find(item=>item.id===selectedItemId)};\n}\n\n/**\n * SearchScreen phases (2026-10-06 search redesign, docs/screen-patterns.md#searchscreen-두-단계-검색).\n * Without a committed query (one-step search, the pre-1.13 behavior) any nonblank query is already\n * `results`. With one, typing a different query is `typing`: suggestions replace the results until the\n * user commits (Enter, a suggestion, a recent or suggested query). Comparing trimmed values keeps a\n * trailing space from flipping committed results back into suggestions.\n */\nexport type SearchScreenPhase = \"idle\" | \"typing\" | \"results\";\nexport function resolveSearchScreenPhase(query: string, committedQuery?: string): SearchScreenPhase {\n const typed = query.trim();\n if (!typed) return \"idle\";\n if (committedQuery === undefined) return \"results\";\n return typed === committedQuery.trim() ? \"results\" : \"typing\";\n}\n\n/**\n * The value a commit records, or `null` when there is nothing to commit. Blank commits are dropped\n * so a stray Enter never writes an empty recent search or fetches \"everything\".\n */\nexport function resolveSearchCommit(value: string): string | null {\n const next = value.trim();\n return next ? next : null;\n}\n\n/**\n * Why a committed search shows nothing. `filters` keeps the filter rail and offers \"clear all\";\n * `query` hides the rail (no filter can fix it) and offers suggested queries instead. Reference\n * services hide the rail on every zero result, which removes the only way to undo a filter.\n * `null` count means the result is still loading, so no cause is reported yet.\n */\nexport type SearchEmptyCause = \"none\" | \"filters\" | \"query\";\nexport function resolveSearchEmptyCause(count: number | null, appliedFilterCount: number): SearchEmptyCause {\n if (count === null || count > 0) return \"none\";\n if (count < 0 || !Number.isSafeInteger(count) || !Number.isSafeInteger(appliedFilterCount) || appliedFilterCount < 0) {\n throw new RangeError(\"Search counts must be nonnegative integers\");\n }\n return appliedFilterCount > 0 ? \"filters\" : \"query\";\n}\n\n/**\n * Index to focus after removing item `removedIndex` from a list that now has `remaining` items:\n * the item that slid into its place, else the new last item, else -1 (move to the fallback target).\n * Removing a focused chip or row would otherwise drop focus to <body>.\n */\nexport function resolveFocusAfterRemoval(removedIndex: number, remaining: number): number {\n if (!Number.isInteger(removedIndex) || removedIndex < 0 || !Number.isInteger(remaining) || remaining < 0) {\n throw new RangeError(\"Removal indexes must be nonnegative integers\");\n }\n return remaining === 0 ? -1 : Math.min(removedIndex, remaining - 1);\n}\n\n/** Recipe for the SearchScreen phase sections; geometry stays on shared spacing tokens. */\nexport const searchScreenRecipe = {\n /** Recent searches shown before the user types; reference services show 5–10 and let the rest scroll away. */\n recentVisible: 5,\n /** Suggestions under the \"search for ‘q’\" row. */\n suggestionVisible: 6,\n /** Skeleton rows while the first page of results loads. */\n loadingRows: 4,\n /** Between idle sections (recent, suggested). */\n sectionGap: spacing.xl,\n /** Section title to its list, and results header to applied filters. */\n headerGap: spacing.sm,\n /** Between chips in applied filters and suggested queries. */\n chipGap: spacing.xs,\n} as const;\n\n/** Horizontal intent preserves vertical scrolling and uses one reveal distance across renderers. */\nexport function timestampRevealOffset(dx: number, dy: number): number {\n // A 12px dead zone and 2:1 direction bias avoid turning taps/list scrolling into a time gesture.\n return dx > 12 && dx > Math.abs(dy) * 2 ? Math.min(dx, 88) : 0;\n}\n"]}
1
+ {"version":3,"file":"screen-patterns.js","sourceRoot":"","sources":["../src/screen-patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAOnD,MAAM,UAAU,yBAAyB,CAAC,QAA4B,EAAE,IAAI,EAAE,OAAO,EAAE;IACrF,IAAI,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/E,MAAM,IAAI,SAAS,CAAC,8BAA8B,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAClD,MAAM,IAAI,SAAS,CAAC,yCAAyC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,eAAe,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;QACvC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,SAAS;QAC9B,YAAY,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ;KACrD,CAAC;AACb,CAAC;AAED,qGAAqG;AACrG,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,QAAQ,EAAE,MAA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/save errors belong beside retained content. */\nexport type ScreenContentState =\n | Readonly<{ kind: \"ready\" }>\n | Readonly<{ kind: \"loading\" | \"empty\" | \"error\" | \"restricted\"; title: string; description?: string }>;\n\nexport function resolveScreenContentState(state: ScreenContentState = { kind: \"ready\" }) {\n if (![\"ready\", \"loading\", \"empty\", \"error\", \"restricted\"].includes(state.kind)) {\n throw new TypeError(\"Unknown screen content state\");\n }\n if (state.kind !== \"ready\" && !state.title.trim()) {\n throw new TypeError(\"Screen state requires a localized title\");\n }\n return {\n kind: state.kind,\n replacesContent: state.kind !== \"ready\",\n busy: state.kind === \"loading\",\n announcement: state.kind === \"error\" ? \"assertive\" : \"polite\",\n } as const;\n}\n\n// Reuse reading-width and spacing tokens; do not derive geometry from a product's device or artwork.\nexport const screenPatternRecipe = {\n maxWidth: layout.readingMaxWidth,\n padding: spacing.md,\n sectionGap: spacing.xl,\n itemGap: spacing.sm,\n stateGap: spacing.md,\n // Compact screens must keep back/title/save on one row; scale this floor for large text instead of reserving a desktop-width title.\n headerMinWidth: layout.readingMaxWidth / 6,\n // Reserve the opposite edge for authorship and cap the composer so history remains visible.\n messageMaxWidth: \"84%\",\n // Social thumbnails stay compact; selection order and removal replace a second toolbar.\n attachmentSize: 80,\n attachmentRemoveSize: 24,\n reactionHoldMs: 450,\n reactionMoveTolerance: 10,\n reactionMenuWidth: 320,\n replySwipeDistance: 60,\n composerMinLines: 1,\n composerMaxLines: 5,\n} as const;\n\n/** Controlled composer: HJM never clears drafts or interprets a fulfilled callback as server delivery. */\nexport type MessageComposerDescriptor = Readonly<{\n value: string;\n label: string;\n sendLabel: string;\n /** Short visual copy may differ from the complete accessible input name. */\n placeholder?: string;\n description?: string;\n error?: string;\n invalid?: boolean;\n /** Newline remains the compatible default; desktop chat may explicitly opt into send. */\n submitMode?: \"newline\" | \"send\";\n disabled?: boolean;\n pending?: boolean;\n attachmentCount?: number;\n}>;\n/** Safari may report the final IME Enter as keyCode 229 after isComposing becomes false. */\nexport function shouldSubmitMessageKey(event: Readonly<{ key: string; shiftKey?: boolean; isComposing?: boolean; keyCode?: number }>, mode: \"newline\" | \"send\" = \"newline\"): boolean {\n return mode === \"send\" && event.key === \"Enter\" && !event.shiftKey && !event.isComposing && event.keyCode !== 229;\n}\nexport function canSubmitMessage({ value, disabled = false, pending = false, attachmentCount = 0 }: MessageComposerDescriptor): boolean {\n if (!Number.isSafeInteger(attachmentCount) || attachmentCount < 0) throw new RangeError(\"Attachment count must be a nonnegative integer\");\n return !disabled && !pending && (value.trim().length > 0 || attachmentCount > 0);\n}\n\n/** Bubble alignment expresses authorship, not delivery; delivery text always comes from the product receipt. */\nexport type ChatMessageDescriptor = Readonly<{\n direction: \"incoming\" | \"outgoing\";\n author: string;\n timestamp: string;\n deliveryLabel?: string;\n /** Inward drag reveals time (incoming right, outgoing left) while delivery state remains visible; default preserves existing captions. */\n timestampPresentation?: \"always\" | \"swipe\";\n /** Connected authorship tip; opt-in keeps existing card-like conversations unchanged. */\n bubbleTail?: boolean;\n}>;\n\n/** A denied permission goes to settings; rendering never requests OS access automatically. */\nexport type PermissionScreenStatus = \"prompt\" | \"denied\" | \"granted\" | \"unavailable\";\nexport function resolvePermissionAction(status:PermissionScreenStatus) {\n switch(status){case \"prompt\":return \"request\";case \"denied\":return \"settings\";case \"granted\":return \"continue\";case \"unavailable\":return null;default:throw new TypeError(\"Unknown permission state\");}\n}\nexport function resolveOnboardingStep(total:number,index:number){\n if(!Number.isInteger(total)||total<1||!Number.isInteger(index)||index<0||index>=total)throw new RangeError(\"Onboarding requires a valid step index\");\n return {first:index===0,last:index===total-1};\n}\n\n/** Replies are one level deep; reject orphaned/duplicate records instead of silently losing them. */\nexport function validateCommentThread(items:readonly {id:string;parentId:string|null}[]){\n const roots=new Set(items.filter(item=>item.parentId===null).map(item=>item.id));const ids=new Set<string>();\n for(const item of items){if(!item.id.trim()||ids.has(item.id))throw new TypeError(\"Comment ids must be unique and nonempty\");ids.add(item.id);if(item.parentId!==null&&(!roots.has(item.parentId)||item.parentId===item.id))throw new TypeError(\"Replies require an existing root comment\");}\n}\n\n/** Source bytes, permission requests, ordering and upload limits remain product-owned. */\nexport type MessageAttachmentDescriptor = Readonly<{ id: string; removeLabel: string; /** Local preparation can lock removal without locking text entry. */ disabled?: boolean }>;\nexport function validateMessageAttachments(attachments: readonly MessageAttachmentDescriptor[]): void {\n const ids = new Set<string>();\n for (const item of attachments) {\n if (!item.id.trim() || ids.has(item.id) || !item.removeLabel.trim()) throw new TypeError(\"Attachments require unique ids and localized removal labels\");\n ids.add(item.id);\n }\n}\n\n/** Require horizontal intent so a timeline scroll cannot accidentally start a reply. */\nexport function isReplySwipe(dx: number, dy: number): boolean {\n return Math.abs(dx) >= screenPatternRecipe.replySwipeDistance && Math.abs(dx) > Math.abs(dy) * 2;\n}\n\n/** The UI never infers permission or camera availability; product adapters own both. */\nexport type PhotoSource = \"library\" | \"camera\";\nexport type PhotoSourceLabels = Readonly<{ title:string; library:string; camera:string; cancel:string }>;\n\nexport type SavedItem = Readonly<{ id: string; title: string }>;\nexport type SavedCollection = Readonly<{ id: string; title: string; itemIds: readonly string[] }>;\nexport type SavedItemsLabels = Readonly<{ allItems: string; privateNotice: string; back: string; empty: string; createCollection: string }>;\n\n/** Unsave removes an item from every collection view without rewriting product-owned membership. */\nexport function resolveSavedItems<T extends SavedItem>(items:readonly T[],collections:readonly SavedCollection[],collectionId:string|null|undefined,selectedItemId:string|null|undefined){\n const ids=new Set<string>(),groups=new Set<string>();\n for(const item of items){if(!item.id.trim()||ids.has(item.id)||!item.title.trim())throw new TypeError(\"Saved items require unique ids and nonempty titles\");ids.add(item.id);}\n for(const group of collections){if(!group.id.trim()||groups.has(group.id)||!group.title.trim())throw new TypeError(\"Saved collections require unique ids and nonempty titles\");groups.add(group.id);}\n const collection=collections.find(item=>item.id===collectionId);\n // A deleted collection returns to the overview instead of showing a mislabeled all-posts view.\n const home=collectionId===undefined||(collectionId!==null&&!collection);\n const visible=home||collectionId===null?items:items.filter(item=>collection?.itemIds.includes(item.id));\n return {home,collection,visible,selected:home?undefined:visible.find(item=>item.id===selectedItemId)};\n}\n\n/**\n * SearchScreen phases (2026-10-06 search redesign, docs/screen-patterns.md#searchscreen-두-단계-검색).\n * Without a committed query (one-step search, the pre-1.13 behavior) any nonblank query is already\n * `results`. With one, typing a different query is `typing`: suggestions replace the results until the\n * user commits (Enter, a suggestion, a recent or suggested query). Comparing trimmed values keeps a\n * trailing space from flipping committed results back into suggestions.\n */\nexport type SearchScreenPhase = \"idle\" | \"typing\" | \"results\";\nexport function resolveSearchScreenPhase(query: string, committedQuery?: string): SearchScreenPhase {\n const typed = query.trim();\n if (!typed) return \"idle\";\n if (committedQuery === undefined) return \"results\";\n return typed === committedQuery.trim() ? \"results\" : \"typing\";\n}\n\n/**\n * The value a commit records, or `null` when there is nothing to commit. Blank commits are dropped\n * so a stray Enter never writes an empty recent search or fetches \"everything\".\n */\nexport function resolveSearchCommit(value: string): string | null {\n const next = value.trim();\n return next ? next : null;\n}\n\n/**\n * Why a committed search shows nothing. `filters` keeps the filter rail and offers \"clear all\";\n * `query` hides the rail (no filter can fix it) and offers suggested queries instead. Reference\n * services hide the rail on every zero result, which removes the only way to undo a filter.\n * `null` count means the result is still loading, so no cause is reported yet.\n */\nexport type SearchEmptyCause = \"none\" | \"filters\" | \"query\";\nexport function resolveSearchEmptyCause(count: number | null, appliedFilterCount: number): SearchEmptyCause {\n // Loading/nonempty results must not bypass the same count contract used by empty results.\n if ((count !== null && (count < 0 || !Number.isSafeInteger(count))) || !Number.isSafeInteger(appliedFilterCount) || appliedFilterCount < 0) {\n throw new RangeError(\"Search counts must be nonnegative integers\");\n }\n if (count === null || count > 0) return \"none\";\n return appliedFilterCount > 0 ? \"filters\" : \"query\";\n}\n\n/**\n * Index to focus after removing item `removedIndex` from a list that now has `remaining` items:\n * the item that slid into its place, else the new last item, else -1 (move to the fallback target).\n * Removing a focused chip or row would otherwise drop focus to <body>.\n */\nexport function resolveFocusAfterRemoval(removedIndex: number, remaining: number): number {\n if (!Number.isInteger(removedIndex) || removedIndex < 0 || !Number.isInteger(remaining) || remaining < 0) {\n throw new RangeError(\"Removal indexes must be nonnegative integers\");\n }\n return remaining === 0 ? -1 : Math.min(removedIndex, remaining - 1);\n}\n\n/** Recipe for the SearchScreen phase sections; geometry stays on shared spacing tokens. */\nexport const searchScreenRecipe = {\n /** Debounced typing delay; explicit submit remains a separate host action. */\n debounceMs: 300,\n /** Recent searches shown before the user types; reference services show 5–10 and let the rest scroll away. */\n recentVisible: 5,\n /** Suggestions under the \"search for ‘q’\" row. */\n suggestionVisible: 6,\n /** Skeleton rows while the first page of results loads. */\n loadingRows: 4,\n /** Between idle sections (recent, suggested). */\n sectionGap: spacing.xl,\n /** Section title to its list, and results header to applied filters. */\n headerGap: spacing.sm,\n /** Between chips in applied filters and suggested queries. */\n chipGap: spacing.xs,\n} as const;\n\n/** Keep finite negative delays at zero; reject values whose timer behavior varies by host. */\nexport function resolveSearchDebounceMs(value: number = searchScreenRecipe.debounceMs): number {\n if (!Number.isFinite(value)) throw new RangeError(\"Search debounceMs must be finite\");\n return Math.max(0, value);\n}\n\n/** Horizontal intent preserves vertical scrolling and uses one reveal distance across renderers. */\nexport function timestampRevealOffset(dx: number, dy: number): number {\n // A 12px dead zone and 2:1 direction bias avoid turning taps/list scrolling into a time gesture.\n return dx > 12 && dx > Math.abs(dy) * 2 ? Math.min(dx, 88) : 0;\n}\n"]}