@g9tm/lynxcontrols 2.5.7 → 2.5.9

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 (254) 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 +17 -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 +6987 -446
  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/keep-alive.d.ts +2 -0
  158. package/dist/provider/keep-alive.d.ts.map +1 -1
  159. package/dist/provider/keep-alive.jsx +3 -1
  160. package/dist/provider/provider.d.ts +6 -1
  161. package/dist/provider/provider.d.ts.map +1 -1
  162. package/dist/provider/provider.jsx +22 -2
  163. package/dist/reader/index.d.ts +2 -0
  164. package/dist/reader/index.d.ts.map +1 -0
  165. package/dist/reader/index.jsx +1 -0
  166. package/dist/reader/reader.css +74 -0
  167. package/dist/reader/reader.css.map +1 -0
  168. package/dist/reader/reader.d.ts +76 -0
  169. package/dist/reader/reader.d.ts.map +1 -0
  170. package/dist/reader/reader.jsx +149 -0
  171. package/dist/route/index.d.ts +2 -0
  172. package/dist/route/index.d.ts.map +1 -1
  173. package/dist/route/index.jsx +2 -0
  174. package/dist/route/path-navigator.css +219 -0
  175. package/dist/route/path-navigator.css.map +1 -0
  176. package/dist/route/path-navigator.d.ts +49 -0
  177. package/dist/route/path-navigator.d.ts.map +1 -0
  178. package/dist/route/path-navigator.jsx +176 -0
  179. package/dist/route/path-router.d.ts +185 -0
  180. package/dist/route/path-router.d.ts.map +1 -0
  181. package/dist/route/path-router.jsx +369 -0
  182. package/dist/selection/selection.css +2 -0
  183. package/dist/selection/selection.css.map +1 -1
  184. package/dist/sheet/frame.d.ts.map +1 -1
  185. package/dist/sheet/frame.jsx +9 -8
  186. package/dist/sheet/options.d.ts +6 -1
  187. package/dist/sheet/options.d.ts.map +1 -1
  188. package/dist/sheet/options.jsx +2 -1
  189. package/dist/sheet/panel-frame.d.ts.map +1 -1
  190. package/dist/sheet/panel-frame.jsx +5 -4
  191. package/dist/sheet/sizing.d.ts +3 -3
  192. package/dist/sheet/sizing.d.ts.map +1 -1
  193. package/dist/sheet/sizing.jsx +1 -0
  194. package/dist/shell/shell.css +12 -1
  195. package/dist/shell/shell.css.map +1 -1
  196. package/dist/shell/shell.d.ts.map +1 -1
  197. package/dist/shell/shell.jsx +7 -5
  198. package/dist/survey/survey.d.ts.map +1 -1
  199. package/dist/survey/survey.jsx +9 -6
  200. package/dist/swipe/swipe.css +2 -0
  201. package/dist/swipe/swipe.css.map +1 -1
  202. package/dist/tab-bar/flat.jsx +5 -4
  203. package/dist/tab-bar/tab-bar.css +2 -0
  204. package/dist/tab-bar/tab-bar.css.map +1 -1
  205. package/dist/toast/index.d.ts +1 -1
  206. package/dist/toast/index.d.ts.map +1 -1
  207. package/dist/toast/service.d.ts.map +1 -1
  208. package/dist/toast/service.jsx +18 -5
  209. package/dist/toast/store.d.ts +22 -0
  210. package/dist/toast/store.d.ts.map +1 -1
  211. package/dist/toast/store.jsx +35 -3
  212. package/dist/toast/toast.css +22 -0
  213. package/dist/toast/toast.css.map +1 -1
  214. package/dist/toggle/choice.css +27 -0
  215. package/dist/toggle/choice.css.map +1 -1
  216. package/dist/toggle/choice.d.ts +36 -0
  217. package/dist/toggle/choice.d.ts.map +1 -1
  218. package/dist/toggle/choice.jsx +77 -13
  219. package/dist/toggle/index.d.ts +1 -1
  220. package/dist/toggle/index.d.ts.map +1 -1
  221. package/dist/toggle/index.jsx +1 -1
  222. package/package.json +22 -2
  223. package/skills/g9-lynx-app/references/catalog-index.md +22 -6
  224. package/skills/g9-lynx-app/references/components/appearance.md +70 -0
  225. package/skills/g9-lynx-app/references/components/barcode.md +1 -1
  226. package/skills/g9-lynx-app/references/components/button.md +4 -4
  227. package/skills/g9-lynx-app/references/components/calendar-1.md +205 -0
  228. package/skills/g9-lynx-app/references/components/calendar-2.md +36 -0
  229. package/skills/g9-lynx-app/references/components/canvas.md +33 -0
  230. package/skills/g9-lynx-app/references/components/chat-1.md +199 -0
  231. package/skills/g9-lynx-app/references/components/chat-2.md +119 -0
  232. package/skills/g9-lynx-app/references/components/commands.md +10 -2
  233. package/skills/g9-lynx-app/references/components/dashboard.md +61 -0
  234. package/skills/g9-lynx-app/references/components/display-1.md +22 -21
  235. package/skills/g9-lynx-app/references/components/display-2.md +36 -39
  236. package/skills/g9-lynx-app/references/components/display-3.md +41 -2
  237. package/skills/g9-lynx-app/references/components/fields.md +3 -3
  238. package/skills/g9-lynx-app/references/components/layout-1.md +1 -1
  239. package/skills/g9-lynx-app/references/components/list.md +5 -3
  240. package/skills/g9-lynx-app/references/components/media-1.md +203 -0
  241. package/skills/g9-lynx-app/references/components/media-2.md +66 -0
  242. package/skills/g9-lynx-app/references/components/notifications.md +37 -0
  243. package/skills/g9-lynx-app/references/components/popover.md +4 -2
  244. package/skills/g9-lynx-app/references/components/popup.md +2 -2
  245. package/skills/g9-lynx-app/references/components/projects.md +73 -0
  246. package/skills/g9-lynx-app/references/components/provider.md +1 -1
  247. package/skills/g9-lynx-app/references/components/reader.md +37 -0
  248. package/skills/g9-lynx-app/references/components/richtext.md +54 -0
  249. package/skills/g9-lynx-app/references/components/route.md +18 -0
  250. package/skills/g9-lynx-app/references/components/shell.md +1 -1
  251. package/skills/g9-lynx-app/references/components/toggle.md +18 -1
  252. package/skills/g9-lynx-app/references/components/calendar.md +0 -128
  253. package/skills/g9-lynx-app/references/components/chat.md +0 -98
  254. package/skills/g9-lynx-app/references/components/media.md +0 -115
@@ -2,7 +2,9 @@ import "./keep-alive.css";
2
2
  import { g9IdProps } from "../base/control.jsx";
3
3
  import { G9Activity } from "./activity.jsx";
4
4
  function G9KeepAlive(props) {
5
- return <view className={`g9-kept${props.active ? '' : ' g9-kept--hidden'}${props.className ? ` ${props.className}` : ''}`} {...g9IdProps(props.id)} user-interaction-enabled={props.active}>
5
+ return <view className={`g9-kept${props.active ? '' : ' g9-kept--hidden'}${props.className ? ` ${props.className}` : ''}`} {...g9IdProps(props.id)} user-interaction-enabled={props.active} {...props.style ? {
6
+ style: props.style
7
+ } : {}}>
6
8
  <G9Activity mode={props.active ? 'visible' : 'hidden'}>{props.children}</G9Activity>
7
9
  </view>;
8
10
  }
@@ -1,4 +1,4 @@
1
- import { type G9Breakpoints, type G9Capabilities, type G9ColorScheme, type G9Culture, type G9CultureStore, type G9Diagnostics, type G9LayoutClass, type G9SafeInsets, type G9ShapeSet, type G9ThemeOptions, type G9ThemeStore, type G9TokenAliasMap } from '@g9tm/lynxcontrols-foundation';
1
+ import { type G9Breakpoints, type G9Capabilities, type G9ColorScheme, type G9Culture, type G9CultureStore, type G9Diagnostics, type G9LayoutClass, type G9ResolvedTheme, type G9SafeInsets, type G9ShapeSet, type G9ThemeOptions, type G9ThemeStore, type G9TokenAliasMap } from '@g9tm/lynxcontrols-foundation';
2
2
  import { type ReactNode } from '@lynx-js/react';
3
3
  import { type G9Settings } from './settings.js';
4
4
  import './provider.css';
@@ -60,6 +60,11 @@ export interface G9ProviderProps {
60
60
  readonly map: G9TokenAliasMap;
61
61
  readonly prefix?: string;
62
62
  };
63
+ /**
64
+ * More CSS variables computed from each theme the store paints (2.5.8: G9Hub's bubbles, glass, presence colours —
65
+ * `g9AppTokenVariables`), repainted with it the same way (only what changed, no render).
66
+ */
67
+ readonly themeExtras?: (theme: G9ResolvedTheme) => Readonly<Record<string, string>>;
63
68
  /** The diagnostics hub. Default: a hub the provider creates. */
64
69
  readonly diagnostics?: G9Diagnostics;
65
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,UAAU,EAEf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EAWrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAA8D,MAAM,gBAAgB,CAAC;AAqB5G,OAAO,EAAE,KAAK,UAAU,EAA4C,MAAM,YAAY,CAAC;AAEvF,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AAErB;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,8GAA8G;IAC9G,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,8HAA8H;IAC9H,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC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o(()=>props.tokenAliases ? aliasCssVariables(props.tokenAliases.map, props.tokenAliases.prefix) : {}, [
251
251
  aliasKey
252
252
  ]);
253
+ const extras = useRef(props.themeExtras);
254
+ extras.current = props.themeExtras;
255
+ const extraVariables = (theme)=>{
256
+ const make = extras.current;
257
+ if (!make) return {};
258
+ try {
259
+ return make(theme);
260
+ } catch (error) {
261
+ diagnostics.log({
262
+ level: 'warning',
263
+ message: 'themeExtras failed.',
264
+ source: 'G9Provider',
265
+ error
266
+ });
267
+ return {};
268
+ }
269
+ };
253
270
  const [initialVariables] = useState(()=>({
254
271
  ...aliasVariables,
255
- ...toRootCssVariables(themeStore.getSnapshot(), shapeStore.get(), culture.direction)
272
+ ...toRootCssVariables(themeStore.getSnapshot(), shapeStore.get(), culture.direction),
273
+ ...extraVariables(themeStore.getSnapshot())
256
274
  }));
257
275
  const [initialScheme] = useState(()=>themeStore.getSnapshot().scheme);
258
276
  const applied = useRef({});
259
277
  const [fallbackVariables, setFallbackVariables] = useState(null);
260
278
  useEffect(()=>{
261
279
  const apply = ()=>{
280
+ const snapshot = themeStore.getSnapshot();
262
281
  const next = {
263
282
  ...initialVariables,
264
283
  ...applied.current,
265
- ...themeVariables(themeStore.getSnapshot())
284
+ ...themeVariables(snapshot),
285
+ ...extraVariables(snapshot)
266
286
  };
267
287
  const diff = changedVariables(applied.current, next);
268
288
  applied.current = next;
@@ -0,0 +1,2 @@
1
+ export { G9ReaderSheet, type G9ReaderSheetProps, type G9ReaderSize, type G9ReaderTextStyle, G9ReaderView, type G9ReaderViewProps, g9ReaderLineHeight, g9ReaderSizes, g9ReadingMinutes, g9StepReaderSize, } from './reader.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,YAAY,EACZ,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,UAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export { G9ReaderSheet, G9ReaderView, g9ReaderLineHeight, g9ReaderSizes, g9ReadingMinutes, g9StepReaderSize } from "./reader.jsx";
@@ -0,0 +1,74 @@
1
+ .g9-reader {
2
+ flex-direction: column;
3
+ align-items: center;
4
+ width: 100%;
5
+ padding-top: 8px;
6
+ padding-bottom: 32px;
7
+ display: flex;
8
+ }
9
+
10
+ .g9-reader__measure {
11
+ flex-direction: column;
12
+ width: 100%;
13
+ display: flex;
14
+ }
15
+
16
+ .g9-reader__text {
17
+ font-family: var(--g9-font-text);
18
+ color: var(--g9-text-primary);
19
+ }
20
+
21
+ .g9-reader__sheet {
22
+ flex-direction: column;
23
+ width: 100%;
24
+ display: flex;
25
+ }
26
+
27
+ .g9-reader__header {
28
+ align-items: flex-start;
29
+ column-gap: 2px;
30
+ padding-top: 8px;
31
+ padding-bottom: 8px;
32
+ display: flex;
33
+ }
34
+
35
+ .g9-reader__titles {
36
+ flex-direction: column;
37
+ flex: 1;
38
+ min-width: 0;
39
+ display: flex;
40
+ }
41
+
42
+ .g9-reader__title {
43
+ font-size: 18px;
44
+ font-weight: 600;
45
+ font-family: var(--g9-font-text-600);
46
+ color: var(--g9-text-primary);
47
+ }
48
+
49
+ .g9-reader__meta {
50
+ flex-wrap: wrap;
51
+ align-items: center;
52
+ column-gap: 8px;
53
+ margin-top: 2px;
54
+ display: flex;
55
+ }
56
+
57
+ .g9-reader__time {
58
+ align-items: center;
59
+ column-gap: 4px;
60
+ display: flex;
61
+ }
62
+
63
+ .g9-reader__fact {
64
+ font-size: 13px;
65
+ font-family: var(--g9-font-text);
66
+ color: var(--g9-text-secondary);
67
+ }
68
+
69
+ .g9-reader__fact--quiet {
70
+ color: var(--g9-text-tertiary);
71
+ }
72
+
73
+
74
+ /*# sourceMappingURL=reader.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://./src/reader/reader.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,mBAAmB;EACnB,WAAW;EACX,gBAAgB;EAChB,oBAAoB;EACpB,aAAa;AACf;;AAGA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,gCAAgC;EAChC,6BAA6B;AAC/B;;AAGA;EAAE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAGA;EAAE,uBAAuB;EACvB,eAAe;EACf,gBAAgB;EAChB,mBAAmB;EACnB,aAAa;AACf;;AAGA;EAAE,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,aAAa;AACf;;AAGA;EAAE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;EACpC,6BAA6B;AAC/B;;AAGA;EAAE,eAAe;EACf,mBAAmB;EACnB,eAAe;EACf,eAAe;EACf,aAAa;AACf;;AAGA;EAAE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAGA;EAAE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;AACjC;;AAGA;EAAE,8BAA8B;AAChC","sourcesContent":["/* G9ReaderView and G9ReaderSheet (2.5.8). */\n.g9-reader {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n padding-top: 8px;\n padding-bottom: 32px;\n}\n\n.g9-reader__measure {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-reader__text {\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n}\n\n.g9-reader__sheet {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.g9-reader__header {\n display: flex;\n align-items: flex-start;\n padding-top: 8px;\n padding-bottom: 8px;\n column-gap: 2px;\n}\n\n.g9-reader__titles {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-reader__title {\n font-size: 18px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n}\n\n.g9-reader__meta {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n column-gap: 8px;\n margin-top: 2px;\n}\n\n.g9-reader__time {\n display: flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.g9-reader__fact {\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-reader__fact--quiet {\n color: var(--g9-text-tertiary);\n}\n"],"sourceRoot":""}
@@ -0,0 +1,76 @@
1
+ import { type ReactNode } from '@lynx-js/react';
2
+ import type { G9IconInput } from '../icon/icon.js';
3
+ import type { G9SheetOptions } from '../sheet/options.js';
4
+ import './reader.css';
5
+ /** One text size of the reader. */
6
+ export interface G9ReaderSize {
7
+ readonly key: string;
8
+ /** Font size (dp). */
9
+ readonly px: number;
10
+ }
11
+ /** The reader's sizes, smallest first (Hub's normal 16, large 18, larger 21). */
12
+ export declare const g9ReaderSizes: readonly G9ReaderSize[];
13
+ /** Reading time in whole minutes (at least 1) at `wordsPerMinute` (default 200). */
14
+ export declare function g9ReadingMinutes(text: string, wordsPerMinute?: number): number;
15
+ /** The size one step smaller (-1) or larger (+1) than `current` (an unknown one counts as the first). */
16
+ export declare function g9StepReaderSize(sizes: readonly G9ReaderSize[], current: string, delta: number): string;
17
+ /** Line height for a size: ×1.85 left to right, ×2.05 right to left (rounded), unless the app gives its factors. */
18
+ export declare function g9ReaderLineHeight(px: number, direction: 'ltr' | 'rtl', factors?: {
19
+ readonly ltr?: number;
20
+ readonly rtl?: number;
21
+ }): number;
22
+ /** How the text is drawn (what `renderText` is given). */
23
+ export interface G9ReaderTextStyle {
24
+ readonly direction: 'ltr' | 'rtl';
25
+ readonly fontSize: number;
26
+ readonly lineHeight: number;
27
+ readonly align: 'left' | 'right';
28
+ }
29
+ /** Props of {@link G9ReaderView}. */
30
+ export interface G9ReaderViewProps {
31
+ readonly id?: string;
32
+ readonly text: string;
33
+ /** `'auto'` (default): the first strong letter's direction, else the app's. */
34
+ readonly direction?: 'auto' | 'ltr' | 'rtl';
35
+ /** The size key (`sizes`); default the second size (or the first). */
36
+ readonly size?: string;
37
+ readonly sizes?: readonly G9ReaderSize[];
38
+ readonly lineHeightFactors?: {
39
+ readonly ltr?: number;
40
+ readonly rtl?: number;
41
+ };
42
+ /** The measure (dp). Default 680. */
43
+ readonly maxWidth?: number;
44
+ /** Draws the text (links, mentions, formatting); default a plain selectable text. */
45
+ readonly renderText?: (text: string, style: G9ReaderTextStyle) => ReactNode;
46
+ readonly accessibilityLabel?: string;
47
+ }
48
+ /** The text alone at the reader's size, measure and direction (inside any page or sheet). */
49
+ export declare function G9ReaderView(props: G9ReaderViewProps): ReactNode;
50
+ /** Props of {@link G9ReaderSheet}. */
51
+ export interface G9ReaderSheetProps extends Omit<G9ReaderViewProps, 'size'> {
52
+ readonly open: boolean;
53
+ readonly onClose: () => void;
54
+ /** The sheet's title (a channel's name); none: no title line. */
55
+ readonly title?: string;
56
+ /** Small facts under the title (the author, the time). */
57
+ readonly meta?: readonly string[];
58
+ /** The reading time's words («۳ دقیقه»); without it the time is not shown. */
59
+ readonly minutesLabel?: (minutes: number) => string;
60
+ readonly wordsPerMinute?: number;
61
+ /** The size (controlled); with `onSizeChange` the app keeps it (per device). */
62
+ readonly size?: string;
63
+ readonly defaultSize?: string;
64
+ readonly onSizeChange?: (size: string) => void;
65
+ readonly smallerLabel?: string;
66
+ readonly largerLabel?: string;
67
+ readonly closeLabel?: string;
68
+ /** The size buttons' icons (default the letters A− / A+). */
69
+ readonly smallerIcon?: G9IconInput;
70
+ readonly largerIcon?: G9IconInput;
71
+ /** More of the sheet (its height, route, presentation). */
72
+ readonly options?: G9SheetOptions;
73
+ }
74
+ /** A long text read in a sheet: title, author and reading time, A− / A+ and close, then the {@link G9ReaderView}. */
75
+ export declare function G9ReaderSheet(props: G9ReaderSheetProps): ReactNode;
76
+ //# sourceMappingURL=reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../src/reader/reader.tsx"],"names":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AC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC,QAAQ,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IAClC,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,qHAAqH;AACrH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAuFlE"}
@@ -0,0 +1,149 @@
1
+ import { firstStrongDirection } from "@g9tm/lynxcontrols-foundation";
2
+ import { useState } from "@lynx-js/react";
3
+ import { g9IdProps } from "../base/control.jsx";
4
+ import { G9IconButton } from "../button/icon-button.jsx";
5
+ import { G9Icon } from "../icon/icon.jsx";
6
+ import { useG9Direction } from "../provider/hooks.jsx";
7
+ import { G9Sheet } from "../sheet/sheet.jsx";
8
+ import "./reader.css";
9
+ const g9ReaderSizes = [
10
+ {
11
+ key: 'normal',
12
+ px: 16
13
+ },
14
+ {
15
+ key: 'large',
16
+ px: 18
17
+ },
18
+ {
19
+ key: 'larger',
20
+ px: 21
21
+ }
22
+ ];
23
+ function g9ReadingMinutes(text1, wordsPerMinute = 200) {
24
+ const words = text1.trim().split(/\s+/).filter(Boolean).length;
25
+ return Math.max(1, Math.round(words / Math.max(1, wordsPerMinute)));
26
+ }
27
+ function g9StepReaderSize(sizes, current, delta) {
28
+ if (!sizes.length) return current;
29
+ const at = Math.max(0, sizes.findIndex((s)=>s.key === current));
30
+ return sizes[Math.max(0, Math.min(sizes.length - 1, at + delta))].key;
31
+ }
32
+ function g9ReaderLineHeight(px, direction, factors = {}) {
33
+ var _factors_rtl, _factors_ltr;
34
+ return Math.round(px * ('rtl' === direction ? null != (_factors_rtl = factors.rtl) ? _factors_rtl : 2.05 : null != (_factors_ltr = factors.ltr) ? _factors_ltr : 1.85));
35
+ }
36
+ function resolveSize(sizes, key) {
37
+ var _ref, _ref1, _sizes_find;
38
+ return null != (_ref = null != (_ref1 = null != (_sizes_find = sizes.find((s)=>s.key === key)) ? _sizes_find : sizes[1]) ? _ref1 : sizes[0]) ? _ref : {
39
+ key: 'normal',
40
+ px: 16
41
+ };
42
+ }
43
+ function G9ReaderView(props) {
44
+ var _props_sizes, _firstStrongDirection, _props_maxWidth;
45
+ const ui = useG9Direction();
46
+ const sizes = null != (_props_sizes = props.sizes) ? _props_sizes : g9ReaderSizes;
47
+ const size = resolveSize(sizes, props.size);
48
+ const direction = props.direction && 'auto' !== props.direction ? props.direction : null != (_firstStrongDirection = firstStrongDirection(props.text)) ? _firstStrongDirection : ui;
49
+ const lineHeight = g9ReaderLineHeight(size.px, direction, props.lineHeightFactors);
50
+ const style = {
51
+ direction,
52
+ fontSize: size.px,
53
+ lineHeight,
54
+ align: 'rtl' === direction ? 'right' : 'left'
55
+ };
56
+ return <view className="g9-reader" {...g9IdProps(props.id)} flatten={false} accessibility-element={true} {...props.accessibilityLabel ? {
57
+ 'accessibility-label': props.accessibilityLabel
58
+ } : {}}>
59
+ <view className="g9-reader__measure" style={{
60
+ maxWidth: `${null != (_props_maxWidth = props.maxWidth) ? _props_maxWidth : 680}px`
61
+ }}>
62
+ {props.renderText ? props.renderText(props.text, style) : <text className="g9-reader__text" text-selection={true} style={{
63
+ fontSize: `${size.px}px`,
64
+ lineHeight: `${lineHeight}px`,
65
+ direction,
66
+ textAlign: style.align
67
+ }}>
68
+ {props.text}
69
+ </text>}
70
+ </view>
71
+ </view>;
72
+ }
73
+ function G9ReaderSheet(props) {
74
+ var _props_sizes, _props_size, _props_meta, _props_smallerLabel, _props_largerLabel, _props_closeLabel;
75
+ var _sizes_, _sizes_1;
76
+ const sizes = null != (_props_sizes = props.sizes) ? _props_sizes : g9ReaderSizes;
77
+ const [own, setOwn] = useState(()=>resolveSize(sizes, props.defaultSize).key);
78
+ const current = resolveSize(sizes, null != (_props_size = props.size) ? _props_size : own).key;
79
+ const rtl = 'rtl' === useG9Direction();
80
+ const first = null == (_sizes_ = sizes[0]) ? void 0 : _sizes_.key;
81
+ const last = null == (_sizes_1 = sizes[sizes.length - 1]) ? void 0 : _sizes_1.key;
82
+ const step = (delta)=>{
83
+ var _props_onSizeChange;
84
+ const next = g9StepReaderSize(sizes, current, delta);
85
+ if (void 0 === props.size) setOwn(next);
86
+ null == (_props_onSizeChange = props.onSizeChange) || _props_onSizeChange.call(props, next);
87
+ };
88
+ const idPart = (part)=>props.id ? {
89
+ id: `${props.id}_${part}`
90
+ } : {};
91
+ const meta = [
92
+ ...null != (_props_meta = props.meta) ? _props_meta : []
93
+ ];
94
+ const minutes = props.minutesLabel ? props.minutesLabel(g9ReadingMinutes(props.text, props.wordsPerMinute)) : null;
95
+ const header = <view className="g9-reader__header" style={{
96
+ flexDirection: rtl ? 'row-reverse' : 'row',
97
+ direction: 'ltr'
98
+ }}>
99
+ <view className="g9-reader__titles">
100
+ {props.title ? <text className="g9-reader__title" text-maxline="1" style={{
101
+ textAlign: rtl ? 'right' : 'left'
102
+ }}>
103
+ {props.title}
104
+ </text> : null}
105
+ {meta.length || minutes ? <view className="g9-reader__meta" style={{
106
+ flexDirection: rtl ? 'row-reverse' : 'row',
107
+ direction: 'ltr'
108
+ }}>
109
+ {meta.map((m, i)=><text key={`m${i}`} className="g9-reader__fact">
110
+ {m}
111
+ </text>)}
112
+ {minutes ? <view className="g9-reader__time" style={{
113
+ flexDirection: rtl ? 'row-reverse' : 'row',
114
+ direction: 'ltr'
115
+ }}>
116
+ <G9Icon icon="clock" size={13} color="var(--g9-text-tertiary)"/>
117
+ <text className="g9-reader__fact g9-reader__fact--quiet">{minutes}</text>
118
+ </view> : null}
119
+ </view> : null}
120
+ </view>
121
+ <G9IconButton {...idPart('Smaller')} {...props.smallerIcon ? {
122
+ icon: props.smallerIcon
123
+ } : {
124
+ emoji: 'A−'
125
+ }} size="sm" isGhost disabled={current === first} accessibilityText={null != (_props_smallerLabel = props.smallerLabel) ? _props_smallerLabel : 'A−'} pressGuardMs={0} onPress={()=>step(-1)}/>
126
+ <G9IconButton {...idPart('Larger')} {...props.largerIcon ? {
127
+ icon: props.largerIcon
128
+ } : {
129
+ emoji: 'A+'
130
+ }} size="sm" isGhost disabled={current === last} accessibilityText={null != (_props_largerLabel = props.largerLabel) ? _props_largerLabel : 'A+'} pressGuardMs={0} onPress={()=>step(1)}/>
131
+ <G9IconButton {...idPart('Close')} icon="close" size="sm" isGhost accessibilityText={null != (_props_closeLabel = props.closeLabel) ? _props_closeLabel : '×'} onPress={props.onClose}/>
132
+ </view>;
133
+ const { open: _open, onClose: _close, title: _title, meta: _meta, options: _options, ...view1 } = props;
134
+ return <G9Sheet open={props.open} onOpenChange={(open)=>{
135
+ if (!open) props.onClose();
136
+ }} options={{
137
+ states: [
138
+ 'large'
139
+ ],
140
+ showToolbar: false,
141
+ ...props.options
142
+ }}>
143
+ <view className="g9-reader__sheet">
144
+ {header}
145
+ <G9ReaderView {...view1} {...idPart('Text')} size={current}/>
146
+ </view>
147
+ </G9Sheet>;
148
+ }
149
+ export { G9ReaderSheet, G9ReaderView, g9ReaderLineHeight, g9ReaderSizes, g9ReadingMinutes, g9StepReaderSize };
@@ -1,3 +1,5 @@
1
1
  export { G9Place, type G9PlaceProps, type G9PlaceSpec, sheetSegmentOf, useG9Location, useG9Place, useG9Router, useG9RouteSink, } from './hooks.js';
2
+ export { G9PathNavigator, type G9PathNavigatorProps, g9LazyPage, useG9PathRouter } from './path-navigator.js';
3
+ export { createG9PathRouter, type G9GotoOptions, type G9MasterOptions, type G9Navigation, type G9NavKind, type G9PageUrl, type G9PathEntry, type G9PathPageProps, type G9PathRoute, type G9PathRouter, type G9PathRouterOptions, type G9PathRouterState, g9CompilePattern, g9ParsePath, } from './path-router.js';
2
4
  export { createG9Router, type G9Excursion, type G9GoOptions, type G9GoResult, type G9GoSource, type G9Location, type G9ReadableStore, type G9RouteEvent, type G9Router, type G9RouterOptions, type G9RouterTexts, type G9TrailEntry, type G9Walk, type G9WalkOptions, type G9WalkPresenter, type G9WalkStep, isG9Router, } from './router.js';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/route/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,cAAc,EACd,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,UAAU,GACX,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/route/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,cAAc,EACd,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3G,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,UAAU,GACX,MAAM,UAAU,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export { G9Place, sheetSegmentOf, useG9Location, useG9Place, useG9RouteSink, useG9Router } from "./hooks.jsx";
2
+ export { G9PathNavigator, g9LazyPage, useG9PathRouter } from "./path-navigator.jsx";
3
+ export { createG9PathRouter, g9CompilePattern, g9ParsePath } from "./path-router.jsx";
2
4
  export { createG9Router, isG9Router } from "./router.jsx";
@@ -0,0 +1,219 @@
1
+ .g9-pathnav {
2
+ flex-direction: column;
3
+ flex: 1;
4
+ min-height: 0;
5
+ display: flex;
6
+ position: relative;
7
+ overflow: hidden;
8
+ }
9
+
10
+ .g9-pathnav__page {
11
+ flex-direction: column;
12
+ flex: 1;
13
+ min-height: 0;
14
+ display: flex;
15
+ }
16
+
17
+ .g9-pathnav__page--under, .g9-pathnav__page--over {
18
+ position: absolute;
19
+ top: 0;
20
+ bottom: 0;
21
+ left: 0;
22
+ right: 0;
23
+ }
24
+
25
+ .g9-pathnav__page--in {
26
+ animation: .28s cubic-bezier(.2, 0, 0, 1) g9-pathnav-in;
27
+ }
28
+
29
+ .g9-pathnav__page--in-rtl {
30
+ animation: .28s cubic-bezier(.2, 0, 0, 1) g9-pathnav-in-rtl;
31
+ }
32
+
33
+ .g9-pathnav__page--out {
34
+ animation: .28s cubic-bezier(.3, 0, .8, .15) forwards g9-pathnav-out;
35
+ }
36
+
37
+ .g9-pathnav__page--out-rtl {
38
+ animation: .28s cubic-bezier(.3, 0, .8, .15) forwards g9-pathnav-out-rtl;
39
+ }
40
+
41
+ .g9-pathnav__page--recede {
42
+ animation: .28s cubic-bezier(.2, 0, 0, 1) forwards g9-pathnav-recede;
43
+ }
44
+
45
+ .g9-pathnav__page--recede-rtl {
46
+ animation: .28s cubic-bezier(.2, 0, 0, 1) forwards g9-pathnav-recede-rtl;
47
+ }
48
+
49
+ .g9-pathnav__page--return {
50
+ animation: .28s cubic-bezier(.2, 0, 0, 1) g9-pathnav-return;
51
+ }
52
+
53
+ .g9-pathnav__page--return-rtl {
54
+ animation: .28s cubic-bezier(.2, 0, 0, 1) g9-pathnav-return-rtl;
55
+ }
56
+
57
+ .g9-pathnav__page--rise {
58
+ animation: .22s cubic-bezier(.2, 0, 0, 1) g9-pathnav-rise;
59
+ }
60
+
61
+ .g9-pathnav__page--fade {
62
+ animation: .18s ease-out g9-pathnav-fade;
63
+ }
64
+
65
+ @keyframes g9-pathnav-in {
66
+ from {
67
+ transform: translateX(100%);
68
+ }
69
+
70
+ to {
71
+ transform: translateX(0%);
72
+ }
73
+ }
74
+
75
+ @keyframes g9-pathnav-in-rtl {
76
+ from {
77
+ transform: translateX(-100%);
78
+ }
79
+
80
+ to {
81
+ transform: translateX(0%);
82
+ }
83
+ }
84
+
85
+ @keyframes g9-pathnav-out {
86
+ from {
87
+ transform: translateX(0%);
88
+ }
89
+
90
+ to {
91
+ transform: translateX(100%);
92
+ }
93
+ }
94
+
95
+ @keyframes g9-pathnav-out-rtl {
96
+ from {
97
+ transform: translateX(0%);
98
+ }
99
+
100
+ to {
101
+ transform: translateX(-100%);
102
+ }
103
+ }
104
+
105
+ @keyframes g9-pathnav-recede {
106
+ from {
107
+ opacity: 1;
108
+ transform: translateX(0%);
109
+ }
110
+
111
+ to {
112
+ opacity: .7;
113
+ transform: translateX(-28%);
114
+ }
115
+ }
116
+
117
+ @keyframes g9-pathnav-recede-rtl {
118
+ from {
119
+ opacity: 1;
120
+ transform: translateX(0%);
121
+ }
122
+
123
+ to {
124
+ opacity: .7;
125
+ transform: translateX(28%);
126
+ }
127
+ }
128
+
129
+ @keyframes g9-pathnav-return {
130
+ from {
131
+ opacity: .7;
132
+ transform: translateX(-28%);
133
+ }
134
+
135
+ to {
136
+ opacity: 1;
137
+ transform: translateX(0%);
138
+ }
139
+ }
140
+
141
+ @keyframes g9-pathnav-return-rtl {
142
+ from {
143
+ opacity: .7;
144
+ transform: translateX(28%);
145
+ }
146
+
147
+ to {
148
+ opacity: 1;
149
+ transform: translateX(0%);
150
+ }
151
+ }
152
+
153
+ @keyframes g9-pathnav-rise {
154
+ from {
155
+ opacity: 0;
156
+ transform: translateY(12px);
157
+ }
158
+
159
+ to {
160
+ opacity: 1;
161
+ transform: translateY(0);
162
+ }
163
+ }
164
+
165
+ @keyframes g9-pathnav-fade {
166
+ from {
167
+ opacity: 0;
168
+ }
169
+
170
+ to {
171
+ opacity: 1;
172
+ }
173
+ }
174
+
175
+ .g9-pathnav__split {
176
+ flex-direction: row;
177
+ flex: 1;
178
+ min-height: 0;
179
+ display: flex;
180
+ }
181
+
182
+ .g9-pathnav__master-pane {
183
+ flex-direction: column;
184
+ min-height: 0;
185
+ display: flex;
186
+ }
187
+
188
+ .g9-pathnav__master {
189
+ flex-direction: column;
190
+ flex: 1;
191
+ min-height: 0;
192
+ display: flex;
193
+ }
194
+
195
+ .g9-pathnav__handle {
196
+ z-index: 2;
197
+ justify-content: center;
198
+ align-items: center;
199
+ width: 9px;
200
+ margin: 0 -4px;
201
+ display: flex;
202
+ }
203
+
204
+ .g9-pathnav__grip {
205
+ background-color: var(--g9-divider);
206
+ width: 1px;
207
+ height: 100%;
208
+ }
209
+
210
+ .g9-pathnav__detail {
211
+ flex-direction: column;
212
+ flex: 1;
213
+ min-width: 0;
214
+ min-height: 0;
215
+ display: flex;
216
+ }
217
+
218
+
219
+ /*# sourceMappingURL=path-navigator.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack://./src/route/path-navigator.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAKA;EAFE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,aAAa;AACf;;AAMA;EAHE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAeA;EAZE,uDAAuD;AACzD;;AAeA;EAZE,2DAA2D;AAC7D;;AAeA;EAZE,oEAAoE;AACtE;;AAeA;EAZE,wEAAwE;AAC1E;;AAeA;EAZE,oEAAoE;AACtE;;AAeA;EAZE,wEAAwE;AAC1E;;AAeA;EAZE,2DAA2D;AAC7D;;AAeA;EAZE,+DAA+D;AACjE;;AAeA;EAZE,yDAAyD;AAC3D;;AAeA;EAZE,wCAAwC;AAC1C;;AAeA;EAZE;IACE,2BAA2B;EAC7B;;EAEA;IACE,yBAAyB;EAC3B;AACF;;AAcA;EAXE;IACE,4BAA4B;EAC9B;;EAEA;IACE,yBAAyB;EAC3B;AACF;;AAaA;EAVE;IACE,yBAAyB;EAC3B;;EAEA;IACE,2BAA2B;EAC7B;AACF;;AAYA;EATE;IACE,yBAAyB;EAC3B;;EAEA;IACE,4BAA4B;EAC9B;AACF;;AAWA;EARE;IACE,UAAU;IACV,yBAAyB;EAC3B;;EAEA;IACE,WAAW;IACX,2BAA2B;EAC7B;AACF;;AAUA;EAPE;IACE,UAAU;IACV,yBAAyB;EAC3B;;EAEA;IACE,WAAW;IACX,0BAA0B;EAC5B;AACF;;AASA;EANE;IACE,WAAW;IACX,2BAA2B;EAC7B;;EAEA;IACE,UAAU;IACV,yBAAyB;EAC3B;AACF;;AAQA;EALE;IACE,WAAW;IACX,0BAA0B;EAC5B;;EAEA;IACE,UAAU;IACV,yBAAyB;EAC3B;AACF;;AAOA;EAJE;IACE,UAAU;IACV,2BAA2B;EAC7B;;EAEA;IACE,UAAU;IACV,wBAAwB;EAC1B;AACF;;AAMA;EAHE;IACE,UAAU;EACZ;;EAEA;IACE,UAAU;EACZ;AACF;;AAKA;EAFE,mBAAmB;EACnB,OAAO;EACP,aAAa;EACb,aAAa;AACf;;AAKA;EAFE,sBAAsB;EACtB,aAAa;EACb,aAAa;AACf;;AAKA;EAFE,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,aAAa;AACf;;AAMA;EAHE,UAAU;EACV,uBAAuB;EACvB,mBAAmB;EACnB,UAAU;EACV,cAAc;EACd,aAAa;AACf;;AAMA;EAHE,mCAAmC;EACnC,UAAU;EACV,YAAY;AACd;;AAMA;EAHE,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,aAAa;EACb,aAAa;AACf","sourcesContent":["/* G9PathNavigator (2.5.8; motion and the collapsed parked page 2.5.9). */\n.g9-pathnav {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n position: relative;\n overflow: hidden;\n}\n\n/* A page is a G9KeepAlive region: the parked one is collapsed, never display:none (Lynx 4.2 Android re-processes a\n display:none subtree on every layout pass; flings dropped to 16 frames on the A21s with a hidden page, G9Hub N1). */\n.g9-pathnav__page {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n/* Drawn below the arriving page while it slides in, then parked. */\n.g9-pathnav__page--under {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n\n/* The popped page, over the revealed one until its motion ends. */\n.g9-pathnav__page--over {\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n\n.g9-pathnav__page--in {\n animation: g9-pathnav-in 280ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-pathnav__page--in-rtl {\n animation: g9-pathnav-in-rtl 280ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-pathnav__page--out {\n animation: g9-pathnav-out 280ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;\n}\n\n.g9-pathnav__page--out-rtl {\n animation: g9-pathnav-out-rtl 280ms cubic-bezier(0.3, 0, 0.8, 0.15) forwards;\n}\n\n.g9-pathnav__page--recede {\n animation: g9-pathnav-recede 280ms cubic-bezier(0.2, 0, 0, 1) forwards;\n}\n\n.g9-pathnav__page--recede-rtl {\n animation: g9-pathnav-recede-rtl 280ms cubic-bezier(0.2, 0, 0, 1) forwards;\n}\n\n.g9-pathnav__page--return {\n animation: g9-pathnav-return 280ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-pathnav__page--return-rtl {\n animation: g9-pathnav-return-rtl 280ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-pathnav__page--rise {\n animation: g9-pathnav-rise 220ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.g9-pathnav__page--fade {\n animation: g9-pathnav-fade 180ms ease-out;\n}\n\n@keyframes g9-pathnav-in {\n from {\n transform: translateX(100%);\n }\n to {\n transform: translateX(0%);\n }\n}\n\n@keyframes g9-pathnav-in-rtl {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0%);\n }\n}\n\n@keyframes g9-pathnav-out {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(100%);\n }\n}\n\n@keyframes g9-pathnav-out-rtl {\n from {\n transform: translateX(0%);\n }\n to {\n transform: translateX(-100%);\n }\n}\n\n@keyframes g9-pathnav-recede {\n from {\n transform: translateX(0%);\n opacity: 1;\n }\n to {\n transform: translateX(-28%);\n opacity: 0.7;\n }\n}\n\n@keyframes g9-pathnav-recede-rtl {\n from {\n transform: translateX(0%);\n opacity: 1;\n }\n to {\n transform: translateX(28%);\n opacity: 0.7;\n }\n}\n\n@keyframes g9-pathnav-return {\n from {\n transform: translateX(-28%);\n opacity: 0.7;\n }\n to {\n transform: translateX(0%);\n opacity: 1;\n }\n}\n\n@keyframes g9-pathnav-return-rtl {\n from {\n transform: translateX(28%);\n opacity: 0.7;\n }\n to {\n transform: translateX(0%);\n opacity: 1;\n }\n}\n\n@keyframes g9-pathnav-rise {\n from {\n transform: translateY(12px);\n opacity: 0;\n }\n to {\n transform: translateY(0px);\n opacity: 1;\n }\n}\n\n@keyframes g9-pathnav-fade {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-pathnav__split {\n display: flex;\n flex-direction: row;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-pathnav__master-pane {\n display: flex;\n flex-direction: column;\n min-height: 0px;\n}\n\n.g9-pathnav__master {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n/* The drag handle of a resizable list (a 1 dp divider, a 9 dp touch target). */\n.g9-pathnav__handle {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 9px;\n margin: 0px -4px;\n z-index: 2;\n}\n\n.g9-pathnav__grip {\n width: 1px;\n height: 100%;\n background-color: var(--g9-divider);\n}\n\n.g9-pathnav__detail {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n min-height: 0px;\n}\n"],"sourceRoot":""}