@g9tm/lynxcontrols 2.5.6 → 2.5.8

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 (337) hide show
  1. package/catalog/cards/G9AppBar.md +1 -1
  2. package/catalog/cards/G9AppearancePage.md +17 -0
  3. package/catalog/cards/G9Badge.md +1 -1
  4. package/catalog/cards/G9Button.md +2 -2
  5. package/catalog/cards/G9Card.md +1 -1
  6. package/catalog/cards/G9CarryContexts.md +10 -0
  7. package/catalog/cards/G9CheckBox.md +1 -1
  8. package/catalog/cards/G9Chip.md +1 -1
  9. package/catalog/cards/G9ChipStrip.md +16 -0
  10. package/catalog/cards/G9CodeBlock.md +17 -0
  11. package/catalog/cards/G9CommandPalette.md +3 -1
  12. package/catalog/cards/G9ConnectionBanner.md +1 -1
  13. package/catalog/cards/G9ContrastPanel.md +15 -0
  14. package/catalog/cards/G9DashboardCustomizeSheet.md +17 -0
  15. package/catalog/cards/G9DashboardGrid.md +17 -0
  16. package/catalog/cards/G9DragList.md +4 -2
  17. package/catalog/cards/G9Editor.md +1 -1
  18. package/catalog/cards/G9ErrorBoundary.md +3 -2
  19. package/catalog/cards/G9FormField.md +2 -2
  20. package/catalog/cards/G9ListRow.md +1 -1
  21. package/catalog/cards/G9Menu.md +1 -1
  22. package/catalog/cards/G9MenuList.md +2 -0
  23. package/catalog/cards/G9NotificationCenter.md +17 -0
  24. package/catalog/cards/G9NotificationCenterPanel.md +17 -0
  25. package/catalog/cards/G9PathNavigator.md +13 -0
  26. package/catalog/cards/G9PersonalThemeSheet.md +17 -0
  27. package/catalog/cards/G9Popover.md +1 -1
  28. package/catalog/cards/G9Provider.md +1 -1
  29. package/catalog/cards/G9RangeSlider.md +2 -2
  30. package/catalog/cards/G9ReaderSheet.md +17 -0
  31. package/catalog/cards/G9ReaderView.md +17 -0
  32. package/catalog/cards/G9SafeButton.md +2 -2
  33. package/catalog/cards/G9SearchEntry.md +1 -1
  34. package/catalog/cards/G9SecretValue.md +17 -0
  35. package/catalog/cards/G9ShortcutList.md +4 -0
  36. package/catalog/cards/G9ShortcutsSheet.md +3 -1
  37. package/catalog/cards/G9StatusPill.md +1 -1
  38. package/catalog/cards/G9Stepper.md +1 -1
  39. package/catalog/cards/G9SwitchRow.md +1 -1
  40. package/catalog/cards/G9Tag.md +1 -1
  41. package/catalog/cards/G9TextEntry.md +1 -1
  42. package/catalog/cards/G9UpdateBar.md +2 -1
  43. package/catalog/cards/G9VirtualList.md +1 -1
  44. package/catalog/cards/G9WallpaperSwatch.md +16 -0
  45. package/catalog/cards/G9WidgetSkeleton.md +9 -0
  46. package/catalog/cards/G9WidgetSlot.md +13 -0
  47. package/catalog/cards/PopupFrame.md +2 -2
  48. package/catalog/catalog.json +9460 -2155
  49. package/catalog/index.md +20 -3
  50. package/dist/.tsbuildinfo +1 -1
  51. package/dist/appearance/appearance.css +264 -0
  52. package/dist/appearance/appearance.css.map +1 -0
  53. package/dist/appearance/appearance.d.ts +148 -0
  54. package/dist/appearance/appearance.d.ts.map +1 -0
  55. package/dist/appearance/appearance.jsx +604 -0
  56. package/dist/appearance/index.d.ts +2 -0
  57. package/dist/appearance/index.d.ts.map +1 -0
  58. package/dist/appearance/index.jsx +1 -0
  59. package/dist/base/control.d.ts +15 -0
  60. package/dist/base/control.d.ts.map +1 -1
  61. package/dist/base/control.jsx +13 -1
  62. package/dist/base/index.d.ts +1 -1
  63. package/dist/base/index.d.ts.map +1 -1
  64. package/dist/base/index.jsx +1 -1
  65. package/dist/base/selection-item.d.ts +5 -0
  66. package/dist/base/selection-item.d.ts.map +1 -1
  67. package/dist/button/button.css +4 -0
  68. package/dist/button/button.css.map +1 -1
  69. package/dist/cascade/cascade.css +2 -0
  70. package/dist/cascade/cascade.css.map +1 -1
  71. package/dist/commands/commands.css +46 -0
  72. package/dist/commands/commands.css.map +1 -1
  73. package/dist/commands/index.d.ts +2 -2
  74. package/dist/commands/index.d.ts.map +1 -1
  75. package/dist/commands/index.jsx +2 -2
  76. package/dist/commands/keys.d.ts +15 -1
  77. package/dist/commands/keys.d.ts.map +1 -1
  78. package/dist/commands/keys.jsx +20 -1
  79. package/dist/commands/palette.d.ts +73 -7
  80. package/dist/commands/palette.d.ts.map +1 -1
  81. package/dist/commands/palette.jsx +174 -20
  82. package/dist/dashboard/dashboard.css +101 -0
  83. package/dist/dashboard/dashboard.css.map +1 -0
  84. package/dist/dashboard/dashboard.d.ts +73 -0
  85. package/dist/dashboard/dashboard.d.ts.map +1 -0
  86. package/dist/dashboard/dashboard.jsx +297 -0
  87. package/dist/dashboard/index.d.ts +3 -0
  88. package/dist/dashboard/index.d.ts.map +1 -0
  89. package/dist/dashboard/index.jsx +2 -0
  90. package/dist/dashboard/model.d.ts +53 -0
  91. package/dist/dashboard/model.d.ts.map +1 -0
  92. package/dist/dashboard/model.jsx +76 -0
  93. package/dist/display/code.css +109 -0
  94. package/dist/display/code.css.map +1 -0
  95. package/dist/display/code.d.ts +43 -0
  96. package/dist/display/code.d.ts.map +1 -0
  97. package/dist/display/code.jsx +101 -0
  98. package/dist/display/extras.d.ts +7 -2
  99. package/dist/display/extras.d.ts.map +1 -1
  100. package/dist/display/extras.jsx +13 -4
  101. package/dist/display/figures.d.ts.map +1 -1
  102. package/dist/display/figures.jsx +10 -2
  103. package/dist/display/index.d.ts +1 -0
  104. package/dist/display/index.d.ts.map +1 -1
  105. package/dist/display/index.jsx +1 -0
  106. package/dist/display/motion-figures.css +2 -0
  107. package/dist/display/motion-figures.css.map +1 -1
  108. package/dist/display/motion-figures.d.ts.map +1 -1
  109. package/dist/display/motion-figures.jsx +14 -7
  110. package/dist/display/status.d.ts +1 -1
  111. package/dist/display/status.d.ts.map +1 -1
  112. package/dist/display/status.jsx +15 -3
  113. package/dist/display/theme-preview.css +4 -0
  114. package/dist/display/theme-preview.css.map +1 -1
  115. package/dist/effects/effects.d.ts.map +1 -1
  116. package/dist/effects/effects.jsx +8 -1
  117. package/dist/fields/extra-entries.css +1 -0
  118. package/dist/fields/extra-entries.css.map +1 -1
  119. package/dist/fields/extra-entries.d.ts +4 -1
  120. package/dist/fields/extra-entries.d.ts.map +1 -1
  121. package/dist/fields/extra-entries.jsx +54 -19
  122. package/dist/fields/fields.css +21 -0
  123. package/dist/fields/fields.css.map +1 -1
  124. package/dist/fields/outlined-field.d.ts +9 -0
  125. package/dist/fields/outlined-field.d.ts.map +1 -1
  126. package/dist/fields/outlined-field.jsx +6 -1
  127. package/dist/fields/pin-entry.d.ts.map +1 -1
  128. package/dist/fields/pin-entry.jsx +36 -3
  129. package/dist/fields/text-entry.d.ts +4 -0
  130. package/dist/fields/text-entry.d.ts.map +1 -1
  131. package/dist/fields/text-entry.jsx +32 -25
  132. package/dist/fields/use-text-input.d.ts +3 -2
  133. package/dist/fields/use-text-input.d.ts.map +1 -1
  134. package/dist/fields/use-text-input.jsx +3 -0
  135. package/dist/header/app-bar.d.ts +6 -0
  136. package/dist/header/app-bar.d.ts.map +1 -1
  137. package/dist/header/app-bar.jsx +22 -8
  138. package/dist/header/header.css +14 -0
  139. package/dist/header/header.css.map +1 -1
  140. package/dist/host/bottom-overlays.d.ts +5 -0
  141. package/dist/host/bottom-overlays.d.ts.map +1 -1
  142. package/dist/host/bottom-overlays.jsx +17 -1
  143. package/dist/host/carry-contexts.d.ts +28 -0
  144. package/dist/host/carry-contexts.d.ts.map +1 -0
  145. package/dist/host/carry-contexts.jsx +76 -0
  146. package/dist/host/host.d.ts.map +1 -1
  147. package/dist/host/host.jsx +5 -1
  148. package/dist/host/index.d.ts +2 -0
  149. package/dist/host/index.d.ts.map +1 -1
  150. package/dist/host/index.jsx +2 -0
  151. package/dist/icon/icon.d.ts.map +1 -1
  152. package/dist/icon/icon.jsx +13 -9
  153. package/dist/index.d.ts +4 -0
  154. package/dist/index.d.ts.map +1 -1
  155. package/dist/layout/containers.d.ts.map +1 -1
  156. package/dist/layout/containers.jsx +2 -1
  157. package/dist/layout/layout.css +7 -0
  158. package/dist/layout/layout.css.map +1 -1
  159. package/dist/list/gestures.d.ts +39 -6
  160. package/dist/list/gestures.d.ts.map +1 -1
  161. package/dist/list/gestures.jsx +284 -89
  162. package/dist/list/index.d.ts +3 -2
  163. package/dist/list/index.d.ts.map +1 -1
  164. package/dist/list/index.jsx +2 -1
  165. package/dist/list/keyboard.d.ts +50 -0
  166. package/dist/list/keyboard.d.ts.map +1 -0
  167. package/dist/list/keyboard.jsx +117 -0
  168. package/dist/list/list.css +50 -5
  169. package/dist/list/list.css.map +1 -1
  170. package/dist/list/rows.d.ts +13 -1
  171. package/dist/list/rows.d.ts.map +1 -1
  172. package/dist/list/rows.jsx +42 -23
  173. package/dist/list/virtual-list.d.ts +27 -1
  174. package/dist/list/virtual-list.d.ts.map +1 -1
  175. package/dist/list/virtual-list.jsx +49 -4
  176. package/dist/notifications/index.d.ts +3 -0
  177. package/dist/notifications/index.d.ts.map +1 -0
  178. package/dist/notifications/index.jsx +2 -0
  179. package/dist/notifications/model.d.ts +47 -0
  180. package/dist/notifications/model.d.ts.map +1 -0
  181. package/dist/notifications/model.jsx +51 -0
  182. package/dist/notifications/notification-center.d.ts +98 -0
  183. package/dist/notifications/notification-center.d.ts.map +1 -0
  184. package/dist/notifications/notification-center.jsx +424 -0
  185. package/dist/notifications/notifications.css +266 -0
  186. package/dist/notifications/notifications.css.map +1 -0
  187. package/dist/orb/orb.css +2 -0
  188. package/dist/orb/orb.css.map +1 -1
  189. package/dist/pickers/pickers.css +15 -0
  190. package/dist/pickers/pickers.css.map +1 -1
  191. package/dist/plus-button/plus-button.css +2 -0
  192. package/dist/plus-button/plus-button.css.map +1 -1
  193. package/dist/plus-button/plus-button.d.ts.map +1 -1
  194. package/dist/plus-button/plus-button.jsx +2 -1
  195. package/dist/popover/popover.css +23 -1
  196. package/dist/popover/popover.css.map +1 -1
  197. package/dist/popover/popover.d.ts +14 -0
  198. package/dist/popover/popover.d.ts.map +1 -1
  199. package/dist/popover/popover.jsx +73 -12
  200. package/dist/popover/position.d.ts +6 -2
  201. package/dist/popover/position.d.ts.map +1 -1
  202. package/dist/popover/position.jsx +15 -4
  203. package/dist/popup/popup.css +3 -0
  204. package/dist/popup/popup.css.map +1 -1
  205. package/dist/provider/direction-scope.d.ts +8 -0
  206. package/dist/provider/direction-scope.d.ts.map +1 -1
  207. package/dist/provider/direction-scope.jsx +13 -2
  208. package/dist/provider/index.d.ts +1 -1
  209. package/dist/provider/index.d.ts.map +1 -1
  210. package/dist/provider/provider.css +7 -0
  211. package/dist/provider/provider.css.map +1 -1
  212. package/dist/provider/provider.d.ts +6 -1
  213. package/dist/provider/provider.d.ts.map +1 -1
  214. package/dist/provider/provider.jsx +22 -2
  215. package/dist/provider/settings.d.ts +14 -0
  216. package/dist/provider/settings.d.ts.map +1 -1
  217. package/dist/provider/settings.jsx +4 -1
  218. package/dist/range-slider/index.d.ts +1 -1
  219. package/dist/range-slider/index.d.ts.map +1 -1
  220. package/dist/range-slider/range-slider.css +69 -0
  221. package/dist/range-slider/range-slider.css.map +1 -1
  222. package/dist/range-slider/range-slider.d.ts +22 -0
  223. package/dist/range-slider/range-slider.d.ts.map +1 -1
  224. package/dist/range-slider/range-slider.jsx +34 -5
  225. package/dist/reader/index.d.ts +2 -0
  226. package/dist/reader/index.d.ts.map +1 -0
  227. package/dist/reader/index.jsx +1 -0
  228. package/dist/reader/reader.css +74 -0
  229. package/dist/reader/reader.css.map +1 -0
  230. package/dist/reader/reader.d.ts +76 -0
  231. package/dist/reader/reader.d.ts.map +1 -0
  232. package/dist/reader/reader.jsx +149 -0
  233. package/dist/route/index.d.ts +2 -0
  234. package/dist/route/index.d.ts.map +1 -1
  235. package/dist/route/index.jsx +2 -0
  236. package/dist/route/path-navigator.css +42 -0
  237. package/dist/route/path-navigator.css.map +1 -0
  238. package/dist/route/path-navigator.d.ts +25 -0
  239. package/dist/route/path-navigator.d.ts.map +1 -0
  240. package/dist/route/path-navigator.jsx +98 -0
  241. package/dist/route/path-router.d.ts +162 -0
  242. package/dist/route/path-router.d.ts.map +1 -0
  243. package/dist/route/path-router.jsx +327 -0
  244. package/dist/selection/selection-sheet.d.ts.map +1 -1
  245. package/dist/selection/selection-sheet.jsx +23 -10
  246. package/dist/selection/selection.css +18 -1
  247. package/dist/selection/selection.css.map +1 -1
  248. package/dist/sheet/frame.d.ts.map +1 -1
  249. package/dist/sheet/frame.jsx +9 -8
  250. package/dist/sheet/options.d.ts +6 -1
  251. package/dist/sheet/options.d.ts.map +1 -1
  252. package/dist/sheet/options.jsx +2 -1
  253. package/dist/sheet/panel-frame.d.ts.map +1 -1
  254. package/dist/sheet/panel-frame.jsx +5 -4
  255. package/dist/sheet/sizing.d.ts +3 -3
  256. package/dist/sheet/sizing.d.ts.map +1 -1
  257. package/dist/sheet/sizing.jsx +1 -0
  258. package/dist/shell/shell.css +18 -1
  259. package/dist/shell/shell.css.map +1 -1
  260. package/dist/shell/shell.d.ts +10 -1
  261. package/dist/shell/shell.d.ts.map +1 -1
  262. package/dist/shell/shell.jsx +13 -9
  263. package/dist/survey/survey.css +15 -0
  264. package/dist/survey/survey.css.map +1 -1
  265. package/dist/survey/survey.d.ts +6 -0
  266. package/dist/survey/survey.d.ts.map +1 -1
  267. package/dist/survey/survey.jsx +24 -6
  268. package/dist/swipe/swipe.css +2 -0
  269. package/dist/swipe/swipe.css.map +1 -1
  270. package/dist/tab-bar/flat.d.ts.map +1 -1
  271. package/dist/tab-bar/flat.jsx +53 -38
  272. package/dist/tab-bar/tab-bar.css +2 -0
  273. package/dist/tab-bar/tab-bar.css.map +1 -1
  274. package/dist/tab-bar/tab-bar.d.ts.map +1 -1
  275. package/dist/tab-bar/tab-bar.jsx +28 -6
  276. package/dist/tabs/tab-view.jsx +10 -3
  277. package/dist/tabs/tabs.css +5 -0
  278. package/dist/tabs/tabs.css.map +1 -1
  279. package/dist/toast/index.d.ts +1 -1
  280. package/dist/toast/index.d.ts.map +1 -1
  281. package/dist/toast/service.d.ts.map +1 -1
  282. package/dist/toast/service.jsx +18 -5
  283. package/dist/toast/store.d.ts +22 -0
  284. package/dist/toast/store.d.ts.map +1 -1
  285. package/dist/toast/store.jsx +35 -3
  286. package/dist/toast/toast.css +22 -0
  287. package/dist/toast/toast.css.map +1 -1
  288. package/dist/toggle/checkbox.d.ts +5 -0
  289. package/dist/toggle/checkbox.d.ts.map +1 -1
  290. package/dist/toggle/checkbox.jsx +7 -2
  291. package/dist/toggle/choice.css +35 -0
  292. package/dist/toggle/choice.css.map +1 -1
  293. package/dist/toggle/choice.d.ts +45 -0
  294. package/dist/toggle/choice.d.ts.map +1 -1
  295. package/dist/toggle/choice.jsx +97 -23
  296. package/dist/toggle/index.d.ts +1 -1
  297. package/dist/toggle/index.d.ts.map +1 -1
  298. package/dist/toggle/index.jsx +1 -1
  299. package/package.json +22 -2
  300. package/skills/g9-lynx-app/references/catalog-index.md +24 -8
  301. package/skills/g9-lynx-app/references/components/appearance.md +70 -0
  302. package/skills/g9-lynx-app/references/components/barcode.md +1 -1
  303. package/skills/g9-lynx-app/references/components/button.md +4 -4
  304. package/skills/g9-lynx-app/references/components/calendar-1.md +205 -0
  305. package/skills/g9-lynx-app/references/components/calendar-2.md +36 -0
  306. package/skills/g9-lynx-app/references/components/canvas.md +33 -0
  307. package/skills/g9-lynx-app/references/components/chat-1.md +199 -0
  308. package/skills/g9-lynx-app/references/components/chat-2.md +119 -0
  309. package/skills/g9-lynx-app/references/components/commands.md +10 -2
  310. package/skills/g9-lynx-app/references/components/commerce.md +1 -1
  311. package/skills/g9-lynx-app/references/components/dashboard.md +61 -0
  312. package/skills/g9-lynx-app/references/components/display-1.md +22 -21
  313. package/skills/g9-lynx-app/references/components/display-2.md +36 -39
  314. package/skills/g9-lynx-app/references/components/display-3.md +41 -2
  315. package/skills/g9-lynx-app/references/components/fields.md +5 -5
  316. package/skills/g9-lynx-app/references/components/header.md +1 -1
  317. package/skills/g9-lynx-app/references/components/host.md +11 -0
  318. package/skills/g9-lynx-app/references/components/layout-1.md +1 -1
  319. package/skills/g9-lynx-app/references/components/list.md +7 -5
  320. package/skills/g9-lynx-app/references/components/map.md +19 -1
  321. package/skills/g9-lynx-app/references/components/media-1.md +203 -0
  322. package/skills/g9-lynx-app/references/components/media-2.md +66 -0
  323. package/skills/g9-lynx-app/references/components/notifications.md +37 -0
  324. package/skills/g9-lynx-app/references/components/popover.md +4 -2
  325. package/skills/g9-lynx-app/references/components/popup.md +2 -2
  326. package/skills/g9-lynx-app/references/components/projects.md +73 -0
  327. package/skills/g9-lynx-app/references/components/provider.md +1 -1
  328. package/skills/g9-lynx-app/references/components/range-slider.md +2 -2
  329. package/skills/g9-lynx-app/references/components/reader.md +37 -0
  330. package/skills/g9-lynx-app/references/components/richtext.md +54 -0
  331. package/skills/g9-lynx-app/references/components/route.md +14 -0
  332. package/skills/g9-lynx-app/references/components/shell.md +3 -2
  333. package/skills/g9-lynx-app/references/components/toggle.md +20 -3
  334. package/skills/g9-lynx-app/references/provider-and-host.md +4 -3
  335. package/skills/g9-lynx-app/references/components/calendar.md +0 -128
  336. package/skills/g9-lynx-app/references/components/chat.md +0 -98
  337. package/skills/g9-lynx-app/references/components/media.md +0 -115
@@ -0,0 +1,162 @@
1
+ import type { ComponentType } from '@lynx-js/react';
2
+ import type { G9ReadableStore } from './router.js';
3
+ /** The move a navigation was (the navigator picks its motion). */
4
+ export type G9NavKind = 'none' | 'tab' | 'forward' | 'back' | 'detail' | 'section' | 'fade';
5
+ /** A parsed path. */
6
+ export interface G9PageUrl {
7
+ readonly pathname: string;
8
+ readonly search: string;
9
+ readonly hash: string;
10
+ readonly href: string;
11
+ readonly searchParams: URLSearchParams;
12
+ }
13
+ /** What a page receives. */
14
+ export interface G9PathPageProps {
15
+ readonly params: Readonly<Record<string, string>>;
16
+ readonly url: G9PageUrl;
17
+ /** `full` (the whole content area), `master` (the list pane beside its details) or `detail` (beside the list). */
18
+ readonly pane: 'full' | 'master' | 'detail';
19
+ readonly state: Readonly<Record<string, unknown>>;
20
+ }
21
+ /** A list page that keeps its place beside its detail pages on wide windows. */
22
+ export interface G9MasterOptions {
23
+ /** The list's width (dp). Default 320. */
24
+ readonly width?: number;
25
+ /** In the content pane while no detail is open («Pick a conversation»). */
26
+ readonly empty?: ComponentType<Record<string, never>>;
27
+ }
28
+ /** One route. */
29
+ export interface G9PathRoute {
30
+ /** `/c/:id`, `/projects/:id/board`, `/automation/:id?` (an optional last part), `/admin/*` (the rest as `rest`). */
31
+ readonly pattern: string;
32
+ readonly component: ComponentType<G9PathPageProps>;
33
+ /** The app's frame for the page (`app`, `auth`, `bare`…). */
34
+ readonly layout?: string;
35
+ /** The tab / rail destination it belongs to. */
36
+ readonly section?: string;
37
+ /** The root page of its section (tab bar shown; a tab switch starts a fresh stack). */
38
+ readonly root?: boolean;
39
+ /** This page is a list with its details beside it on wide windows. */
40
+ readonly master?: G9MasterOptions;
41
+ /** The `pattern` of the master route this page opens beside on wide windows. */
42
+ readonly detailOf?: string;
43
+ /** Open without signing in. */
44
+ readonly public?: boolean;
45
+ /** What it is (G9AppPilot's places). */
46
+ readonly describe?: string;
47
+ }
48
+ /** One page in the stack. */
49
+ export interface G9PathEntry {
50
+ readonly key: number;
51
+ readonly url: G9PageUrl;
52
+ readonly params: Readonly<Record<string, string>>;
53
+ readonly route: G9PathRoute;
54
+ /** History state (`replaceState(url, state)`). */
55
+ readonly state: Readonly<Record<string, unknown>>;
56
+ }
57
+ /** A navigation about to happen (a `beforeNavigate` listener may cancel it). */
58
+ export interface G9Navigation {
59
+ readonly from: {
60
+ readonly url: G9PageUrl;
61
+ readonly params: Readonly<Record<string, string>>;
62
+ } | null;
63
+ readonly to: {
64
+ readonly url: G9PageUrl;
65
+ readonly params: Readonly<Record<string, string>>;
66
+ };
67
+ readonly type: 'goto' | 'popstate';
68
+ cancel(): void;
69
+ }
70
+ /** What the navigator draws. */
71
+ export interface G9PathRouterState {
72
+ /** Bottom to top. */
73
+ readonly stack: readonly G9PathEntry[];
74
+ readonly kind: G9NavKind;
75
+ /** Grows on every navigation. */
76
+ readonly version: number;
77
+ /** The page just popped, still leaving (the navigator clears it after its motion). */
78
+ readonly leaving: G9PathEntry | null;
79
+ }
80
+ /** `goto`'s options. */
81
+ export interface G9GotoOptions {
82
+ readonly replaceState?: boolean;
83
+ readonly state?: Record<string, unknown>;
84
+ }
85
+ /** Options of {@link createG9PathRouter}. */
86
+ export interface G9PathRouterOptions {
87
+ /** More specific patterns first. */
88
+ readonly routes: readonly G9PathRoute[];
89
+ /** For a path no route takes. */
90
+ readonly notFound: G9PathRoute;
91
+ /** Each section's root path (default: the pattern of the section's first `root` route). */
92
+ readonly sectionRoots?: Readonly<Record<string, string>>;
93
+ /** Wide windows put details beside their list (default false: phones). */
94
+ readonly isWide?: () => boolean;
95
+ /** The web host mirrors the stack into the browser history. */
96
+ readonly history?: (path: string, replace: boolean) => void;
97
+ /** Native hosts learn whether back belongs to the page. */
98
+ readonly onChange?: (canGoBack: boolean) => void;
99
+ }
100
+ /** A path router (a store the navigator reads). */
101
+ export interface G9PathRouter extends G9ReadableStore<G9PathRouterState> {
102
+ match(href: string): {
103
+ readonly route: G9PathRoute;
104
+ readonly params: Record<string, string>;
105
+ readonly url: G9PageUrl;
106
+ };
107
+ /** Navigates; false when a guard cancelled it. */
108
+ goto(href: string, options?: G9GotoOptions): Promise<boolean>;
109
+ /** Pops the top page; false when there is nothing to go back to (the host may leave the app). */
110
+ back(): boolean;
111
+ /** Shallow: the top entry's address and state change without a move (filters, an open sheet). */
112
+ replaceState(href: string, state?: Record<string, unknown>): void;
113
+ beforeNavigate(listener: (navigation: G9Navigation) => void): () => void;
114
+ afterNavigate(listener: (navigation: Omit<G9Navigation, 'cancel'>) => void): () => void;
115
+ /** Another host's history and back reporting. */
116
+ configureHost(options: {
117
+ readonly history?: (path: string, replace: boolean) => void;
118
+ readonly onChange?: (canGoBack: boolean) => void;
119
+ }): void;
120
+ routeByPattern(pattern: string): G9PathRoute | null;
121
+ sectionRoot(section: string): string;
122
+ /** The top entry's address (`/`). */
123
+ currentPath(): string;
124
+ readonly page: {
125
+ readonly url: G9PageUrl;
126
+ readonly params: Readonly<Record<string, string>>;
127
+ readonly state: Readonly<Record<string, unknown>>;
128
+ readonly route: string | null;
129
+ };
130
+ /** The navigator says the leaving page finished its motion. */
131
+ clearLeaving(key: number): void;
132
+ isWide(): boolean;
133
+ /** For G9AppPilot's `registerG9Router`: where, go and the places (patterns with a `:` need an id). */
134
+ pilot(): {
135
+ where(): {
136
+ readonly unique: string;
137
+ readonly pattern: string | null;
138
+ readonly section: string | null;
139
+ readonly depth: number;
140
+ };
141
+ go(address: string): Promise<{
142
+ readonly ok: boolean;
143
+ readonly at: string;
144
+ }>;
145
+ places(): readonly {
146
+ readonly address: string;
147
+ readonly kind: string;
148
+ readonly describe?: string;
149
+ readonly needsId: boolean;
150
+ }[];
151
+ };
152
+ }
153
+ /** Parses `/c/42?msg=7#top`. */
154
+ export declare function g9ParsePath(href: string): G9PageUrl;
155
+ /** A pattern as a regular expression and its parameter names. */
156
+ export declare function g9CompilePattern(pattern: string): {
157
+ readonly regex: RegExp;
158
+ readonly names: readonly string[];
159
+ };
160
+ /** Creates a path router. */
161
+ export declare function createG9PathRouter(options: G9PathRouterOptions): G9PathRouter;
162
+ //# sourceMappingURL=path-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-router.d.ts","sourceRoot":"","sources":["../../src/route/path-router.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,kEAAkE;AAClE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5F,qBAAqB;AACrB,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAC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K,IAAI;YACP,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;YACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;YAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;YAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;YAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;YAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC5E,MAAM,IAAI,SAAS;YACjB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;YACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;YAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;SAC3B,EAAE,CAAC;KACL,CAAC;CACH;AAED,gCAAgC;AAChC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAQnD;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAe/G;AAED,6BAA6B;AAC7B,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAoM7E"}
@@ -0,0 +1,327 @@
1
+ function g9ParsePath(href) {
2
+ const at = href.indexOf('#');
3
+ const hash = at >= 0 ? href.slice(at) : '';
4
+ const beforeHash = at >= 0 ? href.slice(0, at) : href;
5
+ const q = beforeHash.indexOf('?');
6
+ const pathname = (q >= 0 ? beforeHash.slice(0, q) : beforeHash) || '/';
7
+ const search = q >= 0 ? beforeHash.slice(q) : '';
8
+ return {
9
+ pathname,
10
+ search,
11
+ hash,
12
+ href: `${pathname}${search}${hash}`,
13
+ searchParams: new URLSearchParams(search)
14
+ };
15
+ }
16
+ function g9CompilePattern(pattern) {
17
+ const names = [];
18
+ if ('/' === pattern) return {
19
+ regex: /^\/$/,
20
+ names
21
+ };
22
+ let source = '^';
23
+ for (const part of pattern.split('/').filter(Boolean))if ('*' === part) {
24
+ source += '(?:/(.*))?';
25
+ names.push('rest');
26
+ } else if (part.startsWith(':')) {
27
+ const optional = part.endsWith('?');
28
+ names.push(part.slice(1).replace(/\?$/, ''));
29
+ source += optional ? '(?:/([^/]+))?' : '/([^/]+)';
30
+ } else source += `/${part.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}`;
31
+ return {
32
+ regex: new RegExp(`${source}/?$`),
33
+ names
34
+ };
35
+ }
36
+ function createG9PathRouter(options) {
37
+ var _options_isWide, _options_history, _options_onChange;
38
+ const compiled = options.routes.map((def)=>({
39
+ def,
40
+ ...g9CompilePattern(def.pattern)
41
+ }));
42
+ const roots = {};
43
+ for (const def of options.routes)if (def.root && def.section && !(def.section in roots)) roots[def.section] = def.pattern;
44
+ Object.assign(roots, options.sectionRoots);
45
+ const wide = null != (_options_isWide = options.isWide) ? _options_isWide : ()=>false;
46
+ let history = null != (_options_history = options.history) ? _options_history : null;
47
+ let onChange = null != (_options_onChange = options.onChange) ? _options_onChange : null;
48
+ const before = new Set();
49
+ const after = new Set();
50
+ const listeners = new Set();
51
+ let entryKey = 0;
52
+ let state = {
53
+ stack: [],
54
+ kind: 'none',
55
+ version: 0,
56
+ leaving: null
57
+ };
58
+ const set = (next)=>{
59
+ state = {
60
+ ...state,
61
+ ...next
62
+ };
63
+ for (const l of [
64
+ ...listeners
65
+ ])l();
66
+ };
67
+ const top = ()=>{
68
+ var _state_stack_;
69
+ return null != (_state_stack_ = state.stack[state.stack.length - 1]) ? _state_stack_ : null;
70
+ };
71
+ const match = (href)=>{
72
+ const url = g9ParsePath(href);
73
+ for (const route of compiled){
74
+ const found = route.regex.exec(url.pathname);
75
+ if (!found) continue;
76
+ const params = {};
77
+ route.names.forEach((name, i)=>{
78
+ const value = found[i + 1];
79
+ if (void 0 !== value) params[name] = decodeURIComponent(value);
80
+ });
81
+ return {
82
+ route: route.def,
83
+ params,
84
+ url
85
+ };
86
+ }
87
+ return {
88
+ route: options.notFound,
89
+ params: {},
90
+ url
91
+ };
92
+ };
93
+ const kindFor = (from, to, replace)=>{
94
+ if (!from) return 'none';
95
+ if (from.route.section !== to.section) return to.root ? 'tab' : 'forward';
96
+ if (to.root && from.route.root) return replace ? 'fade' : 'tab';
97
+ if (to.detailOf && wide() && (from.route.detailOf === to.detailOf || from.route.pattern === to.detailOf)) return 'detail';
98
+ return replace ? 'fade' : 'forward';
99
+ };
100
+ const guard = (to, type)=>{
101
+ const current = top();
102
+ let cancelled = false;
103
+ const navigation = {
104
+ from: current ? {
105
+ url: current.url,
106
+ params: current.params
107
+ } : null,
108
+ to,
109
+ type,
110
+ cancel: ()=>{
111
+ cancelled = true;
112
+ }
113
+ };
114
+ for (const l of [
115
+ ...before
116
+ ])l(navigation);
117
+ return !cancelled;
118
+ };
119
+ const settle = (type, next)=>{
120
+ set({
121
+ ...next,
122
+ version: state.version + 1
123
+ });
124
+ const current = top();
125
+ const below = state.stack.length > 1 ? state.stack[state.stack.length - 2] : null;
126
+ for (const l of [
127
+ ...after
128
+ ])l({
129
+ from: below ? {
130
+ url: below.url,
131
+ params: below.params
132
+ } : null,
133
+ to: {
134
+ url: current.url,
135
+ params: current.params
136
+ },
137
+ type
138
+ });
139
+ null == onChange || onChange(state.stack.length > 1);
140
+ };
141
+ const sectionRoot = (section)=>{
142
+ var _roots_section;
143
+ return null != (_roots_section = roots[section]) ? _roots_section : '/';
144
+ };
145
+ const goto = async (href, opts = {})=>{
146
+ var _opts_state;
147
+ const next = match(href);
148
+ if (!guard({
149
+ url: next.url,
150
+ params: next.params
151
+ }, 'goto')) return false;
152
+ const current = top();
153
+ const existing = state.stack.findIndex((e)=>e.url.href === next.url.href);
154
+ if (existing >= 0 && existing < state.stack.length - 1 && !opts.replaceState) {
155
+ null == history || history(next.url.href, true);
156
+ settle('goto', {
157
+ kind: 'back',
158
+ leaving: top(),
159
+ stack: state.stack.slice(0, existing + 1)
160
+ });
161
+ return true;
162
+ }
163
+ const entry = {
164
+ key: current ? ++entryKey : 0,
165
+ url: next.url,
166
+ params: next.params,
167
+ route: next.route,
168
+ state: null != (_opts_state = opts.state) ? _opts_state : {}
169
+ };
170
+ const kind = kindFor(current, next.route, true === opts.replaceState);
171
+ let stack;
172
+ stack = current ? 'tab' === kind || next.route.root && current.route.section !== next.route.section ? [
173
+ entry
174
+ ] : opts.replaceState ? [
175
+ ...state.stack.slice(0, -1),
176
+ entry
177
+ ] : [
178
+ ...state.stack,
179
+ entry
180
+ ] : [
181
+ entry
182
+ ];
183
+ null == history || history(next.url.href, true === opts.replaceState || 'tab' === kind);
184
+ settle('goto', {
185
+ kind,
186
+ leaving: null,
187
+ stack
188
+ });
189
+ return true;
190
+ };
191
+ const back = ()=>{
192
+ if (state.stack.length <= 1) {
193
+ const current = top();
194
+ if (current && !current.route.root && current.route.section) {
195
+ goto(sectionRoot(current.route.section), {
196
+ replaceState: true
197
+ }).then((done)=>{
198
+ if (done) set({
199
+ kind: 'back'
200
+ });
201
+ });
202
+ return true;
203
+ }
204
+ return false;
205
+ }
206
+ const below = state.stack[state.stack.length - 2];
207
+ if (!guard({
208
+ url: below.url,
209
+ params: below.params
210
+ }, 'popstate')) return true;
211
+ null == history || history(below.url.href, true);
212
+ settle('popstate', {
213
+ kind: 'back',
214
+ leaving: top(),
215
+ stack: state.stack.slice(0, -1)
216
+ });
217
+ return true;
218
+ };
219
+ const router = {
220
+ get: ()=>state,
221
+ subscribe (listener) {
222
+ listeners.add(listener);
223
+ return ()=>listeners.delete(listener);
224
+ },
225
+ match,
226
+ goto,
227
+ back,
228
+ replaceState (href, next = {}) {
229
+ const current = top();
230
+ if (!current) return;
231
+ const found = match(href);
232
+ null == history || history(found.url.href, true);
233
+ set({
234
+ stack: [
235
+ ...state.stack.slice(0, -1),
236
+ {
237
+ ...current,
238
+ url: found.url,
239
+ params: found.params,
240
+ state: next
241
+ }
242
+ ],
243
+ kind: 'none',
244
+ version: state.version + 1
245
+ });
246
+ },
247
+ beforeNavigate (listener) {
248
+ before.add(listener);
249
+ return ()=>before.delete(listener);
250
+ },
251
+ afterNavigate (listener) {
252
+ after.add(listener);
253
+ return ()=>after.delete(listener);
254
+ },
255
+ configureHost (host) {
256
+ var _host_history, _host_onChange;
257
+ history = null != (_host_history = host.history) ? _host_history : null;
258
+ onChange = null != (_host_onChange = host.onChange) ? _host_onChange : null;
259
+ },
260
+ routeByPattern: (pattern)=>{
261
+ var _ref;
262
+ var _compiled_find;
263
+ return null != (_ref = null == (_compiled_find = compiled.find((r)=>r.def.pattern === pattern)) ? void 0 : _compiled_find.def) ? _ref : null;
264
+ },
265
+ sectionRoot,
266
+ currentPath: ()=>{
267
+ var _ref;
268
+ var _top;
269
+ return null != (_ref = null == (_top = top()) ? void 0 : _top.url.href) ? _ref : '/';
270
+ },
271
+ page: {
272
+ get url () {
273
+ var _ref;
274
+ var _top;
275
+ return null != (_ref = null == (_top = top()) ? void 0 : _top.url) ? _ref : g9ParsePath('/');
276
+ },
277
+ get params () {
278
+ var _ref;
279
+ var _top;
280
+ return null != (_ref = null == (_top = top()) ? void 0 : _top.params) ? _ref : {};
281
+ },
282
+ get state () {
283
+ var _ref;
284
+ var _top;
285
+ return null != (_ref = null == (_top = top()) ? void 0 : _top.state) ? _ref : {};
286
+ },
287
+ get route () {
288
+ var _ref;
289
+ var _top;
290
+ return null != (_ref = null == (_top = top()) ? void 0 : _top.route.pattern) ? _ref : null;
291
+ }
292
+ },
293
+ clearLeaving (key) {
294
+ var _state_leaving;
295
+ if ((null == (_state_leaving = state.leaving) ? void 0 : _state_leaving.key) === key) set({
296
+ leaving: null
297
+ });
298
+ },
299
+ isWide: ()=>wide(),
300
+ pilot: ()=>({
301
+ where: ()=>{
302
+ var _ref, _ref1;
303
+ const current = top();
304
+ return {
305
+ unique: router.currentPath(),
306
+ pattern: null != (_ref = null == current ? void 0 : current.route.pattern) ? _ref : null,
307
+ section: null != (_ref1 = null == current ? void 0 : current.route.section) ? _ref1 : null,
308
+ depth: state.stack.length
309
+ };
310
+ },
311
+ go: async (address)=>({
312
+ ok: await goto(address),
313
+ at: router.currentPath()
314
+ }),
315
+ places: ()=>options.routes.map((r)=>({
316
+ address: r.pattern,
317
+ kind: r.pattern,
318
+ ...r.describe ? {
319
+ describe: r.describe
320
+ } : {},
321
+ needsId: /[:*]/.test(r.pattern)
322
+ }))
323
+ })
324
+ };
325
+ return router;
326
+ }
327
+ export { createG9PathRouter, g9CompilePattern, g9ParsePath };
@@ -1 +1 @@
1
- {"version":3,"file":"selection-sheet.d.ts","sourceRoot":"","sources":["../../src/selection/selection-sheet.tsx"],"names":[],"mappings":"AACA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAIL,KAAK,oBAAoB,EAE1B,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,KAAK,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAQ7E,OAAO,EAAiE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,+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,C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wBAAgB,aAAa,CAAC,CAAC,SAAS,eAAe,EACrD,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC7B,OAAO,CAAC,CAAC,EAAE,CAAC,CAiEd"}
@@ -68,7 +68,7 @@ function SelectionRow(props) {
68
68
  id: props.elementId
69
69
  } : {}} ref={anchor.ref} className={`g9-selection-row${selected ? ' g9-selection-row--selected' : ''}`} style={selected ? {
70
70
  backgroundColor: formatColor(withAlpha(palette.Primary, 0.1))
71
- } : {}} accessibility-element={true} accessibility-traits="button" accessibility-label={item.text} {...selected ? {
71
+ } : {}} accessibility-element={true} accessibility-traits="button" accessibility-label={itemSpeech(item)} {...selected ? {
72
72
  'accessibility-value': 'selected'
73
73
  } : {}} bindtap={press}>
74
74
  <view className={`g9-selection-row__inner g9-dir-${props.direction}`} style={{
@@ -80,14 +80,19 @@ function SelectionRow(props) {
80
80
  {hasIconSlot(icon) ? <G9IconSlot {...icon} size={iconSize} color={iconColor} {...avatar ? {
81
81
  imageCornerRadius: iconSize / 2
82
82
  } : {}}/> : (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"/>}
83
- <text className="g9-selection-row__text" text-maxline="1" style={{
83
+ <view className="g9-selection-row__texts">
84
+ <text className="g9-selection-row__text" text-maxline="1" style={{
84
85
  color: selected ? palette.Primary : palette.TextPrimary,
85
86
  fontWeight: selected ? 'bold' : 'normal',
86
87
  fontFamily: g9FontFamilyFor(selected ? 'bold' : 'normal'),
87
88
  ...g9TextStart(props.direction)
88
89
  }}>
89
- {item.text}
90
- </text>
90
+ {item.text}
91
+ </text>
92
+ {item.subtitle ? <text className="g9-selection-row__subtitle" text-maxline="2" style={g9TextStart(props.direction)}>
93
+ {item.subtitle}
94
+ </text> : null}
95
+ </view>
91
96
  <view style={{
92
97
  opacity: selected ? 1 : 0
93
98
  }}>
@@ -211,7 +216,7 @@ function showSelectionSheet(sheets, request) {
211
216
  const initial = createSelectionModel({
212
217
  items,
213
218
  getKey: (item)=>ids[items.indexOf(item)],
214
- getText: (item)=>item.text,
219
+ getText: (item)=>item.subtitle ? `${item.text} ${item.subtitle}` : item.text,
215
220
  mode: multiple ? 'multiple' : 'single',
216
221
  selectedKeys: initialKeys,
217
222
  isEnabled: (item)=>false !== item.isEnabled
@@ -339,7 +344,7 @@ function showListSheet(sheets, request) {
339
344
  const initial = createSelectionModel({
340
345
  items,
341
346
  getKey: keyOf,
342
- getText: (item)=>item.text,
347
+ getText: (item)=>item.subtitle ? `${item.text} ${item.subtitle}` : item.text,
343
348
  mode: multiple ? 'multiple' : 'single',
344
349
  selectedKeys: (null != (_request_selected = request.selected) ? _request_selected : []).map(keyOf),
345
350
  isEnabled: (item)=>false !== item.isEnabled
@@ -423,6 +428,9 @@ function ListPickerBody(props) {
423
428
  </view> : null}
424
429
  </view>;
425
430
  }
431
+ function itemSpeech(item) {
432
+ return item.subtitle ? `${item.text}, ${item.subtitle}` : item.text;
433
+ }
426
434
  function ListPickerRow(props) {
427
435
  const press = useG9Press(props.onTap, {
428
436
  source: 'G9ListPicker',
@@ -440,11 +448,16 @@ function ListPickerRow(props) {
440
448
  ...props.selected ? {
441
449
  backgroundColor: props.tint
442
450
  } : {}
443
- }} accessibility-element={true} accessibility-traits="button" accessibility-label={props.item.text} bindtap={press}>
451
+ }} accessibility-element={true} accessibility-traits="button" accessibility-label={itemSpeech(props.item)} bindtap={press}>
444
452
  {hasIconSlot(icon) ? <G9IconSlot {...icon} size={20} color="var(--g9-on-surface-variant)"/> : null}
445
- <text className="g9-list-picker__text" text-maxline="1" style={g9TextStart(direction)}>
446
- {props.item.text}
447
- </text>
453
+ <view className="g9-selection-row__texts">
454
+ <text className="g9-list-picker__text" text-maxline="1" style={g9TextStart(direction)}>
455
+ {props.item.text}
456
+ </text>
457
+ {props.item.subtitle ? <text className="g9-selection-row__subtitle" text-maxline="2" style={g9TextStart(direction)}>
458
+ {props.item.subtitle}
459
+ </text> : null}
460
+ </view>
448
461
  </view>;
449
462
  }
450
463
  export { estimateSelectionHeight, g9SelectionCloseDelayMs, g9SelectionEagerBuildItemLimit, g9SelectionRowHeight, g9SelectionSearchDebounceMs, g9SelectionSkeletonRowCap, selectionIdentities, showListSheet, showSelectionSheet };
@@ -37,11 +37,26 @@
37
37
  height: 1px;
38
38
  }
39
39
 
40
+ .g9-selection-row__texts {
41
+ flex-direction: column;
42
+ flex: 1;
43
+ row-gap: 2px;
44
+ min-width: 0;
45
+ padding: 6px 0;
46
+ display: flex;
47
+ }
48
+
49
+ .g9-selection-row__subtitle {
50
+ font-size: 12px;
51
+ font-family: var(--g9-font-text);
52
+ color: var(--g9-text-secondary);
53
+ text-overflow: ellipsis;
54
+ }
55
+
40
56
  .g9-selection-row__text {
41
57
  font-size: 14px;
42
58
  font-family: var(--g9-font-text);
43
59
  text-overflow: ellipsis;
44
- flex: 1;
45
60
  }
46
61
 
47
62
  .g9-selection__empty {
@@ -92,7 +107,9 @@
92
107
  font-size: 14px;
93
108
  font-family: var(--g9-font-text);
94
109
  color: var(--g9-text-primary);
110
+ text-overflow: ellipsis;
95
111
  flex: 1;
112
+ overflow: hidden;
96
113
  }
97
114
 
98
115
  .g9-list-picker__apply {
@@ -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,eAAe;EACf,gCAAgC;EAChC,uBAAuB;EACvB,OAAO;AACT;;AAQA;EALE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;AACpB;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;AACpB;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AASA;EANE,6CAA6C;EAC7C,mBAAmB;EACnB,gBAAgB;AAClB;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,qCAAqC;AACvC;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;AACf;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,6BAA6B;EAC7B,OAAO;AACT;;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 font-family: var(--g9-font-text);\n text-overflow: ellipsis;\n}\n\n.g9-selection__empty {\n padding: 28px 16px;\n font-size: 13px;\n font-family: var(--g9-font-text);\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 font-family: var(--g9-font-text);\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 font-family: var(--g9-font-text);\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 font-family: var(--g9-font-text);\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,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,YAAY;EACZ,cAAc;EACd,aAAa;AACf;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;EAC/B,uBAAuB;AACzB;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,uBAAuB;AACzB;;AASA;EANE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;AACpB;;AAUA;EAPE,eAAe;EACf,gCAAgC;EAChC,kBAAkB;EAClB,8BAA8B;EAC9B,kBAAkB;AACpB;;AAUA;EAPE,mBAAmB;EACnB,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAUA;EAPE,6CAA6C;EAC7C,mBAAmB;EACnB,gBAAgB;AAClB;;AAUA;EAPE,eAAe;EACf,gCAAgC;EAChC,qCAAqC;AACvC;;AAUA;EAPE,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB;EAChB,eAAe;EACf,aAAa;AACf;;AAUA;EAPE,eAAe;EACf,gCAAgC;EAChC,6BAA6B;EAC7B,uBAAuB;EACvB,OAAO;EACP,gBAAgB;AAClB;;AAWA;EARE,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__texts {\n flex: 1;\n min-width: 0px;\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n padding: 6px 0px;\n}\n\n/* An item's second line (2.5.7). */\n.g9-selection-row__subtitle {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n text-overflow: ellipsis;\n}\n\n.g9-selection-row__text {\n font-size: 14px;\n font-family: var(--g9-font-text);\n text-overflow: ellipsis;\n}\n\n.g9-selection__empty {\n padding: 28px 16px;\n font-size: 13px;\n font-family: var(--g9-font-text);\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 font-family: var(--g9-font-text);\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 font-family: var(--g9-font-text);\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 font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n /* a text-maxline text on Android draws its other lines out of the box unless it clips (2.5.8) */\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-list-picker__apply {\n padding: 12px 16px;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/sheet/frame.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAYrB,OAAO,EAAiB,KAAK,SAAS,EAAoD,MAAM,gBAAgB,CAAC;AAajH,OAAO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