@g9tm/lynxcontrols 1.4.5 → 1.4.11
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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/base/index.d.ts +1 -1
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.jsx +1 -1
- package/dist/base/pressable.d.ts.map +1 -1
- package/dist/base/pressable.jsx +2 -1
- package/dist/base/pressable.jsx.map +1 -1
- package/dist/base/selection-item.d.ts +9 -1
- package/dist/base/selection-item.d.ts.map +1 -1
- package/dist/base/selection-item.jsx +10 -1
- package/dist/base/selection-item.jsx.map +1 -1
- package/dist/button/button.css +20 -0
- package/dist/button/button.css.map +1 -1
- package/dist/button/header-action-button.d.ts +5 -0
- package/dist/button/header-action-button.d.ts.map +1 -1
- package/dist/button/header-action-button.jsx +6 -1
- package/dist/button/header-action-button.jsx.map +1 -1
- package/dist/button/visuals.d.ts.map +1 -1
- package/dist/button/visuals.jsx +1 -1
- package/dist/button/visuals.jsx.map +1 -1
- package/dist/cascade/cascade-panel.d.ts.map +1 -1
- package/dist/cascade/cascade-panel.jsx +2 -2
- package/dist/cascade/cascade-panel.jsx.map +1 -1
- package/dist/edge-panel/edge-panel.jsx +5 -5
- package/dist/edge-panel/edge-panel.jsx.map +1 -1
- package/dist/expander/expander.d.ts.map +1 -1
- package/dist/expander/expander.jsx +2 -1
- package/dist/expander/expander.jsx.map +1 -1
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +2 -2
- package/dist/fields/editor.jsx.map +1 -1
- package/dist/fields/fields.css +21 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/index.d.ts +1 -1
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.jsx +1 -1
- package/dist/fields/outlined-field.d.ts +27 -1
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +29 -2
- package/dist/fields/outlined-field.jsx.map +1 -1
- package/dist/fields/text-entry.d.ts.map +1 -1
- package/dist/fields/text-entry.jsx +2 -2
- package/dist/fields/text-entry.jsx.map +1 -1
- package/dist/host/host.css.map +1 -1
- package/dist/host/host.d.ts +3 -2
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +2 -2
- package/dist/host/host.jsx.map +1 -1
- package/dist/pickers/combo-box.d.ts +8 -0
- package/dist/pickers/combo-box.d.ts.map +1 -1
- package/dist/pickers/combo-box.jsx +51 -9
- package/dist/pickers/combo-box.jsx.map +1 -1
- package/dist/pickers/date-time-picker.d.ts +2 -2
- package/dist/pickers/date-time-picker.d.ts.map +1 -1
- package/dist/pickers/date-time-picker.jsx +4 -3
- package/dist/pickers/date-time-picker.jsx.map +1 -1
- package/dist/pickers/date-time.d.ts +5 -2
- package/dist/pickers/date-time.d.ts.map +1 -1
- package/dist/pickers/date-time.jsx +1 -1
- package/dist/pickers/date-time.jsx.map +1 -1
- package/dist/pickers/picker-sheet.d.ts +6 -2
- package/dist/pickers/picker-sheet.d.ts.map +1 -1
- package/dist/pickers/picker-sheet.jsx +2 -3
- package/dist/pickers/picker-sheet.jsx.map +1 -1
- package/dist/pickers/picker.d.ts.map +1 -1
- package/dist/pickers/picker.jsx +3 -2
- package/dist/pickers/picker.jsx.map +1 -1
- package/dist/pickers/pickers.css +27 -0
- package/dist/pickers/pickers.css.map +1 -1
- package/dist/pickers/timespan-picker.d.ts.map +1 -1
- package/dist/pickers/timespan-picker.jsx +3 -2
- package/dist/pickers/timespan-picker.jsx.map +1 -1
- package/dist/pickers/trigger.d.ts +3 -1
- package/dist/pickers/trigger.d.ts.map +1 -1
- package/dist/pickers/trigger.jsx +6 -1
- package/dist/pickers/trigger.jsx.map +1 -1
- package/dist/plus-button/model.d.ts.map +1 -1
- package/dist/plus-button/model.jsx +5 -1
- package/dist/plus-button/model.jsx.map +1 -1
- package/dist/popup/frame.jsx +2 -2
- package/dist/popup/frame.jsx.map +1 -1
- package/dist/popup/service.d.ts.map +1 -1
- package/dist/popup/service.jsx +2 -2
- package/dist/popup/service.jsx.map +1 -1
- package/dist/provider/provider.css +4 -0
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +4 -2
- package/dist/provider/provider.jsx.map +1 -1
- package/dist/provider/settings.d.ts +12 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +6 -3
- package/dist/provider/settings.jsx.map +1 -1
- package/dist/provider/theme.css +4 -0
- package/dist/provider/theme.css.map +1 -1
- package/dist/range-slider/math.d.ts +14 -4
- package/dist/range-slider/math.d.ts.map +1 -1
- package/dist/range-slider/math.jsx +16 -4
- package/dist/range-slider/math.jsx.map +1 -1
- package/dist/range-slider/range-slider.css +17 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.d.ts +11 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -1
- package/dist/range-slider/range-slider.jsx +35 -13
- package/dist/range-slider/range-slider.jsx.map +1 -1
- package/dist/selection/index.d.ts +2 -1
- package/dist/selection/index.d.ts.map +1 -1
- package/dist/selection/index.jsx +2 -1
- package/dist/selection/selection-sheet.d.ts +8 -1
- package/dist/selection/selection-sheet.d.ts.map +1 -1
- package/dist/selection/selection-sheet.jsx +64 -11
- package/dist/selection/selection-sheet.jsx.map +1 -1
- package/dist/selection/selection.css +7 -0
- package/dist/selection/selection.css.map +1 -1
- package/dist/selection/window.d.ts +29 -0
- package/dist/selection/window.d.ts.map +1 -0
- package/dist/selection/window.jsx +24 -0
- package/dist/selection/window.jsx.map +1 -0
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +35 -9
- package/dist/sheet/frame.jsx.map +1 -1
- package/dist/sheet/header.d.ts.map +1 -1
- package/dist/sheet/header.jsx +3 -1
- package/dist/sheet/header.jsx.map +1 -1
- package/dist/sheet/index.d.ts +2 -1
- package/dist/sheet/index.d.ts.map +1 -1
- package/dist/sheet/index.jsx +2 -1
- package/dist/sheet/motion.d.ts.map +1 -1
- package/dist/sheet/motion.jsx +14 -0
- package/dist/sheet/motion.jsx.map +1 -1
- package/dist/sheet/options.d.ts +26 -0
- package/dist/sheet/options.d.ts.map +1 -1
- package/dist/sheet/options.jsx +2 -1
- package/dist/sheet/options.jsx.map +1 -1
- package/dist/sheet/scroll-indicator.d.ts +33 -0
- package/dist/sheet/scroll-indicator.d.ts.map +1 -0
- package/dist/sheet/scroll-indicator.jsx +84 -0
- package/dist/sheet/scroll-indicator.jsx.map +1 -0
- package/dist/sheet/service.d.ts +8 -0
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +15 -4
- package/dist/sheet/service.jsx.map +1 -1
- package/dist/sheet/sheet.css +14 -0
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/sheet/sizing.d.ts +2 -0
- package/dist/sheet/sizing.d.ts.map +1 -1
- package/dist/sheet/sizing.jsx +2 -1
- package/dist/sheet/sizing.jsx.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +11 -6
- package/dist/tab-bar/tab-bar.jsx.map +1 -1
- package/dist/toast/service.jsx +3 -3
- package/dist/toast/service.jsx.map +1 -1
- package/dist/toast/store.d.ts.map +1 -1
- package/dist/toast/store.jsx +3 -2
- package/dist/toast/store.jsx.map +1 -1
- package/dist/toggle/chip-group.d.ts +9 -1
- package/dist/toggle/chip-group.d.ts.map +1 -1
- package/dist/toggle/chip-group.jsx +51 -12
- package/dist/toggle/chip-group.jsx.map +1 -1
- package/dist/toggle/switch.d.ts +1 -1
- package/dist/toggle/switch.d.ts.map +1 -1
- package/dist/toggle/switch.jsx +3 -2
- package/dist/toggle/switch.jsx.map +1 -1
- package/dist/toggle/toggle.css +20 -0
- package/dist/toggle/toggle.css.map +1 -1
- package/package.json +3 -3
package/dist/sheet/frame.jsx.map
CHANGED
|
@@ -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 } 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,SAA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,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"}
|
|
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, 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 { 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 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), 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 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 // 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 <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 </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","initialDetent","fit","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_ref","_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","_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","indicator","G9SheetScrollModel","onBodyLayout","_indicator_current","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","endProps","g9SheetScrollToEndThreshold","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","G9SheetScrollIndicator","G9SheetFooter"],"mappings":";;;;;;;;;;;;;;;AAuDA,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,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;AAGA,SAASC,cAAcH,CAA0B,EAAEI,GAAY;QAG7CC,iBAC8BC;IAH9C,IAAIF,KAAK,OAAO;IAChB,MAAMG,UAAUR,eAAeC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AW,GAAGA,QAAQ,EAAE,CAAC;QAAC,IAAI,CAAC,CAAC;IAC3D,GACD;oBACC,CAACqB,QAAQ;kBACX,EAAEe,aACF;gBACF,CAAC5D,KAAK,UAAU,wBAAwB,kBAAkBP,gBAAgB;kBACxE,CAACqE,cAAc,SAAS3I,IAAK;gBAC/B,EAAE6E,KAAK;cACT,EAAE9F,aAAa,SAAS;YAC1B,EAAE8F,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiBmC;IAAQ,IAAK;UAC3E,EAAEsB,oBAAoB;QACxB,EAAEF,aAAa;MACjB,EAAED,UAAU;IACd,EAAEP;AAEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/sheet/header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAM1D,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,WAAW,CAAC;AAEpE,mEAAmE;AACnE,eAAO,MAAM,oBAAoB;;;;;;;;;EAS/B,CAAC;
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/sheet/header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAM1D,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,WAAW,CAAC;AAEpE,mEAAmE;AACnE,eAAO,MAAM,oBAAoB;;;;;;;;;EAS/B,CAAC;AAmCH,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAgIlE;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED,mGAAmG;AACnG,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAK9E;AAED,mJAAmJ;AACnJ,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAUlE;AAED,yCAAyC;AACzC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3C,iBAAiB;IACjB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAkBxE"}
|
package/dist/sheet/header.jsx
CHANGED
|
@@ -33,7 +33,9 @@ function ToolbarItemButton(props) {
|
|
|
33
33
|
icon: item.icon
|
|
34
34
|
} : item.text ? {
|
|
35
35
|
buttonText: item.text
|
|
36
|
-
} : {}} isBusy={busy && true === item.showBusyIndicator} isActive={true === item.isActive} showActiveBadge={true === item.showActiveBadge
|
|
36
|
+
} : {}} isBusy={busy && true === item.showBusyIndicator} isActive={true === item.isActive} showActiveBadge={true === item.showActiveBadge && !item.badgeText} {...item.badgeText ? {
|
|
37
|
+
badgeText: item.badgeText
|
|
38
|
+
} : {}} animatePress={false !== item.animatePress} {...item.iconSize ? {
|
|
37
39
|
iconSize: item.iconSize
|
|
38
40
|
} : {}} {...item.accessibilityLabel || item.text ? {
|
|
39
41
|
accessibilityLabel: null != (_item_accessibilityLabel = item.accessibilityLabel) ? _item_accessibilityLabel : item.text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet/header.jsx","sources":["../../src/sheet/header.tsx"],"sourcesContent":["import { formatColor, G9StringKey, withAlpha } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useState } from '@lynx-js/react';\nimport { g9ChildId, g9IdProps, g9RowStyle, g9SafeId } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { G9HeaderActionButton } from '../button/header-action-button';\nimport { G9IconSlot } from '../icon/slot';\nimport { useG9Direction, useG9Settings, useG9Strings, useG9Theme } from '../provider/hooks';\nimport type { G9SheetOptions, G9SheetToolbarItem } from './options';\n\n/** Header metrics (MAUI `G9LayoutMetrics` sheet header values). */\nexport const g9SheetHeaderMetrics = Object.freeze({\n minHeight: 64,\n verticalGap: 10,\n bodyTopGap: 10,\n backButton: 30,\n backGlyph: 24,\n backHitSlop: 7,\n titleSize: 16.2,\n footerMaxButtonsPerRow: 3,\n});\n\nfunction ToolbarItemButton(props: { readonly item: G9SheetToolbarItem; readonly id: string | undefined }): ReactNode {\n const { item } = props;\n const [running, setRunning] = useState(false);\n const busy = item.isBusy === true || running;\n const onPress = () => {\n if (busy && item.disableWhileBusy !== false) return;\n const result = item.onPress?.();\n if (result && typeof (result as PromiseLike<unknown>).then === 'function') {\n setRunning(true);\n (result as PromiseLike<unknown>).then(\n () => setRunning(false),\n () => setRunning(false),\n );\n }\n };\n return (\n <G9HeaderActionButton\n // MAUI ApplyVisualState: an icon wins and the text is not shown (it stays the accessibility label).\n {...(item.icon !== undefined ? { icon: item.icon } : item.text ? { buttonText: item.text } : {})}\n isBusy={busy && item.showBusyIndicator === true}\n isActive={item.isActive === true}\n showActiveBadge={item.showActiveBadge === true}\n animatePress={item.animatePress !== false}\n {...(item.iconSize ? { iconSize: item.iconSize } : {})}\n {...(item.accessibilityLabel || item.text ? { accessibilityLabel: item.accessibilityLabel ?? item.text } : {})}\n {...g9IdProps(props.id)}\n disabled={busy && item.disableWhileBusy !== false && item.showBusyIndicator !== true}\n onPress={onPress}\n />\n );\n}\n\n/** Props of {@link G9SheetHeader}. */\nexport interface G9SheetHeaderProps {\n readonly options: G9SheetOptions;\n /** The leading button (MAUI back request with source `toolbarButton`). */\n readonly onBack: () => void;\n}\n\n/**\n * The three-slot sheet header (MAUI header template): leading back/close button (RTL-aware arrow, or × with\n * `useCloseIcon`), the title (centre or near the back button), the trailing toolbar items; slot overrides\n * `headerView` > `headerLeadingAndTitleView` > `headerTitleAndTrailingView` > per-slot views > defaults. A hairline\n * closes the band. Rendered only with `showToolbar`.\n */\nexport function G9SheetHeader(props: G9SheetHeaderProps): ReactNode {\n const o = props.options;\n const direction = useG9Direction();\n const settings = useG9Settings();\n const glyphs = settings.glyphs;\n const palette = useG9Theme().palette;\n const strings = useG9Strings();\n const back = useG9Press(props.onBack, { source: 'G9SheetHeader' });\n if (o.showToolbar !== true) return null;\n if (o.headerView !== undefined && o.headerView !== null) {\n return <view className=\"g9-sheet-header g9-sheet-header--custom\">{o.headerView}</view>;\n }\n const m = g9SheetHeaderMetrics;\n const leading =\n o.headerLeadingView ??\n (o.showCloseButton ? (\n <view\n className=\"g9-sheet-header__back\"\n {...g9IdProps(g9ChildId(o.automationId, 'Back'))}\n // MAUI: the glyph sits at the reading START of its 30 dp box (HorizontalOptions.Start), not centred.\n style={{ width: `${m.backButton}px`, height: `${m.backButton}px`, ...g9RowStyle(direction) }}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={o.useCloseIcon ? strings.get(G9StringKey.Close) : strings.get(G9StringKey.Back)}\n hit-slop={{\n top: `${m.backHitSlop}px`,\n left: `${m.backHitSlop}px`,\n right: `${m.backHitSlop}px`,\n bottom: `${m.backHitSlop}px`,\n }}\n bindtap={back}\n >\n <G9IconSlot\n icon={o.useCloseIcon ? glyphs.clear : direction === 'rtl' ? glyphs.arrowForward : glyphs.arrowBack}\n size={m.backGlyph}\n color=\"var(--g9-secondary)\"\n />\n </view>\n ) : null);\n const title =\n o.headerTitleView ??\n (o.title ? (\n <text className=\"g9-sheet-header__title\" text-maxline=\"1\" style={{ fontSize: `${m.titleSize}px` }}>\n {o.title}\n </text>\n ) : null);\n const items = o.toolbarItems ?? o.toolbarItemsFactory?.() ?? [];\n const trailing =\n o.headerTrailingView ??\n (items.length > 0 ? (\n <view className=\"g9-sheet-header__items\" style={g9RowStyle(direction)}>\n {items.map((item, i) => (\n <ToolbarItemButton\n key={item.key ?? String(i)}\n item={item}\n id={\n item.automationId\n ? g9SafeId(item.automationId)\n : g9ChildId(o.automationId, `ToolbarItem_${item.key ?? i}`)\n }\n />\n ))}\n </view>\n ) : null);\n const spanned = o.headerLeadingAndTitleView != null || o.headerTitleAndTrailingView != null;\n const center = (o.headerTitlePlacement ?? 'center') === 'center' && o.reserveEmptyHeaderSlots !== false && !spanned;\n let slots: ReactNode;\n if (o.headerLeadingAndTitleView != null) {\n slots = [\n <view key=\"lt\" className=\"g9-sheet-header__grow\" style={g9RowStyle(direction)}>\n {o.headerLeadingAndTitleView}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n } else if (o.headerTitleAndTrailingView != null) {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n <view key=\"tt\" className=\"g9-sheet-header__grow\" style={g9RowStyle(direction)}>\n {o.headerTitleAndTrailingView}\n </view>,\n ];\n } else if (center) {\n slots = [\n // The side slots follow the reading direction too: in RTL the back button sits at the right EDGE, the trailing\n // items at the left edge (MAUI) — not against the centred title.\n <view key=\"l\" className=\"g9-sheet-header__side g9-sheet-header__start\" style={g9RowStyle(direction)}>\n {leading}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__title-slot\">\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__side g9-sheet-header__end\" style={g9RowStyle(direction)}>\n {trailing}\n </view>,\n ];\n } else {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n // The grow slot follows the reading direction: in RTL a near-back title hugs the back button (right edge).\n <view key=\"t\" className=\"g9-sheet-header__grow g9-sheet-header__title-near\" style={g9RowStyle(direction)}>\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n }\n return (\n <view\n className={`g9-sheet-header g9-dir-${direction}`}\n style={{\n // The 64 dp band, then MAUI's 1 dp divider UNDER it (OutlineVariant @ 35 %), not inside it.\n minHeight: `${m.minHeight + 1}px`,\n paddingLeft: `${settings.sheets.headerEdgeSpacing}px`,\n paddingRight: `${settings.sheets.headerEdgeSpacing}px`,\n borderBottomColor: formatColor(withAlpha(palette.OutlineVariant, 0.35)),\n ...g9RowStyle(direction),\n }}\n >\n {slots}\n </view>\n );\n}\n\n/** Props of {@link G9SheetFooter}. */\nexport interface G9SheetFooterProps {\n readonly options: G9SheetOptions;\n}\n\n/** Rows of footer buttons: equal-width columns, wrapping every `perRow` (MAUI footer template). */\nexport function footerRows<T>(buttons: ReadonlyArray<T>, perRow: number): T[][] {\n const n = Math.max(1, Math.floor(perRow));\n const rows: T[][] = [];\n for (let i = 0; i < buttons.length; i += n) rows.push(buttons.slice(i, i + n));\n return rows;\n}\n\n/** The sheet footer: `footerBand`, else `footerView` in the band, else `footerButtons` in equal columns (3 per row by default), with a divider. */\nexport function G9SheetFooter(props: G9SheetFooterProps): ReactNode {\n const o = props.options;\n if (o.footerBand != null) return o.footerBand;\n if (o.footerView != null) return <view className=\"g9-sheet-footer\">{o.footerView}</view>;\n return (\n <G9SheetFooterBar\n buttons={o.footerButtons ?? []}\n {...(o.footerMaxButtonsPerRow !== undefined ? { maxButtonsPerRow: o.footerMaxButtonsPerRow } : {})}\n />\n );\n}\n\n/** Props of {@link G9SheetFooterBar}. */\nexport interface G9SheetFooterBarProps {\n readonly buttons: ReadonlyArray<ReactNode>;\n /** Default 3. */\n readonly maxButtonsPerRow?: number;\n}\n\n/**\n * The footer band (divider, padding, equal-width button columns); nothing at all without buttons (MAUI\n * `SheetFooterBar` hides with no visible button). Render it from a `footerBand` whose buttons come and go.\n */\nexport function G9SheetFooterBar(props: G9SheetFooterBarProps): ReactNode {\n const direction = useG9Direction();\n if (props.buttons.length === 0) return null;\n return (\n <view className=\"g9-sheet-footer\">\n {footerRows(props.buttons, props.maxButtonsPerRow ?? g9SheetHeaderMetrics.footerMaxButtonsPerRow).map(\n (row, r) => (\n <view key={r} className=\"g9-sheet-footer__row\" style={g9RowStyle(direction)}>\n {row.map((button, i) => (\n <view key={i} className=\"g9-sheet-footer__cell\">\n {button}\n </view>\n ))}\n </view>\n ),\n )}\n </view>\n );\n}\n"],"names":["g9SheetHeaderMetrics","Object","ToolbarItemButton","props","_item_accessibilityLabel","item","running","setRunning","useState","busy","onPress","result","G9HeaderActionButton","undefined","g9IdProps","G9SheetHeader","_o_headerLeadingView","_o_headerTitleView","_ref","_o_headerTrailingView","_o_headerTitlePlacement","o","direction","useG9Direction","settings","useG9Settings","glyphs","palette","useG9Theme","strings","useG9Strings","back","useG9Press","view","m","leading","g9ChildId","g9RowStyle","G9StringKey","G9IconSlot","title","text","items","trailing","i","_item_key","_item_key1","String","g9SafeId","spanned","center","slots","formatColor","withAlpha","footerRows","buttons","perRow","n","Math","rows","G9SheetFooter","_o_footerButtons","G9SheetFooterBar","_props_maxButtonsPerRow","row","r","button"],"mappings":";;;;;;;AAUO,MAAMA,uBAAuBC,OAAO,MAAM,CAAC;IAChD,WAAW;IACX,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,aAAa;IACb,WAAW;IACX,wBAAwB;AAC1B;AAEA,SAASC,kBAAkBC,KAA6E;QAwBhCC;IAvBtE,MAAM,EAAEC,IAAI,EAAE,GAAGF;IACjB,MAAM,CAACG,SAASC,WAAW,GAAGC,SAAS;IACvC,MAAMC,OAAOJ,AAAgB,SAAhBA,KAAK,MAAM,IAAaC;IACrC,MAAMI,UAAU;YAECL;QADf,IAAII,QAAQJ,AAA0B,UAA1BA,KAAK,gBAAgB,EAAY;QAC7C,MAAMM,SAAS,QAAAN,CAAAA,gBAAAA,KAAK,OAAO,AAAD,IAAXA,KAAAA,IAAAA,cAAAA,IAAAA,CAAAA;QACf,IAAIM,UAAU,AAAiD,cAAjD,OAAQA,OAAg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lynxcontrols-foundation';\nimport { type ReactNode, useState } from '@lynx-js/react';\nimport { g9ChildId, g9IdProps, g9RowStyle, g9SafeId } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { G9HeaderActionButton } from '../button/header-action-button';\nimport { G9IconSlot } from '../icon/slot';\nimport { useG9Direction, useG9Settings, useG9Strings, useG9Theme } from '../provider/hooks';\nimport type { G9SheetOptions, G9SheetToolbarItem } from './options';\n\n/** Header metrics (MAUI `G9LayoutMetrics` sheet header values). */\nexport const g9SheetHeaderMetrics = Object.freeze({\n minHeight: 64,\n verticalGap: 10,\n bodyTopGap: 10,\n backButton: 30,\n backGlyph: 24,\n backHitSlop: 7,\n titleSize: 16.2,\n footerMaxButtonsPerRow: 3,\n});\n\nfunction ToolbarItemButton(props: { readonly item: G9SheetToolbarItem; readonly id: string | undefined }): ReactNode {\n const { item } = props;\n const [running, setRunning] = useState(false);\n const busy = item.isBusy === true || running;\n const onPress = () => {\n if (busy && item.disableWhileBusy !== false) return;\n const result = item.onPress?.();\n if (result && typeof (result as PromiseLike<unknown>).then === 'function') {\n setRunning(true);\n (result as PromiseLike<unknown>).then(\n () => setRunning(false),\n () => setRunning(false),\n );\n }\n };\n return (\n <G9HeaderActionButton\n // MAUI ApplyVisualState: an icon wins and the text is not shown (it stays the accessibility label).\n {...(item.icon !== undefined ? { icon: item.icon } : item.text ? { buttonText: item.text } : {})}\n isBusy={busy && item.showBusyIndicator === true}\n isActive={item.isActive === true}\n showActiveBadge={item.showActiveBadge === true && !item.badgeText}\n {...(item.badgeText ? { badgeText: item.badgeText } : {})}\n animatePress={item.animatePress !== false}\n {...(item.iconSize ? { iconSize: item.iconSize } : {})}\n {...(item.accessibilityLabel || item.text ? { accessibilityLabel: item.accessibilityLabel ?? item.text } : {})}\n {...g9IdProps(props.id)}\n disabled={busy && item.disableWhileBusy !== false && item.showBusyIndicator !== true}\n onPress={onPress}\n />\n );\n}\n\n/** Props of {@link G9SheetHeader}. */\nexport interface G9SheetHeaderProps {\n readonly options: G9SheetOptions;\n /** The leading button (MAUI back request with source `toolbarButton`). */\n readonly onBack: () => void;\n}\n\n/**\n * The three-slot sheet header (MAUI header template): leading back/close button (RTL-aware arrow, or × with\n * `useCloseIcon`), the title (centre or near the back button), the trailing toolbar items; slot overrides\n * `headerView` > `headerLeadingAndTitleView` > `headerTitleAndTrailingView` > per-slot views > defaults. A hairline\n * closes the band. Rendered only with `showToolbar`.\n */\nexport function G9SheetHeader(props: G9SheetHeaderProps): ReactNode {\n const o = props.options;\n const direction = useG9Direction();\n const settings = useG9Settings();\n const glyphs = settings.glyphs;\n const palette = useG9Theme().palette;\n const strings = useG9Strings();\n const back = useG9Press(props.onBack, { source: 'G9SheetHeader' });\n if (o.showToolbar !== true) return null;\n if (o.headerView !== undefined && o.headerView !== null) {\n return <view className=\"g9-sheet-header g9-sheet-header--custom\">{o.headerView}</view>;\n }\n const m = g9SheetHeaderMetrics;\n const leading =\n o.headerLeadingView ??\n (o.showCloseButton ? (\n <view\n className=\"g9-sheet-header__back\"\n {...g9IdProps(g9ChildId(o.automationId, 'Back'))}\n // MAUI: the glyph sits at the reading START of its 30 dp box (HorizontalOptions.Start), not centred.\n style={{ width: `${m.backButton}px`, height: `${m.backButton}px`, ...g9RowStyle(direction) }}\n accessibility-element={true}\n accessibility-traits=\"button\"\n accessibility-label={o.useCloseIcon ? strings.get(G9StringKey.Close) : strings.get(G9StringKey.Back)}\n hit-slop={{\n top: `${m.backHitSlop}px`,\n left: `${m.backHitSlop}px`,\n right: `${m.backHitSlop}px`,\n bottom: `${m.backHitSlop}px`,\n }}\n bindtap={back}\n >\n <G9IconSlot\n icon={o.useCloseIcon ? glyphs.clear : direction === 'rtl' ? glyphs.arrowForward : glyphs.arrowBack}\n size={m.backGlyph}\n color=\"var(--g9-secondary)\"\n />\n </view>\n ) : null);\n const title =\n o.headerTitleView ??\n (o.title ? (\n <text className=\"g9-sheet-header__title\" text-maxline=\"1\" style={{ fontSize: `${m.titleSize}px` }}>\n {o.title}\n </text>\n ) : null);\n const items = o.toolbarItems ?? o.toolbarItemsFactory?.() ?? [];\n const trailing =\n o.headerTrailingView ??\n (items.length > 0 ? (\n <view className=\"g9-sheet-header__items\" style={g9RowStyle(direction)}>\n {items.map((item, i) => (\n <ToolbarItemButton\n key={item.key ?? String(i)}\n item={item}\n id={\n item.automationId\n ? g9SafeId(item.automationId)\n : g9ChildId(o.automationId, `ToolbarItem_${item.key ?? i}`)\n }\n />\n ))}\n </view>\n ) : null);\n const spanned = o.headerLeadingAndTitleView != null || o.headerTitleAndTrailingView != null;\n const center = (o.headerTitlePlacement ?? 'center') === 'center' && o.reserveEmptyHeaderSlots !== false && !spanned;\n let slots: ReactNode;\n if (o.headerLeadingAndTitleView != null) {\n slots = [\n <view key=\"lt\" className=\"g9-sheet-header__grow\" style={g9RowStyle(direction)}>\n {o.headerLeadingAndTitleView}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n } else if (o.headerTitleAndTrailingView != null) {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n <view key=\"tt\" className=\"g9-sheet-header__grow\" style={g9RowStyle(direction)}>\n {o.headerTitleAndTrailingView}\n </view>,\n ];\n } else if (center) {\n slots = [\n // The side slots follow the reading direction too: in RTL the back button sits at the right EDGE, the trailing\n // items at the left edge (MAUI) — not against the centred title.\n <view key=\"l\" className=\"g9-sheet-header__side g9-sheet-header__start\" style={g9RowStyle(direction)}>\n {leading}\n </view>,\n <view key=\"t\" className=\"g9-sheet-header__title-slot\">\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__side g9-sheet-header__end\" style={g9RowStyle(direction)}>\n {trailing}\n </view>,\n ];\n } else {\n slots = [\n <view key=\"l\" className=\"g9-sheet-header__start\">\n {leading}\n </view>,\n // The grow slot follows the reading direction: in RTL a near-back title hugs the back button (right edge).\n <view key=\"t\" className=\"g9-sheet-header__grow g9-sheet-header__title-near\" style={g9RowStyle(direction)}>\n {title}\n </view>,\n <view key=\"r\" className=\"g9-sheet-header__end\">\n {trailing}\n </view>,\n ];\n }\n return (\n <view\n className={`g9-sheet-header g9-dir-${direction}`}\n style={{\n // The 64 dp band, then MAUI's 1 dp divider UNDER it (OutlineVariant @ 35 %), not inside it.\n minHeight: `${m.minHeight + 1}px`,\n paddingLeft: `${settings.sheets.headerEdgeSpacing}px`,\n paddingRight: `${settings.sheets.headerEdgeSpacing}px`,\n borderBottomColor: formatColor(withAlpha(palette.OutlineVariant, 0.35)),\n ...g9RowStyle(direction),\n }}\n >\n {slots}\n </view>\n );\n}\n\n/** Props of {@link G9SheetFooter}. */\nexport interface G9SheetFooterProps {\n readonly options: G9SheetOptions;\n}\n\n/** Rows of footer buttons: equal-width columns, wrapping every `perRow` (MAUI footer template). */\nexport function footerRows<T>(buttons: ReadonlyArray<T>, perRow: number): T[][] {\n const n = Math.max(1, Math.floor(perRow));\n const rows: T[][] = [];\n for (let i = 0; i < buttons.length; i += n) rows.push(buttons.slice(i, i + n));\n return rows;\n}\n\n/** The sheet footer: `footerBand`, else `footerView` in the band, else `footerButtons` in equal columns (3 per row by default), with a divider. */\nexport function G9SheetFooter(props: G9SheetFooterProps): ReactNode {\n const o = props.options;\n if (o.footerBand != null) return o.footerBand;\n if (o.footerView != null) return <view className=\"g9-sheet-footer\">{o.footerView}</view>;\n return (\n <G9SheetFooterBar\n buttons={o.footerButtons ?? []}\n {...(o.footerMaxButtonsPerRow !== undefined ? { maxButtonsPerRow: o.footerMaxButtonsPerRow } : {})}\n />\n );\n}\n\n/** Props of {@link G9SheetFooterBar}. */\nexport interface G9SheetFooterBarProps {\n readonly buttons: ReadonlyArray<ReactNode>;\n /** Default 3. */\n readonly maxButtonsPerRow?: number;\n}\n\n/**\n * The footer band (divider, padding, equal-width button columns); nothing at all without buttons (MAUI\n * `SheetFooterBar` hides with no visible button). Render it from a `footerBand` whose buttons come and go.\n */\nexport function G9SheetFooterBar(props: G9SheetFooterBarProps): ReactNode {\n const direction = useG9Direction();\n if (props.buttons.length === 0) return null;\n return (\n <view className=\"g9-sheet-footer\">\n {footerRows(props.buttons, props.maxButtonsPerRow ?? g9SheetHeaderMetrics.footerMaxButtonsPerRow).map(\n (row, r) => (\n <view key={r} className=\"g9-sheet-footer__row\" style={g9RowStyle(direction)}>\n {row.map((button, i) => (\n <view key={i} className=\"g9-sheet-footer__cell\">\n {button}\n </view>\n ))}\n </view>\n ),\n )}\n </view>\n );\n}\n"],"names":["g9SheetHeaderMetrics","Object","ToolbarItemButton","props","_item_accessibilityLabel","item","running","setRunning","useState","busy","onPress","result","G9HeaderActionButton","undefined","g9IdProps","G9SheetHeader","_o_headerLeadingView","_o_headerTitleView","_ref","_o_headerTrailingView","_o_headerTitlePlacement","o","direction","useG9Direction","settings","useG9Settings","glyphs","palette","useG9Theme","strings","useG9Strings","back","useG9Press","view","m","leading","g9ChildId","g9RowStyle","G9StringKey","G9IconSlot","title","text","items","trailing","i","_item_key","_item_key1","String","g9SafeId","spanned","center","slots","formatColor","withAlpha","footerRows","buttons","perRow","n","Math","rows","G9SheetFooter","_o_footerButtons","G9SheetFooterBar","_props_maxButtonsPerRow","row","r","button"],"mappings":";;;;;;;AAUO,MAAMA,uBAAuBC,OAAO,MAAM,CAAC;IAChD,WAAW;IACX,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,aAAa;IACb,WAAW;IACX,wBAAwB;AAC1B;AAEA,SAASC,kBAAkBC,KAA6E;QAyBhCC;IAxBtE,MAAM,EAAEC,IAAI,EAAE,GAAGF;IACjB,MAAM,CAACG,SAASC,WAAW,GAAGC,SAAS;IACvC,MAAMC,OAAOJ,AAAgB,SAAhBA,KAAK,MAAM,IAAaC;IACrC,MAAMI,UAAU;YAECL;QADf,IAAII,QAAQJ,AAA0B,UAA1BA,KAAK,gBAAgB,EAAY;QAC7C,MAAMM,SAAS,QAAAN,CAAAA,gBAAAA,KAAK,OAAO,AAAD,IAAXA,KAAAA,IAAAA,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B,OAAO;cACV,EAAEjC,OACD;UACL,EAAEA,OAEJ;IACJ,EAAEA;AAEN"}
|
package/dist/sheet/index.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ export { G9LoadableSheetContent, type G9LoadableSheetContentProps } from './load
|
|
|
5
5
|
export { easeOutCubic, easeOutCubicMT, type G9SheetMotion, type G9SheetMotionInput, type G9SheetTransition, g9CupertinoOmega, g9MaterialBaseSettleMs, g9MaterialMaxSettleMs, materialSettle, materialSettleDurationMs, materialSettleMT, resolveSheetMotion, } from './motion.js';
|
|
6
6
|
export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, type G9SheetBackAction, type G9SheetBackSource, type G9SheetContentWidthMode, type G9SheetDetent, type G9SheetHeaderTitlePlacement, type G9SheetLifecycle, type G9SheetOptions, type G9SheetSettings, type G9SheetSizeMode, type G9SheetToolbarItem, resolveSheetSettings, } from './options.js';
|
|
7
7
|
export { type G9ProcessingBuild, type G9ProcessingErrorHandler, G9ProcessingSheetContent, type G9ProcessingSheetContentProps, } from './processing.js';
|
|
8
|
+
export { G9SheetScrollIndicator, G9SheetScrollModel, SHEET_THUMB_MIN, sheetThumb } from './scroll-indicator.js';
|
|
8
9
|
export { type G9SheetService, g9Sheets, sheetServiceOf, useG9Sheets } from './service.js';
|
|
9
10
|
export { G9Sheet, type G9SheetProps } from './sheet.js';
|
|
10
|
-
export { backdropCardTransform, clampFitHeight, currentPlatform, type G9SheetLayout, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetSurfaceBottomPadding, sheetSurfaceTopPadding, sheetTopPadding, } from './sizing.js';
|
|
11
|
+
export { backdropCardTransform, clampFitHeight, currentPlatform, type G9SheetLayout, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetScrollToEndThreshold, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetSurfaceBottomPadding, sheetSurfaceTopPadding, sheetTopPadding, } from './sizing.js';
|
|
11
12
|
export { type G9SheetCloseReason, type G9SheetContent, type G9SheetEntry, type G9SheetHandle, type G9SheetResult, G9SheetStack, type G9SheetStackConfig, type G9SheetStatus, g9SheetCloseGraceMs, g9SheetShowThrottleMs, } from './stack.js';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EACL,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,EACL,YAAY,EACZ,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,qCAAqC,EACrC,2BAA2B,EAC3B,mCAAmC,EACnC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,KAAK,aAAa,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,KAAK,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cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,KAAK,aAAa,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
package/dist/sheet/index.jsx
CHANGED
|
@@ -5,7 +5,8 @@ export { G9LoadableSheetContent } from "./loadable.jsx";
|
|
|
5
5
|
export { easeOutCubic, easeOutCubicMT, g9CupertinoOmega, g9MaterialBaseSettleMs, g9MaterialMaxSettleMs, materialSettle, materialSettleDurationMs, materialSettleMT, resolveSheetMotion } from "./motion.jsx";
|
|
6
6
|
export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, resolveSheetSettings } from "./options.jsx";
|
|
7
7
|
export { G9ProcessingSheetContent } from "./processing.jsx";
|
|
8
|
+
export { G9SheetScrollIndicator, G9SheetScrollModel, SHEET_THUMB_MIN, sheetThumb } from "./scroll-indicator.jsx";
|
|
8
9
|
export { g9Sheets, sheetServiceOf, useG9Sheets } from "./service.jsx";
|
|
9
10
|
export { G9Sheet } from "./sheet.jsx";
|
|
10
|
-
export { backdropCardTransform, clampFitHeight, currentPlatform, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetSurfaceBottomPadding, sheetSurfaceTopPadding, sheetTopPadding } from "./sizing.jsx";
|
|
11
|
+
export { backdropCardTransform, clampFitHeight, currentPlatform, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetScrollToEndThreshold, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetSurfaceBottomPadding, sheetSurfaceTopPadding, sheetTopPadding } from "./sizing.jsx";
|
|
11
12
|
export { G9SheetStack, g9SheetCloseGraceMs, g9SheetShowThrottleMs } from "./stack.jsx";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/sheet/motion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/sheet/motion.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,kDAAkD;AAClD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,iDAAiD;AACjD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,8GAA8G;AAC9G,eAAO,MAAM,gBAAgB,QAAsB,CAAC;AAEpD,qGAAqG;AACrG,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,yDAAyD;AACzD,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,C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C,aAAa,EAAE,OAAO,CAAC;IAChC,6GAA6G;IAC7G,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAW3E"}
|
package/dist/sheet/motion.jsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { g9MotionScale, g9Ms } from "@g9tm/lynxcontrols-foundation";
|
|
1
2
|
const g9MaterialBaseSettleMs = 256;
|
|
2
3
|
const g9MaterialMaxSettleMs = 600;
|
|
3
4
|
const g9CupertinoOmega = Math.sqrt(1000 / 3);
|
|
@@ -30,6 +31,19 @@ const tween = (ms, ease)=>({
|
|
|
30
31
|
});
|
|
31
32
|
const scaled = (ms, ratio, sizeScaled)=>ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;
|
|
32
33
|
function resolveSheetMotion(input) {
|
|
34
|
+
const designed = resolveDesignedSheetMotion(input);
|
|
35
|
+
if (1 === g9MotionScale()) return designed;
|
|
36
|
+
const at = (t)=>'tween' === t.type ? {
|
|
37
|
+
...t,
|
|
38
|
+
duration: g9Ms(t.duration)
|
|
39
|
+
} : 0 === g9MotionScale() ? tween(0, materialSettleMT) : t;
|
|
40
|
+
return {
|
|
41
|
+
enterAnimation: at(designed.enterAnimation),
|
|
42
|
+
exitAnimation: at(designed.exitAnimation),
|
|
43
|
+
snapAnimation: at(designed.snapAnimation)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function resolveDesignedSheetMotion(input) {
|
|
33
47
|
if ('timed' === input.style) return {
|
|
34
48
|
enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
|
|
35
49
|
exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet/motion.jsx","sources":["../../src/sheet/motion.ts"],"sourcesContent":["// How a G9 sheet moves on lynx-ui: the open, close and snap configs handed to lynx-ui `SheetContent`.\n//\n// MAUI `G9SheetMotionModel` (G9MAUIControls 1.4.0, BottomSheet/G9SheetView/G9SheetMotionModel.cs) is the reference:\n// • platformNative on Android (and Windows): Material's settle, androidx ViewDragHelper — a quintic ease-out\n// `(t − 1)^5 + 1` lasting `(distance / range + 1) × 256 ms`, at most 600 ms (256 ms for a nudge, 512 ms for the\n// whole screen; 90 % of the way is covered in the first 37 % of the time);\n// • platformNative on iOS / macOS: UIKit's default transition spring as Core Animation runs it, critically damped,\n// ω₀ = √(1000 / 3) — mass 1, stiffness ω₀², damping 2ω₀ for lynx-ui's spring;\n// • timed: the configured duration (size-scaled when enabled) on a cubic ease-out.\n// Before this module the port gave platformNative lynx-ui's default spring (stiffness 200, damping 60, mass 1): an\n// over-damped spring (ζ ≈ 2.1) that takes ~1.3 s to come to rest, a sluggish tail no AgriPad user had seen.\n//\n// lynx-ui runs the curve inside a main-thread worklet, so the curve must be a `'main thread'` function: a plain\n// background function cannot be called there (plan/specs/02 §3). Each\n// curve is a twin: `x` (background, tests, durations) and `xMT` (the worklet), asserted equal.\n\nimport type { currentPlatform } from './sizing';\n\n/** ViewDragHelper `BASE_SETTLE_DURATION` (ms). */\nexport const g9MaterialBaseSettleMs = 256;\n/** ViewDragHelper `MAX_SETTLE_DURATION` (ms). */\nexport const g9MaterialMaxSettleMs = 600;\n/** UIKit's default transition spring, critically damped as Core Animation runs it: ω₀ = √(1000 / 3) rad/s. */\nexport const g9CupertinoOmega = Math.sqrt(1000 / 3);\n\n/** Material settle duration (ms) for a programmatic move over `distanceRatio` of the host height. */\nexport function materialSettleDurationMs(distanceRatio: number): number {\n const ratio = Number.isFinite(distanceRatio) ? Math.min(1, Math.max(0, distanceRatio)) : 1;\n return Math.min(g9MaterialMaxSettleMs, Math.round((ratio + 1) * g9MaterialBaseSettleMs));\n}\n\n/** ViewDragHelper's `sInterpolator`: `(t − 1)^5 + 1`. */\nexport function materialSettle(t: number): number {\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** Main-thread twin of {@link materialSettle} (the curve lynx-ui calls every frame). */\nexport function materialSettleMT(t: number): number {\n 'main thread';\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** The timed style's curve (MAUI `Easing.CubicOut`). */\nexport function easeOutCubic(t: number): number {\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** Main-thread twin of {@link easeOutCubic}. */\nexport function easeOutCubicMT(t: number): number {\n 'main thread';\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** A lynx-ui sheet transition. */\nexport type G9SheetTransition =\n | {\n readonly type: 'tween' /** milliseconds (lynx-ui's unit) */;\n readonly duration: number;\n readonly ease: (t: number) => number;\n }\n | { readonly type: 'spring'; readonly stiffness: number; readonly damping: number; readonly mass: number };\n\n/** The lynx-ui motion of one sheet: `SheetContent`'s `enterAnimation`, `exitAnimation`, `snapAnimation`. */\nexport interface G9SheetMotion {\n readonly enterAnimation: G9SheetTransition;\n readonly exitAnimation: G9SheetTransition;\n readonly snapAnimation: G9SheetTransition;\n}\n\n/** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */\nexport interface G9SheetMotionInput {\n readonly style: 'platformNative' | 'timed';\n readonly platform: ReturnType<typeof currentPlatform>;\n /** Share of the host the sheet covers where it opens and from where it closes. */\n readonly openRatio: number;\n /** Share of the host between the smallest and the largest detent (snap travel). */\n readonly snapRatio: number;\n /** Settings or per-sheet open duration (ms); used by `timed`, and by `platformNative` when `perSheetOpen`. */\n readonly openMs: number;\n readonly closeMs: number;\n /** A per-sheet `openAnimationDurationMs` / `closeAnimationDurationMs` was set: it sets the time, the curve stays. */\n readonly perSheetOpen: boolean;\n readonly perSheetClose: boolean;\n /** `timed` only: partial travel takes the matching slice of the duration (`sizeScaledAnimationDuration`). */\n readonly sizeScaled: boolean;\n}\n\n// lynx-ui-sheet takes a tween's duration in MILLISECONDS (useSnap: `animate(…, { duration: (duration ?? 400) / 1000 })`).\n// This used to convert to seconds first, so a 199 ms open ran for 0.2 ms: every sheet jumped into place, no motion.\nconst tween = (ms: number, ease: (t: number) => number): G9SheetTransition => ({\n type: 'tween',\n duration: Math.max(0, ms),\n ease,\n});\n\nconst scaled = (ms: number, ratio: number, sizeScaled: boolean) =>\n ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;\n\n/**\n * The lynx-ui motion for a sheet (MAUI `ResolveSheetMotion`). `platformNative`: Material settle tweens on Android,\n * Windows and unknown hosts (durations from the travel), the critically damped UIKit spring on iOS and macOS; a\n * per-sheet duration replaces the time for its direction and keeps the platform curve (a quintic tween). `timed`: the\n * configured durations on a cubic ease-out, size-scaled when enabled; snapping keeps the full open duration.\n */\nexport function resolveSheetMotion(input: G9SheetMotionInput): G9SheetMotion {\n if (input.style === 'timed') {\n return {\n enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n snapAnimation: tween(input.openMs, easeOutCubicMT),\n };\n }\n if (input.platform === 'ios' || input.platform === 'macos') {\n const spring: G9SheetTransition = {\n type: 'spring',\n stiffness: g9CupertinoOmega * g9CupertinoOmega,\n damping: 2 * g9CupertinoOmega,\n mass: 1,\n };\n return {\n enterAnimation: input.perSheetOpen ? tween(input.openMs, materialSettleMT) : spring,\n exitAnimation: input.perSheetClose ? tween(input.closeMs, materialSettleMT) : spring,\n snapAnimation: spring,\n };\n }\n return {\n enterAnimation: tween(\n input.perSheetOpen ? input.openMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n exitAnimation: tween(\n input.perSheetClose ? input.closeMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n snapAnimation: tween(materialSettleDurationMs(input.snapRatio), materialSettleMT),\n };\n}\n"],"names":["g9MaterialBaseSettleMs","g9MaterialMaxSettleMs","g9CupertinoOmega","Math","materialSettleDurationMs","distanceRatio","ratio","Number","materialSettle","t","u","materialSettleMT","easeOutCubic","easeOutCubicMT","tween","ms","ease","scaled","sizeScaled","resolveSheetMotion","input","spring"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sheet/motion.jsx","sources":["../../src/sheet/motion.ts"],"sourcesContent":["// How a G9 sheet moves on lynx-ui: the open, close and snap configs handed to lynx-ui `SheetContent`.\n//\n// MAUI `G9SheetMotionModel` (G9MAUIControls 1.4.0, BottomSheet/G9SheetView/G9SheetMotionModel.cs) is the reference:\n// • platformNative on Android (and Windows): Material's settle, androidx ViewDragHelper — a quintic ease-out\n// `(t − 1)^5 + 1` lasting `(distance / range + 1) × 256 ms`, at most 600 ms (256 ms for a nudge, 512 ms for the\n// whole screen; 90 % of the way is covered in the first 37 % of the time);\n// • platformNative on iOS / macOS: UIKit's default transition spring as Core Animation runs it, critically damped,\n// ω₀ = √(1000 / 3) — mass 1, stiffness ω₀², damping 2ω₀ for lynx-ui's spring;\n// • timed: the configured duration (size-scaled when enabled) on a cubic ease-out.\n// Before this module the port gave platformNative lynx-ui's default spring (stiffness 200, damping 60, mass 1): an\n// over-damped spring (ζ ≈ 2.1) that takes ~1.3 s to come to rest, a sluggish tail no AgriPad user had seen.\n//\n// lynx-ui runs the curve inside a main-thread worklet, so the curve must be a `'main thread'` function: a plain\n// background function cannot be called there (plan/specs/02 §3). Each\n// curve is a twin: `x` (background, tests, durations) and `xMT` (the worklet), asserted equal.\n\nimport { g9MotionScale, g9Ms } from '@g9tm/lynxcontrols-foundation';\nimport type { currentPlatform } from './sizing';\n\n/** ViewDragHelper `BASE_SETTLE_DURATION` (ms). */\nexport const g9MaterialBaseSettleMs = 256;\n/** ViewDragHelper `MAX_SETTLE_DURATION` (ms). */\nexport const g9MaterialMaxSettleMs = 600;\n/** UIKit's default transition spring, critically damped as Core Animation runs it: ω₀ = √(1000 / 3) rad/s. */\nexport const g9CupertinoOmega = Math.sqrt(1000 / 3);\n\n/** Material settle duration (ms) for a programmatic move over `distanceRatio` of the host height. */\nexport function materialSettleDurationMs(distanceRatio: number): number {\n const ratio = Number.isFinite(distanceRatio) ? Math.min(1, Math.max(0, distanceRatio)) : 1;\n return Math.min(g9MaterialMaxSettleMs, Math.round((ratio + 1) * g9MaterialBaseSettleMs));\n}\n\n/** ViewDragHelper's `sInterpolator`: `(t − 1)^5 + 1`. */\nexport function materialSettle(t: number): number {\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** Main-thread twin of {@link materialSettle} (the curve lynx-ui calls every frame). */\nexport function materialSettleMT(t: number): number {\n 'main thread';\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** The timed style's curve (MAUI `Easing.CubicOut`). */\nexport function easeOutCubic(t: number): number {\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** Main-thread twin of {@link easeOutCubic}. */\nexport function easeOutCubicMT(t: number): number {\n 'main thread';\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** A lynx-ui sheet transition. */\nexport type G9SheetTransition =\n | {\n readonly type: 'tween' /** milliseconds (lynx-ui's unit) */;\n readonly duration: number;\n readonly ease: (t: number) => number;\n }\n | { readonly type: 'spring'; readonly stiffness: number; readonly damping: number; readonly mass: number };\n\n/** The lynx-ui motion of one sheet: `SheetContent`'s `enterAnimation`, `exitAnimation`, `snapAnimation`. */\nexport interface G9SheetMotion {\n readonly enterAnimation: G9SheetTransition;\n readonly exitAnimation: G9SheetTransition;\n readonly snapAnimation: G9SheetTransition;\n}\n\n/** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */\nexport interface G9SheetMotionInput {\n readonly style: 'platformNative' | 'timed';\n readonly platform: ReturnType<typeof currentPlatform>;\n /** Share of the host the sheet covers where it opens and from where it closes. */\n readonly openRatio: number;\n /** Share of the host between the smallest and the largest detent (snap travel). */\n readonly snapRatio: number;\n /** Settings or per-sheet open duration (ms); used by `timed`, and by `platformNative` when `perSheetOpen`. */\n readonly openMs: number;\n readonly closeMs: number;\n /** A per-sheet `openAnimationDurationMs` / `closeAnimationDurationMs` was set: it sets the time, the curve stays. */\n readonly perSheetOpen: boolean;\n readonly perSheetClose: boolean;\n /** `timed` only: partial travel takes the matching slice of the duration (`sizeScaledAnimationDuration`). */\n readonly sizeScaled: boolean;\n}\n\n// lynx-ui-sheet takes a tween's duration in MILLISECONDS (useSnap: `animate(…, { duration: (duration ?? 400) / 1000 })`).\n// This used to convert to seconds first, so a 199 ms open ran for 0.2 ms: every sheet jumped into place, no motion.\nconst tween = (ms: number, ease: (t: number) => number): G9SheetTransition => ({\n type: 'tween',\n duration: Math.max(0, ms),\n ease,\n});\n\nconst scaled = (ms: number, ratio: number, sizeScaled: boolean) =>\n ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;\n\n/**\n * The lynx-ui motion for a sheet (MAUI `ResolveSheetMotion`). `platformNative`: Material settle tweens on Android,\n * Windows and unknown hosts (durations from the travel), the critically damped UIKit spring on iOS and macOS; a\n * per-sheet duration replaces the time for its direction and keeps the platform curve (a quintic tween). `timed`: the\n * configured durations on a cubic ease-out, size-scaled when enabled; snapping keeps the full open duration.\n */\nexport function resolveSheetMotion(input: G9SheetMotionInput): G9SheetMotion {\n const designed = resolveDesignedSheetMotion(input);\n // The motion scale (foundation g9Ms): a tween's time scales; at 0 a spring becomes an instant tween too.\n if (g9MotionScale() === 1) return designed;\n const at = (t: G9SheetTransition): G9SheetTransition =>\n t.type === 'tween' ? { ...t, duration: g9Ms(t.duration) } : g9MotionScale() === 0 ? tween(0, materialSettleMT) : t;\n return {\n enterAnimation: at(designed.enterAnimation),\n exitAnimation: at(designed.exitAnimation),\n snapAnimation: at(designed.snapAnimation),\n };\n}\n\nfunction resolveDesignedSheetMotion(input: G9SheetMotionInput): G9SheetMotion {\n if (input.style === 'timed') {\n return {\n enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n snapAnimation: tween(input.openMs, easeOutCubicMT),\n };\n }\n if (input.platform === 'ios' || input.platform === 'macos') {\n const spring: G9SheetTransition = {\n type: 'spring',\n stiffness: g9CupertinoOmega * g9CupertinoOmega,\n damping: 2 * g9CupertinoOmega,\n mass: 1,\n };\n return {\n enterAnimation: input.perSheetOpen ? tween(input.openMs, materialSettleMT) : spring,\n exitAnimation: input.perSheetClose ? tween(input.closeMs, materialSettleMT) : spring,\n snapAnimation: spring,\n };\n }\n return {\n enterAnimation: tween(\n input.perSheetOpen ? input.openMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n exitAnimation: tween(\n input.perSheetClose ? input.closeMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n snapAnimation: tween(materialSettleDurationMs(input.snapRatio), materialSettleMT),\n };\n}\n"],"names":["g9MaterialBaseSettleMs","g9MaterialMaxSettleMs","g9CupertinoOmega","Math","materialSettleDurationMs","distanceRatio","ratio","Number","materialSettle","t","u","materialSettleMT","easeOutCubic","easeOutCubicMT","tween","ms","ease","scaled","sizeScaled","resolveSheetMotion","input","designed","resolveDesignedSheetMotion","g9MotionScale","at","g9Ms","spring"],"mappings":";AAoBO,MAAMA,yBAAyB;AAE/B,MAAMC,wBAAwB;AAE9B,MAAMC,mBAAmBC,KAAK,IAAI,CAAC,OAAO;AAG1C,SAASC,yBAAyBC,aAAqB;IAC5D,MAAMC,QAAQC,OAAO,QAAQ,CAACF,iBAAiBF,KAAK,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC,GAAGE,kBAAkB;IACzF,OAAOF,KAAK,GAAG,CAACF,uBAAuBE,KAAK,KAAK,CAAEG,AAAAA,CAAAA,QAAQ,KAAKN;AAClE;AAGO,SAASQ,eAAeC,CAAS;IACtC,MAAMC,IAAID,IAAI;IACd,OAAOC,IAAIA,IAAIA,IAAIA,IAA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AAS,EAAEA,MAAM,UAAU,GAAGP;QAC/E,eAAeC,MAAMM,MAAM,MAAM,EAAEP;IACrC;IAEF,IAAIO,AAAmB,UAAnBA,MAAM,QAAQ,IAAcA,AAAmB,YAAnBA,MAAM,QAAQ,EAAc;QAC1D,MAAMM,SAA4B;YAChC,MAAM;YACN,WAAWxB,mBAAmBA;YAC9B,SAAS,IAAIA;YACb,MAAM;QACR;QACA,OAAO;YACL,gBAAgBkB,MAAM,YAAY,GAAGN,MAAMM,MAAM,MAAM,EAAET,oBAAoBe;YAC7E,eAAeN,MAAM,aAAa,GAAGN,MAAMM,MAAM,OAAO,EAAET,oBAAoBe;YAC9E,eAAeA;QACjB;IACF;IACA,OAAO;QACL,gBAAgBZ,MACdM,MAAM,YAAY,GAAGA,MAAM,MAAM,GAAGhB,yBAAyBgB,MAAM,SAAS,GAC5ET;QAEF,eAAeG,MACbM,MAAM,aAAa,GAAGA,MAAM,OAAO,GAAGhB,yBAAyBgB,MAAM,SAAS,GAC9ET;QAEF,eAAeG,MAAMV,yBAAyBgB,MAAM,SAAS,GAAGT;IAClE;AACF"}
|
package/dist/sheet/options.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ export interface G9SheetToolbarItem {
|
|
|
27
27
|
readonly isActive?: boolean;
|
|
28
28
|
/** Dot while active. Default false. */
|
|
29
29
|
readonly showActiveBadge?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* A count on the action (MAUI 1.4.9 `BadgeText`: AgriPad's site filter shows its «۲» active filters): a small pill
|
|
32
|
+
* with this text, shown whatever `showActiveBadge` / `isActive` say. Null / empty: the plain dot (or nothing).
|
|
33
|
+
*/
|
|
34
|
+
readonly badgeText?: string | null;
|
|
30
35
|
/** Ignore presses while busy. Default true. */
|
|
31
36
|
readonly disableWhileBusy?: boolean;
|
|
32
37
|
/** Default true. */
|
|
@@ -96,6 +101,20 @@ export interface G9SheetOptions extends G9SheetLifecycle {
|
|
|
96
101
|
* detent-sized sheet (full screen / states); a fit-to-content sheet has no height to give.
|
|
97
102
|
*/
|
|
98
103
|
readonly scrollBody?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* The body's scroll bar: `'system'` (default) — the platform's, shown while a finger scrolls, then faded; `'always'` —
|
|
106
|
+
* a thin thumb in the body's side inset at the inline end, visible whenever the content is taller than the body and
|
|
107
|
+
* moving with it (a menu of full-width cards whose last card is cut off says «more below»). Lynx-only, additive.
|
|
108
|
+
*/
|
|
109
|
+
readonly scrollIndicator?: 'system' | 'always';
|
|
110
|
+
/**
|
|
111
|
+
* Called when the scrolling body comes within {@link scrollToEndThreshold} of its end — a body that renders a window
|
|
112
|
+
* of a long list grows it here (the selection sheet's next page, MAUI 1.4.8 `OnItemsScrolled`). Not called for a
|
|
113
|
+
* static body (`scrollBody: false`). Lynx-only, additive.
|
|
114
|
+
*/
|
|
115
|
+
readonly onScrollToEnd?: () => void;
|
|
116
|
+
/** Distance from the end (px) that counts as «at the end» for {@link onScrollToEnd}. Default 208 (four 52 px rows). */
|
|
117
|
+
readonly scrollToEndThreshold?: number;
|
|
99
118
|
/** Height memory key (needed for factory content). */
|
|
100
119
|
readonly heightMemoKey?: string | null;
|
|
101
120
|
/** Body padding. Default 0. */
|
|
@@ -226,6 +245,13 @@ export interface G9SheetSettings {
|
|
|
226
245
|
readonly sizeScaledAnimationDuration?: boolean;
|
|
227
246
|
/** Global switch of the page recede. Default true. */
|
|
228
247
|
readonly enableBackdropCardEffect?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* The sheets rise above the soft keyboard (MAUI KeyboardInsetScope; G9MAUIControls 1.4.11 rule «every input in a bottom
|
|
250
|
+
* sheet takes the keyboard shift»): while the keyboard is up the sheet layer ends at its top edge, so a fit sheet's field and
|
|
251
|
+
* footer stay visible and a tall sheet gives up height. Only what the host has not already resized is lifted — a host that
|
|
252
|
+
* pads its view by the IME inset (the gallery's `GalleryActivity`) shrinks the window itself. Default true.
|
|
253
|
+
*/
|
|
254
|
+
readonly avoidKeyboard?: boolean;
|
|
229
255
|
/** Colour behind the receded page. Default black. */
|
|
230
256
|
readonly backdropCardColor?: string;
|
|
231
257
|
/** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */
|
|
@@ -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,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ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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"}
|
package/dist/sheet/options.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const clamp = (v, lo, hi)=>Math.min(hi, Math.max(lo, v));
|
|
2
2
|
const finite = (v, fallback)=>'number' == typeof v && Number.isFinite(v) ? v : fallback;
|
|
3
3
|
function resolveSheetSettings(settings) {
|
|
4
|
-
var _s_modalOverlayColor, _s_sizeScaledAnimationDuration, _s_enableBackdropCardEffect, _s_backdropCardColor, _s_stageBeforeShow, _s_deferPrebuiltContent, _s_motionStyle, _s_heightMemoVersion;
|
|
4
|
+
var _s_modalOverlayColor, _s_sizeScaledAnimationDuration, _s_enableBackdropCardEffect, _s_avoidKeyboard, _s_backdropCardColor, _s_stageBeforeShow, _s_deferPrebuiltContent, _s_motionStyle, _s_heightMemoVersion;
|
|
5
5
|
const s = null != settings ? settings : {};
|
|
6
6
|
let min = clamp(finite(s.modalOverlayMinimumOpacity, 0.3), 0, 1);
|
|
7
7
|
let max = clamp(finite(s.modalOverlayMaximumOpacity, 0.9), 0, 1);
|
|
@@ -17,6 +17,7 @@ function resolveSheetSettings(settings) {
|
|
|
17
17
|
closeAnimationDurationMs: Math.max(0, finite(s.closeAnimationDurationMs, 300)),
|
|
18
18
|
sizeScaledAnimationDuration: null != (_s_sizeScaledAnimationDuration = s.sizeScaledAnimationDuration) ? _s_sizeScaledAnimationDuration : true,
|
|
19
19
|
enableBackdropCardEffect: null != (_s_enableBackdropCardEffect = s.enableBackdropCardEffect) ? _s_enableBackdropCardEffect : true,
|
|
20
|
+
avoidKeyboard: null != (_s_avoidKeyboard = s.avoidKeyboard) ? _s_avoidKeyboard : true,
|
|
20
21
|
backdropCardColor: null != (_s_backdropCardColor = s.backdropCardColor) ? _s_backdropCardColor : '#000000',
|
|
21
22
|
stageBeforeShow: null != (_s_stageBeforeShow = s.stageBeforeShow) ? _s_stageBeforeShow : true,
|
|
22
23
|
preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),
|