@g9tm/lynxcontrols 1.4.4 → 1.4.7

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 (72) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/base/pressable.d.ts.map +1 -1
  3. package/dist/base/pressable.jsx +2 -1
  4. package/dist/base/pressable.jsx.map +1 -1
  5. package/dist/cascade/cascade-panel.d.ts.map +1 -1
  6. package/dist/cascade/cascade-panel.jsx +2 -2
  7. package/dist/cascade/cascade-panel.jsx.map +1 -1
  8. package/dist/edge-panel/edge-panel.jsx +5 -5
  9. package/dist/edge-panel/edge-panel.jsx.map +1 -1
  10. package/dist/expander/expander.d.ts.map +1 -1
  11. package/dist/expander/expander.jsx +2 -1
  12. package/dist/expander/expander.jsx.map +1 -1
  13. package/dist/fields/index.d.ts +1 -1
  14. package/dist/fields/index.d.ts.map +1 -1
  15. package/dist/fields/index.jsx +1 -1
  16. package/dist/fields/use-text-input.d.ts +14 -1
  17. package/dist/fields/use-text-input.d.ts.map +1 -1
  18. package/dist/fields/use-text-input.jsx +17 -3
  19. package/dist/fields/use-text-input.jsx.map +1 -1
  20. package/dist/host/host.css.map +1 -1
  21. package/dist/host/host.d.ts +3 -2
  22. package/dist/host/host.d.ts.map +1 -1
  23. package/dist/host/host.jsx +2 -2
  24. package/dist/host/host.jsx.map +1 -1
  25. package/dist/plus-button/model.d.ts.map +1 -1
  26. package/dist/plus-button/model.jsx +5 -1
  27. package/dist/plus-button/model.jsx.map +1 -1
  28. package/dist/popup/frame.jsx +2 -2
  29. package/dist/popup/frame.jsx.map +1 -1
  30. package/dist/popup/service.d.ts.map +1 -1
  31. package/dist/popup/service.jsx +2 -2
  32. package/dist/popup/service.jsx.map +1 -1
  33. package/dist/provider/provider.css +4 -0
  34. package/dist/provider/provider.css.map +1 -1
  35. package/dist/provider/provider.d.ts.map +1 -1
  36. package/dist/provider/provider.jsx +4 -2
  37. package/dist/provider/provider.jsx.map +1 -1
  38. package/dist/selection/selection-sheet.d.ts +5 -0
  39. package/dist/selection/selection-sheet.d.ts.map +1 -1
  40. package/dist/selection/selection-sheet.jsx +7 -3
  41. package/dist/selection/selection-sheet.jsx.map +1 -1
  42. package/dist/sheet/frame.d.ts.map +1 -1
  43. package/dist/sheet/frame.jsx +30 -8
  44. package/dist/sheet/frame.jsx.map +1 -1
  45. package/dist/sheet/index.d.ts +1 -0
  46. package/dist/sheet/index.d.ts.map +1 -1
  47. package/dist/sheet/index.jsx +1 -0
  48. package/dist/sheet/motion.d.ts.map +1 -1
  49. package/dist/sheet/motion.jsx +14 -0
  50. package/dist/sheet/motion.jsx.map +1 -1
  51. package/dist/sheet/options.d.ts +13 -0
  52. package/dist/sheet/options.d.ts.map +1 -1
  53. package/dist/sheet/options.jsx.map +1 -1
  54. package/dist/sheet/scroll-indicator.d.ts +33 -0
  55. package/dist/sheet/scroll-indicator.d.ts.map +1 -0
  56. package/dist/sheet/scroll-indicator.jsx +84 -0
  57. package/dist/sheet/scroll-indicator.jsx.map +1 -0
  58. package/dist/sheet/sheet.css +14 -0
  59. package/dist/sheet/sheet.css.map +1 -1
  60. package/dist/sheet/sizing.d.ts +1 -1
  61. package/dist/sheet/sizing.d.ts.map +1 -1
  62. package/dist/sheet/sizing.jsx +2 -2
  63. package/dist/sheet/sizing.jsx.map +1 -1
  64. package/dist/tab-bar/tab-bar.d.ts.map +1 -1
  65. package/dist/tab-bar/tab-bar.jsx +11 -6
  66. package/dist/tab-bar/tab-bar.jsx.map +1 -1
  67. package/dist/toast/service.jsx +3 -3
  68. package/dist/toast/service.jsx.map +1 -1
  69. package/dist/toast/store.d.ts.map +1 -1
  70. package/dist/toast/store.jsx +3 -2
  71. package/dist/toast/store.jsx.map +1 -1
  72. package/package.json +3 -3
@@ -0,0 +1,33 @@
1
+ import { type ReactNode } from '@lynx-js/react';
2
+ /** The thumb's smallest length (dp), so a very long content still has something to see. */
3
+ export declare const SHEET_THUMB_MIN = 24;
4
+ /** The thumb's width and its gap to the body's edge (dp). */
5
+ export declare const SHEET_THUMB_WIDTH = 3;
6
+ export declare const SHEET_THUMB_INSET = 3;
7
+ /** Where the thumb is: its length and its offset from the body's top (dp), or null when nothing overflows. */
8
+ export declare function sheetThumb(viewport: number, content: number, scrollTop: number): {
9
+ readonly length: number;
10
+ readonly offset: number;
11
+ } | null;
12
+ interface IndicatorState {
13
+ readonly viewport: number;
14
+ readonly content: number;
15
+ readonly top: number;
16
+ }
17
+ /** What the frame feeds (the body's height, the content's height, the scroll offset) and the thumb reads. */
18
+ export declare class G9SheetScrollModel {
19
+ private state;
20
+ private readonly listeners;
21
+ readonly get: () => IndicatorState;
22
+ readonly subscribe: (listener: () => void) => (() => void);
23
+ setViewport(height: number): void;
24
+ setContent(height: number): void;
25
+ setTop(top: number): void;
26
+ private update;
27
+ }
28
+ /** The thumb at the body's inline END (left in a right-to-left sheet), in the side inset; touches pass through. */
29
+ export declare function G9SheetScrollIndicator(props: {
30
+ readonly model: G9SheetScrollModel;
31
+ }): ReactNode;
32
+ export {};
33
+ //# sourceMappingURL=scroll-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scroll-indicator.d.ts","sourceRoot":"","sources":["../../src/sheet/scroll-indicator.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,gBAAgB,CAAC;AAGtE,2FAA2F;AAC3F,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,8GAA8G;AAC9G,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAM7D;AAED,UAAU,cAAc;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,6GAA6G;AAC7G,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,KAAK,CAAuD;IACpE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IAEnD,QAAQ,CAAC,GAAG,QAAO,cAAc,CAAe;IAEhD,QAAQ,CAAC,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAGvD;IAEF,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIjC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIhC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,OAAO,CAAC,MAAM;CAOf;AAED,mHAAmH;AACnH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAAG,SAAS,CAiB/F"}
@@ -0,0 +1,84 @@
1
+ import { useSyncExternalStore } from "@lynx-js/react";
2
+ import { useG9Direction } from "../provider/hooks.jsx";
3
+ function _define_property(obj, key, value) {
4
+ if (key in obj) Object.defineProperty(obj, key, {
5
+ value: value,
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true
9
+ });
10
+ else obj[key] = value;
11
+ return obj;
12
+ }
13
+ const SHEET_THUMB_MIN = 24;
14
+ const SHEET_THUMB_WIDTH = 3;
15
+ const SHEET_THUMB_INSET = 3;
16
+ function sheetThumb(viewport, content, scrollTop) {
17
+ if (!(viewport > 0) || !(content > viewport + 1)) return null;
18
+ const length = Math.min(viewport, Math.max(SHEET_THUMB_MIN, viewport * viewport / content));
19
+ const travel = content - viewport;
20
+ const share = Math.min(1, Math.max(0, scrollTop / travel));
21
+ return {
22
+ length,
23
+ offset: (viewport - length) * share
24
+ };
25
+ }
26
+ class G9SheetScrollModel {
27
+ setViewport(height) {
28
+ this.update({
29
+ viewport: height
30
+ });
31
+ }
32
+ setContent(height) {
33
+ this.update({
34
+ content: height
35
+ });
36
+ }
37
+ setTop(top) {
38
+ this.update({
39
+ top
40
+ });
41
+ }
42
+ update(patch) {
43
+ const next = {
44
+ ...this.state,
45
+ ...patch
46
+ };
47
+ if (next.viewport === this.state.viewport && next.content === this.state.content && next.top === this.state.top) return;
48
+ this.state = next;
49
+ for (const l of this.listeners)l();
50
+ }
51
+ constructor(){
52
+ _define_property(this, "state", {
53
+ viewport: 0,
54
+ content: 0,
55
+ top: 0
56
+ });
57
+ _define_property(this, "listeners", new Set());
58
+ _define_property(this, "get", ()=>this.state);
59
+ _define_property(this, "subscribe", (listener)=>{
60
+ this.listeners.add(listener);
61
+ return ()=>this.listeners.delete(listener);
62
+ });
63
+ }
64
+ }
65
+ function G9SheetScrollIndicator(props) {
66
+ const rtl = 'rtl' === useG9Direction();
67
+ const s = useSyncExternalStore(props.model.subscribe, props.model.get, props.model.get);
68
+ const thumb = sheetThumb(s.viewport, s.content, s.top);
69
+ if (!thumb) return null;
70
+ return <view className="g9-sheet__scroll-thumb" style={{
71
+ top: `${thumb.offset}px`,
72
+ height: `${thumb.length}px`,
73
+ width: `${SHEET_THUMB_WIDTH}px`,
74
+ borderRadius: `${SHEET_THUMB_WIDTH / 2}px`,
75
+ ...rtl ? {
76
+ left: `${SHEET_THUMB_INSET}px`
77
+ } : {
78
+ right: `${SHEET_THUMB_INSET}px`
79
+ }
80
+ }}/>;
81
+ }
82
+ export { G9SheetScrollIndicator, G9SheetScrollModel, SHEET_THUMB_INSET, SHEET_THUMB_MIN, SHEET_THUMB_WIDTH, sheetThumb };
83
+
84
+ //# sourceMappingURL=scroll-indicator.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet/scroll-indicator.jsx","sources":["../../src/sheet/scroll-indicator.tsx"],"sourcesContent":["// The sheet body's always-visible scroll indicator (`scrollIndicator: 'always'`). A sheet menu of full-width cards whose\n// last card is cut off does not say «more below»; the platform's own bar (Lynx `scroll-bar-enable`) only shows while a\n// finger scrolls and then fades. This thumb is drawn in the body's side inset, never over the content, only while the\n// content is taller than the body, and moves with the scroll. Its own small store: a scroll event repaints the thumb,\n// never the sheet.\nimport { type ReactNode, useSyncExternalStore } from '@lynx-js/react';\nimport { useG9Direction } from '../provider/hooks';\n\n/** The thumb's smallest length (dp), so a very long content still has something to see. */\nexport const SHEET_THUMB_MIN = 24;\n/** The thumb's width and its gap to the body's edge (dp). */\nexport const SHEET_THUMB_WIDTH = 3;\nexport const SHEET_THUMB_INSET = 3;\n\n/** Where the thumb is: its length and its offset from the body's top (dp), or null when nothing overflows. */\nexport function sheetThumb(\n viewport: number,\n content: number,\n scrollTop: number,\n): { readonly length: number; readonly offset: number } | null {\n if (!(viewport > 0) || !(content > viewport + 1)) return null;\n const length = Math.min(viewport, Math.max(SHEET_THUMB_MIN, (viewport * viewport) / content));\n const travel = content - viewport;\n const share = Math.min(1, Math.max(0, scrollTop / travel));\n return { length, offset: (viewport - length) * share };\n}\n\ninterface IndicatorState {\n readonly viewport: number;\n readonly content: number;\n readonly top: number;\n}\n\n/** What the frame feeds (the body's height, the content's height, the scroll offset) and the thumb reads. */\nexport class G9SheetScrollModel {\n private state: IndicatorState = { viewport: 0, content: 0, top: 0 };\n private readonly listeners = new Set<() => void>();\n\n readonly get = (): IndicatorState => this.state;\n\n readonly subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener);\n return () => this.listeners.delete(listener);\n };\n\n setViewport(height: number): void {\n this.update({ viewport: height });\n }\n\n setContent(height: number): void {\n this.update({ content: height });\n }\n\n setTop(top: number): void {\n this.update({ top });\n }\n\n private update(patch: Partial<IndicatorState>): void {\n const next = { ...this.state, ...patch };\n if (next.viewport === this.state.viewport && next.content === this.state.content && next.top === this.state.top)\n return;\n this.state = next;\n for (const l of this.listeners) l();\n }\n}\n\n/** The thumb at the body's inline END (left in a right-to-left sheet), in the side inset; touches pass through. */\nexport function G9SheetScrollIndicator(props: { readonly model: G9SheetScrollModel }): ReactNode {\n const rtl = useG9Direction() === 'rtl';\n const s = useSyncExternalStore(props.model.subscribe, props.model.get, props.model.get);\n const thumb = sheetThumb(s.viewport, s.content, s.top);\n if (!thumb) return null;\n return (\n <view\n className=\"g9-sheet__scroll-thumb\"\n style={{\n top: `${thumb.offset}px`,\n height: `${thumb.length}px`,\n width: `${SHEET_THUMB_WIDTH}px`,\n borderRadius: `${SHEET_THUMB_WIDTH / 2}px`,\n ...(rtl ? { left: `${SHEET_THUMB_INSET}px` } : { right: `${SHEET_THUMB_INSET}px` }),\n }}\n />\n );\n}\n"],"names":["SHEET_THUMB_MIN","SHEET_THUMB_WIDTH","SHEET_THUMB_INSET","sheetThumb","viewport","content","scrollTop","length","Math","travel","share","G9SheetScrollModel","height","top","patch","next","l","Set","listener","G9SheetScrollIndicator","props","rtl","useG9Direction","s","useSyncExternalStore","thumb","view"],"mappings":";;;;;;;;;;;;AASO,MAAMA,kBAAkB;AAExB,MAAMC,oBAAoB;AAC1B,MAAMC,oBAAoB;AAG1B,SAASC,WACdC,QAAgB,EAChBC,OAAe,EACfC,SAAiB;IAEjB,IAAI,CAAEF,CAAAA,WAAW,MAAM,CAAEC,CAAAA,UAAUD,WAAW,IAAI,OAAO;IACzD,MAAMG,SAASC,KAAK,GAAG,CAACJ,UAAUI,KAAK,GAAG,CAACR,iBAAkBI,WAAWA,WAAYC;IACpF,MAAMI,SAASJ,UAAUD;IACzB,MAAMM,QAAQF,KAAK,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC,GAAGF,YAAYG;IAClD,OAAO;QAAEF;QAAQ,QAASH,AAAAA,CAAAA,WAAWG,MAAK,IAAKG;IAAM;AACvD;AASO,MAAMC;IAWX,YAAYC,MAAc,EAAQ;QAChC,IAAI,CAAC,MAAM,CAAC;YAAE,UAAUA;QAAO;IACjC;IAEA,WAAWA,MAAc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xB,kBAAkB,EAAE,CAAC;QAC/B,cAAc,GAAGA,oBAAoB,EAAE,EAAE,CAAC;QAC1C,GAAIoB,MAAM;YAAE,MAAM,GAAGnB,kBAAkB,EAAE,CAAC;QAAC,IAAI;YAAE,OAAO,GAAGA,kBAAkB,EAAE,CAAC;QAAC,CAAC;IACpF;AAGN"}
@@ -99,6 +99,20 @@
99
99
  flex: 1;
100
100
  }
101
101
 
102
+ .g9-sheet__body-frame {
103
+ flex-direction: column;
104
+ flex-shrink: 1;
105
+ display: flex;
106
+ position: relative;
107
+ }
108
+
109
+ .g9-sheet__scroll-thumb {
110
+ background-color: var(--g9-on-surface-variant);
111
+ opacity: .45;
112
+ pointer-events: none;
113
+ position: absolute;
114
+ }
115
+
102
116
  .g9-sheet__content {
103
117
  flex-direction: column;
104
118
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,gBAAgB;AAClB;;AAMA;EAHE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,gBAAgB;AAClB;;AAOA;EAJE,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;AACtB;;AAOA;EAJE,uBAAuB;EACvB,mBAAmB;EAC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AmB;EACnB,eAAe;EACf,aAAa;AACf;;AAgBA;EAbE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AAgBA;EAbE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,sBAAsB;EACtB,YAAY;EACZ,kBAAkB;EAClB,aAAa;AACf;;AAgBA;EAbE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAkBA;EAfE,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf","sourcesContent":["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n/* The grabber, header and body gap, measured as one: a fit sheet's cap includes them (MAUI). */\n.g9-sheet__chrome-top {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* MAUI UseStandardBodyTopGap: SheetHeaderVerticalGap under the header (10, or the app's scaled value). */\n.g9-sheet__body-gap {\n height: var(--g9-layout-sheet-header-vertical-gap, 10px);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;EACpB,sBAAsB;EACtB,a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,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAcA;EAXE,kCAAkC;EAClC,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;AACf;;AAgBA;EAbE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AAgBA;EAbE,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AAgBA;EAbE,mBAAmB;EACnB,yBAAyB;EACzB,mBAAmB;EACnB,aAAa;AACf;;AAgBA;EAbE,yBAAyB;AAC3B;;AAgBA;EAbE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AAgBA;EAbE,cAAc;AAChB;;AAgBA;EAbE,2BAA2B;EAC3B,mBAAmB;EACnB,aAAa;AACf;;AAgBA;EAbE,0BAA0B;EAC1B,uBAAuB;EACvB,iBAAiB;AACnB;;AAgBA;EAbE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAiBA;EAdE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AAiBA;EAdE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,sBAAsB;EACtB,YAAY;EACZ,kBAAkB;EAClB,aAAa;AACf;;AAiBA;EAdE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAmBA;EAhBE,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf","sourcesContent":["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n/* The grabber, header and body gap, measured as one: a fit sheet's cap includes them (MAUI). */\n.g9-sheet__chrome-top {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* MAUI UseStandardBodyTopGap: SheetHeaderVerticalGap under the header (10, or the app's scaled value). */\n.g9-sheet__body-gap {\n height: var(--g9-layout-sheet-header-vertical-gap, 10px);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n/* scrollIndicator: 'always' — the scroller and its thumb (scroll-indicator.tsx). The frame takes the body's place. */\n.g9-sheet__body-frame {\n display: flex;\n flex-direction: column;\n flex-shrink: 1;\n position: relative;\n}\n\n.g9-sheet__scroll-thumb {\n position: absolute;\n background-color: var(--g9-on-surface-variant);\n opacity: 0.45;\n pointer-events: none;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n"],"sourceRoot":""}
@@ -24,7 +24,7 @@ export interface G9SheetLayout {
24
24
  /** One detent, or fit-to-content (MAUI "fixed"): no grabber, no detent dragging. */
25
25
  readonly fixed: boolean;
26
26
  readonly fit: boolean;
27
- /** Grabber visible (`hasHandle && isDraggable && !fixed`). */
27
+ /** Grabber visible (`hasHandle && isDraggable && (!fixed || handleOnSingleDetent)`). */
28
28
  readonly showHandle: boolean;
29
29
  readonly dragDisabled: boolean;
30
30
  /** Drag past the lowest detent may request a close. */
@@ -1 +1 @@
1
- {"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../src/sheet/sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAI/D,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAI3C,wGAAwG;AACx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ACtC,OAAO,EAAE,cAAc,EACvB,QAAQ,sDAAoB,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBxB"}
@@ -65,12 +65,12 @@ function resolveSheetLayout(options, hostHeight, platform = currentPlatform()) {
65
65
  initialSnap: index >= 0 ? index : 0,
66
66
  fixed,
67
67
  fit: false,
68
- showHandle: false !== options.hasHandle && draggable && !fixed,
68
+ showHandle: false !== options.hasHandle && draggable && (!fixed || true === options.handleOnSingleDetent),
69
69
  dragDisabled: !draggable || intercepted,
70
70
  enableDragToClose: cancelable && draggable && !intercepted,
71
71
  closeOnOverlayTap: cancelable,
72
72
  fitMaxHeight: options.expandedFitsContent ? Math.max(g9SheetFitMinHeight, Math.floor(hostHeight * clamp(null != (_options_maxFitToContentHeightRatio = options.maxFitToContentHeightRatio) ? _options_maxFitToContentHeightRatio : 0.75, 0.2, 1))) : null,
73
- fullScreen: 1 === states.length && 'large' === states[0] && full >= 1,
73
+ fullScreen: 1 === states.length && 'large' === states[0] && full >= 1 && true !== options.expandedFitsContent,
74
74
  fillBody: fixed && !options.expandedFitsContent
75
75
  };
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/sizing.jsx","sources":["../../src/sheet/sizing.ts"],"sourcesContent":["import type { G9SheetDetent, G9SheetOptions } from './options';\n\n// Pure sizing rules of the G9 sheet (MAUI G9SheetView + G9BottomSheetHelper sizing; guide 650–980, ADR-0019/0026).\n\n/** MAUI `G9SheetView.MinimizedHeight`: default peek height. */\nexport const g9SheetDefaultPeekHeight = 100;\n/** Absolute minimum of an authoritative fit height (MAUI helper :81). */\nexport const g9SheetFitMinHeight = 80;\n/** Floor while the height is unknown (loading window). */\nexport const g9SheetFitLoadingMinHeight = 180;\n/** Finger travel at release that requests a close (MAUI `DragCloseThreshold`). */\nexport const g9SheetDragCloseThreshold = 72;\n/**\n * Gap between the top safe-area inset and a full-screen sheet's header. MAUI reserves the inset alone\n * (`ResolveFullScreenSheetTopPadding`), but its Android inset is the status-bar band, a few dp below the cutout an\n * immersive Lynx host reports: measured side by side on a Pixel 9 Pro XL (2026-10-10), MAUI's header sat 3 dp lower.\n * (It was 8, which put every full-screen header 5 dp below MAUI's.)\n */\nexport const g9SheetTopSafeAreaBaseGap = 3;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** The platform the app runs on (Lynx `SystemInfo.platform`), lower-cased; `'unknown'` outside Lynx. */\nexport function currentPlatform(): 'android' | 'ios' | 'windows' | 'macos' | 'unknown' {\n const info = (globalThis as { SystemInfo?: { platform?: string } }).SystemInfo;\n const p = (info?.platform ?? '').toLowerCase();\n if (p === 'android') return 'android';\n if (p === 'ios') return 'ios';\n if (p.startsWith('win')) return 'windows';\n if (p === 'macos' || p === 'mac' || p === 'osx') return 'macos';\n return 'unknown';\n}\n\n/** What the adapter passes to lynx-ui `SheetRoot` and how the frame behaves. */\nexport interface G9SheetLayout {\n /** lynx-ui snap points, small to large: pixels, `'NN%'` of the host, or `'fit'`. */\n readonly snapPoints: Array<number | string>;\n readonly initialSnap: number;\n /** One detent, or fit-to-content (MAUI \"fixed\"): no grabber, no detent dragging. */\n readonly fixed: boolean;\n readonly fit: boolean;\n /** Grabber visible (`hasHandle && isDraggable && !fixed`). */\n readonly showHandle: boolean;\n readonly dragDisabled: boolean;\n /** Drag past the lowest detent may request a close. */\n readonly enableDragToClose: boolean;\n /** Backdrop tap requests a close. */\n readonly closeOnOverlayTap: boolean;\n /** The resting body cap for a fit sheet (`maxFitToContentHeightRatio × host`), else `null`. */\n readonly fitMaxHeight: number | null;\n /** Whether the sheet's largest detent is full screen. */\n readonly fullScreen: boolean;\n /**\n * The body fills the surface, so the footer rests at the sheet's bottom edge: a full-screen sheet, or one fixed detent\n * (`states: ['large']` with `fullExpandedRatio: 0.9`) — its surface has a definite height. A sheet that can move between\n * detents or fits its content keeps a body as tall as the content.\n */\n readonly fillBody: boolean;\n}\n\nconst pct = (ratio: number) => `${Math.round(ratio * 10000) / 100}%`;\n\n/**\n * Maps G9 options to a lynx-ui layout (the agreed mapping of MAUI `ApplyOptions`): fit → `['fit']` capped at\n * `maxFitToContentHeightRatio`; states → peek pixels / half ratio / full ratio for the allowed detents, the initial\n * detent from `currentState`. The MAUI quirks (a hidden 100 dp detent under `[medium, large]`, a peek-only sheet that\n * may expand) are not carried over: the detents are exactly `states` (docs/sheets.md \"deliberate differences\").\n */\nexport function resolveSheetLayout(\n options: G9SheetOptions,\n hostHeight: number,\n platform = currentPlatform(),\n): G9SheetLayout {\n const fit = options.sizeMode === 'fitToContent';\n const draggable = options.isDraggable !== false;\n const cancelable = options.isCancelable !== false;\n const intercepted = options.onBackRequested != null;\n if (fit) {\n const ratio = clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1);\n return {\n snapPoints: ['fit'],\n initialSnap: 0,\n fixed: true,\n fit: true,\n showHandle: false,\n dragDisabled: true,\n enableDragToClose: false,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: Math.max(g9SheetFitMinHeight, Math.floor(hostHeight * ratio)),\n fullScreen: false,\n fillBody: false,\n };\n }\n const order: G9SheetDetent[] = ['peek', 'medium', 'large'];\n const requested = options.states && options.states.length > 0 ? options.states : ['medium', 'large'];\n const states = order.filter((d) => requested.includes(d));\n const androidHalf = platform === 'android' ? options.androidHalfExpandedRatio : null;\n const half = clamp(androidHalf ?? options.halfExpandedRatio ?? 0.5, 0.1, 0.9);\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const peek = Math.max(1, options.collapsedHeight ?? options.peekHeight ?? g9SheetDefaultPeekHeight);\n const snap = (d: G9SheetDetent): number | string =>\n d === 'peek' ? Math.min(peek, Math.max(1, hostHeight)) : d === 'medium' ? pct(half) : pct(full);\n const snapPoints = states.map(snap);\n if (options.expandedFitsContent && snapPoints.length > 0) snapPoints[snapPoints.length - 1] = 'fit';\n const current = options.currentState ?? 'medium';\n const index = states.indexOf(current);\n const fixed = states.length <= 1;\n return {\n snapPoints,\n initialSnap: index >= 0 ? index : 0,\n fixed,\n fit: false,\n showHandle: options.hasHandle !== false && draggable && !fixed,\n dragDisabled: !draggable || intercepted,\n enableDragToClose: cancelable && draggable && !intercepted,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: options.expandedFitsContent\n ? Math.max(\n g9SheetFitMinHeight,\n Math.floor(hostHeight * clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1)),\n )\n : null,\n fullScreen: states.length === 1 && states[0] === 'large' && full >= 1,\n fillBody: fixed && !options.expandedFitsContent,\n };\n}\n\n/** Clamps a measured fit body height: `[80, cap]`, or `[180, cap]` while loading (MAUI fit engine). */\nexport function clampFitHeight(natural: number, cap: number, loading: boolean): number {\n const min = loading ? g9SheetFitLoadingMinHeight : g9SheetFitMinHeight;\n if (!(natural > 0)) return Math.min(min, cap);\n return clamp(natural, Math.min(min, cap), cap);\n}\n\n/**\n * Scrim opacity for a visible ratio (MAUI helper overlay rule): between the smallest and the largest detent it runs\n * from `min` to `max`; a single detent uses `max`; below the smallest detent it fades with the ratio.\n */\nexport function sheetOverlayOpacity(\n visibleRatio: number,\n detentRatios: ReadonlyArray<number>,\n min: number,\n max: number,\n): number {\n if (detentRatios.length === 0) return max;\n const lo = Math.min(...detentRatios);\n const hi = Math.max(...detentRatios);\n if (visibleRatio < lo) return (detentRatios.length === 1 ? max : min) * clamp(visibleRatio / lo, 0, 1);\n if (hi === lo) return max;\n return min + (max - min) * clamp((visibleRatio - lo) / (hi - lo), 0, 1);\n}\n\n/** The page recede behind a tall primary sheet (MAUI backdrop card): scale 1 → 0.93, translateY 0 → 12. */\nexport function backdropCardTransform(visibleRatio: number, threshold = 0.75): { scale: number; translateY: number } {\n const raw = clamp((visibleRatio - threshold) / Math.max(1e-6, 1 - threshold), 0, 1);\n const progress = raw <= 0 ? 0 : 1 - (1 - raw) ** (1 / 3);\n return { scale: 1 - 0.07 * progress, translateY: 12 * progress };\n}\n\n/**\n * The visible share of the host a detent sheet covers: its resting height when known, else its opening detent\n * (peek = peek height, medium = half ratio, large = full ratio; `expandedFitsContent` large counts as the fit cap).\n */\nexport function sheetVisibleRatio(\n options: G9SheetOptions,\n hostHeight: number,\n restingHeightPx: number | null,\n platform = currentPlatform(),\n): number {\n const host = Math.max(1, hostHeight);\n if (restingHeightPx != null) return clamp(restingHeightPx / host, 0, 1);\n const layout = resolveSheetLayout(options, host, platform);\n const point = layout.snapPoints[layout.initialSnap];\n if (typeof point === 'number') return clamp(point / host, 0, 1);\n if (point === 'fit' || point === undefined) return (layout.fitMaxHeight ?? 0) / host;\n return clamp(Number.parseFloat(point) / 100, 0, 1);\n}\n\n/** How far a receded parent sheet sinks: `max(24, visible × 0.25)` (MAUI stack recede). */\nexport function parentRecedeOffset(visibleHeight: number): number {\n return Math.max(24, visibleHeight * 0.25);\n}\n\n/** Top padding of a full-screen sheet (MAUI safe-area rule). */\nexport function sheetTopPadding(options: G9SheetOptions, topInset: number): number {\n if (options.topSafeAreaPaddingOverride != null) return Math.max(0, options.topSafeAreaPaddingOverride);\n const inset = options.useTopSafeAreaPadding === false ? 0 : Math.max(0, topInset);\n return inset + g9SheetTopSafeAreaBaseGap + Math.max(0, options.additionalTopSafeAreaPadding ?? 0);\n}\n\n/**\n * Top padding of the sheet surface where it rests. A full-screen sheet always reserves {@link sheetTopPadding}. A\n * detent sheet resting at its `large` detent reserves it too when that detent reaches under the top inset (MAUI\n * state-aware top padding, `G9BottomSheetHelper.ApplyStateAwareTopPadding`): its content never sits under the status\n * bar or the camera cutout. Opted out like MAUI: `useTopSafeAreaPadding: false` with no additional/override padding.\n */\nexport function sheetSurfaceTopPadding(\n options: G9SheetOptions,\n layout: Pick<G9SheetLayout, 'fullScreen' | 'fit'>,\n resting: G9SheetDetent | 'fit',\n topInset: number,\n hostHeight: number,\n): number {\n if (layout.fullScreen) return sheetTopPadding(options, topInset);\n if (layout.fit || resting !== 'large') return 0;\n const opted =\n options.useTopSafeAreaPadding !== false ||\n (options.additionalTopSafeAreaPadding ?? 0) > 0 ||\n (options.topSafeAreaPaddingOverride ?? 0) > 0;\n if (!opted) return 0;\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const top = Math.max(0, hostHeight) * (1 - full);\n return top < Math.max(0, topInset) + g9SheetTopSafeAreaBaseGap ? sheetTopPadding(options, topInset) : 0;\n}\n\n/**\n * Bottom padding of the sheet surface: the host's bottom safe inset (a visible navigation bar or gesture handle), so\n * the last row and the footer stay above it. `useBottomSafeAreaPadding: false` lets content run under it. An\n * immersive host (system bars hidden, as the AgriPad MAUI app) reports 0 and nothing changes.\n */\nexport function sheetSurfaceBottomPadding(options: G9SheetOptions, bottomInset: number): number {\n return options.useBottomSafeAreaPadding === false ? 0 : Math.max(0, bottomInset);\n}\n\n/**\n * Size-scaled animation duration (MAUI `SizeScaledAnimationDuration`): a partial traversal takes the matching slice\n * of the full duration (at least 1 ms unless the duration is 0).\n */\nexport function scaledSheetDuration(durationMs: number, traversedRatio: number, sizeScaled: boolean): number {\n if (durationMs <= 0) return 0;\n if (!sizeScaled) return durationMs;\n return Math.max(1, Math.round(durationMs * clamp(traversedRatio, 0, 1)));\n}\n\n/** Platform size constraints of the sheet surface (MAUI Android/Windows options, applied where they belong). */\nexport function platformSheetConstraints(\n options: G9SheetOptions,\n platform = currentPlatform(),\n): Record<string, string> {\n const px = (n: number) => `${n}px`;\n const style: Record<string, string> = {};\n if (platform === 'android') {\n if (options.androidMaxWidth != null) style.maxWidth = px(options.androidMaxWidth);\n if (options.androidMaxHeight != null) style.maxHeight = px(options.androidMaxHeight);\n if (options.androidMargin) {\n const [l, t, r, b] = options.androidMargin;\n style.margin = `${t}px ${r}px ${b}px ${l}px`;\n }\n }\n if (platform === 'windows') {\n if (options.windowsMaxWidth != null) style.maxWidth = px(options.windowsMaxWidth);\n if (options.windowsMaxHeight != null) style.maxHeight = px(options.windowsMaxHeight);\n if (options.windowsMinWidth != null) style.minWidth = px(options.windowsMinWidth);\n if (options.windowsMinHeight != null) style.minHeight = px(options.windowsMinHeight);\n }\n if (options.contentWidthMode === 'custom') {\n style.width = px(options.contentWidth ?? 300);\n style.alignSelf = 'center';\n }\n return style;\n}\n"],"names":["g9SheetDefaultPeekHeight","g9SheetFitMinHeight","g9SheetFitLoadingMinHeight","g9SheetDragCloseThreshold","g9SheetTopSafeAreaBaseGap","clamp","v","lo","hi","Math","currentPlatform","info","globalThis","p","pct","ratio","resolveSheetLayout","options","hostHeight","platform","_ref","_options_fullExpandedRatio","_ref1","_options_currentState","_options_maxFitToContentHeightRatio","fit","draggable","cancelable","intercepted","_options_maxFitToContentHeightRatio1","order","requested","states","d","androidHalf","half","full","peek","snap","snapPoints","current","index","fixed","clampFitHeight","natural","cap","loading","min","sheetOverlayOpacity","visibleRatio","detentRatios","max","backdropCardTransform","threshold","raw","progress","sheetVisibleRatio","restingHeightPx","_layout_fitMaxHeight","host","layout","point","undefined","Number","parentRecedeOffset","visibleHeight","sheetTopPadding","topInset","_options_additionalTopSafeAreaPadding","inset","sheetSurfaceTopPadding","resting","_options_topSafeAreaPaddingOverride","opted","top","sheetSurfaceBottomPadding","bottomInset","scaledSheetDuration","durationMs","traversedRatio","sizeScaled","platformSheetConstraints","px","n","style","l","t","r","b","_options_contentWidth"],"mappings":"AAKO,MAAMA,2BAA2B;AAEjC,MAAMC,sBAAsB;AAE5B,MAAMC,6BAA6B;AAEnC,MAAMC,4BAA4B;AAOlC,MAAMC,4BAA4B;AAEzC,MAAMC,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAGxE,SAASI;;IACd,MAAMC,OAAQC,WAAsD,UAAU;IAC9E,MAAMC,IAAI,AAAC,SAAD,QAACF,QAAAA,OAAAA,KAAAA,IAAAA,KAAM,QAAQ,AAAD,IAAC,OAAI,EAAC,EAAG,WAAW;IAC5C,IAAIE,AAAM,cAANA,GAAiB,OAAO;IAC5B,IAAIA,AAAM,UAANA,GAAa,OAAO;IACxB,I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QAAQ,gBAAgB;QACnF,IAAIA,QAAQ,aAAa,EAAE;YACzB,MAAM,CAACoE,GAAGC,GAAGC,GAAGC,EAAE,GAAGvE,QAAQ,aAAa;YAC1CmE,MAAM,MAAM,GAAG,GAAGE,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEH,EAAE,EAAE,CAAC;QAC9C;IACF;IACA,IAAIlE,AAAa,cAAbA,UAAwB;QAC1B,IAAIF,AAA2B,QAA3BA,QAAQ,eAAe,EAAUmE,MAAM,QAAQ,GAAGF,GAAGjE,QAAQ,eAAe;QAChF,IAAIA,AAA4B,QAA5BA,QAAQ,gBAAgB,EAAUmE,MAAM,SAAS,GAAGF,GAAGjE,QAAQ,gBAAgB;QACnF,IAAIA,AAA2B,QAA3BA,QAAQ,eAAe,EAAUmE,MAAM,QAAQ,GAAGF,GAAGjE,QAAQ,eAAe;QAChF,IAAIA,AAA4B,QAA5BA,QAAQ,gBAAgB,EAAUmE,MAAM,SAAS,GAAGF,GAAGjE,QAAQ,gBAAgB;IACrF;IACA,IAAIA,AAA6B,aAA7BA,QAAQ,gBAAgB,EAAe;YACxBwE;QAAjBL,MAAM,KAAK,GAAGF,GAAG,QAAAO,CAAAA,wBAAAA,QAAQ,YAAY,AAAD,IAAnBA,wBAAwB;QACzCL,MAAM,SAAS,GAAG;IACpB;IACA,OAAOA;AACT"}
1
+ {"version":3,"file":"sheet/sizing.jsx","sources":["../../src/sheet/sizing.ts"],"sourcesContent":["import type { G9SheetDetent, G9SheetOptions } from './options';\n\n// Pure sizing rules of the G9 sheet (MAUI G9SheetView + G9BottomSheetHelper sizing; guide 650–980, ADR-0019/0026).\n\n/** MAUI `G9SheetView.MinimizedHeight`: default peek height. */\nexport const g9SheetDefaultPeekHeight = 100;\n/** Absolute minimum of an authoritative fit height (MAUI helper :81). */\nexport const g9SheetFitMinHeight = 80;\n/** Floor while the height is unknown (loading window). */\nexport const g9SheetFitLoadingMinHeight = 180;\n/** Finger travel at release that requests a close (MAUI `DragCloseThreshold`). */\nexport const g9SheetDragCloseThreshold = 72;\n/**\n * Gap between the top safe-area inset and a full-screen sheet's header. MAUI reserves the inset alone\n * (`ResolveFullScreenSheetTopPadding`), but its Android inset is the status-bar band, a few dp below the cutout an\n * immersive Lynx host reports: measured side by side on a Pixel 9 Pro XL (2026-10-10), MAUI's header sat 3 dp lower.\n * (It was 8, which put every full-screen header 5 dp below MAUI's.)\n */\nexport const g9SheetTopSafeAreaBaseGap = 3;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** The platform the app runs on (Lynx `SystemInfo.platform`), lower-cased; `'unknown'` outside Lynx. */\nexport function currentPlatform(): 'android' | 'ios' | 'windows' | 'macos' | 'unknown' {\n const info = (globalThis as { SystemInfo?: { platform?: string } }).SystemInfo;\n const p = (info?.platform ?? '').toLowerCase();\n if (p === 'android') return 'android';\n if (p === 'ios') return 'ios';\n if (p.startsWith('win')) return 'windows';\n if (p === 'macos' || p === 'mac' || p === 'osx') return 'macos';\n return 'unknown';\n}\n\n/** What the adapter passes to lynx-ui `SheetRoot` and how the frame behaves. */\nexport interface G9SheetLayout {\n /** lynx-ui snap points, small to large: pixels, `'NN%'` of the host, or `'fit'`. */\n readonly snapPoints: Array<number | string>;\n readonly initialSnap: number;\n /** One detent, or fit-to-content (MAUI \"fixed\"): no grabber, no detent dragging. */\n readonly fixed: boolean;\n readonly fit: boolean;\n /** Grabber visible (`hasHandle && isDraggable && (!fixed || handleOnSingleDetent)`). */\n readonly showHandle: boolean;\n readonly dragDisabled: boolean;\n /** Drag past the lowest detent may request a close. */\n readonly enableDragToClose: boolean;\n /** Backdrop tap requests a close. */\n readonly closeOnOverlayTap: boolean;\n /** The resting body cap for a fit sheet (`maxFitToContentHeightRatio × host`), else `null`. */\n readonly fitMaxHeight: number | null;\n /** Whether the sheet's largest detent is full screen. */\n readonly fullScreen: boolean;\n /**\n * The body fills the surface, so the footer rests at the sheet's bottom edge: a full-screen sheet, or one fixed detent\n * (`states: ['large']` with `fullExpandedRatio: 0.9`) — its surface has a definite height. A sheet that can move between\n * detents or fits its content keeps a body as tall as the content.\n */\n readonly fillBody: boolean;\n}\n\nconst pct = (ratio: number) => `${Math.round(ratio * 10000) / 100}%`;\n\n/**\n * Maps G9 options to a lynx-ui layout (the agreed mapping of MAUI `ApplyOptions`): fit → `['fit']` capped at\n * `maxFitToContentHeightRatio`; states → peek pixels / half ratio / full ratio for the allowed detents, the initial\n * detent from `currentState`. The MAUI quirks (a hidden 100 dp detent under `[medium, large]`, a peek-only sheet that\n * may expand) are not carried over: the detents are exactly `states` (docs/sheets.md \"deliberate differences\").\n */\nexport function resolveSheetLayout(\n options: G9SheetOptions,\n hostHeight: number,\n platform = currentPlatform(),\n): G9SheetLayout {\n const fit = options.sizeMode === 'fitToContent';\n const draggable = options.isDraggable !== false;\n const cancelable = options.isCancelable !== false;\n const intercepted = options.onBackRequested != null;\n if (fit) {\n const ratio = clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1);\n return {\n snapPoints: ['fit'],\n initialSnap: 0,\n fixed: true,\n fit: true,\n showHandle: false,\n dragDisabled: true,\n enableDragToClose: false,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: Math.max(g9SheetFitMinHeight, Math.floor(hostHeight * ratio)),\n fullScreen: false,\n fillBody: false,\n };\n }\n const order: G9SheetDetent[] = ['peek', 'medium', 'large'];\n const requested = options.states && options.states.length > 0 ? options.states : ['medium', 'large'];\n const states = order.filter((d) => requested.includes(d));\n const androidHalf = platform === 'android' ? options.androidHalfExpandedRatio : null;\n const half = clamp(androidHalf ?? options.halfExpandedRatio ?? 0.5, 0.1, 0.9);\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const peek = Math.max(1, options.collapsedHeight ?? options.peekHeight ?? g9SheetDefaultPeekHeight);\n const snap = (d: G9SheetDetent): number | string =>\n d === 'peek' ? Math.min(peek, Math.max(1, hostHeight)) : d === 'medium' ? pct(half) : pct(full);\n const snapPoints = states.map(snap);\n if (options.expandedFitsContent && snapPoints.length > 0) snapPoints[snapPoints.length - 1] = 'fit';\n const current = options.currentState ?? 'medium';\n const index = states.indexOf(current);\n const fixed = states.length <= 1;\n return {\n snapPoints,\n initialSnap: index >= 0 ? index : 0,\n fixed,\n fit: false,\n showHandle: options.hasHandle !== false && draggable && (!fixed || options.handleOnSingleDetent === true),\n dragDisabled: !draggable || intercepted,\n enableDragToClose: cancelable && draggable && !intercepted,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: options.expandedFitsContent\n ? Math.max(\n g9SheetFitMinHeight,\n Math.floor(hostHeight * clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1)),\n )\n : null,\n // One 'large' detent sized to its content is not full screen (no status-bar padding above a short sheet).\n fullScreen: states.length === 1 && states[0] === 'large' && full >= 1 && options.expandedFitsContent !== true,\n fillBody: fixed && !options.expandedFitsContent,\n };\n}\n\n/** Clamps a measured fit body height: `[80, cap]`, or `[180, cap]` while loading (MAUI fit engine). */\nexport function clampFitHeight(natural: number, cap: number, loading: boolean): number {\n const min = loading ? g9SheetFitLoadingMinHeight : g9SheetFitMinHeight;\n if (!(natural > 0)) return Math.min(min, cap);\n return clamp(natural, Math.min(min, cap), cap);\n}\n\n/**\n * Scrim opacity for a visible ratio (MAUI helper overlay rule): between the smallest and the largest detent it runs\n * from `min` to `max`; a single detent uses `max`; below the smallest detent it fades with the ratio.\n */\nexport function sheetOverlayOpacity(\n visibleRatio: number,\n detentRatios: ReadonlyArray<number>,\n min: number,\n max: number,\n): number {\n if (detentRatios.length === 0) return max;\n const lo = Math.min(...detentRatios);\n const hi = Math.max(...detentRatios);\n if (visibleRatio < lo) return (detentRatios.length === 1 ? max : min) * clamp(visibleRatio / lo, 0, 1);\n if (hi === lo) return max;\n return min + (max - min) * clamp((visibleRatio - lo) / (hi - lo), 0, 1);\n}\n\n/** The page recede behind a tall primary sheet (MAUI backdrop card): scale 1 → 0.93, translateY 0 → 12. */\nexport function backdropCardTransform(visibleRatio: number, threshold = 0.75): { scale: number; translateY: number } {\n const raw = clamp((visibleRatio - threshold) / Math.max(1e-6, 1 - threshold), 0, 1);\n const progress = raw <= 0 ? 0 : 1 - (1 - raw) ** (1 / 3);\n return { scale: 1 - 0.07 * progress, translateY: 12 * progress };\n}\n\n/**\n * The visible share of the host a detent sheet covers: its resting height when known, else its opening detent\n * (peek = peek height, medium = half ratio, large = full ratio; `expandedFitsContent` large counts as the fit cap).\n */\nexport function sheetVisibleRatio(\n options: G9SheetOptions,\n hostHeight: number,\n restingHeightPx: number | null,\n platform = currentPlatform(),\n): number {\n const host = Math.max(1, hostHeight);\n if (restingHeightPx != null) return clamp(restingHeightPx / host, 0, 1);\n const layout = resolveSheetLayout(options, host, platform);\n const point = layout.snapPoints[layout.initialSnap];\n if (typeof point === 'number') return clamp(point / host, 0, 1);\n if (point === 'fit' || point === undefined) return (layout.fitMaxHeight ?? 0) / host;\n return clamp(Number.parseFloat(point) / 100, 0, 1);\n}\n\n/** How far a receded parent sheet sinks: `max(24, visible × 0.25)` (MAUI stack recede). */\nexport function parentRecedeOffset(visibleHeight: number): number {\n return Math.max(24, visibleHeight * 0.25);\n}\n\n/** Top padding of a full-screen sheet (MAUI safe-area rule). */\nexport function sheetTopPadding(options: G9SheetOptions, topInset: number): number {\n if (options.topSafeAreaPaddingOverride != null) return Math.max(0, options.topSafeAreaPaddingOverride);\n const inset = options.useTopSafeAreaPadding === false ? 0 : Math.max(0, topInset);\n return inset + g9SheetTopSafeAreaBaseGap + Math.max(0, options.additionalTopSafeAreaPadding ?? 0);\n}\n\n/**\n * Top padding of the sheet surface where it rests. A full-screen sheet always reserves {@link sheetTopPadding}. A\n * detent sheet resting at its `large` detent reserves it too when that detent reaches under the top inset (MAUI\n * state-aware top padding, `G9BottomSheetHelper.ApplyStateAwareTopPadding`): its content never sits under the status\n * bar or the camera cutout. Opted out like MAUI: `useTopSafeAreaPadding: false` with no additional/override padding.\n */\nexport function sheetSurfaceTopPadding(\n options: G9SheetOptions,\n layout: Pick<G9SheetLayout, 'fullScreen' | 'fit'>,\n resting: G9SheetDetent | 'fit',\n topInset: number,\n hostHeight: number,\n): number {\n if (layout.fullScreen) return sheetTopPadding(options, topInset);\n if (layout.fit || resting !== 'large') return 0;\n const opted =\n options.useTopSafeAreaPadding !== false ||\n (options.additionalTopSafeAreaPadding ?? 0) > 0 ||\n (options.topSafeAreaPaddingOverride ?? 0) > 0;\n if (!opted) return 0;\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const top = Math.max(0, hostHeight) * (1 - full);\n return top < Math.max(0, topInset) + g9SheetTopSafeAreaBaseGap ? sheetTopPadding(options, topInset) : 0;\n}\n\n/**\n * Bottom padding of the sheet surface: the host's bottom safe inset (a visible navigation bar or gesture handle), so\n * the last row and the footer stay above it. `useBottomSafeAreaPadding: false` lets content run under it. An\n * immersive host (system bars hidden, as the AgriPad MAUI app) reports 0 and nothing changes.\n */\nexport function sheetSurfaceBottomPadding(options: G9SheetOptions, bottomInset: number): number {\n return options.useBottomSafeAreaPadding === false ? 0 : Math.max(0, bottomInset);\n}\n\n/**\n * Size-scaled animation duration (MAUI `SizeScaledAnimationDuration`): a partial traversal takes the matching slice\n * of the full duration (at least 1 ms unless the duration is 0).\n */\nexport function scaledSheetDuration(durationMs: number, traversedRatio: number, sizeScaled: boolean): number {\n if (durationMs <= 0) return 0;\n if (!sizeScaled) return durationMs;\n return Math.max(1, Math.round(durationMs * clamp(traversedRatio, 0, 1)));\n}\n\n/** Platform size constraints of the sheet surface (MAUI Android/Windows options, applied where they belong). */\nexport function platformSheetConstraints(\n options: G9SheetOptions,\n platform = currentPlatform(),\n): Record<string, string> {\n const px = (n: number) => `${n}px`;\n const style: Record<string, string> = {};\n if (platform === 'android') {\n if (options.androidMaxWidth != null) style.maxWidth = px(options.androidMaxWidth);\n if (options.androidMaxHeight != null) style.maxHeight = px(options.androidMaxHeight);\n if (options.androidMargin) {\n const [l, t, r, b] = options.androidMargin;\n style.margin = `${t}px ${r}px ${b}px ${l}px`;\n }\n }\n if (platform === 'windows') {\n if (options.windowsMaxWidth != null) style.maxWidth = px(options.windowsMaxWidth);\n if (options.windowsMaxHeight != null) style.maxHeight = px(options.windowsMaxHeight);\n if (options.windowsMinWidth != null) style.minWidth = px(options.windowsMinWidth);\n if (options.windowsMinHeight != null) style.minHeight = px(options.windowsMinHeight);\n }\n if (options.contentWidthMode === 'custom') {\n style.width = px(options.contentWidth ?? 300);\n style.alignSelf = 'center';\n }\n return style;\n}\n"],"names":["g9SheetDefaultPeekHeight","g9SheetFitMinHeight","g9SheetFitLoadingMinHeight","g9SheetDragCloseThreshold","g9SheetTopSafeAreaBaseGap","clamp","v","lo","hi","Math","currentPlatform","info","globalThis","p","pct","ratio","resolveSheetLayout","options","hostHeight","platform","_ref","_options_fullExpandedRatio","_ref1","_options_currentState","_options_maxFitToContentHeightRatio","fit","draggable","cancelable","intercepted","_options_maxFitToContentHeightRatio1","order","requested","states","d","androidHalf","half","full","peek","snap","snapPoints","current","index","fixed","clampFitHeight","natural","cap","loading","min","sheetOverlayOpacity","visibleRatio","detentRatios","max","backdropCardTransform","threshold","raw","progress","sheetVisibleRatio","restingHeightPx","_layout_fitMaxHeight","host","layout","point","undefined","Number","parentRecedeOffset","visibleHeight","sheetTopPadding","topInset","_options_additionalTopSafeAreaPadding","inset","sheetSurfaceTopPadding","resting","_options_topSafeAreaPaddingOverride","opted","top","sheetSurfaceBottomPadding","bottomInset","scaledSheetDuration","durationMs","traversedRatio","sizeScaled","platformSheetConstraints","px","n","style","l","t","r","b","_options_contentWidth"],"mappings":"AAKO,MAAMA,2BAA2B;AAEjC,MAAMC,sBAAsB;AAE5B,MAAMC,6BAA6B;AAEnC,MAAMC,4BAA4B;AAOlC,MAAMC,4BAA4B;AAEzC,MAAMC,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAGxE,S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 -1,4 +1,5 @@
1
1
  import "./tab-bar.css";
2
+ import { g9Ms } from "@g9tm/lynxcontrols-foundation";
2
3
  import { useEffect, useRef, useState } from "@lynx-js/react";
3
4
  import { usePressVisual } from "../base/press.jsx";
4
5
  import { startTimer, stopTimer } from "../base/timers.jsx";
@@ -13,8 +14,12 @@ const PRESS = Object.freeze({
13
14
  rest: g9TabBarMetrics.defaultRestOpacity,
14
15
  pressed: g9TabBarMetrics.itemPressedOpacity,
15
16
  hovered: g9TabBarMetrics.itemHoveredOpacity,
16
- inMs: g9TabBarMetrics.touchAnimationDurationMs,
17
- outMs: g9TabBarMetrics.touchAnimationDurationMs
17
+ get inMs () {
18
+ return g9Ms(g9TabBarMetrics.touchAnimationDurationMs);
19
+ },
20
+ get outMs () {
21
+ return g9Ms(g9TabBarMetrics.touchAnimationDurationMs);
22
+ }
18
23
  });
19
24
  function G9TabBar(props) {
20
25
  var _props_subMenuItems, _props_fabIndex, _props_resetCenterOnMenuSelection, _props_defaultSelectedIndex, _props_className, _items_fab_text;
@@ -196,12 +201,12 @@ function G9TabBar(props) {
196
201
  <svg className="g9-tab-bar__chrome-flat" content={tabBarChromeSvg(barWidth, metrics.barHeight, null, chromeFill, chromeStroke, barStyle)} style={{
197
202
  ...chromeBox,
198
203
  opacity: floating ? 0 : 1,
199
- transition: `opacity ${g9TabBarMetrics.centerStateDurationMs}ms ease-out`
204
+ transition: `opacity ${g9Ms(g9TabBarMetrics.centerStateDurationMs)}ms ease-out`
200
205
  }}/>
201
206
  {fab >= 0 ? <svg className="g9-tab-bar__chrome-notched" content={tabBarChromeSvg(barWidth, metrics.barHeight, fabCenterX - g9TabBarMetrics.barHorizontalGap, chromeFill, chromeStroke, barStyle)} style={{
202
207
  ...chromeBox,
203
208
  opacity: floating ? 1 : 0,
204
- transition: `opacity ${g9TabBarMetrics.centerStateDurationMs}ms ease-out`
209
+ transition: `opacity ${g9Ms(g9TabBarMetrics.centerStateDurationMs)}ms ease-out`
205
210
  }}/> : null}
206
211
  <view className="g9-tab-bar__slots" style={metrics.itemsHorizontalPadding > 0 ? {
207
212
  left: `${metrics.itemsHorizontalPadding}px`,
@@ -209,7 +214,7 @@ function G9TabBar(props) {
209
214
  } : {}}>
210
215
  {indicatorSlot >= 0 && metrics.showsSelectionIndicator ? <view className="g9-tab-bar__indicator" style={{
211
216
  left: `${(visualSlot(slots.findIndex((s)=>'item' === s.kind ? s.index === indicatorSlot : indicatorSlot === tabBarOverflowSlot)) + 0.5) * 100 / slotCount}%`,
212
- transition: `left ${g9TabBarMetrics.indicatorMoveDurationMs}ms cubic-bezier(0.215, 0.61, 0.355, 1)`,
217
+ transition: `left ${g9Ms(g9TabBarMetrics.indicatorMoveDurationMs)}ms cubic-bezier(0.215, 0.61, 0.355, 1)`,
213
218
  top: `${g9TabBarMetrics.indicatorTopOffset + metrics.selectedItemNudgeY}px`
214
219
  }}/> : null}
215
220
  {slotViews}
@@ -227,7 +232,7 @@ function G9TabBar(props) {
227
232
  bottom: `${g9TabBarMetrics.barBottomGap + metrics.barHeight - (metrics.fabSize - metrics.fabProtrusionAboveBar)}px`,
228
233
  opacity: floating ? 1 : 0,
229
234
  transform: floating ? 'translateY(0px) scale(1)' : `translateY(${g9TabBarMetrics.fabIdleVerticalOffset}px) scale(${g9TabBarMetrics.fabIdleScaleMin})`,
230
- transition: floating ? `transform ${g9TabBarMetrics.centerStateBouncyDurationMs}ms ${bounce}, opacity ${g9TabBarMetrics.centerStateDurationMs}ms ease-out` : `transform ${g9TabBarMetrics.centerStateDurationMs}ms cubic-bezier(0.55, 0.055, 0.675, 0.19), opacity ${g9TabBarMetrics.centerStateDurationMs}ms ease-in`
235
+ transition: floating ? `transform ${g9Ms(g9TabBarMetrics.centerStateBouncyDurationMs)}ms ${bounce}, opacity ${g9Ms(g9TabBarMetrics.centerStateDurationMs)}ms ease-out` : `transform ${g9Ms(g9TabBarMetrics.centerStateDurationMs)}ms cubic-bezier(0.55, 0.055, 0.675, 0.19), opacity ${g9Ms(g9TabBarMetrics.centerStateDurationMs)}ms ease-in`
231
236
  }} bindtap={floating ? onFab : void 0} user-interaction-enabled={floating}>
232
237
  {fabShadow ? <svg className="g9-tab-bar__fab-shadow" content={fabShadow} style={{
233
238
  left: `${-pad}px`,