@g9tm/lynxcontrols 1.4.3 → 1.4.5

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 (73) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/button/button.css +1 -0
  3. package/dist/button/button.css.map +1 -1
  4. package/dist/button/button.d.ts +2 -0
  5. package/dist/button/button.d.ts.map +1 -1
  6. package/dist/button/button.jsx +3 -2
  7. package/dist/button/button.jsx.map +1 -1
  8. package/dist/fields/index.d.ts +1 -1
  9. package/dist/fields/index.d.ts.map +1 -1
  10. package/dist/fields/index.jsx +1 -1
  11. package/dist/fields/outlined-field.d.ts +1 -1
  12. package/dist/fields/outlined-field.d.ts.map +1 -1
  13. package/dist/fields/outlined-field.jsx +13 -3
  14. package/dist/fields/outlined-field.jsx.map +1 -1
  15. package/dist/fields/use-text-input.d.ts +14 -1
  16. package/dist/fields/use-text-input.d.ts.map +1 -1
  17. package/dist/fields/use-text-input.jsx +19 -5
  18. package/dist/fields/use-text-input.jsx.map +1 -1
  19. package/dist/pickers/date-time-picker.d.ts.map +1 -1
  20. package/dist/pickers/date-time-picker.jsx +13 -4
  21. package/dist/pickers/date-time-picker.jsx.map +1 -1
  22. package/dist/pickers/picker-sheet.d.ts +5 -1
  23. package/dist/pickers/picker-sheet.d.ts.map +1 -1
  24. package/dist/pickers/picker-sheet.jsx +3 -17
  25. package/dist/pickers/picker-sheet.jsx.map +1 -1
  26. package/dist/pickers/pickers.css +32 -43
  27. package/dist/pickers/pickers.css.map +1 -1
  28. package/dist/pickers/wheel-column.d.ts +3 -1
  29. package/dist/pickers/wheel-column.d.ts.map +1 -1
  30. package/dist/pickers/wheel-column.jsx +17 -3
  31. package/dist/pickers/wheel-column.jsx.map +1 -1
  32. package/dist/popup/frame.d.ts +6 -0
  33. package/dist/popup/frame.d.ts.map +1 -1
  34. package/dist/popup/frame.jsx +8 -6
  35. package/dist/popup/frame.jsx.map +1 -1
  36. package/dist/popup/popup.css +23 -16
  37. package/dist/popup/popup.css.map +1 -1
  38. package/dist/popup/service.d.ts.map +1 -1
  39. package/dist/popup/service.jsx +3 -2
  40. package/dist/popup/service.jsx.map +1 -1
  41. package/dist/range-slider/range-slider.css +5 -0
  42. package/dist/range-slider/range-slider.css.map +1 -1
  43. package/dist/range-slider/range-slider.jsx +1 -1
  44. package/dist/range-slider/range-slider.jsx.map +1 -1
  45. package/dist/selection/selection-sheet.d.ts.map +1 -1
  46. package/dist/selection/selection-sheet.jsx +4 -2
  47. package/dist/selection/selection-sheet.jsx.map +1 -1
  48. package/dist/selection/selection.css +15 -0
  49. package/dist/selection/selection.css.map +1 -1
  50. package/dist/sheet/frame.d.ts.map +1 -1
  51. package/dist/sheet/frame.jsx +26 -19
  52. package/dist/sheet/frame.jsx.map +1 -1
  53. package/dist/sheet/options.d.ts +7 -0
  54. package/dist/sheet/options.d.ts.map +1 -1
  55. package/dist/sheet/options.jsx.map +1 -1
  56. package/dist/sheet/sheet.css +10 -0
  57. package/dist/sheet/sheet.css.map +1 -1
  58. package/dist/sheet/sizing.d.ts +1 -1
  59. package/dist/sheet/sizing.d.ts.map +1 -1
  60. package/dist/sheet/sizing.jsx +2 -2
  61. package/dist/sheet/sizing.jsx.map +1 -1
  62. package/dist/tabs/model.d.ts +1 -1
  63. package/dist/tabs/model.d.ts.map +1 -1
  64. package/dist/tabs/model.jsx.map +1 -1
  65. package/dist/tabs/tab-view.jsx +1 -1
  66. package/dist/tabs/tab-view.jsx.map +1 -1
  67. package/dist/toggle/chip-group.jsx +8 -2
  68. package/dist/toggle/chip-group.jsx.map +1 -1
  69. package/dist/toggle/switch.jsx +2 -1
  70. package/dist/toggle/switch.jsx.map +1 -1
  71. package/dist/toggle/toggle.css +5 -2
  72. package/dist/toggle/toggle.css.map +1 -1
  73. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/frame.jsx","sources":["../../src/sheet/frame.tsx"],"sourcesContent":["import './sheet.css';\nimport {\n createAbortController,\n formatColor,\n type G9AbortController,\n type G9AbortSignal,\n resolveThemeColor,\n tryParseColor,\n withAlpha,\n} from '@g9tm/lynxcontrols-foundation';\nimport { SheetContent, SheetRoot, type SheetRootRef, SheetView } from '@lynx-js/lynx-ui-sheet';\nimport { createContext, type ReactNode, useContext, useEffect, useRef, useState } from '@lynx-js/react';\nimport { g9IdProps } from '../base/control';\nimport { type G9TimerHandle, startTimer, stopTimer } from '../base/timers';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { G9SheetSkeleton } from '../display/shimmer';\nimport { g9FieldNotchStyle } from '../fields/notch';\nimport { useG9Theme } from '../provider/hooks';\nimport { G9SheetGestureFrame, useSheetBodyGesture, useSheetGestureRefs } from './gesture';\nimport { G9SheetFooter, G9SheetHeader, g9SheetHeaderMetrics } from './header';\nimport type { G9SheetHeightMemo } from './height-memo';\nimport { resolveSheetMotion } from './motion';\nimport type { G9SheetDetent, G9SheetSettings } from './options';\nimport {\n clampFitHeight,\n currentPlatform,\n g9SheetDragCloseThreshold,\n g9SheetFitLoadingMinHeight,\n parentRecedeOffset,\n platformSheetConstraints,\n resolveSheetLayout,\n sheetOverlayOpacity,\n sheetSurfaceBottomPadding,\n sheetSurfaceTopPadding,\n} from './sizing';\nimport type { G9SheetEntry, G9SheetHandle, G9SheetStack } from './stack';\n\n/** What content inside a sheet can read (MAUI `IG9BottomSheetAwareView` + deferred load signals). */\nexport interface G9SheetContextValue {\n /** The sheet-scoped handle: `close()` closes only this sheet. */\n readonly handle: G9SheetHandle;\n /** Aborted when the sheet starts closing (cancel loads with it). */\n readonly signal: G9AbortSignal;\n /** The open motion has finished. */\n readonly opened: boolean;\n /** The sheet is closing. */\n readonly closing: boolean;\n /** Resting body cap of a fit sheet (px), else `null`. */\n readonly maxBodyHeight: number | null;\n}\n\nconst SheetContext = createContext<G9SheetContextValue | null>(null);\n\n/** The enclosing sheet, or `null` outside one. */\nexport function useG9SheetContext(): G9SheetContextValue | null {\n return useContext(SheetContext);\n}\n\n/** Props of {@link G9SheetFrame}. */\nexport interface G9SheetFrameProps {\n readonly entry: G9SheetEntry;\n readonly stack: G9SheetStack;\n /** Host height (px): percentage detents and caps resolve against it. */\n readonly hostHeight: number;\n readonly hostWidth: number;\n readonly topInset: number;\n /** The host's bottom safe inset (a visible navigation bar); the surface pads by it. Default 0. */\n readonly bottomInset?: number;\n readonly settings: Required<G9SheetSettings>;\n readonly memo: G9SheetHeightMemo | null;\n /** Culture tag of the memo key. */\n readonly culture: string;\n /** The sheet is the top of the stack (receives scrim input). */\n readonly isTop: boolean;\n /** The sheet came to rest at a new height (px); drives the page recede threshold. */\n readonly onRest?: (heightPx: number) => void;\n}\n\nfunction scrimColor(entry: G9SheetEntry, settings: Required<G9SheetSettings>, opacity: number): string {\n const explicit = entry.options.windowBackgroundColor;\n const parsed = tryParseColor(explicit ?? settings.modalOverlayColor);\n if (!parsed) return explicit ?? settings.modalOverlayColor;\n return formatColor(withAlpha(parsed, explicit ? parsed.a : opacity));\n}\n\n/** lynx-ui's inner view lays G9's frame out as a column (its default `linear` layout ignores `flex`). */\nconst sheetInnerStyle = { display: 'flex', flexDirection: 'column' } as const;\n/** The receded parent sinks and fades over 220 ms (MAUI `StackParentRecedeDurationMs`, CubicOut). */\nconst g9SheetRecedeTransition = 'transform 220ms ease-out, opacity 220ms ease-out';\n\n/** The sheet's detents, small to large (the order of lynx-ui's snap points). */\nfunction orderedDetents(o: G9SheetEntry['options']): G9SheetDetent[] {\n const requested = o.states && o.states.length > 0 ? o.states : (['medium', 'large'] as const);\n return (['peek', 'medium', 'large'] as const).filter((d) => requested.includes(d));\n}\n\n/** The detent a sheet opens at (`'fit'` for fit-to-content). */\nfunction initialDetent(o: G9SheetEntry['options'], fit: boolean): G9SheetDetent | 'fit' {\n if (fit) return 'fit';\n const ordered = orderedDetents(o);\n const current = o.currentState ?? 'medium';\n return ordered.includes(current) ? current : (ordered[0] ?? 'medium');\n}\n\n/**\n * One sheet of the stack on lynx-ui `SheetRoot` (motion, drag, snap points from lynx-ui; G9 adds detent mapping,\n * scrim, header/footer, deferred content, recede and results). Rendered by the sheet service in the host's sheets\n * layer; use `useG9Sheets()` to open sheets.\n */\nexport function G9SheetFrame(props: G9SheetFrameProps): ReactNode {\n const { entry, stack, settings } = props;\n const palette = useG9Theme().palette;\n const gesture = useSheetGestureRefs();\n const bodyGesture = useSheetBodyGesture(gesture);\n const o = entry.options;\n const layout = resolveSheetLayout(o, props.hostHeight);\n const showing = entry.status === 'opening' || entry.status === 'open';\n const closing = entry.status === 'closing';\n const handle = stack.handleOf(entry.id) as G9SheetHandle;\n\n const controller = useRef<G9AbortController | null>(null);\n if (controller.current === null) controller.current = createAbortController();\n useEffect(() => {\n if (closing || entry.status === 'closed') controller.current?.abort();\n }, [closing, entry.status]);\n useEffect(() => () => controller.current?.abort(), []);\n\n // Deferred (factory) content: placeholder until the open motion ended + loadDelayMs, then the body.\n const factory = typeof entry.content === 'function';\n const deferred = (factory || settings.deferPrebuiltContent) && o.deferContent !== false;\n const [revealed, setRevealed] = useState(!deferred);\n const [covering, setCovering] = useState(false);\n const timer = useRef<G9TimerHandle | null>(null);\n const coverTimer = useRef<G9TimerHandle | null>(null);\n useEffect(\n () => () => {\n if (coverTimer.current !== null) stopTimer(coverTimer.current);\n },\n [],\n );\n useEffect(() => {\n if (!deferred || revealed || entry.status !== 'open') return;\n const delay = layout.fullScreen\n ? Math.max(o.loadDelayMs ?? 369, settings.openAnimationDurationMs + 32)\n : (o.loadDelayMs ?? 369);\n timer.current = startTimer(() => {\n setRevealed(true);\n if (o.fadeDeferredContentIn !== false) {\n setCovering(true);\n coverTimer.current = startTimer(() => setCovering(false), 220);\n }\n }, delay);\n return () => {\n if (timer.current !== null) stopTimer(timer.current);\n };\n }, [deferred, revealed, entry.status]);\n\n const memoKey = o.heightMemoKey ? `${o.heightMemoKey}|w${Math.round(props.hostWidth)}|${props.culture}|fs1` : null;\n const placeholderHeight = o.useFullScreenLoadingPlaceholder\n ? props.hostHeight\n : (o.deferredLoadingPlaceholderHeight ??\n (memoKey ? props.memo?.lookup(memoKey) : undefined) ??\n g9SheetFitLoadingMinHeight);\n\n const [bodyHeight, setBodyHeight] = useState(0);\n // The footer can come and go after the open (a `footerBand` whose buttons wait for data): it counts for the fit too.\n const [footerHeight, setFooterHeight] = useState(0);\n const onFooterLayout = (e: { detail?: { height?: number } }) => setFooterHeight(Math.max(0, e.detail?.height ?? 0));\n const onBodyLayout = (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n if (h <= 0) return;\n setBodyHeight(h);\n if (memoKey && revealed && !covering) props.memo?.record(memoKey, h);\n };\n\n const placeholder =\n o.loadingSkeleton && o.loadingSkeleton !== 'none' ? (\n <view className=\"g9-sheet__placeholder\" style={{ height: `${placeholderHeight}px` }}>\n <G9SheetSkeleton skeleton={o.loadingSkeleton} rowCount={o.loadingSkeletonRowCount ?? 0} />\n </view>\n ) : (\n <view\n className=\"g9-sheet__placeholder g9-sheet__placeholder--spinner\"\n style={{ height: `${placeholderHeight}px` }}\n >\n <G9ActivityIndicator running size={32} />\n </view>\n );\n const body = revealed ? (factory ? (entry.content as () => ReactNode)() : (entry.content as ReactNode)) : null;\n\n const maxBody = layout.fitMaxHeight;\n const contextValue: G9SheetContextValue = {\n handle,\n signal: (controller.current as G9AbortController).signal,\n opened: entry.status === 'open',\n closing,\n maxBodyHeight: maxBody,\n };\n\n // Scrim: the resting dim of the detent (one detent → max; several → interpolated at the initial detent). A fit sheet\n // ranges from its content height to full screen (MAUI ResolveModalOverlayOpacity), so at rest it dims at the\n // MINIMUM — unless its content fills the screen (MAUI's single-state range).\n const ratios = layout.snapPoints.map((p) =>\n typeof p === 'number' ? p / Math.max(1, props.hostHeight) : p === 'fit' ? 0.5 : Number.parseFloat(p) / 100,\n );\n const restingRatio = ratios[layout.initialSnap] ?? 1;\n const contentRatio = bodyHeight > 0 ? Math.min(1, bodyHeight / Math.max(1, props.hostHeight)) : 0.5;\n const opacity = entry.handingOff\n ? 0\n : layout.fit\n ? contentRatio >= 0.99\n ? settings.modalOverlayMaximumOpacity\n : settings.modalOverlayMinimumOpacity\n : sheetOverlayOpacity(\n restingRatio,\n ratios,\n settings.modalOverlayMinimumOpacity,\n settings.modalOverlayMaximumOpacity,\n );\n const modal = o.isModal !== false;\n // The receded parent sinks and fades (MAUI stack recede). This runs on G9's own frame view, never on lynx-ui's\n // SheetContent view: lynx-ui moves that one from a main-thread worklet, and an inline style written over it from\n // here put the parent back at its closed offset when the child closed (the parent vanished, its scrim stayed).\n const recede = entry.receded\n ? { transform: `translateY(${parentRecedeOffset(bodyHeight || props.hostHeight * 0.5)}px)`, opacity: 0 }\n : { transform: 'translateY(0px)', opacity: 1 };\n const [resting, setResting] = useState<G9SheetDetent | 'fit'>(() => initialDetent(o, layout.fit));\n\n // A fit sheet whose body grows or shrinks AFTER it opened (rows that load later, a spinner replaced by content):\n // lynx-ui re-measures the 'fit' snap point on layout but leaves the sheet where it was, so a taller body ran off the\n // bottom of the screen (its footer unreachable). Re-snap to the new fit while the sheet rests there.\n const rootRef = useRef<SheetRootRef | null>(null);\n const lastFitBody = useRef(0);\n useEffect(() => {\n if (!layout.fit || bodyHeight <= 0 || entry.status !== 'open' || resting !== 'fit') return;\n // Also right after the open motion: the body may have grown while the sheet was still sliding in.\n const fitHeight = bodyHeight + footerHeight;\n if (Math.abs(lastFitBody.current - fitHeight) < 1) return;\n lastFitBody.current = fitHeight;\n rootRef.current?.snapTo(0, { animate: true });\n }, [bodyHeight, footerHeight, entry.status, resting, layout.fit]);\n const topPadding = sheetSurfaceTopPadding(o, layout, resting, props.topInset, props.hostHeight);\n const bottomPadding = sheetSurfaceBottomPadding(o, props.bottomInset ?? 0);\n const platform = currentPlatform();\n // The body reports its scroll offset to the gesture routing on the main thread (./gesture.tsx) on the phones only:\n // Lynxtron (desktop) drops the WHOLE sheet, no element of it is created, when the body's scroll-view carries\n // `main-thread:bindscroll` (the gallery smoke, Azure build 614). On the desktop a wheel scrolls the body.\n const phone = platform === 'android' || platform === 'ios';\n const openMs = o.openAnimationDurationMs ?? settings.openAnimationDurationMs;\n const closeMs = o.closeAnimationDurationMs ?? settings.closeAnimationDurationMs;\n const corner =\n platform === 'android' && o.androidShouldRemoveExpandedCorners === true && layout.fullScreen\n ? 0\n : (o.cornerRadius ?? 12);\n const surface = o.backgroundColor ?? 'var(--g9-surface-container)';\n // Fields in the sheet hide their outline under a floated label with the sheet's colour, not the page's.\n const notch = g9FieldNotchStyle(resolveThemeColor(surface, palette));\n // Motion (MAUI G9SheetMotionModel, ./motion.ts): Material's settle on Android, the UIKit spring on iOS, or the timed\n // cubic; the travel is the share of the host the sheet covers where it rests (a fit sheet: its measured body).\n const detents = orderedDetents(o);\n const restIndex = layout.fit ? 0 : Math.max(0, detents.indexOf(resting as G9SheetDetent));\n const fitRatio =\n bodyHeight > 0 ? Math.min(1, (bodyHeight + topPadding + bottomPadding) / Math.max(1, props.hostHeight)) : 0.4;\n const openRatio = layout.fit ? fitRatio : (ratios[restIndex] ?? restingRatio);\n const motion = resolveSheetMotion({\n style: settings.motionStyle,\n platform,\n openRatio,\n snapRatio: ratios.length > 1 ? Math.max(...ratios) - Math.min(...ratios) : openRatio,\n openMs,\n closeMs,\n perSheetOpen: o.openAnimationDurationMs != null,\n perSheetClose: o.closeAnimationDurationMs != null,\n sizeScaled: settings.sizeScaledAnimationDuration,\n });\n // The body's content; inside a scroller by default, or filling a static body (`scrollBody: false`).\n const content = (\n <view\n className={`g9-sheet__content${o.scrollBody === false ? ' g9-sheet__content--fill' : ''}`}\n key={entry.version}\n bindlayoutchange={onBodyLayout}\n >\n {body}\n {!revealed ? placeholder : null}\n {covering ? (\n <view\n className=\"g9-sheet__cover\"\n style={{ height: `${clampFitHeight(placeholderHeight, props.hostHeight, true)}px` }}\n >\n {placeholder}\n </view>\n ) : null}\n </view>\n );\n return (\n <SheetRoot\n ref={rootRef}\n show={showing}\n snapPoints={layout.snapPoints}\n initialSnap={layout.initialSnap}\n screenHeight={props.hostHeight}\n dragDisabled={layout.dragDisabled}\n enableDragToClose={layout.enableDragToClose}\n dismissThreshold={g9SheetDragCloseThreshold}\n // G9 routes every touch itself (./gesture.tsx: drag vs. body scroll, N-028); lynx-ui's content handlers stay off.\n handleOnly\n onShowChange={(open) => {\n if (!open) void stack.requestBack(entry.id, 'drag');\n }}\n onSnapChange={(index, value) => {\n const detent = layout.fit ? 'fit' : (detents[index] ?? 'large');\n setResting(detent);\n props.onRest?.(value);\n o.onStateChanged?.(detent, value);\n }}\n onOpen={() => stack.markOpened(entry.id)}\n onClose={() => stack.markClosed(entry.id)}\n >\n {/* The view is `position: fixed` without a size; lynx-ui places the sheet at its `top: 100%` and the backdrop at\n its 100 %. Unsized it is 0 × 0 (Lynxtron), so the sheet slid in above the screen: give it the viewport.\n event-through lets taps reach the page around a modal sheet's scrim-less parts; the scrim and the sheet take theirs.\n A non-modal sheet's view is also `pointer-events: none`: with event-through alone the Lynx view handed a tap\n on it to what lies under the whole Lynx view, so a NATIVE element of the page under the sheet (a map's own\n MotionEvents) never got it. (A native window `container` would do it too, but needs the overlay XElement.) */}\n <SheetView\n className={`g9-sheet__view${modal ? '' : ' g9-sheet__view--passthrough'}`}\n nativeProps={{ 'event-through': modal }}\n >\n {modal ? (\n <view\n event-through={false}\n className={`g9-sheet__scrim${props.isTop && !closing ? '' : ' g9-sheet__scrim--covered'}`}\n style={{\n backgroundColor: scrimColor(entry, settings, opacity),\n transition:\n platform === 'ios' && o.animateOverlayToColorOnIos === false\n ? 'none'\n : `background-color ${closing ? closeMs : openMs}ms`,\n }}\n bindtap={() => {\n if (layout.closeOnOverlayTap) void stack.requestBack(entry.id, 'overlayTap');\n }}\n />\n ) : null}\n {/* SheetContent's own view is lynx-ui's: a worklet writes its transform every motion frame, so its style is\n set once and never changes (a later inline-style write replaces the worklet's transform). Everything that\n changes (recede, paddings, colour) lives on G9's frame and surface inside it. */}\n <SheetContent\n className={`g9-sheet g9-sheet--${entry.status}${layout.fit ? ' g9-sheet--fit' : ''}`}\n style={platformSheetConstraints(o)}\n innerStyle={sheetInnerStyle}\n {...motion}\n >\n <G9SheetGestureFrame\n refs={gesture}\n canDrag={!layout.dragDisabled}\n bodyDrags={o.scrollingExpandsSheet !== false}\n className=\"g9-sheet__frame\"\n style={{ ...recede, transition: g9SheetRecedeTransition }}\n >\n <view\n className=\"g9-sheet__surface\"\n {...g9IdProps(o.automationId)}\n style={{\n backgroundColor: surface,\n borderTopLeftRadius: `${corner}px`,\n borderTopRightRadius: `${corner}px`,\n paddingTop: `${topPadding}px`,\n paddingBottom: `${bottomPadding}px`,\n ...notch,\n }}\n >\n <SheetContext.Provider value={contextValue}>\n {layout.showHandle ||\n (layout.fullScreen && o.showToolbar && o.showFullScreenDragHandle !== false && !layout.dragDisabled) ? (\n <view className=\"g9-sheet__grabber-area\">\n <view className=\"g9-sheet__grabber\" />\n </view>\n ) : null}\n <G9SheetHeader options={o} onBack={() => void stack.requestBack(entry.id, 'toolbarButton')} />\n {o.showToolbar && o.useStandardBodyTopGap !== false ? (\n <view className=\"g9-sheet__body-gap\" style={{ height: `${g9SheetHeaderMetrics.bodyTopGap}px` }} />\n ) : null}\n {o.scrollBody === false ? (\n <view\n className={`g9-sheet__body g9-sheet__body--static${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n style={{ padding: `${o.padding ?? 0}px` }}\n >\n {content}\n </view>\n ) : (\n <scroll-view\n className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n scroll-orientation=\"vertical\"\n main-thread:ref={gesture.body}\n main-thread:bindscroll={phone ? bodyGesture.onScrollMT : undefined}\n main-thread:bindtouchstart={bodyGesture.onTouchStartMT}\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n )}\n <view className=\"g9-sheet__footer-slot\" bindlayoutchange={onFooterLayout}>\n <G9SheetFooter options={o} />\n </view>\n </SheetContext.Provider>\n </view>\n {/* Below the surface, so a drag past the top detent (rubber band) never shows the page under it. */}\n <view className=\"g9-sheet__skirt\" style={{ backgroundColor: surface }} />\n </G9SheetGestureFrame>\n </SheetContent>\n </SheetView>\n </SheetRoot>\n );\n}\n"],"names":["SheetContext","createContext","useG9SheetContext","useContext","scrimColor","entry","settings","opacity","explicit","parsed","tryParseColor","formatColor","withAlpha","sheetInnerStyle","g9SheetRecedeTransition","orderedDetents","o","requested","d","initialDetent","fit","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_ref","_o_loadingSkeletonRowCount","_ratios_layout_initialSnap","_props_bottomInset","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","_o_cornerRadius","_o_backgroundColor","_ratios_restIndex","_o_padding","_o_padding1","_props_memo","stack","palette","useG9Theme","gesture","useSheetGestureRefs","bodyGesture","useSheetBodyGesture","layout","resolveSheetLayout","showing","closing","handle","controller","useRef","createAbortController","useEffect","_controller_current","factory","deferred","revealed","setRevealed","useState","covering","setCovering","timer","coverTimer","stopTimer","_o_loadDelayMs","_o_loadDelayMs1","delay","Math","startTimer","memoKey","placeholderHeight","undefined","g9SheetFitLoadingMinHeight","bodyHeight","setBodyHeight","footerHeight","setFooterHeight","onFooterLayout","e","_e_detail","onBodyLayout","h","placeholder","view","G9SheetSkeleton","G9ActivityIndicator","body","maxBody","contextValue","ratios","p","Number","restingRatio","contentRatio","sheetOverlayOpacity","modal","recede","parentRecedeOffset","resting","setResting","rootRef","lastFitBody","_rootRef_current","fitHeight","topPadding","sheetSurfaceTopPadding","bottomPadding","sheetSurfaceBottomPadding","platform","currentPlatform","phone","openMs","closeMs","corner","surface","notch","g9FieldNotchStyle","resolveThemeColor","detents","restIndex","fitRatio","openRatio","motion","resolveSheetMotion","content","clampFitHeight","SheetRoot","g9SheetDragCloseThreshold","open","index","value","_detents_index","detent","SheetView","SheetContent","platformSheetConstraints","G9SheetGestureFrame","g9IdProps","G9SheetHeader","g9SheetHeaderMetrics","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CAAC,CAAC;IAC3D,GACD;oBACC,CAACqC,QAAQ;kBACX,EAAEgB,aACF;gBACF,CAACzD,KAAK,UAAU,wBAAwB,kBAAkBN,gBAAgB;kBACxE,CAACgE,cAAc,SAAS/H,IAAK;gBAC/B,EAAEqE,KAAK;cACT,EAAErF,aAAa,SAAS;YAC1B,EAAEqF,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiB+B;IAAQ,IAAK;UAC3E,EAAEsB,oBAAoB;QACxB,EAAEF,aAAa;MACjB,EAAED,UAAU;IACd,EAAEP;AAEN"}
1
+ {"version":3,"file":"sheet/frame.jsx","sources":["../../src/sheet/frame.tsx"],"sourcesContent":["import './sheet.css';\nimport {\n createAbortController,\n formatColor,\n type G9AbortController,\n type G9AbortSignal,\n resolveThemeColor,\n tryParseColor,\n withAlpha,\n} from '@g9tm/lynxcontrols-foundation';\nimport { SheetContent, SheetRoot, type SheetRootRef, SheetView } from '@lynx-js/lynx-ui-sheet';\nimport { createContext, type ReactNode, useContext, useEffect, useRef, useState } from '@lynx-js/react';\nimport { g9IdProps } from '../base/control';\nimport { type G9TimerHandle, startTimer, stopTimer } from '../base/timers';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { G9SheetSkeleton } from '../display/shimmer';\nimport { g9FieldNotchStyle } from '../fields/notch';\nimport { useG9Theme } from '../provider/hooks';\nimport { G9SheetGestureFrame, useSheetBodyGesture, useSheetGestureRefs } from './gesture';\nimport { G9SheetFooter, G9SheetHeader } from './header';\nimport type { G9SheetHeightMemo } from './height-memo';\nimport { resolveSheetMotion } from './motion';\nimport type { G9SheetDetent, G9SheetSettings } from './options';\nimport {\n clampFitHeight,\n currentPlatform,\n g9SheetDragCloseThreshold,\n g9SheetFitLoadingMinHeight,\n g9SheetFitMinHeight,\n parentRecedeOffset,\n platformSheetConstraints,\n resolveSheetLayout,\n sheetOverlayOpacity,\n sheetSurfaceBottomPadding,\n sheetSurfaceTopPadding,\n} from './sizing';\nimport type { G9SheetEntry, G9SheetHandle, G9SheetStack } from './stack';\n\n/** What content inside a sheet can read (MAUI `IG9BottomSheetAwareView` + deferred load signals). */\nexport interface G9SheetContextValue {\n /** The sheet-scoped handle: `close()` closes only this sheet. */\n readonly handle: G9SheetHandle;\n /** Aborted when the sheet starts closing (cancel loads with it). */\n readonly signal: G9AbortSignal;\n /** The open motion has finished. */\n readonly opened: boolean;\n /** The sheet is closing. */\n readonly closing: boolean;\n /** Resting body cap of a fit sheet (px), else `null`. */\n readonly maxBodyHeight: number | null;\n}\n\nconst SheetContext = createContext<G9SheetContextValue | null>(null);\n\n/** The enclosing sheet, or `null` outside one. */\nexport function useG9SheetContext(): G9SheetContextValue | null {\n return useContext(SheetContext);\n}\n\n/** Props of {@link G9SheetFrame}. */\nexport interface G9SheetFrameProps {\n readonly entry: G9SheetEntry;\n readonly stack: G9SheetStack;\n /** Host height (px): percentage detents and caps resolve against it. */\n readonly hostHeight: number;\n readonly hostWidth: number;\n readonly topInset: number;\n /** The host's bottom safe inset (a visible navigation bar); the surface pads by it. Default 0. */\n readonly bottomInset?: number;\n readonly settings: Required<G9SheetSettings>;\n readonly memo: G9SheetHeightMemo | null;\n /** Culture tag of the memo key. */\n readonly culture: string;\n /** The sheet is the top of the stack (receives scrim input). */\n readonly isTop: boolean;\n /** The sheet came to rest at a new height (px); drives the page recede threshold. */\n readonly onRest?: (heightPx: number) => void;\n}\n\nfunction scrimColor(entry: G9SheetEntry, settings: Required<G9SheetSettings>, opacity: number): string {\n const explicit = entry.options.windowBackgroundColor;\n const parsed = tryParseColor(explicit ?? settings.modalOverlayColor);\n if (!parsed) return explicit ?? settings.modalOverlayColor;\n return formatColor(withAlpha(parsed, explicit ? parsed.a : opacity));\n}\n\n/** lynx-ui's inner view lays G9's frame out as a column (its default `linear` layout ignores `flex`). */\nconst sheetInnerStyle = { display: 'flex', flexDirection: 'column' } as const;\n/** The receded parent sinks and fades over 220 ms (MAUI `StackParentRecedeDurationMs`, CubicOut). */\nconst g9SheetRecedeTransition = 'transform 220ms ease-out, opacity 220ms ease-out';\n\n/** The sheet's detents, small to large (the order of lynx-ui's snap points). */\nfunction orderedDetents(o: G9SheetEntry['options']): G9SheetDetent[] {\n const requested = o.states && o.states.length > 0 ? o.states : (['medium', 'large'] as const);\n return (['peek', 'medium', 'large'] as const).filter((d) => requested.includes(d));\n}\n\n/** The detent a sheet opens at (`'fit'` for fit-to-content). */\nfunction initialDetent(o: G9SheetEntry['options'], fit: boolean): G9SheetDetent | 'fit' {\n if (fit) return 'fit';\n const ordered = orderedDetents(o);\n const current = o.currentState ?? 'medium';\n return ordered.includes(current) ? current : (ordered[0] ?? 'medium');\n}\n\n/**\n * One sheet of the stack on lynx-ui `SheetRoot` (motion, drag, snap points from lynx-ui; G9 adds detent mapping,\n * scrim, header/footer, deferred content, recede and results). Rendered by the sheet service in the host's sheets\n * layer; use `useG9Sheets()` to open sheets.\n */\nexport function G9SheetFrame(props: G9SheetFrameProps): ReactNode {\n const { entry, stack, settings } = props;\n const palette = useG9Theme().palette;\n const gesture = useSheetGestureRefs();\n const bodyGesture = useSheetBodyGesture(gesture);\n const o = entry.options;\n const layout = resolveSheetLayout(o, props.hostHeight);\n const showing = entry.status === 'opening' || entry.status === 'open';\n const closing = entry.status === 'closing';\n const handle = stack.handleOf(entry.id) as G9SheetHandle;\n\n const controller = useRef<G9AbortController | null>(null);\n if (controller.current === null) controller.current = createAbortController();\n useEffect(() => {\n if (closing || entry.status === 'closed') controller.current?.abort();\n }, [closing, entry.status]);\n useEffect(() => () => controller.current?.abort(), []);\n\n // Deferred (factory) content: placeholder until the open motion ended + loadDelayMs, then the body.\n const factory = typeof entry.content === 'function';\n const deferred = (factory || settings.deferPrebuiltContent) && o.deferContent !== false;\n const [revealed, setRevealed] = useState(!deferred);\n const [covering, setCovering] = useState(false);\n const timer = useRef<G9TimerHandle | null>(null);\n const coverTimer = useRef<G9TimerHandle | null>(null);\n useEffect(\n () => () => {\n if (coverTimer.current !== null) stopTimer(coverTimer.current);\n },\n [],\n );\n useEffect(() => {\n if (!deferred || revealed || entry.status !== 'open') return;\n const delay = layout.fullScreen\n ? Math.max(o.loadDelayMs ?? 369, settings.openAnimationDurationMs + 32)\n : (o.loadDelayMs ?? 369);\n timer.current = startTimer(() => {\n setRevealed(true);\n if (o.fadeDeferredContentIn !== false) {\n setCovering(true);\n coverTimer.current = startTimer(() => setCovering(false), 220);\n }\n }, delay);\n return () => {\n if (timer.current !== null) stopTimer(timer.current);\n };\n }, [deferred, revealed, entry.status]);\n\n const memoKey = o.heightMemoKey ? `${o.heightMemoKey}|w${Math.round(props.hostWidth)}|${props.culture}|fs1` : null;\n const placeholderHeight = o.useFullScreenLoadingPlaceholder\n ? props.hostHeight\n : (o.deferredLoadingPlaceholderHeight ??\n (memoKey ? props.memo?.lookup(memoKey) : undefined) ??\n g9SheetFitLoadingMinHeight);\n\n const [bodyHeight, setBodyHeight] = useState(0);\n // The footer can come and go after the open (a `footerBand` whose buttons wait for data): it counts for the fit too.\n const [footerHeight, setFooterHeight] = useState(0);\n // The grabber, header and body gap above the body: part of the chrome a fit sheet's cap includes.\n const [chromeTopHeight, setChromeTopHeight] = useState(0);\n const onChromeTopLayout = (e: { detail?: { height?: number } }) =>\n setChromeTopHeight(Math.max(0, e.detail?.height ?? 0));\n const onFooterLayout = (e: { detail?: { height?: number } }) => setFooterHeight(Math.max(0, e.detail?.height ?? 0));\n const onBodyLayout = (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n if (h <= 0) return;\n setBodyHeight(h);\n if (memoKey && revealed && !covering) props.memo?.record(memoKey, h);\n };\n\n const placeholder =\n o.loadingSkeleton && o.loadingSkeleton !== 'none' ? (\n <view className=\"g9-sheet__placeholder\" style={{ height: `${placeholderHeight}px` }}>\n <G9SheetSkeleton skeleton={o.loadingSkeleton} rowCount={o.loadingSkeletonRowCount ?? 0} />\n </view>\n ) : (\n <view\n className=\"g9-sheet__placeholder g9-sheet__placeholder--spinner\"\n style={{ height: `${placeholderHeight}px` }}\n >\n <G9ActivityIndicator running size={32} />\n </view>\n );\n const body = revealed ? (factory ? (entry.content as () => ReactNode)() : (entry.content as ReactNode)) : null;\n\n // Scrim: the resting dim of the detent (one detent → max; several → interpolated at the initial detent). A fit sheet\n // ranges from its content height to full screen (MAUI ResolveModalOverlayOpacity), so at rest it dims at the\n // MINIMUM — unless its content fills the screen (MAUI's single-state range).\n const ratios = layout.snapPoints.map((p) =>\n typeof p === 'number' ? p / Math.max(1, props.hostHeight) : p === 'fit' ? 0.5 : Number.parseFloat(p) / 100,\n );\n const restingRatio = ratios[layout.initialSnap] ?? 1;\n // The share of the screen the sheet SHOWS: a fit sheet stops at its cap, so content taller than the cap (a long list\n // scrolling inside it) does not \"fill the screen\" — measured on the full content height, AgriPad's block sheet dimmed\n // at the maximum once its harvest list grew (0.69 where MAUI keeps 0.3).\n const shown = layout.fitMaxHeight !== null ? Math.min(bodyHeight, layout.fitMaxHeight) : bodyHeight;\n const contentRatio = bodyHeight > 0 ? Math.min(1, shown / Math.max(1, props.hostHeight)) : 0.5;\n const opacity = entry.handingOff\n ? 0\n : layout.fit\n ? contentRatio >= 0.99\n ? settings.modalOverlayMaximumOpacity\n : settings.modalOverlayMinimumOpacity\n : sheetOverlayOpacity(\n restingRatio,\n ratios,\n settings.modalOverlayMinimumOpacity,\n settings.modalOverlayMaximumOpacity,\n );\n const modal = o.isModal !== false;\n // The receded parent sinks and fades (MAUI stack recede). This runs on G9's own frame view, never on lynx-ui's\n // SheetContent view: lynx-ui moves that one from a main-thread worklet, and an inline style written over it from\n // here put the parent back at its closed offset when the child closed (the parent vanished, its scrim stayed).\n const recede = entry.receded\n ? { transform: `translateY(${parentRecedeOffset(bodyHeight || props.hostHeight * 0.5)}px)`, opacity: 0 }\n : { transform: 'translateY(0px)', opacity: 1 };\n const [resting, setResting] = useState<G9SheetDetent | 'fit'>(() => initialDetent(o, layout.fit));\n\n // A fit sheet whose body grows or shrinks AFTER it opened (rows that load later, a spinner replaced by content):\n // lynx-ui re-measures the 'fit' snap point on layout but leaves the sheet where it was, so a taller body ran off the\n // bottom of the screen (its footer unreachable). Re-snap to the new fit while the sheet rests there.\n const rootRef = useRef<SheetRootRef | null>(null);\n const lastFitBody = useRef(0);\n useEffect(() => {\n if (!layout.fit || bodyHeight <= 0 || entry.status !== 'open' || resting !== 'fit') return;\n // Also right after the open motion: the body may have grown while the sheet was still sliding in.\n const fitHeight = bodyHeight + footerHeight;\n if (Math.abs(lastFitBody.current - fitHeight) < 1) return;\n lastFitBody.current = fitHeight;\n rootRef.current?.snapTo(0, { animate: true });\n }, [bodyHeight, footerHeight, entry.status, resting, layout.fit]);\n const topPadding = sheetSurfaceTopPadding(o, layout, resting, props.topInset, props.hostHeight);\n const bottomPadding = sheetSurfaceBottomPadding(o, props.bottomInset ?? 0);\n // MAUI caps the WHOLE fit sheet at MaxFitToContentHeightRatio of the screen (the helper's chrome — header band, body\n // gap, footer — is part of the natural height it clamps); the body gets what is left. Capping only the body let a long\n // fit sheet stand ~65 dp taller than MAUI's (its header and gap on top of a 75 % body).\n const maxBody =\n layout.fitMaxHeight === null\n ? null\n : Math.max(\n g9SheetFitMinHeight,\n layout.fitMaxHeight - chromeTopHeight - footerHeight - topPadding - bottomPadding,\n );\n const contextValue: G9SheetContextValue = {\n handle,\n signal: (controller.current as G9AbortController).signal,\n opened: entry.status === 'open',\n closing,\n maxBodyHeight: maxBody,\n };\n const platform = currentPlatform();\n // The body reports its scroll offset to the gesture routing on the main thread (./gesture.tsx) on the phones only:\n // Lynxtron (desktop) drops the WHOLE sheet, no element of it is created, when the body's scroll-view carries\n // `main-thread:bindscroll` (the gallery smoke, Azure build 614). On the desktop a wheel scrolls the body.\n const phone = platform === 'android' || platform === 'ios';\n const openMs = o.openAnimationDurationMs ?? settings.openAnimationDurationMs;\n const closeMs = o.closeAnimationDurationMs ?? settings.closeAnimationDurationMs;\n const corner =\n platform === 'android' && o.androidShouldRemoveExpandedCorners === true && layout.fullScreen\n ? 0\n : (o.cornerRadius ?? 12);\n const surface = o.backgroundColor ?? 'var(--g9-surface-container)';\n // Fields in the sheet hide their outline under a floated label with the sheet's colour, not the page's.\n const notch = g9FieldNotchStyle(resolveThemeColor(surface, palette));\n // Motion (MAUI G9SheetMotionModel, ./motion.ts): Material's settle on Android, the UIKit spring on iOS, or the timed\n // cubic; the travel is the share of the host the sheet covers where it rests (a fit sheet: its measured body).\n const detents = orderedDetents(o);\n const restIndex = layout.fit ? 0 : Math.max(0, detents.indexOf(resting as G9SheetDetent));\n const fitRatio =\n bodyHeight > 0 ? Math.min(1, (bodyHeight + topPadding + bottomPadding) / Math.max(1, props.hostHeight)) : 0.4;\n const openRatio = layout.fit ? fitRatio : (ratios[restIndex] ?? restingRatio);\n const motion = resolveSheetMotion({\n style: settings.motionStyle,\n platform,\n openRatio,\n snapRatio: ratios.length > 1 ? Math.max(...ratios) - Math.min(...ratios) : openRatio,\n openMs,\n closeMs,\n perSheetOpen: o.openAnimationDurationMs != null,\n perSheetClose: o.closeAnimationDurationMs != null,\n sizeScaled: settings.sizeScaledAnimationDuration,\n });\n // The body's content; inside a scroller by default, or filling a static body (`scrollBody: false`).\n const content = (\n <view\n className={`g9-sheet__content${o.scrollBody === false ? ' g9-sheet__content--fill' : ''}`}\n key={entry.version}\n bindlayoutchange={onBodyLayout}\n >\n {body}\n {!revealed ? placeholder : null}\n {covering ? (\n <view\n className=\"g9-sheet__cover\"\n style={{ height: `${clampFitHeight(placeholderHeight, props.hostHeight, true)}px` }}\n >\n {placeholder}\n </view>\n ) : null}\n </view>\n );\n return (\n <SheetRoot\n ref={rootRef}\n show={showing}\n snapPoints={layout.snapPoints}\n initialSnap={layout.initialSnap}\n screenHeight={props.hostHeight}\n dragDisabled={layout.dragDisabled}\n enableDragToClose={layout.enableDragToClose}\n dismissThreshold={g9SheetDragCloseThreshold}\n // G9 routes every touch itself (./gesture.tsx: drag vs. body scroll, N-028); lynx-ui's content handlers stay off.\n handleOnly\n onShowChange={(open) => {\n if (!open) void stack.requestBack(entry.id, 'drag');\n }}\n onSnapChange={(index, value) => {\n const detent = layout.fit ? 'fit' : (detents[index] ?? 'large');\n setResting(detent);\n props.onRest?.(value);\n o.onStateChanged?.(detent, value);\n }}\n onOpen={() => stack.markOpened(entry.id)}\n onClose={() => stack.markClosed(entry.id)}\n >\n {/* The view is `position: fixed` without a size; lynx-ui places the sheet at its `top: 100%` and the backdrop at\n its 100 %. Unsized it is 0 × 0 (Lynxtron), so the sheet slid in above the screen: give it the viewport.\n event-through lets taps reach the page around a modal sheet's scrim-less parts; the scrim and the sheet take theirs.\n A non-modal sheet's view is also `pointer-events: none`: with event-through alone the Lynx view handed a tap\n on it to what lies under the whole Lynx view, so a NATIVE element of the page under the sheet (a map's own\n MotionEvents) never got it. (A native window `container` would do it too, but needs the overlay XElement.) */}\n <SheetView\n className={`g9-sheet__view${modal ? '' : ' g9-sheet__view--passthrough'}`}\n nativeProps={{ 'event-through': modal }}\n >\n {modal ? (\n <view\n event-through={false}\n // Never flattened: a flattened view is painted on the Lynx root canvas, which a native SurfaceView (a map)\n // covers — the dim vanished over AgriPad's map while the sheet itself, a native view, still showed.\n flatten={false}\n className={`g9-sheet__scrim${props.isTop && !closing ? '' : ' g9-sheet__scrim--covered'}`}\n style={{\n backgroundColor: scrimColor(entry, settings, opacity),\n transition:\n platform === 'ios' && o.animateOverlayToColorOnIos === false\n ? 'none'\n : `background-color ${closing ? closeMs : openMs}ms`,\n }}\n bindtap={() => {\n if (layout.closeOnOverlayTap) void stack.requestBack(entry.id, 'overlayTap');\n }}\n />\n ) : null}\n {/* SheetContent's own view is lynx-ui's: a worklet writes its transform every motion frame, so its style is\n set once and never changes (a later inline-style write replaces the worklet's transform). Everything that\n changes (recede, paddings, colour) lives on G9's frame and surface inside it. */}\n <SheetContent\n className={`g9-sheet g9-sheet--${entry.status}${layout.fit ? ' g9-sheet--fit' : ''}`}\n style={platformSheetConstraints(o)}\n innerStyle={sheetInnerStyle}\n {...motion}\n >\n <G9SheetGestureFrame\n refs={gesture}\n canDrag={!layout.dragDisabled}\n bodyDrags={o.scrollingExpandsSheet !== false}\n className=\"g9-sheet__frame\"\n style={{ ...recede, transition: g9SheetRecedeTransition }}\n >\n <view\n className=\"g9-sheet__surface\"\n {...g9IdProps(o.automationId)}\n style={{\n backgroundColor: surface,\n borderTopLeftRadius: `${corner}px`,\n borderTopRightRadius: `${corner}px`,\n paddingTop: `${topPadding}px`,\n paddingBottom: `${bottomPadding}px`,\n ...notch,\n }}\n >\n <SheetContext.Provider value={contextValue}>\n <view className=\"g9-sheet__chrome-top\" bindlayoutchange={onChromeTopLayout}>\n {layout.showHandle ||\n (layout.fullScreen &&\n o.showToolbar &&\n o.showFullScreenDragHandle !== false &&\n !layout.dragDisabled) ? (\n <view className=\"g9-sheet__grabber-area\">\n <view className=\"g9-sheet__grabber\" />\n </view>\n ) : null}\n <G9SheetHeader options={o} onBack={() => void stack.requestBack(entry.id, 'toolbarButton')} />\n {o.showToolbar && o.useStandardBodyTopGap !== false ? (\n // MAUI UseStandardBodyTopGap: G9LayoutMetrics.SheetHeaderVerticalGap, which an app scales (AgriPad ×\n // 1.3 = 13) — read from the app's --g9-layout-* variable; g9SheetHeaderMetrics.bodyTopGap is the default.\n <view className=\"g9-sheet__body-gap\" />\n ) : null}\n </view>\n {o.scrollBody === false ? (\n <view\n className={`g9-sheet__body g9-sheet__body--static${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n style={{ padding: `${o.padding ?? 0}px` }}\n >\n {content}\n </view>\n ) : (\n <scroll-view\n className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n scroll-orientation=\"vertical\"\n main-thread:ref={gesture.body}\n main-thread:bindscroll={phone ? bodyGesture.onScrollMT : undefined}\n main-thread:bindtouchstart={bodyGesture.onTouchStartMT}\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n )}\n <view className=\"g9-sheet__footer-slot\" bindlayoutchange={onFooterLayout}>\n <G9SheetFooter options={o} />\n </view>\n </SheetContext.Provider>\n </view>\n {/* Below the surface, so a drag past the top detent (rubber band) never shows the page under it. */}\n <view className=\"g9-sheet__skirt\" style={{ backgroundColor: surface }} />\n </G9SheetGestureFrame>\n </SheetContent>\n </SheetView>\n </SheetRoot>\n );\n}\n"],"names":["SheetContext","createContext","useG9SheetContext","useContext","scrimColor","entry","settings","opacity","explicit","parsed","tryParseColor","formatColor","withAlpha","sheetInnerStyle","g9SheetRecedeTransition","orderedDetents","o","requested","d","initialDetent","fit","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_ref","_o_loadingSkeletonRowCount","_ratios_layout_initialSnap","_props_bottomInset","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","_o_cornerRadius","_o_backgroundColor","_ratios_restIndex","_o_padding","_o_padding1","_props_memo","stack","palette","useG9Theme","gesture","useSheetGestureRefs","bodyGesture","useSheetBodyGesture","layout","resolveSheetLayout","showing","closing","handle","controller","useRef","createAbortController","useEffect","_controller_current","factory","deferred","revealed","setRevealed","useState","covering","setCovering","timer","coverTimer","stopTimer","_o_loadDelayMs","_o_loadDelayMs1","delay","Math","startTimer","memoKey","placeholderHeight","undefined","g9SheetFitLoadingMinHeight","bodyHeight","setBodyHeight","footerHeight","setFooterHeight","chromeTopHeight","setChromeTopHeight","onChromeTopLayout","e","_e_detail","onFooterLayout","onBodyLayout","h","placeholder","view","G9SheetSkeleton","G9ActivityIndicator","body","ratios","p","Number","restingRatio","shown","contentRatio","sheetOverlayOpacity","modal","recede","parentRecedeOffset","resting","setResting","rootRef","lastFitBody","_rootRef_current","fitHeight","topPadding","sheetSurfaceTopPadding","bottomPadding","sheetSurfaceBottomPadding","maxBody","g9SheetFitMinHeight","contextValue","platform","currentPlatform","phone","openMs","closeMs","corner","surface","notch","g9FieldNotchStyle","resolveThemeColor","detents","restIndex","fitRatio","openRatio","motion","resolveSheetMotion","content","clampFitHeight","SheetRoot","g9SheetDragCloseThreshold","open","index","value","_detents_index","detent","SheetView","SheetContent","platformSheetConstraints","G9SheetGestureFrame","g9IdProps","G9SheetHeader","scroll-view","G9SheetFooter"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAMA,eAAeC,cAA0C;AAGxD,SAASC;IACd,OAAOC,WAAWH;AACpB;AAsBA,SAASI,WAAWC,KAAmB,EAAEC,QAAmC,EAAEC,OAAe;IAC3F,MAAMC,WAAWH,MAAM,OAAO,CAAC,qBAAqB;IACpD,MAAMI,SAASC,cAAcF,QAAAA,WAAAA,WAAYF,SAAS,iBAAiB;IACnE,IAAI,CAACG,QAAQ,OAAOD,QAAAA,WAAAA,WAAYF,SAAS,iBAAiB;IAC1D,OAAOK,YAAYC,UAAUH,QAAQD,WAAWC,OAAO,CAAC,GAAGF;AAC7D;AAGA,MAAMM,kBAAkB;IAAE,SAAS;IAAQ,eAAe;AAAS;AAEnE,MAAMC,0BAA0B;AAGhC,SAASC,eAAeC,CAA0B;IAChD,MAAMC,YAAYD,EAAE,MAAM,IAAIA,EAAE,MAAM,CAAC,MAAM,GAAG,IAAIA,EAAE,MAAM,GAAI;QAAC;QAAU;KAAQ;IACnF,OAAQ;QAAC;QAAQ;QAAU;KAAQ,CAAW,MAAM,CAAC,CAACE,IAAMD,UAAU,QAAQ,CAACC;AACjF;AAGA,SAASC,cAAcH,CAA0B,EAAEI,GAAY;QAG7CC,iBAC8BC;IAH9C,IAAIF,KAAK,OAAO;IAChB,MAAMG,UAAUR,eAAeC;IAC/B,MAAMQ,UAAU,QAAAH,CAAAA,kBAAAA,EAAE,YAAY,AAAD,IAAbA,kBAAkB;IAClC,OAAOE,QAAQ,QAAQ,CAACC,WAAWA,UAAU,QAACF,CAAAA,YAAAA,OAAO,CAAC,EAAE,AAAD,IAATA,YAAc;AAC9D;AAOO,SAASG,aAAaC,KAAwB;QAmD9CC,MAAAA,qCAsByDC,4BAkBzCC,4BAy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,qCAAqC,EAAE1C,OAAO,QAAQ,GAAG,0BAA0B,IAAI,EACnG,OAAO;QAAE,SAAS,GAAG,QAAAV,CAAAA,aAAAA,EAAE,OAAO,AAAD,IAARA,aAAa,EAAE,EAAE,CAAC;IAAC,GACzC;oBACC,CAAC+F,QAAQ;kBACX,EAAE3C,SAED0D,YACC,WAAW,CAAC,cAAc,EAAEpG,OAAO,QAAQ,GAAG,0BAA0B,IAAI,EAC5E,mBAAmB,WACnB,YAAY,KAAKJ,QAAQ,IAAI,EAC7B,YAAY,YAAY2E,QAAQzE,YAAY,UAAU,GAAG6B,QACzD,YAAY,gBAAgB7B,YAAY,cAAc,EACtD,OAAO;QACL,SAAS,GAAG,QAAAP,CAAAA,cAAAA,EAAE,OAAO,AAAD,IAARA,cAAa,EAAE,EAAE,CAAC;QAC9B,GAAI2E,AAAY,SAAZA,UAAmB;YAAE,WAAW,GAAGA,QAAQ,EAAE,CAAC;QAAC,IAAI,CAAC,CAAC;IAC3D,GACD;oBACC,CAACmB,QAAQ;kBACX,EAAEe,aACF;gBACF,CAAC1D,KAAK,UAAU,wBAAwB,kBAAkBJ,gBAAgB;kBACxE,CAAC+D,cAAc,SAASnI,IAAK;gBAC/B,EAAEwE,KAAK;cACT,EAAExF,aAAa,SAAS;YAC1B,EAAEwF,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiBiC;IAAQ,IAAK;UAC3E,EAAEsB,oBAAoB;QACxB,EAAEF,aAAa;MACjB,EAAED,UAAU;IACd,EAAEP;AAEN"}
@@ -80,6 +80,13 @@ export interface G9SheetOptions extends G9SheetLifecycle {
80
80
  readonly maxFitToContentHeightRatio?: number;
81
81
  /** The largest detent is sized to the content (states mode). Default false. */
82
82
  readonly expandedFitsContent?: boolean;
83
+ /**
84
+ * Grabber on a draggable sheet with ONE detent, which (as in MAUI) has none by default. For a sheet that has one detent
85
+ * only here — MAUI's peek of a short content followed it down to the content, so MAUI showed two detents of one height
86
+ * and a grabber; lynx-ui resolves its detents once, so the host asks for one fit detent and keeps the grabber with this.
87
+ * Default false.
88
+ */
89
+ readonly handleOnSingleDetent?: boolean;
83
90
  /** A drag on a scroller expands the sheet first. Default true. */
84
91
  readonly scrollingExpandsSheet?: boolean;
85
92
  /**
@@ -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,OAAO,GAAG,WAAW,CAAC;AACtD,0DAA0D;AAC1D,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,iEAAiE;AACjE,MAAM,WAAW,kBAAkB;IACjC,kBAAkB;IAClB,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,oCAAoC;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,kHAAkH;IAClH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,yCAAyC;IACzC,QAAQ,CAAC,i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Q,EAAE,eAAe,GAAG,SAAS,GAAG,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"}
@@ -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 /** 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,IAAI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;QACnB,mBAAmB;IACrB;AACF;AAGO,SAASC;IACd,OAAO;QAAE,UAAU;QAAgB,cAAc;QAAM,WAAW;QAAM,aAAa;QAAM,cAAc;IAAK;AAChH;AAGO,SAASC;IACd,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;SAAQ;QACjB,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;IAChB;AACF;AAGO,SAASC,4BACdC,KAAqB,EACrBC,kBAAkB,IAAI,EACtBC,qBAAqB,IAAI,EACzBC,YAAuD;IAEvD,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;SAAQ;QACjB,UAAU;QACV,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;QACd,iBAAiB;QACjB,aAAa;QACbF;QACA,OAAOD,QAAAA,QAAAA,QAAS;QAChB,cAAcG,QAAAA,eAAAA,eAAgB;QAC9BD;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 /**\n * Grabber on a draggable sheet with ONE detent, which (as in MAUI) has none by default. For a sheet that has one detent\n * only here — MAUI's peek of a short content followed it down to the content, so MAUI showed two detents of one height\n * and a grabber; lynx-ui resolves its detents once, so the host asks for one fit detent and keeps the grabber with this.\n * Default false.\n */\n readonly handleOnSingleDetent?: 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","fullScreenEdgeToEdge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AAH,CAAAA,0BAAAA,EAAE,oBAAoB,AAAD,IAArBA,0BAA0B;QAChD,aAAa,QAAAC,CAAAA,iBAAAA,EAAE,WAAW,AAAD,IAAZA,iBAAiB;QAC9B,mBAAmB,QAAAC,CAAAA,uBAAAA,EAAE,iBAAiB,AAAD,IAAlBA,uBAAuB;QAC1C,mBAAmBb,KAAK,GAAG,CAAC,GAAGC,OAAOa,EAAE,iBAAiB,EAAE;IAC7D;AACF;AAGO,SAASI;IACd,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;YAAU;SAAQ;QAC3B,UAAU;QACV,mBAAmB;QACnB,mBAAmB;IACrB;AACF;AAGO,SAASC;IACd,OAAO;QAAE,UAAU;QAAgB,cAAc;QAAM,WAAW;QAAM,aAAa;QAAM,cAAc;IAAK;AAChH;AAGO,SAASC;IACd,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;SAAQ;QACjB,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;IAChB;AACF;AAGO,SAASC,4BACdC,KAAqB,EACrBC,kBAAkB,IAAI,EACtBC,qBAAqB,IAAI,EACzBC,YAAuD;IAEvD,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;SAAQ;QACjB,UAAU;QACV,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;QACd,iBAAiB;QACjB,aAAa;QACbF;QACA,OAAOD,QAAAA,QAAAA,QAAS;QAChB,cAAcG,QAAAA,eAAAA,eAAgB;QAC9BD;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"}
@@ -81,6 +81,16 @@
81
81
  height: 4px;
82
82
  }
83
83
 
84
+ .g9-sheet__chrome-top {
85
+ flex-direction: column;
86
+ flex-shrink: 0;
87
+ display: flex;
88
+ }
89
+
90
+ .g9-sheet__body-gap {
91
+ height: var(--g9-layout-sheet-header-vertical-gap, 10px);
92
+ }
93
+
84
94
  .g9-sheet__body {
85
95
  flex-shrink: 1;
86
96
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,gBAAgB;AAClB;;AAMA;EAHE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,gBAAgB;AAClB;;AAOA;EAJE,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;AACtB;;AAOA;EAJE,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AAOA;EAJE,2CAA2C;EAC3C,mBAAmB;EACnB,WAAW;EACX,WAAW;AACb;;AAOA;EAJE,cAAc;AAChB;;AAOA;EAJE,OAAO;AACT;;AAOA;EAJE,sBAAsB;EACtB,aAAa;EACb,kBAAkB;AACpB;;AAQA;EALE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,gBAAgB;AAClB;;AAUA;EAPE,WAAW;AACb;;AAYA;EATE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAYA;EATE,6CAA6C;EAC7C,oDAAoD;EACpD,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,QAAQ;AACV;;AAYA;EATE;IACE,UAAU;EACZ;;EAEA;IACE,UAAU;EACZ;AACF;;AAWA;EARE,2CAA2C;AAC7C;;AAWA;EARE;IACE,UAAU;EACZ;;EAEA;IACE,UAAU;EACZ;AACF;;AAUA;EAPE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAWA;EARE,kCAAkC;EAClC,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,yBAAyB;EACzB,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,yBAAyB;AAC3B;;AAaA;EAVE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,cAAc;AAChB;;AAaA;EAVE,2BAA2B;EAC3B,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,0BAA0B;EAC1B,uBAAuB;EACvB,iBAAiB;AACnB;;AAaA;EAVE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAcA;EAXE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AAcA;EAXE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,sBAAsB;EACtB,YAAY;EACZ,kBAAkB;EAClB,aAAa;AACf;;AAcA;EAXE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAgBA;EAbE,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf","sourcesContent":["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAIA;EADE,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;AACtB;;AAKA;EAFE,oBAAoB;EACpB,sBAAsB;EACtB,aAAa;EACb,gBAAgB;AAClB;;AAMA;EAHE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,iBAAiB;AACnB;;AAMA;EAHE,sBAAsB;EACtB,YAAY;EACZ,cAAc;EACd,aAAa;EACb,gBAAgB;AAClB;;AAOA;EAJE,YAAY;EACZ,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;EACpB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAOA;EAJE,oBAAoB;AACtB;;AAOA;EAJE,uBAAuB;EACvB,mBAAmB;EACnB,YAAY;EACZ,aAAa;AACf;;AAOA;EAJE,2CAA2C;EAC3C,mBAAmB;EACnB,WAAW;EACX,WAAW;AACb;;AAQA;EALE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AASA;EANE,wDAAwD;AAC1D;;AASA;EANE,cAAc;AAChB;;AASA;EANE,OAAO;AACT;;AASA;EANE,sBAAsB;EACtB,aAAa;EACb,kBAAkB;AACpB;;AAUA;EAPE,sBAAsB;EACtB,WAAW;EACX,aAA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["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n/* The grabber, header and body gap, measured as one: a fit sheet's cap includes them (MAUI). */\n.g9-sheet__chrome-top {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n/* MAUI UseStandardBodyTopGap: SheetHeaderVerticalGap under the header (10, or the app's scaled value). */\n.g9-sheet__body-gap {\n height: var(--g9-layout-sheet-header-vertical-gap, 10px);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n"],"sourceRoot":""}
@@ -24,7 +24,7 @@ export interface G9SheetLayout {
24
24
  /** One detent, or fit-to-content (MAUI "fixed"): no grabber, no detent dragging. */
25
25
  readonly fixed: boolean;
26
26
  readonly fit: boolean;
27
- /** Grabber visible (`hasHandle && isDraggable && !fixed`). */
27
+ /** Grabber visible (`hasHandle && isDraggable && (!fixed || handleOnSingleDetent)`). */
28
28
  readonly showHandle: boolean;
29
29
  readonly dragDisabled: boolean;
30
30
  /** Drag past the lowest detent may request a close. */
@@ -1 +1 @@
1
- {"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../src/sheet/sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAI/D,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,0DAA0D;AAC1D,eAAO,MAAM,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ACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,CAI3G;AAED,gHAAgH;AAChH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,cAAc,EACvB,QAAQ,sDAAoB,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBxB"}
@@ -65,12 +65,12 @@ function resolveSheetLayout(options, hostHeight, platform = currentPlatform()) {
65
65
  initialSnap: index >= 0 ? index : 0,
66
66
  fixed,
67
67
  fit: false,
68
- showHandle: false !== options.hasHandle && draggable && !fixed,
68
+ showHandle: false !== options.hasHandle && draggable && (!fixed || true === options.handleOnSingleDetent),
69
69
  dragDisabled: !draggable || intercepted,
70
70
  enableDragToClose: cancelable && draggable && !intercepted,
71
71
  closeOnOverlayTap: cancelable,
72
72
  fitMaxHeight: options.expandedFitsContent ? Math.max(g9SheetFitMinHeight, Math.floor(hostHeight * clamp(null != (_options_maxFitToContentHeightRatio = options.maxFitToContentHeightRatio) ? _options_maxFitToContentHeightRatio : 0.75, 0.2, 1))) : null,
73
- fullScreen: 1 === states.length && 'large' === states[0] && full >= 1,
73
+ fullScreen: 1 === states.length && 'large' === states[0] && full >= 1 && true !== options.expandedFitsContent,
74
74
  fillBody: fixed && !options.expandedFitsContent
75
75
  };
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/sizing.jsx","sources":["../../src/sheet/sizing.ts"],"sourcesContent":["import type { G9SheetDetent, G9SheetOptions } from './options';\n\n// Pure sizing rules of the G9 sheet (MAUI G9SheetView + G9BottomSheetHelper sizing; guide 650–980, ADR-0019/0026).\n\n/** MAUI `G9SheetView.MinimizedHeight`: default peek height. */\nexport const g9SheetDefaultPeekHeight = 100;\n/** Absolute minimum of an authoritative fit height (MAUI helper :81). */\nexport const g9SheetFitMinHeight = 80;\n/** Floor while the height is unknown (loading window). */\nexport const g9SheetFitLoadingMinHeight = 180;\n/** Finger travel at release that requests a close (MAUI `DragCloseThreshold`). */\nexport const g9SheetDragCloseThreshold = 72;\n/**\n * Gap between the top safe-area inset and a full-screen sheet's header. MAUI reserves the inset alone\n * (`ResolveFullScreenSheetTopPadding`), but its Android inset is the status-bar band, a few dp below the cutout an\n * immersive Lynx host reports: measured side by side on a Pixel 9 Pro XL (2026-10-10), MAUI's header sat 3 dp lower.\n * (It was 8, which put every full-screen header 5 dp below MAUI's.)\n */\nexport const g9SheetTopSafeAreaBaseGap = 3;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** The platform the app runs on (Lynx `SystemInfo.platform`), lower-cased; `'unknown'` outside Lynx. */\nexport function currentPlatform(): 'android' | 'ios' | 'windows' | 'macos' | 'unknown' {\n const info = (globalThis as { SystemInfo?: { platform?: string } }).SystemInfo;\n const p = (info?.platform ?? '').toLowerCase();\n if (p === 'android') return 'android';\n if (p === 'ios') return 'ios';\n if (p.startsWith('win')) return 'windows';\n if (p === 'macos' || p === 'mac' || p === 'osx') return 'macos';\n return 'unknown';\n}\n\n/** What the adapter passes to lynx-ui `SheetRoot` and how the frame behaves. */\nexport interface G9SheetLayout {\n /** lynx-ui snap points, small to large: pixels, `'NN%'` of the host, or `'fit'`. */\n readonly snapPoints: Array<number | string>;\n readonly initialSnap: number;\n /** One detent, or fit-to-content (MAUI \"fixed\"): no grabber, no detent dragging. */\n readonly fixed: boolean;\n readonly fit: boolean;\n /** Grabber visible (`hasHandle && isDraggable && !fixed`). */\n readonly showHandle: boolean;\n readonly dragDisabled: boolean;\n /** Drag past the lowest detent may request a close. */\n readonly enableDragToClose: boolean;\n /** Backdrop tap requests a close. */\n readonly closeOnOverlayTap: boolean;\n /** The resting body cap for a fit sheet (`maxFitToContentHeightRatio × host`), else `null`. */\n readonly fitMaxHeight: number | null;\n /** Whether the sheet's largest detent is full screen. */\n readonly fullScreen: boolean;\n /**\n * The body fills the surface, so the footer rests at the sheet's bottom edge: a full-screen sheet, or one fixed detent\n * (`states: ['large']` with `fullExpandedRatio: 0.9`) — its surface has a definite height. A sheet that can move between\n * detents or fits its content keeps a body as tall as the content.\n */\n readonly fillBody: boolean;\n}\n\nconst pct = (ratio: number) => `${Math.round(ratio * 10000) / 100}%`;\n\n/**\n * Maps G9 options to a lynx-ui layout (the agreed mapping of MAUI `ApplyOptions`): fit → `['fit']` capped at\n * `maxFitToContentHeightRatio`; states → peek pixels / half ratio / full ratio for the allowed detents, the initial\n * detent from `currentState`. The MAUI quirks (a hidden 100 dp detent under `[medium, large]`, a peek-only sheet that\n * may expand) are not carried over: the detents are exactly `states` (docs/sheets.md \"deliberate differences\").\n */\nexport function resolveSheetLayout(\n options: G9SheetOptions,\n hostHeight: number,\n platform = currentPlatform(),\n): G9SheetLayout {\n const fit = options.sizeMode === 'fitToContent';\n const draggable = options.isDraggable !== false;\n const cancelable = options.isCancelable !== false;\n const intercepted = options.onBackRequested != null;\n if (fit) {\n const ratio = clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1);\n return {\n snapPoints: ['fit'],\n initialSnap: 0,\n fixed: true,\n fit: true,\n showHandle: false,\n dragDisabled: true,\n enableDragToClose: false,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: Math.max(g9SheetFitMinHeight, Math.floor(hostHeight * ratio)),\n fullScreen: false,\n fillBody: false,\n };\n }\n const order: G9SheetDetent[] = ['peek', 'medium', 'large'];\n const requested = options.states && options.states.length > 0 ? options.states : ['medium', 'large'];\n const states = order.filter((d) => requested.includes(d));\n const androidHalf = platform === 'android' ? options.androidHalfExpandedRatio : null;\n const half = clamp(androidHalf ?? options.halfExpandedRatio ?? 0.5, 0.1, 0.9);\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const peek = Math.max(1, options.collapsedHeight ?? options.peekHeight ?? g9SheetDefaultPeekHeight);\n const snap = (d: G9SheetDetent): number | string =>\n d === 'peek' ? Math.min(peek, Math.max(1, hostHeight)) : d === 'medium' ? pct(half) : pct(full);\n const snapPoints = states.map(snap);\n if (options.expandedFitsContent && snapPoints.length > 0) snapPoints[snapPoints.length - 1] = 'fit';\n const current = options.currentState ?? 'medium';\n const index = states.indexOf(current);\n const fixed = states.length <= 1;\n return {\n snapPoints,\n initialSnap: index >= 0 ? index : 0,\n fixed,\n fit: false,\n showHandle: options.hasHandle !== false && draggable && !fixed,\n dragDisabled: !draggable || intercepted,\n enableDragToClose: cancelable && draggable && !intercepted,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: options.expandedFitsContent\n ? Math.max(\n g9SheetFitMinHeight,\n Math.floor(hostHeight * clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1)),\n )\n : null,\n fullScreen: states.length === 1 && states[0] === 'large' && full >= 1,\n fillBody: fixed && !options.expandedFitsContent,\n };\n}\n\n/** Clamps a measured fit body height: `[80, cap]`, or `[180, cap]` while loading (MAUI fit engine). */\nexport function clampFitHeight(natural: number, cap: number, loading: boolean): number {\n const min = loading ? g9SheetFitLoadingMinHeight : g9SheetFitMinHeight;\n if (!(natural > 0)) return Math.min(min, cap);\n return clamp(natural, Math.min(min, cap), cap);\n}\n\n/**\n * Scrim opacity for a visible ratio (MAUI helper overlay rule): between the smallest and the largest detent it runs\n * from `min` to `max`; a single detent uses `max`; below the smallest detent it fades with the ratio.\n */\nexport function sheetOverlayOpacity(\n visibleRatio: number,\n detentRatios: ReadonlyArray<number>,\n min: number,\n max: number,\n): number {\n if (detentRatios.length === 0) return max;\n const lo = Math.min(...detentRatios);\n const hi = Math.max(...detentRatios);\n if (visibleRatio < lo) return (detentRatios.length === 1 ? max : min) * clamp(visibleRatio / lo, 0, 1);\n if (hi === lo) return max;\n return min + (max - min) * clamp((visibleRatio - lo) / (hi - lo), 0, 1);\n}\n\n/** The page recede behind a tall primary sheet (MAUI backdrop card): scale 1 → 0.93, translateY 0 → 12. */\nexport function backdropCardTransform(visibleRatio: number, threshold = 0.75): { scale: number; translateY: number } {\n const raw = clamp((visibleRatio - threshold) / Math.max(1e-6, 1 - threshold), 0, 1);\n const progress = raw <= 0 ? 0 : 1 - (1 - raw) ** (1 / 3);\n return { scale: 1 - 0.07 * progress, translateY: 12 * progress };\n}\n\n/**\n * The visible share of the host a detent sheet covers: its resting height when known, else its opening detent\n * (peek = peek height, medium = half ratio, large = full ratio; `expandedFitsContent` large counts as the fit cap).\n */\nexport function sheetVisibleRatio(\n options: G9SheetOptions,\n hostHeight: number,\n restingHeightPx: number | null,\n platform = currentPlatform(),\n): number {\n const host = Math.max(1, hostHeight);\n if (restingHeightPx != null) return clamp(restingHeightPx / host, 0, 1);\n const layout = resolveSheetLayout(options, host, platform);\n const point = layout.snapPoints[layout.initialSnap];\n if (typeof point === 'number') return clamp(point / host, 0, 1);\n if (point === 'fit' || point === undefined) return (layout.fitMaxHeight ?? 0) / host;\n return clamp(Number.parseFloat(point) / 100, 0, 1);\n}\n\n/** How far a receded parent sheet sinks: `max(24, visible × 0.25)` (MAUI stack recede). */\nexport function parentRecedeOffset(visibleHeight: number): number {\n return Math.max(24, visibleHeight * 0.25);\n}\n\n/** Top padding of a full-screen sheet (MAUI safe-area rule). */\nexport function sheetTopPadding(options: G9SheetOptions, topInset: number): number {\n if (options.topSafeAreaPaddingOverride != null) return Math.max(0, options.topSafeAreaPaddingOverride);\n const inset = options.useTopSafeAreaPadding === false ? 0 : Math.max(0, topInset);\n return inset + g9SheetTopSafeAreaBaseGap + Math.max(0, options.additionalTopSafeAreaPadding ?? 0);\n}\n\n/**\n * Top padding of the sheet surface where it rests. A full-screen sheet always reserves {@link sheetTopPadding}. A\n * detent sheet resting at its `large` detent reserves it too when that detent reaches under the top inset (MAUI\n * state-aware top padding, `G9BottomSheetHelper.ApplyStateAwareTopPadding`): its content never sits under the status\n * bar or the camera cutout. Opted out like MAUI: `useTopSafeAreaPadding: false` with no additional/override padding.\n */\nexport function sheetSurfaceTopPadding(\n options: G9SheetOptions,\n layout: Pick<G9SheetLayout, 'fullScreen' | 'fit'>,\n resting: G9SheetDetent | 'fit',\n topInset: number,\n hostHeight: number,\n): number {\n if (layout.fullScreen) return sheetTopPadding(options, topInset);\n if (layout.fit || resting !== 'large') return 0;\n const opted =\n options.useTopSafeAreaPadding !== false ||\n (options.additionalTopSafeAreaPadding ?? 0) > 0 ||\n (options.topSafeAreaPaddingOverride ?? 0) > 0;\n if (!opted) return 0;\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const top = Math.max(0, hostHeight) * (1 - full);\n return top < Math.max(0, topInset) + g9SheetTopSafeAreaBaseGap ? sheetTopPadding(options, topInset) : 0;\n}\n\n/**\n * Bottom padding of the sheet surface: the host's bottom safe inset (a visible navigation bar or gesture handle), so\n * the last row and the footer stay above it. `useBottomSafeAreaPadding: false` lets content run under it. An\n * immersive host (system bars hidden, as the AgriPad MAUI app) reports 0 and nothing changes.\n */\nexport function sheetSurfaceBottomPadding(options: G9SheetOptions, bottomInset: number): number {\n return options.useBottomSafeAreaPadding === false ? 0 : Math.max(0, bottomInset);\n}\n\n/**\n * Size-scaled animation duration (MAUI `SizeScaledAnimationDuration`): a partial traversal takes the matching slice\n * of the full duration (at least 1 ms unless the duration is 0).\n */\nexport function scaledSheetDuration(durationMs: number, traversedRatio: number, sizeScaled: boolean): number {\n if (durationMs <= 0) return 0;\n if (!sizeScaled) return durationMs;\n return Math.max(1, Math.round(durationMs * clamp(traversedRatio, 0, 1)));\n}\n\n/** Platform size constraints of the sheet surface (MAUI Android/Windows options, applied where they belong). */\nexport function platformSheetConstraints(\n options: G9SheetOptions,\n platform = currentPlatform(),\n): Record<string, string> {\n const px = (n: number) => `${n}px`;\n const style: Record<string, string> = {};\n if (platform === 'android') {\n if (options.androidMaxWidth != null) style.maxWidth = px(options.androidMaxWidth);\n if (options.androidMaxHeight != null) style.maxHeight = px(options.androidMaxHeight);\n if (options.androidMargin) {\n const [l, t, r, b] = options.androidMargin;\n style.margin = `${t}px ${r}px ${b}px ${l}px`;\n }\n }\n if (platform === 'windows') {\n if (options.windowsMaxWidth != null) style.maxWidth = px(options.windowsMaxWidth);\n if (options.windowsMaxHeight != null) style.maxHeight = px(options.windowsMaxHeight);\n if (options.windowsMinWidth != null) style.minWidth = px(options.windowsMinWidth);\n if (options.windowsMinHeight != null) style.minHeight = px(options.windowsMinHeight);\n }\n if (options.contentWidthMode === 'custom') {\n style.width = px(options.contentWidth ?? 300);\n style.alignSelf = 'center';\n }\n return style;\n}\n"],"names":["g9SheetDefaultPeekHeight","g9SheetFitMinHeight","g9SheetFitLoadingMinHeight","g9SheetDragCloseThreshold","g9SheetTopSafeAreaBaseGap","clamp","v","lo","hi","Math","currentPlatform","info","globalThis","p","pct","ratio","resolveSheetLayout","options","hostHeight","platform","_ref","_options_fullExpandedRatio","_ref1","_options_currentState","_options_maxFitToContentHeightRatio","fit","draggable","cancelable","intercepted","_options_maxFitToContentHeightRatio1","order","requested","states","d","androidHalf","half","full","peek","snap","snapPoints","current","index","fixed","clampFitHeight","natural","cap","loading","min","sheetOverlayOpacity","visibleRatio","detentRatios","max","backdropCardTransform","threshold","raw","progress","sheetVisibleRatio","restingHeightPx","_layout_fitMaxHeight","host","layout","point","undefined","Number","parentRecedeOffset","visibleHeight","sheetTopPadding","topInset","_options_additionalTopSafeAreaPadding","inset","sheetSurfaceTopPadding","resting","_options_topSafeAreaPaddingOverride","opted","top","sheetSurfaceBottomPadding","bottomInset","scaledSheetDuration","durationMs","traversedRatio","sizeScaled","platformSheetConstraints","px","n","style","l","t","r","b","_options_contentWidth"],"mappings":"AAKO,MAAMA,2BAA2B;AAEjC,MAAMC,sBAAsB;AAE5B,MAAMC,6BAA6B;AAEnC,MAAMC,4BAA4B;AAOlC,MAAMC,4BAA4B;AAEzC,MAAMC,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAGxE,SAASI;;IACd,MAAMC,OAAQC,WAAsD,UAAU;IAC9E,MAAMC,IAAI,AAAC,SAAD,QAACF,QAAAA,OAAAA,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3BA,QAAQ,eAAe,EAAUmE,MAAM,QAAQ,GAAGF,GAAGjE,QAAQ,eAAe;QAChF,IAAIA,AAA4B,QAA5BA,QAAQ,gBAAgB,EAAUmE,MAAM,SAAS,GAAGF,GAAGjE,QAAQ,gBAAgB;QACnF,IAAIA,QAAQ,aAAa,EAAE;YACzB,MAAM,CAACoE,GAAGC,GAAGC,GAAGC,EAAE,GAAGvE,QAAQ,aAAa;YAC1CmE,MAAM,MAAM,GAAG,GAAGE,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEC,EAAE,GAAG,EAAEH,EAAE,EAAE,CAAC;QAC9C;IACF;IACA,IAAIlE,AAAa,cAAbA,UAAwB;QAC1B,IAAIF,AAA2B,QAA3BA,QAAQ,eAAe,EAAUmE,MAAM,QAAQ,GAAGF,GAAGjE,QAAQ,eAAe;QAChF,IAAIA,AAA4B,QAA5BA,QAAQ,gBAAgB,EAAUmE,MAAM,SAAS,GAAGF,GAAGjE,QAAQ,gBAAgB;QACnF,IAAIA,AAA2B,QAA3BA,QAAQ,eAAe,EAAUmE,MAAM,QAAQ,GAAGF,GAAGjE,QAAQ,eAAe;QAChF,IAAIA,AAA4B,QAA5BA,QAAQ,gBAAgB,EAAUmE,MAAM,SAAS,GAAGF,GAAGjE,QAAQ,gBAAgB;IACrF;IACA,IAAIA,AAA6B,aAA7BA,QAAQ,gBAAgB,EAAe;YACxBwE;QAAjBL,MAAM,KAAK,GAAGF,GAAG,QAAAO,CAAAA,wBAAAA,QAAQ,YAAY,AAAD,IAAnBA,wBAAwB;QACzCL,MAAM,SAAS,GAAG;IACpB;IACA,OAAOA;AACT"}
1
+ {"version":3,"file":"sheet/sizing.jsx","sources":["../../src/sheet/sizing.ts"],"sourcesContent":["import type { G9SheetDetent, G9SheetOptions } from './options';\n\n// Pure sizing rules of the G9 sheet (MAUI G9SheetView + G9BottomSheetHelper sizing; guide 650–980, ADR-0019/0026).\n\n/** MAUI `G9SheetView.MinimizedHeight`: default peek height. */\nexport const g9SheetDefaultPeekHeight = 100;\n/** Absolute minimum of an authoritative fit height (MAUI helper :81). */\nexport const g9SheetFitMinHeight = 80;\n/** Floor while the height is unknown (loading window). */\nexport const g9SheetFitLoadingMinHeight = 180;\n/** Finger travel at release that requests a close (MAUI `DragCloseThreshold`). */\nexport const g9SheetDragCloseThreshold = 72;\n/**\n * Gap between the top safe-area inset and a full-screen sheet's header. MAUI reserves the inset alone\n * (`ResolveFullScreenSheetTopPadding`), but its Android inset is the status-bar band, a few dp below the cutout an\n * immersive Lynx host reports: measured side by side on a Pixel 9 Pro XL (2026-10-10), MAUI's header sat 3 dp lower.\n * (It was 8, which put every full-screen header 5 dp below MAUI's.)\n */\nexport const g9SheetTopSafeAreaBaseGap = 3;\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** The platform the app runs on (Lynx `SystemInfo.platform`), lower-cased; `'unknown'` outside Lynx. */\nexport function currentPlatform(): 'android' | 'ios' | 'windows' | 'macos' | 'unknown' {\n const info = (globalThis as { SystemInfo?: { platform?: string } }).SystemInfo;\n const p = (info?.platform ?? '').toLowerCase();\n if (p === 'android') return 'android';\n if (p === 'ios') return 'ios';\n if (p.startsWith('win')) return 'windows';\n if (p === 'macos' || p === 'mac' || p === 'osx') return 'macos';\n return 'unknown';\n}\n\n/** What the adapter passes to lynx-ui `SheetRoot` and how the frame behaves. */\nexport interface G9SheetLayout {\n /** lynx-ui snap points, small to large: pixels, `'NN%'` of the host, or `'fit'`. */\n readonly snapPoints: Array<number | string>;\n readonly initialSnap: number;\n /** One detent, or fit-to-content (MAUI \"fixed\"): no grabber, no detent dragging. */\n readonly fixed: boolean;\n readonly fit: boolean;\n /** Grabber visible (`hasHandle && isDraggable && (!fixed || handleOnSingleDetent)`). */\n readonly showHandle: boolean;\n readonly dragDisabled: boolean;\n /** Drag past the lowest detent may request a close. */\n readonly enableDragToClose: boolean;\n /** Backdrop tap requests a close. */\n readonly closeOnOverlayTap: boolean;\n /** The resting body cap for a fit sheet (`maxFitToContentHeightRatio × host`), else `null`. */\n readonly fitMaxHeight: number | null;\n /** Whether the sheet's largest detent is full screen. */\n readonly fullScreen: boolean;\n /**\n * The body fills the surface, so the footer rests at the sheet's bottom edge: a full-screen sheet, or one fixed detent\n * (`states: ['large']` with `fullExpandedRatio: 0.9`) — its surface has a definite height. A sheet that can move between\n * detents or fits its content keeps a body as tall as the content.\n */\n readonly fillBody: boolean;\n}\n\nconst pct = (ratio: number) => `${Math.round(ratio * 10000) / 100}%`;\n\n/**\n * Maps G9 options to a lynx-ui layout (the agreed mapping of MAUI `ApplyOptions`): fit → `['fit']` capped at\n * `maxFitToContentHeightRatio`; states → peek pixels / half ratio / full ratio for the allowed detents, the initial\n * detent from `currentState`. The MAUI quirks (a hidden 100 dp detent under `[medium, large]`, a peek-only sheet that\n * may expand) are not carried over: the detents are exactly `states` (docs/sheets.md \"deliberate differences\").\n */\nexport function resolveSheetLayout(\n options: G9SheetOptions,\n hostHeight: number,\n platform = currentPlatform(),\n): G9SheetLayout {\n const fit = options.sizeMode === 'fitToContent';\n const draggable = options.isDraggable !== false;\n const cancelable = options.isCancelable !== false;\n const intercepted = options.onBackRequested != null;\n if (fit) {\n const ratio = clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1);\n return {\n snapPoints: ['fit'],\n initialSnap: 0,\n fixed: true,\n fit: true,\n showHandle: false,\n dragDisabled: true,\n enableDragToClose: false,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: Math.max(g9SheetFitMinHeight, Math.floor(hostHeight * ratio)),\n fullScreen: false,\n fillBody: false,\n };\n }\n const order: G9SheetDetent[] = ['peek', 'medium', 'large'];\n const requested = options.states && options.states.length > 0 ? options.states : ['medium', 'large'];\n const states = order.filter((d) => requested.includes(d));\n const androidHalf = platform === 'android' ? options.androidHalfExpandedRatio : null;\n const half = clamp(androidHalf ?? options.halfExpandedRatio ?? 0.5, 0.1, 0.9);\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const peek = Math.max(1, options.collapsedHeight ?? options.peekHeight ?? g9SheetDefaultPeekHeight);\n const snap = (d: G9SheetDetent): number | string =>\n d === 'peek' ? Math.min(peek, Math.max(1, hostHeight)) : d === 'medium' ? pct(half) : pct(full);\n const snapPoints = states.map(snap);\n if (options.expandedFitsContent && snapPoints.length > 0) snapPoints[snapPoints.length - 1] = 'fit';\n const current = options.currentState ?? 'medium';\n const index = states.indexOf(current);\n const fixed = states.length <= 1;\n return {\n snapPoints,\n initialSnap: index >= 0 ? index : 0,\n fixed,\n fit: false,\n showHandle: options.hasHandle !== false && draggable && (!fixed || options.handleOnSingleDetent === true),\n dragDisabled: !draggable || intercepted,\n enableDragToClose: cancelable && draggable && !intercepted,\n closeOnOverlayTap: cancelable,\n fitMaxHeight: options.expandedFitsContent\n ? Math.max(\n g9SheetFitMinHeight,\n Math.floor(hostHeight * clamp(options.maxFitToContentHeightRatio ?? 0.75, 0.2, 1)),\n )\n : null,\n // One 'large' detent sized to its content is not full screen (no status-bar padding above a short sheet).\n fullScreen: states.length === 1 && states[0] === 'large' && full >= 1 && options.expandedFitsContent !== true,\n fillBody: fixed && !options.expandedFitsContent,\n };\n}\n\n/** Clamps a measured fit body height: `[80, cap]`, or `[180, cap]` while loading (MAUI fit engine). */\nexport function clampFitHeight(natural: number, cap: number, loading: boolean): number {\n const min = loading ? g9SheetFitLoadingMinHeight : g9SheetFitMinHeight;\n if (!(natural > 0)) return Math.min(min, cap);\n return clamp(natural, Math.min(min, cap), cap);\n}\n\n/**\n * Scrim opacity for a visible ratio (MAUI helper overlay rule): between the smallest and the largest detent it runs\n * from `min` to `max`; a single detent uses `max`; below the smallest detent it fades with the ratio.\n */\nexport function sheetOverlayOpacity(\n visibleRatio: number,\n detentRatios: ReadonlyArray<number>,\n min: number,\n max: number,\n): number {\n if (detentRatios.length === 0) return max;\n const lo = Math.min(...detentRatios);\n const hi = Math.max(...detentRatios);\n if (visibleRatio < lo) return (detentRatios.length === 1 ? max : min) * clamp(visibleRatio / lo, 0, 1);\n if (hi === lo) return max;\n return min + (max - min) * clamp((visibleRatio - lo) / (hi - lo), 0, 1);\n}\n\n/** The page recede behind a tall primary sheet (MAUI backdrop card): scale 1 → 0.93, translateY 0 → 12. */\nexport function backdropCardTransform(visibleRatio: number, threshold = 0.75): { scale: number; translateY: number } {\n const raw = clamp((visibleRatio - threshold) / Math.max(1e-6, 1 - threshold), 0, 1);\n const progress = raw <= 0 ? 0 : 1 - (1 - raw) ** (1 / 3);\n return { scale: 1 - 0.07 * progress, translateY: 12 * progress };\n}\n\n/**\n * The visible share of the host a detent sheet covers: its resting height when known, else its opening detent\n * (peek = peek height, medium = half ratio, large = full ratio; `expandedFitsContent` large counts as the fit cap).\n */\nexport function sheetVisibleRatio(\n options: G9SheetOptions,\n hostHeight: number,\n restingHeightPx: number | null,\n platform = currentPlatform(),\n): number {\n const host = Math.max(1, hostHeight);\n if (restingHeightPx != null) return clamp(restingHeightPx / host, 0, 1);\n const layout = resolveSheetLayout(options, host, platform);\n const point = layout.snapPoints[layout.initialSnap];\n if (typeof point === 'number') return clamp(point / host, 0, 1);\n if (point === 'fit' || point === undefined) return (layout.fitMaxHeight ?? 0) / host;\n return clamp(Number.parseFloat(point) / 100, 0, 1);\n}\n\n/** How far a receded parent sheet sinks: `max(24, visible × 0.25)` (MAUI stack recede). */\nexport function parentRecedeOffset(visibleHeight: number): number {\n return Math.max(24, visibleHeight * 0.25);\n}\n\n/** Top padding of a full-screen sheet (MAUI safe-area rule). */\nexport function sheetTopPadding(options: G9SheetOptions, topInset: number): number {\n if (options.topSafeAreaPaddingOverride != null) return Math.max(0, options.topSafeAreaPaddingOverride);\n const inset = options.useTopSafeAreaPadding === false ? 0 : Math.max(0, topInset);\n return inset + g9SheetTopSafeAreaBaseGap + Math.max(0, options.additionalTopSafeAreaPadding ?? 0);\n}\n\n/**\n * Top padding of the sheet surface where it rests. A full-screen sheet always reserves {@link sheetTopPadding}. A\n * detent sheet resting at its `large` detent reserves it too when that detent reaches under the top inset (MAUI\n * state-aware top padding, `G9BottomSheetHelper.ApplyStateAwareTopPadding`): its content never sits under the status\n * bar or the camera cutout. Opted out like MAUI: `useTopSafeAreaPadding: false` with no additional/override padding.\n */\nexport function sheetSurfaceTopPadding(\n options: G9SheetOptions,\n layout: Pick<G9SheetLayout, 'fullScreen' | 'fit'>,\n resting: G9SheetDetent | 'fit',\n topInset: number,\n hostHeight: number,\n): number {\n if (layout.fullScreen) return sheetTopPadding(options, topInset);\n if (layout.fit || resting !== 'large') return 0;\n const opted =\n options.useTopSafeAreaPadding !== false ||\n (options.additionalTopSafeAreaPadding ?? 0) > 0 ||\n (options.topSafeAreaPaddingOverride ?? 0) > 0;\n if (!opted) return 0;\n const full = clamp(options.fullExpandedRatio ?? 1, 0.1, 1);\n const top = Math.max(0, hostHeight) * (1 - full);\n return top < Math.max(0, topInset) + g9SheetTopSafeAreaBaseGap ? sheetTopPadding(options, topInset) : 0;\n}\n\n/**\n * Bottom padding of the sheet surface: the host's bottom safe inset (a visible navigation bar or gesture handle), so\n * the last row and the footer stay above it. `useBottomSafeAreaPadding: false` lets content run under it. An\n * immersive host (system bars hidden, as the AgriPad MAUI app) reports 0 and nothing changes.\n */\nexport function sheetSurfaceBottomPadding(options: G9SheetOptions, bottomInset: number): number {\n return options.useBottomSafeAreaPadding === false ? 0 : Math.max(0, bottomInset);\n}\n\n/**\n * Size-scaled animation duration (MAUI `SizeScaledAnimationDuration`): a partial traversal takes the matching slice\n * of the full duration (at least 1 ms unless the duration is 0).\n */\nexport function scaledSheetDuration(durationMs: number, traversedRatio: number, sizeScaled: boolean): number {\n if (durationMs <= 0) return 0;\n if (!sizeScaled) return durationMs;\n return Math.max(1, Math.round(durationMs * clamp(traversedRatio, 0, 1)));\n}\n\n/** Platform size constraints of the sheet surface (MAUI Android/Windows options, applied where they belong). */\nexport function platformSheetConstraints(\n options: G9SheetOptions,\n platform = currentPlatform(),\n): Record<string, string> {\n const px = (n: number) => `${n}px`;\n const style: Record<string, string> = {};\n if (platform === 'android') {\n if (options.androidMaxWidth != null) style.maxWidth = px(options.androidMaxWidth);\n if (options.androidMaxHeight != null) style.maxHeight = px(options.androidMaxHeight);\n if (options.androidMargin) {\n const [l, t, r, b] = options.androidMargin;\n style.margin = `${t}px ${r}px ${b}px ${l}px`;\n }\n }\n if (platform === 'windows') {\n if (options.windowsMaxWidth != null) style.maxWidth = px(options.windowsMaxWidth);\n if (options.windowsMaxHeight != null) style.maxHeight = px(options.windowsMaxHeight);\n if (options.windowsMinWidth != null) style.minWidth = px(options.windowsMinWidth);\n if (options.windowsMinHeight != null) style.minHeight = px(options.windowsMinHeight);\n }\n if (options.contentWidthMode === 'custom') {\n style.width = px(options.contentWidth ?? 300);\n style.alignSelf = 'center';\n }\n return style;\n}\n"],"names":["g9SheetDefaultPeekHeight","g9SheetFitMinHeight","g9SheetFitLoadingMinHeight","g9SheetDragCloseThreshold","g9SheetTopSafeAreaBaseGap","clamp","v","lo","hi","Math","currentPlatform","info","globalThis","p","pct","ratio","resolveSheetLayout","options","hostHeight","platform","_ref","_options_fullExpandedRatio","_ref1","_options_currentState","_options_maxFitToContentHeightRatio","fit","draggable","cancelable","intercepted","_options_maxFitToContentHeightRatio1","order","requested","states","d","androidHalf","half","full","peek","snap","snapPoints","current","index","fixed","clampFitHeight","natural","cap","loading","min","sheetOverlayOpacity","visibleRatio","detentRatios","max","backdropCardTransform","threshold","raw","progress","sheetVisibleRatio","restingHeightPx","_layout_fitMaxHeight","host","layout","point","undefined","Number","parentRecedeOffset","visibleHeight","sheetTopPadding","topInset","_options_additionalTopSafeAreaPadding","inset","sheetSurfaceTopPadding","resting","_options_topSafeAreaPaddingOverride","opted","top","sheetSurfaceBottomPadding","bottomInset","scaledSheetDuration","durationMs","traversedRatio","sizeScaled","platformSheetConstraints","px","n","style","l","t","r","b","_options_contentWidth"],"mappings":"AAKO,MAAMA,2BAA2B;AAEjC,MAAMC,sBAAsB;AAE5B,MAAMC,6BAA6B;AAE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,CAAAA,wBAAAA,QAAQ,YAAY,AAAD,IAAnBA,wBAAwB;QACzCL,MAAM,SAAS,GAAG;IACpB;IACA,OAAOA;AACT"}
@@ -26,7 +26,7 @@ export interface G9TabItem {
26
26
  readonly badgeText?: string | null;
27
27
  /** A 7×7 dot instead of a pill. */
28
28
  readonly badgeDot?: boolean;
29
- /** Badge fill. Default `var(--g9-error)`. */
29
+ /** Badge fill. Default `var(--g9-primary)` for the pill, `var(--g9-error)` for the dot (MAUI CreateBadge). */
30
30
  readonly badgeColor?: string | null;
31
31
  /** The body shown while this tab is active (MAUI `TabContent`); a function is called when the tab realizes. */
32
32
  readonly content?: ReactNode | (() => ReactNode);
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/tabs/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACzG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AAC/C,4GAA4G;AAC5G,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;AAC/C,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,+GAA+G;IAC/G,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM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