@g9tm/lynxcontrols 1.4.0 → 1.4.2

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 (148) hide show
  1. package/README.md +7 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/base/control.d.ts +24 -0
  4. package/dist/base/control.d.ts.map +1 -1
  5. package/dist/base/control.jsx +14 -2
  6. package/dist/base/control.jsx.map +1 -1
  7. package/dist/base/index.d.ts +1 -1
  8. package/dist/base/index.d.ts.map +1 -1
  9. package/dist/base/index.jsx +1 -1
  10. package/dist/base/pressable.d.ts.map +1 -1
  11. package/dist/base/pressable.jsx +1 -1
  12. package/dist/base/pressable.jsx.map +1 -1
  13. package/dist/button/button.d.ts.map +1 -1
  14. package/dist/button/button.jsx +4 -3
  15. package/dist/button/button.jsx.map +1 -1
  16. package/dist/button/header-action-button.d.ts.map +1 -1
  17. package/dist/button/header-action-button.jsx +1 -1
  18. package/dist/button/header-action-button.jsx.map +1 -1
  19. package/dist/button/icon-button.d.ts.map +1 -1
  20. package/dist/button/icon-button.jsx +1 -1
  21. package/dist/button/icon-button.jsx.map +1 -1
  22. package/dist/button/nav-card.d.ts.map +1 -1
  23. package/dist/button/nav-card.jsx +6 -5
  24. package/dist/button/nav-card.jsx.map +1 -1
  25. package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
  26. package/dist/button/vertical-icon-text-button.jsx +1 -1
  27. package/dist/button/vertical-icon-text-button.jsx.map +1 -1
  28. package/dist/display/culture-date-time-label.d.ts.map +1 -1
  29. package/dist/display/culture-date-time-label.jsx +3 -1
  30. package/dist/display/culture-date-time-label.jsx.map +1 -1
  31. package/dist/display/progress-bar.jsx +1 -1
  32. package/dist/display/progress-bar.jsx.map +1 -1
  33. package/dist/display/separator.jsx +2 -2
  34. package/dist/display/separator.jsx.map +1 -1
  35. package/dist/display/title-with-line.jsx +1 -1
  36. package/dist/display/title-with-line.jsx.map +1 -1
  37. package/dist/expander/expander.d.ts.map +1 -1
  38. package/dist/expander/expander.jsx +6 -4
  39. package/dist/expander/expander.jsx.map +1 -1
  40. package/dist/fields/fields.css +12 -4
  41. package/dist/fields/fields.css.map +1 -1
  42. package/dist/fields/index.d.ts +1 -0
  43. package/dist/fields/index.d.ts.map +1 -1
  44. package/dist/fields/index.jsx +1 -0
  45. package/dist/fields/notch.d.ts +10 -0
  46. package/dist/fields/notch.d.ts.map +1 -0
  47. package/dist/fields/notch.jsx +9 -0
  48. package/dist/fields/notch.jsx.map +1 -0
  49. package/dist/fields/outlined-field.d.ts +7 -1
  50. package/dist/fields/outlined-field.d.ts.map +1 -1
  51. package/dist/fields/outlined-field.jsx +8 -5
  52. package/dist/fields/outlined-field.jsx.map +1 -1
  53. package/dist/fields/pin-entry.d.ts +2 -0
  54. package/dist/fields/pin-entry.d.ts.map +1 -1
  55. package/dist/fields/pin-entry.jsx +2 -1
  56. package/dist/fields/pin-entry.jsx.map +1 -1
  57. package/dist/fields/text-entry.d.ts.map +1 -1
  58. package/dist/fields/text-entry.jsx +12 -2
  59. package/dist/fields/text-entry.jsx.map +1 -1
  60. package/dist/fields/use-text-input.d.ts.map +1 -1
  61. package/dist/fields/use-text-input.jsx +11 -1
  62. package/dist/fields/use-text-input.jsx.map +1 -1
  63. package/dist/host/hooks.d.ts +5 -0
  64. package/dist/host/hooks.d.ts.map +1 -1
  65. package/dist/host/hooks.jsx +4 -1
  66. package/dist/host/hooks.jsx.map +1 -1
  67. package/dist/host/index.d.ts +1 -1
  68. package/dist/host/index.d.ts.map +1 -1
  69. package/dist/host/index.jsx +1 -1
  70. package/dist/popup/frame.d.ts.map +1 -1
  71. package/dist/popup/frame.jsx +11 -3
  72. package/dist/popup/frame.jsx.map +1 -1
  73. package/dist/popup/index.d.ts +1 -1
  74. package/dist/popup/index.d.ts.map +1 -1
  75. package/dist/popup/popup.css +1 -1
  76. package/dist/popup/popup.css.map +1 -1
  77. package/dist/popup/service.d.ts.map +1 -1
  78. package/dist/popup/service.jsx +12 -4
  79. package/dist/popup/service.jsx.map +1 -1
  80. package/dist/popup/types.d.ts +11 -0
  81. package/dist/popup/types.d.ts.map +1 -1
  82. package/dist/popup/types.jsx.map +1 -1
  83. package/dist/selection/selection-sheet.d.ts.map +1 -1
  84. package/dist/selection/selection-sheet.jsx +7 -3
  85. package/dist/selection/selection-sheet.jsx.map +1 -1
  86. package/dist/selection/selection.css +1 -0
  87. package/dist/selection/selection.css.map +1 -1
  88. package/dist/sheet/frame.d.ts +2 -0
  89. package/dist/sheet/frame.d.ts.map +1 -1
  90. package/dist/sheet/frame.jsx +134 -69
  91. package/dist/sheet/frame.jsx.map +1 -1
  92. package/dist/sheet/gesture.d.ts +51 -0
  93. package/dist/sheet/gesture.d.ts.map +1 -0
  94. package/dist/sheet/gesture.jsx +107 -0
  95. package/dist/sheet/gesture.jsx.map +1 -0
  96. package/dist/sheet/handoff.d.ts +32 -0
  97. package/dist/sheet/handoff.d.ts.map +1 -0
  98. package/dist/sheet/handoff.jsx +33 -0
  99. package/dist/sheet/handoff.jsx.map +1 -0
  100. package/dist/sheet/header.d.ts +12 -1
  101. package/dist/sheet/header.d.ts.map +1 -1
  102. package/dist/sheet/header.jsx +42 -29
  103. package/dist/sheet/header.jsx.map +1 -1
  104. package/dist/sheet/index.d.ts +3 -2
  105. package/dist/sheet/index.d.ts.map +1 -1
  106. package/dist/sheet/index.jsx +3 -2
  107. package/dist/sheet/motion.d.ts +59 -0
  108. package/dist/sheet/motion.d.ts.map +1 -0
  109. package/dist/sheet/motion.jsx +59 -0
  110. package/dist/sheet/motion.jsx.map +1 -0
  111. package/dist/sheet/options.d.ts +34 -2
  112. package/dist/sheet/options.d.ts.map +1 -1
  113. package/dist/sheet/options.jsx +2 -1
  114. package/dist/sheet/options.jsx.map +1 -1
  115. package/dist/sheet/service.d.ts.map +1 -1
  116. package/dist/sheet/service.jsx +1 -1
  117. package/dist/sheet/service.jsx.map +1 -1
  118. package/dist/sheet/sheet.css +52 -1
  119. package/dist/sheet/sheet.css.map +1 -1
  120. package/dist/sheet/sizing.d.ts +21 -3
  121. package/dist/sheet/sizing.d.ts.map +1 -1
  122. package/dist/sheet/sizing.jsx +15 -2
  123. package/dist/sheet/sizing.jsx.map +1 -1
  124. package/dist/tab-bar/tab-bar.d.ts +5 -0
  125. package/dist/tab-bar/tab-bar.d.ts.map +1 -1
  126. package/dist/tab-bar/tab-bar.jsx +5 -2
  127. package/dist/tab-bar/tab-bar.jsx.map +1 -1
  128. package/dist/toast/service.d.ts.map +1 -1
  129. package/dist/toast/service.jsx +58 -21
  130. package/dist/toast/service.jsx.map +1 -1
  131. package/dist/toast/store.d.ts +2 -0
  132. package/dist/toast/store.d.ts.map +1 -1
  133. package/dist/toast/store.jsx +4 -2
  134. package/dist/toast/store.jsx.map +1 -1
  135. package/dist/toast/toast.css +20 -13
  136. package/dist/toast/toast.css.map +1 -1
  137. package/dist/toggle/checkbox.d.ts.map +1 -1
  138. package/dist/toggle/checkbox.jsx +1 -1
  139. package/dist/toggle/checkbox.jsx.map +1 -1
  140. package/dist/toggle/chip-group.d.ts.map +1 -1
  141. package/dist/toggle/chip-group.jsx +5 -5
  142. package/dist/toggle/chip-group.jsx.map +1 -1
  143. package/dist/toggle/switch.d.ts.map +1 -1
  144. package/dist/toggle/switch.jsx +2 -2
  145. package/dist/toggle/switch.jsx.map +1 -1
  146. package/dist/toggle/toggle.css +1 -2
  147. package/dist/toggle/toggle.css.map +1 -1
  148. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/header.jsx","sources":["../../src/sheet/header.tsx"],"sourcesContent":["import { G9StringKey } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useState } from '@lynx-js/react';\nimport { g9RowStyle } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { G9HeaderActionButton } from '../button/header-action-button';\nimport { G9IconSlot } from '../icon/slot';\nimport { useG9Direction, useG9Settings, useG9Strings } from '../provider/hooks';\nimport type { G9SheetOptions, G9SheetToolbarItem } from './options';\n\n/** Header metrics (MAUI `G9LayoutMetrics` sheet header values). */\nexport const g9SheetHeaderMetrics = Object.freeze({\n minHeight: 64,\n verticalGap: 10,\n bodyTopGap: 10,\n backButton: 30,\n backGlyph: 24,\n backHitSlop: 7,\n titleSize: 16.2,\n footerMaxButtonsPerRow: 3,\n});\n\nfunction ToolbarItemButton(props: { readonly item: G9SheetToolbarItem }): ReactNode {\n const { item } = props;\n const [running, setRunning] = useState(false);\n const busy = item.isBusy === true || running;\n const onPress = () => {\n if (busy && item.disableWhileBusy !== false) return;\n const result = item.onPress?.();\n if (result && typeof (result as PromiseLike<unknown>).then === 'function') {\n setRunning(true);\n (result as PromiseLike<unknown>).then(\n () => setRunning(false),\n () => setRunning(false),\n );\n }\n };\n return (\n <G9HeaderActionButton\n {...(item.icon !== undefined ? { icon: item.icon } : {})}\n {...(item.text ? { buttonText: item.text } : {})}\n isBusy={busy && item.showBusyIndicator === true}\n isActive={item.isActive === true}\n showActiveBadge={item.showActiveBadge === true}\n animatePress={item.animatePress !== false}\n {...(item.iconSize ? { iconSize: item.iconSize } : {})}\n {...(item.accessibilityLabel ? { accessibilityLabel: item.accessibilityLabel } : {})}\n disabled={busy && item.disableWhileBusy !== false && item.showBusyIndicator !== true}\n onPress={onPress}\n />\n );\n}\n\n/** Props of {@link G9SheetHeader}. */\nexport interface G9SheetHeaderProps {\n readonly options: G9SheetOptions;\n /** The leading button (MAUI back request with source `toolbarButton`). */\n readonly onBack: () => void;\n}\n\n/**\n * The three-slot sheet header (MAUI header template): leading back/close button (RTL-aware arrow, or × with\n * `useCloseIcon`), the title (centre or near the back button), the trailing toolbar items; slot overrides\n * `headerView` > `headerLeadingAndTitleView` > `headerTitleAndTrailingView` > per-slot views > defaults. A hairline\n * closes the band. Rendered only with `showToolbar`.\n */\nexport function G9SheetHeader(props: G9SheetHeaderProps): ReactNode {\n const o = props.options;\n const direction = useG9Direction();\n const glyphs = useG9Settings().glyphs;\n const strings = useG9Strings();\n const back = useG9Press(props.onBack, { source: 'G9SheetHeader' });\n if (o.showToolbar !== true) return null;\n if (o.headerView !== undefined && o.headerView !== null) {\n return <view className=\"g9-sheet-header g9-sheet-header--custom\">{o.headerView}</view>;\n }\n const m = g9SheetHeaderMetrics;\n const leading =\n o.headerLeadingView ??\n (o.showCloseButton ? (\n <view\n className=\"g9-sheet-header__back\"\n style={{ width: `${m.backButton}px`, height: `${m.backButton}px` }}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={o.useCloseIcon ? strings.get(G9StringKey.Close) : strings.get(G9StringKey.Back)}\n hit-slop={{\n top: `${m.backHitSlop}px`,\n left: `${m.backHitSlop}px`,\n right: `${m.backHitSlop}px`,\n bottom: `${m.backHitSlop}px`,\n }}\n bindtap={back}\n >\n <G9IconSlot\n icon={o.useCloseIcon ? glyphs.clear : direction === 'rtl' ? glyphs.arrowForward : glyphs.arrowBack}\n size={m.backGlyph}\n color=\"var(--g9-on-surface)\"\n />\n </view>\n ) : null);\n const title =\n o.headerTitleView ??\n (o.title ? (\n <text className=\"g9-sheet-header__title\" text-maxline=\"1\" style={{ fontSize: `${m.titleSize}px` }}>\n {o.title}\n </text>\n ) : null);\n const items = o.toolbarItems ?? o.toolbarItemsFactory?.() ?? [];\n const trailing =\n o.headerTrailingView ??\n (items.length > 0 ? (\n <view className=\"g9-sheet-header__items\" style={g9RowStyle(direction)}>\n {items.map((item, i) => (\n <ToolbarItemButton key={item.key ?? String(i)} item={item} />\n ))}\n </view>\n ) : null);\n const spanned = o.headerLeadingAndTitleView != null || o.headerTitleAndTrailingView != null;\n const center = (o.headerTitlePlacement ?? 'center') === 'center' && o.reserveEmptyHeaderSlots !== false && !spanned;\n let slots: ReactNode;\n if (o.headerLeadingAndTitleView != null) {\n slots = [\n <view key=\"lt\" className=\"g9-sheet-header__grow\">\n {o.headerLeadingAndTitleView}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n } else if (o.headerTitleAndTrailingView != null) {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n <view key=\"tt\" className=\"g9-sheet-header__grow\">\n {o.headerTitleAndTrailingView}\n </view>,\n ];\n } else if (center) {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__side g9-sheet-header__start\">\n {leading}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__title-slot\">\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__side g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n } else {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__grow g9-sheet-header__title-near\">\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n }\n return (\n <view\n className={`g9-sheet-header g9-dir-${direction}`}\n style={{ minHeight: `${m.minHeight}px`, ...g9RowStyle(direction) }}\n >\n {slots}\n </view>\n );\n}\n\n/** Props of {@link G9SheetFooter}. */\nexport interface G9SheetFooterProps {\n readonly options: G9SheetOptions;\n}\n\n/** Rows of footer buttons: equal-width columns, wrapping every `perRow` (MAUI footer template). */\nexport function footerRows<T>(buttons: ReadonlyArray<T>, perRow: number): T[][] {\n const n = Math.max(1, Math.floor(perRow));\n const rows: T[][] = [];\n for (let i = 0; i < buttons.length; i += n) rows.push(buttons.slice(i, i + n));\n return rows;\n}\n\n/** The sheet footer: `footerView`, else `footerButtons` in equal columns (3 per row by default), with a divider. */\nexport function G9SheetFooter(props: G9SheetFooterProps): ReactNode {\n const direction = useG9Direction();\n const o = props.options;\n if (o.footerView != null) return <view className=\"g9-sheet-footer\">{o.footerView}</view>;\n const buttons = o.footerButtons ?? [];\n if (buttons.length === 0) return null;\n return (\n <view className=\"g9-sheet-footer\">\n {footerRows(buttons, o.footerMaxButtonsPerRow ?? g9SheetHeaderMetrics.footerMaxButtonsPerRow).map((row, r) => (\n <view key={r} className=\"g9-sheet-footer__row\" style={g9RowStyle(direction)}>\n {row.map((button, i) => (\n <view key={i} className=\"g9-sheet-footer__cell\">\n {button}\n </view>\n ))}\n </view>\n ))}\n </view>\n );\n}\n"],"names":["g9SheetHeaderMetrics","Object","ToolbarItemButton","props","item","running","setRunning","useState","busy","onPress","result","G9HeaderActionButton","undefined","G9SheetHeader","_o_headerLeadingView","_o_headerTitleView","_ref","_o_headerTrailingView","_o_headerTitlePlacement","o","direction","useG9Direction","glyphs","useG9Settings","strings","useG9Strings","back","useG9Press","view","m","leading","G9StringKey","G9IconSlot","title","text","items","trailing","g9RowStyle","i","_item_key","String","spanned","center","slots","footerRows","buttons","perRow","n","Math","rows","G9SheetFooter","_o_footerButtons","_o_footerMaxButtonsPerRow","row","r","button"],"mappings":";;;;;;;AAUO,MAAMA,uBAAuBC,OAAO,MAAM,CAAC;IAChD,WAAW;IACX,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,aAAa;IACb,WAAW;IACX,wBAAwB;AAC1B;AAEA,SAASC,kBAAkBC,KAA4C;IACrE,MAAM,EAAEC,IAAI,EAAE,GAAGD;IACjB,MAAM,CAACE,SAASC,WAAW,GAAGC,SAAS;IACvC,MAAMC,OAAOJ,AAAgB,SAAhBA,KAAK,MAAM,IAAaC;IACrC,MAAMI,UAAU;YAECL;QADf,IAAII,QAAQJ,AAA0B,UAA1BA,KAAK,gBAAgB,EAAY;QAC7C,MAAMM,SAAS,QAAAN,CAAAA,gBAAAA,KAAK,OAAO,AAAD,IAAXA,KAAAA,IAAAA,cAAAA,IAAAA,CAAAA;QACf,IAAIM,UAAU,AAAiD,cAAjD,OAAQA,OAAgC,IAAI,EAAiB;YACzEJ,WAAW;YACVI,OAAgC,IAAI,CACnC,IAAMJ,WAAW,QACjB,IAAMA,WAAW;QAErB;IACF;IACA,QACGK,sBACE,GAAIP,AAAcQ,WAAdR,KAAK,IAAI,GAAiB;QAAE,MAAMA,KAAK,IAAI;IAAC,IAAI,CAAC,CAAC,GACtD,GA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Content":["import { formatColor, G9StringKey, withAlpha } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useState } from '@lynx-js/react';\nimport { g9ChildId, g9IdProps, g9RowStyle, g9SafeId } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { G9HeaderActionButton } from '../button/header-action-button';\nimport { G9IconSlot } from '../icon/slot';\nimport { useG9Direction, useG9Settings, useG9Strings, useG9Theme } from '../provider/hooks';\nimport type { G9SheetOptions, G9SheetToolbarItem } from './options';\n\n/** Header metrics (MAUI `G9LayoutMetrics` sheet header values). */\nexport const g9SheetHeaderMetrics = Object.freeze({\n minHeight: 64,\n verticalGap: 10,\n bodyTopGap: 10,\n backButton: 30,\n backGlyph: 24,\n backHitSlop: 7,\n titleSize: 16.2,\n footerMaxButtonsPerRow: 3,\n});\n\nfunction ToolbarItemButton(props: { readonly item: G9SheetToolbarItem; readonly id: string | undefined }): ReactNode {\n const { item } = props;\n const [running, setRunning] = useState(false);\n const busy = item.isBusy === true || running;\n const onPress = () => {\n if (busy && item.disableWhileBusy !== false) return;\n const result = item.onPress?.();\n if (result && typeof (result as PromiseLike<unknown>).then === 'function') {\n setRunning(true);\n (result as PromiseLike<unknown>).then(\n () => setRunning(false),\n () => setRunning(false),\n );\n }\n };\n return (\n <G9HeaderActionButton\n // MAUI ApplyVisualState: an icon wins and the text is not shown (it stays the accessibility label).\n {...(item.icon !== undefined ? { icon: item.icon } : item.text ? { buttonText: item.text } : {})}\n isBusy={busy && item.showBusyIndicator === true}\n isActive={item.isActive === true}\n showActiveBadge={item.showActiveBadge === true}\n animatePress={item.animatePress !== false}\n {...(item.iconSize ? { iconSize: item.iconSize } : {})}\n {...(item.accessibilityLabel || item.text ? { accessibilityLabel: item.accessibilityLabel ?? item.text } : {})}\n {...g9IdProps(props.id)}\n disabled={busy && item.disableWhileBusy !== false && item.showBusyIndicator !== true}\n onPress={onPress}\n />\n );\n}\n\n/** Props of {@link G9SheetHeader}. */\nexport interface G9SheetHeaderProps {\n readonly options: G9SheetOptions;\n /** The leading button (MAUI back request with source `toolbarButton`). */\n readonly onBack: () => void;\n}\n\n/**\n * The three-slot sheet header (MAUI header template): leading back/close button (RTL-aware arrow, or × with\n * `useCloseIcon`), the title (centre or near the back button), the trailing toolbar items; slot overrides\n * `headerView` > `headerLeadingAndTitleView` > `headerTitleAndTrailingView` > per-slot views > defaults. A hairline\n * closes the band. Rendered only with `showToolbar`.\n */\nexport function G9SheetHeader(props: G9SheetHeaderProps): ReactNode {\n const o = props.options;\n const direction = useG9Direction();\n const settings = useG9Settings();\n const glyphs = settings.glyphs;\n const palette = useG9Theme().palette;\n const strings = useG9Strings();\n const back = useG9Press(props.onBack, { source: 'G9SheetHeader' });\n if (o.showToolbar !== true) return null;\n if (o.headerView !== undefined && o.headerView !== null) {\n return <view className=\"g9-sheet-header g9-sheet-header--custom\">{o.headerView}</view>;\n }\n const m = g9SheetHeaderMetrics;\n const leading =\n o.headerLeadingView ??\n (o.showCloseButton ? (\n <view\n className=\"g9-sheet-header__back\"\n {...g9IdProps(g9ChildId(o.automationId, 'Back'))}\n // MAUI: the glyph sits at the reading START of its 30 dp box (HorizontalOptions.Start), not centred.\n style={{ width: `${m.backButton}px`, height: `${m.backButton}px`, ...g9RowStyle(direction) }}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={o.useCloseIcon ? strings.get(G9StringKey.Close) : strings.get(G9StringKey.Back)}\n hit-slop={{\n top: `${m.backHitSlop}px`,\n left: `${m.backHitSlop}px`,\n right: `${m.backHitSlop}px`,\n bottom: `${m.backHitSlop}px`,\n }}\n bindtap={back}\n >\n <G9IconSlot\n icon={o.useCloseIcon ? glyphs.clear : direction === 'rtl' ? glyphs.arrowForward : glyphs.arrowBack}\n size={m.backGlyph}\n color=\"var(--g9-secondary)\"\n />\n </view>\n ) : null);\n const title =\n o.headerTitleView ??\n (o.title ? (\n <text className=\"g9-sheet-header__title\" text-maxline=\"1\" style={{ fontSize: `${m.titleSize}px` }}>\n {o.title}\n </text>\n ) : null);\n const items = o.toolbarItems ?? o.toolbarItemsFactory?.() ?? [];\n const trailing =\n o.headerTrailingView ??\n (items.length > 0 ? (\n <view className=\"g9-sheet-header__items\" style={g9RowStyle(direction)}>\n {items.map((item, i) => (\n <ToolbarItemButton\n key={item.key ?? String(i)}\n item={item}\n id={\n item.automationId\n ? g9SafeId(item.automationId)\n : g9ChildId(o.automationId, `ToolbarItem_${item.key ?? i}`)\n }\n />\n ))}\n </view>\n ) : null);\n const spanned = o.headerLeadingAndTitleView != null || o.headerTitleAndTrailingView != null;\n const center = (o.headerTitlePlacement ?? 'center') === 'center' && o.reserveEmptyHeaderSlots !== false && !spanned;\n let slots: ReactNode;\n if (o.headerLeadingAndTitleView != null) {\n slots = [\n <view key=\"lt\" className=\"g9-sheet-header__grow\" style={g9RowStyle(direction)}>\n {o.headerLeadingAndTitleView}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n } else if (o.headerTitleAndTrailingView != null) {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n <view key=\"tt\" className=\"g9-sheet-header__grow\" style={g9RowStyle(direction)}>\n {o.headerTitleAndTrailingView}\n </view>,\n ];\n } else if (center) {\n slots = [\n // The side slots follow the reading direction too: in RTL the back button sits at the right EDGE, the trailing\n // items at the left edge (MAUI) — not against the centred title.\n <view key=\"l\" className=\"g9-sheet-header__side g9-sheet-header__start\" style={g9RowStyle(direction)}>\n {leading}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__title-slot\">\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__side g9-sheet-header__end\" style={g9RowStyle(direction)}>\n {trailing}\n </view>,\n ];\n } else {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n // The grow slot follows the reading direction: in RTL a near-back title hugs the back button (right edge).\n <view key=\"t\" className=\"g9-sheet-header__grow g9-sheet-header__title-near\" style={g9RowStyle(direction)}>\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n }\n return (\n <view\n className={`g9-sheet-header g9-dir-${direction}`}\n style={{\n // The 64 dp band, then MAUI's 1 dp divider UNDER it (OutlineVariant @ 35 %), not inside it.\n minHeight: `${m.minHeight + 1}px`,\n paddingLeft: `${settings.sheets.headerEdgeSpacing}px`,\n paddingRight: `${settings.sheets.headerEdgeSpacing}px`,\n borderBottomColor: formatColor(withAlpha(palette.OutlineVariant, 0.35)),\n ...g9RowStyle(direction),\n }}\n >\n {slots}\n </view>\n );\n}\n\n/** Props of {@link G9SheetFooter}. */\nexport interface G9SheetFooterProps {\n readonly options: G9SheetOptions;\n}\n\n/** Rows of footer buttons: equal-width columns, wrapping every `perRow` (MAUI footer template). */\nexport function footerRows<T>(buttons: ReadonlyArray<T>, perRow: number): T[][] {\n const n = Math.max(1, Math.floor(perRow));\n const rows: T[][] = [];\n for (let i = 0; i < buttons.length; i += n) rows.push(buttons.slice(i, i + n));\n return rows;\n}\n\n/** The sheet footer: `footerBand`, else `footerView` in the band, else `footerButtons` in equal columns (3 per row by default), with a divider. */\nexport function G9SheetFooter(props: G9SheetFooterProps): ReactNode {\n const o = props.options;\n if (o.footerBand != null) return o.footerBand;\n if (o.footerView != null) return <view className=\"g9-sheet-footer\">{o.footerView}</view>;\n return (\n <G9SheetFooterBar\n buttons={o.footerButtons ?? []}\n {...(o.footerMaxButtonsPerRow !== undefined ? { maxButtonsPerRow: o.footerMaxButtonsPerRow } : {})}\n />\n );\n}\n\n/** Props of {@link G9SheetFooterBar}. */\nexport interface G9SheetFooterBarProps {\n readonly buttons: ReadonlyArray<ReactNode>;\n /** Default 3. */\n readonly maxButtonsPerRow?: number;\n}\n\n/**\n * The footer band (divider, padding, equal-width button columns); nothing at all without buttons (MAUI\n * `SheetFooterBar` hides with no visible button). Render it from a `footerBand` whose buttons come and go.\n */\nexport function G9SheetFooterBar(props: G9SheetFooterBarProps): ReactNode {\n const direction = useG9Direction();\n if (props.buttons.length === 0) return null;\n return (\n <view className=\"g9-sheet-footer\">\n {footerRows(props.buttons, props.maxButtonsPerRow ?? g9SheetHeaderMetrics.footerMaxButtonsPerRow).map(\n (row, r) => (\n <view key={r} className=\"g9-sheet-footer__row\" style={g9RowStyle(direction)}>\n {row.map((button, i) => (\n <view key={i} className=\"g9-sheet-footer__cell\">\n {button}\n </view>\n ))}\n </view>\n ),\n )}\n </view>\n );\n}\n"],"names":["g9SheetHeaderMetrics","Object","ToolbarItemButton","props","_item_accessibilityLabel","item","running","setRunning","useState","busy","onPress","result","G9HeaderActionButton","undefined","g9IdProps","G9SheetHeader","_o_headerLeadingView","_o_headerTitleView","_ref","_o_headerTrailingView","_o_headerTitlePlacement","o","direction","useG9Direction","settings","useG9Settings","glyphs","palette","useG9Theme","strings","useG9Strings","back","useG9Press","view","m","leading","g9ChildId","g9RowStyle","G9StringKey","G9IconSlot","title","text","items","trailing","i","_item_key","_item_key1","String","g9SafeId","spanned","center","slots","formatColor","withAlpha","footerRows","buttons","perRow","n","Math","rows","G9SheetFooter","_o_footerButtons","G9SheetFooterBar","_props_maxButtonsPerRow","row","r","button"],"mappings":";;;;;;;AAUO,MAAMA,uBAAuBC,OAAO,MAAM,CAAC;IAChD,WAAW;IACX,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,aAAa;IACb,WAAW;IACX,wBAAwB;AAC1B;AAEA,SAASC,kBAAkBC,KAA6E;QAwBhCC;IAvBtE,MAAM,EAAEC,IAAI,EAAE,GAAGF;IACjB,MAAM,CAACG,SAASC,WAAW,GAAGC,SAAS;IACvC,MAAMC,OAAOJ,AAAgB,SAAhBA,KAAK,MAAM,IAAaC;IACrC,MAAMI,UAAU;YAECL;QADf,IAAII,QAAQJ,AAA0B,UAA1BA,KAAK,gBAAgB,EAAY;QAC7C,MAAMM,SAAS,QAAAN,CAAAA,gBAAAA,KAAK,OAAO,AAAD,IAAXA,KAAAA,IAAAA,cAAAA,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heetFrame, type G9SheetFrameProps, useG9SheetContext } from './frame.js';
2
- export { footerRows, G9SheetFooter, type G9SheetFooterProps, G9SheetHeader, type G9SheetHeaderProps, g9SheetHeaderMetrics, } from './header.js';
2
+ export { footerRows, G9SheetFooter, G9SheetFooterBar, type G9SheetFooterBarProps, type G9SheetFooterProps, G9SheetHeader, type G9SheetHeaderProps, g9SheetHeaderMetrics, } from './header.js';
3
3
  export { createSheetHeightMemo, createSheetHeightSeeds, type G9SheetHeightMemo, type G9SheetHeightMemoOptions, type G9SheetHeightSeeds, type G9SheetMemoPreferences, g9SheetHeightMemoLimit, g9SheetHeightMemoPreferenceKey, sheetHeightMemoKey, } from './height-memo.js';
4
4
  export { G9LoadableSheetContent, type G9LoadableSheetContentProps } from './loadable.js';
5
+ export { easeOutCubic, easeOutCubicMT, type G9SheetMotion, type G9SheetMotionInput, type G9SheetTransition, g9CupertinoOmega, g9MaterialBaseSettleMs, g9MaterialMaxSettleMs, materialSettle, materialSettleDurationMs, materialSettleMT, resolveSheetMotion, } from './motion.js';
5
6
  export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, type G9SheetBackAction, type G9SheetBackSource, type G9SheetContentWidthMode, type G9SheetDetent, type G9SheetHeaderTitlePlacement, type G9SheetLifecycle, type G9SheetOptions, type G9SheetSettings, type G9SheetSizeMode, type G9SheetToolbarItem, resolveSheetSettings, } from './options.js';
6
7
  export { type G9ProcessingBuild, type G9ProcessingErrorHandler, G9ProcessingSheetContent, type G9ProcessingSheetContentProps, } from './processing.js';
7
8
  export { type G9SheetService, g9Sheets, sheetServiceOf, useG9Sheets } from './service.js';
8
9
  export { G9Sheet, type G9SheetProps } from './sheet.js';
9
- export { backdropCardTransform, clampFitHeight, currentPlatform, type G9SheetLayout, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetTopPadding, } from './sizing.js';
10
+ export { backdropCardTransform, clampFitHeight, currentPlatform, type G9SheetLayout, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetSurfaceBottomPadding, sheetSurfaceTopPadding, sheetTopPadding, } from './sizing.js';
10
11
  export { type G9SheetCloseReason, type G9SheetContent, type G9SheetEntry, type G9SheetHandle, type G9SheetResult, G9SheetStack, type G9SheetStackConfig, type G9SheetStatus, g9SheetCloseGraceMs, g9SheetShowThrottleMs, } from './stack.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EACL,UAAU,EACV,aAAa,EACb,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,qCAAqC,EACrC,2BAA2B,EAC3B,mCAAmC,EACnC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,KAAK,aAAa,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EACL,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,kBAAkB,EACvB,oBAAo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ACzB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
@@ -1,10 +1,11 @@
1
1
  export { G9SheetFrame, useG9SheetContext } from "./frame.jsx";
2
- export { G9SheetFooter, G9SheetHeader, footerRows, g9SheetHeaderMetrics } from "./header.jsx";
2
+ export { G9SheetFooter, G9SheetFooterBar, G9SheetHeader, footerRows, g9SheetHeaderMetrics } from "./header.jsx";
3
3
  export { createSheetHeightMemo, createSheetHeightSeeds, g9SheetHeightMemoLimit, g9SheetHeightMemoPreferenceKey, sheetHeightMemoKey } from "./height-memo.jsx";
4
4
  export { G9LoadableSheetContent } from "./loadable.jsx";
5
+ export { easeOutCubic, easeOutCubicMT, g9CupertinoOmega, g9MaterialBaseSettleMs, g9MaterialMaxSettleMs, materialSettle, materialSettleDurationMs, materialSettleMT, resolveSheetMotion } from "./motion.jsx";
5
6
  export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, resolveSheetSettings } from "./options.jsx";
6
7
  export { G9ProcessingSheetContent } from "./processing.jsx";
7
8
  export { g9Sheets, sheetServiceOf, useG9Sheets } from "./service.jsx";
8
9
  export { G9Sheet } from "./sheet.jsx";
9
- export { backdropCardTransform, clampFitHeight, currentPlatform, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetTopPadding } from "./sizing.jsx";
10
+ export { backdropCardTransform, clampFitHeight, currentPlatform, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetSurfaceBottomPadding, sheetSurfaceTopPadding, sheetTopPadding } from "./sizing.jsx";
10
11
  export { G9SheetStack, g9SheetCloseGraceMs, g9SheetShowThrottleMs } from "./stack.jsx";
@@ -0,0 +1,59 @@
1
+ import type { currentPlatform } from './sizing.js';
2
+ /** ViewDragHelper `BASE_SETTLE_DURATION` (ms). */
3
+ export declare const g9MaterialBaseSettleMs = 256;
4
+ /** ViewDragHelper `MAX_SETTLE_DURATION` (ms). */
5
+ export declare const g9MaterialMaxSettleMs = 600;
6
+ /** UIKit's default transition spring, critically damped as Core Animation runs it: ω₀ = √(1000 / 3) rad/s. */
7
+ export declare const g9CupertinoOmega: number;
8
+ /** Material settle duration (ms) for a programmatic move over `distanceRatio` of the host height. */
9
+ export declare function materialSettleDurationMs(distanceRatio: number): number;
10
+ /** ViewDragHelper's `sInterpolator`: `(t − 1)^5 + 1`. */
11
+ export declare function materialSettle(t: number): number;
12
+ /** Main-thread twin of {@link materialSettle} (the curve lynx-ui calls every frame). */
13
+ export declare function materialSettleMT(t: number): number;
14
+ /** The timed style's curve (MAUI `Easing.CubicOut`). */
15
+ export declare function easeOutCubic(t: number): number;
16
+ /** Main-thread twin of {@link easeOutCubic}. */
17
+ export declare function easeOutCubicMT(t: number): number;
18
+ /** A lynx-ui sheet transition. */
19
+ export type G9SheetTransition = {
20
+ readonly type: 'tween' /** milliseconds (lynx-ui's unit) */;
21
+ readonly duration: number;
22
+ readonly ease: (t: number) => number;
23
+ } | {
24
+ readonly type: 'spring';
25
+ readonly stiffness: number;
26
+ readonly damping: number;
27
+ readonly mass: number;
28
+ };
29
+ /** The lynx-ui motion of one sheet: `SheetContent`'s `enterAnimation`, `exitAnimation`, `snapAnimation`. */
30
+ export interface G9SheetMotion {
31
+ readonly enterAnimation: G9SheetTransition;
32
+ readonly exitAnimation: G9SheetTransition;
33
+ readonly snapAnimation: G9SheetTransition;
34
+ }
35
+ /** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */
36
+ export interface G9SheetMotionInput {
37
+ readonly style: 'platformNative' | 'timed';
38
+ readonly platform: ReturnType<typeof currentPlatform>;
39
+ /** Share of the host the sheet covers where it opens and from where it closes. */
40
+ readonly openRatio: number;
41
+ /** Share of the host between the smallest and the largest detent (snap travel). */
42
+ readonly snapRatio: number;
43
+ /** Settings or per-sheet open duration (ms); used by `timed`, and by `platformNative` when `perSheetOpen`. */
44
+ readonly openMs: number;
45
+ readonly closeMs: number;
46
+ /** A per-sheet `openAnimationDurationMs` / `closeAnimationDurationMs` was set: it sets the time, the curve stays. */
47
+ readonly perSheetOpen: boolean;
48
+ readonly perSheetClose: boolean;
49
+ /** `timed` only: partial travel takes the matching slice of the duration (`sizeScaledAnimationDuration`). */
50
+ readonly sizeScaled: boolean;
51
+ }
52
+ /**
53
+ * The lynx-ui motion for a sheet (MAUI `ResolveSheetMotion`). `platformNative`: Material settle tweens on Android,
54
+ * Windows and unknown hosts (durations from the travel), the critically damped UIKit spring on iOS and macOS; a
55
+ * per-sheet duration replaces the time for its direction and keeps the platform curve (a quintic tween). `timed`: the
56
+ * configured durations on a cubic ease-out, size-scaled when enabled; snapping keeps the full open duration.
57
+ */
58
+ export declare function resolveSheetMotion(input: G9SheetMotionInput): G9SheetMotion;
59
+ //# sourceMappingURL=motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/sheet/motion.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,kDAAkD;AAClD,eAAO,MAAM,s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C,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACtD,kFAAkF;IAClF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8GAA8G;IAC9G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,6GAA6G;IAC7G,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAgC3E"}
@@ -0,0 +1,59 @@
1
+ const g9MaterialBaseSettleMs = 256;
2
+ const g9MaterialMaxSettleMs = 600;
3
+ const g9CupertinoOmega = Math.sqrt(1000 / 3);
4
+ function materialSettleDurationMs(distanceRatio) {
5
+ const ratio = Number.isFinite(distanceRatio) ? Math.min(1, Math.max(0, distanceRatio)) : 1;
6
+ return Math.min(g9MaterialMaxSettleMs, Math.round((ratio + 1) * g9MaterialBaseSettleMs));
7
+ }
8
+ function materialSettle(t) {
9
+ const u = t - 1;
10
+ return u * u * u * u * u + 1;
11
+ }
12
+ function materialSettleMT(t) {
13
+ 'main thread';
14
+ const u = t - 1;
15
+ return u * u * u * u * u + 1;
16
+ }
17
+ function easeOutCubic(t) {
18
+ const u = 1 - t;
19
+ return 1 - u * u * u;
20
+ }
21
+ function easeOutCubicMT(t) {
22
+ 'main thread';
23
+ const u = 1 - t;
24
+ return 1 - u * u * u;
25
+ }
26
+ const tween = (ms, ease)=>({
27
+ type: 'tween',
28
+ duration: Math.max(0, ms),
29
+ ease
30
+ });
31
+ const scaled = (ms, ratio, sizeScaled)=>ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;
32
+ function resolveSheetMotion(input) {
33
+ if ('timed' === input.style) return {
34
+ enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
35
+ exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
36
+ snapAnimation: tween(input.openMs, easeOutCubicMT)
37
+ };
38
+ if ('ios' === input.platform || 'macos' === input.platform) {
39
+ const spring = {
40
+ type: 'spring',
41
+ stiffness: g9CupertinoOmega * g9CupertinoOmega,
42
+ damping: 2 * g9CupertinoOmega,
43
+ mass: 1
44
+ };
45
+ return {
46
+ enterAnimation: input.perSheetOpen ? tween(input.openMs, materialSettleMT) : spring,
47
+ exitAnimation: input.perSheetClose ? tween(input.closeMs, materialSettleMT) : spring,
48
+ snapAnimation: spring
49
+ };
50
+ }
51
+ return {
52
+ enterAnimation: tween(input.perSheetOpen ? input.openMs : materialSettleDurationMs(input.openRatio), materialSettleMT),
53
+ exitAnimation: tween(input.perSheetClose ? input.closeMs : materialSettleDurationMs(input.openRatio), materialSettleMT),
54
+ snapAnimation: tween(materialSettleDurationMs(input.snapRatio), materialSettleMT)
55
+ };
56
+ }
57
+ export { easeOutCubic, easeOutCubicMT, g9CupertinoOmega, g9MaterialBaseSettleMs, g9MaterialMaxSettleMs, materialSettle, materialSettleDurationMs, materialSettleMT, resolveSheetMotion };
58
+
59
+ //# sourceMappingURL=motion.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet/motion.jsx","sources":["../../src/sheet/motion.ts"],"sourcesContent":["// How a G9 sheet moves on lynx-ui: the open, close and snap configs handed to lynx-ui `SheetContent`.\n//\n// MAUI `G9SheetMotionModel` (G9MAUIControls 1.4.0, BottomSheet/G9SheetView/G9SheetMotionModel.cs) is the reference:\n// • platformNative on Android (and Windows): Material's settle, androidx ViewDragHelper — a quintic ease-out\n// `(t − 1)^5 + 1` lasting `(distance / range + 1) × 256 ms`, at most 600 ms (256 ms for a nudge, 512 ms for the\n// whole screen; 90 % of the way is covered in the first 37 % of the time);\n// • platformNative on iOS / macOS: UIKit's default transition spring as Core Animation runs it, critically damped,\n// ω₀ = √(1000 / 3) — mass 1, stiffness ω₀², damping 2ω₀ for lynx-ui's spring;\n// • timed: the configured duration (size-scaled when enabled) on a cubic ease-out.\n// Before this module the port gave platformNative lynx-ui's default spring (stiffness 200, damping 60, mass 1): an\n// over-damped spring (ζ ≈ 2.1) that takes ~1.3 s to come to rest, a sluggish tail no AgriPad user had seen.\n//\n// lynx-ui runs the curve inside a main-thread worklet, so the curve must be a `'main thread'` function: a plain\n// background function cannot be called there (plan/specs/02 §3). Each\n// curve is a twin: `x` (background, tests, durations) and `xMT` (the worklet), asserted equal.\n\nimport type { currentPlatform } from './sizing';\n\n/** ViewDragHelper `BASE_SETTLE_DURATION` (ms). */\nexport const g9MaterialBaseSettleMs = 256;\n/** ViewDragHelper `MAX_SETTLE_DURATION` (ms). */\nexport const g9MaterialMaxSettleMs = 600;\n/** UIKit's default transition spring, critically damped as Core Animation runs it: ω₀ = √(1000 / 3) rad/s. */\nexport const g9CupertinoOmega = Math.sqrt(1000 / 3);\n\n/** Material settle duration (ms) for a programmatic move over `distanceRatio` of the host height. */\nexport function materialSettleDurationMs(distanceRatio: number): number {\n const ratio = Number.isFinite(distanceRatio) ? Math.min(1, Math.max(0, distanceRatio)) : 1;\n return Math.min(g9MaterialMaxSettleMs, Math.round((ratio + 1) * g9MaterialBaseSettleMs));\n}\n\n/** ViewDragHelper's `sInterpolator`: `(t − 1)^5 + 1`. */\nexport function materialSettle(t: number): number {\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** Main-thread twin of {@link materialSettle} (the curve lynx-ui calls every frame). */\nexport function materialSettleMT(t: number): number {\n 'main thread';\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** The timed style's curve (MAUI `Easing.CubicOut`). */\nexport function easeOutCubic(t: number): number {\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** Main-thread twin of {@link easeOutCubic}. */\nexport function easeOutCubicMT(t: number): number {\n 'main thread';\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** A lynx-ui sheet transition. */\nexport type G9SheetTransition =\n | {\n readonly type: 'tween' /** milliseconds (lynx-ui's unit) */;\n readonly duration: number;\n readonly ease: (t: number) => number;\n }\n | { readonly type: 'spring'; readonly stiffness: number; readonly damping: number; readonly mass: number };\n\n/** The lynx-ui motion of one sheet: `SheetContent`'s `enterAnimation`, `exitAnimation`, `snapAnimation`. */\nexport interface G9SheetMotion {\n readonly enterAnimation: G9SheetTransition;\n readonly exitAnimation: G9SheetTransition;\n readonly snapAnimation: G9SheetTransition;\n}\n\n/** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */\nexport interface G9SheetMotionInput {\n readonly style: 'platformNative' | 'timed';\n readonly platform: ReturnType<typeof currentPlatform>;\n /** Share of the host the sheet covers where it opens and from where it closes. */\n readonly openRatio: number;\n /** Share of the host between the smallest and the largest detent (snap travel). */\n readonly snapRatio: number;\n /** Settings or per-sheet open duration (ms); used by `timed`, and by `platformNative` when `perSheetOpen`. */\n readonly openMs: number;\n readonly closeMs: number;\n /** A per-sheet `openAnimationDurationMs` / `closeAnimationDurationMs` was set: it sets the time, the curve stays. */\n readonly perSheetOpen: boolean;\n readonly perSheetClose: boolean;\n /** `timed` only: partial travel takes the matching slice of the duration (`sizeScaledAnimationDuration`). */\n readonly sizeScaled: boolean;\n}\n\n// lynx-ui-sheet takes a tween's duration in MILLISECONDS (useSnap: `animate(…, { duration: (duration ?? 400) / 1000 })`).\n// This used to convert to seconds first, so a 199 ms open ran for 0.2 ms: every sheet jumped into place, no motion.\nconst tween = (ms: number, ease: (t: number) => number): G9SheetTransition => ({\n type: 'tween',\n duration: Math.max(0, ms),\n ease,\n});\n\nconst scaled = (ms: number, ratio: number, sizeScaled: boolean) =>\n ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;\n\n/**\n * The lynx-ui motion for a sheet (MAUI `ResolveSheetMotion`). `platformNative`: Material settle tweens on Android,\n * Windows and unknown hosts (durations from the travel), the critically damped UIKit spring on iOS and macOS; a\n * per-sheet duration replaces the time for its direction and keeps the platform curve (a quintic tween). `timed`: the\n * configured durations on a cubic ease-out, size-scaled when enabled; snapping keeps the full open duration.\n */\nexport function resolveSheetMotion(input: G9SheetMotionInput): G9SheetMotion {\n if (input.style === 'timed') {\n return {\n enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n snapAnimation: tween(input.openMs, easeOutCubicMT),\n };\n }\n if (input.platform === 'ios' || input.platform === 'macos') {\n const spring: G9SheetTransition = {\n type: 'spring',\n stiffness: g9CupertinoOmega * g9CupertinoOmega,\n damping: 2 * g9CupertinoOmega,\n mass: 1,\n };\n return {\n enterAnimation: input.perSheetOpen ? tween(input.openMs, materialSettleMT) : spring,\n exitAnimation: input.perSheetClose ? tween(input.closeMs, materialSettleMT) : spring,\n snapAnimation: spring,\n };\n }\n return {\n enterAnimation: tween(\n input.perSheetOpen ? input.openMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n exitAnimation: tween(\n input.perSheetClose ? input.closeMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n snapAnimation: tween(materialSettleDurationMs(input.snapRatio), materialSettleMT),\n };\n}\n"],"names":["g9MaterialBaseSettleMs","g9MaterialMaxSettleMs","g9CupertinoOmega","Math","materialSettleDurationMs","distanceRatio","ratio","Number","materialSettle","t","u","materialSettleMT","easeOutCubic","easeOutCubicMT","tween","ms","ease","scaled","sizeScaled","resolveSheetMotion","input","spring"],"mappings":"AAmBO,MAAMA,yBAAyB;AAE/B,MAAMC,wBAAwB;AAE9B,MAAMC,mBAAmBC,KAAK,IAAI,CA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ACrC;IAEF,IAAIO,AAAmB,UAAnBA,MAAM,QAAQ,IAAcA,AAAmB,YAAnBA,MAAM,QAAQ,EAAc;QAC1D,MAAMC,SAA4B;YAChC,MAAM;YACN,WAAWnB,mBAAmBA;YAC9B,SAAS,IAAIA;YACb,MAAM;QACR;QACA,OAAO;YACL,gBAAgBkB,MAAM,YAAY,GAAGN,MAAMM,MAAM,MAAM,EAAET,oBAAoBU;YAC7E,eAAeD,MAAM,aAAa,GAAGN,MAAMM,MAAM,OAAO,EAAET,oBAAoBU;YAC9E,eAAeA;QACjB;IACF;IACA,OAAO;QACL,gBAAgBP,MACdM,MAAM,YAAY,GAAGA,MAAM,MAAM,GAAGhB,yBAAyBgB,MAAM,SAAS,GAC5ET;QAEF,eAAeG,MACbM,MAAM,aAAa,GAAGA,MAAM,OAAO,GAAGhB,yBAAyBgB,MAAM,SAAS,GAC9ET;QAEF,eAAeG,MAAMV,yBAAyBgB,MAAM,SAAS,GAAGT;IAClE;AACF"}
@@ -34,6 +34,8 @@ export interface G9SheetToolbarItem {
34
34
  /** 0 → 24. */
35
35
  readonly iconSize?: number;
36
36
  readonly accessibilityLabel?: string;
37
+ /** Element id of the item (default `${sheet automationId}_ToolbarItem_${key or index}` when the sheet has one). */
38
+ readonly automationId?: string;
37
39
  /** Stable key (default the index). */
38
40
  readonly key?: string;
39
41
  }
@@ -80,6 +82,13 @@ export interface G9SheetOptions extends G9SheetLifecycle {
80
82
  readonly expandedFitsContent?: boolean;
81
83
  /** A drag on a scroller expands the sheet first. Default true. */
82
84
  readonly scrollingExpandsSheet?: boolean;
85
+ /**
86
+ * The body is a vertical scroller (default true). `false` for content that scrolls itself — a `<list>` page, a map:
87
+ * the body becomes a flex column and the content fills it, so the content's own scroller gets a definite height (MAUI
88
+ * puts the content in the body as is; a CollectionView body scrolls itself). Lynx-only, additive. Use it with a
89
+ * detent-sized sheet (full screen / states); a fit-to-content sheet has no height to give.
90
+ */
91
+ readonly scrollBody?: boolean;
83
92
  /** Height memory key (needed for factory content). */
84
93
  readonly heightMemoKey?: string | null;
85
94
  /** Body padding. Default 0. */
@@ -96,8 +105,16 @@ export interface G9SheetOptions extends G9SheetLifecycle {
96
105
  readonly contentWidthMode?: G9SheetContentWidthMode;
97
106
  /** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */
98
107
  readonly contentWidth?: number | null;
99
- /** Full-screen sheets reserve the top inset. Default true. */
108
+ /**
109
+ * Full-screen sheets, and detent sheets resting at a `large` detent that reaches under the top inset, reserve the
110
+ * top inset (MAUI state-aware top padding). Default true.
111
+ */
100
112
  readonly useTopSafeAreaPadding?: boolean;
113
+ /**
114
+ * The surface reserves the host's bottom safe inset (a visible navigation bar or gesture handle) below the content
115
+ * and footer. 0 on an immersive host. Default true.
116
+ */
117
+ readonly useBottomSafeAreaPadding?: boolean;
101
118
  /** Default 0. */
102
119
  readonly additionalTopSafeAreaPadding?: number;
103
120
  /** Replaces the top padding (0 = flush). */
@@ -135,6 +152,11 @@ export interface G9SheetOptions extends G9SheetLifecycle {
135
152
  readonly showCloseButton?: boolean;
136
153
  /** × instead of the back arrow. Default false. */
137
154
  readonly useCloseIcon?: boolean;
155
+ /**
156
+ * Automation id of the sheet (MAUI `AutomationId`): the surface gets it, the header's back/close button
157
+ * `${id}_Back`, toolbar items `${id}_ToolbarItem_${key or index}` (see `g9ChildId`). Keep it to `[A-Za-z0-9_-]`.
158
+ */
159
+ readonly automationId?: string;
138
160
  readonly title?: string | null;
139
161
  readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;
140
162
  /** Items built from the content once it exists. */
@@ -149,7 +171,12 @@ export interface G9SheetOptions extends G9SheetLifecycle {
149
171
  readonly headerTrailingView?: ReactNode;
150
172
  readonly headerLeadingAndTitleView?: ReactNode;
151
173
  readonly headerTitleAndTrailingView?: ReactNode;
152
- /** Custom footer; wins over `footerButtons`. */
174
+ /**
175
+ * A footer that draws its own band (usually a component rendering {@link G9SheetFooterBar}, or nothing) — for
176
+ * buttons that come and go while the sheet is open. Wins over `footerView` and `footerButtons`.
177
+ */
178
+ readonly footerBand?: ReactNode;
179
+ /** Custom footer inside the standard band; wins over `footerButtons`. */
153
180
  readonly footerView?: ReactNode;
154
181
  /** Equal-width footer buttons. */
155
182
  readonly footerButtons?: ReadonlyArray<ReactNode> | null;
@@ -204,6 +231,11 @@ export interface G9SheetSettings {
204
231
  readonly motionStyle?: 'platformNative' | 'timed';
205
232
  /** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */
206
233
  readonly heightMemoVersion?: string;
234
+ /**
235
+ * Side padding of the header band (MAUI `G9LayoutMetrics.EdgeSpacing`, which an app may scale — AgriPad's 10 × 1.3
236
+ * = 13). Default 16.
237
+ */
238
+ readonly headerEdgeSpacing?: number;
207
239
  }
208
240
  /** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */
209
241
  export declare function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings>;
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/sheet/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD,iGAAiG;AACjG,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACxD,sEAAsE;AACtE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,cAAc,CAAC;AACxD,sEAAsE;AACtE,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,UAAU,CAAC;AAChE,8FAA8F;AAC9F,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAAC;AAC3F,uEAAuE;AACvE,MAAM,MAAM,iBAAiB,GAAG,O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,QAAQ,CAAC,eAAe,CAAC,CAqBrG;AAED,gGAAgG;AAChG,wBAAgB,mBAAmB,IAAI,cAAc,CAQpD;AAED,+FAA+F;AAC/F,wBAAgB,wBAAwB,IAAI,cAAc,CAEzD;AAED,+CAA+C;AAC/C,wBAAgB,mCAAmC,IAAI,cAAc,CASpE;AAED,+FAA+F;AAC/F,wBAAgB,2BAA2B,CACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,EACrB,eAAe,UAAO,EACtB,kBAAkB,UAAO,EACzB,YAAY,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,IAAI,GACtD,cAAc,CAgBhB;AAED,yFAAyF;AACzF,wBAAgB,qCAAqC,CAAC,kBAAkB,UAAO,GAAG,cAAc,CAQ/F"}
@@ -22,7 +22,8 @@ function resolveSheetSettings(settings) {
22
22
  preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),
23
23
  deferPrebuiltContent: null != (_s_deferPrebuiltContent = s.deferPrebuiltContent) ? _s_deferPrebuiltContent : false,
24
24
  motionStyle: null != (_s_motionStyle = s.motionStyle) ? _s_motionStyle : 'platformNative',
25
- heightMemoVersion: null != (_s_heightMemoVersion = s.heightMemoVersion) ? _s_heightMemoVersion : '0'
25
+ heightMemoVersion: null != (_s_heightMemoVersion = s.heightMemoVersion) ? _s_heightMemoVersion : '0',
26
+ headerEdgeSpacing: Math.max(0, finite(s.headerEdgeSpacing, 16))
26
27
  });
27
28
  }
28
29
  function defaultSheetOptions() {
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/options.jsx","sources":["../../src/sheet/options.ts"],"sourcesContent":["import type { ReactNode } from '@lynx-js/react';\nimport type { G9BottomSheetLoadingSkeleton } from '../display/shimmer';\nimport type { G9IconInput } from '../icon/icon';\n\n// MAUI `G9BottomSheetOptions` / `G9BottomSheetSettings` and their enums (BottomSheet/G9BottomSheetOptions.cs).\n\n/** Detents (MAUI `G9BottomSheetState`): peek (collapsed height), medium (half), large (full). */\nexport type G9SheetDetent = 'peek' | 'medium' | 'large';\n/** Detent sizing or fit-to-content (MAUI `G9BottomSheetSizeMode`). */\nexport type G9SheetSizeMode = 'states' | 'fitToContent';\n/** Header title anchor (MAUI `G9BottomSheetHeaderTitlePlacement`). */\nexport type G9SheetHeaderTitlePlacement = 'center' | 'nearBack';\n/** Where a back request came from (MAUI `G9BottomSheetBackRequestSource` + drag-to-close). */\nexport type G9SheetBackSource = 'toolbarButton' | 'hardwareButton' | 'overlayTap' | 'drag';\n/** What `onBackRequested` decides (MAUI `G9BottomSheetBackAction`). */\nexport type G9SheetBackAction = 'close' | 'doNothing';\n/** Content width (MAUI `G9SheetViewContentWidthMode`). */\nexport type G9SheetContentWidthMode = 'full' | 'custom';\n\n/** A header toolbar action (MAUI `G9BottomSheetToolbarItem`). */\nexport interface G9SheetToolbarItem {\n /** Glyph/icon. */\n readonly icon?: G9IconInput;\n /** Text (when there is no icon). */\n readonly text?: string;\n /** The action (MAUI `AsyncAction`/`Command`); a returned promise keeps the item busy while `disableWhileBusy`. */\n readonly onPress?: () => unknown;\n readonly isBusy?: boolean;\n /** Spinner while busy. Default false. */\n readonly showBusyIndicator?: boolean;\n readonly isActive?: boolean;\n /** Dot while active. Default false. */\n readonly showActiveBadge?: boolean;\n /** Ignore presses while busy. Default true. */\n readonly disableWhileBusy?: boolean;\n /** Default true. */\n readonly animatePress?: boolean;\n /** 0 → 24. */\n readonly iconSize?: number;\n readonly accessibilityLabel?: string;\n /** Stable key (default the index). */\n readonly key?: string;\n}\n\n/** Lifecycle callbacks of one sheet (MAUI `Opening/Opened/Closing/ClosedCommand`). */\nexport interface G9SheetLifecycle {\n /** When the sheet starts opening. */\n readonly onOpening?: () => void;\n /** After the open motion (or its timer fallback). */\n readonly onOpened?: () => void;\n /** Once, when closing starts (not on an in-place replace). */\n readonly onClosing?: () => void;\n /** Once, at cleanup. */\n readonly onClosed?: () => void;\n /** The sheet came to rest at another detent (MAUI `G9SheetView.StateChanged`), with its height in px. */\n readonly onStateChanged?: (detent: G9SheetDetent | 'fit', heightPx: number) => void;\n}\n\n/** Everything a sheet can be opened with (MAUI `G9BottomSheetOptions`; 77 properties + presets). */\nexport interface G9SheetOptions extends G9SheetLifecycle {\n // State and sizing\n /** Initial detent. Default `'medium'`. */\n readonly currentState?: G9SheetDetent;\n /** Allowed detents. Default `['medium', 'large']`. */\n readonly states?: ReadonlyArray<G9SheetDetent>;\n /** Default `'states'`. */\n readonly sizeMode?: G9SheetSizeMode;\n /** Dim scrim that blocks the page. Default true. */\n readonly isModal?: boolean;\n /** Overlay tap / drag may close. Default true. */\n readonly isCancelable?: boolean;\n /** Default true. */\n readonly isDraggable?: boolean;\n /** Grabber. Default true. */\n readonly hasHandle?: boolean;\n /** Peek height (dp). Default 100 (with `collapsedHeight`). */\n readonly peekHeight?: number | null;\n /** Alias of `peekHeight` (MAUI `CollapsedHeight`); wins when both are set. */\n readonly collapsedHeight?: number | null;\n /** Medium = host × ratio (0.1–0.9). Default 0.5. */\n readonly halfExpandedRatio?: number | null;\n /** Large = host × ratio (0.1–1). Default 1. */\n readonly fullExpandedRatio?: number | null;\n /** Cap of a fit sheet (0.2–1). Default 0.75. */\n readonly maxFitToContentHeightRatio?: number;\n /** The largest detent is sized to the content (states mode). Default false. */\n readonly expandedFitsContent?: boolean;\n /** A drag on a scroller expands the sheet first. Default true. */\n readonly scrollingExpandsSheet?: boolean;\n /** Height memory key (needed for factory content). */\n readonly heightMemoKey?: string | null;\n // Visual\n /** Body padding. Default 0. */\n readonly padding?: number;\n /** 10 px gap under the header hairline. Default true. */\n readonly useStandardBodyTopGap?: boolean;\n /** Top corners. Default 12. */\n readonly cornerRadius?: number;\n /** Body background. Default `var(--g9-surface-container)`. */\n readonly backgroundColor?: string | null;\n /** Scrim colour; its alpha replaces the maximum opacity. */\n readonly windowBackgroundColor?: string | null;\n /** Default `'full'`. */\n readonly contentWidthMode?: G9SheetContentWidthMode;\n /** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */\n readonly contentWidth?: number | null;\n /** Full-screen sheets reserve the top inset. Default true. */\n readonly useTopSafeAreaPadding?: boolean;\n /** Default 0. */\n readonly additionalTopSafeAreaPadding?: number;\n /** Replaces the top padding (0 = flush). */\n readonly topSafeAreaPaddingOverride?: number | null;\n /** Grabber on full-screen toolbar sheets. Default true. */\n readonly showFullScreenDragHandle?: boolean;\n /** Page recede behind a tall primary sheet. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Visible ratio where the recede starts. Default 0.75. */\n readonly backdropCardEffectThreshold?: number;\n // Animation and loading\n /** Per-sheet open duration (ms); default the settings value. */\n readonly openAnimationDurationMs?: number | null;\n readonly closeAnimationDurationMs?: number | null;\n /** Factory content builds after the open motion (spinner/skeleton first). Default true. */\n readonly deferContent?: boolean;\n /** Delay before deferred content swaps in. Default 369. */\n readonly loadDelayMs?: number;\n /** The placeholder uses the full height. Default false. */\n readonly useFullScreenLoadingPlaceholder?: boolean;\n /** Known final body height for the placeholder. */\n readonly deferredLoadingPlaceholderHeight?: number | null;\n /** Covered crossfade reveal of deferred content. Default true. */\n readonly fadeDeferredContentIn?: boolean;\n /** Placeholder shape. Default `'none'` (spinner). */\n readonly loadingSkeleton?: G9BottomSheetLoadingSkeleton;\n /** 0 → the shape's default. */\n readonly loadingSkeletonRowCount?: number;\n // Stack and replace\n /** The parent sinks and fades when this sheet stacks on it. Default true. */\n readonly recedeParentOnStack?: boolean;\n /** Hand-off: replaces the one open sheet once this one is ready. Default false. */\n readonly replaceCurrentSheet?: boolean;\n // Header and footer\n /** Three-slot header. Default false. */\n readonly showToolbar?: boolean;\n /** Leading back (or close) button. Default false. */\n readonly showCloseButton?: boolean;\n /** × instead of the back arrow. Default false. */\n readonly useCloseIcon?: boolean;\n readonly title?: string | null;\n readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;\n /** Items built from the content once it exists. */\n readonly toolbarItemsFactory?: (() => ReadonlyArray<G9SheetToolbarItem>) | null;\n /** Default `'center'`. */\n readonly headerTitlePlacement?: G9SheetHeaderTitlePlacement;\n /** Star/Auto/Star columns. Default true. */\n readonly reserveEmptyHeaderSlots?: boolean;\n readonly headerView?: ReactNode;\n readonly headerLeadingView?: ReactNode;\n readonly headerTitleView?: ReactNode;\n readonly headerTrailingView?: ReactNode;\n readonly headerLeadingAndTitleView?: ReactNode;\n readonly headerTitleAndTrailingView?: ReactNode;\n /** Custom footer; wins over `footerButtons`. */\n readonly footerView?: ReactNode;\n /** Equal-width footer buttons. */\n readonly footerButtons?: ReadonlyArray<ReactNode> | null;\n /** Default 3. */\n readonly footerMaxButtonsPerRow?: number;\n /** Hardware back closes. Default true. */\n readonly hardwareBackCloses?: boolean;\n /** Intercepts every back request (disables drag). */\n readonly onBackRequested?: ((source: G9SheetBackSource) => G9SheetBackAction | Promise<G9SheetBackAction>) | null;\n // Platform specific (accepted; applied where Lynx has an equivalent)\n /** Max sheet width on Android (px). */\n readonly androidMaxWidth?: number | null;\n /** Max sheet height on Android (px). */\n readonly androidMaxHeight?: number | null;\n /** Margin around the sheet on Android `[l, t, r, b]`. */\n readonly androidMargin?: readonly [number, number, number, number] | null;\n /** Android half-expanded ratio override. */\n readonly androidHalfExpandedRatio?: number | null;\n /** Square the expanded corners on Android. */\n readonly androidShouldRemoveExpandedCorners?: boolean | null;\n readonly windowsMaxWidth?: number | null;\n readonly windowsMaxHeight?: number | null;\n readonly windowsMinWidth?: number | null;\n readonly windowsMinHeight?: number | null;\n /** Animate the scrim colour on iOS. Default true. */\n readonly animateOverlayToColorOnIos?: boolean;\n}\n\n/** App-wide sheet settings (MAUI `G9BottomSheetSettings`), `<G9Provider settings={{ sheets }}>`. */\nexport interface G9SheetSettings {\n /** Default black. */\n readonly modalOverlayColor?: string;\n /** Dim at the smallest detent (0–1). Default 0.3. */\n readonly modalOverlayMinimumOpacity?: number;\n /** Dim at full screen (0–1). Default 0.9. */\n readonly modalOverlayMaximumOpacity?: number;\n /** Default 300. */\n readonly openAnimationDurationMs?: number;\n /** Default 300. */\n readonly closeAnimationDurationMs?: number;\n /** Partial traversals take a proportional slice. Default true. */\n readonly sizeScaledAnimationDuration?: boolean;\n /** Global switch of the page recede. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Colour behind the receded page. Default black. */\n readonly backdropCardColor?: string;\n /** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */\n readonly stageBeforeShow?: boolean;\n /** Longest a hand-off waits for the successor to open before the old sheet closes anyway (0–5000). Default 250. */\n readonly preOpenMaxHoldMs?: number;\n /** Prebuilt (non-factory) content also waits behind the loading placeholder until after the open motion. Default false. */\n readonly deferPrebuiltContent?: boolean;\n /** `'platformNative'` (lynx-ui's motion) or `'timed'` (tween over the durations). Default platformNative. */\n readonly motionStyle?: 'platformNative' | 'timed';\n /** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */\n readonly heightMemoVersion?: string;\n}\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst finite = (v: number | undefined, fallback: number) =>\n typeof v === 'number' && Number.isFinite(v) ? v : fallback;\n\n/** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */\nexport function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings> {\n const s = settings ?? {};\n let min = clamp(finite(s.modalOverlayMinimumOpacity, 0.3), 0, 1);\n let max = clamp(finite(s.modalOverlayMaximumOpacity, 0.9), 0, 1);\n if (min > max) [min, max] = [max, min];\n return Object.freeze({\n modalOverlayColor: s.modalOverlayColor ?? '#000000',\n modalOverlayMinimumOpacity: min,\n modalOverlayMaximumOpacity: max,\n openAnimationDurationMs: Math.max(0, finite(s.openAnimationDurationMs, 300)),\n closeAnimationDurationMs: Math.max(0, finite(s.closeAnimationDurationMs, 300)),\n sizeScaledAnimationDuration: s.sizeScaledAnimationDuration ?? true,\n enableBackdropCardEffect: s.enableBackdropCardEffect ?? true,\n backdropCardColor: s.backdropCardColor ?? '#000000',\n stageBeforeShow: s.stageBeforeShow ?? true,\n preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),\n deferPrebuiltContent: s.deferPrebuiltContent ?? false,\n motionStyle: s.motionStyle ?? 'platformNative',\n heightMemoVersion: s.heightMemoVersion ?? '0',\n });\n}\n\n/** MAUI `DefaultOptions()`: medium, `[medium, large]`, modal, cancelable, handle, draggable. */\nexport function defaultSheetOptions(): G9SheetOptions {\n return {\n currentState: 'medium',\n states: ['medium', 'large'],\n sizeMode: 'states',\n halfExpandedRatio: 0.5,\n fullExpandedRatio: 1,\n };\n}\n\n/** MAUI `FitToContentOptions()`: sized to a non-scrolling body, capped at 75 % of the host. */\nexport function fitToContentSheetOptions(): G9SheetOptions {\n return { sizeMode: 'fitToContent', isCancelable: true, hasHandle: true, isDraggable: true, deferContent: true };\n}\n\n/** MAUI `FullScreenWithoutHandleOptions()`. */\nexport function fullScreenWithoutHandleSheetOptions(): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n deferContent: true,\n };\n}\n\n/** MAUI `FullScreenModalOptions(title, showCloseButton, hardwareBackCloses, toolbarItems)`. */\nexport function fullScreenModalSheetOptions(\n title?: string | null,\n showCloseButton = true,\n hardwareBackCloses = true,\n toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null,\n): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n sizeMode: 'states',\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n cornerRadius: 0,\n backgroundColor: 'var(--g9-background)',\n showToolbar: true,\n showCloseButton,\n title: title ?? null,\n toolbarItems: toolbarItems ?? null,\n hardwareBackCloses,\n };\n}\n\n/** MAUI `FullScreenEdgeToEdgeModalOptions(hardwareBackCloses)`: no header, flush top. */\nexport function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses = true): G9SheetOptions {\n return {\n ...fullScreenModalSheetOptions(null, false, hardwareBackCloses),\n showToolbar: false,\n useTopSafeAreaPadding: false,\n topSafeAreaPaddingOverride: 0,\n additionalTopSafeAreaPadding: 0,\n };\n}\n"],"names":["clamp","v","lo","hi","Math","finite","fallback","Number","resolveSheetSettings","settings","_s_modalOverlayColor","_s_sizeScaledAnimationDuration","_s_enableBackdropCardEffect","_s_backdropCardColor","_s_stageBeforeShow","_s_deferPrebuiltContent","_s_motionStyle","_s_heightMemoVersion","s","min","max","Object","defaultSheetOptions","fitToContentSheetOptions","fullScreenWithoutHandleSheetOptions","fullScreenModalSheetOptions","title","showCloseButton","hardwareBackCloses","toolbarItems","fullScreenEdgeToEdgeModalSheetOptions"],"mappings":"AA6NA,MAAMA,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAC/E,MAAMI,SAAS,CAACJ,GAAuBK,WACrC,AAAa,YAAb,OAAOL,KAAkBM,OAAO,QAAQ,CAACN,KAAKA,IAAIK;AAG7C,SAASE,qBAAqBC,QAAqC;QAMnDC,sBAKUC,gCACHC,6BACPC,sBACFC,oBAEKC,yBACTC,gBACMC;IAjBrB,MAAMC,IAAIT,QAAAA,WAAAA,WAAY,CAAC;IACvB,IAAIU,MAAMnB,MAAMK,OAAOa,EAAE,0BAA0B,EAAE,MAAM,GAAG;IAC9D,IAAIE,MAAMpB,MAAMK,OAAOa,EAAE,0BAA0B,EAAE,MAAM,GAAG;IAC9D,IAAIC,MAAMC,KAAK,CAACD,KAAKC,IAAI,GAAG;QAACA;QAAKD;KAAI;IACtC,OAAOE,OAAO,MAAM,CAAC;QACnB,mBAAmB,QAAAX,CAAAA,uBAAAA,EAAE,iBAAiB,AAAD,IAAlBA,uBAAuB;QAC1C,4BAA4BS;QAC5B,4BAA4BC;QAC5B,yBAAyBhB,KAAK,GAAG,CAAC,GAAGC,OAAOa,EAAE,uBAAuB,EAAE;QACvE,0BAA0Bd,KAAK,GAAG,CAAC,GAAGC,OAAOa,EA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;IACF;AACF;AAGO,SAASE,sCAAsCF,qBAAqB,IAAI;IAC7E,OAAO;QACL,GAAGH,4BAA4B,MAAM,OAAOG,mBAAmB;QAC/D,aAAa;QACb,uBAAuB;QACvB,4BAA4B;QAC5B,8BAA8B;IAChC;AACF"}
1
+ {"version":3,"file":"sheet/options.jsx","sources":["../../src/sheet/options.ts"],"sourcesContent":["import type { ReactNode } from '@lynx-js/react';\nimport type { G9BottomSheetLoadingSkeleton } from '../display/shimmer';\nimport type { G9IconInput } from '../icon/icon';\n\n// MAUI `G9BottomSheetOptions` / `G9BottomSheetSettings` and their enums (BottomSheet/G9BottomSheetOptions.cs).\n\n/** Detents (MAUI `G9BottomSheetState`): peek (collapsed height), medium (half), large (full). */\nexport type G9SheetDetent = 'peek' | 'medium' | 'large';\n/** Detent sizing or fit-to-content (MAUI `G9BottomSheetSizeMode`). */\nexport type G9SheetSizeMode = 'states' | 'fitToContent';\n/** Header title anchor (MAUI `G9BottomSheetHeaderTitlePlacement`). */\nexport type G9SheetHeaderTitlePlacement = 'center' | 'nearBack';\n/** Where a back request came from (MAUI `G9BottomSheetBackRequestSource` + drag-to-close). */\nexport type G9SheetBackSource = 'toolbarButton' | 'hardwareButton' | 'overlayTap' | 'drag';\n/** What `onBackRequested` decides (MAUI `G9BottomSheetBackAction`). */\nexport type G9SheetBackAction = 'close' | 'doNothing';\n/** Content width (MAUI `G9SheetViewContentWidthMode`). */\nexport type G9SheetContentWidthMode = 'full' | 'custom';\n\n/** A header toolbar action (MAUI `G9BottomSheetToolbarItem`). */\nexport interface G9SheetToolbarItem {\n /** Glyph/icon. */\n readonly icon?: G9IconInput;\n /** Text (when there is no icon). */\n readonly text?: string;\n /** The action (MAUI `AsyncAction`/`Command`); a returned promise keeps the item busy while `disableWhileBusy`. */\n readonly onPress?: () => unknown;\n readonly isBusy?: boolean;\n /** Spinner while busy. Default false. */\n readonly showBusyIndicator?: boolean;\n readonly isActive?: boolean;\n /** Dot while active. Default false. */\n readonly showActiveBadge?: boolean;\n /** Ignore presses while busy. Default true. */\n readonly disableWhileBusy?: boolean;\n /** Default true. */\n readonly animatePress?: boolean;\n /** 0 → 24. */\n readonly iconSize?: number;\n readonly accessibilityLabel?: string;\n /** Element id of the item (default `${sheet automationId}_ToolbarItem_${key or index}` when the sheet has one). */\n readonly automationId?: string;\n /** Stable key (default the index). */\n readonly key?: string;\n}\n\n/** Lifecycle callbacks of one sheet (MAUI `Opening/Opened/Closing/ClosedCommand`). */\nexport interface G9SheetLifecycle {\n /** When the sheet starts opening. */\n readonly onOpening?: () => void;\n /** After the open motion (or its timer fallback). */\n readonly onOpened?: () => void;\n /** Once, when closing starts (not on an in-place replace). */\n readonly onClosing?: () => void;\n /** Once, at cleanup. */\n readonly onClosed?: () => void;\n /** The sheet came to rest at another detent (MAUI `G9SheetView.StateChanged`), with its height in px. */\n readonly onStateChanged?: (detent: G9SheetDetent | 'fit', heightPx: number) => void;\n}\n\n/** Everything a sheet can be opened with (MAUI `G9BottomSheetOptions`; 77 properties + presets). */\nexport interface G9SheetOptions extends G9SheetLifecycle {\n // State and sizing\n /** Initial detent. Default `'medium'`. */\n readonly currentState?: G9SheetDetent;\n /** Allowed detents. Default `['medium', 'large']`. */\n readonly states?: ReadonlyArray<G9SheetDetent>;\n /** Default `'states'`. */\n readonly sizeMode?: G9SheetSizeMode;\n /** Dim scrim that blocks the page. Default true. */\n readonly isModal?: boolean;\n /** Overlay tap / drag may close. Default true. */\n readonly isCancelable?: boolean;\n /** Default true. */\n readonly isDraggable?: boolean;\n /** Grabber. Default true. */\n readonly hasHandle?: boolean;\n /** Peek height (dp). Default 100 (with `collapsedHeight`). */\n readonly peekHeight?: number | null;\n /** Alias of `peekHeight` (MAUI `CollapsedHeight`); wins when both are set. */\n readonly collapsedHeight?: number | null;\n /** Medium = host × ratio (0.1–0.9). Default 0.5. */\n readonly halfExpandedRatio?: number | null;\n /** Large = host × ratio (0.1–1). Default 1. */\n readonly fullExpandedRatio?: number | null;\n /** Cap of a fit sheet (0.2–1). Default 0.75. */\n readonly maxFitToContentHeightRatio?: number;\n /** The largest detent is sized to the content (states mode). Default false. */\n readonly expandedFitsContent?: boolean;\n /** A drag on a scroller expands the sheet first. Default true. */\n readonly scrollingExpandsSheet?: boolean;\n /**\n * The body is a vertical scroller (default true). `false` for content that scrolls itself — a `<list>` page, a map:\n * the body becomes a flex column and the content fills it, so the content's own scroller gets a definite height (MAUI\n * puts the content in the body as is; a CollectionView body scrolls itself). Lynx-only, additive. Use it with a\n * detent-sized sheet (full screen / states); a fit-to-content sheet has no height to give.\n */\n readonly scrollBody?: boolean;\n /** Height memory key (needed for factory content). */\n readonly heightMemoKey?: string | null;\n // Visual\n /** Body padding. Default 0. */\n readonly padding?: number;\n /** 10 px gap under the header hairline. Default true. */\n readonly useStandardBodyTopGap?: boolean;\n /** Top corners. Default 12. */\n readonly cornerRadius?: number;\n /** Body background. Default `var(--g9-surface-container)`. */\n readonly backgroundColor?: string | null;\n /** Scrim colour; its alpha replaces the maximum opacity. */\n readonly windowBackgroundColor?: string | null;\n /** Default `'full'`. */\n readonly contentWidthMode?: G9SheetContentWidthMode;\n /** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */\n readonly contentWidth?: number | null;\n /**\n * Full-screen sheets, and detent sheets resting at a `large` detent that reaches under the top inset, reserve the\n * top inset (MAUI state-aware top padding). Default true.\n */\n readonly useTopSafeAreaPadding?: boolean;\n /**\n * The surface reserves the host's bottom safe inset (a visible navigation bar or gesture handle) below the content\n * and footer. 0 on an immersive host. Default true.\n */\n readonly useBottomSafeAreaPadding?: boolean;\n /** Default 0. */\n readonly additionalTopSafeAreaPadding?: number;\n /** Replaces the top padding (0 = flush). */\n readonly topSafeAreaPaddingOverride?: number | null;\n /** Grabber on full-screen toolbar sheets. Default true. */\n readonly showFullScreenDragHandle?: boolean;\n /** Page recede behind a tall primary sheet. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Visible ratio where the recede starts. Default 0.75. */\n readonly backdropCardEffectThreshold?: number;\n // Animation and loading\n /** Per-sheet open duration (ms); default the settings value. */\n readonly openAnimationDurationMs?: number | null;\n readonly closeAnimationDurationMs?: number | null;\n /** Factory content builds after the open motion (spinner/skeleton first). Default true. */\n readonly deferContent?: boolean;\n /** Delay before deferred content swaps in. Default 369. */\n readonly loadDelayMs?: number;\n /** The placeholder uses the full height. Default false. */\n readonly useFullScreenLoadingPlaceholder?: boolean;\n /** Known final body height for the placeholder. */\n readonly deferredLoadingPlaceholderHeight?: number | null;\n /** Covered crossfade reveal of deferred content. Default true. */\n readonly fadeDeferredContentIn?: boolean;\n /** Placeholder shape. Default `'none'` (spinner). */\n readonly loadingSkeleton?: G9BottomSheetLoadingSkeleton;\n /** 0 → the shape's default. */\n readonly loadingSkeletonRowCount?: number;\n // Stack and replace\n /** The parent sinks and fades when this sheet stacks on it. Default true. */\n readonly recedeParentOnStack?: boolean;\n /** Hand-off: replaces the one open sheet once this one is ready. Default false. */\n readonly replaceCurrentSheet?: boolean;\n // Header and footer\n /** Three-slot header. Default false. */\n readonly showToolbar?: boolean;\n /** Leading back (or close) button. Default false. */\n readonly showCloseButton?: boolean;\n /** × instead of the back arrow. Default false. */\n readonly useCloseIcon?: boolean;\n /**\n * Automation id of the sheet (MAUI `AutomationId`): the surface gets it, the header's back/close button\n * `${id}_Back`, toolbar items `${id}_ToolbarItem_${key or index}` (see `g9ChildId`). Keep it to `[A-Za-z0-9_-]`.\n */\n readonly automationId?: string;\n readonly title?: string | null;\n readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;\n /** Items built from the content once it exists. */\n readonly toolbarItemsFactory?: (() => ReadonlyArray<G9SheetToolbarItem>) | null;\n /** Default `'center'`. */\n readonly headerTitlePlacement?: G9SheetHeaderTitlePlacement;\n /** Star/Auto/Star columns. Default true. */\n readonly reserveEmptyHeaderSlots?: boolean;\n readonly headerView?: ReactNode;\n readonly headerLeadingView?: ReactNode;\n readonly headerTitleView?: ReactNode;\n readonly headerTrailingView?: ReactNode;\n readonly headerLeadingAndTitleView?: ReactNode;\n readonly headerTitleAndTrailingView?: ReactNode;\n /**\n * A footer that draws its own band (usually a component rendering {@link G9SheetFooterBar}, or nothing) — for\n * buttons that come and go while the sheet is open. Wins over `footerView` and `footerButtons`.\n */\n readonly footerBand?: ReactNode;\n /** Custom footer inside the standard band; wins over `footerButtons`. */\n readonly footerView?: ReactNode;\n /** Equal-width footer buttons. */\n readonly footerButtons?: ReadonlyArray<ReactNode> | null;\n /** Default 3. */\n readonly footerMaxButtonsPerRow?: number;\n /** Hardware back closes. Default true. */\n readonly hardwareBackCloses?: boolean;\n /** Intercepts every back request (disables drag). */\n readonly onBackRequested?: ((source: G9SheetBackSource) => G9SheetBackAction | Promise<G9SheetBackAction>) | null;\n // Platform specific (accepted; applied where Lynx has an equivalent)\n /** Max sheet width on Android (px). */\n readonly androidMaxWidth?: number | null;\n /** Max sheet height on Android (px). */\n readonly androidMaxHeight?: number | null;\n /** Margin around the sheet on Android `[l, t, r, b]`. */\n readonly androidMargin?: readonly [number, number, number, number] | null;\n /** Android half-expanded ratio override. */\n readonly androidHalfExpandedRatio?: number | null;\n /** Square the expanded corners on Android. */\n readonly androidShouldRemoveExpandedCorners?: boolean | null;\n readonly windowsMaxWidth?: number | null;\n readonly windowsMaxHeight?: number | null;\n readonly windowsMinWidth?: number | null;\n readonly windowsMinHeight?: number | null;\n /** Animate the scrim colour on iOS. Default true. */\n readonly animateOverlayToColorOnIos?: boolean;\n}\n\n/** App-wide sheet settings (MAUI `G9BottomSheetSettings`), `<G9Provider settings={{ sheets }}>`. */\nexport interface G9SheetSettings {\n /** Default black. */\n readonly modalOverlayColor?: string;\n /** Dim at the smallest detent (0–1). Default 0.3. */\n readonly modalOverlayMinimumOpacity?: number;\n /** Dim at full screen (0–1). Default 0.9. */\n readonly modalOverlayMaximumOpacity?: number;\n /** Default 300. */\n readonly openAnimationDurationMs?: number;\n /** Default 300. */\n readonly closeAnimationDurationMs?: number;\n /** Partial traversals take a proportional slice. Default true. */\n readonly sizeScaledAnimationDuration?: boolean;\n /** Global switch of the page recede. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Colour behind the receded page. Default black. */\n readonly backdropCardColor?: string;\n /** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */\n readonly stageBeforeShow?: boolean;\n /** Longest a hand-off waits for the successor to open before the old sheet closes anyway (0–5000). Default 250. */\n readonly preOpenMaxHoldMs?: number;\n /** Prebuilt (non-factory) content also waits behind the loading placeholder until after the open motion. Default false. */\n readonly deferPrebuiltContent?: boolean;\n /** `'platformNative'` (lynx-ui's motion) or `'timed'` (tween over the durations). Default platformNative. */\n readonly motionStyle?: 'platformNative' | 'timed';\n /** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */\n readonly heightMemoVersion?: string;\n /**\n * Side padding of the header band (MAUI `G9LayoutMetrics.EdgeSpacing`, which an app may scale — AgriPad's 10 × 1.3\n * = 13). Default 16.\n */\n readonly headerEdgeSpacing?: number;\n}\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst finite = (v: number | undefined, fallback: number) =>\n typeof v === 'number' && Number.isFinite(v) ? v : fallback;\n\n/** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */\nexport function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings> {\n const s = settings ?? {};\n let min = clamp(finite(s.modalOverlayMinimumOpacity, 0.3), 0, 1);\n let max = clamp(finite(s.modalOverlayMaximumOpacity, 0.9), 0, 1);\n if (min > max) [min, max] = [max, min];\n return Object.freeze({\n modalOverlayColor: s.modalOverlayColor ?? '#000000',\n modalOverlayMinimumOpacity: min,\n modalOverlayMaximumOpacity: max,\n openAnimationDurationMs: Math.max(0, finite(s.openAnimationDurationMs, 300)),\n closeAnimationDurationMs: Math.max(0, finite(s.closeAnimationDurationMs, 300)),\n sizeScaledAnimationDuration: s.sizeScaledAnimationDuration ?? true,\n enableBackdropCardEffect: s.enableBackdropCardEffect ?? true,\n backdropCardColor: s.backdropCardColor ?? '#000000',\n stageBeforeShow: s.stageBeforeShow ?? true,\n preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),\n deferPrebuiltContent: s.deferPrebuiltContent ?? false,\n motionStyle: s.motionStyle ?? 'platformNative',\n heightMemoVersion: s.heightMemoVersion ?? '0',\n headerEdgeSpacing: Math.max(0, finite(s.headerEdgeSpacing, 16)),\n });\n}\n\n/** MAUI `DefaultOptions()`: medium, `[medium, large]`, modal, cancelable, handle, draggable. */\nexport function defaultSheetOptions(): G9SheetOptions {\n return {\n currentState: 'medium',\n states: ['medium', 'large'],\n sizeMode: 'states',\n halfExpandedRatio: 0.5,\n fullExpandedRatio: 1,\n };\n}\n\n/** MAUI `FitToContentOptions()`: sized to a non-scrolling body, capped at 75 % of the host. */\nexport function fitToContentSheetOptions(): G9SheetOptions {\n return { sizeMode: 'fitToContent', isCancelable: true, hasHandle: true, isDraggable: true, deferContent: true };\n}\n\n/** MAUI `FullScreenWithoutHandleOptions()`. */\nexport function fullScreenWithoutHandleSheetOptions(): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n deferContent: true,\n };\n}\n\n/** MAUI `FullScreenModalOptions(title, showCloseButton, hardwareBackCloses, toolbarItems)`. */\nexport function fullScreenModalSheetOptions(\n title?: string | null,\n showCloseButton = true,\n hardwareBackCloses = true,\n toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null,\n): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n sizeMode: 'states',\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n cornerRadius: 0,\n backgroundColor: 'var(--g9-background)',\n showToolbar: true,\n showCloseButton,\n title: title ?? null,\n toolbarItems: toolbarItems ?? null,\n hardwareBackCloses,\n };\n}\n\n/** MAUI `FullScreenEdgeToEdgeModalOptions(hardwareBackCloses)`: no header, flush top. */\nexport function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses = true): G9SheetOptions {\n return {\n ...fullScreenModalSheetOptions(null, false, hardwareBackCloses),\n showToolbar: false,\n useTopSafeAreaPadding: false,\n topSafeAreaPaddingOverride: 0,\n additionalTopSafeAreaPadding: 0,\n };\n}\n"],"names":["clamp","v","lo","hi","Math","finite","fallback","Number","resolveSheetSettings","settings","_s_modalOverlayColor","_s_sizeScaledAnimationDuration","_s_enableBackdropCardEffect","_s_backdropCardColor","_s_stageBeforeShow","_s_deferPrebuiltContent","_s_motionStyle","_s_heightMemoVersion","s","min","max","Object","defaultSheetOptions","fitToContentSheetOptions","fullScreenWithoutHandleSheetOptions","fullScreenModalSheetOptions","title","showCloseButton","hardwareBackCloses","toolbarItems","fullScreenEdgeToEdgeModalSheetOptions"],"mappings":"AA6PA,MAAMA,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAC/E,MAAMI,SAAS,CAACJ,GAAuBK,WACrC,AAAa,YAAb,OAAOL,KAAkBM,OAAO,QAAQ,CAACN,KAAKA,IAAIK;AAG7C,SAASE,qBAAqBC,QAAqC;QAMnDC,sBAKUC,gCACHC,6BACPC,sBACFC,oBAEKC,yBACTC,gBACMC;IAjBrB,MAAMC,IAAIT,QAAAA,WAAAA,WAAY,CAAC;IACvB,IAAIU,MAAMnB,MAAMK,OAAOa,EAAE,0BAA0B,EAAE,MAAM,GAAG;IAC9D,IAAIE,MAAMpB,MAAMK,OAAOa,EAAE,0BAA0B,EAAE,MAAM,GAAG;IAC9D,IAAIC,MAAMC,KAAK,CAACD,KAAKC,IAAI,GAAG;QAACA;QAAKD;KAAI;IACtC,OAAOE,OAAO,MAAM,CAAC;QACnB,mBAAmB,QAAAX,CAAAA,uBAAAA,EAAE,iBAAiB,AAAD,IAAlBA,uBAAuB;QAC1C,4BAA4BS;QAC5B,4BAA4BC;QAC5B,yBAAyBhB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iBAAiB,CAAC;IACvC,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AA+ID,yDAAyD;AACzD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,YAAY,EAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,EACpC,WAAW,CAAC,EAAE,sBAAsB,GACnC,cAAc,CAIhB;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,cAAc,CAI5C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAEzC"}
@@ -52,7 +52,7 @@ function StackView(props) {
52
52
  ...entries
53
53
  ].reverse().find((e)=>'opening' === e.status || 'open' === e.status);
54
54
  return <view className="g9-sheet-stack">
55
- {entries.map((entry)=><G9SheetFrame key={entry.frameKey} entry={entry} stack={stack} hostHeight={win.height} hostWidth={win.width} topInset={insets.top} settings={state.settings} memo={state.service.heightMemo} culture={culture.locale} isTop={entry === top} onRest={(heightPx)=>setRest({
55
+ {entries.map((entry)=><G9SheetFrame key={entry.frameKey} entry={entry} stack={stack} hostHeight={win.height} hostWidth={win.width} topInset={insets.top} bottomInset={insets.bottom} settings={state.settings} memo={state.service.heightMemo} culture={culture.locale} isTop={entry === top} onRest={(heightPx)=>setRest({
56
56
  id: entry.id,
57
57
  heightPx
58
58
  })}/>)}
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/service.jsx","sources":["../../src/sheet/service.tsx"],"sourcesContent":["import { type ReactNode, useEffect, useRef, useState, useSyncExternalStore } from '@lynx-js/react';\nimport { startTimer, stopTimer } from '../base/timers';\nimport { useG9Host, useG9HostInsets } from '../host/hooks';\nimport { type G9HostHandle, g9Hosts } from '../host/registry';\nimport { useG9Culture, useG9Preferences, useG9Settings, useG9Theme, useG9Window } from '../provider/hooks';\nimport { G9SheetFrame } from './frame';\nimport { createSheetHeightMemo, type G9SheetHeightMemo, type G9SheetMemoPreferences } from './height-memo';\nimport {\n fitToContentSheetOptions,\n fullScreenModalSheetOptions,\n type G9SheetOptions,\n type G9SheetSettings,\n resolveSheetSettings,\n} from './options';\nimport { type G9ProcessingBuild, type G9ProcessingErrorHandler, G9ProcessingSheetContent } from './processing';\nimport { backdropCardTransform, sheetVisibleRatio } from './sizing';\nimport { type G9SheetContent, type G9SheetHandle, G9SheetStack } from './stack';\n\n/** The sheet API of one host (MAUI `G9BottomSheetHelper` + `G9BottomSheetExtensions`). */\nexport interface G9SheetService {\n /**\n * Opens a sheet (MAUI `ShowG9BottomSheet`): auto-stacks over an open sheet, hands off with `replaceCurrentSheet`,\n * otherwise opens as primary. `content` may be a factory, built after the open motion (`deferContent`). Returns the\n * sheet-scoped handle, or `null` when throttled (a second show/replace within 369 ms).\n */\n show(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /** `show` as a promise (MAUI `ShowG9BottomSheetAsync`): resolves with the handle (or `null`). */\n showAsync(content: G9SheetContent, options?: G9SheetOptions): Promise<G9SheetHandle | null>;\n /** Replaces the open sheet in place when it can morph, else back-closes it and opens (MAUI `ReplaceG9BottomSheet`). */\n replace(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /**\n * Opens at once with a spinner, then builds the body (MAUI `ShowProcessingG9BottomSheet`): `build(handle, signal)`\n * returns the body (the sheet grows to fit), `null` (closes quietly) or throws (`onError`, else error popup + close).\n * Default options: fit to content, not deferred.\n */\n showProcessing(\n build: G9ProcessingBuild,\n options?: G9SheetOptions,\n onError?: G9ProcessingErrorHandler,\n loadingHeight?: number,\n ): G9SheetHandle | null;\n /** Full-screen modal sheet, not throttled (MAUI `ShowFullScreenAsync`). */\n showFullScreen(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle;\n /** Back-routes the top sheet (MAUI `CloseTopG9BottomSheet`). */\n closeTop(): void;\n /** Closes every sheet (MAUI `CloseG9BottomSheet`). */\n closeAll(): void;\n /** Open sheets (MAUI `GetOpenSheetCount`). */\n getOpenCount(): number;\n /** Routes hardware back to the top sheet; `false` when none is open (MAUI `HandleHardwareBackPressed`). */\n handleHardwareBack(): boolean;\n /** `true` while a hand-off successor is replacing this sheet (MAUI `IsBeingReplaced`). */\n isBeingReplaced(handle: G9SheetHandle | null | undefined): boolean;\n /** The scrim colour behind receded pages (MAUI `GetBackdropCardColor`). */\n getBackdropCardColor(): string;\n /** The height memory of this host's sheets. */\n readonly heightMemo: G9SheetHeightMemo;\n /** The stack (advanced: rendering, tests). */\n readonly stack: G9SheetStack;\n}\n\nconst FEATURE = 'g9.sheets';\n\ninterface ServiceState {\n readonly service: G9SheetService;\n settings: Required<G9SheetSettings>;\n}\n\nfunction StackView(props: { readonly state: ServiceState }): ReactNode {\n const { state } = props;\n state.settings = useG9Settings().sheets;\n const win = useG9Window();\n const insets = useG9HostInsets();\n const culture = useG9Culture();\n const stack = state.service.stack;\n const entries = useSyncExternalStore(\n (l) => stack.subscribe(l),\n () => stack.getSnapshot(),\n );\n const host = useG9Host();\n // Backdrop card: the page recedes behind a tall primary sheet (not fit, not stacked over) once its visible ratio\n // reaches `backdropCardEffectThreshold` (default 0.75): the opening detent first, then where the sheet came to rest.\n const [rest, setRest] = useState<{ readonly id: number; readonly heightPx: number } | null>(null);\n const primary = entries.find((e) => e.status === 'opening' || e.status === 'open');\n const card =\n state.settings.enableBackdropCardEffect &&\n primary !== undefined &&\n primary.options.enableBackdropCardEffect !== false &&\n primary.options.sizeMode !== 'fitToContent' &&\n backdropCardTransform(\n sheetVisibleRatio(primary.options, win.height, rest?.id === primary.id ? rest.heightPx : null),\n Math.min(0.99, Math.max(0.1, primary.options.backdropCardEffectThreshold ?? 0.75)),\n );\n const effectOn = card && card.scale < 1 ? card : null;\n const effect = effectOn\n ? {\n scale: Math.round(effectOn.scale * 1000) / 1000,\n translateY: Math.round(effectOn.translateY * 10) / 10,\n durationMs: state.settings.openAnimationDurationMs,\n backdropColor: state.settings.backdropCardColor,\n }\n : null;\n const effectKey = effect ? `${effect.scale}|${effect.translateY}|${effect.durationMs}|${effect.backdropColor}` : '';\n useEffect(() => {\n host.setContentEffect(effect);\n }, [effectKey]);\n useEffect(() => () => stack.dispose(), [stack]);\n // Learned heights belong to one look: a theme change re-measures (viewport and culture are part of the key).\n const scheme = useG9Theme().scheme;\n const lastScheme = useRef(scheme);\n useEffect(() => {\n if (lastScheme.current === scheme) return;\n lastScheme.current = scheme;\n state.service.heightMemo.invalidate();\n }, [scheme]);\n const top = [...entries].reverse().find((e) => e.status === 'opening' || e.status === 'open');\n return (\n <view className=\"g9-sheet-stack\">\n {entries.map((entry) => (\n <G9SheetFrame\n key={entry.frameKey}\n entry={entry}\n stack={stack}\n hostHeight={win.height}\n hostWidth={win.width}\n topInset={insets.top}\n settings={state.settings}\n memo={state.service.heightMemo}\n culture={culture.locale}\n isTop={entry === top}\n onRest={(heightPx) => setRest({ id: entry.id, heightPx })}\n />\n ))}\n </view>\n );\n}\n\n/** Creates the sheet service of a host (attached once as a host feature). */\nfunction createSheetService(\n host: G9HostHandle,\n settings?: Required<G9SheetSettings>,\n preferences?: G9SheetMemoPreferences,\n): ServiceState {\n const clock = host.services.clock;\n const state = { settings: settings ?? resolveSheetSettings(undefined) } as ServiceState;\n const stack = new G9SheetStack({\n now: () => clock.monotonicNow(),\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h),\n durations: (o) => ({\n open: o.openAnimationDurationMs ?? state.settings.openAnimationDurationMs,\n close: o.closeAnimationDurationMs ?? state.settings.closeAnimationDurationMs,\n }),\n stageBeforeShow: () => state.settings.stageBeforeShow,\n preOpenMaxHoldMs: () => state.settings.preOpenMaxHoldMs,\n });\n const heightMemo = createSheetHeightMemo({\n ...(preferences ? { preferences } : {}),\n appVersion: state.settings.heightMemoVersion,\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h),\n });\n const service: G9SheetService = {\n stack,\n heightMemo,\n show: (content, options) => stack.show(content, options ?? {}),\n showAsync: (content, options) => Promise.resolve(stack.show(content, options ?? {})),\n replace: (content, options) => stack.replace(content, options ?? fitToContentSheetOptions()),\n showProcessing(build, options, onError, loadingHeight) {\n let handle: G9SheetHandle | null = null;\n const content = () => (\n <G9ProcessingSheetContent\n build={build}\n {...(onError ? { onError } : {})}\n loadingHeight={loadingHeight && loadingHeight > 0 ? loadingHeight : 160}\n handle={() => handle}\n />\n );\n handle = stack.show(content, { ...(options ?? fitToContentSheetOptions()), deferContent: false });\n return handle;\n },\n showFullScreen: (content, options) =>\n stack.show(content, options ?? fullScreenModalSheetOptions(), false) as G9SheetHandle,\n closeTop: () => stack.closeTop(),\n closeAll: () => stack.closeAll(),\n getOpenCount: () => stack.openCount(),\n handleHardwareBack: () => stack.handleHardwareBack(),\n isBeingReplaced: (handle) => {\n if (!handle) return false;\n const entry = stack.getSnapshot().find((e) => e.id === handle.id);\n return entry?.handingOff === true;\n },\n getBackdropCardColor: () => state.settings.backdropCardColor,\n };\n (state as { service: G9SheetService }).service = service;\n host.attachFeature(FEATURE, state);\n host.registerLayerItem('sheets', { key: FEATURE, element: <StackView state={state} />, order: 0 });\n host.back.push(() => (stack.handleHardwareBack() ? 'handled' : 'pass'), { layer: 'sheets' });\n return state;\n}\n\n/** The sheet service of a host, created on first use. */\nexport function sheetServiceOf(\n host: G9HostHandle,\n settings?: Required<G9SheetSettings>,\n preferences?: G9SheetMemoPreferences,\n): G9SheetService {\n const existing = host.getFeature(FEATURE) as ServiceState | undefined;\n if (existing && settings) existing.settings = settings;\n return (existing ?? createSheetService(host, settings, preferences)).service;\n}\n\n/**\n * The sheets of the nearest `G9Host` (MAUI `G9BottomSheetHelper` for that page). Sheets render in the host's\n * `sheets` layer; hardware back closes the top sheet first; the host's unmount settles every open sheet.\n */\nexport function useG9Sheets(): G9SheetService {\n const settings = useG9Settings().sheets;\n // Learned heights persist in the provider's preferences (key `g9controls.sheet-heights`).\n return sheetServiceOf(useG9Host(), settings, useG9Preferences());\n}\n\n/**\n * The sheets of the active host for code outside components (MAUI's static `G9BottomSheetHelper`): view models,\n * services. Throws `host-missing` when no host is mounted.\n */\nexport function g9Sheets(): G9SheetService {\n return sheetServiceOf(g9Hosts.require());\n}\n"],"names":["FEATURE","StackView","props","_primary_options_backdropCardEffectThreshold","state","useG9Settings","win","useG9Window","insets","useG9HostInsets","culture","useG9Culture","stack","entries","useSyncExternalStore","l","host","useG9Host","rest","setRest","useState","primary","e","card","undefined","backdropCardTransform","sheetVisibleRatio","Math","effectOn","effect","effectKey","useEffect","scheme","useG9Theme","lastScheme","useRef","top","view","entry","G9SheetFrame","heightPx","createSheetService","settings","preferences","clock","resolveSheetSettings","G9SheetStack","cb","ms","startTimer","h","stopTimer","o","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","heightMemo","createSheetHeightMemo","service","content","options","Promise","fitToContentSheetOptions","build","onError","loadingHeight","handle","G9ProcessingSheetContent","fullScreenModalSheetOptions","sheetServiceOf","existing","useG9Sheets","useG9Preferences","g9Sheets","g9Hosts"],"mappings":";;;;;;;;;;;AA6DA,MAAMA,UAAU;AAOhB,SAASC,UAAUC,KAAuC;QAuBvBC;IAtBjC,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAClBE,MAAM,QAAQ,GAAGC,gBAAgB,MAAM;IACvC,MAAMC,MAAMC;IACZ,MAAMC,SAASC;IACf,MAAMC,UAAUC;IAChB,MAAMC,QAAQR,MAAM,OAAO,CAAC,KAAK;IACjC,MAAMS,UAAUC,qBACd,CAACC,IAAMH,MAAM,SAAS,CAACG,IACvB,IAAMH,MAAM,WAAW;IAEzB,MAAMI,OAAOC;IAGb,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoE;IAC5F,MAAMC,UAAUR,QAAQ,IAAI,CAAC,CAACS,IAAMA,AAAa,cAAbA,EAAE,MAAM,IAAkBA,AAAa,WAAbA,EAAE,MAAM;IACtE,MAAMC,OACJnB,MAAM,QAAQ,CAAC,wBAAwB,IACvCiB,AAAYG,WAAZH,WACAA,AAA6C,UAA7CA,QAAQ,OAAO,CAAC,wBAAwB,I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AAA,IAAAA,MAAO,UAAU,AAAD,MAAM;QAC/B;QACA,sBAAsB,IAAMlC,MAAM,QAAQ,CAAC,iBAAiB;IAC9D;IACCA,MAAsC,OAAO,GAAGqD;IACjDzC,KAAK,aAAa,CAAChB,SAASI;IAC5BY,KAAK,iBAAiB,CAAC,UAAU;QAAE,KAAKhB;QAAS,UAAUC,UAAU,OAAOG;QAAW,OAAO;IAAE;IAChGY,KAAK,IAAI,CAAC,IAAI,CAAC,IAAOJ,MAAM,kBAAkB,KAAK,YAAY,QAAS;QAAE,OAAO;IAAS;IAC1F,OAAOR;AACT;AAGO,SAASgE,eACdpD,IAAkB,EAClB0B,QAAoC,EACpCC,WAAoC;IAEpC,MAAM0B,WAAWrD,KAAK,UAAU,CAAChB;IACjC,IAAIqE,YAAY3B,UAAU2B,SAAS,QAAQ,GAAG3B;IAC9C,OAAO,AAAC2B,CAAAA,QAAAA,WAAAA,WAAY5B,mBAAmBzB,MAAM0B,UAAUC,YAAW,EAAG,OAAO;AAC9E;AAMO,SAAS2B;IACd,MAAM5B,WAAWrC,gBAAgB,MAAM;IAEvC,OAAO+D,eAAenD,aAAayB,UAAU6B;AAC/C;AAMO,SAASC;IACd,OAAOJ,eAAeK,QAAQ,OAAO;AACvC"}
1
+ {"version":3,"file":"sheet/service.jsx","sources":["../../src/sheet/service.tsx"],"sourcesContent":["import { type ReactNode, useEffect, useRef, useState, useSyncExternalStore } from '@lynx-js/react';\nimport { startTimer, stopTimer } from '../base/timers';\nimport { useG9Host, useG9HostInsets } from '../host/hooks';\nimport { type G9HostHandle, g9Hosts } from '../host/registry';\nimport { useG9Culture, useG9Preferences, useG9Settings, useG9Theme, useG9Window } from '../provider/hooks';\nimport { G9SheetFrame } from './frame';\nimport { createSheetHeightMemo, type G9SheetHeightMemo, type G9SheetMemoPreferences } from './height-memo';\nimport {\n fitToContentSheetOptions,\n fullScreenModalSheetOptions,\n type G9SheetOptions,\n type G9SheetSettings,\n resolveSheetSettings,\n} from './options';\nimport { type G9ProcessingBuild, type G9ProcessingErrorHandler, G9ProcessingSheetContent } from './processing';\nimport { backdropCardTransform, sheetVisibleRatio } from './sizing';\nimport { type G9SheetContent, type G9SheetHandle, G9SheetStack } from './stack';\n\n/** The sheet API of one host (MAUI `G9BottomSheetHelper` + `G9BottomSheetExtensions`). */\nexport interface G9SheetService {\n /**\n * Opens a sheet (MAUI `ShowG9BottomSheet`): auto-stacks over an open sheet, hands off with `replaceCurrentSheet`,\n * otherwise opens as primary. `content` may be a factory, built after the open motion (`deferContent`). Returns the\n * sheet-scoped handle, or `null` when throttled (a second show/replace within 369 ms).\n */\n show(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /** `show` as a promise (MAUI `ShowG9BottomSheetAsync`): resolves with the handle (or `null`). */\n showAsync(content: G9SheetContent, options?: G9SheetOptions): Promise<G9SheetHandle | null>;\n /** Replaces the open sheet in place when it can morph, else back-closes it and opens (MAUI `ReplaceG9BottomSheet`). */\n replace(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /**\n * Opens at once with a spinner, then builds the body (MAUI `ShowProcessingG9BottomSheet`): `build(handle, signal)`\n * returns the body (the sheet grows to fit), `null` (closes quietly) or throws (`onError`, else error popup + close).\n * Default options: fit to content, not deferred.\n */\n showProcessing(\n build: G9ProcessingBuild,\n options?: G9SheetOptions,\n onError?: G9ProcessingErrorHandler,\n loadingHeight?: number,\n ): G9SheetHandle | null;\n /** Full-screen modal sheet, not throttled (MAUI `ShowFullScreenAsync`). */\n showFullScreen(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle;\n /** Back-routes the top sheet (MAUI `CloseTopG9BottomSheet`). */\n closeTop(): void;\n /** Closes every sheet (MAUI `CloseG9BottomSheet`). */\n closeAll(): void;\n /** Open sheets (MAUI `GetOpenSheetCount`). */\n getOpenCount(): number;\n /** Routes hardware back to the top sheet; `false` when none is open (MAUI `HandleHardwareBackPressed`). */\n handleHardwareBack(): boolean;\n /** `true` while a hand-off successor is replacing this sheet (MAUI `IsBeingReplaced`). */\n isBeingReplaced(handle: G9SheetHandle | null | undefined): boolean;\n /** The scrim colour behind receded pages (MAUI `GetBackdropCardColor`). */\n getBackdropCardColor(): string;\n /** The height memory of this host's sheets. */\n readonly heightMemo: G9SheetHeightMemo;\n /** The stack (advanced: rendering, tests). */\n readonly stack: G9SheetStack;\n}\n\nconst FEATURE = 'g9.sheets';\n\ninterface ServiceState {\n readonly service: G9SheetService;\n settings: Required<G9SheetSettings>;\n}\n\nfunction StackView(props: { readonly state: ServiceState }): ReactNode {\n const { state } = props;\n state.settings = useG9Settings().sheets;\n const win = useG9Window();\n const insets = useG9HostInsets();\n const culture = useG9Culture();\n const stack = state.service.stack;\n const entries = useSyncExternalStore(\n (l) => stack.subscribe(l),\n () => stack.getSnapshot(),\n );\n const host = useG9Host();\n // Backdrop card: the page recedes behind a tall primary sheet (not fit, not stacked over) once its visible ratio\n // reaches `backdropCardEffectThreshold` (default 0.75): the opening detent first, then where the sheet came to rest.\n const [rest, setRest] = useState<{ readonly id: number; readonly heightPx: number } | null>(null);\n const primary = entries.find((e) => e.status === 'opening' || e.status === 'open');\n const card =\n state.settings.enableBackdropCardEffect &&\n primary !== undefined &&\n primary.options.enableBackdropCardEffect !== false &&\n primary.options.sizeMode !== 'fitToContent' &&\n backdropCardTransform(\n sheetVisibleRatio(primary.options, win.height, rest?.id === primary.id ? rest.heightPx : null),\n Math.min(0.99, Math.max(0.1, primary.options.backdropCardEffectThreshold ?? 0.75)),\n );\n const effectOn = card && card.scale < 1 ? card : null;\n const effect = effectOn\n ? {\n scale: Math.round(effectOn.scale * 1000) / 1000,\n translateY: Math.round(effectOn.translateY * 10) / 10,\n durationMs: state.settings.openAnimationDurationMs,\n backdropColor: state.settings.backdropCardColor,\n }\n : null;\n const effectKey = effect ? `${effect.scale}|${effect.translateY}|${effect.durationMs}|${effect.backdropColor}` : '';\n useEffect(() => {\n host.setContentEffect(effect);\n }, [effectKey]);\n useEffect(() => () => stack.dispose(), [stack]);\n // Learned heights belong to one look: a theme change re-measures (viewport and culture are part of the key).\n const scheme = useG9Theme().scheme;\n const lastScheme = useRef(scheme);\n useEffect(() => {\n if (lastScheme.current === scheme) return;\n lastScheme.current = scheme;\n state.service.heightMemo.invalidate();\n }, [scheme]);\n const top = [...entries].reverse().find((e) => e.status === 'opening' || e.status === 'open');\n return (\n <view className=\"g9-sheet-stack\">\n {entries.map((entry) => (\n <G9SheetFrame\n key={entry.frameKey}\n entry={entry}\n stack={stack}\n hostHeight={win.height}\n hostWidth={win.width}\n topInset={insets.top}\n bottomInset={insets.bottom}\n settings={state.settings}\n memo={state.service.heightMemo}\n culture={culture.locale}\n isTop={entry === top}\n onRest={(heightPx) => setRest({ id: entry.id, heightPx })}\n />\n ))}\n </view>\n );\n}\n\n/** Creates the sheet service of a host (attached once as a host feature). */\nfunction createSheetService(\n host: G9HostHandle,\n settings?: Required<G9SheetSettings>,\n preferences?: G9SheetMemoPreferences,\n): ServiceState {\n const clock = host.services.clock;\n const state = { settings: settings ?? resolveSheetSettings(undefined) } as ServiceState;\n const stack = new G9SheetStack({\n now: () => clock.monotonicNow(),\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h),\n durations: (o) => ({\n open: o.openAnimationDurationMs ?? state.settings.openAnimationDurationMs,\n close: o.closeAnimationDurationMs ?? state.settings.closeAnimationDurationMs,\n }),\n stageBeforeShow: () => state.settings.stageBeforeShow,\n preOpenMaxHoldMs: () => state.settings.preOpenMaxHoldMs,\n });\n const heightMemo = createSheetHeightMemo({\n ...(preferences ? { preferences } : {}),\n appVersion: state.settings.heightMemoVersion,\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h),\n });\n const service: G9SheetService = {\n stack,\n heightMemo,\n show: (content, options) => stack.show(content, options ?? {}),\n showAsync: (content, options) => Promise.resolve(stack.show(content, options ?? {})),\n replace: (content, options) => stack.replace(content, options ?? fitToContentSheetOptions()),\n showProcessing(build, options, onError, loadingHeight) {\n let handle: G9SheetHandle | null = null;\n const content = () => (\n <G9ProcessingSheetContent\n build={build}\n {...(onError ? { onError } : {})}\n loadingHeight={loadingHeight && loadingHeight > 0 ? loadingHeight : 160}\n handle={() => handle}\n />\n );\n handle = stack.show(content, { ...(options ?? fitToContentSheetOptions()), deferContent: false });\n return handle;\n },\n showFullScreen: (content, options) =>\n stack.show(content, options ?? fullScreenModalSheetOptions(), false) as G9SheetHandle,\n closeTop: () => stack.closeTop(),\n closeAll: () => stack.closeAll(),\n getOpenCount: () => stack.openCount(),\n handleHardwareBack: () => stack.handleHardwareBack(),\n isBeingReplaced: (handle) => {\n if (!handle) return false;\n const entry = stack.getSnapshot().find((e) => e.id === handle.id);\n return entry?.handingOff === true;\n },\n getBackdropCardColor: () => state.settings.backdropCardColor,\n };\n (state as { service: G9SheetService }).service = service;\n host.attachFeature(FEATURE, state);\n host.registerLayerItem('sheets', { key: FEATURE, element: <StackView state={state} />, order: 0 });\n host.back.push(() => (stack.handleHardwareBack() ? 'handled' : 'pass'), { layer: 'sheets' });\n return state;\n}\n\n/** The sheet service of a host, created on first use. */\nexport function sheetServiceOf(\n host: G9HostHandle,\n settings?: Required<G9SheetSettings>,\n preferences?: G9SheetMemoPreferences,\n): G9SheetService {\n const existing = host.getFeature(FEATURE) as ServiceState | undefined;\n if (existing && settings) existing.settings = settings;\n return (existing ?? createSheetService(host, settings, preferences)).service;\n}\n\n/**\n * The sheets of the nearest `G9Host` (MAUI `G9BottomSheetHelper` for that page). Sheets render in the host's\n * `sheets` layer; hardware back closes the top sheet first; the host's unmount settles every open sheet.\n */\nexport function useG9Sheets(): G9SheetService {\n const settings = useG9Settings().sheets;\n // Learned heights persist in the provider's preferences (key `g9controls.sheet-heights`).\n return sheetServiceOf(useG9Host(), settings, useG9Preferences());\n}\n\n/**\n * The sheets of the active host for code outside components (MAUI's static `G9BottomSheetHelper`): view models,\n * services. Throws `host-missing` when no host is mounted.\n */\nexport function g9Sheets(): G9SheetService {\n return sheetServiceOf(g9Hosts.require());\n}\n"],"names":["FEATURE","StackView","props","_primary_options_backdropCardEffectThreshold","state","useG9Settings","win","useG9Window","insets","useG9HostInsets","culture","useG9Culture","stack","entries","useSyncExternalStore","l","host","useG9Host","rest","setRest","useState","primary","e","card","undefined","backdropCardTransform","sheetVisibleRatio","Math","effectOn","effect","effectKey","useEffect","scheme","useG9Theme","lastScheme","useRef","top","view","entry","G9SheetFrame","heightPx","createSheetService","settings","preferences","clock","resolveSheetSettings","G9SheetStack","cb","ms","startTimer","h","stopTimer","o","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","heightMemo","createSheetHeightMemo","service","content","options","Promise","fitToContentSheetOptions","build","onError","loadingHeight","handle","G9ProcessingSheetContent","fullScreenModalSheetOptions","sheetServiceOf","existing","useG9Sheets","useG9Preferences","g9Sheets","g9Hosts"],"mappings":";;;;;;;;;;;AA6DA,MAAMA,UAAU;AAOhB,SAASC,UAAUC,KAAuC;QAuBvBC;IAtBjC,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAClBE,MAAM,QAAQ,GAAGC,gBAAgB,MAAM;IACvC,MAAMC,MAAMC;IACZ,MAAMC,SAASC;IACf,MAAMC,UAAUC;IAChB,MAAMC,QAAQR,MAAM,OAAO,CAAC,KAAK;IACjC,MAAMS,UAAUC,qBACd,CAACC,IAAMH,MAAM,SAAS,CAACG,IACvB,IAAMH,MAAM,WAAW;IAEzB,MAAMI,OAAOC;IAGb,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoE;IAC5F,MAAMC,UAAUR,QAAQ,IAAI,CAAC,CAACS,IAAMA,AAAa,cAAbA,EAAE,MAAM,IAAkBA,AAAa,WAAbA,EAAE,MAAM;IACtE,MAAMC,OACJnB,MAAM,QAAQ,CAAC,wBAAwB,IACvCiB,AAAYG,WAAZH,WACAA,AAA6C,UAA7CA,QAAQ,OAAO,CAAC,wBAAwB,IACxCA,AAA6B,mBAA7BA,QAAQ,OAAO,CAAC,QAAQ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