@g9tm/lynxcontrols 0.0.0-stage → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/base/base.css +16 -0
- package/dist/base/base.css.map +1 -0
- package/dist/base/control.d.ts +68 -0
- package/dist/base/control.d.ts.map +1 -0
- package/dist/base/control.jsx +36 -0
- package/dist/base/control.jsx.map +1 -0
- package/dist/base/corner-badge.d.ts +35 -0
- package/dist/base/corner-badge.d.ts.map +1 -0
- package/dist/base/corner-badge.jsx +45 -0
- package/dist/base/corner-badge.jsx.map +1 -0
- package/dist/base/disposer.d.ts +28 -0
- package/dist/base/disposer.d.ts.map +1 -0
- package/dist/base/disposer.jsx +61 -0
- package/dist/base/disposer.jsx.map +1 -0
- package/dist/base/index.d.ts +10 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.jsx +9 -0
- package/dist/base/press.d.ts +38 -0
- package/dist/base/press.d.ts.map +1 -0
- package/dist/base/press.jsx +73 -0
- package/dist/base/press.jsx.map +1 -0
- package/dist/base/pressable.d.ts +25 -0
- package/dist/base/pressable.d.ts.map +1 -0
- package/dist/base/pressable.jsx +38 -0
- package/dist/base/pressable.jsx.map +1 -0
- package/dist/base/selection-item.d.ts +29 -0
- package/dist/base/selection-item.d.ts.map +1 -0
- package/dist/base/selection-item.jsx +6 -0
- package/dist/base/selection-item.jsx.map +1 -0
- package/dist/base/timers.d.ts +7 -0
- package/dist/base/timers.d.ts.map +1 -0
- package/dist/base/timers.jsx +10 -0
- package/dist/base/timers.jsx.map +1 -0
- package/dist/base/use-controllable-state.d.ts +30 -0
- package/dist/base/use-controllable-state.d.ts.map +1 -0
- package/dist/base/use-controllable-state.jsx +49 -0
- package/dist/base/use-controllable-state.jsx.map +1 -0
- package/dist/base/use-stable-callback.d.ts +8 -0
- package/dist/base/use-stable-callback.d.ts.map +1 -0
- package/dist/base/use-stable-callback.jsx +12 -0
- package/dist/base/use-stable-callback.jsx.map +1 -0
- package/dist/button/button.css +162 -0
- package/dist/button/button.css.map +1 -0
- package/dist/button/button.d.ts +52 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/button.jsx +88 -0
- package/dist/button/button.jsx.map +1 -0
- package/dist/button/header-action-button.d.ts +34 -0
- package/dist/button/header-action-button.d.ts.map +1 -0
- package/dist/button/header-action-button.jsx +51 -0
- package/dist/button/header-action-button.jsx.map +1 -0
- package/dist/button/icon-button.d.ts +46 -0
- package/dist/button/icon-button.d.ts.map +1 -0
- package/dist/button/icon-button.jsx +69 -0
- package/dist/button/icon-button.jsx.map +1 -0
- package/dist/button/index.d.ts +9 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/index.jsx +8 -0
- package/dist/button/nav-card.d.ts +58 -0
- package/dist/button/nav-card.d.ts.map +1 -0
- package/dist/button/nav-card.jsx +96 -0
- package/dist/button/nav-card.jsx.map +1 -0
- package/dist/button/safe-tap.d.ts +27 -0
- package/dist/button/safe-tap.d.ts.map +1 -0
- package/dist/button/safe-tap.jsx +46 -0
- package/dist/button/safe-tap.jsx.map +1 -0
- package/dist/button/safe.d.ts +84 -0
- package/dist/button/safe.d.ts.map +1 -0
- package/dist/button/safe.jsx +116 -0
- package/dist/button/safe.jsx.map +1 -0
- package/dist/button/vertical-icon-text-button.d.ts +18 -0
- package/dist/button/vertical-icon-text-button.d.ts.map +1 -0
- package/dist/button/vertical-icon-text-button.jsx +21 -0
- package/dist/button/vertical-icon-text-button.jsx.map +1 -0
- package/dist/button/visuals.d.ts +53 -0
- package/dist/button/visuals.d.ts.map +1 -0
- package/dist/button/visuals.jsx +92 -0
- package/dist/button/visuals.jsx.map +1 -0
- package/dist/cascade/cascade-panel.d.ts +80 -0
- package/dist/cascade/cascade-panel.d.ts.map +1 -0
- package/dist/cascade/cascade-panel.jsx +179 -0
- package/dist/cascade/cascade-panel.jsx.map +1 -0
- package/dist/cascade/cascade.css +70 -0
- package/dist/cascade/cascade.css.map +1 -0
- package/dist/cascade/index.d.ts +3 -0
- package/dist/cascade/index.d.ts.map +1 -0
- package/dist/cascade/index.jsx +2 -0
- package/dist/cascade/model.d.ts +68 -0
- package/dist/cascade/model.d.ts.map +1 -0
- package/dist/cascade/model.jsx +161 -0
- package/dist/cascade/model.jsx.map +1 -0
- package/dist/deferred/deferred-content.d.ts +82 -0
- package/dist/deferred/deferred-content.d.ts.map +1 -0
- package/dist/deferred/deferred-content.jsx +263 -0
- package/dist/deferred/deferred-content.jsx.map +1 -0
- package/dist/deferred/deferred.css +62 -0
- package/dist/deferred/deferred.css.map +1 -0
- package/dist/deferred/index.d.ts +3 -0
- package/dist/deferred/index.d.ts.map +1 -0
- package/dist/deferred/index.jsx +2 -0
- package/dist/deferred/readiness-signal.d.ts +16 -0
- package/dist/deferred/readiness-signal.d.ts.map +1 -0
- package/dist/deferred/readiness-signal.jsx +29 -0
- package/dist/deferred/readiness-signal.jsx.map +1 -0
- package/dist/display/activity-indicator.d.ts +21 -0
- package/dist/display/activity-indicator.d.ts.map +1 -0
- package/dist/display/activity-indicator.jsx +22 -0
- package/dist/display/activity-indicator.jsx.map +1 -0
- package/dist/display/culture-date-time-label.d.ts +64 -0
- package/dist/display/culture-date-time-label.d.ts.map +1 -0
- package/dist/display/culture-date-time-label.jsx +73 -0
- package/dist/display/culture-date-time-label.jsx.map +1 -0
- package/dist/display/display.css +217 -0
- package/dist/display/display.css.map +1 -0
- package/dist/display/index.d.ts +7 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.jsx +6 -0
- package/dist/display/progress-bar.d.ts +38 -0
- package/dist/display/progress-bar.d.ts.map +1 -0
- package/dist/display/progress-bar.jsx +57 -0
- package/dist/display/progress-bar.jsx.map +1 -0
- package/dist/display/separator.d.ts +30 -0
- package/dist/display/separator.d.ts.map +1 -0
- package/dist/display/separator.jsx +55 -0
- package/dist/display/separator.jsx.map +1 -0
- package/dist/display/shimmer.d.ts +41 -0
- package/dist/display/shimmer.d.ts.map +1 -0
- package/dist/display/shimmer.jsx +41 -0
- package/dist/display/shimmer.jsx.map +1 -0
- package/dist/display/title-with-line.d.ts +13 -0
- package/dist/display/title-with-line.d.ts.map +1 -0
- package/dist/display/title-with-line.jsx +21 -0
- package/dist/display/title-with-line.jsx.map +1 -0
- package/dist/edge-panel/edge-panel.css +132 -0
- package/dist/edge-panel/edge-panel.css.map +1 -0
- package/dist/edge-panel/edge-panel.d.ts +87 -0
- package/dist/edge-panel/edge-panel.d.ts.map +1 -0
- package/dist/edge-panel/edge-panel.jsx +326 -0
- package/dist/edge-panel/edge-panel.jsx.map +1 -0
- package/dist/edge-panel/helper.d.ts +27 -0
- package/dist/edge-panel/helper.d.ts.map +1 -0
- package/dist/edge-panel/helper.jsx +118 -0
- package/dist/edge-panel/helper.jsx.map +1 -0
- package/dist/edge-panel/index.d.ts +4 -0
- package/dist/edge-panel/index.d.ts.map +1 -0
- package/dist/edge-panel/index.jsx +3 -0
- package/dist/edge-panel/types.d.ts +155 -0
- package/dist/edge-panel/types.d.ts.map +1 -0
- package/dist/edge-panel/types.jsx +139 -0
- package/dist/edge-panel/types.jsx.map +1 -0
- package/dist/expander/expander.css +54 -0
- package/dist/expander/expander.css.map +1 -0
- package/dist/expander/expander.d.ts +46 -0
- package/dist/expander/expander.d.ts.map +1 -0
- package/dist/expander/expander.jsx +112 -0
- package/dist/expander/expander.jsx.map +1 -0
- package/dist/expander/index.d.ts +2 -0
- package/dist/expander/index.d.ts.map +1 -0
- package/dist/expander/index.jsx +1 -0
- package/dist/fields/dictation.d.ts +43 -0
- package/dist/fields/dictation.d.ts.map +1 -0
- package/dist/fields/dictation.jsx +124 -0
- package/dist/fields/dictation.jsx.map +1 -0
- package/dist/fields/editor.d.ts +26 -0
- package/dist/fields/editor.d.ts.map +1 -0
- package/dist/fields/editor.jsx +46 -0
- package/dist/fields/editor.jsx.map +1 -0
- package/dist/fields/fields.css +164 -0
- package/dist/fields/fields.css.map +1 -0
- package/dist/fields/index.d.ts +13 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.jsx +12 -0
- package/dist/fields/input-policy.d.ts +48 -0
- package/dist/fields/input-policy.d.ts.map +1 -0
- package/dist/fields/input-policy.jsx +215 -0
- package/dist/fields/input-policy.jsx.map +1 -0
- package/dist/fields/notch.d.ts +10 -0
- package/dist/fields/notch.d.ts.map +1 -0
- package/dist/fields/notch.jsx +9 -0
- package/dist/fields/notch.jsx.map +1 -0
- package/dist/fields/outlined-field.d.ts +152 -0
- package/dist/fields/outlined-field.d.ts.map +1 -0
- package/dist/fields/outlined-field.jsx +199 -0
- package/dist/fields/outlined-field.jsx.map +1 -0
- package/dist/fields/pin-entry.d.ts +65 -0
- package/dist/fields/pin-entry.d.ts.map +1 -0
- package/dist/fields/pin-entry.jsx +294 -0
- package/dist/fields/pin-entry.jsx.map +1 -0
- package/dist/fields/search-entry.d.ts +35 -0
- package/dist/fields/search-entry.d.ts.map +1 -0
- package/dist/fields/search-entry.jsx +118 -0
- package/dist/fields/search-entry.jsx.map +1 -0
- package/dist/fields/slot-layout.d.ts +33 -0
- package/dist/fields/slot-layout.d.ts.map +1 -0
- package/dist/fields/slot-layout.jsx +33 -0
- package/dist/fields/slot-layout.jsx.map +1 -0
- package/dist/fields/text-entry.d.ts +62 -0
- package/dist/fields/text-entry.d.ts.map +1 -0
- package/dist/fields/text-entry.jsx +82 -0
- package/dist/fields/text-entry.jsx.map +1 -0
- package/dist/fields/use-dictation.d.ts +34 -0
- package/dist/fields/use-dictation.d.ts.map +1 -0
- package/dist/fields/use-dictation.jsx +80 -0
- package/dist/fields/use-dictation.jsx.map +1 -0
- package/dist/fields/use-text-input.d.ts +150 -0
- package/dist/fields/use-text-input.d.ts.map +1 -0
- package/dist/fields/use-text-input.jsx +247 -0
- package/dist/fields/use-text-input.jsx.map +1 -0
- package/dist/fields/validator.d.ts +14 -0
- package/dist/fields/validator.d.ts.map +1 -0
- package/dist/fields/validator.jsx +20 -0
- package/dist/fields/validator.jsx.map +1 -0
- package/dist/host/back.d.ts +42 -0
- package/dist/host/back.d.ts.map +1 -0
- package/dist/host/back.jsx +47 -0
- package/dist/host/back.jsx.map +1 -0
- package/dist/host/hooks.d.ts +90 -0
- package/dist/host/hooks.d.ts.map +1 -0
- package/dist/host/hooks.jsx +166 -0
- package/dist/host/hooks.jsx.map +1 -0
- package/dist/host/host.css +81 -0
- package/dist/host/host.css.map +1 -0
- package/dist/host/host.d.ts +70 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.jsx +229 -0
- package/dist/host/host.jsx.map +1 -0
- package/dist/host/index.d.ts +9 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.jsx +8 -0
- package/dist/host/keyboard.d.ts +24 -0
- package/dist/host/keyboard.d.ts.map +1 -0
- package/dist/host/keyboard.jsx +28 -0
- package/dist/host/keyboard.jsx.map +1 -0
- package/dist/host/layers.d.ts +69 -0
- package/dist/host/layers.d.ts.map +1 -0
- package/dist/host/layers.jsx +111 -0
- package/dist/host/layers.jsx.map +1 -0
- package/dist/host/page-loading-overlay.d.ts +17 -0
- package/dist/host/page-loading-overlay.d.ts.map +1 -0
- package/dist/host/page-loading-overlay.jsx +16 -0
- package/dist/host/page-loading-overlay.jsx.map +1 -0
- package/dist/host/readiness.d.ts +57 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.jsx +138 -0
- package/dist/host/readiness.jsx.map +1 -0
- package/dist/host/registry.d.ts +106 -0
- package/dist/host/registry.d.ts.map +1 -0
- package/dist/host/registry.jsx +93 -0
- package/dist/host/registry.jsx.map +1 -0
- package/dist/icon/icon.css +39 -0
- package/dist/icon/icon.css.map +1 -0
- package/dist/icon/icon.d.ts +57 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.jsx +115 -0
- package/dist/icon/icon.jsx.map +1 -0
- package/dist/icon/index.d.ts +4 -0
- package/dist/icon/index.d.ts.map +1 -0
- package/dist/icon/index.jsx +3 -0
- package/dist/icon/slot.d.ts +45 -0
- package/dist/icon/slot.d.ts.map +1 -0
- package/dist/icon/slot.jsx +61 -0
- package/dist/icon/slot.jsx.map +1 -0
- package/dist/icon/swatch.d.ts +29 -0
- package/dist/icon/swatch.d.ts.map +1 -0
- package/dist/icon/swatch.jsx +25 -0
- package/dist/icon/swatch.jsx.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.jsx +1 -0
- package/dist/pickers/combo-box.d.ts +42 -0
- package/dist/pickers/combo-box.d.ts.map +1 -0
- package/dist/pickers/combo-box.jsx +129 -0
- package/dist/pickers/combo-box.jsx.map +1 -0
- package/dist/pickers/date-time-picker.d.ts +63 -0
- package/dist/pickers/date-time-picker.d.ts.map +1 -0
- package/dist/pickers/date-time-picker.jsx +141 -0
- package/dist/pickers/date-time-picker.jsx.map +1 -0
- package/dist/pickers/date-time.d.ts +82 -0
- package/dist/pickers/date-time.d.ts.map +1 -0
- package/dist/pickers/date-time.jsx +130 -0
- package/dist/pickers/date-time.jsx.map +1 -0
- package/dist/pickers/index.d.ts +10 -0
- package/dist/pickers/index.d.ts.map +1 -0
- package/dist/pickers/index.jsx +9 -0
- package/dist/pickers/picker-sheet.d.ts +21 -0
- package/dist/pickers/picker-sheet.d.ts.map +1 -0
- package/dist/pickers/picker-sheet.jsx +61 -0
- package/dist/pickers/picker-sheet.jsx.map +1 -0
- package/dist/pickers/picker.d.ts +32 -0
- package/dist/pickers/picker.d.ts.map +1 -0
- package/dist/pickers/picker.jsx +72 -0
- package/dist/pickers/picker.jsx.map +1 -0
- package/dist/pickers/pickers.css +219 -0
- package/dist/pickers/pickers.css.map +1 -0
- package/dist/pickers/timespan-picker.d.ts +36 -0
- package/dist/pickers/timespan-picker.d.ts.map +1 -0
- package/dist/pickers/timespan-picker.jsx +99 -0
- package/dist/pickers/timespan-picker.jsx.map +1 -0
- package/dist/pickers/timespan.d.ts +38 -0
- package/dist/pickers/timespan.d.ts.map +1 -0
- package/dist/pickers/timespan.jsx +49 -0
- package/dist/pickers/timespan.jsx.map +1 -0
- package/dist/pickers/trigger.d.ts +34 -0
- package/dist/pickers/trigger.d.ts.map +1 -0
- package/dist/pickers/trigger.jsx +77 -0
- package/dist/pickers/trigger.jsx.map +1 -0
- package/dist/pickers/wheel-column.d.ts +32 -0
- package/dist/pickers/wheel-column.d.ts.map +1 -0
- package/dist/pickers/wheel-column.jsx +99 -0
- package/dist/pickers/wheel-column.jsx.map +1 -0
- package/dist/plus-button/index.d.ts +3 -0
- package/dist/plus-button/index.d.ts.map +1 -0
- package/dist/plus-button/index.jsx +2 -0
- package/dist/plus-button/model.d.ts +65 -0
- package/dist/plus-button/model.d.ts.map +1 -0
- package/dist/plus-button/model.jsx +86 -0
- package/dist/plus-button/model.jsx.map +1 -0
- package/dist/plus-button/plus-button.css +67 -0
- package/dist/plus-button/plus-button.css.map +1 -0
- package/dist/plus-button/plus-button.d.ts +38 -0
- package/dist/plus-button/plus-button.d.ts.map +1 -0
- package/dist/plus-button/plus-button.jsx +155 -0
- package/dist/plus-button/plus-button.jsx.map +1 -0
- package/dist/popup/frame.d.ts +101 -0
- package/dist/popup/frame.d.ts.map +1 -0
- package/dist/popup/frame.jsx +252 -0
- package/dist/popup/frame.jsx.map +1 -0
- package/dist/popup/index.d.ts +8 -0
- package/dist/popup/index.d.ts.map +1 -0
- package/dist/popup/index.jsx +7 -0
- package/dist/popup/input-form.d.ts +35 -0
- package/dist/popup/input-form.d.ts.map +1 -0
- package/dist/popup/input-form.jsx +160 -0
- package/dist/popup/input-form.jsx.map +1 -0
- package/dist/popup/input.d.ts +175 -0
- package/dist/popup/input.d.ts.map +1 -0
- package/dist/popup/input.jsx +176 -0
- package/dist/popup/input.jsx.map +1 -0
- package/dist/popup/popup-view.d.ts +25 -0
- package/dist/popup/popup-view.d.ts.map +1 -0
- package/dist/popup/popup-view.jsx +67 -0
- package/dist/popup/popup-view.jsx.map +1 -0
- package/dist/popup/popup.css +203 -0
- package/dist/popup/popup.css.map +1 -0
- package/dist/popup/queue.d.ts +90 -0
- package/dist/popup/queue.d.ts.map +1 -0
- package/dist/popup/queue.jsx +309 -0
- package/dist/popup/queue.jsx.map +1 -0
- package/dist/popup/service.d.ts +60 -0
- package/dist/popup/service.d.ts.map +1 -0
- package/dist/popup/service.jsx +350 -0
- package/dist/popup/service.jsx.map +1 -0
- package/dist/popup/types.d.ts +222 -0
- package/dist/popup/types.d.ts.map +1 -0
- package/dist/popup/types.jsx +218 -0
- package/dist/popup/types.jsx.map +1 -0
- package/dist/provider/contexts.d.ts +41 -0
- package/dist/provider/contexts.d.ts.map +1 -0
- package/dist/provider/contexts.jsx +11 -0
- package/dist/provider/contexts.jsx.map +1 -0
- package/dist/provider/global-events.d.ts +8 -0
- package/dist/provider/global-events.d.ts.map +1 -0
- package/dist/provider/global-events.jsx +17 -0
- package/dist/provider/global-events.jsx.map +1 -0
- package/dist/provider/hooks.d.ts +49 -0
- package/dist/provider/hooks.d.ts.map +1 -0
- package/dist/provider/hooks.jsx +72 -0
- package/dist/provider/hooks.jsx.map +1 -0
- package/dist/provider/index.d.ts +5 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.jsx +3 -0
- package/dist/provider/provider.css +18 -0
- package/dist/provider/provider.css.map +1 -0
- package/dist/provider/provider.d.ts +51 -0
- package/dist/provider/provider.d.ts.map +1 -0
- package/dist/provider/provider.jsx +290 -0
- package/dist/provider/provider.jsx.map +1 -0
- package/dist/provider/settings.d.ts +99 -0
- package/dist/provider/settings.d.ts.map +1 -0
- package/dist/provider/settings.jsx +45 -0
- package/dist/provider/settings.jsx.map +1 -0
- package/dist/provider/theme-css.d.ts +12 -0
- package/dist/provider/theme-css.d.ts.map +1 -0
- package/dist/provider/theme-css.jsx +19 -0
- package/dist/provider/theme-css.jsx.map +1 -0
- package/dist/provider/theme-root.d.ts +10 -0
- package/dist/provider/theme-root.d.ts.map +1 -0
- package/dist/provider/theme-root.jsx +24 -0
- package/dist/provider/theme-root.jsx.map +1 -0
- package/dist/provider/theme.css +473 -0
- package/dist/provider/theme.css.map +1 -0
- package/dist/range-slider/index.d.ts +3 -0
- package/dist/range-slider/index.d.ts.map +1 -0
- package/dist/range-slider/index.jsx +2 -0
- package/dist/range-slider/math.d.ts +23 -0
- package/dist/range-slider/math.d.ts.map +1 -0
- package/dist/range-slider/math.jsx +71 -0
- package/dist/range-slider/math.jsx.map +1 -0
- package/dist/range-slider/range-slider.css +90 -0
- package/dist/range-slider/range-slider.css.map +1 -0
- package/dist/range-slider/range-slider.d.ts +52 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -0
- package/dist/range-slider/range-slider.jsx +159 -0
- package/dist/range-slider/range-slider.jsx.map +1 -0
- package/dist/selection/index.d.ts +5 -0
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/selection/index.jsx +3 -0
- package/dist/selection/model.d.ts +53 -0
- package/dist/selection/model.d.ts.map +1 -0
- package/dist/selection/model.jsx +69 -0
- package/dist/selection/model.jsx.map +1 -0
- package/dist/selection/selection-sheet.d.ts +80 -0
- package/dist/selection/selection-sheet.d.ts.map +1 -0
- package/dist/selection/selection-sheet.jsx +366 -0
- package/dist/selection/selection-sheet.jsx.map +1 -0
- package/dist/selection/selection.css +76 -0
- package/dist/selection/selection.css.map +1 -0
- package/dist/selection/use-selection-model.d.ts +9 -0
- package/dist/selection/use-selection-model.d.ts.map +1 -0
- package/dist/selection/use-selection-model.jsx +22 -0
- package/dist/selection/use-selection-model.jsx.map +1 -0
- package/dist/sheet/frame.d.ts +47 -0
- package/dist/sheet/frame.d.ts.map +1 -0
- package/dist/sheet/frame.jsx +270 -0
- package/dist/sheet/frame.jsx.map +1 -0
- package/dist/sheet/gesture.d.ts +51 -0
- package/dist/sheet/gesture.d.ts.map +1 -0
- package/dist/sheet/gesture.jsx +107 -0
- package/dist/sheet/gesture.jsx.map +1 -0
- package/dist/sheet/handoff.d.ts +32 -0
- package/dist/sheet/handoff.d.ts.map +1 -0
- package/dist/sheet/handoff.jsx +33 -0
- package/dist/sheet/handoff.jsx.map +1 -0
- package/dist/sheet/header.d.ts +46 -0
- package/dist/sheet/header.d.ts.map +1 -0
- package/dist/sheet/header.jsx +158 -0
- package/dist/sheet/header.jsx.map +1 -0
- package/dist/sheet/height-memo.d.ts +47 -0
- package/dist/sheet/height-memo.d.ts.map +1 -0
- package/dist/sheet/height-memo.jsx +100 -0
- package/dist/sheet/height-memo.jsx.map +1 -0
- package/dist/sheet/index.d.ts +12 -0
- package/dist/sheet/index.d.ts.map +1 -0
- package/dist/sheet/index.jsx +11 -0
- package/dist/sheet/loadable.d.ts +35 -0
- package/dist/sheet/loadable.d.ts.map +1 -0
- package/dist/sheet/loadable.jsx +65 -0
- package/dist/sheet/loadable.jsx.map +1 -0
- package/dist/sheet/motion.d.ts +59 -0
- package/dist/sheet/motion.d.ts.map +1 -0
- package/dist/sheet/motion.jsx +59 -0
- package/dist/sheet/motion.jsx.map +1 -0
- package/dist/sheet/options.d.ts +252 -0
- package/dist/sheet/options.d.ts.map +1 -0
- package/dist/sheet/options.jsx +92 -0
- package/dist/sheet/options.jsx.map +1 -0
- package/dist/sheet/processing.d.ts +22 -0
- package/dist/sheet/processing.d.ts.map +1 -0
- package/dist/sheet/processing.jsx +66 -0
- package/dist/sheet/processing.jsx.map +1 -0
- package/dist/sheet/service.d.ts +55 -0
- package/dist/sheet/service.d.ts.map +1 -0
- package/dist/sheet/service.jsx +143 -0
- package/dist/sheet/service.jsx.map +1 -0
- package/dist/sheet/sheet.css +246 -0
- package/dist/sheet/sheet.css.map +1 -0
- package/dist/sheet/sheet.d.ts +19 -0
- package/dist/sheet/sheet.d.ts.map +1 -0
- package/dist/sheet/sheet.jsx +40 -0
- package/dist/sheet/sheet.jsx.map +1 -0
- package/dist/sheet/sizing.d.ts +87 -0
- package/dist/sheet/sizing.d.ts.map +1 -0
- package/dist/sheet/sizing.jsx +159 -0
- package/dist/sheet/sizing.jsx.map +1 -0
- package/dist/sheet/stack.d.ts +161 -0
- package/dist/sheet/stack.d.ts.map +1 -0
- package/dist/sheet/stack.jsx +378 -0
- package/dist/sheet/stack.jsx.map +1 -0
- package/dist/swipe/index.d.ts +3 -0
- package/dist/swipe/index.d.ts.map +1 -0
- package/dist/swipe/index.jsx +2 -0
- package/dist/swipe/model.d.ts +72 -0
- package/dist/swipe/model.d.ts.map +1 -0
- package/dist/swipe/model.jsx +66 -0
- package/dist/swipe/model.jsx.map +1 -0
- package/dist/swipe/swipe-view.d.ts +40 -0
- package/dist/swipe/swipe-view.d.ts.map +1 -0
- package/dist/swipe/swipe-view.jsx +163 -0
- package/dist/swipe/swipe-view.jsx.map +1 -0
- package/dist/swipe/swipe.css +34 -0
- package/dist/swipe/swipe.css.map +1 -0
- package/dist/tab-bar/index.d.ts +4 -0
- package/dist/tab-bar/index.d.ts.map +1 -0
- package/dist/tab-bar/index.jsx +3 -0
- package/dist/tab-bar/metrics.d.ts +230 -0
- package/dist/tab-bar/metrics.d.ts.map +1 -0
- package/dist/tab-bar/metrics.jsx +221 -0
- package/dist/tab-bar/metrics.jsx.map +1 -0
- package/dist/tab-bar/model.d.ts +170 -0
- package/dist/tab-bar/model.d.ts.map +1 -0
- package/dist/tab-bar/model.jsx +349 -0
- package/dist/tab-bar/model.jsx.map +1 -0
- package/dist/tab-bar/tab-bar.css +173 -0
- package/dist/tab-bar/tab-bar.css.map +1 -0
- package/dist/tab-bar/tab-bar.d.ts +61 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -0
- package/dist/tab-bar/tab-bar.jsx +346 -0
- package/dist/tab-bar/tab-bar.jsx.map +1 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.jsx +2 -0
- package/dist/tabs/model.d.ts +83 -0
- package/dist/tabs/model.d.ts.map +1 -0
- package/dist/tabs/model.jsx +113 -0
- package/dist/tabs/model.jsx.map +1 -0
- package/dist/tabs/tab-view.d.ts +47 -0
- package/dist/tabs/tab-view.d.ts.map +1 -0
- package/dist/tabs/tab-view.jsx +227 -0
- package/dist/tabs/tab-view.jsx.map +1 -0
- package/dist/tabs/tabs.css +182 -0
- package/dist/tabs/tabs.css.map +1 -0
- package/dist/toast/index.d.ts +3 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.jsx +2 -0
- package/dist/toast/service.d.ts +48 -0
- package/dist/toast/service.d.ts.map +1 -0
- package/dist/toast/service.jsx +238 -0
- package/dist/toast/service.jsx.map +1 -0
- package/dist/toast/store.d.ts +176 -0
- package/dist/toast/store.d.ts.map +1 -0
- package/dist/toast/store.jsx +355 -0
- package/dist/toast/store.jsx.map +1 -0
- package/dist/toast/toast.css +159 -0
- package/dist/toast/toast.css.map +1 -0
- package/dist/toggle/checkbox-math.d.ts +52 -0
- package/dist/toggle/checkbox-math.d.ts.map +1 -0
- package/dist/toggle/checkbox-math.jsx +111 -0
- package/dist/toggle/checkbox-math.jsx.map +1 -0
- package/dist/toggle/checkbox.d.ts +56 -0
- package/dist/toggle/checkbox.d.ts.map +1 -0
- package/dist/toggle/checkbox.jsx +152 -0
- package/dist/toggle/checkbox.jsx.map +1 -0
- package/dist/toggle/chip-group.d.ts +50 -0
- package/dist/toggle/chip-group.d.ts.map +1 -0
- package/dist/toggle/chip-group.jsx +107 -0
- package/dist/toggle/chip-group.jsx.map +1 -0
- package/dist/toggle/index.d.ts +5 -0
- package/dist/toggle/index.d.ts.map +1 -0
- package/dist/toggle/index.jsx +4 -0
- package/dist/toggle/switch.d.ts +52 -0
- package/dist/toggle/switch.d.ts.map +1 -0
- package/dist/toggle/switch.jsx +192 -0
- package/dist/toggle/switch.jsx.map +1 -0
- package/dist/toggle/toggle.css +188 -0
- package/dist/toggle/toggle.css.map +1 -0
- package/package.json +155 -4
- package/rspeedy/index.d.ts +21 -0
- package/rspeedy/index.mjs +75 -0
- package/rspeedy/index.test.mjs +52 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { currentPlatform } from './sizing.js';
|
|
2
|
+
/** ViewDragHelper `BASE_SETTLE_DURATION` (ms). */
|
|
3
|
+
export declare const g9MaterialBaseSettleMs = 256;
|
|
4
|
+
/** ViewDragHelper `MAX_SETTLE_DURATION` (ms). */
|
|
5
|
+
export declare const g9MaterialMaxSettleMs = 600;
|
|
6
|
+
/** UIKit's default transition spring, critically damped as Core Animation runs it: ω₀ = √(1000 / 3) rad/s. */
|
|
7
|
+
export declare const g9CupertinoOmega: number;
|
|
8
|
+
/** Material settle duration (ms) for a programmatic move over `distanceRatio` of the host height. */
|
|
9
|
+
export declare function materialSettleDurationMs(distanceRatio: number): number;
|
|
10
|
+
/** ViewDragHelper's `sInterpolator`: `(t − 1)^5 + 1`. */
|
|
11
|
+
export declare function materialSettle(t: number): number;
|
|
12
|
+
/** Main-thread twin of {@link materialSettle} (the curve lynx-ui calls every frame). */
|
|
13
|
+
export declare function materialSettleMT(t: number): number;
|
|
14
|
+
/** The timed style's curve (MAUI `Easing.CubicOut`). */
|
|
15
|
+
export declare function easeOutCubic(t: number): number;
|
|
16
|
+
/** Main-thread twin of {@link easeOutCubic}. */
|
|
17
|
+
export declare function easeOutCubicMT(t: number): number;
|
|
18
|
+
/** A lynx-ui sheet transition. */
|
|
19
|
+
export type G9SheetTransition = {
|
|
20
|
+
readonly type: 'tween' /** milliseconds (lynx-ui's unit) */;
|
|
21
|
+
readonly duration: number;
|
|
22
|
+
readonly ease: (t: number) => number;
|
|
23
|
+
} | {
|
|
24
|
+
readonly type: 'spring';
|
|
25
|
+
readonly stiffness: number;
|
|
26
|
+
readonly damping: number;
|
|
27
|
+
readonly mass: number;
|
|
28
|
+
};
|
|
29
|
+
/** The lynx-ui motion of one sheet: `SheetContent`'s `enterAnimation`, `exitAnimation`, `snapAnimation`. */
|
|
30
|
+
export interface G9SheetMotion {
|
|
31
|
+
readonly enterAnimation: G9SheetTransition;
|
|
32
|
+
readonly exitAnimation: G9SheetTransition;
|
|
33
|
+
readonly snapAnimation: G9SheetTransition;
|
|
34
|
+
}
|
|
35
|
+
/** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */
|
|
36
|
+
export interface G9SheetMotionInput {
|
|
37
|
+
readonly style: 'platformNative' | 'timed';
|
|
38
|
+
readonly platform: ReturnType<typeof currentPlatform>;
|
|
39
|
+
/** Share of the host the sheet covers where it opens and from where it closes. */
|
|
40
|
+
readonly openRatio: number;
|
|
41
|
+
/** Share of the host between the smallest and the largest detent (snap travel). */
|
|
42
|
+
readonly snapRatio: number;
|
|
43
|
+
/** Settings or per-sheet open duration (ms); used by `timed`, and by `platformNative` when `perSheetOpen`. */
|
|
44
|
+
readonly openMs: number;
|
|
45
|
+
readonly closeMs: number;
|
|
46
|
+
/** A per-sheet `openAnimationDurationMs` / `closeAnimationDurationMs` was set: it sets the time, the curve stays. */
|
|
47
|
+
readonly perSheetOpen: boolean;
|
|
48
|
+
readonly perSheetClose: boolean;
|
|
49
|
+
/** `timed` only: partial travel takes the matching slice of the duration (`sizeScaledAnimationDuration`). */
|
|
50
|
+
readonly sizeScaled: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The lynx-ui motion for a sheet (MAUI `ResolveSheetMotion`). `platformNative`: Material settle tweens on Android,
|
|
54
|
+
* Windows and unknown hosts (durations from the travel), the critically damped UIKit spring on iOS and macOS; a
|
|
55
|
+
* per-sheet duration replaces the time for its direction and keeps the platform curve (a quintic tween). `timed`: the
|
|
56
|
+
* configured durations on a cubic ease-out, size-scaled when enabled; snapping keeps the full open duration.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveSheetMotion(input: G9SheetMotionInput): G9SheetMotion;
|
|
59
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/sheet/motion.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA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,gBAAgB,GAAG,OAAO,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACtD,kFAAkF;IAClF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8GAA8G;IAC9G,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qHAAqH;IACrH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,6GAA6G;IAC7G,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAaD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAgC3E"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const g9MaterialBaseSettleMs = 256;
|
|
2
|
+
const g9MaterialMaxSettleMs = 600;
|
|
3
|
+
const g9CupertinoOmega = Math.sqrt(1000 / 3);
|
|
4
|
+
function materialSettleDurationMs(distanceRatio) {
|
|
5
|
+
const ratio = Number.isFinite(distanceRatio) ? Math.min(1, Math.max(0, distanceRatio)) : 1;
|
|
6
|
+
return Math.min(g9MaterialMaxSettleMs, Math.round((ratio + 1) * g9MaterialBaseSettleMs));
|
|
7
|
+
}
|
|
8
|
+
function materialSettle(t) {
|
|
9
|
+
const u = t - 1;
|
|
10
|
+
return u * u * u * u * u + 1;
|
|
11
|
+
}
|
|
12
|
+
function materialSettleMT(t) {
|
|
13
|
+
'main thread';
|
|
14
|
+
const u = t - 1;
|
|
15
|
+
return u * u * u * u * u + 1;
|
|
16
|
+
}
|
|
17
|
+
function easeOutCubic(t) {
|
|
18
|
+
const u = 1 - t;
|
|
19
|
+
return 1 - u * u * u;
|
|
20
|
+
}
|
|
21
|
+
function easeOutCubicMT(t) {
|
|
22
|
+
'main thread';
|
|
23
|
+
const u = 1 - t;
|
|
24
|
+
return 1 - u * u * u;
|
|
25
|
+
}
|
|
26
|
+
const tween = (ms, ease)=>({
|
|
27
|
+
type: 'tween',
|
|
28
|
+
duration: Math.max(0, ms),
|
|
29
|
+
ease
|
|
30
|
+
});
|
|
31
|
+
const scaled = (ms, ratio, sizeScaled)=>ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;
|
|
32
|
+
function resolveSheetMotion(input) {
|
|
33
|
+
if ('timed' === input.style) return {
|
|
34
|
+
enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
|
|
35
|
+
exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
|
|
36
|
+
snapAnimation: tween(input.openMs, easeOutCubicMT)
|
|
37
|
+
};
|
|
38
|
+
if ('ios' === input.platform || 'macos' === input.platform) {
|
|
39
|
+
const spring = {
|
|
40
|
+
type: 'spring',
|
|
41
|
+
stiffness: g9CupertinoOmega * g9CupertinoOmega,
|
|
42
|
+
damping: 2 * g9CupertinoOmega,
|
|
43
|
+
mass: 1
|
|
44
|
+
};
|
|
45
|
+
return {
|
|
46
|
+
enterAnimation: input.perSheetOpen ? tween(input.openMs, materialSettleMT) : spring,
|
|
47
|
+
exitAnimation: input.perSheetClose ? tween(input.closeMs, materialSettleMT) : spring,
|
|
48
|
+
snapAnimation: spring
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
enterAnimation: tween(input.perSheetOpen ? input.openMs : materialSettleDurationMs(input.openRatio), materialSettleMT),
|
|
53
|
+
exitAnimation: tween(input.perSheetClose ? input.closeMs : materialSettleDurationMs(input.openRatio), materialSettleMT),
|
|
54
|
+
snapAnimation: tween(materialSettleDurationMs(input.snapRatio), materialSettleMT)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export { easeOutCubic, easeOutCubicMT, g9CupertinoOmega, g9MaterialBaseSettleMs, g9MaterialMaxSettleMs, materialSettle, materialSettleDurationMs, materialSettleMT, resolveSheetMotion };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=motion.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/motion.jsx","sources":["../../src/sheet/motion.ts"],"sourcesContent":["// How a G9 sheet moves on lynx-ui: the open, close and snap configs handed to lynx-ui `SheetContent`.\n//\n// MAUI `G9SheetMotionModel` (G9MAUIControls 1.4.0, BottomSheet/G9SheetView/G9SheetMotionModel.cs) is the reference:\n// • platformNative on Android (and Windows): Material's settle, androidx ViewDragHelper — a quintic ease-out\n// `(t − 1)^5 + 1` lasting `(distance / range + 1) × 256 ms`, at most 600 ms (256 ms for a nudge, 512 ms for the\n// whole screen; 90 % of the way is covered in the first 37 % of the time);\n// • platformNative on iOS / macOS: UIKit's default transition spring as Core Animation runs it, critically damped,\n// ω₀ = √(1000 / 3) — mass 1, stiffness ω₀², damping 2ω₀ for lynx-ui's spring;\n// • timed: the configured duration (size-scaled when enabled) on a cubic ease-out.\n// Before this module the port gave platformNative lynx-ui's default spring (stiffness 200, damping 60, mass 1): an\n// over-damped spring (ζ ≈ 2.1) that takes ~1.3 s to come to rest, a sluggish tail no AgriPad user had seen.\n//\n// lynx-ui runs the curve inside a main-thread worklet, so the curve must be a `'main thread'` function: a plain\n// background function cannot be called there (plan/specs/02 §3). Each\n// curve is a twin: `x` (background, tests, durations) and `xMT` (the worklet), asserted equal.\n\nimport type { currentPlatform } from './sizing';\n\n/** ViewDragHelper `BASE_SETTLE_DURATION` (ms). */\nexport const g9MaterialBaseSettleMs = 256;\n/** ViewDragHelper `MAX_SETTLE_DURATION` (ms). */\nexport const g9MaterialMaxSettleMs = 600;\n/** UIKit's default transition spring, critically damped as Core Animation runs it: ω₀ = √(1000 / 3) rad/s. */\nexport const g9CupertinoOmega = Math.sqrt(1000 / 3);\n\n/** Material settle duration (ms) for a programmatic move over `distanceRatio` of the host height. */\nexport function materialSettleDurationMs(distanceRatio: number): number {\n const ratio = Number.isFinite(distanceRatio) ? Math.min(1, Math.max(0, distanceRatio)) : 1;\n return Math.min(g9MaterialMaxSettleMs, Math.round((ratio + 1) * g9MaterialBaseSettleMs));\n}\n\n/** ViewDragHelper's `sInterpolator`: `(t − 1)^5 + 1`. */\nexport function materialSettle(t: number): number {\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** Main-thread twin of {@link materialSettle} (the curve lynx-ui calls every frame). */\nexport function materialSettleMT(t: number): number {\n 'main thread';\n const u = t - 1;\n return u * u * u * u * u + 1;\n}\n\n/** The timed style's curve (MAUI `Easing.CubicOut`). */\nexport function easeOutCubic(t: number): number {\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** Main-thread twin of {@link easeOutCubic}. */\nexport function easeOutCubicMT(t: number): number {\n 'main thread';\n const u = 1 - t;\n return 1 - u * u * u;\n}\n\n/** A lynx-ui sheet transition. */\nexport type G9SheetTransition =\n | {\n readonly type: 'tween' /** milliseconds (lynx-ui's unit) */;\n readonly duration: number;\n readonly ease: (t: number) => number;\n }\n | { readonly type: 'spring'; readonly stiffness: number; readonly damping: number; readonly mass: number };\n\n/** The lynx-ui motion of one sheet: `SheetContent`'s `enterAnimation`, `exitAnimation`, `snapAnimation`. */\nexport interface G9SheetMotion {\n readonly enterAnimation: G9SheetTransition;\n readonly exitAnimation: G9SheetTransition;\n readonly snapAnimation: G9SheetTransition;\n}\n\n/** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */\nexport interface G9SheetMotionInput {\n readonly style: 'platformNative' | 'timed';\n readonly platform: ReturnType<typeof currentPlatform>;\n /** Share of the host the sheet covers where it opens and from where it closes. */\n readonly openRatio: number;\n /** Share of the host between the smallest and the largest detent (snap travel). */\n readonly snapRatio: number;\n /** Settings or per-sheet open duration (ms); used by `timed`, and by `platformNative` when `perSheetOpen`. */\n readonly openMs: number;\n readonly closeMs: number;\n /** A per-sheet `openAnimationDurationMs` / `closeAnimationDurationMs` was set: it sets the time, the curve stays. */\n readonly perSheetOpen: boolean;\n readonly perSheetClose: boolean;\n /** `timed` only: partial travel takes the matching slice of the duration (`sizeScaledAnimationDuration`). */\n readonly sizeScaled: boolean;\n}\n\n// lynx-ui-sheet takes a tween's duration in MILLISECONDS (useSnap: `animate(…, { duration: (duration ?? 400) / 1000 })`).\n// This used to convert to seconds first, so a 199 ms open ran for 0.2 ms: every sheet jumped into place, no motion.\nconst tween = (ms: number, ease: (t: number) => number): G9SheetTransition => ({\n type: 'tween',\n duration: Math.max(0, ms),\n ease,\n});\n\nconst scaled = (ms: number, ratio: number, sizeScaled: boolean) =>\n ms <= 0 ? 0 : sizeScaled ? Math.max(1, Math.round(ms * Math.min(1, Math.max(0, ratio)))) : ms;\n\n/**\n * The lynx-ui motion for a sheet (MAUI `ResolveSheetMotion`). `platformNative`: Material settle tweens on Android,\n * Windows and unknown hosts (durations from the travel), the critically damped UIKit spring on iOS and macOS; a\n * per-sheet duration replaces the time for its direction and keeps the platform curve (a quintic tween). `timed`: the\n * configured durations on a cubic ease-out, size-scaled when enabled; snapping keeps the full open duration.\n */\nexport function resolveSheetMotion(input: G9SheetMotionInput): G9SheetMotion {\n if (input.style === 'timed') {\n return {\n enterAnimation: tween(scaled(input.openMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),\n snapAnimation: tween(input.openMs, easeOutCubicMT),\n };\n }\n if (input.platform === 'ios' || input.platform === 'macos') {\n const spring: G9SheetTransition = {\n type: 'spring',\n stiffness: g9CupertinoOmega * g9CupertinoOmega,\n damping: 2 * g9CupertinoOmega,\n mass: 1,\n };\n return {\n enterAnimation: input.perSheetOpen ? tween(input.openMs, materialSettleMT) : spring,\n exitAnimation: input.perSheetClose ? tween(input.closeMs, materialSettleMT) : spring,\n snapAnimation: spring,\n };\n }\n return {\n enterAnimation: tween(\n input.perSheetOpen ? input.openMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n exitAnimation: tween(\n input.perSheetClose ? input.closeMs : materialSettleDurationMs(input.openRatio),\n materialSettleMT,\n ),\n snapAnimation: tween(materialSettleDurationMs(input.snapRatio), materialSettleMT),\n };\n}\n"],"names":["g9MaterialBaseSettleMs","g9MaterialMaxSettleMs","g9CupertinoOmega","Math","materialSettleDurationMs","distanceRatio","ratio","Number","materialSettle","t","u","materialSettleMT","easeOutCubic","easeOutCubicMT","tween","ms","ease","scaled","sizeScaled","resolveSheetMotion","input","spring"],"mappings":"AAmBO,MAAMA,yBAAyB;AAE/B,MAAMC,wBAAwB;AAE9B,MAAMC,mBAAmBC,KAAK,IAAI,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,IAAIA,IAAI;AAC7B;AAGO,SAASC,iBAAiBF,CAAS;IACxC;IACA,MAAMC,IAAID,IAAI;IACd,OAAOC,IAAIA,IAAIA,IAAIA,IAAIA,IAAI;AAC7B;AAGO,SAASE,aAAaH,CAAS;IACpC,MAAMC,IAAI,IAAID;IACd,OAAO,IAAIC,IAAIA,IAAIA;AACrB;AAGO,SAASG,eAAeJ,CAAS;IACtC;IACA,MAAMC,IAAI,IAAID;IACd,OAAO,IAAIC,IAAIA,IAAIA;AACrB;AAsCA,MAAMI,QAAQ,CAACC,IAAYC,OAAoD;QAC7E,MAAM;QACN,UAAUb,KAAK,GAAG,CAAC,GAAGY;QACtBC;IACF;AAEA,MAAMC,SAAS,CAACF,IAAYT,OAAeY,aACzCH,MAAM,IAAI,IAAIG,aAAaf,KAAK,GAAG,CAAC,GAAGA,KAAK,KAAK,CAACY,KAAKZ,KAAK,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC,GAAGG,YAAYS;AAQtF,SAASI,mBAAmBC,KAAyB;IAC1D,IAAIA,AAAgB,YAAhBA,MAAM,KAAK,EACb,OAAO;QACL,gBAAgBN,MAAMG,OAAOG,MAAM,MAAM,EAAEA,MAAM,SAAS,EAAEA,MAAM,UAAU,GAAGP;QAC/E,eAAeC,MAAMG,OAAOG,MAAM,OAAO,EAAEA,MAAM,SAAS,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,MAAMC,SAA4B;YAChC,MAAM;YACN,WAAWnB,mBAAmBA;YAC9B,SAAS,IAAIA;YACb,MAAM;QACR;QACA,OAAO;YACL,gBAAgBkB,MAAM,YAAY,GAAGN,MAAMM,MAAM,MAAM,EAAET,oBAAoBU;YAC7E,eAAeD,MAAM,aAAa,GAAGN,MAAMM,MAAM,OAAO,EAAET,oBAAoBU;YAC9E,eAAeA;QACjB;IACF;IACA,OAAO;QACL,gBAAgBP,MACdM,MAAM,YAAY,GAAGA,MAAM,MAAM,GAAGhB,yBAAyBgB,MAAM,SAAS,GAC5ET;QAEF,eAAeG,MACbM,MAAM,aAAa,GAAGA,MAAM,OAAO,GAAGhB,yBAAyBgB,MAAM,SAAS,GAC9ET;QAEF,eAAeG,MAAMV,yBAAyBgB,MAAM,SAAS,GAAGT;IAClE;AACF"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import type { ReactNode } from '@lynx-js/react';
|
|
2
|
+
import type { G9BottomSheetLoadingSkeleton } from '../display/shimmer.js';
|
|
3
|
+
import type { G9IconInput } from '../icon/icon.js';
|
|
4
|
+
/** Detents (MAUI `G9BottomSheetState`): peek (collapsed height), medium (half), large (full). */
|
|
5
|
+
export type G9SheetDetent = 'peek' | 'medium' | 'large';
|
|
6
|
+
/** Detent sizing or fit-to-content (MAUI `G9BottomSheetSizeMode`). */
|
|
7
|
+
export type G9SheetSizeMode = 'states' | 'fitToContent';
|
|
8
|
+
/** Header title anchor (MAUI `G9BottomSheetHeaderTitlePlacement`). */
|
|
9
|
+
export type G9SheetHeaderTitlePlacement = 'center' | 'nearBack';
|
|
10
|
+
/** Where a back request came from (MAUI `G9BottomSheetBackRequestSource` + drag-to-close). */
|
|
11
|
+
export type G9SheetBackSource = 'toolbarButton' | 'hardwareButton' | 'overlayTap' | 'drag';
|
|
12
|
+
/** What `onBackRequested` decides (MAUI `G9BottomSheetBackAction`). */
|
|
13
|
+
export type G9SheetBackAction = 'close' | 'doNothing';
|
|
14
|
+
/** Content width (MAUI `G9SheetViewContentWidthMode`). */
|
|
15
|
+
export type G9SheetContentWidthMode = 'full' | 'custom';
|
|
16
|
+
/** A header toolbar action (MAUI `G9BottomSheetToolbarItem`). */
|
|
17
|
+
export interface G9SheetToolbarItem {
|
|
18
|
+
/** Glyph/icon. */
|
|
19
|
+
readonly icon?: G9IconInput;
|
|
20
|
+
/** Text (when there is no icon). */
|
|
21
|
+
readonly text?: string;
|
|
22
|
+
/** The action (MAUI `AsyncAction`/`Command`); a returned promise keeps the item busy while `disableWhileBusy`. */
|
|
23
|
+
readonly onPress?: () => unknown;
|
|
24
|
+
readonly isBusy?: boolean;
|
|
25
|
+
/** Spinner while busy. Default false. */
|
|
26
|
+
readonly showBusyIndicator?: boolean;
|
|
27
|
+
readonly isActive?: boolean;
|
|
28
|
+
/** Dot while active. Default false. */
|
|
29
|
+
readonly showActiveBadge?: boolean;
|
|
30
|
+
/** Ignore presses while busy. Default true. */
|
|
31
|
+
readonly disableWhileBusy?: boolean;
|
|
32
|
+
/** Default true. */
|
|
33
|
+
readonly animatePress?: boolean;
|
|
34
|
+
/** 0 → 24. */
|
|
35
|
+
readonly iconSize?: number;
|
|
36
|
+
readonly accessibilityLabel?: string;
|
|
37
|
+
/** Element id of the item (default `${sheet automationId}_ToolbarItem_${key or index}` when the sheet has one). */
|
|
38
|
+
readonly automationId?: string;
|
|
39
|
+
/** Stable key (default the index). */
|
|
40
|
+
readonly key?: string;
|
|
41
|
+
}
|
|
42
|
+
/** Lifecycle callbacks of one sheet (MAUI `Opening/Opened/Closing/ClosedCommand`). */
|
|
43
|
+
export interface G9SheetLifecycle {
|
|
44
|
+
/** When the sheet starts opening. */
|
|
45
|
+
readonly onOpening?: () => void;
|
|
46
|
+
/** After the open motion (or its timer fallback). */
|
|
47
|
+
readonly onOpened?: () => void;
|
|
48
|
+
/** Once, when closing starts (not on an in-place replace). */
|
|
49
|
+
readonly onClosing?: () => void;
|
|
50
|
+
/** Once, at cleanup. */
|
|
51
|
+
readonly onClosed?: () => void;
|
|
52
|
+
/** The sheet came to rest at another detent (MAUI `G9SheetView.StateChanged`), with its height in px. */
|
|
53
|
+
readonly onStateChanged?: (detent: G9SheetDetent | 'fit', heightPx: number) => void;
|
|
54
|
+
}
|
|
55
|
+
/** Everything a sheet can be opened with (MAUI `G9BottomSheetOptions`; 77 properties + presets). */
|
|
56
|
+
export interface G9SheetOptions extends G9SheetLifecycle {
|
|
57
|
+
/** Initial detent. Default `'medium'`. */
|
|
58
|
+
readonly currentState?: G9SheetDetent;
|
|
59
|
+
/** Allowed detents. Default `['medium', 'large']`. */
|
|
60
|
+
readonly states?: ReadonlyArray<G9SheetDetent>;
|
|
61
|
+
/** Default `'states'`. */
|
|
62
|
+
readonly sizeMode?: G9SheetSizeMode;
|
|
63
|
+
/** Dim scrim that blocks the page. Default true. */
|
|
64
|
+
readonly isModal?: boolean;
|
|
65
|
+
/** Overlay tap / drag may close. Default true. */
|
|
66
|
+
readonly isCancelable?: boolean;
|
|
67
|
+
/** Default true. */
|
|
68
|
+
readonly isDraggable?: boolean;
|
|
69
|
+
/** Grabber. Default true. */
|
|
70
|
+
readonly hasHandle?: boolean;
|
|
71
|
+
/** Peek height (dp). Default 100 (with `collapsedHeight`). */
|
|
72
|
+
readonly peekHeight?: number | null;
|
|
73
|
+
/** Alias of `peekHeight` (MAUI `CollapsedHeight`); wins when both are set. */
|
|
74
|
+
readonly collapsedHeight?: number | null;
|
|
75
|
+
/** Medium = host × ratio (0.1–0.9). Default 0.5. */
|
|
76
|
+
readonly halfExpandedRatio?: number | null;
|
|
77
|
+
/** Large = host × ratio (0.1–1). Default 1. */
|
|
78
|
+
readonly fullExpandedRatio?: number | null;
|
|
79
|
+
/** Cap of a fit sheet (0.2–1). Default 0.75. */
|
|
80
|
+
readonly maxFitToContentHeightRatio?: number;
|
|
81
|
+
/** The largest detent is sized to the content (states mode). Default false. */
|
|
82
|
+
readonly expandedFitsContent?: boolean;
|
|
83
|
+
/** A drag on a scroller expands the sheet first. Default true. */
|
|
84
|
+
readonly scrollingExpandsSheet?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The body is a vertical scroller (default true). `false` for content that scrolls itself — a `<list>` page, a map:
|
|
87
|
+
* the body becomes a flex column and the content fills it, so the content's own scroller gets a definite height (MAUI
|
|
88
|
+
* puts the content in the body as is; a CollectionView body scrolls itself). Lynx-only, additive. Use it with a
|
|
89
|
+
* detent-sized sheet (full screen / states); a fit-to-content sheet has no height to give.
|
|
90
|
+
*/
|
|
91
|
+
readonly scrollBody?: boolean;
|
|
92
|
+
/** Height memory key (needed for factory content). */
|
|
93
|
+
readonly heightMemoKey?: string | null;
|
|
94
|
+
/** Body padding. Default 0. */
|
|
95
|
+
readonly padding?: number;
|
|
96
|
+
/** 10 px gap under the header hairline. Default true. */
|
|
97
|
+
readonly useStandardBodyTopGap?: boolean;
|
|
98
|
+
/** Top corners. Default 12. */
|
|
99
|
+
readonly cornerRadius?: number;
|
|
100
|
+
/** Body background. Default `var(--g9-surface-container)`. */
|
|
101
|
+
readonly backgroundColor?: string | null;
|
|
102
|
+
/** Scrim colour; its alpha replaces the maximum opacity. */
|
|
103
|
+
readonly windowBackgroundColor?: string | null;
|
|
104
|
+
/** Default `'full'`. */
|
|
105
|
+
readonly contentWidthMode?: G9SheetContentWidthMode;
|
|
106
|
+
/** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */
|
|
107
|
+
readonly contentWidth?: number | null;
|
|
108
|
+
/**
|
|
109
|
+
* Full-screen sheets, and detent sheets resting at a `large` detent that reaches under the top inset, reserve the
|
|
110
|
+
* top inset (MAUI state-aware top padding). Default true.
|
|
111
|
+
*/
|
|
112
|
+
readonly useTopSafeAreaPadding?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* The surface reserves the host's bottom safe inset (a visible navigation bar or gesture handle) below the content
|
|
115
|
+
* and footer. 0 on an immersive host. Default true.
|
|
116
|
+
*/
|
|
117
|
+
readonly useBottomSafeAreaPadding?: boolean;
|
|
118
|
+
/** Default 0. */
|
|
119
|
+
readonly additionalTopSafeAreaPadding?: number;
|
|
120
|
+
/** Replaces the top padding (0 = flush). */
|
|
121
|
+
readonly topSafeAreaPaddingOverride?: number | null;
|
|
122
|
+
/** Grabber on full-screen toolbar sheets. Default true. */
|
|
123
|
+
readonly showFullScreenDragHandle?: boolean;
|
|
124
|
+
/** Page recede behind a tall primary sheet. Default true. */
|
|
125
|
+
readonly enableBackdropCardEffect?: boolean;
|
|
126
|
+
/** Visible ratio where the recede starts. Default 0.75. */
|
|
127
|
+
readonly backdropCardEffectThreshold?: number;
|
|
128
|
+
/** Per-sheet open duration (ms); default the settings value. */
|
|
129
|
+
readonly openAnimationDurationMs?: number | null;
|
|
130
|
+
readonly closeAnimationDurationMs?: number | null;
|
|
131
|
+
/** Factory content builds after the open motion (spinner/skeleton first). Default true. */
|
|
132
|
+
readonly deferContent?: boolean;
|
|
133
|
+
/** Delay before deferred content swaps in. Default 369. */
|
|
134
|
+
readonly loadDelayMs?: number;
|
|
135
|
+
/** The placeholder uses the full height. Default false. */
|
|
136
|
+
readonly useFullScreenLoadingPlaceholder?: boolean;
|
|
137
|
+
/** Known final body height for the placeholder. */
|
|
138
|
+
readonly deferredLoadingPlaceholderHeight?: number | null;
|
|
139
|
+
/** Covered crossfade reveal of deferred content. Default true. */
|
|
140
|
+
readonly fadeDeferredContentIn?: boolean;
|
|
141
|
+
/** Placeholder shape. Default `'none'` (spinner). */
|
|
142
|
+
readonly loadingSkeleton?: G9BottomSheetLoadingSkeleton;
|
|
143
|
+
/** 0 → the shape's default. */
|
|
144
|
+
readonly loadingSkeletonRowCount?: number;
|
|
145
|
+
/** The parent sinks and fades when this sheet stacks on it. Default true. */
|
|
146
|
+
readonly recedeParentOnStack?: boolean;
|
|
147
|
+
/** Hand-off: replaces the one open sheet once this one is ready. Default false. */
|
|
148
|
+
readonly replaceCurrentSheet?: boolean;
|
|
149
|
+
/** Three-slot header. Default false. */
|
|
150
|
+
readonly showToolbar?: boolean;
|
|
151
|
+
/** Leading back (or close) button. Default false. */
|
|
152
|
+
readonly showCloseButton?: boolean;
|
|
153
|
+
/** × instead of the back arrow. Default false. */
|
|
154
|
+
readonly useCloseIcon?: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Automation id of the sheet (MAUI `AutomationId`): the surface gets it, the header's back/close button
|
|
157
|
+
* `${id}_Back`, toolbar items `${id}_ToolbarItem_${key or index}` (see `g9ChildId`). Keep it to `[A-Za-z0-9_-]`.
|
|
158
|
+
*/
|
|
159
|
+
readonly automationId?: string;
|
|
160
|
+
readonly title?: string | null;
|
|
161
|
+
readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;
|
|
162
|
+
/** Items built from the content once it exists. */
|
|
163
|
+
readonly toolbarItemsFactory?: (() => ReadonlyArray<G9SheetToolbarItem>) | null;
|
|
164
|
+
/** Default `'center'`. */
|
|
165
|
+
readonly headerTitlePlacement?: G9SheetHeaderTitlePlacement;
|
|
166
|
+
/** Star/Auto/Star columns. Default true. */
|
|
167
|
+
readonly reserveEmptyHeaderSlots?: boolean;
|
|
168
|
+
readonly headerView?: ReactNode;
|
|
169
|
+
readonly headerLeadingView?: ReactNode;
|
|
170
|
+
readonly headerTitleView?: ReactNode;
|
|
171
|
+
readonly headerTrailingView?: ReactNode;
|
|
172
|
+
readonly headerLeadingAndTitleView?: ReactNode;
|
|
173
|
+
readonly headerTitleAndTrailingView?: ReactNode;
|
|
174
|
+
/**
|
|
175
|
+
* A footer that draws its own band (usually a component rendering {@link G9SheetFooterBar}, or nothing) — for
|
|
176
|
+
* buttons that come and go while the sheet is open. Wins over `footerView` and `footerButtons`.
|
|
177
|
+
*/
|
|
178
|
+
readonly footerBand?: ReactNode;
|
|
179
|
+
/** Custom footer inside the standard band; wins over `footerButtons`. */
|
|
180
|
+
readonly footerView?: ReactNode;
|
|
181
|
+
/** Equal-width footer buttons. */
|
|
182
|
+
readonly footerButtons?: ReadonlyArray<ReactNode> | null;
|
|
183
|
+
/** Default 3. */
|
|
184
|
+
readonly footerMaxButtonsPerRow?: number;
|
|
185
|
+
/** Hardware back closes. Default true. */
|
|
186
|
+
readonly hardwareBackCloses?: boolean;
|
|
187
|
+
/** Intercepts every back request (disables drag). */
|
|
188
|
+
readonly onBackRequested?: ((source: G9SheetBackSource) => G9SheetBackAction | Promise<G9SheetBackAction>) | null;
|
|
189
|
+
/** Max sheet width on Android (px). */
|
|
190
|
+
readonly androidMaxWidth?: number | null;
|
|
191
|
+
/** Max sheet height on Android (px). */
|
|
192
|
+
readonly androidMaxHeight?: number | null;
|
|
193
|
+
/** Margin around the sheet on Android `[l, t, r, b]`. */
|
|
194
|
+
readonly androidMargin?: readonly [number, number, number, number] | null;
|
|
195
|
+
/** Android half-expanded ratio override. */
|
|
196
|
+
readonly androidHalfExpandedRatio?: number | null;
|
|
197
|
+
/** Square the expanded corners on Android. */
|
|
198
|
+
readonly androidShouldRemoveExpandedCorners?: boolean | null;
|
|
199
|
+
readonly windowsMaxWidth?: number | null;
|
|
200
|
+
readonly windowsMaxHeight?: number | null;
|
|
201
|
+
readonly windowsMinWidth?: number | null;
|
|
202
|
+
readonly windowsMinHeight?: number | null;
|
|
203
|
+
/** Animate the scrim colour on iOS. Default true. */
|
|
204
|
+
readonly animateOverlayToColorOnIos?: boolean;
|
|
205
|
+
}
|
|
206
|
+
/** App-wide sheet settings (MAUI `G9BottomSheetSettings`), `<G9Provider settings={{ sheets }}>`. */
|
|
207
|
+
export interface G9SheetSettings {
|
|
208
|
+
/** Default black. */
|
|
209
|
+
readonly modalOverlayColor?: string;
|
|
210
|
+
/** Dim at the smallest detent (0–1). Default 0.3. */
|
|
211
|
+
readonly modalOverlayMinimumOpacity?: number;
|
|
212
|
+
/** Dim at full screen (0–1). Default 0.9. */
|
|
213
|
+
readonly modalOverlayMaximumOpacity?: number;
|
|
214
|
+
/** Default 300. */
|
|
215
|
+
readonly openAnimationDurationMs?: number;
|
|
216
|
+
/** Default 300. */
|
|
217
|
+
readonly closeAnimationDurationMs?: number;
|
|
218
|
+
/** Partial traversals take a proportional slice. Default true. */
|
|
219
|
+
readonly sizeScaledAnimationDuration?: boolean;
|
|
220
|
+
/** Global switch of the page recede. Default true. */
|
|
221
|
+
readonly enableBackdropCardEffect?: boolean;
|
|
222
|
+
/** Colour behind the receded page. Default black. */
|
|
223
|
+
readonly backdropCardColor?: string;
|
|
224
|
+
/** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */
|
|
225
|
+
readonly stageBeforeShow?: boolean;
|
|
226
|
+
/** Longest a hand-off waits for the successor to open before the old sheet closes anyway (0–5000). Default 250. */
|
|
227
|
+
readonly preOpenMaxHoldMs?: number;
|
|
228
|
+
/** Prebuilt (non-factory) content also waits behind the loading placeholder until after the open motion. Default false. */
|
|
229
|
+
readonly deferPrebuiltContent?: boolean;
|
|
230
|
+
/** `'platformNative'` (lynx-ui's motion) or `'timed'` (tween over the durations). Default platformNative. */
|
|
231
|
+
readonly motionStyle?: 'platformNative' | 'timed';
|
|
232
|
+
/** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */
|
|
233
|
+
readonly heightMemoVersion?: string;
|
|
234
|
+
/**
|
|
235
|
+
* Side padding of the header band (MAUI `G9LayoutMetrics.EdgeSpacing`, which an app may scale — AgriPad's 10 × 1.3
|
|
236
|
+
* = 13). Default 16.
|
|
237
|
+
*/
|
|
238
|
+
readonly headerEdgeSpacing?: number;
|
|
239
|
+
}
|
|
240
|
+
/** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */
|
|
241
|
+
export declare function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings>;
|
|
242
|
+
/** MAUI `DefaultOptions()`: medium, `[medium, large]`, modal, cancelable, handle, draggable. */
|
|
243
|
+
export declare function defaultSheetOptions(): G9SheetOptions;
|
|
244
|
+
/** MAUI `FitToContentOptions()`: sized to a non-scrolling body, capped at 75 % of the host. */
|
|
245
|
+
export declare function fitToContentSheetOptions(): G9SheetOptions;
|
|
246
|
+
/** MAUI `FullScreenWithoutHandleOptions()`. */
|
|
247
|
+
export declare function fullScreenWithoutHandleSheetOptions(): G9SheetOptions;
|
|
248
|
+
/** MAUI `FullScreenModalOptions(title, showCloseButton, hardwareBackCloses, toolbarItems)`. */
|
|
249
|
+
export declare function fullScreenModalSheetOptions(title?: string | null, showCloseButton?: boolean, hardwareBackCloses?: boolean, toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null): G9SheetOptions;
|
|
250
|
+
/** MAUI `FullScreenEdgeToEdgeModalOptions(hardwareBackCloses)`: no header, flush top. */
|
|
251
|
+
export declare function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses?: boolean): G9SheetOptions;
|
|
252
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +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,K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1,92 @@
|
|
|
1
|
+
const clamp = (v, lo, hi)=>Math.min(hi, Math.max(lo, v));
|
|
2
|
+
const finite = (v, fallback)=>'number' == typeof v && Number.isFinite(v) ? v : fallback;
|
|
3
|
+
function resolveSheetSettings(settings) {
|
|
4
|
+
var _s_modalOverlayColor, _s_sizeScaledAnimationDuration, _s_enableBackdropCardEffect, _s_backdropCardColor, _s_stageBeforeShow, _s_deferPrebuiltContent, _s_motionStyle, _s_heightMemoVersion;
|
|
5
|
+
const s = null != settings ? settings : {};
|
|
6
|
+
let min = clamp(finite(s.modalOverlayMinimumOpacity, 0.3), 0, 1);
|
|
7
|
+
let max = clamp(finite(s.modalOverlayMaximumOpacity, 0.9), 0, 1);
|
|
8
|
+
if (min > max) [min, max] = [
|
|
9
|
+
max,
|
|
10
|
+
min
|
|
11
|
+
];
|
|
12
|
+
return Object.freeze({
|
|
13
|
+
modalOverlayColor: null != (_s_modalOverlayColor = s.modalOverlayColor) ? _s_modalOverlayColor : '#000000',
|
|
14
|
+
modalOverlayMinimumOpacity: min,
|
|
15
|
+
modalOverlayMaximumOpacity: max,
|
|
16
|
+
openAnimationDurationMs: Math.max(0, finite(s.openAnimationDurationMs, 300)),
|
|
17
|
+
closeAnimationDurationMs: Math.max(0, finite(s.closeAnimationDurationMs, 300)),
|
|
18
|
+
sizeScaledAnimationDuration: null != (_s_sizeScaledAnimationDuration = s.sizeScaledAnimationDuration) ? _s_sizeScaledAnimationDuration : true,
|
|
19
|
+
enableBackdropCardEffect: null != (_s_enableBackdropCardEffect = s.enableBackdropCardEffect) ? _s_enableBackdropCardEffect : true,
|
|
20
|
+
backdropCardColor: null != (_s_backdropCardColor = s.backdropCardColor) ? _s_backdropCardColor : '#000000',
|
|
21
|
+
stageBeforeShow: null != (_s_stageBeforeShow = s.stageBeforeShow) ? _s_stageBeforeShow : true,
|
|
22
|
+
preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),
|
|
23
|
+
deferPrebuiltContent: null != (_s_deferPrebuiltContent = s.deferPrebuiltContent) ? _s_deferPrebuiltContent : false,
|
|
24
|
+
motionStyle: null != (_s_motionStyle = s.motionStyle) ? _s_motionStyle : 'platformNative',
|
|
25
|
+
heightMemoVersion: null != (_s_heightMemoVersion = s.heightMemoVersion) ? _s_heightMemoVersion : '0',
|
|
26
|
+
headerEdgeSpacing: Math.max(0, finite(s.headerEdgeSpacing, 16))
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function defaultSheetOptions() {
|
|
30
|
+
return {
|
|
31
|
+
currentState: 'medium',
|
|
32
|
+
states: [
|
|
33
|
+
'medium',
|
|
34
|
+
'large'
|
|
35
|
+
],
|
|
36
|
+
sizeMode: 'states',
|
|
37
|
+
halfExpandedRatio: 0.5,
|
|
38
|
+
fullExpandedRatio: 1
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function fitToContentSheetOptions() {
|
|
42
|
+
return {
|
|
43
|
+
sizeMode: 'fitToContent',
|
|
44
|
+
isCancelable: true,
|
|
45
|
+
hasHandle: true,
|
|
46
|
+
isDraggable: true,
|
|
47
|
+
deferContent: true
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function fullScreenWithoutHandleSheetOptions() {
|
|
51
|
+
return {
|
|
52
|
+
currentState: 'large',
|
|
53
|
+
states: [
|
|
54
|
+
'large'
|
|
55
|
+
],
|
|
56
|
+
isCancelable: false,
|
|
57
|
+
isDraggable: false,
|
|
58
|
+
hasHandle: false,
|
|
59
|
+
deferContent: true
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function fullScreenModalSheetOptions(title, showCloseButton = true, hardwareBackCloses = true, toolbarItems) {
|
|
63
|
+
return {
|
|
64
|
+
currentState: 'large',
|
|
65
|
+
states: [
|
|
66
|
+
'large'
|
|
67
|
+
],
|
|
68
|
+
sizeMode: 'states',
|
|
69
|
+
isCancelable: false,
|
|
70
|
+
isDraggable: false,
|
|
71
|
+
hasHandle: false,
|
|
72
|
+
cornerRadius: 0,
|
|
73
|
+
backgroundColor: 'var(--g9-background)',
|
|
74
|
+
showToolbar: true,
|
|
75
|
+
showCloseButton,
|
|
76
|
+
title: null != title ? title : null,
|
|
77
|
+
toolbarItems: null != toolbarItems ? toolbarItems : null,
|
|
78
|
+
hardwareBackCloses
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses = true) {
|
|
82
|
+
return {
|
|
83
|
+
...fullScreenModalSheetOptions(null, false, hardwareBackCloses),
|
|
84
|
+
showToolbar: false,
|
|
85
|
+
useTopSafeAreaPadding: false,
|
|
86
|
+
topSafeAreaPaddingOverride: 0,
|
|
87
|
+
additionalTopSafeAreaPadding: 0
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, resolveSheetSettings };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=options.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/options.jsx","sources":["../../src/sheet/options.ts"],"sourcesContent":["import type { ReactNode } from '@lynx-js/react';\nimport type { G9BottomSheetLoadingSkeleton } from '../display/shimmer';\nimport type { G9IconInput } from '../icon/icon';\n\n// MAUI `G9BottomSheetOptions` / `G9BottomSheetSettings` and their enums (BottomSheet/G9BottomSheetOptions.cs).\n\n/** Detents (MAUI `G9BottomSheetState`): peek (collapsed height), medium (half), large (full). */\nexport type G9SheetDetent = 'peek' | 'medium' | 'large';\n/** Detent sizing or fit-to-content (MAUI `G9BottomSheetSizeMode`). */\nexport type G9SheetSizeMode = 'states' | 'fitToContent';\n/** Header title anchor (MAUI `G9BottomSheetHeaderTitlePlacement`). */\nexport type G9SheetHeaderTitlePlacement = 'center' | 'nearBack';\n/** Where a back request came from (MAUI `G9BottomSheetBackRequestSource` + drag-to-close). */\nexport type G9SheetBackSource = 'toolbarButton' | 'hardwareButton' | 'overlayTap' | 'drag';\n/** What `onBackRequested` decides (MAUI `G9BottomSheetBackAction`). */\nexport type G9SheetBackAction = 'close' | 'doNothing';\n/** Content width (MAUI `G9SheetViewContentWidthMode`). */\nexport type G9SheetContentWidthMode = 'full' | 'custom';\n\n/** A header toolbar action (MAUI `G9BottomSheetToolbarItem`). */\nexport interface G9SheetToolbarItem {\n /** Glyph/icon. */\n readonly icon?: G9IconInput;\n /** Text (when there is no icon). */\n readonly text?: string;\n /** The action (MAUI `AsyncAction`/`Command`); a returned promise keeps the item busy while `disableWhileBusy`. */\n readonly onPress?: () => unknown;\n readonly isBusy?: boolean;\n /** Spinner while busy. Default false. */\n readonly showBusyIndicator?: boolean;\n readonly isActive?: boolean;\n /** Dot while active. Default false. */\n readonly showActiveBadge?: boolean;\n /** Ignore presses while busy. Default true. */\n readonly disableWhileBusy?: boolean;\n /** Default true. */\n readonly animatePress?: boolean;\n /** 0 → 24. */\n readonly iconSize?: number;\n readonly accessibilityLabel?: string;\n /** Element id of the item (default `${sheet automationId}_ToolbarItem_${key or index}` when the sheet has one). */\n readonly automationId?: string;\n /** Stable key (default the index). */\n readonly key?: string;\n}\n\n/** Lifecycle callbacks of one sheet (MAUI `Opening/Opened/Closing/ClosedCommand`). */\nexport interface G9SheetLifecycle {\n /** When the sheet starts opening. */\n readonly onOpening?: () => void;\n /** After the open motion (or its timer fallback). */\n readonly onOpened?: () => void;\n /** Once, when closing starts (not on an in-place replace). */\n readonly onClosing?: () => void;\n /** Once, at cleanup. */\n readonly onClosed?: () => void;\n /** The sheet came to rest at another detent (MAUI `G9SheetView.StateChanged`), with its height in px. */\n readonly onStateChanged?: (detent: G9SheetDetent | 'fit', heightPx: number) => void;\n}\n\n/** Everything a sheet can be opened with (MAUI `G9BottomSheetOptions`; 77 properties + presets). */\nexport interface G9SheetOptions extends G9SheetLifecycle {\n // State and sizing\n /** Initial detent. Default `'medium'`. */\n readonly currentState?: G9SheetDetent;\n /** Allowed detents. Default `['medium', 'large']`. */\n readonly states?: ReadonlyArray<G9SheetDetent>;\n /** Default `'states'`. */\n readonly sizeMode?: G9SheetSizeMode;\n /** Dim scrim that blocks the page. Default true. */\n readonly isModal?: boolean;\n /** Overlay tap / drag may close. Default true. */\n readonly isCancelable?: boolean;\n /** Default true. */\n readonly isDraggable?: boolean;\n /** Grabber. Default true. */\n readonly hasHandle?: boolean;\n /** Peek height (dp). Default 100 (with `collapsedHeight`). */\n readonly peekHeight?: number | null;\n /** Alias of `peekHeight` (MAUI `CollapsedHeight`); wins when both are set. */\n readonly collapsedHeight?: number | null;\n /** Medium = host × ratio (0.1–0.9). Default 0.5. */\n readonly halfExpandedRatio?: number | null;\n /** Large = host × ratio (0.1–1). Default 1. */\n readonly fullExpandedRatio?: number | null;\n /** Cap of a fit sheet (0.2–1). Default 0.75. */\n readonly maxFitToContentHeightRatio?: number;\n /** The largest detent is sized to the content (states mode). Default false. */\n readonly expandedFitsContent?: boolean;\n /** A drag on a scroller expands the sheet first. Default true. */\n readonly scrollingExpandsSheet?: boolean;\n /**\n * The body is a vertical scroller (default true). `false` for content that scrolls itself — a `<list>` page, a map:\n * the body becomes a flex column and the content fills it, so the content's own scroller gets a definite height (MAUI\n * puts the content in the body as is; a CollectionView body scrolls itself). Lynx-only, additive. Use it with a\n * detent-sized sheet (full screen / states); a fit-to-content sheet has no height to give.\n */\n readonly scrollBody?: boolean;\n /** Height memory key (needed for factory content). */\n readonly heightMemoKey?: string | null;\n // Visual\n /** Body padding. Default 0. */\n readonly padding?: number;\n /** 10 px gap under the header hairline. Default true. */\n readonly useStandardBodyTopGap?: boolean;\n /** Top corners. Default 12. */\n readonly cornerRadius?: number;\n /** Body background. Default `var(--g9-surface-container)`. */\n readonly backgroundColor?: string | null;\n /** Scrim colour; its alpha replaces the maximum opacity. */\n readonly windowBackgroundColor?: string | null;\n /** Default `'full'`. */\n readonly contentWidthMode?: G9SheetContentWidthMode;\n /** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */\n readonly contentWidth?: number | null;\n /**\n * Full-screen sheets, and detent sheets resting at a `large` detent that reaches under the top inset, reserve the\n * top inset (MAUI state-aware top padding). Default true.\n */\n readonly useTopSafeAreaPadding?: boolean;\n /**\n * The surface reserves the host's bottom safe inset (a visible navigation bar or gesture handle) below the content\n * and footer. 0 on an immersive host. Default true.\n */\n readonly useBottomSafeAreaPadding?: boolean;\n /** Default 0. */\n readonly additionalTopSafeAreaPadding?: number;\n /** Replaces the top padding (0 = flush). */\n readonly topSafeAreaPaddingOverride?: number | null;\n /** Grabber on full-screen toolbar sheets. Default true. */\n readonly showFullScreenDragHandle?: boolean;\n /** Page recede behind a tall primary sheet. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Visible ratio where the recede starts. Default 0.75. */\n readonly backdropCardEffectThreshold?: number;\n // Animation and loading\n /** Per-sheet open duration (ms); default the settings value. */\n readonly openAnimationDurationMs?: number | null;\n readonly closeAnimationDurationMs?: number | null;\n /** Factory content builds after the open motion (spinner/skeleton first). Default true. */\n readonly deferContent?: boolean;\n /** Delay before deferred content swaps in. Default 369. */\n readonly loadDelayMs?: number;\n /** The placeholder uses the full height. Default false. */\n readonly useFullScreenLoadingPlaceholder?: boolean;\n /** Known final body height for the placeholder. */\n readonly deferredLoadingPlaceholderHeight?: number | null;\n /** Covered crossfade reveal of deferred content. Default true. */\n readonly fadeDeferredContentIn?: boolean;\n /** Placeholder shape. Default `'none'` (spinner). */\n readonly loadingSkeleton?: G9BottomSheetLoadingSkeleton;\n /** 0 → the shape's default. */\n readonly loadingSkeletonRowCount?: number;\n // Stack and replace\n /** The parent sinks and fades when this sheet stacks on it. Default true. */\n readonly recedeParentOnStack?: boolean;\n /** Hand-off: replaces the one open sheet once this one is ready. Default false. */\n readonly replaceCurrentSheet?: boolean;\n // Header and footer\n /** Three-slot header. Default false. */\n readonly showToolbar?: boolean;\n /** Leading back (or close) button. Default false. */\n readonly showCloseButton?: boolean;\n /** × instead of the back arrow. Default false. */\n readonly useCloseIcon?: boolean;\n /**\n * Automation id of the sheet (MAUI `AutomationId`): the surface gets it, the header's back/close button\n * `${id}_Back`, toolbar items `${id}_ToolbarItem_${key or index}` (see `g9ChildId`). Keep it to `[A-Za-z0-9_-]`.\n */\n readonly automationId?: string;\n readonly title?: string | null;\n readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;\n /** Items built from the content once it exists. */\n readonly toolbarItemsFactory?: (() => ReadonlyArray<G9SheetToolbarItem>) | null;\n /** Default `'center'`. */\n readonly headerTitlePlacement?: G9SheetHeaderTitlePlacement;\n /** Star/Auto/Star columns. Default true. */\n readonly reserveEmptyHeaderSlots?: boolean;\n readonly headerView?: ReactNode;\n readonly headerLeadingView?: ReactNode;\n readonly headerTitleView?: ReactNode;\n readonly headerTrailingView?: ReactNode;\n readonly headerLeadingAndTitleView?: ReactNode;\n readonly headerTitleAndTrailingView?: ReactNode;\n /**\n * A footer that draws its own band (usually a component rendering {@link G9SheetFooterBar}, or nothing) — for\n * buttons that come and go while the sheet is open. Wins over `footerView` and `footerButtons`.\n */\n readonly footerBand?: ReactNode;\n /** Custom footer inside the standard band; wins over `footerButtons`. */\n readonly footerView?: ReactNode;\n /** Equal-width footer buttons. */\n readonly footerButtons?: ReadonlyArray<ReactNode> | null;\n /** Default 3. */\n readonly footerMaxButtonsPerRow?: number;\n /** Hardware back closes. Default true. */\n readonly hardwareBackCloses?: boolean;\n /** Intercepts every back request (disables drag). */\n readonly onBackRequested?: ((source: G9SheetBackSource) => G9SheetBackAction | Promise<G9SheetBackAction>) | null;\n // Platform specific (accepted; applied where Lynx has an equivalent)\n /** Max sheet width on Android (px). */\n readonly androidMaxWidth?: number | null;\n /** Max sheet height on Android (px). */\n readonly androidMaxHeight?: number | null;\n /** Margin around the sheet on Android `[l, t, r, b]`. */\n readonly androidMargin?: readonly [number, number, number, number] | null;\n /** Android half-expanded ratio override. */\n readonly androidHalfExpandedRatio?: number | null;\n /** Square the expanded corners on Android. */\n readonly androidShouldRemoveExpandedCorners?: boolean | null;\n readonly windowsMaxWidth?: number | null;\n readonly windowsMaxHeight?: number | null;\n readonly windowsMinWidth?: number | null;\n readonly windowsMinHeight?: number | null;\n /** Animate the scrim colour on iOS. Default true. */\n readonly animateOverlayToColorOnIos?: boolean;\n}\n\n/** App-wide sheet settings (MAUI `G9BottomSheetSettings`), `<G9Provider settings={{ sheets }}>`. */\nexport interface G9SheetSettings {\n /** Default black. */\n readonly modalOverlayColor?: string;\n /** Dim at the smallest detent (0–1). Default 0.3. */\n readonly modalOverlayMinimumOpacity?: number;\n /** Dim at full screen (0–1). Default 0.9. */\n readonly modalOverlayMaximumOpacity?: number;\n /** Default 300. */\n readonly openAnimationDurationMs?: number;\n /** Default 300. */\n readonly closeAnimationDurationMs?: number;\n /** Partial traversals take a proportional slice. Default true. */\n readonly sizeScaledAnimationDuration?: boolean;\n /** Global switch of the page recede. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Colour behind the receded page. Default black. */\n readonly backdropCardColor?: string;\n /** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */\n readonly stageBeforeShow?: boolean;\n /** Longest a hand-off waits for the successor to open before the old sheet closes anyway (0–5000). Default 250. */\n readonly preOpenMaxHoldMs?: number;\n /** Prebuilt (non-factory) content also waits behind the loading placeholder until after the open motion. Default false. */\n readonly deferPrebuiltContent?: boolean;\n /** `'platformNative'` (lynx-ui's motion) or `'timed'` (tween over the durations). Default platformNative. */\n readonly motionStyle?: 'platformNative' | 'timed';\n /** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */\n readonly heightMemoVersion?: string;\n /**\n * Side padding of the header band (MAUI `G9LayoutMetrics.EdgeSpacing`, which an app may scale — AgriPad's 10 × 1.3\n * = 13). Default 16.\n */\n readonly headerEdgeSpacing?: number;\n}\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst finite = (v: number | undefined, fallback: number) =>\n typeof v === 'number' && Number.isFinite(v) ? v : fallback;\n\n/** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */\nexport function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings> {\n const s = settings ?? {};\n let min = clamp(finite(s.modalOverlayMinimumOpacity, 0.3), 0, 1);\n let max = clamp(finite(s.modalOverlayMaximumOpacity, 0.9), 0, 1);\n if (min > max) [min, max] = [max, min];\n return Object.freeze({\n modalOverlayColor: s.modalOverlayColor ?? '#000000',\n modalOverlayMinimumOpacity: min,\n modalOverlayMaximumOpacity: max,\n openAnimationDurationMs: Math.max(0, finite(s.openAnimationDurationMs, 300)),\n closeAnimationDurationMs: Math.max(0, finite(s.closeAnimationDurationMs, 300)),\n sizeScaledAnimationDuration: s.sizeScaledAnimationDuration ?? true,\n enableBackdropCardEffect: s.enableBackdropCardEffect ?? true,\n backdropCardColor: s.backdropCardColor ?? '#000000',\n stageBeforeShow: s.stageBeforeShow ?? true,\n preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),\n deferPrebuiltContent: s.deferPrebuiltContent ?? false,\n motionStyle: s.motionStyle ?? 'platformNative',\n heightMemoVersion: s.heightMemoVersion ?? '0',\n headerEdgeSpacing: Math.max(0, finite(s.headerEdgeSpacing, 16)),\n });\n}\n\n/** MAUI `DefaultOptions()`: medium, `[medium, large]`, modal, cancelable, handle, draggable. */\nexport function defaultSheetOptions(): G9SheetOptions {\n return {\n currentState: 'medium',\n states: ['medium', 'large'],\n sizeMode: 'states',\n halfExpandedRatio: 0.5,\n fullExpandedRatio: 1,\n };\n}\n\n/** MAUI `FitToContentOptions()`: sized to a non-scrolling body, capped at 75 % of the host. */\nexport function fitToContentSheetOptions(): G9SheetOptions {\n return { sizeMode: 'fitToContent', isCancelable: true, hasHandle: true, isDraggable: true, deferContent: true };\n}\n\n/** MAUI `FullScreenWithoutHandleOptions()`. */\nexport function fullScreenWithoutHandleSheetOptions(): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n deferContent: true,\n };\n}\n\n/** MAUI `FullScreenModalOptions(title, showCloseButton, hardwareBackCloses, toolbarItems)`. */\nexport function fullScreenModalSheetOptions(\n title?: string | null,\n showCloseButton = true,\n hardwareBackCloses = true,\n toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null,\n): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n sizeMode: 'states',\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n cornerRadius: 0,\n backgroundColor: 'var(--g9-background)',\n showToolbar: true,\n showCloseButton,\n title: title ?? null,\n toolbarItems: toolbarItems ?? null,\n hardwareBackCloses,\n };\n}\n\n/** MAUI `FullScreenEdgeToEdgeModalOptions(hardwareBackCloses)`: no header, flush top. */\nexport function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses = true): G9SheetOptions {\n return {\n ...fullScreenModalSheetOptions(null, false, hardwareBackCloses),\n showToolbar: false,\n useTopSafeAreaPadding: false,\n topSafeAreaPaddingOverride: 0,\n additionalTopSafeAreaPadding: 0,\n };\n}\n"],"names":["clamp","v","lo","hi","Math","finite","fallback","Number","resolveSheetSettings","settings","_s_modalOverlayColor","_s_sizeScaledAnimationDuration","_s_enableBackdropCardEffect","_s_backdropCardColor","_s_stageBeforeShow","_s_deferPrebuiltContent","_s_motionStyle","_s_heightMemoVersion","s","min","max","Object","defaultSheetOptions","fitToContentSheetOptions","fullScreenWithoutHandleSheetOptions","fullScreenModalSheetOptions","title","showCloseButton","hardwareBackCloses","toolbarItems","fullScreenEdgeToEdgeModalSheetOptions"],"mappings":"AA6PA,MAAMA,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAC/E,MAAMI,SAAS,CAACJ,GAAuBK,WACrC,AAAa,YAAb,OAAOL,KAAkBM,OAAO,QAAQ,CAACN,KAA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AAmBb,KAAK,GAAG,CAAC,GAAGC,OAAOa,EAAE,iBAAiB,EAAE;IAC7D;AACF;AAGO,SAASI;IACd,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;YAAU;SAAQ;QAC3B,UAAU;QACV,mBAAmB;QACnB,mBAAmB;IACrB;AACF;AAGO,SAASC;IACd,OAAO;QAAE,UAAU;QAAgB,cAAc;QAAM,WAAW;QAAM,aAAa;QAAM,cAAc;IAAK;AAChH;AAGO,SAASC;IACd,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;SAAQ;QACjB,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;IAChB;AACF;AAGO,SAASC,4BACdC,KAAqB,EACrBC,kBAAkB,IAAI,EACtBC,qBAAqB,IAAI,EACzBC,YAAuD;IAEvD,OAAO;QACL,cAAc;QACd,QAAQ;YAAC;SAAQ;QACjB,UAAU;QACV,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;QACd,iBAAiB;QACjB,aAAa;QACbF;QACA,OAAOD,QAAAA,QAAAA,QAAS;QAChB,cAAcG,QAAAA,eAAAA,eAAgB;QAC9BD;IACF;AACF;AAGO,SAASE,sCAAsCF,qBAAqB,IAAI;IAC7E,OAAO;QACL,GAAGH,4BAA4B,MAAM,OAAOG,mBAAmB;QAC/D,aAAa;QACb,uBAAuB;QACvB,4BAA4B;QAC5B,8BAA8B;IAChC;AACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from '@lynx-js/react';
|
|
2
|
+
import type { G9SheetHandle } from './stack.js';
|
|
3
|
+
/** Builds the body of a processing sheet: the node, or `null` to close quietly. Called once, after opening. */
|
|
4
|
+
export type G9ProcessingBuild = (handle: G9SheetHandle, signal: import('@g9tm/lynxcontrols-foundation').G9AbortSignal) => Promise<ReactNode | null> | ReactNode | null;
|
|
5
|
+
/** Handles a build failure (the sheet stays open unless it closes it). */
|
|
6
|
+
export type G9ProcessingErrorHandler = (error: unknown, handle: G9SheetHandle) => unknown;
|
|
7
|
+
/** Props of {@link G9ProcessingSheetContent}. */
|
|
8
|
+
export interface G9ProcessingSheetContentProps {
|
|
9
|
+
readonly build: G9ProcessingBuild;
|
|
10
|
+
readonly onError?: G9ProcessingErrorHandler;
|
|
11
|
+
/** Spinner box height. Default 160. */
|
|
12
|
+
readonly loadingHeight?: number;
|
|
13
|
+
/** The sheet handle (for content created before the handle existed). Default the enclosing sheet's. */
|
|
14
|
+
readonly handle?: () => G9SheetHandle | null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The body of a processing sheet (MAUI `ProcessingSheetContentView`): a 42 px spinner in a `loadingHeight` box, then
|
|
18
|
+
* the built body swapped in at once. A failure is always logged (no popup); then `onError` runs, or the error popup
|
|
19
|
+
* shows and the sheet closes. `null` closes the sheet quietly. A close cancels the build (`signal`).
|
|
20
|
+
*/
|
|
21
|
+
export declare function G9ProcessingSheetContent(props: G9ProcessingSheetContentProps): ReactNode;
|
|
22
|
+
//# sourceMappingURL=processing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"processing.d.ts","sourceRoot":"","sources":["../../src/sheet/processing.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,gBAAgB,CAAC;AAI7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,+GAA+G;AAC/G,MAAM,MAAM,iBAAiB,GAAG,CAC9B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,OAAO,+BAA+B,EAAE,aAAa,KAC1D,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAClD,0EAA0E;AAC1E,MAAM,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC;AAE1F,iDAAiD;AACjD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAC;IAC5C,uCAAuC;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,uGAAuG;IACvG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,SAAS,CA0DxF"}
|