@g9tm/lynxcontrols 1.4.7 → 1.5.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 (227) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/anchor/context.d.ts +15 -0
  3. package/dist/anchor/context.d.ts.map +1 -0
  4. package/dist/anchor/context.jsx +10 -0
  5. package/dist/anchor/context.jsx.map +1 -0
  6. package/dist/anchor/hooks.d.ts +72 -0
  7. package/dist/anchor/hooks.d.ts.map +1 -0
  8. package/dist/anchor/hooks.jsx +147 -0
  9. package/dist/anchor/hooks.jsx.map +1 -0
  10. package/dist/anchor/index.d.ts +6 -0
  11. package/dist/anchor/index.d.ts.map +1 -0
  12. package/dist/anchor/index.jsx +5 -0
  13. package/dist/anchor/measure.d.ts +22 -0
  14. package/dist/anchor/measure.d.ts.map +1 -0
  15. package/dist/anchor/measure.jsx +110 -0
  16. package/dist/anchor/measure.jsx.map +1 -0
  17. package/dist/anchor/registry.d.ts +108 -0
  18. package/dist/anchor/registry.d.ts.map +1 -0
  19. package/dist/anchor/registry.jsx +142 -0
  20. package/dist/anchor/registry.jsx.map +1 -0
  21. package/dist/anchor/scroll.d.ts +34 -0
  22. package/dist/anchor/scroll.d.ts.map +1 -0
  23. package/dist/anchor/scroll.jsx +255 -0
  24. package/dist/anchor/scroll.jsx.map +1 -0
  25. package/dist/base/control.d.ts +10 -3
  26. package/dist/base/control.d.ts.map +1 -1
  27. package/dist/base/control.jsx +17 -2
  28. package/dist/base/control.jsx.map +1 -1
  29. package/dist/base/index.d.ts +1 -1
  30. package/dist/base/index.d.ts.map +1 -1
  31. package/dist/base/index.jsx +1 -1
  32. package/dist/base/pressable.d.ts.map +1 -1
  33. package/dist/base/pressable.jsx +7 -1
  34. package/dist/base/pressable.jsx.map +1 -1
  35. package/dist/base/selection-item.d.ts +9 -1
  36. package/dist/base/selection-item.d.ts.map +1 -1
  37. package/dist/base/selection-item.jsx +10 -1
  38. package/dist/base/selection-item.jsx.map +1 -1
  39. package/dist/button/button.css +20 -0
  40. package/dist/button/button.css.map +1 -1
  41. package/dist/button/button.d.ts.map +1 -1
  42. package/dist/button/button.jsx +11 -1
  43. package/dist/button/button.jsx.map +1 -1
  44. package/dist/button/header-action-button.d.ts +5 -0
  45. package/dist/button/header-action-button.d.ts.map +1 -1
  46. package/dist/button/header-action-button.jsx +16 -2
  47. package/dist/button/header-action-button.jsx.map +1 -1
  48. package/dist/button/icon-button.d.ts.map +1 -1
  49. package/dist/button/icon-button.jsx +11 -1
  50. package/dist/button/icon-button.jsx.map +1 -1
  51. package/dist/button/nav-card.d.ts.map +1 -1
  52. package/dist/button/nav-card.jsx +10 -1
  53. package/dist/button/nav-card.jsx.map +1 -1
  54. package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
  55. package/dist/button/vertical-icon-text-button.jsx +10 -1
  56. package/dist/button/vertical-icon-text-button.jsx.map +1 -1
  57. package/dist/button/visuals.d.ts.map +1 -1
  58. package/dist/button/visuals.jsx +1 -1
  59. package/dist/button/visuals.jsx.map +1 -1
  60. package/dist/expander/expander.d.ts.map +1 -1
  61. package/dist/expander/expander.jsx +14 -1
  62. package/dist/expander/expander.jsx.map +1 -1
  63. package/dist/fields/editor.d.ts.map +1 -1
  64. package/dist/fields/editor.jsx +18 -2
  65. package/dist/fields/editor.jsx.map +1 -1
  66. package/dist/fields/fields.css +21 -0
  67. package/dist/fields/fields.css.map +1 -1
  68. package/dist/fields/index.d.ts +1 -1
  69. package/dist/fields/index.d.ts.map +1 -1
  70. package/dist/fields/index.jsx +1 -1
  71. package/dist/fields/outlined-field.d.ts +33 -1
  72. package/dist/fields/outlined-field.d.ts.map +1 -1
  73. package/dist/fields/outlined-field.jsx +43 -5
  74. package/dist/fields/outlined-field.jsx.map +1 -1
  75. package/dist/fields/text-entry.d.ts.map +1 -1
  76. package/dist/fields/text-entry.jsx +18 -2
  77. package/dist/fields/text-entry.jsx.map +1 -1
  78. package/dist/guide/guide.css +453 -0
  79. package/dist/guide/guide.css.map +1 -0
  80. package/dist/guide/index.d.ts +5 -0
  81. package/dist/guide/index.d.ts.map +1 -0
  82. package/dist/guide/index.jsx +4 -0
  83. package/dist/guide/journey.d.ts +46 -0
  84. package/dist/guide/journey.d.ts.map +1 -0
  85. package/dist/guide/journey.jsx +464 -0
  86. package/dist/guide/journey.jsx.map +1 -0
  87. package/dist/guide/placement.d.ts +44 -0
  88. package/dist/guide/placement.d.ts.map +1 -0
  89. package/dist/guide/placement.jsx +119 -0
  90. package/dist/guide/placement.jsx.map +1 -0
  91. package/dist/guide/service.d.ts +85 -0
  92. package/dist/guide/service.d.ts.map +1 -0
  93. package/dist/guide/service.jsx +620 -0
  94. package/dist/guide/service.jsx.map +1 -0
  95. package/dist/guide/settings.d.ts +50 -0
  96. package/dist/guide/settings.d.ts.map +1 -0
  97. package/dist/guide/settings.jsx +60 -0
  98. package/dist/guide/settings.jsx.map +1 -0
  99. package/dist/host/host.d.ts +5 -1
  100. package/dist/host/host.d.ts.map +1 -1
  101. package/dist/host/host.jsx +12 -0
  102. package/dist/host/host.jsx.map +1 -1
  103. package/dist/host/layers.d.ts +3 -1
  104. package/dist/host/layers.d.ts.map +1 -1
  105. package/dist/host/layers.jsx +4 -2
  106. package/dist/host/layers.jsx.map +1 -1
  107. package/dist/host/registry.d.ts +3 -0
  108. package/dist/host/registry.d.ts.map +1 -1
  109. package/dist/host/registry.jsx.map +1 -1
  110. package/dist/index.d.ts +3 -0
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/pickers/combo-box.d.ts +8 -0
  113. package/dist/pickers/combo-box.d.ts.map +1 -1
  114. package/dist/pickers/combo-box.jsx +51 -9
  115. package/dist/pickers/combo-box.jsx.map +1 -1
  116. package/dist/pickers/date-time-picker.d.ts +2 -2
  117. package/dist/pickers/date-time-picker.d.ts.map +1 -1
  118. package/dist/pickers/date-time-picker.jsx +4 -3
  119. package/dist/pickers/date-time-picker.jsx.map +1 -1
  120. package/dist/pickers/date-time.d.ts +5 -2
  121. package/dist/pickers/date-time.d.ts.map +1 -1
  122. package/dist/pickers/date-time.jsx +1 -1
  123. package/dist/pickers/date-time.jsx.map +1 -1
  124. package/dist/pickers/picker-sheet.d.ts +6 -2
  125. package/dist/pickers/picker-sheet.d.ts.map +1 -1
  126. package/dist/pickers/picker-sheet.jsx +2 -3
  127. package/dist/pickers/picker-sheet.jsx.map +1 -1
  128. package/dist/pickers/picker.d.ts.map +1 -1
  129. package/dist/pickers/picker.jsx +3 -2
  130. package/dist/pickers/picker.jsx.map +1 -1
  131. package/dist/pickers/pickers.css +27 -0
  132. package/dist/pickers/pickers.css.map +1 -1
  133. package/dist/pickers/timespan-picker.d.ts.map +1 -1
  134. package/dist/pickers/timespan-picker.jsx +3 -2
  135. package/dist/pickers/timespan-picker.jsx.map +1 -1
  136. package/dist/pickers/trigger.d.ts +3 -1
  137. package/dist/pickers/trigger.d.ts.map +1 -1
  138. package/dist/pickers/trigger.jsx +6 -1
  139. package/dist/pickers/trigger.jsx.map +1 -1
  140. package/dist/provider/contexts.d.ts +3 -0
  141. package/dist/provider/contexts.d.ts.map +1 -1
  142. package/dist/provider/contexts.jsx.map +1 -1
  143. package/dist/provider/provider.d.ts.map +1 -1
  144. package/dist/provider/provider.jsx +24 -17
  145. package/dist/provider/provider.jsx.map +1 -1
  146. package/dist/provider/settings.d.ts +16 -0
  147. package/dist/provider/settings.d.ts.map +1 -1
  148. package/dist/provider/settings.jsx +7 -3
  149. package/dist/provider/settings.jsx.map +1 -1
  150. package/dist/provider/theme.css +4 -0
  151. package/dist/provider/theme.css.map +1 -1
  152. package/dist/range-slider/math.d.ts +14 -4
  153. package/dist/range-slider/math.d.ts.map +1 -1
  154. package/dist/range-slider/math.jsx +16 -4
  155. package/dist/range-slider/math.jsx.map +1 -1
  156. package/dist/range-slider/range-slider.css +17 -0
  157. package/dist/range-slider/range-slider.css.map +1 -1
  158. package/dist/range-slider/range-slider.d.ts +11 -0
  159. package/dist/range-slider/range-slider.d.ts.map +1 -1
  160. package/dist/range-slider/range-slider.jsx +35 -13
  161. package/dist/range-slider/range-slider.jsx.map +1 -1
  162. package/dist/route/hooks.d.ts +34 -0
  163. package/dist/route/hooks.d.ts.map +1 -0
  164. package/dist/route/hooks.jsx +147 -0
  165. package/dist/route/hooks.jsx.map +1 -0
  166. package/dist/route/index.d.ts +3 -0
  167. package/dist/route/index.d.ts.map +1 -0
  168. package/dist/route/index.jsx +2 -0
  169. package/dist/route/router.d.ts +201 -0
  170. package/dist/route/router.d.ts.map +1 -0
  171. package/dist/route/router.jsx +810 -0
  172. package/dist/route/router.jsx.map +1 -0
  173. package/dist/selection/index.d.ts +2 -1
  174. package/dist/selection/index.d.ts.map +1 -1
  175. package/dist/selection/index.jsx +2 -1
  176. package/dist/selection/selection-sheet.d.ts +3 -1
  177. package/dist/selection/selection-sheet.d.ts.map +1 -1
  178. package/dist/selection/selection-sheet.jsx +57 -8
  179. package/dist/selection/selection-sheet.jsx.map +1 -1
  180. package/dist/selection/selection.css +7 -0
  181. package/dist/selection/selection.css.map +1 -1
  182. package/dist/selection/window.d.ts +29 -0
  183. package/dist/selection/window.d.ts.map +1 -0
  184. package/dist/selection/window.jsx +24 -0
  185. package/dist/selection/window.jsx.map +1 -0
  186. package/dist/sheet/frame.d.ts +3 -1
  187. package/dist/sheet/frame.d.ts.map +1 -1
  188. package/dist/sheet/frame.jsx +72 -26
  189. package/dist/sheet/frame.jsx.map +1 -1
  190. package/dist/sheet/header.d.ts.map +1 -1
  191. package/dist/sheet/header.jsx +3 -1
  192. package/dist/sheet/header.jsx.map +1 -1
  193. package/dist/sheet/index.d.ts +1 -1
  194. package/dist/sheet/index.d.ts.map +1 -1
  195. package/dist/sheet/index.jsx +1 -1
  196. package/dist/sheet/options.d.ts +30 -0
  197. package/dist/sheet/options.d.ts.map +1 -1
  198. package/dist/sheet/options.jsx +2 -1
  199. package/dist/sheet/options.jsx.map +1 -1
  200. package/dist/sheet/service.d.ts +13 -0
  201. package/dist/sheet/service.d.ts.map +1 -1
  202. package/dist/sheet/service.jsx +27 -4
  203. package/dist/sheet/service.jsx.map +1 -1
  204. package/dist/sheet/sheet.css +9 -0
  205. package/dist/sheet/sheet.css.map +1 -1
  206. package/dist/sheet/sizing.d.ts +2 -0
  207. package/dist/sheet/sizing.d.ts.map +1 -1
  208. package/dist/sheet/sizing.jsx +2 -1
  209. package/dist/sheet/sizing.jsx.map +1 -1
  210. package/dist/tabs/tab-view.d.ts +14 -0
  211. package/dist/tabs/tab-view.d.ts.map +1 -1
  212. package/dist/tabs/tab-view.jsx +59 -3
  213. package/dist/tabs/tab-view.jsx.map +1 -1
  214. package/dist/toggle/checkbox.d.ts.map +1 -1
  215. package/dist/toggle/checkbox.jsx +15 -1
  216. package/dist/toggle/checkbox.jsx.map +1 -1
  217. package/dist/toggle/chip-group.d.ts +9 -1
  218. package/dist/toggle/chip-group.d.ts.map +1 -1
  219. package/dist/toggle/chip-group.jsx +63 -13
  220. package/dist/toggle/chip-group.jsx.map +1 -1
  221. package/dist/toggle/switch.d.ts +1 -1
  222. package/dist/toggle/switch.d.ts.map +1 -1
  223. package/dist/toggle/switch.jsx +18 -3
  224. package/dist/toggle/switch.jsx.map +1 -1
  225. package/dist/toggle/toggle.css +20 -0
  226. package/dist/toggle/toggle.css.map +1 -1
  227. package/package.json +17 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route/router.jsx","sources":["../../src/route/router.ts"],"sourcesContent":["import {\n formatAddress,\n type G9Address,\n type G9Catalogue,\n type G9Entry,\n type G9GoFailure,\n type G9LivePlace,\n type G9PlaceDeclaration,\n type G9PlaceHandle,\n type G9PlaceLayer,\n type G9RouteSink,\n type G9ScrollMark,\n type G9Segment,\n type G9SegmentView,\n type G9Snapshot,\n type G9ViewApplied,\n g9RuntimeTimers,\n generalOf,\n planNavigation,\n resolvePath,\n sameSegment,\n snapshotRefusal,\n toSegment,\n tryParseAddress,\n} from '@g9tm/lynxcontrols-foundation';\nimport { measureNode } from '../anchor/measure';\nimport type { G9AnchorRegistry } from '../anchor/registry';\nimport { applyScrollMark, readScrollMark, revealAnchor } from '../anchor/scroll';\n\n// The router: where the app is (built from what is really open — every place declares itself while open), and how to\n// get somewhere (jump: the router opens each place the way the UI does; walk: it shows the person the control to tap,\n// step by step, or presses it itself in a demo). It never writes data: opening a place is the place's own `open`, the\n// same function its button calls, so every gate (permissions, data on the device) stays where it is. Before anything\n// is closed or opened every segment is checked; an address whose entity is not there changes nothing at all.\n\n/** A store a component reads with `useSyncExternalStore`. */\nexport interface G9ReadableStore<T> {\n get(): T;\n subscribe(listener: () => void): () => void;\n}\n\n/** Where the app is. The same object until something changes. */\nexport interface G9Location {\n /** The unique address (canonical, ids included, no target). */\n readonly unique: string;\n /** The general address (kinds only). */\n readonly general: string;\n readonly segments: readonly G9Segment[];\n /** A breadcrumb per segment, in the current language. */\n readonly titles: readonly string[];\n /** The path does not reach the root (a parent was missing). */\n readonly incomplete: boolean;\n /** Open places that are not on the path, as general segments (`site`, `map`). */\n readonly others: readonly string[];\n /** Facts the open places report (the surface, the open site…). */\n readonly facts: Readonly<Record<string, string | number | boolean | null>>;\n readonly revision: number;\n}\n\n/** One move in the trail. */\nexport interface G9TrailEntry {\n readonly at: number;\n readonly unique: string;\n readonly general: string;\n readonly cause: 'user' | 'go' | 'walk' | 'restore' | 'back';\n}\n\n/** How a navigation ended: where the app is, or the reason, the step and a message for the person. */\nexport type G9GoResult =\n | { readonly ok: true; readonly location: G9Location; readonly view: G9ViewApplied }\n | {\n readonly ok: false;\n readonly reason: G9GoFailure;\n /** The segment index it stopped at (-1: before any). */\n readonly at: number;\n readonly segment: G9Segment | null;\n /** For the person, in their language when the place said so; otherwise for developers. */\n readonly message: string;\n readonly location: G9Location;\n };\n\n/** Who asked for a navigation. */\nexport type G9GoSource = 'user' | 'assistant' | 'link' | 'tester' | 'qa' | 'restore';\n\n/** How a navigation runs: who asked, snapshot views to put back, whether QA may force past unsaved work. */\nexport interface G9GoOptions {\n readonly source?: G9GoSource;\n /** Apply snapshot views (scroll marks, view values). `restore` does. */\n readonly views?: readonly G9SegmentView[];\n /** Close dirty places without asking: honoured for `qa` only. */\n readonly force?: boolean;\n}\n\n/** What the router reports (diagnostics, busy tracking, a tester trail). */\nexport type G9RouteEvent =\n | { readonly kind: 'changed'; readonly location: G9Location; readonly cause: G9TrailEntry['cause'] }\n | { readonly kind: 'go:start'; readonly address: string; readonly mode: 'jump' | 'walk' | 'restore' }\n | {\n readonly kind: 'go:step';\n readonly address: string;\n readonly index: number;\n readonly segment: G9Segment;\n readonly how: 'opened' | 'walked' | 'jumped';\n }\n | { readonly kind: 'go:done'; readonly address: string; readonly result: G9GoResult }\n | { readonly kind: 'error'; readonly where: string; readonly error: unknown };\n\n/** One step of a walk. */\nexport interface G9WalkStep {\n readonly index: number;\n readonly segment: G9Segment;\n readonly title: string;\n readonly state: 'pending' | 'current' | 'done' | 'jumped' | 'failed';\n}\n\n/** Draws a walk step: the guide module's default presenter points a finger at the entry control. */\nexport interface G9WalkPresenter {\n show(step: {\n readonly anchor: string;\n readonly text: string;\n readonly gesture: 'tap' | 'longPress';\n readonly index: number;\n readonly count: number;\n }): { hide(): void };\n /** A step the router does itself (a jump, a preparation): one short line. */\n note?(text: string): void;\n}\n\n/** How a walk runs: the person taps (`user`) or the router presses (`demo`), and who draws the steps. */\nexport interface G9WalkOptions extends G9GoOptions {\n /** `user` waits for the person's own tap; `demo` presses the entry itself. Default `user`. */\n readonly by?: 'user' | 'demo';\n readonly presenter?: G9WalkPresenter;\n /** Per step. Default 60000 (user) / 8000 (demo). */\n readonly stepTimeoutMs?: number;\n /** How long a demo shows the control before pressing it. Default 900 ms. */\n readonly demoDelayMs?: number;\n}\n\n/** A guided navigation in progress: its steps, cancel, and its result. */\nexport interface G9Walk {\n readonly steps: G9ReadableStore<readonly G9WalkStep[]>;\n cancel(): void;\n readonly result: Promise<G9GoResult>;\n}\n\n/** A trip somewhere and back. */\nexport interface G9Excursion {\n readonly origin: G9Snapshot;\n readonly result: G9GoResult;\n back(): Promise<G9GoResult>;\n}\n\n/** What a router is built from: the catalogue, the context and language its callbacks get, the anchors, texts. */\nexport interface G9RouterOptions<Ctx> {\n readonly catalogue: G9Catalogue<Ctx>;\n /** What every catalogue callback gets; null = nobody signed in (only places without guards resolve). */\n context(): Ctx | null;\n language(): 'fa' | 'en';\n readonly anchors?: () => G9AnchorRegistry | null;\n /** Wall clock (ms). Default `Date.now`. */\n now?(): number;\n /** Asked before closing a place with unsaved work. Absent = such a navigation is refused (`dirty`). */\n confirmLeave?(segment: G9Segment, title: string, message: string | undefined): Promise<boolean>;\n onEvent?(event: G9RouteEvent): void;\n /** Default 50. */\n readonly historySize?: number;\n /**\n * After a sheet appeared, how long before the next place is opened (G9 sheets drop a second show within 369 ms, the\n * double-tap guard). Default 410.\n */\n readonly sheetGapMs?: number;\n /** How long a closing place may take to go (ms). Default 3000. */\n readonly closeTimeoutMs?: number;\n /**\n * How long an address's `#target` may take to appear after its place opened (ms) — a list fills after its sheet is\n * declared. Default 3000.\n */\n readonly targetTimeoutMs?: number;\n /** After restoring a scroll mark: how long the rows must stay unchanged before it is applied again (ms). Default 400. */\n readonly scrollSettleMs?: number;\n /** …and the longest wait for that (ms). Default 3000. */\n readonly scrollSettleMaxMs?: number;\n /** The app version written into snapshots. */\n readonly appVersion?: string | (() => string);\n /** Texts the router shows a person (default: English developer texts). */\n readonly texts?: Partial<G9RouterTexts>;\n}\n\n/** What the router tells a person, in their language (the app supplies them). */\nexport interface G9RouterTexts {\n notFound(title: string): string;\n blocked(title: string): string;\n timeout(title: string): string;\n /** `open` said it could not open the place (the app already told the person why). */\n notOpened(title: string): string;\n dirty(title: string): string;\n notAddressable(title: string): string;\n badAddress(): string;\n cancelled(): string;\n jumped(title: string): string;\n}\n\nconst DEFAULT_TEXTS: G9RouterTexts = {\n notFound: (t) => `\"${t}\" is not on this device.`,\n blocked: (t) => `\"${t}\" cannot be closed now.`,\n timeout: (t) => `\"${t}\" did not open in time.`,\n notOpened: (t) => `\"${t}\" could not be opened.`,\n dirty: (t) => `\"${t}\" has unsaved changes.`,\n notAddressable: (t) => `\"${t}\" cannot be opened directly.`,\n badAddress: () => 'This address is not valid.',\n cancelled: () => 'Cancelled.',\n jumped: (t) => `Opening \"${t}\".`,\n};\n\n/** The router (also the route sink places declare themselves to). */\nexport interface G9Router extends G9RouteSink {\n readonly current: G9ReadableStore<G9Location>;\n where(): G9Location;\n go(address: string | G9Address, options?: G9GoOptions): Promise<G9GoResult>;\n walk(address: string | G9Address, options?: G9WalkOptions): G9Walk;\n snapshot(): G9Snapshot;\n /** The snapshot with the scroll mark of every scroller on screen (on the last segment). */\n snapshotWithScroll(): Promise<G9Snapshot>;\n /** Puts a snapshot back (refused across another catalogue or past `maxAgeMs`, default unlimited). */\n restore(snapshot: G9Snapshot, options?: G9GoOptions & { readonly maxAgeMs?: number }): Promise<G9GoResult>;\n excursion(address: string | G9Address, options?: G9GoOptions): Promise<G9Excursion>;\n readonly history: G9ReadableStore<readonly G9TrailEntry[]>;\n readonly busy: G9ReadableStore<boolean>;\n /** The declaration of an open place (QA, the guide), or null. */\n placeAt(index: number): G9PlaceDeclaration | null;\n /** A new user / sign-out: the trail is forgotten and a running navigation ends. */\n reset(): void;\n /** The catalogue (manifests, links). */\n readonly catalogue: G9Catalogue<unknown>;\n}\n\n/** True when a route sink is a full router. */\nexport function isG9Router(sink: G9RouteSink | null | undefined): sink is G9Router {\n return !!sink && typeof (sink as Partial<G9Router>).go === 'function' && !!(sink as Partial<G9Router>).current;\n}\n\ninterface Place {\n readonly token: number;\n readonly declaration: G9PlaceDeclaration;\n readonly at: number;\n}\n\nfunction store<T>(initial: T): G9ReadableStore<T> & { set(v: T): void } {\n let value = initial;\n const listeners = new Set<() => void>();\n return {\n get: () => value,\n set(v) {\n if (Object.is(v, value)) return;\n value = v;\n for (const l of Array.from(listeners)) {\n try {\n l();\n } catch {\n // a listener's failure never stops the others\n }\n }\n },\n subscribe(l) {\n listeners.add(l);\n return () => {\n listeners.delete(l);\n };\n },\n };\n}\n\nclass Stop extends Error {\n constructor(\n readonly reason: G9GoFailure,\n readonly at: number,\n readonly segment: G9Segment | null,\n message: string,\n ) {\n super(message);\n }\n}\n\nconst sleep = (ms: number) => new Promise<void>((r) => g9RuntimeTimers.setTimeout(r, ms));\n\n/** Creates a router. */\nexport function createG9Router<Ctx>(options: G9RouterOptions<Ctx>): G9Router {\n const catalogue = options.catalogue as G9Catalogue<unknown>;\n const now = options.now ?? (() => Date.now());\n const texts: G9RouterTexts = { ...DEFAULT_TEXTS, ...options.texts };\n const sheetGapMs = options.sheetGapMs ?? 410;\n const closeTimeoutMs = options.closeTimeoutMs ?? 3000;\n const targetTimeoutMs = options.targetTimeoutMs ?? 3000;\n const scrollSettleMs = options.scrollSettleMs ?? 400;\n const scrollSettleMaxMs = options.scrollSettleMaxMs ?? 3000;\n const historySize = options.historySize ?? 50;\n const places = new Map<number, Place>();\n let tokens = 0;\n let revision = 0;\n let lastSheetAt = Number.NEGATIVE_INFINITY;\n let cause: G9TrailEntry['cause'] = 'user';\n let running: { readonly id: number; cancelled: G9GoFailure | null } | null = null;\n let runs = 0;\n const waiters = new Set<() => void>();\n\n const emit = (event: G9RouteEvent) => {\n try {\n options.onEvent?.(event);\n } catch {\n // diagnostics never break navigation\n }\n };\n\n const segmentOf = (p: Place): G9Segment | null => {\n try {\n const s = p.declaration.segment;\n return toSegment(typeof s === 'function' ? s() : s);\n } catch (error) {\n emit({ kind: 'error', where: 'segment', error });\n return null;\n }\n };\n\n const isShown = (p: Place): boolean => {\n try {\n return p.declaration.shown?.() !== false;\n } catch (error) {\n emit({ kind: 'error', where: 'shown', error });\n return true;\n }\n };\n\n const live = (): G9LivePlace[] => {\n const out: G9LivePlace[] = [];\n for (const p of places.values()) {\n if (!isShown(p)) continue;\n const segment = segmentOf(p);\n if (!segment || !catalogue.def(segment.kind)) continue;\n out.push({\n token: p.token,\n segment,\n layer: p.declaration.layer,\n order: p.declaration.order ?? 0,\n under: p.declaration.under ?? [],\n });\n }\n return out;\n };\n\n const titleOf = (segment: G9Segment, token: number | null): string => {\n const decl = token !== null ? places.get(token)?.declaration : undefined;\n let t: string | null | undefined;\n try {\n t = decl?.title?.();\n } catch {\n t = null;\n }\n return t?.trim() || catalogue.title(segment, options.context(), options.language());\n };\n\n const empty: G9Location = Object.freeze({\n unique: '/',\n general: '/',\n segments: [],\n titles: [],\n incomplete: false,\n others: [],\n facts: {},\n revision: 0,\n });\n const current = store<G9Location>(empty);\n const history = store<readonly G9TrailEntry[]>([]);\n const busy = store(false);\n\n const compute = () => {\n const l = live();\n const path = resolvePath(l, catalogue);\n const unique = formatAddress(path.segments);\n const titles = path.segments.map((s, i) => titleOf(s, path.tokens[i] ?? null));\n const byToken = new Map(l.map((p) => [p.token, p] as const));\n const others = path.others.map((t) => generalOf({ segments: [byToken.get(t)?.segment as G9Segment] }).slice(1));\n const facts: Record<string, string | number | boolean | null> = {};\n const ordered = [...path.others, ...path.tokens.filter((t): t is number => t !== null)];\n for (const t of ordered) {\n try {\n Object.assign(facts, places.get(t)?.declaration.facts?.() ?? {});\n } catch (error) {\n emit({ kind: 'error', where: 'facts', error });\n }\n }\n const prev = current.get();\n const same =\n prev.unique === unique &&\n prev.incomplete === path.incomplete &&\n prev.titles.join('\\u0000') === titles.join('\\u0000') &&\n prev.others.join('\\u0000') === others.join('\\u0000') &&\n JSON.stringify(prev.facts) === JSON.stringify(facts);\n if (!same) {\n revision += 1;\n const next: G9Location = Object.freeze({\n unique,\n general: generalOf({ segments: path.segments }),\n segments: path.segments,\n titles,\n incomplete: path.incomplete,\n others,\n facts,\n revision,\n });\n current.set(next);\n if (prev.unique !== unique) {\n const trail = [...history.get(), { at: now(), unique, general: next.general, cause }];\n history.set(trail.length > historySize ? trail.slice(trail.length - historySize) : trail);\n }\n emit({ kind: 'changed', location: next, cause });\n }\n for (const w of Array.from(waiters)) w();\n };\n\n const waitFor = (predicate: () => boolean, timeoutMs: number, runId: number): Promise<boolean> =>\n new Promise((resolve) => {\n if (predicate()) return resolve(true);\n let done = false;\n const finish = (ok: boolean) => {\n if (done) return;\n done = true;\n waiters.delete(check);\n g9RuntimeTimers.clearTimeout(timer);\n resolve(ok);\n };\n const check = () => {\n if (running?.id !== runId || running.cancelled) finish(false);\n else if (predicate()) finish(true);\n };\n waiters.add(check);\n const timer = g9RuntimeTimers.setTimeout(() => finish(predicate()), timeoutMs);\n });\n\n /** True when the anchors changed and then stayed unchanged for `quietMs` (within `maxMs`): worth another pass. */\n const rowsSettle = (registry: G9AnchorRegistry, quietMs: number, maxMs: number): Promise<boolean> =>\n new Promise((resolve) => {\n let changed = false;\n let done = false;\n let quiet: unknown = null;\n const finish = () => {\n if (done) return;\n done = true;\n off();\n if (quiet !== null) g9RuntimeTimers.clearTimeout(quiet);\n g9RuntimeTimers.clearTimeout(cap);\n resolve(changed);\n };\n const arm = () => {\n if (quiet !== null) g9RuntimeTimers.clearTimeout(quiet);\n quiet = g9RuntimeTimers.setTimeout(finish, quietMs);\n };\n const off = registry.subscribe(() => {\n changed = true;\n arm();\n });\n const cap = g9RuntimeTimers.setTimeout(finish, maxMs);\n arm();\n });\n\n const anchorAppears = (registry: G9AnchorRegistry, id: string, timeoutMs: number): Promise<boolean> =>\n new Promise((resolve) => {\n if (registry.find(id)) return resolve(true);\n let done = false;\n const finish = (ok: boolean) => {\n if (done) return;\n done = true;\n off();\n g9RuntimeTimers.clearTimeout(timer);\n resolve(ok);\n };\n const off = registry.subscribe(() => {\n if (registry.find(id)) finish(true);\n });\n const timer = g9RuntimeTimers.setTimeout(() => finish(registry.find(id) !== null), timeoutMs);\n });\n\n const liveWith = (segment: G9Segment) => live().find((p) => sameSegment(p.segment, segment)) ?? null;\n\n const parse = (address: string | G9Address): G9Address | null => {\n if (typeof address !== 'string') return address;\n const r = tryParseAddress(address);\n return r.ok ? r.address : null;\n };\n\n const failure = (reason: G9GoFailure, at: number, segment: G9Segment | null, message: string): G9GoResult => ({\n ok: false,\n reason,\n at,\n segment,\n message,\n location: current.get(),\n });\n\n /** Checks the address, runs every guard, closes what is in the way. Returns the target and what to open. */\n async function prepare(\n address: string | G9Address,\n opts: G9GoOptions,\n runId: number,\n ): Promise<{ target: G9Address; open: G9Segment[]; keep: number }> {\n const parsed = parse(address);\n if (!parsed) throw new Stop('bad-address', -1, null, texts.badAddress());\n const checked = catalogue.check(parsed);\n if (!checked.ok) throw new Stop(checked.reason, checked.at, parsed.segments[checked.at] ?? null, checked.message);\n const target = checked.address;\n const ctx = options.context();\n for (let i = 0; i < target.segments.length; i++) {\n const s = target.segments[i] as G9Segment;\n const def = catalogue.def(s.kind);\n if (!def?.guard) continue;\n let verdict: Awaited<ReturnType<NonNullable<typeof def.guard>>>;\n try {\n verdict = await def.guard(s, target.segments.slice(0, i + 1), ctx);\n } catch (error) {\n emit({ kind: 'error', where: `guard:${s.kind}`, error });\n throw new Stop('failed', i, s, String((error as Error)?.message ?? error));\n }\n if (!verdict.ok)\n throw new Stop(\n verdict.reason,\n i,\n s,\n verdict.message ?? texts.notFound(catalogue.title(s, ctx, options.language())),\n );\n }\n if (running?.id !== runId) throw new Stop('superseded', -1, null, texts.cancelled());\n\n const l = live();\n const path = resolvePath(l, catalogue);\n const plan = planNavigation(target.segments, path, l);\n for (let i = plan.keep; i < target.segments.length; i++) {\n const s = target.segments[i] as G9Segment;\n if (!catalogue.def(s.kind)?.open)\n throw new Stop('not-addressable', i, s, texts.notAddressable(catalogue.title(s, ctx, options.language())));\n }\n // Unsaved work first: nothing is closed until every dirty place agreed.\n for (const token of plan.close) {\n const p = places.get(token);\n if (!p) continue;\n let leave: ReturnType<NonNullable<G9PlaceDeclaration['canLeave']>> = true;\n try {\n leave = p.declaration.canLeave?.() ?? true;\n } catch {\n leave = true;\n }\n if (leave === true) continue;\n const seg = segmentOf(p) ?? toSegment('sheet');\n const title = titleOf(seg, token);\n if (opts.force && opts.source === 'qa') continue;\n const agreed = options.confirmLeave ? await options.confirmLeave(seg, title, leave.message) : false;\n if (!agreed) throw new Stop('dirty', -1, seg, leave.message ?? texts.dirty(title));\n }\n for (const token of plan.close) {\n const p = places.get(token);\n if (!p) continue;\n const seg = segmentOf(p) ?? toSegment('sheet');\n if (!p.declaration.close) throw new Stop('blocked', -1, seg, texts.blocked(titleOf(seg, token)));\n try {\n await p.declaration.close();\n } catch (error) {\n emit({ kind: 'error', where: `close:${seg.kind}`, error });\n }\n const gone = await waitFor(() => !places.has(token), closeTimeoutMs, runId);\n if (!gone) {\n if (running?.id !== runId || running?.cancelled)\n throw new Stop(running?.cancelled ?? 'superseded', -1, null, texts.cancelled());\n throw new Stop('blocked', -1, seg, texts.blocked(titleOf(seg, token)));\n }\n }\n return { target, open: target.segments.slice(plan.keep), keep: plan.keep };\n }\n\n async function sheetGap(): Promise<void> {\n const wait = lastSheetAt + sheetGapMs - now();\n if (wait > 0) await sleep(wait);\n }\n\n async function openStep(target: G9Address, index: number, runId: number): Promise<void> {\n const s = target.segments[index] as G9Segment;\n const def = catalogue.def(s.kind);\n const path = target.segments.slice(0, index + 1);\n await sheetGap();\n // `open` and the place's declaration race inside ONE budget: an `open` that waits on the person (a warning it shows)\n // or never settles cannot hold the router (measured 2026-11-12: a go stuck for minutes behind an unanswered popup).\n let failure: { readonly error: unknown } | null = null;\n let refused = false;\n const wake = () => {\n for (const w of Array.from(waiters)) w();\n };\n void Promise.resolve()\n .then(() => def?.open?.(s, path, options.context()))\n .then(\n (result) => {\n if (result === false && !liveWith(s)) {\n refused = true;\n wake();\n }\n },\n (error: unknown) => {\n emit({ kind: 'error', where: `open:${s.kind}`, error });\n if (liveWith(s)) return;\n failure = { error };\n wake();\n },\n );\n const opened = await waitFor(() => !!liveWith(s) || failure !== null || refused, def?.openTimeoutMs ?? 8000, runId);\n const failed = failure as { readonly error: unknown } | null;\n if (failed) throw new Stop('failed', index, s, String((failed.error as Error)?.message ?? failed.error));\n if (refused)\n throw new Stop('failed', index, s, texts.notOpened(catalogue.title(s, options.context(), options.language())));\n if (!opened || !liveWith(s)) {\n if (running?.id !== runId || running?.cancelled)\n throw new Stop(running?.cancelled ?? 'superseded', index, s, texts.cancelled());\n throw new Stop('timeout', index, s, texts.timeout(catalogue.title(s, options.context(), options.language())));\n }\n }\n\n const currentView = (decl: G9PlaceDeclaration): Readonly<Record<string, string>> => {\n try {\n return decl.view?.() ?? {};\n } catch {\n return {};\n }\n };\n\n const sameView = (a: Readonly<Record<string, string>>, b: Readonly<Record<string, string>>): boolean => {\n const ka = Object.keys(a);\n return ka.length === Object.keys(b).length && ka.every((k) => a[k] === b[k]);\n };\n\n async function applyViews(target: G9Address, views: readonly G9SegmentView[] | undefined): Promise<G9ViewApplied> {\n let worst: G9ViewApplied = 'exact';\n // `skipped` (nothing to scroll on this screen) is as good as exact; only an approximation degrades the result.\n const degrade = (v: G9ViewApplied) => {\n if (v === 'degraded') worst = 'degraded';\n };\n const l = live();\n for (let i = 0; i < target.segments.length; i++) {\n const s = target.segments[i] as G9Segment;\n const p = l.find((x) => sameSegment(x.segment, s));\n const decl = p ? places.get(p.token)?.declaration : undefined;\n const view = { ...(s.params ?? {}), ...(views?.[i]?.view ?? {}) };\n // Arrive exactly: a place showing another view than the address names gets the address's — an address with no\n // parameters is the default view (`/tasks` after `/tasks;q=x` clears the search; seen in a Didban flow).\n if (decl?.applyView && !sameView(currentView(decl), view)) {\n try {\n await decl.applyView(view);\n } catch (error) {\n emit({ kind: 'error', where: `applyView:${s.kind}`, error });\n worst = 'degraded';\n }\n }\n }\n const registry = options.anchors?.() ?? null;\n const marks = registry && views ? views.flatMap((v) => Object.entries(v.scroll ?? {})) : [];\n if (registry && marks.length > 0) {\n let last: G9ViewApplied = 'exact';\n const pass = async () => {\n last = 'exact';\n for (const [id, mark] of marks) {\n const spec = registry.scroller(id);\n if (!spec) {\n last = 'degraded';\n continue;\n }\n const applied = await applyScrollMark(registry, spec, mark);\n if (applied === 'degraded') last = 'degraded';\n }\n };\n await pass();\n // A list may still be filling or re-sorting (measured 2026-11-12: a sampling's detail sync rebuilt the samples\n // list right after the restore scrolled it): once the rows stop coming and going, the marks are applied again.\n if (await rowsSettle(registry, scrollSettleMs, scrollSettleMaxMs)) await pass();\n degrade(last);\n }\n if (target.target && registry) {\n // Measured 2026-11-12: a package's sample rows appear after its sheet declared itself — wait for the row.\n await anchorAppears(registry, target.target, targetTimeoutMs);\n const r = await revealAnchor(registry, target.target);\n if (!r.ok) worst = 'degraded';\n }\n return worst;\n }\n\n async function run(\n address: string | G9Address,\n opts: G9GoOptions,\n mode: 'jump' | 'restore',\n walk?: (target: G9Address, open: readonly G9Segment[], keep: number, runId: number) => Promise<void>,\n as?: G9TrailEntry['cause'],\n ): Promise<G9GoResult> {\n if (running) running.cancelled = 'superseded';\n const id = ++runs;\n running = { id, cancelled: null };\n const text = typeof address === 'string' ? address : formatAddress(address);\n busy.set(true);\n const before = cause;\n cause = as ?? (walk ? 'walk' : mode === 'restore' ? 'restore' : 'go');\n emit({ kind: 'go:start', address: text, mode: walk ? 'walk' : mode });\n let result: G9GoResult;\n try {\n const { target, open, keep } = await prepare(address, opts, id);\n if (walk) await walk(target, open, keep, id);\n else {\n for (let k = 0; k < open.length; k++) {\n await openStep(target, keep + k, id);\n emit({ kind: 'go:step', address: text, index: keep + k, segment: open[k] as G9Segment, how: 'opened' });\n }\n }\n const view = await applyViews(target, opts.views);\n result = { ok: true, location: current.get(), view };\n } catch (error) {\n if (error instanceof Stop) result = failure(error.reason, error.at, error.segment, error.message);\n else {\n emit({ kind: 'error', where: 'go', error });\n result = failure('failed', -1, null, String((error as Error)?.message ?? error));\n }\n } finally {\n cause = before;\n if (running?.id === id) {\n running = null;\n busy.set(false);\n }\n }\n emit({ kind: 'go:done', address: text, result });\n return result;\n }\n\n function snapshot(): G9Snapshot {\n const loc = current.get();\n const l = live();\n const views: G9SegmentView[] = loc.segments.map((s) => {\n const p = l.find((x) => sameSegment(x.segment, s));\n let view: Readonly<Record<string, string>> | undefined;\n try {\n view = p ? places.get(p.token)?.declaration.view?.() : undefined;\n } catch {\n view = undefined;\n }\n return view && Object.keys(view).length > 0 ? { view } : {};\n });\n return {\n v: 1,\n address: loc.unique,\n general: loc.general,\n views,\n facts: loc.facts,\n at: now(),\n app: (typeof options.appVersion === 'function' ? options.appVersion() : options.appVersion) ?? '',\n catalogue: catalogue.hash,\n };\n }\n\n /** The scroll marks of every scroller on screen, on the leaf segment (a snapshot with its scroll positions). */\n async function snapshotWithScroll(): Promise<G9Snapshot> {\n const s = snapshot();\n const registry = options.anchors?.() ?? null;\n if (!registry || s.views.length === 0) return s;\n const scroll: Record<string, G9ScrollMark> = {};\n const ids = new Set<string>();\n for (const a of registry.all()) {\n const sc = registry.scrollerOf(a);\n if (sc) ids.add(sc.id);\n }\n for (const id of ids) {\n const spec = registry.scroller(id);\n if (!spec) continue;\n const box = await measureNode(spec.node());\n if (!box || box.width <= 0 || box.height <= 0) continue;\n const mark = await readScrollMark(registry, spec);\n if (mark.by !== 'start') scroll[id] = mark;\n }\n if (Object.keys(scroll).length === 0) return s;\n const views = s.views.slice();\n const last = views.length - 1;\n views[last] = { ...views[last], scroll };\n return { ...s, views };\n }\n\n function restoreAs(\n s: G9Snapshot,\n opts: G9GoOptions & { readonly maxAgeMs?: number },\n as: G9TrailEntry['cause'],\n ): Promise<G9GoResult> {\n const refusal = snapshotRefusal(s, {\n at: now(),\n catalogue: catalogue.hash,\n maxAgeMs: opts.maxAgeMs ?? Number.POSITIVE_INFINITY,\n });\n if (refusal)\n return Promise.resolve(\n failure(\n refusal === 'catalogue' ? 'bad-address' : 'cancelled',\n -1,\n null,\n `The snapshot is ${refusal === 'catalogue' ? 'from another catalogue' : refusal}.`,\n ),\n );\n const address = s.target ? `${s.address}#${s.target}` : s.address;\n return run(address, { ...opts, source: opts.source ?? 'restore', views: s.views }, 'restore', undefined, as);\n }\n\n const router: G9Router = {\n catalogue,\n current,\n history,\n busy,\n where: () => current.get(),\n declare(declaration): G9PlaceHandle {\n const token = ++tokens;\n places.set(token, { token, declaration, at: now() });\n if (declaration.layer === 'sheet') lastSheetAt = now();\n compute();\n return {\n token,\n touch: () => {\n if (places.has(token)) compute();\n },\n remove: () => {\n if (places.delete(token)) compute();\n },\n };\n },\n go: (address, opts = {}) => run(address, opts, 'jump'),\n walk(address, opts = {}) {\n const steps = store<readonly G9WalkStep[]>([]);\n const by = opts.by ?? 'user';\n let cancelledByCaller = false;\n const setStep = (index: number, state: G9WalkStep['state']) =>\n steps.set(steps.get().map((s) => (s.index === index ? { ...s, state } : s)));\n const result = run(address, opts, 'jump', async (target, open, keep, runId) => {\n const ctx = options.context();\n steps.set(\n open.map((segment, k) => ({\n index: keep + k,\n segment,\n title: catalogue.title(segment, ctx, options.language()),\n state: 'pending',\n })),\n );\n for (let k = 0; k < open.length; k++) {\n const index = keep + k;\n const s = open[k] as G9Segment;\n if (cancelledByCaller) throw new Stop('cancelled', index, s, texts.cancelled());\n setStep(index, 'current');\n const def = catalogue.def(s.kind);\n let entry: G9Entry | null = null;\n try {\n entry = (await def?.entry?.(s, target.segments.slice(0, index + 1), ctx)) ?? null;\n } catch (error) {\n emit({ kind: 'error', where: `entry:${s.kind}`, error });\n }\n const registry = options.anchors?.() ?? null;\n let walked = false;\n if (entry && registry) {\n if (entry.prepare) {\n if (entry.prepareText) opts.presenter?.note?.(entry.prepareText);\n try {\n await entry.prepare();\n } catch (error) {\n emit({ kind: 'error', where: `prepare:${s.kind}`, error });\n }\n }\n await sheetGap();\n const shown = await revealAnchor(registry, entry.anchor, { smooth: true });\n if (shown.ok && shown.anchor) {\n const title = catalogue.title(s, ctx, options.language());\n const view = opts.presenter?.show({\n anchor: entry.anchor,\n text: title,\n gesture: entry.gesture ?? 'tap',\n index: k,\n count: open.length,\n });\n try {\n if (by === 'demo') {\n await sleep(opts.demoDelayMs ?? 900);\n // Pressed, not awaited: a press that opens a popup and waits on the person must not hold the walk.\n const press = shown.anchor.info().capabilities?.activate;\n void Promise.resolve()\n .then(() => press?.())\n .catch((error: unknown) => emit({ kind: 'error', where: `activate:${s.kind}`, error }));\n }\n walked = await waitFor(\n () => !!liveWith(s),\n opts.stepTimeoutMs ?? (by === 'demo' ? 8000 : 60000),\n runId,\n );\n } finally {\n view?.hide();\n }\n if (!walked) {\n if (cancelledByCaller || running?.id !== runId || running?.cancelled)\n throw new Stop('cancelled', index, s, texts.cancelled());\n setStep(index, 'failed');\n throw new Stop('timeout', index, s, texts.timeout(title));\n }\n }\n }\n if (!walked) {\n opts.presenter?.note?.(texts.jumped(catalogue.title(s, ctx, options.language())));\n await openStep(target, index, runId);\n setStep(index, 'jumped');\n } else setStep(index, 'done');\n emit({\n kind: 'go:step',\n address: formatAddress(target),\n index,\n segment: s,\n how: walked ? 'walked' : 'jumped',\n });\n }\n });\n return {\n steps,\n result,\n cancel() {\n cancelledByCaller = true;\n if (running) running.cancelled = 'cancelled';\n for (const w of Array.from(waiters)) w();\n },\n };\n },\n snapshot,\n snapshotWithScroll,\n restore: (s, opts = {}) => restoreAs(s, opts, 'restore'),\n async excursion(address, opts = {}) {\n const origin = await snapshotWithScroll();\n const result = await run(address, opts, 'jump');\n return {\n origin,\n result,\n back: async () => {\n return await restoreAs(origin, { source: opts.source ?? 'user' }, 'back');\n },\n };\n },\n placeAt(index) {\n const l = live();\n const path = resolvePath(l, catalogue);\n const t = path.tokens[index];\n return t === null || t === undefined ? null : (places.get(t)?.declaration ?? null);\n },\n reset() {\n if (running) running.cancelled = 'session-ended';\n for (const w of Array.from(waiters)) w();\n history.set([]);\n },\n };\n return router;\n}\n\n/** The layers a declaration may use (re-exported for places outside the controls). */\nexport type { G9PlaceLayer };\n"],"names":["DEFAULT_TEXTS","t","isG9Router","sink","store","initial","value","listeners","Set","v","Object","l","Array","Stop","Error","reason","at","segment","message","sleep","ms","Promise","r","g9RuntimeTimers","createG9Router","options","_options_now","_options_sheetGapMs","_options_closeTimeoutMs","_options_targetTimeoutMs","_options_scrollSettleMs","_options_scrollSettleMaxMs","_options_historySize","catalogue","now","Date","texts","sheetGapMs","closeTimeoutMs","targetTimeoutMs","scrollSettleMs","scrollSettleMaxMs","historySize","places","Map","tokens","revision","lastSheetAt","Number","cause","running","runs","waiters","emit","event","segmentOf","p","s","toSegment","error","isShown","_p_declaration","live","out","_p_declaration_order","_p_declaration_under","titleOf","token","_places_get","decl","undefined","empty","current","history","busy","compute","path","resolvePath","unique","formatAddress","titles","i","_path_tokens_i","byToken","others","_byToken_get","generalOf","facts","ordered","_places_get_declaration","prev","same","JSON","next","trail","w","waitFor","predicate","timeoutMs","runId","resolve","done","finish","ok","check","timer","rowsSettle","registry","quietMs","maxMs","changed","quiet","off","cap","arm","anchorAppears","id","liveWith","_live_find","sameSegment","parse","address","tryParseAddress","failure","prepare","opts","_parsed_segments_checked_at","parsed","checked","target","ctx","_verdict_message","def","verdict","String","plan","planNavigation","_catalogue_def","_segmentOf","_leave_message","leave","seg","title","agreed","_segmentOf1","gone","sheetGap","wait","openStep","index","_failed_error","refused","wake","result","opened","failed","currentView","sameView","a","b","ka","k","applyViews","views","worst","degrade","_s_params","_views_i","x","view","marks","_v_scroll","last","pass","mark","spec","applied","applyScrollMark","revealAnchor","run","mode","walk","as","text","before","open","keep","snapshot","_ref","loc","snapshotWithScroll","scroll","ids","sc","box","measureNode","readScrollMark","restoreAs","_opts_maxAgeMs","_opts_source","refusal","snapshotRefusal","router","declaration","_opts_by","steps","by","cancelledByCaller","setStep","state","entry","_ref1","walked","_opts_presenter","shown","_entry_gesture","_opts_presenter1","_opts_stepTimeoutMs","_opts_demoDelayMs","_shown_anchor_info_capabilities","press","_opts_presenter2","origin"],"mappings":";;;;;;;;;;;;;AA2MA,MAAMA,gBAA+B;IACnC,UAAU,CAACC,IAAM,CAAC,CAAC,EAAEA,EAAE,wBAAwB,CAAC;IAChD,SAAS,CAACA,IAAM,CAAC,CAAC,EAAEA,EAAE,uBAAuB,CAAC;IAC9C,SAAS,CAACA,IAAM,CAAC,CAAC,EAAEA,EAAE,uBAAuB,CAAC;IAC9C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AS5F;wBACT,KAAK2J,SAAS,WAAW;oBAC3B;gBACF;YACF;YACA,OAAO;gBACLP;gBACApD;gBACA;oBACEsD,oBAAoB;oBACpB,IAAI7J,SAASA,QAAQ,SAAS,GAAG;oBACjC,KAAK,MAAM6C,KAAKnF,MAAM,IAAI,CAACwC,SAAU2C;gBACvC;YACF;QACF;QACA4F;QACAG;QACA,SAAS,CAACrI,GAAGoE,OAAO,CAAC,CAAC,GAAKwE,UAAU5I,GAAGoE,MAAM;QAC9C,MAAM,WAAUJ,OAAO,EAAEI,OAAO,CAAC,CAAC;YAChC,MAAMiG,SAAS,MAAMhC;YACrB,MAAMrC,SAAS,MAAM0B,IAAI1D,SAASI,MAAM;YACxC,OAAO;gBACLiG;gBACArE;gBACA,MAAM;wBACqC8C;oBAAzC,OAAO,MAAMF,UAAUyB,QAAQ;wBAAE,QAAQ,QAAAvB,CAAAA,eAAAA,KAAK,MAAM,AAAD,IAAVA,eAAe;oBAAO,GAAG;gBACpE;YACF;QACF;QACA,SAAQlD,KAAK;;gBAIoCjF;YAH/C,MAAMzD,IAAImD;YACV,MAAMc,OAAOC,YAAYlE,GAAGsB;YAC5B,MAAMhC,IAAI2E,KAAK,MAAM,CAACyE,MAAM;YAC5B,OAAOpJ,QAAAA,IAAgC,OAAO,QAAC,QAAR,QAAQmE,CAAAA,cAAAA,OAAO,GAAG,CAACnE,EAAC,IAAZmE,KAAAA,IAAAA,YAAe,WAAW,AAAD,IAAC,OAAI;QAC/E;QACA;YACE,IAAIlB,SAASA,QAAQ,SAAS,GAAG;YACjC,KAAK,MAAM6C,KAAKnF,MAAM,IAAI,CAACwC,SAAU2C;YACrCtB,QAAQ,GAAG,CAAC,EAAE;QAChB;IACF;IACA,OAAOiI;AACT"}
@@ -1,5 +1,6 @@
1
1
  export type { G9SelectionItem } from '../base/selection-item.js';
2
2
  export { createSelectionModel, foldSearchText, type G9SelectionMode, type G9SelectionModel, type G9SelectionModelOptions, } from './model.js';
3
- export { estimateSelectionHeight, type G9ListSheetRequest, type G9SelectionSheetRequest, type G9SelectionSheetResult, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, selectionIdentities, showListSheet, showSelectionSheet, } from './selection-sheet.js';
3
+ export { estimateSelectionHeight, type G9ListSheetRequest, type G9SelectionSheetRequest, type G9SelectionSheetResult, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, g9SelectionSkeletonRowCap, selectionIdentities, showListSheet, showSelectionSheet, } from './selection-sheet.js';
4
4
  export { type G9SelectionModelHookOptions, useSelectionModel } from './use-selection-model.js';
5
+ export { computeSelectionWindow, type G9SelectionWindow, g9SelectionGrowThreshold, g9SelectionMaxRenderedRows, g9SelectionRowPageSize, nextSelectionLimit, } from './window.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selection/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,8BAA8B,EAC9B,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,aAAa,EACb,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selection/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,uBAAuB,EACvB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,8BAA8B,EAC9B,oBAAoB,EACpB,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EACL,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,UAAU,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { createSelectionModel, foldSearchText } from "./model.jsx";
2
- export { estimateSelectionHeight, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, selectionIdentities, showListSheet, showSelectionSheet } from "./selection-sheet.jsx";
2
+ export { estimateSelectionHeight, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, g9SelectionSkeletonRowCap, selectionIdentities, showListSheet, showSelectionSheet } from "./selection-sheet.jsx";
3
3
  export { useSelectionModel } from "./use-selection-model.jsx";
4
+ export { computeSelectionWindow, g9SelectionGrowThreshold, g9SelectionMaxRenderedRows, g9SelectionRowPageSize, nextSelectionLimit } from "./window.jsx";
@@ -1,6 +1,6 @@
1
1
  import './selection.css';
2
2
  import { type G9TextInputDirection } from '@g9tm/lynxcontrols-foundation';
3
- import type { G9SelectionItem } from '../base/selection-item.js';
3
+ import { type G9SelectionItem } from '../base/selection-item.js';
4
4
  import { type G9SheetOptions } from '../sheet/options.js';
5
5
  import type { G9SheetService } from '../sheet/service.js';
6
6
  /** MAUI `G9SelectionSheet.EagerBuildItemLimit`: lists up to 40 items are built at once; longer lists defer. */
@@ -53,6 +53,8 @@ export interface G9SelectionSheetRequest<T extends G9SelectionItem> {
53
53
  /** Extra sheet options (merged over the defaults). */
54
54
  readonly options?: G9SheetOptions;
55
55
  }
56
+ /** Placeholder rows: no more than the tallest selection sheet can show (MAUI 1.4.8 `SkeletonRowCap`). */
57
+ export declare const g9SelectionSkeletonRowCap: number;
56
58
  /**
57
59
  * Shows the selection sheet (MAUI `G9SelectionSheet.ShowForResultAsync`): a fit sheet with a header (title near the
58
60
  * close button), optional search (150 ms debounce, text match, hidden selected rows stay selected), rows with icon or
@@ -1 +1 @@
1
- {"version":3,"file":"selection-sheet.d.ts","sourceRoot":"","sources":["../../src/selection/selection-sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAA4B,KAAK,oBAAoB,EAAa,MAAM,+BAA+B,CAAC;AAI/G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQ9D,OAAO,EAAiE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,+GAA+G;AAC/G,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,4DAA4D;AAC5D,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,wEAAwE;AACxE,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IACjF,sFAAsF;IACtF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,kGAAkG;IAClG,QAAQ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kB,CAAC,CAAC,CAAC,GAC7B,OAAO,CAAC,CAAC,EAAE,CAAC,CAiEd"}
@@ -1,8 +1,9 @@
1
1
  import "./selection.css";
2
- import { G9StringKey, formatColor, withAlpha } from "@g9tm/lynxcontrols-foundation";
2
+ import { G9Metrics, G9StringKey, formatColor, withAlpha } from "@g9tm/lynxcontrols-foundation";
3
3
  import { useEffect, useRef, useState, useSyncExternalStore } from "@lynx-js/react";
4
4
  import { g9ChildId, g9RowStyle, g9TextStart } from "../base/control.jsx";
5
5
  import { useG9Press } from "../base/press.jsx";
6
+ import { isAvatarImage } from "../base/selection-item.jsx";
6
7
  import { startTimer, stopTimer } from "../base/timers.jsx";
7
8
  import { G9Button } from "../button/button.jsx";
8
9
  import { G9SearchEntry } from "../fields/search-entry.jsx";
@@ -12,6 +13,7 @@ import { G9Swatch } from "../icon/swatch.jsx";
12
13
  import { useG9Direction, useG9Settings, useG9Strings, useG9Theme } from "../provider/hooks.jsx";
13
14
  import { fitToContentSheetOptions, fullScreenWithoutHandleSheetOptions } from "../sheet/options.jsx";
14
15
  import { createSelectionModel } from "./model.jsx";
16
+ import { computeSelectionWindow, g9SelectionGrowThreshold, g9SelectionRowPageSize, nextSelectionLimit } from "./window.jsx";
15
17
  const g9SelectionEagerBuildItemLimit = 40;
16
18
  const g9SelectionRowHeight = 52;
17
19
  const g9SelectionSearchDebounceMs = 150;
@@ -31,6 +33,7 @@ function estimateSelectionHeight(count, showSearch) {
31
33
  const chrome = (showSearch ? 64 : 0) + 18;
32
34
  return Math.min(520, Math.max(2 * g9SelectionRowHeight + chrome, count * g9SelectionRowHeight + chrome));
33
35
  }
36
+ const g9SelectionSkeletonRowCap = Math.ceil(G9Metrics.SelectionMaxHeight / G9Metrics.SelectionRowHeight) + 1;
34
37
  function SelectionRow(props) {
35
38
  var _item_iconTintColor;
36
39
  var _item_swatchFirstColor, _item_swatchSecondColor;
@@ -49,6 +52,8 @@ function SelectionRow(props) {
49
52
  image: item.iconImage
50
53
  };
51
54
  const iconColor = null != (_item_iconTintColor = item.iconTintColor) ? _item_iconTintColor : selected ? palette.Primary : palette.TextSecondary;
55
+ const avatar = isAvatarImage(item);
56
+ const iconSize = avatar ? G9Metrics.SelectionAvatarSize : G9Metrics.SelectionIconSize;
52
57
  return <view {...props.elementId ? {
53
58
  id: props.elementId
54
59
  } : {}} className={`g9-selection-row${selected ? ' g9-selection-row--selected' : ''}`} style={selected ? {
@@ -62,7 +67,9 @@ function SelectionRow(props) {
62
67
  opacity: 0.45
63
68
  } : {}
64
69
  }}>
65
- {hasIconSlot(icon) ? <G9IconSlot {...icon} size={18} color={iconColor}/> : (null == (_item_swatchFirstColor = item.swatchFirstColor) ? void 0 : _item_swatchFirstColor.trim()) || (null == (_item_swatchSecondColor = item.swatchSecondColor) ? void 0 : _item_swatchSecondColor.trim()) ? <G9Swatch first={item.swatchFirstColor} second={item.swatchSecondColor} direction={props.direction}/> : <view className="g9-selection-row__icon-gap"/>}
70
+ {hasIconSlot(icon) ? <G9IconSlot {...icon} size={iconSize} color={iconColor} {...avatar ? {
71
+ imageCornerRadius: iconSize / 2
72
+ } : {}}/> : (null == (_item_swatchFirstColor = item.swatchFirstColor) ? void 0 : _item_swatchFirstColor.trim()) || (null == (_item_swatchSecondColor = item.swatchSecondColor) ? void 0 : _item_swatchSecondColor.trim()) ? <G9Swatch first={item.swatchFirstColor} second={item.swatchSecondColor} direction={props.direction}/> : <view className="g9-selection-row__icon-gap"/>}
66
73
  <text className="g9-selection-row__text" text-maxline="1" style={{
67
74
  color: selected ? palette.Primary : palette.TextPrimary,
68
75
  fontWeight: selected ? 'bold' : 'normal',
@@ -93,6 +100,32 @@ function SelectionBody(props) {
93
100
  }, []);
94
101
  const visible = request.showSearch ? model.withItems(request.items).filter(applied) : request.items;
95
102
  const visibleIds = new Set(visible.map((item)=>ids[request.items.indexOf(item)]));
103
+ const [grown, setGrown] = useState({
104
+ query: applied,
105
+ limit: g9SelectionRowPageSize
106
+ });
107
+ const limit = grown.query === applied ? grown.limit : g9SelectionRowPageSize;
108
+ const shown = computeSelectionWindow(request.items.length, (i)=>visibleIds.has(ids[i]), (i)=>model.isSelected(ids[i]), limit);
109
+ const latest = useRef({
110
+ applied,
111
+ limit,
112
+ hidden: shown.hidden
113
+ });
114
+ latest.current = {
115
+ applied,
116
+ limit,
117
+ hidden: shown.hidden
118
+ };
119
+ useEffect(()=>props.scrolledToEnd.subscribe(()=>{
120
+ const now = latest.current;
121
+ const next = nextSelectionLimit(now.limit, now.hidden);
122
+ if (next !== now.limit) setGrown({
123
+ query: now.applied,
124
+ limit: next
125
+ });
126
+ }), [
127
+ props.scrolledToEnd
128
+ ]);
96
129
  const dir = 'leftToRight' === request.itemTextDirection ? 'ltr' : 'rightToLeft' === request.itemTextDirection ? 'rtl' : parentDir;
97
130
  const multiple = true === request.allowMultiple;
98
131
  const onQuery = (value)=>{
@@ -116,15 +149,16 @@ function SelectionBody(props) {
116
149
  {request.showSearch ? <view className="g9-selection__search">
117
150
  <G9TextEntry placeholder={strings.get(G9StringKey.Search)} leadingIcon="search" value={query} onValueChange={onQuery}/>
118
151
  </view> : null}
119
- {visible.length > 0 ? <view className="g9-selection__items">
120
- {request.items.map((item, i)=>{
152
+ {shown.indices.length > 0 ? <view className="g9-selection__items">
153
+ {shown.indices.map((i)=>{
121
154
  var _item_key;
122
155
  var _request_options;
123
156
  const id = ids[i];
124
- if (!visibleIds.has(id)) return null;
157
+ const item = request.items[i];
125
158
  return <SelectionRow key={id} item={item} elementId={g9ChildId(null == (_request_options = request.options) ? void 0 : _request_options.automationId, `Item_${null != (_item_key = item.key) ? _item_key : i}`)} selected={model.isSelected(id)} direction={dir} onTap={()=>tap(id)}/>;
126
159
  })}
127
160
  </view> : null}
161
+ {shown.hidden > 0 ? <text className="g9-selection__more">{strings.format(G9StringKey.MoreResultsFormat, shown.hidden)}</text> : null}
128
162
  {0 === visible.length ? <text className="g9-selection__empty">{null != (_request_emptyText = request.emptyText) ? _request_emptyText : strings.get(G9StringKey.NoResults)}</text> : null}
129
163
  </view>;
130
164
  }
@@ -194,7 +228,16 @@ function showSelectionSheet(sheets, request) {
194
228
  null == handle || handle.close();
195
229
  };
196
230
  const reset = request.resetSelection && request.resetSelection.length > 0 ? request.resetSelection : null;
197
- const body = ()=><SelectionBody request={request} ids={ids} initial={initial} done={done} onDraft={(m)=>{
231
+ const endListeners = new Set();
232
+ const scrolledToEnd = {
233
+ subscribe: (l)=>{
234
+ endListeners.add(l);
235
+ return ()=>{
236
+ endListeners.delete(l);
237
+ };
238
+ }
239
+ };
240
+ const body = ()=><SelectionBody request={request} ids={ids} initial={initial} done={done} scrolledToEnd={scrolledToEnd} onDraft={(m)=>{
198
241
  draft = m;
199
242
  for (const l of [
200
243
  ...draftListeners
@@ -205,7 +248,13 @@ function showSelectionSheet(sheets, request) {
205
248
  deferContent: items.length > g9SelectionEagerBuildItemLimit,
206
249
  deferredLoadingPlaceholderHeight: estimateSelectionHeight(items.length, true === request.showSearch),
207
250
  loadingSkeleton: 'listRows',
208
- loadingSkeletonRowCount: items.length,
251
+ loadingSkeletonRowCount: Math.min(items.length, g9SelectionSkeletonRowCap),
252
+ onScrollToEnd: ()=>{
253
+ for (const l of [
254
+ ...endListeners
255
+ ])l();
256
+ },
257
+ scrollToEndThreshold: g9SelectionGrowThreshold,
209
258
  backgroundColor: 'var(--g9-surface)',
210
259
  showToolbar: true,
211
260
  showCloseButton: true,
@@ -367,6 +416,6 @@ function ListPickerRow(props) {
367
416
  </text>
368
417
  </view>;
369
418
  }
370
- export { estimateSelectionHeight, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, selectionIdentities, showListSheet, showSelectionSheet };
419
+ export { estimateSelectionHeight, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, g9SelectionSkeletonRowCap, selectionIdentities, showListSheet, showSelectionSheet };
371
420
 
372
421
  //# sourceMappingURL=selection-sheet.jsx.map
@@ -1 +1 @@
1
- {"version":3,"file":"selection/selection-sheet.jsx","sources":["../../src/selection/selection-sheet.tsx"],"sourcesContent":["import './selection.css';\nimport { formatColor, G9StringKey, type G9TextInputDirection, withAlpha } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useRef, useState, useSyncExternalStore } from '@lynx-js/react';\nimport { g9ChildId, g9RowStyle, g9TextStart } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport type { G9SelectionItem } from '../base/selection-item';\nimport { type G9TimerHandle, startTimer, stopTimer } from '../base/timers';\nimport { G9Button } from '../button/button';\nimport { G9SearchEntry } from '../fields/search-entry';\nimport { G9TextEntry } from '../fields/text-entry';\nimport { G9IconSlot, hasIconSlot } from '../icon/slot';\nimport { G9Swatch } from '../icon/swatch';\nimport { useG9Direction, useG9Settings, useG9Strings, useG9Theme } from '../provider/hooks';\nimport { fitToContentSheetOptions, fullScreenWithoutHandleSheetOptions, type G9SheetOptions } from '../sheet/options';\nimport type { G9SheetService } from '../sheet/service';\nimport type { G9SheetHandle } from '../sheet/stack';\nimport { createSelectionModel, type G9SelectionModel } from './model';\n\n/** MAUI `G9SelectionSheet.EagerBuildItemLimit`: lists up to 40 items are built at once; longer lists defer. */\nexport const g9SelectionEagerBuildItemLimit = 40;\n/** Row height of the selection sheet (MAUI 52). */\nexport const g9SelectionRowHeight = 52;\n/** Search debounce of the selection sheet (MAUI 150 ms). */\nexport const g9SelectionSearchDebounceMs = 150;\n/** Wait after a close-on-select pick before closing (MAUI 120 ms). */\nexport const g9SelectionCloseDelayMs = 120;\n\n/** The outcome of a selection sheet (MAUI `G9SelectionSheetResult`). */\nexport interface G9SelectionSheetResult<T extends G9SelectionItem = G9SelectionItem> {\n /** A pick on a close-on-select sheet, Done, or Reset; `false` for every dismissal. */\n readonly wasAccepted: boolean;\n /** The selection differs from the opening one. */\n readonly selectionChanged: boolean;\n /** The final selection (opening items that are not listed or disabled stay unless deselected). */\n readonly items: ReadonlyArray<T>;\n}\n\n/**\n * The selection identity of an item inside one list (MAUI `G9SelectionSheet.KeyOf`): `k:<key>` when the key is set,\n * else `t:<text>` when the text is unique among key-less items, else the position (`i:<n>`). Keys and texts never\n * match each other.\n */\nexport function selectionIdentities(items: ReadonlyArray<G9SelectionItem>): string[] {\n const counts = new Map<string, number>();\n for (const item of items) {\n if (item.key == null || item.key.trim() === '') counts.set(item.text, (counts.get(item.text) ?? 0) + 1);\n }\n return items.map((item, i) =>\n item.key != null && item.key.trim() !== ''\n ? `k:${item.key}`\n : (counts.get(item.text) ?? 0) > 1\n ? `i:${i}`\n : `t:${item.text}`,\n );\n}\n\n/** Estimated body height (MAUI `EstimateContentHeight`): rows × 52 + chrome, clamped to [2 rows + chrome, 520]. */\nexport function estimateSelectionHeight(count: number, showSearch: boolean): number {\n const chrome = (showSearch ? 64 : 0) + 18;\n return Math.min(520, Math.max(2 * g9SelectionRowHeight + chrome, count * g9SelectionRowHeight + chrome));\n}\n\n/** Arguments of {@link showSelectionSheet} (MAUI `ShowForResultAsync`). */\nexport interface G9SelectionSheetRequest<T extends G9SelectionItem> {\n readonly title: string;\n readonly items: ReadonlyArray<T>;\n readonly selectedItems?: ReadonlyArray<T>;\n readonly allowMultiple?: boolean;\n /** Single mode: a pick completes and closes after 120 ms. Default true. */\n readonly closeOnSingleSelection?: boolean;\n readonly showSearch?: boolean;\n /** No-results text. Default the `noResults` string. */\n readonly emptyText?: string | null;\n /** Row text direction. Default `'matchParent'`. */\n readonly itemTextDirection?: G9TextInputDirection;\n /** A non-empty reset selection adds a Reset toolbar item that completes with it. */\n readonly resetSelection?: ReadonlyArray<T> | null;\n /** Count pill label (multi). Default `\"{n} {selected}\"`. */\n readonly countLabel?: (count: number) => string;\n /**\n * Multi: Done stays disabled until at least this many items are ticked (MAUI `minimumSelected`, G9MAUIControls 1.4.7) —\n * the sheet never closes on an answer the caller would refuse and reopen. Default 0.\n */\n readonly minimumSelected?: number;\n /** Extra sheet options (merged over the defaults). */\n readonly options?: G9SheetOptions;\n}\n\ninterface BodyProps<T extends G9SelectionItem> {\n readonly request: G9SelectionSheetRequest<T>;\n readonly ids: ReadonlyArray<string>;\n readonly initial: G9SelectionModel<T>;\n readonly onComplete: (keys: ReadonlyArray<string>, accepted: boolean) => void;\n readonly onDraft: (model: G9SelectionModel<T>) => void;\n readonly done: { current: boolean };\n}\n\nfunction SelectionRow(props: {\n readonly item: G9SelectionItem;\n /** Element id (`${sheet automationId}_Item_${key}`), so automation finds the row like a person sees it. */\n readonly elementId?: string | undefined;\n readonly selected: boolean;\n readonly direction: 'ltr' | 'rtl';\n readonly onTap: () => void;\n}): ReactNode {\n const palette = useG9Theme().palette;\n const glyphs = useG9Settings().glyphs;\n const { item, selected } = props;\n const press = useG9Press(props.onTap, { blocked: item.isEnabled === false, source: 'G9SelectionSheet', guardMs: 0 });\n const icon = { emoji: item.emoji, icon: item.icon, imagePath: item.iconPath, image: item.iconImage };\n const iconColor = item.iconTintColor ?? (selected ? palette.Primary : palette.TextSecondary);\n return (\n <view\n {...(props.elementId ? { id: props.elementId } : {})}\n className={`g9-selection-row${selected ? ' g9-selection-row--selected' : ''}`}\n style={selected ? { backgroundColor: formatColor(withAlpha(palette.Primary, 0.1)) } : {}}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={item.text}\n {...(selected ? { 'accessibility-value': 'selected' } : {})}\n bindtap={press}\n >\n <view\n className={`g9-selection-row__inner g9-dir-${props.direction}`}\n style={{ ...g9RowStyle(props.direction), ...(item.isEnabled === false ? { opacity: 0.45 } : {}) }}\n >\n {hasIconSlot(icon) ? (\n <G9IconSlot {...icon} size={18} color={iconColor} />\n ) : item.swatchFirstColor?.trim() || item.swatchSecondColor?.trim() ? (\n <G9Swatch first={item.swatchFirstColor} second={item.swatchSecondColor} direction={props.direction} />\n ) : (\n // MAUI's row is a Grid of ColumnSpacing 12 whose icon column stays when empty: its spacing still sits before\n // the text, so an icon-less row's text starts 16 + 12 dp in, level with nothing but the same in every picker.\n <view className=\"g9-selection-row__icon-gap\" />\n )}\n <text\n className=\"g9-selection-row__text\"\n text-maxline=\"1\"\n style={{\n color: selected ? palette.Primary : palette.TextPrimary,\n fontWeight: selected ? 'bold' : 'normal',\n ...g9TextStart(props.direction),\n }}\n >\n {item.text}\n </text>\n <view style={{ opacity: selected ? 1 : 0 }}>\n <G9IconSlot icon={glyphs.check} size={18} color={palette.Primary} />\n </view>\n </view>\n </view>\n );\n}\n\nfunction SelectionBody<T extends G9SelectionItem>(props: BodyProps<T>): ReactNode {\n const strings = useG9Strings();\n const parentDir = useG9Direction();\n const { request, ids } = props;\n const [model, setModel] = useState(props.initial);\n const [query, setQuery] = useState('');\n const [applied, setApplied] = useState('');\n const timer = useRef<G9TimerHandle | null>(null);\n const picking = useRef(false);\n useEffect(\n () => () => {\n if (timer.current !== null) stopTimer(timer.current);\n },\n [],\n );\n const visible = request.showSearch ? model.withItems(request.items).filter(applied) : request.items;\n const visibleIds = new Set(visible.map((item) => ids[request.items.indexOf(item)]));\n const dir =\n request.itemTextDirection === 'leftToRight'\n ? 'ltr'\n : request.itemTextDirection === 'rightToLeft'\n ? 'rtl'\n : parentDir;\n const multiple = request.allowMultiple === true;\n const onQuery = (value: string) => {\n setQuery(value);\n if (timer.current !== null) stopTimer(timer.current);\n if (value.trim() === '') {\n setApplied(value);\n return;\n }\n timer.current = startTimer(() => setApplied(value), g9SelectionSearchDebounceMs);\n };\n const tap = (id: string) => {\n if (props.done.current || picking.current) return;\n const next = model.toggle(id);\n if (next === model) return;\n setModel(next);\n props.onDraft(next);\n if (!multiple && request.closeOnSingleSelection !== false) {\n picking.current = true;\n startTimer(() => props.onComplete(next.selectedKeys, true), g9SelectionCloseDelayMs);\n }\n };\n return (\n <view className=\"g9-selection\">\n {request.showSearch ? (\n <view className=\"g9-selection__search\">\n <G9TextEntry\n placeholder={strings.get(G9StringKey.Search)}\n leadingIcon=\"search\"\n value={query}\n onValueChange={onQuery}\n />\n </view>\n ) : null}\n {visible.length > 0 ? (\n <view className=\"g9-selection__items\">\n {request.items.map((item, i) => {\n const id = ids[i] as string;\n if (!visibleIds.has(id)) return null;\n return (\n <SelectionRow\n key={id}\n item={item}\n elementId={g9ChildId(request.options?.automationId, `Item_${item.key ?? i}`)}\n selected={model.isSelected(id)}\n direction={dir}\n onTap={() => tap(id)}\n />\n );\n })}\n </view>\n ) : null}\n {visible.length === 0 ? (\n <text className=\"g9-selection__empty\">{request.emptyText ?? strings.get(G9StringKey.NoResults)}</text>\n ) : null}\n </view>\n );\n}\n\n/**\n * Shows the selection sheet (MAUI `G9SelectionSheet.ShowForResultAsync`): a fit sheet with a header (title near the\n * close button), optional search (150 ms debounce, text match, hidden selected rows stay selected), rows with icon or\n * swatch, check mark and selection tint. Single mode with `closeOnSingleSelection` completes on a pick; multi mode\n * shows a count pill and Done; a reset selection adds Reset. Any dismissal resolves `wasAccepted: false` with the\n * current draft (or the opening selection when the sheet never built).\n */\nexport function showSelectionSheet<T extends G9SelectionItem>(\n sheets: G9SheetService,\n request: G9SelectionSheetRequest<T>,\n): Promise<G9SelectionSheetResult<T>> {\n const items = [...request.items];\n const ids = selectionIdentities(items);\n const opening = request.selectedItems ?? [];\n // Opening items match listed items by identity; the rest are kept as \"not listed\".\n const openingIds = selectionIdentities([...items, ...opening]).slice(items.length);\n const listedIds = new Set(ids);\n const initialKeys = openingIds.filter((id) => listedIds.has(id));\n const unlisted = opening.filter((_, i) => !listedIds.has(openingIds[i] as string));\n const multiple = request.allowMultiple === true;\n const initial = createSelectionModel<T>({\n items,\n getKey: (item) => ids[items.indexOf(item)] as string,\n getText: (item) => item.text,\n mode: multiple ? 'multiple' : 'single',\n selectedKeys: initialKeys,\n isEnabled: (item) => item.isEnabled !== false,\n });\n return new Promise((resolve) => {\n let draft = initial;\n const draftListeners = new Set<() => void>();\n const draftStore = {\n subscribe: (l: () => void) => {\n draftListeners.add(l);\n return () => {\n draftListeners.delete(l);\n };\n },\n count: () => draft.selectedKeys.length,\n };\n let settled = false;\n const done = { current: false };\n const startKeys = new Set(initialKeys);\n const collect = (keys: ReadonlyArray<string>): T[] => {\n const set = new Set(keys);\n return [...items.filter((_, i) => set.has(ids[i] as string)), ...unlisted];\n };\n const settle = (keys: ReadonlyArray<string>, accepted: boolean, explicit?: ReadonlyArray<T>) => {\n if (settled) return;\n settled = true;\n done.current = true;\n const result = explicit ?? collect(keys);\n const changed = explicit !== undefined || keys.length !== startKeys.size || keys.some((k) => !startKeys.has(k));\n resolve({ wasAccepted: accepted, selectionChanged: changed, items: result });\n };\n let handle: G9SheetHandle | null = null;\n const complete = (keys: ReadonlyArray<string>, accepted: boolean) => {\n settle(keys, accepted);\n handle?.close();\n };\n const reset = request.resetSelection && request.resetSelection.length > 0 ? request.resetSelection : null;\n const body = () => (\n <SelectionBody\n request={request}\n ids={ids}\n initial={initial}\n done={done}\n onDraft={(m) => {\n draft = m;\n for (const l of [...draftListeners]) l();\n }}\n onComplete={complete}\n />\n );\n const options: G9SheetOptions = {\n ...fitToContentSheetOptions(),\n deferContent: items.length > g9SelectionEagerBuildItemLimit,\n deferredLoadingPlaceholderHeight: estimateSelectionHeight(items.length, request.showSearch === true),\n loadingSkeleton: 'listRows',\n loadingSkeletonRowCount: items.length,\n backgroundColor: 'var(--g9-surface)',\n showToolbar: true,\n showCloseButton: true,\n title: request.title,\n headerTitlePlacement: 'nearBack',\n ...(multiple || reset\n ? {\n headerTrailingView: (\n <SelectionHeaderActions\n multiple={multiple}\n draft={draftStore}\n minimum={Math.max(0, request.minimumSelected ?? 0)}\n {...(request.countLabel ? { countLabel: request.countLabel } : {})}\n onDone={() => {\n if (draft.selectedKeys.length >= Math.max(0, request.minimumSelected ?? 0))\n complete(draft.selectedKeys, true);\n }}\n {...(reset\n ? {\n onReset: () => {\n settle([], true, reset);\n handle?.close();\n },\n }\n : {})}\n />\n ),\n }\n : {}),\n ...request.options,\n onClosed: () => {\n request.options?.onClosed?.();\n settle(draft.selectedKeys, false);\n },\n };\n handle = sheets.show(items.length > g9SelectionEagerBuildItemLimit ? body : body(), options);\n if (!handle) settle(initialKeys, false);\n });\n}\n\nfunction SelectionHeaderActions(props: {\n readonly multiple: boolean;\n readonly draft: { subscribe(listener: () => void): () => void; count(): number };\n readonly minimum: number;\n readonly countLabel?: (n: number) => string;\n readonly onDone: () => void;\n readonly onReset?: () => void;\n}): ReactNode {\n const strings = useG9Strings();\n const direction = useG9Direction();\n const n = useSyncExternalStore(props.draft.subscribe, props.draft.count);\n return (\n <view className=\"g9-selection__actions\" style={g9RowStyle(direction)}>\n {props.onReset ? (\n <G9Button text={strings.get(G9StringKey.Reset)} variant=\"text\" size=\"small\" onPress={props.onReset} />\n ) : null}\n {props.multiple && n > 0 ? (\n <view className=\"g9-selection__count\">\n <text className=\"g9-selection__count-text\">\n {props.countLabel ? props.countLabel(n) : `${n} ${strings.get(G9StringKey.Selected)}`}\n </text>\n </view>\n ) : null}\n {props.multiple ? (\n <G9Button\n text={strings.get(G9StringKey.Done)}\n variant=\"text\"\n size=\"small\"\n disabled={n < props.minimum}\n onPress={props.onDone}\n />\n ) : null}\n </view>\n );\n}\n\n/** Arguments of {@link showListSheet} (MAUI `ShowListG9BottomSheetAsync`). */\nexport interface G9ListSheetRequest<T extends G9SelectionItem> {\n readonly title: string;\n readonly items: ReadonlyArray<T>;\n readonly selected?: ReadonlyArray<T>;\n readonly multiple?: boolean;\n /** Default true. */\n readonly closeOnSingleSelection?: boolean;\n /** Shows the search field (250 ms debounce, trimmed) with this placeholder. */\n readonly searchPlaceholder?: string | null;\n /** Default full screen without a handle (MAUI). A fit-to-content `sizeMode` keeps the sheet compact. */\n readonly options?: G9SheetOptions;\n /** Apply button text (multi). Default the `save` string. */\n readonly applyButtonText?: string;\n}\n\n/**\n * The shared list picker (MAUI `ShowListG9BottomSheetAsync` / `G9BottomSheetListPickerModal`): search field with\n * placeholder, rows with a selection tint (no check mark), Apply in multi mode, close-on-select after 120 ms. Resolves\n * with the selection when it completes or closes (no accepted/dismissed distinction, as MAUI); `[]` when throttled.\n */\nexport function showListSheet<T extends G9SelectionItem>(\n sheets: G9SheetService,\n request: G9ListSheetRequest<T>,\n): Promise<T[]> {\n const items = [...request.items];\n const keyOf = (item: G9SelectionItem) => (item.key != null && item.key.trim() !== '' ? item.key : item.text);\n const multiple = request.multiple === true;\n const initial = createSelectionModel<T>({\n items,\n getKey: keyOf,\n getText: (item) => item.text,\n mode: multiple ? 'multiple' : 'single',\n selectedKeys: (request.selected ?? []).map(keyOf),\n isEnabled: (item) => item.isEnabled !== false,\n });\n return new Promise((resolve) => {\n let draft = initial;\n let settled = false;\n let handle: G9SheetHandle | null = null;\n const settle = () => {\n if (settled) return;\n settled = true;\n resolve(draft.selectedItems());\n };\n const complete = () => {\n settle();\n handle?.close();\n };\n const body = () => (\n <ListPickerBody\n request={request}\n initial={initial}\n keyOf={keyOf}\n onDraft={(m) => {\n draft = m;\n }}\n onComplete={complete}\n />\n );\n const base = request.options ?? fullScreenWithoutHandleSheetOptions();\n const fit = base.sizeMode === 'fitToContent';\n const options: G9SheetOptions = {\n ...base,\n ...(fit\n ? {}\n : {\n states: ['large'],\n currentState: 'large',\n hasHandle: false,\n isDraggable: true,\n useFullScreenLoadingPlaceholder: true,\n }),\n showToolbar: true,\n showCloseButton: true,\n title: request.title,\n headerTitlePlacement: 'nearBack',\n deferContent: true,\n onClosed: () => {\n base.onClosed?.();\n settle();\n },\n };\n handle = sheets.show(body, options);\n if (!handle) {\n settled = true;\n resolve([]);\n }\n });\n}\n\nfunction ListPickerBody<T extends G9SelectionItem>(props: {\n readonly request: G9ListSheetRequest<T>;\n readonly initial: G9SelectionModel<T>;\n readonly keyOf: (item: G9SelectionItem) => string;\n readonly onDraft: (model: G9SelectionModel<T>) => void;\n readonly onComplete: () => void;\n}): ReactNode {\n const strings = useG9Strings();\n const palette = useG9Theme().palette;\n const [model, setModel] = useState(props.initial);\n const [query, setQuery] = useState('');\n const picking = useRef(false);\n const { request } = props;\n const visible = model.filter(query, { trim: true });\n const tap = (item: T) => {\n if (picking.current || item.isEnabled === false) return;\n const next = model.toggle(props.keyOf(item));\n setModel(next);\n props.onDraft(next);\n if (!request.multiple && request.closeOnSingleSelection !== false) {\n picking.current = true;\n startTimer(props.onComplete, g9SelectionCloseDelayMs);\n }\n };\n return (\n <view className=\"g9-list-picker\">\n {request.searchPlaceholder ? (\n <view className=\"g9-selection__search\">\n <G9SearchEntry\n placeholder={request.searchPlaceholder}\n voiceEnabled={false}\n onDebouncedValueChange={setQuery}\n />\n </view>\n ) : null}\n {visible.map((item) => (\n <ListPickerRow\n key={props.keyOf(item)}\n item={item}\n selected={model.isSelected(props.keyOf(item))}\n tint={palette.PrimaryContainer}\n onTap={() => tap(item)}\n />\n ))}\n {request.multiple ? (\n <view className=\"g9-list-picker__apply\">\n <G9Button\n text={request.applyButtonText ?? strings.get(G9StringKey.Save)}\n size=\"hero\"\n onPress={props.onComplete}\n />\n </view>\n ) : null}\n </view>\n );\n}\n\nfunction ListPickerRow(props: {\n readonly item: G9SelectionItem;\n readonly selected: boolean;\n readonly tint: string;\n readonly onTap: () => void;\n}): ReactNode {\n const press = useG9Press(props.onTap, {\n source: 'G9ListPicker',\n guardMs: 0,\n blocked: props.item.isEnabled === false,\n });\n const icon = { icon: props.item.icon, imagePath: props.item.iconPath, image: props.item.iconImage };\n const direction = useG9Direction();\n return (\n <view\n className={`g9-list-picker__row${props.selected ? ' g9-list-picker__row--selected' : ''}`}\n style={{ ...g9RowStyle(direction), ...(props.selected ? { backgroundColor: props.tint } : {}) }}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={props.item.text}\n bindtap={press}\n >\n {hasIconSlot(icon) ? <G9IconSlot {...icon} size={20} color=\"var(--g9-on-surface-variant)\" /> : null}\n <text className=\"g9-list-picker__text\" text-maxline=\"1\" style={g9TextStart(direction)}>\n {props.item.text}\n </text>\n </view>\n );\n}\n"],"names":["g9SelectionEagerBuildItemLimit","g9SelectionRowHeight","g9SelectionSearchDebounceMs","g9SelectionCloseDelayMs","selectionIdentities","items","counts","Map","item","_counts_get","i","estimateSelectionHeight","count","showSearch","chrome","Math","SelectionRow","props","_item_iconTintColor","_item_swatchFirstColor","_item_swatchSecondColor","palette","useG9Theme","glyphs","useG9Settings","selected","press","useG9Press","icon","iconColor","view","formatColor","withAlpha","g9RowStyle","hasIconSlot","G9IconSlot","G9Swatch","text","g9TextStart","SelectionBody","_request_emptyText","strings","useG9Strings","parentDir","useG9Direction","request","ids","model","setModel","useState","query","setQuery","applied","setApplied","timer","useRef","picking","useEffect","stopTimer","visible","visibleIds","Set","dir","multiple","onQuery","value","startTimer","tap","id","next","G9TextEntry","G9StringKey","_item_key","_request_options","g9ChildId","showSelectionSheet","sheets","_request_selectedItems","opening","openingIds","listedIds","initialKeys","unlisted","_","initial","createSelectionModel","Promise","resolve","_request_minimumSelected","draft","draftListeners","draftStore","l","settled","done","startKeys","collect","keys","set","settle","accepted","explicit","result","changed","undefined","k","handle","complete","reset","body","m","options","fitToContentSheetOptions","SelectionHeaderActions","direction","n","useSyncExternalStore","G9Button","showListSheet","_request_selected","keyOf","ListPickerBody","base","fullScreenWithoutHandleSheetOptions","fit","_request_applyButtonText","G9SearchEntry","ListPickerRow"],"mappings":";;;;;;;;;;;;;;AAmBO,MAAMA,iCAAiC;AAEvC,MAAMC,uBAAuB;AAE7B,MAAMC,8BAA8B;AAEpC,MAAMC,0BAA0B;AAiBhC,SAASC,oBAAoBC,KAAqC;IACvE,MAAMC,SAAS,IAAIC;IACnB,KAAK,MAAMC,QAAQH,MAAO;YAC+CI;QAAvE,IAAID,AAAY,QAAZA,KAAK,GAAG,IAAYA,AAAoB,OAApBA,KAAK,GAAG,CAAC,IAAI,IAAWF,OAAO,GAAG,CAACE,KAAK,IAAI,EAAE,AAAC,SAAAC,CAAAA,cAAAA,OAAO,GAAG,CAACD,KAAK,IAAI,KAApBC,cAAyB,KAAK;IACvG;IACA,OAAOJ,MAAM,GAAG,CAAC,CAACG,MAAME;YAGjBD;eAF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AQ,GAAG;YAAE,iBAAiBA,MAAM,IAAI;QAAC,IAAI,CAAC,CAAC;IAAE,GAC9F,uBAAuB,MACvB,qBAAqB,SACrB,qBAAqBA,MAAM,IAAI,CAAC,IAAI,EACpC,SAASS,OACV;MACC,CAACQ,YAAYN,SAASO,YAAY,GAAGP,IAAI,EAAE,MAAM,IAAI,MAAM,mCAAoC,KAAK;MACpG,CAACS,KAAK,UAAU,uBAAuB,aAAa,IAAI,OAAOC,YAAY4E,YAAY;QACrF,CAACjG,MAAM,IAAI,CAAC,IAAI,CAAC;MACnB,EAAEoB,KAAK;IACT,EAAEP;AAEN"}
1
+ {"version":3,"file":"selection/selection-sheet.jsx","sources":["../../src/selection/selection-sheet.tsx"],"sourcesContent":["import './selection.css';\nimport {\n formatColor,\n G9Metrics,\n G9StringKey,\n type G9TextInputDirection,\n withAlpha,\n} from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useRef, useState, useSyncExternalStore } from '@lynx-js/react';\nimport { g9ChildId, g9RowStyle, g9TextStart } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { type G9SelectionItem, isAvatarImage } from '../base/selection-item';\nimport { type G9TimerHandle, startTimer, stopTimer } from '../base/timers';\nimport { G9Button } from '../button/button';\nimport { G9SearchEntry } from '../fields/search-entry';\nimport { G9TextEntry } from '../fields/text-entry';\nimport { G9IconSlot, hasIconSlot } from '../icon/slot';\nimport { G9Swatch } from '../icon/swatch';\nimport { useG9Direction, useG9Settings, useG9Strings, useG9Theme } from '../provider/hooks';\nimport { fitToContentSheetOptions, fullScreenWithoutHandleSheetOptions, type G9SheetOptions } from '../sheet/options';\nimport type { G9SheetService } from '../sheet/service';\nimport type { G9SheetHandle } from '../sheet/stack';\nimport { createSelectionModel, type G9SelectionModel } from './model';\nimport { computeSelectionWindow, g9SelectionGrowThreshold, g9SelectionRowPageSize, nextSelectionLimit } from './window';\n\n/** MAUI `G9SelectionSheet.EagerBuildItemLimit`: lists up to 40 items are built at once; longer lists defer. */\nexport const g9SelectionEagerBuildItemLimit = 40;\n/** Row height of the selection sheet (MAUI 52). */\nexport const g9SelectionRowHeight = 52;\n/** Search debounce of the selection sheet (MAUI 150 ms). */\nexport const g9SelectionSearchDebounceMs = 150;\n/** Wait after a close-on-select pick before closing (MAUI 120 ms). */\nexport const g9SelectionCloseDelayMs = 120;\n\n/** The outcome of a selection sheet (MAUI `G9SelectionSheetResult`). */\nexport interface G9SelectionSheetResult<T extends G9SelectionItem = G9SelectionItem> {\n /** A pick on a close-on-select sheet, Done, or Reset; `false` for every dismissal. */\n readonly wasAccepted: boolean;\n /** The selection differs from the opening one. */\n readonly selectionChanged: boolean;\n /** The final selection (opening items that are not listed or disabled stay unless deselected). */\n readonly items: ReadonlyArray<T>;\n}\n\n/**\n * The selection identity of an item inside one list (MAUI `G9SelectionSheet.KeyOf`): `k:<key>` when the key is set,\n * else `t:<text>` when the text is unique among key-less items, else the position (`i:<n>`). Keys and texts never\n * match each other.\n */\nexport function selectionIdentities(items: ReadonlyArray<G9SelectionItem>): string[] {\n const counts = new Map<string, number>();\n for (const item of items) {\n if (item.key == null || item.key.trim() === '') counts.set(item.text, (counts.get(item.text) ?? 0) + 1);\n }\n return items.map((item, i) =>\n item.key != null && item.key.trim() !== ''\n ? `k:${item.key}`\n : (counts.get(item.text) ?? 0) > 1\n ? `i:${i}`\n : `t:${item.text}`,\n );\n}\n\n/** Estimated body height (MAUI `EstimateContentHeight`): rows × 52 + chrome, clamped to [2 rows + chrome, 520]. */\nexport function estimateSelectionHeight(count: number, showSearch: boolean): number {\n const chrome = (showSearch ? 64 : 0) + 18;\n return Math.min(520, Math.max(2 * g9SelectionRowHeight + chrome, count * g9SelectionRowHeight + chrome));\n}\n\n/** Arguments of {@link showSelectionSheet} (MAUI `ShowForResultAsync`). */\nexport interface G9SelectionSheetRequest<T extends G9SelectionItem> {\n readonly title: string;\n readonly items: ReadonlyArray<T>;\n readonly selectedItems?: ReadonlyArray<T>;\n readonly allowMultiple?: boolean;\n /** Single mode: a pick completes and closes after 120 ms. Default true. */\n readonly closeOnSingleSelection?: boolean;\n readonly showSearch?: boolean;\n /** No-results text. Default the `noResults` string. */\n readonly emptyText?: string | null;\n /** Row text direction. Default `'matchParent'`. */\n readonly itemTextDirection?: G9TextInputDirection;\n /** A non-empty reset selection adds a Reset toolbar item that completes with it. */\n readonly resetSelection?: ReadonlyArray<T> | null;\n /** Count pill label (multi). Default `\"{n} {selected}\"`. */\n readonly countLabel?: (count: number) => string;\n /**\n * Multi: Done stays disabled until at least this many items are ticked (MAUI `minimumSelected`, G9MAUIControls 1.4.7) —\n * the sheet never closes on an answer the caller would refuse and reopen. Default 0.\n */\n readonly minimumSelected?: number;\n /** Extra sheet options (merged over the defaults). */\n readonly options?: G9SheetOptions;\n}\n\ninterface BodyProps<T extends G9SelectionItem> {\n readonly request: G9SelectionSheetRequest<T>;\n readonly ids: ReadonlyArray<string>;\n readonly initial: G9SelectionModel<T>;\n readonly onComplete: (keys: ReadonlyArray<string>, accepted: boolean) => void;\n readonly onDraft: (model: G9SelectionModel<T>) => void;\n readonly done: { current: boolean };\n /** The sheet body was scrolled to its end (options.onScrollToEnd): the window grows by a page. */\n readonly scrolledToEnd: { subscribe(listener: () => void): () => void };\n}\n\n/** Placeholder rows: no more than the tallest selection sheet can show (MAUI 1.4.8 `SkeletonRowCap`). */\nexport const g9SelectionSkeletonRowCap = Math.ceil(G9Metrics.SelectionMaxHeight / G9Metrics.SelectionRowHeight) + 1;\n\nfunction SelectionRow(props: {\n readonly item: G9SelectionItem;\n /** Element id (`${sheet automationId}_Item_${key}`), so automation finds the row like a person sees it. */\n readonly elementId?: string | undefined;\n readonly selected: boolean;\n readonly direction: 'ltr' | 'rtl';\n readonly onTap: () => void;\n}): ReactNode {\n const palette = useG9Theme().palette;\n const glyphs = useG9Settings().glyphs;\n const { item, selected } = props;\n const press = useG9Press(props.onTap, { blocked: item.isEnabled === false, source: 'G9SelectionSheet', guardMs: 0 });\n const icon = { emoji: item.emoji, icon: item.icon, imagePath: item.iconPath, image: item.iconImage };\n const iconColor = item.iconTintColor ?? (selected ? palette.Primary : palette.TextSecondary);\n // A person's picture is round and larger (MAUI 1.4.10 IsAvatar); an emoji or a glyph never is.\n const avatar = isAvatarImage(item);\n const iconSize = avatar ? G9Metrics.SelectionAvatarSize : G9Metrics.SelectionIconSize;\n return (\n <view\n {...(props.elementId ? { id: props.elementId } : {})}\n className={`g9-selection-row${selected ? ' g9-selection-row--selected' : ''}`}\n style={selected ? { backgroundColor: formatColor(withAlpha(palette.Primary, 0.1)) } : {}}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={item.text}\n {...(selected ? { 'accessibility-value': 'selected' } : {})}\n bindtap={press}\n >\n <view\n className={`g9-selection-row__inner g9-dir-${props.direction}`}\n style={{ ...g9RowStyle(props.direction), ...(item.isEnabled === false ? { opacity: 0.45 } : {}) }}\n >\n {hasIconSlot(icon) ? (\n <G9IconSlot\n {...icon}\n size={iconSize}\n color={iconColor}\n {...(avatar ? { imageCornerRadius: iconSize / 2 } : {})}\n />\n ) : item.swatchFirstColor?.trim() || item.swatchSecondColor?.trim() ? (\n <G9Swatch first={item.swatchFirstColor} second={item.swatchSecondColor} direction={props.direction} />\n ) : (\n // MAUI's row is a Grid of ColumnSpacing 12 whose icon column stays when empty: its spacing still sits before\n // the text, so an icon-less row's text starts 16 + 12 dp in, level with nothing but the same in every picker.\n <view className=\"g9-selection-row__icon-gap\" />\n )}\n <text\n className=\"g9-selection-row__text\"\n text-maxline=\"1\"\n style={{\n color: selected ? palette.Primary : palette.TextPrimary,\n fontWeight: selected ? 'bold' : 'normal',\n ...g9TextStart(props.direction),\n }}\n >\n {item.text}\n </text>\n <view style={{ opacity: selected ? 1 : 0 }}>\n <G9IconSlot icon={glyphs.check} size={18} color={palette.Primary} />\n </view>\n </view>\n </view>\n );\n}\n\nfunction SelectionBody<T extends G9SelectionItem>(props: BodyProps<T>): ReactNode {\n const strings = useG9Strings();\n const parentDir = useG9Direction();\n const { request, ids } = props;\n const [model, setModel] = useState(props.initial);\n const [query, setQuery] = useState('');\n const [applied, setApplied] = useState('');\n const timer = useRef<G9TimerHandle | null>(null);\n const picking = useRef(false);\n useEffect(\n () => () => {\n if (timer.current !== null) stopTimer(timer.current);\n },\n [],\n );\n const visible = request.showSearch ? model.withItems(request.items).filter(applied) : request.items;\n const visibleIds = new Set(visible.map((item) => ids[request.items.indexOf(item)]));\n // The row window (MAUI 1.4.8, LES-0056): the first page of matches, one more page per scroll to the end, never more\n // than g9SelectionMaxRenderedRows; a new query starts from the first page again (the window is the top of ITS matches).\n const [grown, setGrown] = useState({ query: applied, limit: g9SelectionRowPageSize });\n const limit = grown.query === applied ? grown.limit : g9SelectionRowPageSize;\n const shown = computeSelectionWindow(\n request.items.length,\n (i) => visibleIds.has(ids[i] as string),\n (i) => model.isSelected(ids[i] as string),\n limit,\n );\n const latest = useRef({ applied, limit, hidden: shown.hidden });\n latest.current = { applied, limit, hidden: shown.hidden };\n useEffect(\n () =>\n props.scrolledToEnd.subscribe(() => {\n const now = latest.current;\n const next = nextSelectionLimit(now.limit, now.hidden);\n if (next !== now.limit) setGrown({ query: now.applied, limit: next });\n }),\n [props.scrolledToEnd],\n );\n const dir =\n request.itemTextDirection === 'leftToRight'\n ? 'ltr'\n : request.itemTextDirection === 'rightToLeft'\n ? 'rtl'\n : parentDir;\n const multiple = request.allowMultiple === true;\n const onQuery = (value: string) => {\n setQuery(value);\n if (timer.current !== null) stopTimer(timer.current);\n if (value.trim() === '') {\n setApplied(value);\n return;\n }\n timer.current = startTimer(() => setApplied(value), g9SelectionSearchDebounceMs);\n };\n const tap = (id: string) => {\n if (props.done.current || picking.current) return;\n const next = model.toggle(id);\n if (next === model) return;\n setModel(next);\n props.onDraft(next);\n if (!multiple && request.closeOnSingleSelection !== false) {\n picking.current = true;\n startTimer(() => props.onComplete(next.selectedKeys, true), g9SelectionCloseDelayMs);\n }\n };\n return (\n <view className=\"g9-selection\">\n {request.showSearch ? (\n <view className=\"g9-selection__search\">\n <G9TextEntry\n placeholder={strings.get(G9StringKey.Search)}\n leadingIcon=\"search\"\n value={query}\n onValueChange={onQuery}\n />\n </view>\n ) : null}\n {shown.indices.length > 0 ? (\n <view className=\"g9-selection__items\">\n {shown.indices.map((i) => {\n const id = ids[i] as string;\n const item = request.items[i] as T;\n return (\n <SelectionRow\n key={id}\n item={item}\n elementId={g9ChildId(request.options?.automationId, `Item_${item.key ?? i}`)}\n selected={model.isSelected(id)}\n direction={dir}\n onTap={() => tap(id)}\n />\n );\n })}\n </view>\n ) : null}\n {shown.hidden > 0 ? (\n <text className=\"g9-selection__more\">{strings.format(G9StringKey.MoreResultsFormat, shown.hidden)}</text>\n ) : null}\n {visible.length === 0 ? (\n <text className=\"g9-selection__empty\">{request.emptyText ?? strings.get(G9StringKey.NoResults)}</text>\n ) : null}\n </view>\n );\n}\n\n/**\n * Shows the selection sheet (MAUI `G9SelectionSheet.ShowForResultAsync`): a fit sheet with a header (title near the\n * close button), optional search (150 ms debounce, text match, hidden selected rows stay selected), rows with icon or\n * swatch, check mark and selection tint. Single mode with `closeOnSingleSelection` completes on a pick; multi mode\n * shows a count pill and Done; a reset selection adds Reset. Any dismissal resolves `wasAccepted: false` with the\n * current draft (or the opening selection when the sheet never built).\n */\nexport function showSelectionSheet<T extends G9SelectionItem>(\n sheets: G9SheetService,\n request: G9SelectionSheetRequest<T>,\n): Promise<G9SelectionSheetResult<T>> {\n const items = [...request.items];\n const ids = selectionIdentities(items);\n const opening = request.selectedItems ?? [];\n // Opening items match listed items by identity; the rest are kept as \"not listed\".\n const openingIds = selectionIdentities([...items, ...opening]).slice(items.length);\n const listedIds = new Set(ids);\n const initialKeys = openingIds.filter((id) => listedIds.has(id));\n const unlisted = opening.filter((_, i) => !listedIds.has(openingIds[i] as string));\n const multiple = request.allowMultiple === true;\n const initial = createSelectionModel<T>({\n items,\n getKey: (item) => ids[items.indexOf(item)] as string,\n getText: (item) => item.text,\n mode: multiple ? 'multiple' : 'single',\n selectedKeys: initialKeys,\n isEnabled: (item) => item.isEnabled !== false,\n });\n return new Promise((resolve) => {\n let draft = initial;\n const draftListeners = new Set<() => void>();\n const draftStore = {\n subscribe: (l: () => void) => {\n draftListeners.add(l);\n return () => {\n draftListeners.delete(l);\n };\n },\n count: () => draft.selectedKeys.length,\n };\n let settled = false;\n const done = { current: false };\n const startKeys = new Set(initialKeys);\n const collect = (keys: ReadonlyArray<string>): T[] => {\n const set = new Set(keys);\n return [...items.filter((_, i) => set.has(ids[i] as string)), ...unlisted];\n };\n const settle = (keys: ReadonlyArray<string>, accepted: boolean, explicit?: ReadonlyArray<T>) => {\n if (settled) return;\n settled = true;\n done.current = true;\n const result = explicit ?? collect(keys);\n const changed = explicit !== undefined || keys.length !== startKeys.size || keys.some((k) => !startKeys.has(k));\n resolve({ wasAccepted: accepted, selectionChanged: changed, items: result });\n };\n let handle: G9SheetHandle | null = null;\n const complete = (keys: ReadonlyArray<string>, accepted: boolean) => {\n settle(keys, accepted);\n handle?.close();\n };\n const reset = request.resetSelection && request.resetSelection.length > 0 ? request.resetSelection : null;\n const endListeners = new Set<() => void>();\n const scrolledToEnd = {\n subscribe: (l: () => void) => {\n endListeners.add(l);\n return () => {\n endListeners.delete(l);\n };\n },\n };\n const body = () => (\n <SelectionBody\n request={request}\n ids={ids}\n initial={initial}\n done={done}\n scrolledToEnd={scrolledToEnd}\n onDraft={(m) => {\n draft = m;\n for (const l of [...draftListeners]) l();\n }}\n onComplete={complete}\n />\n );\n const options: G9SheetOptions = {\n ...fitToContentSheetOptions(),\n deferContent: items.length > g9SelectionEagerBuildItemLimit,\n deferredLoadingPlaceholderHeight: estimateSelectionHeight(items.length, request.showSearch === true),\n loadingSkeleton: 'listRows',\n // ⛔ Capped at what the sheet can show. It was the item count: 3,416 people built 3,416 placeholder rows before\n // the real ones (MAUI's ANR of 2026-11-08, LES-0056).\n loadingSkeletonRowCount: Math.min(items.length, g9SelectionSkeletonRowCap),\n onScrollToEnd: () => {\n for (const l of [...endListeners]) l();\n },\n scrollToEndThreshold: g9SelectionGrowThreshold,\n backgroundColor: 'var(--g9-surface)',\n showToolbar: true,\n showCloseButton: true,\n title: request.title,\n headerTitlePlacement: 'nearBack',\n ...(multiple || reset\n ? {\n headerTrailingView: (\n <SelectionHeaderActions\n multiple={multiple}\n draft={draftStore}\n minimum={Math.max(0, request.minimumSelected ?? 0)}\n {...(request.countLabel ? { countLabel: request.countLabel } : {})}\n onDone={() => {\n if (draft.selectedKeys.length >= Math.max(0, request.minimumSelected ?? 0))\n complete(draft.selectedKeys, true);\n }}\n {...(reset\n ? {\n onReset: () => {\n settle([], true, reset);\n handle?.close();\n },\n }\n : {})}\n />\n ),\n }\n : {}),\n ...request.options,\n onClosed: () => {\n request.options?.onClosed?.();\n settle(draft.selectedKeys, false);\n },\n };\n handle = sheets.show(items.length > g9SelectionEagerBuildItemLimit ? body : body(), options);\n if (!handle) settle(initialKeys, false);\n });\n}\n\nfunction SelectionHeaderActions(props: {\n readonly multiple: boolean;\n readonly draft: { subscribe(listener: () => void): () => void; count(): number };\n readonly minimum: number;\n readonly countLabel?: (n: number) => string;\n readonly onDone: () => void;\n readonly onReset?: () => void;\n}): ReactNode {\n const strings = useG9Strings();\n const direction = useG9Direction();\n const n = useSyncExternalStore(props.draft.subscribe, props.draft.count);\n return (\n <view className=\"g9-selection__actions\" style={g9RowStyle(direction)}>\n {props.onReset ? (\n <G9Button text={strings.get(G9StringKey.Reset)} variant=\"text\" size=\"small\" onPress={props.onReset} />\n ) : null}\n {props.multiple && n > 0 ? (\n <view className=\"g9-selection__count\">\n <text className=\"g9-selection__count-text\">\n {props.countLabel ? props.countLabel(n) : `${n} ${strings.get(G9StringKey.Selected)}`}\n </text>\n </view>\n ) : null}\n {props.multiple ? (\n <G9Button\n text={strings.get(G9StringKey.Done)}\n variant=\"text\"\n size=\"small\"\n disabled={n < props.minimum}\n onPress={props.onDone}\n />\n ) : null}\n </view>\n );\n}\n\n/** Arguments of {@link showListSheet} (MAUI `ShowListG9BottomSheetAsync`). */\nexport interface G9ListSheetRequest<T extends G9SelectionItem> {\n readonly title: string;\n readonly items: ReadonlyArray<T>;\n readonly selected?: ReadonlyArray<T>;\n readonly multiple?: boolean;\n /** Default true. */\n readonly closeOnSingleSelection?: boolean;\n /** Shows the search field (250 ms debounce, trimmed) with this placeholder. */\n readonly searchPlaceholder?: string | null;\n /** Default full screen without a handle (MAUI). A fit-to-content `sizeMode` keeps the sheet compact. */\n readonly options?: G9SheetOptions;\n /** Apply button text (multi). Default the `save` string. */\n readonly applyButtonText?: string;\n}\n\n/**\n * The shared list picker (MAUI `ShowListG9BottomSheetAsync` / `G9BottomSheetListPickerModal`): search field with\n * placeholder, rows with a selection tint (no check mark), Apply in multi mode, close-on-select after 120 ms. Resolves\n * with the selection when it completes or closes (no accepted/dismissed distinction, as MAUI); `[]` when throttled.\n */\nexport function showListSheet<T extends G9SelectionItem>(\n sheets: G9SheetService,\n request: G9ListSheetRequest<T>,\n): Promise<T[]> {\n const items = [...request.items];\n const keyOf = (item: G9SelectionItem) => (item.key != null && item.key.trim() !== '' ? item.key : item.text);\n const multiple = request.multiple === true;\n const initial = createSelectionModel<T>({\n items,\n getKey: keyOf,\n getText: (item) => item.text,\n mode: multiple ? 'multiple' : 'single',\n selectedKeys: (request.selected ?? []).map(keyOf),\n isEnabled: (item) => item.isEnabled !== false,\n });\n return new Promise((resolve) => {\n let draft = initial;\n let settled = false;\n let handle: G9SheetHandle | null = null;\n const settle = () => {\n if (settled) return;\n settled = true;\n resolve(draft.selectedItems());\n };\n const complete = () => {\n settle();\n handle?.close();\n };\n const body = () => (\n <ListPickerBody\n request={request}\n initial={initial}\n keyOf={keyOf}\n onDraft={(m) => {\n draft = m;\n }}\n onComplete={complete}\n />\n );\n const base = request.options ?? fullScreenWithoutHandleSheetOptions();\n const fit = base.sizeMode === 'fitToContent';\n const options: G9SheetOptions = {\n ...base,\n ...(fit\n ? {}\n : {\n states: ['large'],\n currentState: 'large',\n hasHandle: false,\n isDraggable: true,\n useFullScreenLoadingPlaceholder: true,\n }),\n showToolbar: true,\n showCloseButton: true,\n title: request.title,\n headerTitlePlacement: 'nearBack',\n deferContent: true,\n onClosed: () => {\n base.onClosed?.();\n settle();\n },\n };\n handle = sheets.show(body, options);\n if (!handle) {\n settled = true;\n resolve([]);\n }\n });\n}\n\nfunction ListPickerBody<T extends G9SelectionItem>(props: {\n readonly request: G9ListSheetRequest<T>;\n readonly initial: G9SelectionModel<T>;\n readonly keyOf: (item: G9SelectionItem) => string;\n readonly onDraft: (model: G9SelectionModel<T>) => void;\n readonly onComplete: () => void;\n}): ReactNode {\n const strings = useG9Strings();\n const palette = useG9Theme().palette;\n const [model, setModel] = useState(props.initial);\n const [query, setQuery] = useState('');\n const picking = useRef(false);\n const { request } = props;\n const visible = model.filter(query, { trim: true });\n const tap = (item: T) => {\n if (picking.current || item.isEnabled === false) return;\n const next = model.toggle(props.keyOf(item));\n setModel(next);\n props.onDraft(next);\n if (!request.multiple && request.closeOnSingleSelection !== false) {\n picking.current = true;\n startTimer(props.onComplete, g9SelectionCloseDelayMs);\n }\n };\n return (\n <view className=\"g9-list-picker\">\n {request.searchPlaceholder ? (\n <view className=\"g9-selection__search\">\n <G9SearchEntry\n placeholder={request.searchPlaceholder}\n voiceEnabled={false}\n onDebouncedValueChange={setQuery}\n />\n </view>\n ) : null}\n {visible.map((item) => (\n <ListPickerRow\n key={props.keyOf(item)}\n item={item}\n selected={model.isSelected(props.keyOf(item))}\n tint={palette.PrimaryContainer}\n onTap={() => tap(item)}\n />\n ))}\n {request.multiple ? (\n <view className=\"g9-list-picker__apply\">\n <G9Button\n text={request.applyButtonText ?? strings.get(G9StringKey.Save)}\n size=\"hero\"\n onPress={props.onComplete}\n />\n </view>\n ) : null}\n </view>\n );\n}\n\nfunction ListPickerRow(props: {\n readonly item: G9SelectionItem;\n readonly selected: boolean;\n readonly tint: string;\n readonly onTap: () => void;\n}): ReactNode {\n const press = useG9Press(props.onTap, {\n source: 'G9ListPicker',\n guardMs: 0,\n blocked: props.item.isEnabled === false,\n });\n const icon = { icon: props.item.icon, imagePath: props.item.iconPath, image: props.item.iconImage };\n const direction = useG9Direction();\n return (\n <view\n className={`g9-list-picker__row${props.selected ? ' g9-list-picker__row--selected' : ''}`}\n style={{ ...g9RowStyle(direction), ...(props.selected ? { backgroundColor: props.tint } : {}) }}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={props.item.text}\n bindtap={press}\n >\n {hasIconSlot(icon) ? <G9IconSlot {...icon} size={20} color=\"var(--g9-on-surface-variant)\" /> : null}\n <text className=\"g9-list-picker__text\" text-maxline=\"1\" style={g9TextStart(direction)}>\n {props.item.text}\n </text>\n </view>\n );\n}\n"],"names":["g9SelectionEagerBuildItemLimit","g9SelectionRowHeight","g9SelectionSearchDebounceMs","g9SelectionCloseDelayMs","selectionIdentities","items","counts","Map","item","_counts_get","i","estimateSelectionHeight","count","showSearch","chrome","Math","g9SelectionSkeletonRowCap","G9Metrics","SelectionRow","props","_item_iconTintColor","_item_swatchFirstColor","_item_swatchSecondColor","palette","useG9Theme","glyphs","useG9Settings","selected","press","useG9Press","icon","iconColor","avatar","isAvatarImage","iconSize","view","formatColor","withAlpha","g9RowStyle","hasIconSlot","G9IconSlot","G9Swatch","text","g9TextStart","SelectionBody","_request_emptyText","strings","useG9Strings","parentDir","useG9Direction","request","ids","model","setModel","useState","query","setQuery","applied","setApplied","timer","useRef","picking","useEffect","stopTimer","visible","visibleIds","Set","grown","setGrown","g9SelectionRowPageSize","limit","shown","computeSelectionWindow","latest","now","next","nextSelectionLimit","dir","multiple","onQuery","value","startTimer","tap","id","G9TextEntry","G9StringKey","_item_key","_request_options","g9ChildId","showSelectionSheet","sheets","_request_selectedItems","opening","openingIds","listedIds","initialKeys","unlisted","_","initial","createSelectionModel","Promise","resolve","_request_minimumSelected","draft","draftListeners","draftStore","l","settled","done","startKeys","collect","keys","set","settle","accepted","explicit","result","changed","undefined","k","handle","complete","reset","endListeners","scrolledToEnd","body","m","options","fitToContentSheetOptions","g9SelectionGrowThreshold","SelectionHeaderActions","direction","n","useSyncExternalStore","G9Button","showListSheet","_request_selected","keyOf","ListPickerBody","base","fullScreenWithoutHandleSheetOptions","fit","_request_applyButtonText","G9SearchEntry","ListPickerRow"],"mappings":";;;;;;;;;;;;;;;;AA0BO,MAAMA,iCAAiC;AAEvC,MAAMC,uBAAuB;AAE7B,MAAMC,8BAA8B;AAEpC,MAAMC,0BAA0B;AAiBhC,SAASC,oBAAoBC,KAAqC;IACvE,MAAMC,SAAS,IAAIC;IACnB,KAAK,MAAMC,QAAQH,MAAO;YAC+CI;QAAvE,IAAID,AAAY,QAAZA,KAAK,GAAG,IAAYA,AAAoB,OAApBA,KAAK,GAAG,CAAC,IAAI,IAAWF,OAAO,GAAG,CAACE,KAAK,IAAI,EAAE,AAAC,SAAAC,CAAAA,cAAAA,OAAO,GAAG,CAACD,KAAK,IAAI,KAApBC,cAAyB,KAAK;IACvG;IACA,OAAOJ,MAAM,GAAG,CAAC,CAACG,MAAME;YAGjBD;eAFLD,AAAY,QAAZA,KAAK,GAAG,IAAYA,AAAoB,OAApBA,KAAK,GAAG,CAAC,IAAI,KAC7B,CAAC,EAAE,EAAEA,KAAK,GAAG,EAAE,GACf,AAAC,SAAAC,CAAAA,cAAAA,OAAO,GAAG,CAACD,KAAK,IAAI,KAApBC,cAAyB,KAAK,IAC7B,CAAC,EAAE,EAAEC,GAAG,GACR,CAAC,EAAE,EAAEF,KAAK,IAAI,EAAE;;AAE1B;AAGO,SAASG,wBAAwBC,KAAa,EAAEC,UAAmB;IACxE,MAAMC,SAAUD,AAAAA,CAAAA,aAAa,KAAK,KAAK;IACvC,OAAOE,KAAK,GAAG,CAAC,KAAKA,KAAK,GAAG,CAAC,IAAId,uBAAuBa,QAAQF,QAAQX,uBAAuBa;AAClG;AAwCO,MAAME,4BAA4BD,KAAK,IAAI,CAACE,UAAU,kBAAkB,GAAGA,UAAU,kBA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,KAAK;IACT,EAAEP;AAEN"}
@@ -50,6 +50,13 @@
50
50
  font-size: 13px;
51
51
  }
52
52
 
53
+ .g9-selection__more {
54
+ text-align: center;
55
+ color: var(--g9-text-tertiary);
56
+ padding: 14px 16px;
57
+ font-size: 12px;
58
+ }
59
+
53
60
  .g9-selection__actions {
54
61
  flex-direction: row;
55
62
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/selection/selection.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,aAAa;AACf;;AAMA;EAHE,mBAAmB;AACrB;;AAMA;EAHE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AAMA;EAHE,iBAAiB;AACnB;;AAQA;EALE,sBAAsB;EACtB,uBAAuB;EACvB,gBAAgB;EAChB,aAAa;AACf;;AAQA;EALE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,eAAe;EACf,aAAa;AACf;;AAQA;EALE,QAAQ;EACR,WAAW;AACb;;AAQA;EALE,uBAAuB;EACvB,OAAO;EACP,eAAe;AACjB;;AAQA;EALE,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;EAClB,eAAe;AACjB;;AAQA;EALE,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAQA;EALE,6CAA6C;EAC7C,mBAAmB;EACnB,gBAAgB;AAClB;;AAQA;EALE,qCAAqC;EACrC,eAAe;AACjB;;AAQA;EALE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;AACf;;AAQA;EALE,6BAA6B;EAC7B,OAAO;EACP,eAAe;AACjB;;AAQA;EALE,kBAAkB;AACpB","sourcesContent":["/* Selection sheet and list picker (MAUI G9SelectionSheet, G9BottomSheetListPickerModal). */\n.g9-selection,\n.g9-list-picker {\n display: flex;\n flex-direction: column;\n}\n\n/* MAUI G9SelectionSheet: the sheet's Padding (0, 0, 0, 4) and the rows host's Padding (0, 4, 0, 4) — 4 dp between the\n header and the first row, 8 dp under the last. */\n.g9-selection {\n padding-bottom: 4px;\n}\n\n.g9-selection__items {\n display: flex;\n flex-direction: column;\n padding: 4px 0px;\n}\n\n.g9-selection__search {\n padding: 8px 12px;\n}\n\n/* A column: the inner row stretches to the full width and is centred VERTICALLY (as a row container, the inner row\n was centred horizontally — icon, text and check bunched in the middle of the sheet). */\n.g9-selection-row {\n min-height: 52px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.g9-selection-row__inner {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n padding: 0px 16px;\n}\n\n.g9-selection-row__icon-gap {\n width: 0px;\n height: 1px;\n}\n\n.g9-selection-row__text {\n flex: 1;\n font-size: 14px;\n text-overflow: ellipsis;\n}\n\n.g9-selection__empty {\n padding: 28px 16px;\n font-size: 13px;\n text-align: center;\n color: var(--g9-text-tertiary);\n}\n\n.g9-selection__actions {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 8px;\n}\n\n.g9-selection__count {\n padding: 2px 8px;\n border-radius: 10px;\n background-color: var(--g9-primary-container);\n}\n\n.g9-selection__count-text {\n font-size: 12px;\n color: var(--g9-on-primary-container);\n}\n\n.g9-list-picker__row {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 10px;\n min-height: 52px;\n padding: 0px 16px;\n}\n\n.g9-list-picker__text {\n flex: 1;\n font-size: 14px;\n color: var(--g9-text-primary);\n}\n\n.g9-list-picker__apply {\n padding: 12px 16px;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/selection/selection.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,aAAa;AACf;;AAMA;EAHE,mBAAmB;AACrB;;AAMA;EAHE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AAMA;EAHE,iBAAiB;AACnB;;AAQA;EALE,sBAAsB;EACtB,uBAAuB;EACvB,gBAAgB;EAChB,aAAa;AACf;;AAQA;EALE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,eAAe;EACf,aAAa;AACf;;AAQA;EALE,QAAQ;EACR,WAAW;AACb;;AAQA;EALE,uBAAuB;EACvB,OAAO;EACP,eAAe;AACjB;;AAQA;EALE,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;EAClB,eAAe;AACjB;;AASA;EANE,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;EAClB,eAAe;AACjB;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AASA;EANE,6CAA6C;EAC7C,mBAAmB;EACnB,gBAAgB;AAClB;;AASA;EANE,qCAAqC;EACrC,eAAe;AACjB;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;AACf;;AASA;EANE,6BAA6B;EAC7B,OAAO;EACP,eAAe;AACjB;;AASA;EANE,kBAAkB;AACpB","sourcesContent":["/* Selection sheet and list picker (MAUI G9SelectionSheet, G9BottomSheetListPickerModal). */\n.g9-selection,\n.g9-list-picker {\n display: flex;\n flex-direction: column;\n}\n\n/* MAUI G9SelectionSheet: the sheet's Padding (0, 0, 0, 4) and the rows host's Padding (0, 4, 0, 4) — 4 dp between the\n header and the first row, 8 dp under the last. */\n.g9-selection {\n padding-bottom: 4px;\n}\n\n.g9-selection__items {\n display: flex;\n flex-direction: column;\n padding: 4px 0px;\n}\n\n.g9-selection__search {\n padding: 8px 12px;\n}\n\n/* A column: the inner row stretches to the full width and is centred VERTICALLY (as a row container, the inner row\n was centred horizontally — icon, text and check bunched in the middle of the sheet). */\n.g9-selection-row {\n min-height: 52px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n\n.g9-selection-row__inner {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 12px;\n padding: 0px 16px;\n}\n\n.g9-selection-row__icon-gap {\n width: 0px;\n height: 1px;\n}\n\n.g9-selection-row__text {\n flex: 1;\n font-size: 14px;\n text-overflow: ellipsis;\n}\n\n.g9-selection__empty {\n padding: 28px 16px;\n font-size: 13px;\n text-align: center;\n color: var(--g9-text-tertiary);\n}\n\n/* The «N more — search» footer of a long list (MAUI 1.4.8): TextTertiary 12, centred, 16 / 14 padding. */\n.g9-selection__more {\n padding: 14px 16px;\n font-size: 12px;\n text-align: center;\n color: var(--g9-text-tertiary);\n}\n\n.g9-selection__actions {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 8px;\n}\n\n.g9-selection__count {\n padding: 2px 8px;\n border-radius: 10px;\n background-color: var(--g9-primary-container);\n}\n\n.g9-selection__count-text {\n font-size: 12px;\n color: var(--g9-on-primary-container);\n}\n\n.g9-list-picker__row {\n display: flex;\n flex-direction: row;\n align-items: center;\n column-gap: 10px;\n min-height: 52px;\n padding: 0px 16px;\n}\n\n.g9-list-picker__text {\n flex: 1;\n font-size: 14px;\n color: var(--g9-text-primary);\n}\n\n.g9-list-picker__apply {\n padding: 12px 16px;\n}\n"],"sourceRoot":""}