@g9tm/lynxcontrols 2.5.7 → 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 (251) hide show
  1. package/catalog/cards/G9AppearancePage.md +17 -0
  2. package/catalog/cards/G9Badge.md +1 -1
  3. package/catalog/cards/G9Button.md +2 -2
  4. package/catalog/cards/G9Card.md +1 -1
  5. package/catalog/cards/G9Chip.md +1 -1
  6. package/catalog/cards/G9ChipStrip.md +16 -0
  7. package/catalog/cards/G9CodeBlock.md +17 -0
  8. package/catalog/cards/G9CommandPalette.md +3 -1
  9. package/catalog/cards/G9ConnectionBanner.md +1 -1
  10. package/catalog/cards/G9ContrastPanel.md +15 -0
  11. package/catalog/cards/G9DashboardCustomizeSheet.md +17 -0
  12. package/catalog/cards/G9DashboardGrid.md +17 -0
  13. package/catalog/cards/G9DragList.md +4 -2
  14. package/catalog/cards/G9Editor.md +1 -1
  15. package/catalog/cards/G9ErrorBoundary.md +3 -2
  16. package/catalog/cards/G9Menu.md +1 -1
  17. package/catalog/cards/G9MenuList.md +2 -0
  18. package/catalog/cards/G9NotificationCenter.md +17 -0
  19. package/catalog/cards/G9NotificationCenterPanel.md +17 -0
  20. package/catalog/cards/G9PathNavigator.md +13 -0
  21. package/catalog/cards/G9PersonalThemeSheet.md +17 -0
  22. package/catalog/cards/G9Popover.md +1 -1
  23. package/catalog/cards/G9Provider.md +1 -1
  24. package/catalog/cards/G9ReaderSheet.md +17 -0
  25. package/catalog/cards/G9ReaderView.md +17 -0
  26. package/catalog/cards/G9SafeButton.md +2 -2
  27. package/catalog/cards/G9SearchEntry.md +1 -1
  28. package/catalog/cards/G9SecretValue.md +17 -0
  29. package/catalog/cards/G9ShortcutList.md +4 -0
  30. package/catalog/cards/G9ShortcutsSheet.md +3 -1
  31. package/catalog/cards/G9StatusPill.md +1 -1
  32. package/catalog/cards/G9Tag.md +1 -1
  33. package/catalog/cards/G9TextEntry.md +1 -1
  34. package/catalog/cards/G9VirtualList.md +1 -1
  35. package/catalog/cards/G9WallpaperSwatch.md +16 -0
  36. package/catalog/cards/G9WidgetSkeleton.md +9 -0
  37. package/catalog/cards/G9WidgetSlot.md +13 -0
  38. package/catalog/cards/PopupFrame.md +2 -2
  39. package/catalog/catalog.json +6947 -479
  40. package/catalog/index.md +18 -2
  41. package/dist/.tsbuildinfo +1 -1
  42. package/dist/appearance/appearance.css +264 -0
  43. package/dist/appearance/appearance.css.map +1 -0
  44. package/dist/appearance/appearance.d.ts +148 -0
  45. package/dist/appearance/appearance.d.ts.map +1 -0
  46. package/dist/appearance/appearance.jsx +604 -0
  47. package/dist/appearance/index.d.ts +2 -0
  48. package/dist/appearance/index.d.ts.map +1 -0
  49. package/dist/appearance/index.jsx +1 -0
  50. package/dist/base/control.d.ts +15 -0
  51. package/dist/base/control.d.ts.map +1 -1
  52. package/dist/base/control.jsx +13 -1
  53. package/dist/base/index.d.ts +1 -1
  54. package/dist/base/index.d.ts.map +1 -1
  55. package/dist/base/index.jsx +1 -1
  56. package/dist/button/button.css +4 -0
  57. package/dist/button/button.css.map +1 -1
  58. package/dist/cascade/cascade.css +2 -0
  59. package/dist/cascade/cascade.css.map +1 -1
  60. package/dist/commands/commands.css +46 -0
  61. package/dist/commands/commands.css.map +1 -1
  62. package/dist/commands/index.d.ts +2 -2
  63. package/dist/commands/index.d.ts.map +1 -1
  64. package/dist/commands/index.jsx +2 -2
  65. package/dist/commands/keys.d.ts +15 -1
  66. package/dist/commands/keys.d.ts.map +1 -1
  67. package/dist/commands/keys.jsx +20 -1
  68. package/dist/commands/palette.d.ts +73 -7
  69. package/dist/commands/palette.d.ts.map +1 -1
  70. package/dist/commands/palette.jsx +174 -20
  71. package/dist/dashboard/dashboard.css +101 -0
  72. package/dist/dashboard/dashboard.css.map +1 -0
  73. package/dist/dashboard/dashboard.d.ts +73 -0
  74. package/dist/dashboard/dashboard.d.ts.map +1 -0
  75. package/dist/dashboard/dashboard.jsx +297 -0
  76. package/dist/dashboard/index.d.ts +3 -0
  77. package/dist/dashboard/index.d.ts.map +1 -0
  78. package/dist/dashboard/index.jsx +2 -0
  79. package/dist/dashboard/model.d.ts +53 -0
  80. package/dist/dashboard/model.d.ts.map +1 -0
  81. package/dist/dashboard/model.jsx +76 -0
  82. package/dist/display/code.css +109 -0
  83. package/dist/display/code.css.map +1 -0
  84. package/dist/display/code.d.ts +43 -0
  85. package/dist/display/code.d.ts.map +1 -0
  86. package/dist/display/code.jsx +101 -0
  87. package/dist/display/extras.d.ts +7 -2
  88. package/dist/display/extras.d.ts.map +1 -1
  89. package/dist/display/extras.jsx +13 -4
  90. package/dist/display/index.d.ts +1 -0
  91. package/dist/display/index.d.ts.map +1 -1
  92. package/dist/display/index.jsx +1 -0
  93. package/dist/display/motion-figures.css +2 -0
  94. package/dist/display/motion-figures.css.map +1 -1
  95. package/dist/display/motion-figures.d.ts.map +1 -1
  96. package/dist/display/motion-figures.jsx +14 -7
  97. package/dist/display/theme-preview.css +4 -0
  98. package/dist/display/theme-preview.css.map +1 -1
  99. package/dist/fields/extra-entries.css +1 -0
  100. package/dist/fields/extra-entries.css.map +1 -1
  101. package/dist/fields/extra-entries.d.ts +2 -0
  102. package/dist/fields/extra-entries.d.ts.map +1 -1
  103. package/dist/fields/extra-entries.jsx +3 -2
  104. package/dist/header/header.css +2 -0
  105. package/dist/header/header.css.map +1 -1
  106. package/dist/host/carry-contexts.d.ts.map +1 -1
  107. package/dist/host/carry-contexts.jsx +22 -8
  108. package/dist/index.d.ts +4 -0
  109. package/dist/index.d.ts.map +1 -1
  110. package/dist/layout/layout.css +2 -0
  111. package/dist/layout/layout.css.map +1 -1
  112. package/dist/list/gestures.d.ts +39 -6
  113. package/dist/list/gestures.d.ts.map +1 -1
  114. package/dist/list/gestures.jsx +284 -89
  115. package/dist/list/index.d.ts +3 -2
  116. package/dist/list/index.d.ts.map +1 -1
  117. package/dist/list/index.jsx +2 -1
  118. package/dist/list/keyboard.d.ts +50 -0
  119. package/dist/list/keyboard.d.ts.map +1 -0
  120. package/dist/list/keyboard.jsx +117 -0
  121. package/dist/list/list.css +28 -5
  122. package/dist/list/list.css.map +1 -1
  123. package/dist/list/rows.d.ts.map +1 -1
  124. package/dist/list/rows.jsx +3 -3
  125. package/dist/list/virtual-list.d.ts +27 -1
  126. package/dist/list/virtual-list.d.ts.map +1 -1
  127. package/dist/list/virtual-list.jsx +49 -4
  128. package/dist/notifications/index.d.ts +3 -0
  129. package/dist/notifications/index.d.ts.map +1 -0
  130. package/dist/notifications/index.jsx +2 -0
  131. package/dist/notifications/model.d.ts +47 -0
  132. package/dist/notifications/model.d.ts.map +1 -0
  133. package/dist/notifications/model.jsx +51 -0
  134. package/dist/notifications/notification-center.d.ts +98 -0
  135. package/dist/notifications/notification-center.d.ts.map +1 -0
  136. package/dist/notifications/notification-center.jsx +424 -0
  137. package/dist/notifications/notifications.css +266 -0
  138. package/dist/notifications/notifications.css.map +1 -0
  139. package/dist/orb/orb.css +2 -0
  140. package/dist/orb/orb.css.map +1 -1
  141. package/dist/pickers/pickers.css +15 -0
  142. package/dist/pickers/pickers.css.map +1 -1
  143. package/dist/plus-button/plus-button.css +2 -0
  144. package/dist/plus-button/plus-button.css.map +1 -1
  145. package/dist/plus-button/plus-button.d.ts.map +1 -1
  146. package/dist/plus-button/plus-button.jsx +2 -1
  147. package/dist/popover/popover.css +23 -1
  148. package/dist/popover/popover.css.map +1 -1
  149. package/dist/popover/popover.d.ts +14 -0
  150. package/dist/popover/popover.d.ts.map +1 -1
  151. package/dist/popover/popover.jsx +73 -12
  152. package/dist/popover/position.d.ts +6 -2
  153. package/dist/popover/position.d.ts.map +1 -1
  154. package/dist/popover/position.jsx +15 -4
  155. package/dist/popup/popup.css +3 -0
  156. package/dist/popup/popup.css.map +1 -1
  157. package/dist/provider/provider.d.ts +6 -1
  158. package/dist/provider/provider.d.ts.map +1 -1
  159. package/dist/provider/provider.jsx +22 -2
  160. package/dist/reader/index.d.ts +2 -0
  161. package/dist/reader/index.d.ts.map +1 -0
  162. package/dist/reader/index.jsx +1 -0
  163. package/dist/reader/reader.css +74 -0
  164. package/dist/reader/reader.css.map +1 -0
  165. package/dist/reader/reader.d.ts +76 -0
  166. package/dist/reader/reader.d.ts.map +1 -0
  167. package/dist/reader/reader.jsx +149 -0
  168. package/dist/route/index.d.ts +2 -0
  169. package/dist/route/index.d.ts.map +1 -1
  170. package/dist/route/index.jsx +2 -0
  171. package/dist/route/path-navigator.css +42 -0
  172. package/dist/route/path-navigator.css.map +1 -0
  173. package/dist/route/path-navigator.d.ts +25 -0
  174. package/dist/route/path-navigator.d.ts.map +1 -0
  175. package/dist/route/path-navigator.jsx +98 -0
  176. package/dist/route/path-router.d.ts +162 -0
  177. package/dist/route/path-router.d.ts.map +1 -0
  178. package/dist/route/path-router.jsx +327 -0
  179. package/dist/selection/selection.css +2 -0
  180. package/dist/selection/selection.css.map +1 -1
  181. package/dist/sheet/frame.d.ts.map +1 -1
  182. package/dist/sheet/frame.jsx +9 -8
  183. package/dist/sheet/options.d.ts +6 -1
  184. package/dist/sheet/options.d.ts.map +1 -1
  185. package/dist/sheet/options.jsx +2 -1
  186. package/dist/sheet/panel-frame.d.ts.map +1 -1
  187. package/dist/sheet/panel-frame.jsx +5 -4
  188. package/dist/sheet/sizing.d.ts +3 -3
  189. package/dist/sheet/sizing.d.ts.map +1 -1
  190. package/dist/sheet/sizing.jsx +1 -0
  191. package/dist/shell/shell.css +12 -1
  192. package/dist/shell/shell.css.map +1 -1
  193. package/dist/shell/shell.d.ts.map +1 -1
  194. package/dist/shell/shell.jsx +7 -5
  195. package/dist/survey/survey.d.ts.map +1 -1
  196. package/dist/survey/survey.jsx +9 -6
  197. package/dist/swipe/swipe.css +2 -0
  198. package/dist/swipe/swipe.css.map +1 -1
  199. package/dist/tab-bar/flat.jsx +5 -4
  200. package/dist/tab-bar/tab-bar.css +2 -0
  201. package/dist/tab-bar/tab-bar.css.map +1 -1
  202. package/dist/toast/index.d.ts +1 -1
  203. package/dist/toast/index.d.ts.map +1 -1
  204. package/dist/toast/service.d.ts.map +1 -1
  205. package/dist/toast/service.jsx +18 -5
  206. package/dist/toast/store.d.ts +22 -0
  207. package/dist/toast/store.d.ts.map +1 -1
  208. package/dist/toast/store.jsx +35 -3
  209. package/dist/toast/toast.css +22 -0
  210. package/dist/toast/toast.css.map +1 -1
  211. package/dist/toggle/choice.css +27 -0
  212. package/dist/toggle/choice.css.map +1 -1
  213. package/dist/toggle/choice.d.ts +36 -0
  214. package/dist/toggle/choice.d.ts.map +1 -1
  215. package/dist/toggle/choice.jsx +77 -13
  216. package/dist/toggle/index.d.ts +1 -1
  217. package/dist/toggle/index.d.ts.map +1 -1
  218. package/dist/toggle/index.jsx +1 -1
  219. package/package.json +22 -2
  220. package/skills/g9-lynx-app/references/catalog-index.md +22 -6
  221. package/skills/g9-lynx-app/references/components/appearance.md +70 -0
  222. package/skills/g9-lynx-app/references/components/barcode.md +1 -1
  223. package/skills/g9-lynx-app/references/components/button.md +4 -4
  224. package/skills/g9-lynx-app/references/components/calendar-1.md +205 -0
  225. package/skills/g9-lynx-app/references/components/calendar-2.md +36 -0
  226. package/skills/g9-lynx-app/references/components/canvas.md +33 -0
  227. package/skills/g9-lynx-app/references/components/chat-1.md +199 -0
  228. package/skills/g9-lynx-app/references/components/chat-2.md +119 -0
  229. package/skills/g9-lynx-app/references/components/commands.md +10 -2
  230. package/skills/g9-lynx-app/references/components/dashboard.md +61 -0
  231. package/skills/g9-lynx-app/references/components/display-1.md +22 -21
  232. package/skills/g9-lynx-app/references/components/display-2.md +36 -39
  233. package/skills/g9-lynx-app/references/components/display-3.md +41 -2
  234. package/skills/g9-lynx-app/references/components/fields.md +3 -3
  235. package/skills/g9-lynx-app/references/components/layout-1.md +1 -1
  236. package/skills/g9-lynx-app/references/components/list.md +5 -3
  237. package/skills/g9-lynx-app/references/components/media-1.md +203 -0
  238. package/skills/g9-lynx-app/references/components/media-2.md +66 -0
  239. package/skills/g9-lynx-app/references/components/notifications.md +37 -0
  240. package/skills/g9-lynx-app/references/components/popover.md +4 -2
  241. package/skills/g9-lynx-app/references/components/popup.md +2 -2
  242. package/skills/g9-lynx-app/references/components/projects.md +73 -0
  243. package/skills/g9-lynx-app/references/components/provider.md +1 -1
  244. package/skills/g9-lynx-app/references/components/reader.md +37 -0
  245. package/skills/g9-lynx-app/references/components/richtext.md +54 -0
  246. package/skills/g9-lynx-app/references/components/route.md +14 -0
  247. package/skills/g9-lynx-app/references/components/shell.md +1 -1
  248. package/skills/g9-lynx-app/references/components/toggle.md +18 -1
  249. package/skills/g9-lynx-app/references/components/calendar.md +0 -128
  250. package/skills/g9-lynx-app/references/components/chat.md +0 -98
  251. 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;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;CACxC;AAED,4BAA4B;AAC5B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,M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C,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 };
@@ -107,7 +107,9 @@
107
107
  font-size: 14px;
108
108
  font-family: var(--g9-font-text);
109
109
  color: var(--g9-text-primary);
110
+ text-overflow: ellipsis;
110
111
  flex: 1;
112
+ overflow: hidden;
111
113
  }
112
114
 
113
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,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,OAAO;AACT;;AAUA;EAPE,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}\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,EAAE,KAAK,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAExE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,KAAK,EAAE,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AAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,qFAAqF;IACrF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAwBD,wHAAwH;AACxH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,GAAG,KAAK,EAC9B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,SAAS,aAAa,EAAE,GAChC,MAAM,CAGR;AAUD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAErG;AAED,wHAAwH;AACxH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACjC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAIxB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAiehE"}
@@ -8,7 +8,7 @@ import { startTimer, stopTimer } from "../base/timers.jsx";
8
8
  import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
9
9
  import { G9SheetSkeleton } from "../display/shimmer.jsx";
10
10
  import { g9FieldNotchStyle } from "../fields/notch.jsx";
11
- import { useG9Direction, useG9Theme } from "../provider/hooks.jsx";
11
+ import { useG9Direction, useG9Settings, useG9Theme } from "../provider/hooks.jsx";
12
12
  import { sheetSegmentOf, useG9Place } from "../route/hooks.jsx";
13
13
  import { G9SheetContextProvider, useG9SheetContext } from "./context.jsx";
14
14
  import { G9SheetGestureFrame, useSheetBodyGesture, useSheetGestureRefs } from "./gesture.jsx";
@@ -59,7 +59,7 @@ function steadyBodyStyle(steady, tallest, padding, maxBody) {
59
59
  } : {};
60
60
  }
61
61
  function G9SheetFrame(props) {
62
- var _o_route, _ref, _ref1, _o_deferredLoadingPlaceholderHeight, _o_loadingSkeletonRowCount, _ratios_layout_initialSnap, _props_bottomInset, _o_padding, _o_scrollToEndThreshold, _o_openAnimationDurationMs, _o_closeAnimationDurationMs, _o_cornerRadius, _o_backgroundColor, _ratios_restIndex, _o_padding1, _o_padding2, _o_padding3;
62
+ var _o_padding, _o_route, _ref, _ref1, _o_deferredLoadingPlaceholderHeight, _o_loadingSkeletonRowCount, _ratios_layout_initialSnap, _props_bottomInset, _o_scrollToEndThreshold, _o_openAnimationDurationMs, _o_closeAnimationDurationMs, _o_cornerRadius, _o_backgroundColor, _ratios_restIndex;
63
63
  var _o_route1, _o_route2, _props_memo;
64
64
  const dir = useG9Direction();
65
65
  const { entry, stack, settings } = props;
@@ -67,6 +67,7 @@ function G9SheetFrame(props) {
67
67
  const gesture = useSheetGestureRefs();
68
68
  const bodyGesture = useSheetBodyGesture(gesture);
69
69
  const o = entry.options;
70
+ const pad = null != (_o_padding = o.padding) ? _o_padding : useG9Settings().sheets.padding;
70
71
  const placeOpen = 'opening' === entry.status || 'open' === entry.status;
71
72
  useG9Place({
72
73
  ...null != (_o_route = o.route) ? _o_route : {},
@@ -146,13 +147,13 @@ function G9SheetFrame(props) {
146
147
  if ('always' === o.scrollIndicator && false !== o.scrollBody && !indicator.current) indicator.current = new G9SheetScrollModel();
147
148
  const [tallest, setTallest] = useState(0);
148
149
  const onBodyLayout = (e)=>{
149
- var _ref, _o_padding;
150
+ var _ref;
150
151
  var _e_detail, _indicator_current, _props_memo;
151
152
  const h = null != (_ref = null == (_e_detail = e.detail) ? void 0 : _e_detail.height) ? _ref : 0;
152
153
  const steady = true === o.steady;
153
154
  const open = 'open' === entry.status;
154
155
  setTallest((current)=>steadyTallest(current, h, steady, open));
155
- null == (_indicator_current = indicator.current) || _indicator_current.setContent(h > 0 ? h + 2 * (null != (_o_padding = o.padding) ? _o_padding : 0) : 0);
156
+ null == (_indicator_current = indicator.current) || _indicator_current.setContent(h > 0 ? h + 2 * pad : 0);
156
157
  if (h <= 0) return;
157
158
  setBodyHeight(h);
158
159
  if (memoKey && revealed && !covering) null == (_props_memo = props.memo) || _props_memo.record(memoKey, h);
@@ -229,7 +230,7 @@ function G9SheetFrame(props) {
229
230
  maxBodyHeight: maxBody,
230
231
  bodyHeight
231
232
  };
232
- const steadyStyle = steadyBodyStyle(true === o.steady, tallest, null != (_o_padding = o.padding) ? _o_padding : 0, maxBody);
233
+ const steadyStyle = steadyBodyStyle(true === o.steady, tallest, pad, maxBody);
233
234
  const platform = currentPlatform();
234
235
  const phone = 'android' === platform || 'ios' === platform;
235
236
  const endProps = o.onScrollToEnd ? {
@@ -338,7 +339,7 @@ function G9SheetFrame(props) {
338
339
  {o.showToolbar && false !== o.useStandardBodyTopGap ? <view className="g9-sheet__body-gap"/> : null}
339
340
  </view>
340
341
  {false === o.scrollBody ? <view className={`g9-sheet__body ${layout.fillBody ? 'g9-sheet__body--static g9-sheet__body--fill' : 'g9-sheet__body--static-fit'}`} style={{
341
- padding: `${null != (_o_padding1 = o.padding) ? _o_padding1 : 0}px`,
342
+ padding: `${pad}px`,
342
343
  ...steadyStyle
343
344
  }}>
344
345
  {content}
@@ -352,7 +353,7 @@ function G9SheetFrame(props) {
352
353
  var _e_detail, _indicator_current;
353
354
  return null == (_indicator_current = indicator.current) ? void 0 : _indicator_current.setViewport(null != (_ref = null == (_e_detail = e.detail) ? void 0 : _e_detail.height) ? _ref : 0);
354
355
  }} style={{
355
- padding: `${null != (_o_padding2 = o.padding) ? _o_padding2 : 0}px`,
356
+ padding: `${pad}px`,
356
357
  ...null !== maxBody ? {
357
358
  maxHeight: `${maxBody}px`
358
359
  } : {},
@@ -362,7 +363,7 @@ function G9SheetFrame(props) {
362
363
  </scroll-view>
363
364
  <G9SheetScrollIndicator model={indicator.current}/>
364
365
  </view> : <scroll-view className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`} scroll-orientation="vertical" main-thread:ref={gesture.body} main-thread:bindscroll={phone ? bodyGesture.onScrollMT : void 0} main-thread:bindtouchstart={bodyGesture.onTouchStartMT} {...endProps} style={{
365
- padding: `${null != (_o_padding3 = o.padding) ? _o_padding3 : 0}px`,
366
+ padding: `${pad}px`,
366
367
  ...null !== maxBody ? {
367
368
  maxHeight: `${maxBody}px`
368
369
  } : {},
@@ -136,7 +136,7 @@ export interface G9SheetOptions extends G9SheetLifecycle {
136
136
  readonly scrollToEndThreshold?: number;
137
137
  /** Height memory key (needed for factory content). */
138
138
  readonly heightMemoKey?: string | null;
139
- /** Body padding. Default 0. */
139
+ /** Body padding. Default `settings.sheets.padding` (0). */
140
140
  readonly padding?: number;
141
141
  /** 10 px gap under the header hairline. Default true. */
142
142
  readonly useStandardBodyTopGap?: boolean;
@@ -300,6 +300,11 @@ export interface G9SheetSettings {
300
300
  * = 13). Default 16.
301
301
  */
302
302
  readonly headerEdgeSpacing?: number;
303
+ /**
304
+ * The body padding of every sheet that does not give its own `padding` (G9Hub writes its bodies for 16 dp; at 0 a
305
+ * floated field label at the body's top was cut). Default 0 (2.5.8).
306
+ */
307
+ readonly padding?: number;
303
308
  }
304
309
  /** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */
305
310
  export declare function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings>;