@g9tm/lynxcontrols 1.6.0 → 1.6.1

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.
@@ -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 g9Ms,\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, useMemo, useRef, useState } from '@lynx-js/react';\nimport { G9AnchorLayerContext } from '../anchor/context';\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 { sheetSegmentOf, useG9Place } from '../route/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 { G9SheetScrollIndicator, G9SheetScrollModel } from './scroll-indicator';\nimport {\n clampFitHeight,\n currentPlatform,\n g9SheetDragCloseThreshold,\n g9SheetFitLoadingMinHeight,\n g9SheetFitMinHeight,\n g9SheetScrollToEndThreshold,\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 = (): string => `transform ${g9Ms(220)}ms ease-out, opacity ${g9Ms(220)}ms 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 lynx-ui snap index of where a sheet rests: 0 for a fit sheet, else its detent's place (0 when it is unknown). */\nexport function restingSnapIndex(\n resting: G9SheetDetent | 'fit',\n fit: boolean,\n detents: readonly G9SheetDetent[],\n): number {\n if (fit || resting === 'fit') return 0;\n return Math.max(0, detents.indexOf(resting));\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 // The sheet's place in the navigation: declared from the moment it opens until it starts closing.\n const placeOpen = entry.status === 'opening' || entry.status === 'open';\n useG9Place(\n {\n ...(o.route ?? {}),\n segment: o.route?.segment ?? sheetSegmentOf(o.automationId),\n layer: 'sheet',\n order: entry.id,\n ...(o.route?.title\n ? {}\n : typeof o.title === 'string' && o.title.trim()\n ? { title: () => (typeof o.title === 'string' ? o.title : null) }\n : {}),\n close: () => {\n stack.close(entry.id);\n },\n },\n { active: placeOpen },\n );\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), g9Ms(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 // `scrollIndicator: 'always'` (./scroll-indicator.tsx): the thumb's own store, fed by the body and its content.\n const indicator = useRef<G9SheetScrollModel | null>(null);\n if (o.scrollIndicator === 'always' && o.scrollBody !== false && !indicator.current)\n indicator.current = new G9SheetScrollModel();\n const onBodyLayout = (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n // The scroller's range is the content plus the body's padding on both sides.\n indicator.current?.setContent(h > 0 ? h + 2 * (o.padding ?? 0) : 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 // The host's height changed while the sheet was up — the soft keyboard on a host that pads the page by its inset (AgriPad\n // Android, 2026-11-12): lynx-ui keeps the open offset it computed for the OLD height, so a full-screen sheet opened at\n // 760 and squeezed to 463 stood 297 above the screen's top, its footer mid-screen and a band of page under it. Snap\n // again to where it rests, without motion, so the offset is computed for the new height.\n const lastHostHeight = useRef(props.hostHeight);\n useEffect(() => {\n if (Math.abs(lastHostHeight.current - props.hostHeight) < 1) return;\n lastHostHeight.current = props.hostHeight;\n if (entry.status !== 'open') return;\n rootRef.current?.snapTo(restingSnapIndex(resting, layout.fit, orderedDetents(o)), { animate: false });\n }, [props.hostHeight, entry.status]);\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 anchorLayer = useMemo(() => ({ layer: 'sheet' as const, sheetId: props.entry.id }), [props.entry.id]);\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 // A body that renders a window of a long list grows it when the scroll nears the end (options.onScrollToEnd).\n const endProps = o.onScrollToEnd\n ? { 'lower-threshold': o.scrollToEndThreshold ?? g9SheetScrollToEndThreshold, bindscrolltolower: o.onScrollToEnd }\n : {};\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 <G9AnchorLayerContext.Provider value={anchorLayer}>\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 ) : indicator.current ? (\n // The thumb's frame: the scroller and the thumb over its inline end (only with scrollIndicator).\n <view className={`g9-sheet__body-frame${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}>\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 scroll-event-throttle={16}\n {...endProps}\n bindscroll={(e: { detail?: { scrollTop?: number } }) =>\n indicator.current?.setTop(e.detail?.scrollTop ?? 0)\n }\n bindlayoutchange={(e: { detail?: { height?: number } }) =>\n indicator.current?.setViewport(e.detail?.height ?? 0)\n }\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n <G9SheetScrollIndicator model={indicator.current} />\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 {...endProps}\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 </G9AnchorLayerContext.Provider>\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","g9Ms","orderedDetents","o","requested","d","restingSnapIndex","resting","fit","detents","Math","initialDetent","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_o_route","_ref1","_o_loadingSkeletonRowCount","_ratios_layout_initialSnap","_props_bottomInset","_o_scrollToEndThreshold","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","_o_cornerRadius","_o_backgroundColor","_ratios_restIndex","_o_padding","_o_padding1","_o_padding2","_o_route1","_o_route2","_props_memo","stack","palette","useG9Theme","gesture","useSheetGestureRefs","bodyGesture","useSheetBodyGesture","placeOpen","useG9Place","sheetSegmentOf","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","startTimer","memoKey","placeholderHeight","undefined","g9SheetFitLoadingMinHeight","bodyHeight","setBodyHeight","footerHeight","setFooterHeight","chromeTopHeight","setChromeTopHeight","onChromeTopLayout","e","_e_detail","onFooterLayout","indicator","G9SheetScrollModel","onBodyLayout","_indicator_current","h","placeholder","view","G9SheetSkeleton","G9ActivityIndicator","body","ratios","p","Number","restingRatio","shown","contentRatio","sheetOverlayOpacity","modal","recede","parentRecedeOffset","setResting","rootRef","lastFitBody","_rootRef_current","fitHeight","lastHostHeight","topPadding","sheetSurfaceTopPadding","bottomPadding","sheetSurfaceBottomPadding","maxBody","g9SheetFitMinHeight","anchorLayer","useMemo","contextValue","platform","currentPlatform","phone","endProps","g9SheetScrollToEndThreshold","openMs","closeMs","corner","surface","notch","g9FieldNotchStyle","resolveThemeColor","restIndex","fitRatio","openRatio","motion","resolveSheetMotion","content","clampFitHeight","SheetRoot","g9SheetDragCloseThreshold","open","index","value","_detents_index","detent","SheetView","SheetContent","platformSheetConstraints","G9SheetGestureFrame","g9IdProps","G9AnchorLayerContext","G9SheetHeader","scroll-view","G9SheetScrollIndicator","G9SheetFooter"],"mappings":";;;;;;;;;;;;;;;;;AAyDA,MAAMA,eAAeC,cAA0C;AAGxD,SAASC;IACd,OAAOC,WAAWH;AACpB;AAsBA,SAASI,WAAWC,KAAmB,EAAEC,QAAmC,EAAEC,OAAe;IAC3F,MAAM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,IAAK;kBAC/B,EAAEsF,KAAK;gBACT,EAAE4D,qBAAqB,SAAS;cAClC,EAAEnK,aAAa,SAAS;YAC1B,EAAEuG,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiBqC;IAAQ,IAAK;UAC3E,EAAEqB,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 g9Ms,\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, useMemo, useRef, useState } from '@lynx-js/react';\nimport { G9AnchorLayerContext } from '../anchor/context';\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 { sheetSegmentOf, useG9Place } from '../route/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 { G9SheetScrollIndicator, G9SheetScrollModel } from './scroll-indicator';\nimport {\n clampFitHeight,\n currentPlatform,\n g9SheetDragCloseThreshold,\n g9SheetFitLoadingMinHeight,\n g9SheetFitMinHeight,\n g9SheetScrollToEndThreshold,\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\n/** The receded parent sinks and fades over 220 ms (MAUI `StackParentRecedeDurationMs`, CubicOut). */\nconst g9SheetRecedeTransition = (): string => `transform ${g9Ms(220)}ms ease-out, opacity ${g9Ms(220)}ms 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 lynx-ui snap index of where a sheet rests: 0 for a fit sheet, else its detent's place (0 when it is unknown). */\nexport function restingSnapIndex(\n resting: G9SheetDetent | 'fit',\n fit: boolean,\n detents: readonly G9SheetDetent[],\n): number {\n if (fit || resting === 'fit') return 0;\n return Math.max(0, detents.indexOf(resting));\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\n const gesture = useSheetGestureRefs();\n const bodyGesture = useSheetBodyGesture(gesture);\n const o = entry.options;\n // The sheet's place in the navigation: declared from the moment it opens until it starts closing.\n const placeOpen = entry.status === 'opening' || entry.status === 'open';\n useG9Place(\n {\n ...(o.route ?? {}),\n segment: o.route?.segment ?? sheetSegmentOf(o.automationId),\n layer: 'sheet',\n order: entry.id,\n ...(o.route?.title\n ? {}\n : typeof o.title === 'string' && o.title.trim()\n ? { title: () => (typeof o.title === 'string' ? o.title : null) }\n : {}),\n close: () => {\n stack.close(entry.id);\n },\n },\n { active: placeOpen },\n );\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), g9Ms(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 // `scrollIndicator: 'always'` (./scroll-indicator.tsx): the thumb's own store, fed by the body and its content.\n const indicator = useRef<G9SheetScrollModel | null>(null);\n if (o.scrollIndicator === 'always' && o.scrollBody !== false && !indicator.current)\n indicator.current = new G9SheetScrollModel();\n const onBodyLayout = (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n // The scroller's range is the content plus the body's padding on both sides.\n indicator.current?.setContent(h > 0 ? h + 2 * (o.padding ?? 0) : 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 // The host's height changed while the sheet was up — the soft keyboard on a host that pads the page by its inset (AgriPad\n // Android, 2026-11-12): lynx-ui keeps the open offset it computed for the OLD height, so a full-screen sheet opened at\n // 760 and squeezed to 463 stood 297 above the screen's top, its footer mid-screen and a band of page under it. Snap\n // again to where it rests, without motion, so the offset is computed for the new height.\n const lastHostHeight = useRef(props.hostHeight);\n useEffect(() => {\n if (Math.abs(lastHostHeight.current - props.hostHeight) < 1) return;\n lastHostHeight.current = props.hostHeight;\n if (entry.status !== 'open') return;\n rootRef.current?.snapTo(restingSnapIndex(resting, layout.fit, orderedDetents(o)), { animate: false });\n }, [props.hostHeight, entry.status]);\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 anchorLayer = useMemo(() => ({ layer: 'sheet' as const, sheetId: props.entry.id }), [props.entry.id]);\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 // A body that renders a window of a long list grows it when the scroll nears the end (options.onScrollToEnd).\n const endProps = o.onScrollToEnd\n ? { 'lower-threshold': o.scrollToEndThreshold ?? g9SheetScrollToEndThreshold, bindscrolltolower: o.onScrollToEnd }\n : {};\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 // A tap on the dim closes a cancelable sheet only once it has OPENED: a tap while it rises belongs to the\n // burst that opened it — nine taps on a secret target, where a tenth landed on the rising sheet's dim,\n // closed AgriPad's Admin Diagnostics before it was up (a real phone, 2026-11-12).\n if (!layout.closeOnOverlayTap || entry.status !== 'open') return;\n 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 <G9AnchorLayerContext.Provider value={anchorLayer}>\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 ) : indicator.current ? (\n // The thumb's frame: the scroller and the thumb over its inline end (only with scrollIndicator).\n <view className={`g9-sheet__body-frame${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}>\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 scroll-event-throttle={16}\n {...endProps}\n bindscroll={(e: { detail?: { scrollTop?: number } }) =>\n indicator.current?.setTop(e.detail?.scrollTop ?? 0)\n }\n bindlayoutchange={(e: { detail?: { height?: number } }) =>\n indicator.current?.setViewport(e.detail?.height ?? 0)\n }\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n <G9SheetScrollIndicator model={indicator.current} />\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 {...endProps}\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 </G9AnchorLayerContext.Provider>\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","g9Ms","orderedDetents","o","requested","d","restingSnapIndex","resting","fit","detents","Math","initialDetent","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_o_route","_ref1","_o_loadingSkeletonRowCount","_ratios_layout_initialSnap","_props_bottomInset","_o_scrollToEndThreshold","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","_o_cornerRadius","_o_backgroundColor","_ratios_restIndex","_o_padding","_o_padding1","_o_padding2","_o_route1","_o_route2","_props_memo","stack","palette","useG9Theme","gesture","useSheetGestureRefs","bodyGesture","useSheetBodyGesture","placeOpen","useG9Place","sheetSegmentOf","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","startTimer","memoKey","placeholderHeight","undefined","g9SheetFitLoadingMinHeight","bodyHeight","setBodyHeight","footerHeight","setFooterHeight","chromeTopHeight","setChromeTopHeight","onChromeTopLayout","e","_e_detail","onFooterLayout","indicator","G9SheetScrollModel","onBodyLayout","_indicator_current","h","placeholder","view","G9SheetSkeleton","G9ActivityIndicator","body","ratios","p","Number","restingRatio","shown","contentRatio","sheetOverlayOpacity","modal","recede","parentRecedeOffset","setResting","rootRef","lastFitBody","_rootRef_current","fitHeight","lastHostHeight","topPadding","sheetSurfaceTopPadding","bottomPadding","sheetSurfaceBottomPadding","maxBody","g9SheetFitMinHeight","anchorLayer","useMemo","contextValue","platform","currentPlatform","phone","endProps","g9SheetScrollToEndThreshold","openMs","closeMs","corner","surface","notch","g9FieldNotchStyle","resolveThemeColor","restIndex","fitRatio","openRatio","motion","resolveSheetMotion","content","clampFitHeight","SheetRoot","g9SheetDragCloseThreshold","open","index","value","_detents_index","detent","SheetView","SheetContent","platformSheetConstraints","G9SheetGestureFrame","g9IdProps","G9AnchorLayerContext","G9SheetHeader","scroll-view","G9SheetScrollIndicator","G9SheetFooter"],"mappings":";;;;;;;;;;;;;;;;;AAyDA,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;AAGnE,MAAMC,0BAA0B,IAAc,CAAC,UAAU,EAAEC,KAAK,KAAK,qBAAqB,EAAEA,KAAK,KAAK,WAAW,CAAC;AAGlH,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;AAGO,SAASC,iBACdC,OAA8B,EAC9BC,GAAY,EACZC,OAAiC;IAEjC,IAAID,OAAOD,AAAY,UAAZA,SAAmB,OAAO;IACrC,OAAOG,KAAK,GAAG,CAAC,GAAGD,QAAQ,OAAO,CAACF;AACrC;AAGA,SAASI,cAAcR,CAA0B,EAAEK,GAAY;QAG7CI,iBAC8BC;IAH9C,IAAIL,KAAK,OAAO;IAChB,MAAMM,UAAUZ,eAAeC;IAC/B,MAAMY,UAAU,QA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c,GACrD,GAAGiF,QAAQ,EACZ,OAAO;QACL,SAAS,GAAG,QAAA1F,CAAAA,cAAAA,EAAE,OAAO,AAAD,IAARA,cAAa,EAAE,EAAE,CAAC;QAC9B,GAAIkF,AAAY,SAAZA,UAAmB;YAAE,WAAW,GAAGA,QAAQ,EAAE,CAAC;QAAC,IAAI,CAAC,CAAC;IAC3D,GACD;sBACC,CAACsB,QAAQ;oBACX,EAAEgB,aACF;kBACF,CAAC9D,KAAK,UAAU,wBAAwB,kBAAkBP,gBAAgB;oBACxE,CAACuE,cAAc,SAAStJ,IAAK;kBAC/B,EAAEsF,KAAK;gBACT,EAAE4D,qBAAqB,SAAS;cAClC,EAAEnK,aAAa,SAAS;YAC1B,EAAEuG,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiBqC;IAAQ,IAAK;UAC3E,EAAEqB,oBAAoB;QACxB,EAAEF,aAAa;MACjB,EAAED,UAAU;IACd,EAAEP;AAEN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/lynxcontrols",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "ReactLynx controls and overlay infrastructure: provider/host, sheets, popups, toasts, fields, buttons, pickers, tab view, tab bar, edge panel, swipe rows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -152,7 +152,7 @@
152
152
  "build": "rslib build"
153
153
  },
154
154
  "dependencies": {
155
- "@g9tm/lynxcontrols-foundation": "1.6.0",
155
+ "@g9tm/lynxcontrols-foundation": "1.6.1",
156
156
  "@lynx-js/lynx-ui-common": "3.139.0",
157
157
  "@lynx-js/lynx-ui-deferred-component": "3.139.0",
158
158
  "@lynx-js/lynx-ui-draggable": "3.139.0",