@g9tm/lynxcontrols 0.0.0-stage → 1.4.0
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 +22 -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 +44 -0
- package/dist/base/control.d.ts.map +1 -0
- package/dist/base/control.jsx +24 -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 +87 -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 +95 -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 +71 -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 +110 -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 +156 -0
- package/dist/fields/fields.css.map +1 -0
- package/dist/fields/index.d.ts +12 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.jsx +11 -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/outlined-field.d.ts +146 -0
- package/dist/fields/outlined-field.d.ts.map +1 -0
- package/dist/fields/outlined-field.jsx +196 -0
- package/dist/fields/outlined-field.jsx.map +1 -0
- package/dist/fields/pin-entry.d.ts +63 -0
- package/dist/fields/pin-entry.d.ts.map +1 -0
- package/dist/fields/pin-entry.jsx +293 -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 +72 -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 +237 -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 +85 -0
- package/dist/host/hooks.d.ts.map +1 -0
- package/dist/host/hooks.jsx +163 -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 +244 -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 +342 -0
- package/dist/popup/service.jsx.map +1 -0
- package/dist/popup/types.d.ts +211 -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 +362 -0
- package/dist/selection/selection-sheet.jsx.map +1 -0
- package/dist/selection/selection.css +75 -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 +45 -0
- package/dist/sheet/frame.d.ts.map +1 -0
- package/dist/sheet/frame.jsx +205 -0
- package/dist/sheet/frame.jsx.map +1 -0
- package/dist/sheet/header.d.ts +35 -0
- package/dist/sheet/header.d.ts.map +1 -0
- package/dist/sheet/header.jsx +145 -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 +11 -0
- package/dist/sheet/index.d.ts.map +1 -0
- package/dist/sheet/index.jsx +10 -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/options.d.ts +220 -0
- package/dist/sheet/options.d.ts.map +1 -0
- package/dist/sheet/options.jsx +91 -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 +195 -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 +69 -0
- package/dist/sheet/sizing.d.ts.map +1 -0
- package/dist/sheet/sizing.jsx +146 -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 +56 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -0
- package/dist/tab-bar/tab-bar.jsx +343 -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 +201 -0
- package/dist/toast/service.jsx.map +1 -0
- package/dist/toast/store.d.ts +174 -0
- package/dist/toast/store.d.ts.map +1 -0
- package/dist/toast/store.jsx +353 -0
- package/dist/toast/store.jsx.map +1 -0
- package/dist/toast/toast.css +152 -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 +189 -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 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/height-memo.jsx","sources":["../../src/sheet/height-memo.ts"],"sourcesContent":["// MAUI `G9BottomSheetHeightSeeds` + `G9BottomSheetHeightMemoStore`: first-open body heights for deferred sheets.\n// Keys are `{identity}|w{width}|{culture}|fs{fontScale}`, so a viewport, language or font-size change misses and\n// re-measures; `invalidate()` clears the learned heights (theme or font change).\n\n/** Most learned heights kept (MAUI 64). */\nexport const g9SheetHeightMemoLimit = 64;\n/** Preference key of the persisted memo. */\nexport const g9SheetHeightMemoPreferenceKey = 'sheet-heights';\n\n/** The memo key of a sheet body. */\nexport function sheetHeightMemoKey(identity: string, width: number, culture: string, fontScale: number): string {\n return `${identity}|w${Math.round(width)}|${culture}|fs${fontScale}`;\n}\n\n/** Compiled-in first-open heights (MAUI `G9BottomSheetHeightSeeds`); never persisted. */\nexport interface G9SheetHeightSeeds {\n /** Sets (or replaces) the seed of a memo key or bare identity; blank keys and heights ≤ 0 are ignored. */\n seed(key: string, bodyHeight: number): void;\n /** Exact key first, then the identity alone (the last three `|` segments stripped). */\n tryGet(key: string): number | undefined;\n reset(): void;\n}\n\n/** Creates a seed table. */\nexport function createSheetHeightSeeds(): G9SheetHeightSeeds {\n const seeds = new Map<string, number>();\n return {\n seed(key, bodyHeight) {\n if (!key || key.trim() === '' || !(bodyHeight > 0)) return;\n seeds.set(key, bodyHeight);\n },\n tryGet(key) {\n const exact = seeds.get(key);\n if (exact !== undefined) return exact;\n const parts = key.split('|');\n if (parts.length < 4) return undefined;\n return seeds.get(parts.slice(0, parts.length - 3).join('|'));\n },\n reset() {\n seeds.clear();\n },\n };\n}\n\n/** The learned heights (MAUI `G9BottomSheetHeightMemoStore`). */\nexport interface G9SheetHeightMemo {\n /** Learned height, else the seed. */\n lookup(key: string): number | undefined;\n /** Records a real body measurement; ≤ 0 is ignored, a change < 0.5 is skipped; the oldest key is evicted at 64. */\n record(key: string, bodyHeight: number): void;\n /** Forgets every learned height (theme/font change). */\n invalidate(): void;\n readonly size: number;\n /** Writes the memo to preferences now. */\n flush(): void;\n}\n\n/** The synchronous preference reads/writes the memo needs (`useG9Preferences()` provides them). */\nexport interface G9SheetMemoPreferences {\n getString(key: string, defaultValue?: string | null): string | null;\n setString(key: string, value: string): unknown;\n}\n\n/** Options of {@link createSheetHeightMemo}. */\nexport interface G9SheetHeightMemoOptions {\n readonly seeds?: G9SheetHeightSeeds;\n /** Persists under {@link g9SheetHeightMemoPreferenceKey}; a different `appVersion` discards the stored memo. */\n readonly preferences?: G9SheetMemoPreferences;\n readonly appVersion?: string;\n /** Debounced flush (ms). Default 3000. */\n readonly flushDelayMs?: number;\n readonly setTimer?: (callback: () => void, ms: number) => unknown;\n readonly clearTimer?: (handle: unknown) => void;\n}\n\n/** Creates a height memo (lazy load from preferences on first use, debounced flush). */\nexport function createSheetHeightMemo(options: G9SheetHeightMemoOptions = {}): G9SheetHeightMemo {\n const entries = new Map<string, number>();\n const header = `v1\\t${options.appVersion ?? '0'}`;\n let loaded = false;\n let timer: unknown = null;\n const prefs = options.preferences;\n const load = () => {\n if (loaded) return;\n loaded = true;\n if (!prefs) return;\n const blob = prefs.getString(g9SheetHeightMemoPreferenceKey, '') ?? '';\n const lines = blob.split('\\n');\n if (lines[0] !== header) return;\n for (const line of lines.slice(1)) {\n const tab = line.lastIndexOf('\\t');\n if (tab <= 0) continue;\n const height = Number(line.slice(tab + 1));\n if (height > 0) entries.set(line.slice(0, tab), height);\n }\n };\n const flush = () => {\n if (timer !== null) options.clearTimer?.(timer);\n timer = null;\n if (!prefs) return;\n const body = [...entries].map(([k, h]) => `${k}\\t${Math.round(h * 10) / 10}`);\n prefs.setString(g9SheetHeightMemoPreferenceKey, [header, ...body].join('\\n'));\n };\n const schedule = () => {\n if (!prefs || !options.setTimer) return;\n if (timer !== null) options.clearTimer?.(timer);\n timer = options.setTimer(flush, options.flushDelayMs ?? 3000);\n };\n return {\n lookup(key) {\n load();\n return entries.get(key) ?? options.seeds?.tryGet(key);\n },\n record(key, bodyHeight) {\n load();\n if (!(bodyHeight > 0)) return;\n const old = entries.get(key);\n if (old !== undefined && Math.abs(old - bodyHeight) < 0.5) return;\n if (old === undefined && entries.size >= g9SheetHeightMemoLimit) {\n const first = entries.keys().next().value as string;\n entries.delete(first);\n }\n entries.set(key, bodyHeight);\n schedule();\n },\n invalidate() {\n load();\n entries.clear();\n schedule();\n },\n get size() {\n load();\n return entries.size;\n },\n flush,\n };\n}\n"],"names":["g9SheetHeightMemoLimit","g9SheetHeightMemoPreferenceKey","sheetHeightMemoKey","identity","width","culture","fontScale","Math","createSheetHeightSeeds","seeds","Map","key","bodyHeight","exact","undefined","parts","createSheetHeightMemo","options","_options_appVersion","entries","header","loaded","timer","prefs","load","_prefs_getString","blob","lines","line","tab","height","Number","flush","body","k","h","schedule","_options_flushDelayMs","_entries_get","_options_seeds","old","first"],"mappings":"AAKO,MAAMA,yBAAyB;AAE/B,MAAMC,iCAAiC;AAGvC,SAASC,mBAAmBC,QAAgB,EAAEC,KAAa,EAAEC,OAAe,EAAEC,SAAiB;IACpG,OAAO,GAAGH,SAAS,EAAE,EAAEI,KAAK,KAAK,CAACH,OAAO,CAAC,EAAEC,QAAQ,GAAG,EAAEC,WAAW;AACtE;AAYO,SAASE;IACd,MAAMC,QAAQ,IAAIC;IAClB,OAAO;QACL,MAAKC,GAAG,EAAEC,UAAU;YAClB,IAAI,CAACD,OAAOA,AAAe,OAAfA,IAAI,IAAI,MAAa,CAAEC,CAAAA,aAAa,IAAI;YACpDH,MAAM,GAAG,CAACE,KAAKC;QACjB;QACA,QAAOD,GAAG;YACR,MAAME,QAAQJ,MAAM,GAAG,CAACE;YACxB,IAAIE,AAAUC,WAAVD,OAAqB,OAAOA;YAChC,MAAME,QAAQJ,IAAI,KAAK,CAAC;YACxB,IAAII,MAAM,MAAM,GAAG,GAAG;YACtB,OAAON,MAAM,GAAG,CAACM,MAAM,KAAK,CAAC,GAAGA,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC;QACzD;QACA;YACEN,MAAM,KAAK;QACb;IACF;AACF;AAkCO,SAASO,sBAAsBC,UAAoC,CAAC,CAAC;QAEpDC;IADtB,MAAMC,UAAU,IAAIT;IACpB,MAAMU,SAAS,CAAC,IAAI,EAAE,QAAAF,CAAAA,sBAAAA,QAAQ,UAAU,AAAD,IAAjBA,sBAAsB,KAAK;IACjD,IAAIG,SAAS;IACb,IAAIC,QAAiB;IACrB,MAAMC,QAAQN,QAAQ,WAAW;IACjC,MAAMO,OAAO;YAIEC;QAHb,IAAIJ,QAAQ;QACZA,SAAS;QACT,IAAI,CAACE,OAAO;QACZ,MAAMG,OAAO,QAAAD,CAAAA,mBAAAA,MAAM,SAAS,CAACxB,gCAAgC,GAAE,IAAlDwB,mBAAuD;QACpE,MA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,KAAAA,IAAAA,eAAe,MAAM,CAAC5B;QACnD;QACA,QAAOA,GAAG,EAAEC,UAAU;YACpBY;YACA,IAAI,CAAEZ,CAAAA,aAAa,IAAI;YACvB,MAAM4B,MAAMrB,QAAQ,GAAG,CAACR;YACxB,IAAI6B,AAAQ1B,WAAR0B,OAAqBjC,KAAK,GAAG,CAACiC,MAAM5B,cAAc,KAAK;YAC3D,IAAI4B,AAAQ1B,WAAR0B,OAAqBrB,QAAQ,IAAI,IAAInB,wBAAwB;gBAC/D,MAAMyC,QAAQtB,QAAQ,IAAI,GAAG,IAAI,GAAG,KAAK;gBACzCA,QAAQ,MAAM,CAACsB;YACjB;YACAtB,QAAQ,GAAG,CAACR,KAAKC;YACjBwB;QACF;QACA;YACEZ;YACAL,QAAQ,KAAK;YACbiB;QACF;QACA,IAAI;YACFZ;YACA,OAAOL,QAAQ,IAAI;QACrB;QACAa;IACF;AACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { type G9SheetContextValue, G9SheetFrame, type G9SheetFrameProps, useG9SheetContext } from './frame.js';
|
|
2
|
+
export { footerRows, G9SheetFooter, type G9SheetFooterProps, G9SheetHeader, type G9SheetHeaderProps, g9SheetHeaderMetrics, } from './header.js';
|
|
3
|
+
export { createSheetHeightMemo, createSheetHeightSeeds, type G9SheetHeightMemo, type G9SheetHeightMemoOptions, type G9SheetHeightSeeds, type G9SheetMemoPreferences, g9SheetHeightMemoLimit, g9SheetHeightMemoPreferenceKey, sheetHeightMemoKey, } from './height-memo.js';
|
|
4
|
+
export { G9LoadableSheetContent, type G9LoadableSheetContentProps } from './loadable.js';
|
|
5
|
+
export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, type G9SheetBackAction, type G9SheetBackSource, type G9SheetContentWidthMode, type G9SheetDetent, type G9SheetHeaderTitlePlacement, type G9SheetLifecycle, type G9SheetOptions, type G9SheetSettings, type G9SheetSizeMode, type G9SheetToolbarItem, resolveSheetSettings, } from './options.js';
|
|
6
|
+
export { type G9ProcessingBuild, type G9ProcessingErrorHandler, G9ProcessingSheetContent, type G9ProcessingSheetContentProps, } from './processing.js';
|
|
7
|
+
export { type G9SheetService, g9Sheets, sheetServiceOf, useG9Sheets } from './service.js';
|
|
8
|
+
export { G9Sheet, type G9SheetProps } from './sheet.js';
|
|
9
|
+
export { backdropCardTransform, clampFitHeight, currentPlatform, type G9SheetLayout, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetTopPadding, } from './sizing.js';
|
|
10
|
+
export { type G9SheetCloseReason, type G9SheetContent, type G9SheetEntry, type G9SheetHandle, type G9SheetResult, G9SheetStack, type G9SheetStackConfig, type G9SheetStatus, g9SheetCloseGraceMs, g9SheetShowThrottleMs, } from './stack.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sheet/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5G,OAAO,EACL,UAAU,EACV,aAAa,EACb,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,8BAA8B,EAC9B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,KAAK,2BAA2B,EAAE,MAAM,YAAY,CAAC;AACtF,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,qCAAqC,EACrC,2BAA2B,EAC3B,mCAAmC,EACnC,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,cAAc,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,KAAK,aAAa,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { G9SheetFrame, useG9SheetContext } from "./frame.jsx";
|
|
2
|
+
export { G9SheetFooter, G9SheetHeader, footerRows, g9SheetHeaderMetrics } from "./header.jsx";
|
|
3
|
+
export { createSheetHeightMemo, createSheetHeightSeeds, g9SheetHeightMemoLimit, g9SheetHeightMemoPreferenceKey, sheetHeightMemoKey } from "./height-memo.jsx";
|
|
4
|
+
export { G9LoadableSheetContent } from "./loadable.jsx";
|
|
5
|
+
export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, resolveSheetSettings } from "./options.jsx";
|
|
6
|
+
export { G9ProcessingSheetContent } from "./processing.jsx";
|
|
7
|
+
export { g9Sheets, sheetServiceOf, useG9Sheets } from "./service.jsx";
|
|
8
|
+
export { G9Sheet } from "./sheet.jsx";
|
|
9
|
+
export { backdropCardTransform, clampFitHeight, currentPlatform, g9SheetDefaultPeekHeight, g9SheetDragCloseThreshold, g9SheetFitLoadingMinHeight, g9SheetFitMinHeight, g9SheetTopSafeAreaBaseGap, parentRecedeOffset, platformSheetConstraints, resolveSheetLayout, scaledSheetDuration, sheetOverlayOpacity, sheetTopPadding } from "./sizing.jsx";
|
|
10
|
+
export { G9SheetStack, g9SheetCloseGraceMs, g9SheetShowThrottleMs } from "./stack.jsx";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ReactNode } from '@lynx-js/react';
|
|
2
|
+
import { type G9BottomSheetLoadingSkeleton } from '../display/shimmer.js';
|
|
3
|
+
/** Props of {@link G9LoadableSheetContent} (MAUI `LoadableSheetContentView<TData>`). */
|
|
4
|
+
export interface G9LoadableSheetContentProps<TData> {
|
|
5
|
+
/** Loads the data once per open, after the open motion (open-then-fill); `signal` aborts on close. */
|
|
6
|
+
readonly load: (signal: import('@g9tm/lynxcontrols-foundation').G9AbortSignal) => Promise<TData | null | undefined>;
|
|
7
|
+
/** Renders the loaded data (MAUI `ApplyLoadedData`). Never called after the sheet closed. */
|
|
8
|
+
readonly children: (data: TData) => ReactNode;
|
|
9
|
+
/** The loader returned nothing (MAUI `OnLoadReturnedNull`). Default: nothing rendered. */
|
|
10
|
+
readonly renderEmpty?: () => ReactNode;
|
|
11
|
+
/** The loader threw (MAUI `OnLoadFailed`); the error is also logged. */
|
|
12
|
+
readonly onLoadFailed?: (error: unknown) => void;
|
|
13
|
+
/** What a failure shows. Default nothing. */
|
|
14
|
+
readonly renderError?: (error: unknown) => ReactNode;
|
|
15
|
+
/** Height of the loading state (fills the seeded height). Default 180. */
|
|
16
|
+
readonly loadingHeight?: number;
|
|
17
|
+
/** Skeleton instead of the spinner. Default `'none'`. */
|
|
18
|
+
readonly skeleton?: G9BottomSheetLoadingSkeleton;
|
|
19
|
+
/**
|
|
20
|
+
* Load while the sheet is still staged (MAUI `LoadWhileStaged`): start at once instead of after the open motion.
|
|
21
|
+
* For on-device data only. Default false.
|
|
22
|
+
*/
|
|
23
|
+
readonly loadWhileStaged?: boolean;
|
|
24
|
+
/** Fade the body in over 140 ms once loaded (MAUI `RevealLoadedContentAsync`). Default true. */
|
|
25
|
+
readonly reveal?: boolean;
|
|
26
|
+
/** Told when loading starts/ends (MAUI `IsLoading`). */
|
|
27
|
+
readonly onLoadingChange?: (loading: boolean) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Open-then-fill sheet body (MAUI `LoadableSheetContentView`): shows a loading state that fills the sheet's seeded
|
|
31
|
+
* height, loads once after the open motion (or at once with `loadWhileStaged`), cancels on close, and never applies
|
|
32
|
+
* results after the sheet closed. Outside a sheet it loads on mount.
|
|
33
|
+
*/
|
|
34
|
+
export declare function G9LoadableSheetContent<TData>(props: G9LoadableSheetContentProps<TData>): ReactNode;
|
|
35
|
+
//# sourceMappingURL=loadable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadable.d.ts","sourceRoot":"","sources":["../../src/sheet/loadable.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EAAE,KAAK,4BAA4B,EAAmB,MAAM,oBAAoB,CAAC;AAIxF,wFAAwF;AACxF,MAAM,WAAW,2BAA2B,CAAC,KAAK;IAChD,sGAAsG;IACtG,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,+BAA+B,EAAE,aAAa,KAAK,OAAO,CAAC,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACpH,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,SAAS,CAAC;IAC9C,0FAA0F;IAC1F,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,SAAS,CAAC;IACvC,wEAAwE;IACxE,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,SAAS,CAAC;IACrD,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,4BAA4B,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACvD;AAID;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,SAAS,CA+ClG"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { createAbortController } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { useEffect, useRef, useState } from "@lynx-js/react";
|
|
3
|
+
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
4
|
+
import { G9SheetSkeleton } from "../display/shimmer.jsx";
|
|
5
|
+
import { useG9Diagnostics } from "../provider/hooks.jsx";
|
|
6
|
+
import { useG9SheetContext } from "./frame.jsx";
|
|
7
|
+
function G9LoadableSheetContent(props) {
|
|
8
|
+
var _ref, _ref1, _props_loadingHeight;
|
|
9
|
+
var _props_renderEmpty, _props_renderError;
|
|
10
|
+
const sheet = useG9SheetContext();
|
|
11
|
+
const diagnostics = useG9Diagnostics();
|
|
12
|
+
const [state, setState] = useState({
|
|
13
|
+
s: 'loading'
|
|
14
|
+
});
|
|
15
|
+
const started = useRef(false);
|
|
16
|
+
const latest = useRef(props);
|
|
17
|
+
latest.current = props;
|
|
18
|
+
const ready = !sheet || sheet.opened || true === props.loadWhileStaged;
|
|
19
|
+
useEffect(()=>{
|
|
20
|
+
var _latest_current_onLoadingChange, _latest_current;
|
|
21
|
+
if (started.current || !ready) return;
|
|
22
|
+
started.current = true;
|
|
23
|
+
const signal = null == sheet ? void 0 : sheet.signal;
|
|
24
|
+
null == (_latest_current_onLoadingChange = (_latest_current = latest.current).onLoadingChange) || _latest_current_onLoadingChange.call(_latest_current, true);
|
|
25
|
+
latest.current.load(null != signal ? signal : createAbortController().signal).then((data)=>{
|
|
26
|
+
var _latest_current_onLoadingChange, _latest_current;
|
|
27
|
+
if (null == signal ? void 0 : signal.aborted) return;
|
|
28
|
+
setState(null == data ? {
|
|
29
|
+
s: 'empty'
|
|
30
|
+
} : {
|
|
31
|
+
s: 'loaded',
|
|
32
|
+
data
|
|
33
|
+
});
|
|
34
|
+
null == (_latest_current_onLoadingChange = (_latest_current = latest.current).onLoadingChange) || _latest_current_onLoadingChange.call(_latest_current, false);
|
|
35
|
+
}, (error)=>{
|
|
36
|
+
var _latest_current_onLoadFailed, _latest_current, _latest_current_onLoadingChange, _latest_current1;
|
|
37
|
+
if (null == signal ? void 0 : signal.aborted) return;
|
|
38
|
+
diagnostics.log({
|
|
39
|
+
level: 'error',
|
|
40
|
+
message: 'Sheet content failed to load.',
|
|
41
|
+
source: 'G9LoadableSheetContent',
|
|
42
|
+
error
|
|
43
|
+
});
|
|
44
|
+
null == (_latest_current_onLoadFailed = (_latest_current = latest.current).onLoadFailed) || _latest_current_onLoadFailed.call(_latest_current, error);
|
|
45
|
+
setState({
|
|
46
|
+
s: 'failed',
|
|
47
|
+
error
|
|
48
|
+
});
|
|
49
|
+
null == (_latest_current_onLoadingChange = (_latest_current1 = latest.current).onLoadingChange) || _latest_current_onLoadingChange.call(_latest_current1, false);
|
|
50
|
+
});
|
|
51
|
+
}, [
|
|
52
|
+
ready
|
|
53
|
+
]);
|
|
54
|
+
if ('loaded' === state.s) return <view className={false === props.reveal ? '' : 'g9-sheet-reveal'}>{props.children(state.data)}</view>;
|
|
55
|
+
if ('empty' === state.s) return null != (_ref = null == (_props_renderEmpty = props.renderEmpty) ? void 0 : _props_renderEmpty.call(props)) ? _ref : null;
|
|
56
|
+
if ('failed' === state.s) return null != (_ref1 = null == (_props_renderError = props.renderError) ? void 0 : _props_renderError.call(props, state.error)) ? _ref1 : null;
|
|
57
|
+
return <view className="g9-sheet-loading" style={{
|
|
58
|
+
height: `${null != (_props_loadingHeight = props.loadingHeight) ? _props_loadingHeight : 180}px`
|
|
59
|
+
}}>
|
|
60
|
+
{props.skeleton && 'none' !== props.skeleton ? <G9SheetSkeleton skeleton={props.skeleton}/> : <G9ActivityIndicator running size={32}/>}
|
|
61
|
+
</view>;
|
|
62
|
+
}
|
|
63
|
+
export { G9LoadableSheetContent };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=loadable.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/loadable.jsx","sources":["../../src/sheet/loadable.tsx"],"sourcesContent":["import { createAbortController } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useRef, useState } from '@lynx-js/react';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { type G9BottomSheetLoadingSkeleton, G9SheetSkeleton } from '../display/shimmer';\nimport { useG9Diagnostics } from '../provider/hooks';\nimport { useG9SheetContext } from './frame';\n\n/** Props of {@link G9LoadableSheetContent} (MAUI `LoadableSheetContentView<TData>`). */\nexport interface G9LoadableSheetContentProps<TData> {\n /** Loads the data once per open, after the open motion (open-then-fill); `signal` aborts on close. */\n readonly load: (signal: import('@g9tm/lynxcontrols-foundation').G9AbortSignal) => Promise<TData | null | undefined>;\n /** Renders the loaded data (MAUI `ApplyLoadedData`). Never called after the sheet closed. */\n readonly children: (data: TData) => ReactNode;\n /** The loader returned nothing (MAUI `OnLoadReturnedNull`). Default: nothing rendered. */\n readonly renderEmpty?: () => ReactNode;\n /** The loader threw (MAUI `OnLoadFailed`); the error is also logged. */\n readonly onLoadFailed?: (error: unknown) => void;\n /** What a failure shows. Default nothing. */\n readonly renderError?: (error: unknown) => ReactNode;\n /** Height of the loading state (fills the seeded height). Default 180. */\n readonly loadingHeight?: number;\n /** Skeleton instead of the spinner. Default `'none'`. */\n readonly skeleton?: G9BottomSheetLoadingSkeleton;\n /**\n * Load while the sheet is still staged (MAUI `LoadWhileStaged`): start at once instead of after the open motion.\n * For on-device data only. Default false.\n */\n readonly loadWhileStaged?: boolean;\n /** Fade the body in over 140 ms once loaded (MAUI `RevealLoadedContentAsync`). Default true. */\n readonly reveal?: boolean;\n /** Told when loading starts/ends (MAUI `IsLoading`). */\n readonly onLoadingChange?: (loading: boolean) => void;\n}\n\ntype LoadState<T> = { s: 'loading' } | { s: 'loaded'; data: T } | { s: 'empty' } | { s: 'failed'; error: unknown };\n\n/**\n * Open-then-fill sheet body (MAUI `LoadableSheetContentView`): shows a loading state that fills the sheet's seeded\n * height, loads once after the open motion (or at once with `loadWhileStaged`), cancels on close, and never applies\n * results after the sheet closed. Outside a sheet it loads on mount.\n */\nexport function G9LoadableSheetContent<TData>(props: G9LoadableSheetContentProps<TData>): ReactNode {\n const sheet = useG9SheetContext();\n const diagnostics = useG9Diagnostics();\n const [state, setState] = useState<LoadState<TData>>({ s: 'loading' });\n const started = useRef(false);\n const latest = useRef(props);\n latest.current = props;\n const ready = !sheet || sheet.opened || props.loadWhileStaged === true;\n useEffect(() => {\n if (started.current || !ready) return;\n started.current = true;\n const signal = sheet?.signal;\n latest.current.onLoadingChange?.(true);\n latest.current.load(signal ?? createAbortController().signal).then(\n (data) => {\n if (signal?.aborted) return;\n setState(data === null || data === undefined ? { s: 'empty' } : { s: 'loaded', data });\n latest.current.onLoadingChange?.(false);\n },\n (error) => {\n if (signal?.aborted) return;\n diagnostics.log({\n level: 'error',\n message: 'Sheet content failed to load.',\n source: 'G9LoadableSheetContent',\n error,\n });\n latest.current.onLoadFailed?.(error);\n setState({ s: 'failed', error });\n latest.current.onLoadingChange?.(false);\n },\n );\n }, [ready]);\n if (state.s === 'loaded') {\n return <view className={props.reveal === false ? '' : 'g9-sheet-reveal'}>{props.children(state.data)}</view>;\n }\n if (state.s === 'empty') return props.renderEmpty?.() ?? null;\n if (state.s === 'failed') return props.renderError?.(state.error) ?? null;\n return (\n <view className=\"g9-sheet-loading\" style={{ height: `${props.loadingHeight ?? 180}px` }}>\n {props.skeleton && props.skeleton !== 'none' ? (\n <G9SheetSkeleton skeleton={props.skeleton} />\n ) : (\n <G9ActivityIndicator running size={32} />\n )}\n </view>\n );\n}\n"],"names":["G9LoadableSheetContent","props","_props_loadingHeight","sheet","useG9SheetContext","diagnostics","useG9Diagnostics","state","setState","useState","started","useRef","latest","ready","useEffect","_latest_current","signal","createAbortController","data","error","_latest_current1","view","G9SheetSkeleton","G9ActivityIndicator"],"mappings":";;;;;;AAyCO,SAASA,uBAA8BC,KAAyC;qBAuC5BC;QAHzBD,oBACCA;IApCjC,MAAME,QAAQC;IACd,MAAMC,cAAcC;IACpB,MAAM,CAACC,OAAOC,SAAS,GAAGC,SAA2B;QAAE,GAAG;IAAU;IACpE,MAAMC,UAAUC,OAAO;IACvB,MAAMC,SAASD,OAAOV;IACtBW,OAAO,OAAO,GAAGX;IACjB,MAAMY,QAAQ,CAACV,SAASA,MAAM,MAAM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AZA,MAAM,CAAC,EACT,QAAQc,KAAK,WAAWpB,AAAiB,UAAjBA,MAAM,MAAM,GAAa,KAAK,oBAAoBA,MAAM,QAAQ,CAACM,MAAM,IAAI,IAAIc;IAEzG,IAAId,AAAY,YAAZA,MAAM,CAAC,EAAc,OAAO,QAAP,gBAAON,CAAAA,qBAAAA,MAAM,WAAW,AAAD,IAAhBA,KAAAA,IAAAA,mBAAAA,IAAAA,CAAAA,MAAK,IAALA,OAAyB;IACzD,IAAIM,AAAY,aAAZA,MAAM,CAAC,EAAe,OAAO,QAAP,iBAAON,CAAAA,qBAAAA,MAAM,WAAW,AAAD,IAAhBA,KAAAA,IAAAA,mBAAAA,IAAAA,CAAAA,OAAoBM,MAAM,KAAK,aAAK;IACrE,QACGc,KAAK,UAAU,mBAAmB,OAAO;QAAE,QAAQ,GAAG,QAAAnB,CAAAA,uBAAAA,MAAM,aAAa,AAAD,IAAlBA,uBAAuB,IAAI,EAAE,CAAC;IAAC,GAAG;MACvF,CAACD,MAAM,QAAQ,IAAIA,AAAmB,WAAnBA,MAAM,QAAQ,IAC9BqB,gBAAgB,UAAUrB,MAAM,QAAQ,OAExCsB,oBAAoB,QAAQ,MAAM,MACnC;IACJ,EAAEF;AAEN"}
|
|
@@ -0,0 +1,220 @@
|
|
|
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
|
+
/** Stable key (default the index). */
|
|
38
|
+
readonly key?: string;
|
|
39
|
+
}
|
|
40
|
+
/** Lifecycle callbacks of one sheet (MAUI `Opening/Opened/Closing/ClosedCommand`). */
|
|
41
|
+
export interface G9SheetLifecycle {
|
|
42
|
+
/** When the sheet starts opening. */
|
|
43
|
+
readonly onOpening?: () => void;
|
|
44
|
+
/** After the open motion (or its timer fallback). */
|
|
45
|
+
readonly onOpened?: () => void;
|
|
46
|
+
/** Once, when closing starts (not on an in-place replace). */
|
|
47
|
+
readonly onClosing?: () => void;
|
|
48
|
+
/** Once, at cleanup. */
|
|
49
|
+
readonly onClosed?: () => void;
|
|
50
|
+
/** The sheet came to rest at another detent (MAUI `G9SheetView.StateChanged`), with its height in px. */
|
|
51
|
+
readonly onStateChanged?: (detent: G9SheetDetent | 'fit', heightPx: number) => void;
|
|
52
|
+
}
|
|
53
|
+
/** Everything a sheet can be opened with (MAUI `G9BottomSheetOptions`; 77 properties + presets). */
|
|
54
|
+
export interface G9SheetOptions extends G9SheetLifecycle {
|
|
55
|
+
/** Initial detent. Default `'medium'`. */
|
|
56
|
+
readonly currentState?: G9SheetDetent;
|
|
57
|
+
/** Allowed detents. Default `['medium', 'large']`. */
|
|
58
|
+
readonly states?: ReadonlyArray<G9SheetDetent>;
|
|
59
|
+
/** Default `'states'`. */
|
|
60
|
+
readonly sizeMode?: G9SheetSizeMode;
|
|
61
|
+
/** Dim scrim that blocks the page. Default true. */
|
|
62
|
+
readonly isModal?: boolean;
|
|
63
|
+
/** Overlay tap / drag may close. Default true. */
|
|
64
|
+
readonly isCancelable?: boolean;
|
|
65
|
+
/** Default true. */
|
|
66
|
+
readonly isDraggable?: boolean;
|
|
67
|
+
/** Grabber. Default true. */
|
|
68
|
+
readonly hasHandle?: boolean;
|
|
69
|
+
/** Peek height (dp). Default 100 (with `collapsedHeight`). */
|
|
70
|
+
readonly peekHeight?: number | null;
|
|
71
|
+
/** Alias of `peekHeight` (MAUI `CollapsedHeight`); wins when both are set. */
|
|
72
|
+
readonly collapsedHeight?: number | null;
|
|
73
|
+
/** Medium = host × ratio (0.1–0.9). Default 0.5. */
|
|
74
|
+
readonly halfExpandedRatio?: number | null;
|
|
75
|
+
/** Large = host × ratio (0.1–1). Default 1. */
|
|
76
|
+
readonly fullExpandedRatio?: number | null;
|
|
77
|
+
/** Cap of a fit sheet (0.2–1). Default 0.75. */
|
|
78
|
+
readonly maxFitToContentHeightRatio?: number;
|
|
79
|
+
/** The largest detent is sized to the content (states mode). Default false. */
|
|
80
|
+
readonly expandedFitsContent?: boolean;
|
|
81
|
+
/** A drag on a scroller expands the sheet first. Default true. */
|
|
82
|
+
readonly scrollingExpandsSheet?: boolean;
|
|
83
|
+
/** Height memory key (needed for factory content). */
|
|
84
|
+
readonly heightMemoKey?: string | null;
|
|
85
|
+
/** Body padding. Default 0. */
|
|
86
|
+
readonly padding?: number;
|
|
87
|
+
/** 10 px gap under the header hairline. Default true. */
|
|
88
|
+
readonly useStandardBodyTopGap?: boolean;
|
|
89
|
+
/** Top corners. Default 12. */
|
|
90
|
+
readonly cornerRadius?: number;
|
|
91
|
+
/** Body background. Default `var(--g9-surface-container)`. */
|
|
92
|
+
readonly backgroundColor?: string | null;
|
|
93
|
+
/** Scrim colour; its alpha replaces the maximum opacity. */
|
|
94
|
+
readonly windowBackgroundColor?: string | null;
|
|
95
|
+
/** Default `'full'`. */
|
|
96
|
+
readonly contentWidthMode?: G9SheetContentWidthMode;
|
|
97
|
+
/** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */
|
|
98
|
+
readonly contentWidth?: number | null;
|
|
99
|
+
/** Full-screen sheets reserve the top inset. Default true. */
|
|
100
|
+
readonly useTopSafeAreaPadding?: boolean;
|
|
101
|
+
/** Default 0. */
|
|
102
|
+
readonly additionalTopSafeAreaPadding?: number;
|
|
103
|
+
/** Replaces the top padding (0 = flush). */
|
|
104
|
+
readonly topSafeAreaPaddingOverride?: number | null;
|
|
105
|
+
/** Grabber on full-screen toolbar sheets. Default true. */
|
|
106
|
+
readonly showFullScreenDragHandle?: boolean;
|
|
107
|
+
/** Page recede behind a tall primary sheet. Default true. */
|
|
108
|
+
readonly enableBackdropCardEffect?: boolean;
|
|
109
|
+
/** Visible ratio where the recede starts. Default 0.75. */
|
|
110
|
+
readonly backdropCardEffectThreshold?: number;
|
|
111
|
+
/** Per-sheet open duration (ms); default the settings value. */
|
|
112
|
+
readonly openAnimationDurationMs?: number | null;
|
|
113
|
+
readonly closeAnimationDurationMs?: number | null;
|
|
114
|
+
/** Factory content builds after the open motion (spinner/skeleton first). Default true. */
|
|
115
|
+
readonly deferContent?: boolean;
|
|
116
|
+
/** Delay before deferred content swaps in. Default 369. */
|
|
117
|
+
readonly loadDelayMs?: number;
|
|
118
|
+
/** The placeholder uses the full height. Default false. */
|
|
119
|
+
readonly useFullScreenLoadingPlaceholder?: boolean;
|
|
120
|
+
/** Known final body height for the placeholder. */
|
|
121
|
+
readonly deferredLoadingPlaceholderHeight?: number | null;
|
|
122
|
+
/** Covered crossfade reveal of deferred content. Default true. */
|
|
123
|
+
readonly fadeDeferredContentIn?: boolean;
|
|
124
|
+
/** Placeholder shape. Default `'none'` (spinner). */
|
|
125
|
+
readonly loadingSkeleton?: G9BottomSheetLoadingSkeleton;
|
|
126
|
+
/** 0 → the shape's default. */
|
|
127
|
+
readonly loadingSkeletonRowCount?: number;
|
|
128
|
+
/** The parent sinks and fades when this sheet stacks on it. Default true. */
|
|
129
|
+
readonly recedeParentOnStack?: boolean;
|
|
130
|
+
/** Hand-off: replaces the one open sheet once this one is ready. Default false. */
|
|
131
|
+
readonly replaceCurrentSheet?: boolean;
|
|
132
|
+
/** Three-slot header. Default false. */
|
|
133
|
+
readonly showToolbar?: boolean;
|
|
134
|
+
/** Leading back (or close) button. Default false. */
|
|
135
|
+
readonly showCloseButton?: boolean;
|
|
136
|
+
/** × instead of the back arrow. Default false. */
|
|
137
|
+
readonly useCloseIcon?: boolean;
|
|
138
|
+
readonly title?: string | null;
|
|
139
|
+
readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;
|
|
140
|
+
/** Items built from the content once it exists. */
|
|
141
|
+
readonly toolbarItemsFactory?: (() => ReadonlyArray<G9SheetToolbarItem>) | null;
|
|
142
|
+
/** Default `'center'`. */
|
|
143
|
+
readonly headerTitlePlacement?: G9SheetHeaderTitlePlacement;
|
|
144
|
+
/** Star/Auto/Star columns. Default true. */
|
|
145
|
+
readonly reserveEmptyHeaderSlots?: boolean;
|
|
146
|
+
readonly headerView?: ReactNode;
|
|
147
|
+
readonly headerLeadingView?: ReactNode;
|
|
148
|
+
readonly headerTitleView?: ReactNode;
|
|
149
|
+
readonly headerTrailingView?: ReactNode;
|
|
150
|
+
readonly headerLeadingAndTitleView?: ReactNode;
|
|
151
|
+
readonly headerTitleAndTrailingView?: ReactNode;
|
|
152
|
+
/** Custom footer; wins over `footerButtons`. */
|
|
153
|
+
readonly footerView?: ReactNode;
|
|
154
|
+
/** Equal-width footer buttons. */
|
|
155
|
+
readonly footerButtons?: ReadonlyArray<ReactNode> | null;
|
|
156
|
+
/** Default 3. */
|
|
157
|
+
readonly footerMaxButtonsPerRow?: number;
|
|
158
|
+
/** Hardware back closes. Default true. */
|
|
159
|
+
readonly hardwareBackCloses?: boolean;
|
|
160
|
+
/** Intercepts every back request (disables drag). */
|
|
161
|
+
readonly onBackRequested?: ((source: G9SheetBackSource) => G9SheetBackAction | Promise<G9SheetBackAction>) | null;
|
|
162
|
+
/** Max sheet width on Android (px). */
|
|
163
|
+
readonly androidMaxWidth?: number | null;
|
|
164
|
+
/** Max sheet height on Android (px). */
|
|
165
|
+
readonly androidMaxHeight?: number | null;
|
|
166
|
+
/** Margin around the sheet on Android `[l, t, r, b]`. */
|
|
167
|
+
readonly androidMargin?: readonly [number, number, number, number] | null;
|
|
168
|
+
/** Android half-expanded ratio override. */
|
|
169
|
+
readonly androidHalfExpandedRatio?: number | null;
|
|
170
|
+
/** Square the expanded corners on Android. */
|
|
171
|
+
readonly androidShouldRemoveExpandedCorners?: boolean | null;
|
|
172
|
+
readonly windowsMaxWidth?: number | null;
|
|
173
|
+
readonly windowsMaxHeight?: number | null;
|
|
174
|
+
readonly windowsMinWidth?: number | null;
|
|
175
|
+
readonly windowsMinHeight?: number | null;
|
|
176
|
+
/** Animate the scrim colour on iOS. Default true. */
|
|
177
|
+
readonly animateOverlayToColorOnIos?: boolean;
|
|
178
|
+
}
|
|
179
|
+
/** App-wide sheet settings (MAUI `G9BottomSheetSettings`), `<G9Provider settings={{ sheets }}>`. */
|
|
180
|
+
export interface G9SheetSettings {
|
|
181
|
+
/** Default black. */
|
|
182
|
+
readonly modalOverlayColor?: string;
|
|
183
|
+
/** Dim at the smallest detent (0–1). Default 0.3. */
|
|
184
|
+
readonly modalOverlayMinimumOpacity?: number;
|
|
185
|
+
/** Dim at full screen (0–1). Default 0.9. */
|
|
186
|
+
readonly modalOverlayMaximumOpacity?: number;
|
|
187
|
+
/** Default 300. */
|
|
188
|
+
readonly openAnimationDurationMs?: number;
|
|
189
|
+
/** Default 300. */
|
|
190
|
+
readonly closeAnimationDurationMs?: number;
|
|
191
|
+
/** Partial traversals take a proportional slice. Default true. */
|
|
192
|
+
readonly sizeScaledAnimationDuration?: boolean;
|
|
193
|
+
/** Global switch of the page recede. Default true. */
|
|
194
|
+
readonly enableBackdropCardEffect?: boolean;
|
|
195
|
+
/** Colour behind the receded page. Default black. */
|
|
196
|
+
readonly backdropCardColor?: string;
|
|
197
|
+
/** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */
|
|
198
|
+
readonly stageBeforeShow?: boolean;
|
|
199
|
+
/** Longest a hand-off waits for the successor to open before the old sheet closes anyway (0–5000). Default 250. */
|
|
200
|
+
readonly preOpenMaxHoldMs?: number;
|
|
201
|
+
/** Prebuilt (non-factory) content also waits behind the loading placeholder until after the open motion. Default false. */
|
|
202
|
+
readonly deferPrebuiltContent?: boolean;
|
|
203
|
+
/** `'platformNative'` (lynx-ui's motion) or `'timed'` (tween over the durations). Default platformNative. */
|
|
204
|
+
readonly motionStyle?: 'platformNative' | 'timed';
|
|
205
|
+
/** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */
|
|
206
|
+
readonly heightMemoVersion?: string;
|
|
207
|
+
}
|
|
208
|
+
/** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */
|
|
209
|
+
export declare function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings>;
|
|
210
|
+
/** MAUI `DefaultOptions()`: medium, `[medium, large]`, modal, cancelable, handle, draggable. */
|
|
211
|
+
export declare function defaultSheetOptions(): G9SheetOptions;
|
|
212
|
+
/** MAUI `FitToContentOptions()`: sized to a non-scrolling body, capped at 75 % of the host. */
|
|
213
|
+
export declare function fitToContentSheetOptions(): G9SheetOptions;
|
|
214
|
+
/** MAUI `FullScreenWithoutHandleOptions()`. */
|
|
215
|
+
export declare function fullScreenWithoutHandleSheetOptions(): G9SheetOptions;
|
|
216
|
+
/** MAUI `FullScreenModalOptions(title, showCloseButton, hardwareBackCloses, toolbarItems)`. */
|
|
217
|
+
export declare function fullScreenModalSheetOptions(title?: string | null, showCloseButton?: boolean, hardwareBackCloses?: boolean, toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null): G9SheetOptions;
|
|
218
|
+
/** MAUI `FullScreenEdgeToEdgeModalOptions(hardwareBackCloses)`: no header, flush top. */
|
|
219
|
+
export declare function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses?: boolean): G9SheetOptions;
|
|
220
|
+
//# 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,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,2B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,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC,eAAe,CAAC,CAoBrG;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"}
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function defaultSheetOptions() {
|
|
29
|
+
return {
|
|
30
|
+
currentState: 'medium',
|
|
31
|
+
states: [
|
|
32
|
+
'medium',
|
|
33
|
+
'large'
|
|
34
|
+
],
|
|
35
|
+
sizeMode: 'states',
|
|
36
|
+
halfExpandedRatio: 0.5,
|
|
37
|
+
fullExpandedRatio: 1
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function fitToContentSheetOptions() {
|
|
41
|
+
return {
|
|
42
|
+
sizeMode: 'fitToContent',
|
|
43
|
+
isCancelable: true,
|
|
44
|
+
hasHandle: true,
|
|
45
|
+
isDraggable: true,
|
|
46
|
+
deferContent: true
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function fullScreenWithoutHandleSheetOptions() {
|
|
50
|
+
return {
|
|
51
|
+
currentState: 'large',
|
|
52
|
+
states: [
|
|
53
|
+
'large'
|
|
54
|
+
],
|
|
55
|
+
isCancelable: false,
|
|
56
|
+
isDraggable: false,
|
|
57
|
+
hasHandle: false,
|
|
58
|
+
deferContent: true
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function fullScreenModalSheetOptions(title, showCloseButton = true, hardwareBackCloses = true, toolbarItems) {
|
|
62
|
+
return {
|
|
63
|
+
currentState: 'large',
|
|
64
|
+
states: [
|
|
65
|
+
'large'
|
|
66
|
+
],
|
|
67
|
+
sizeMode: 'states',
|
|
68
|
+
isCancelable: false,
|
|
69
|
+
isDraggable: false,
|
|
70
|
+
hasHandle: false,
|
|
71
|
+
cornerRadius: 0,
|
|
72
|
+
backgroundColor: 'var(--g9-background)',
|
|
73
|
+
showToolbar: true,
|
|
74
|
+
showCloseButton,
|
|
75
|
+
title: null != title ? title : null,
|
|
76
|
+
toolbarItems: null != toolbarItems ? toolbarItems : null,
|
|
77
|
+
hardwareBackCloses
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses = true) {
|
|
81
|
+
return {
|
|
82
|
+
...fullScreenModalSheetOptions(null, false, hardwareBackCloses),
|
|
83
|
+
showToolbar: false,
|
|
84
|
+
useTopSafeAreaPadding: false,
|
|
85
|
+
topSafeAreaPaddingOverride: 0,
|
|
86
|
+
additionalTopSafeAreaPadding: 0
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export { defaultSheetOptions, fitToContentSheetOptions, fullScreenEdgeToEdgeModalSheetOptions, fullScreenModalSheetOptions, fullScreenWithoutHandleSheetOptions, resolveSheetSettings };
|
|
90
|
+
|
|
91
|
+
//# 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 /** Stable key (default the index). */\n readonly key?: string;\n}\n\n/** Lifecycle callbacks of one sheet (MAUI `Opening/Opened/Closing/ClosedCommand`). */\nexport interface G9SheetLifecycle {\n /** When the sheet starts opening. */\n readonly onOpening?: () => void;\n /** After the open motion (or its timer fallback). */\n readonly onOpened?: () => void;\n /** Once, when closing starts (not on an in-place replace). */\n readonly onClosing?: () => void;\n /** Once, at cleanup. */\n readonly onClosed?: () => void;\n /** The sheet came to rest at another detent (MAUI `G9SheetView.StateChanged`), with its height in px. */\n readonly onStateChanged?: (detent: G9SheetDetent | 'fit', heightPx: number) => void;\n}\n\n/** Everything a sheet can be opened with (MAUI `G9BottomSheetOptions`; 77 properties + presets). */\nexport interface G9SheetOptions extends G9SheetLifecycle {\n // State and sizing\n /** Initial detent. Default `'medium'`. */\n readonly currentState?: G9SheetDetent;\n /** Allowed detents. Default `['medium', 'large']`. */\n readonly states?: ReadonlyArray<G9SheetDetent>;\n /** Default `'states'`. */\n readonly sizeMode?: G9SheetSizeMode;\n /** Dim scrim that blocks the page. Default true. */\n readonly isModal?: boolean;\n /** Overlay tap / drag may close. Default true. */\n readonly isCancelable?: boolean;\n /** Default true. */\n readonly isDraggable?: boolean;\n /** Grabber. Default true. */\n readonly hasHandle?: boolean;\n /** Peek height (dp). Default 100 (with `collapsedHeight`). */\n readonly peekHeight?: number | null;\n /** Alias of `peekHeight` (MAUI `CollapsedHeight`); wins when both are set. */\n readonly collapsedHeight?: number | null;\n /** Medium = host × ratio (0.1–0.9). Default 0.5. */\n readonly halfExpandedRatio?: number | null;\n /** Large = host × ratio (0.1–1). Default 1. */\n readonly fullExpandedRatio?: number | null;\n /** Cap of a fit sheet (0.2–1). Default 0.75. */\n readonly maxFitToContentHeightRatio?: number;\n /** The largest detent is sized to the content (states mode). Default false. */\n readonly expandedFitsContent?: boolean;\n /** A drag on a scroller expands the sheet first. Default true. */\n readonly scrollingExpandsSheet?: boolean;\n /** Height memory key (needed for factory content). */\n readonly heightMemoKey?: string | null;\n // Visual\n /** Body padding. Default 0. */\n readonly padding?: number;\n /** 10 px gap under the header hairline. Default true. */\n readonly useStandardBodyTopGap?: boolean;\n /** Top corners. Default 12. */\n readonly cornerRadius?: number;\n /** Body background. Default `var(--g9-surface-container)`. */\n readonly backgroundColor?: string | null;\n /** Scrim colour; its alpha replaces the maximum opacity. */\n readonly windowBackgroundColor?: string | null;\n /** Default `'full'`. */\n readonly contentWidthMode?: G9SheetContentWidthMode;\n /** Width in `'custom'` mode (MAUI `G9BottomSheetContentWidth`). */\n readonly contentWidth?: number | null;\n /** Full-screen sheets reserve the top inset. Default true. */\n readonly useTopSafeAreaPadding?: boolean;\n /** Default 0. */\n readonly additionalTopSafeAreaPadding?: number;\n /** Replaces the top padding (0 = flush). */\n readonly topSafeAreaPaddingOverride?: number | null;\n /** Grabber on full-screen toolbar sheets. Default true. */\n readonly showFullScreenDragHandle?: boolean;\n /** Page recede behind a tall primary sheet. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Visible ratio where the recede starts. Default 0.75. */\n readonly backdropCardEffectThreshold?: number;\n // Animation and loading\n /** Per-sheet open duration (ms); default the settings value. */\n readonly openAnimationDurationMs?: number | null;\n readonly closeAnimationDurationMs?: number | null;\n /** Factory content builds after the open motion (spinner/skeleton first). Default true. */\n readonly deferContent?: boolean;\n /** Delay before deferred content swaps in. Default 369. */\n readonly loadDelayMs?: number;\n /** The placeholder uses the full height. Default false. */\n readonly useFullScreenLoadingPlaceholder?: boolean;\n /** Known final body height for the placeholder. */\n readonly deferredLoadingPlaceholderHeight?: number | null;\n /** Covered crossfade reveal of deferred content. Default true. */\n readonly fadeDeferredContentIn?: boolean;\n /** Placeholder shape. Default `'none'` (spinner). */\n readonly loadingSkeleton?: G9BottomSheetLoadingSkeleton;\n /** 0 → the shape's default. */\n readonly loadingSkeletonRowCount?: number;\n // Stack and replace\n /** The parent sinks and fades when this sheet stacks on it. Default true. */\n readonly recedeParentOnStack?: boolean;\n /** Hand-off: replaces the one open sheet once this one is ready. Default false. */\n readonly replaceCurrentSheet?: boolean;\n // Header and footer\n /** Three-slot header. Default false. */\n readonly showToolbar?: boolean;\n /** Leading back (or close) button. Default false. */\n readonly showCloseButton?: boolean;\n /** × instead of the back arrow. Default false. */\n readonly useCloseIcon?: boolean;\n readonly title?: string | null;\n readonly toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null;\n /** Items built from the content once it exists. */\n readonly toolbarItemsFactory?: (() => ReadonlyArray<G9SheetToolbarItem>) | null;\n /** Default `'center'`. */\n readonly headerTitlePlacement?: G9SheetHeaderTitlePlacement;\n /** Star/Auto/Star columns. Default true. */\n readonly reserveEmptyHeaderSlots?: boolean;\n readonly headerView?: ReactNode;\n readonly headerLeadingView?: ReactNode;\n readonly headerTitleView?: ReactNode;\n readonly headerTrailingView?: ReactNode;\n readonly headerLeadingAndTitleView?: ReactNode;\n readonly headerTitleAndTrailingView?: ReactNode;\n /** Custom footer; wins over `footerButtons`. */\n readonly footerView?: ReactNode;\n /** Equal-width footer buttons. */\n readonly footerButtons?: ReadonlyArray<ReactNode> | null;\n /** Default 3. */\n readonly footerMaxButtonsPerRow?: number;\n /** Hardware back closes. Default true. */\n readonly hardwareBackCloses?: boolean;\n /** Intercepts every back request (disables drag). */\n readonly onBackRequested?: ((source: G9SheetBackSource) => G9SheetBackAction | Promise<G9SheetBackAction>) | null;\n // Platform specific (accepted; applied where Lynx has an equivalent)\n /** Max sheet width on Android (px). */\n readonly androidMaxWidth?: number | null;\n /** Max sheet height on Android (px). */\n readonly androidMaxHeight?: number | null;\n /** Margin around the sheet on Android `[l, t, r, b]`. */\n readonly androidMargin?: readonly [number, number, number, number] | null;\n /** Android half-expanded ratio override. */\n readonly androidHalfExpandedRatio?: number | null;\n /** Square the expanded corners on Android. */\n readonly androidShouldRemoveExpandedCorners?: boolean | null;\n readonly windowsMaxWidth?: number | null;\n readonly windowsMaxHeight?: number | null;\n readonly windowsMinWidth?: number | null;\n readonly windowsMinHeight?: number | null;\n /** Animate the scrim colour on iOS. Default true. */\n readonly animateOverlayToColorOnIos?: boolean;\n}\n\n/** App-wide sheet settings (MAUI `G9BottomSheetSettings`), `<G9Provider settings={{ sheets }}>`. */\nexport interface G9SheetSettings {\n /** Default black. */\n readonly modalOverlayColor?: string;\n /** Dim at the smallest detent (0–1). Default 0.3. */\n readonly modalOverlayMinimumOpacity?: number;\n /** Dim at full screen (0–1). Default 0.9. */\n readonly modalOverlayMaximumOpacity?: number;\n /** Default 300. */\n readonly openAnimationDurationMs?: number;\n /** Default 300. */\n readonly closeAnimationDurationMs?: number;\n /** Partial traversals take a proportional slice. Default true. */\n readonly sizeScaledAnimationDuration?: boolean;\n /** Global switch of the page recede. Default true. */\n readonly enableBackdropCardEffect?: boolean;\n /** Colour behind the receded page. Default black. */\n readonly backdropCardColor?: string;\n /** Staged pipeline: a `replaceCurrentSheet` successor hands off once it is ready. Default true. */\n readonly stageBeforeShow?: boolean;\n /** Longest a hand-off waits for the successor to open before the old sheet closes anyway (0–5000). Default 250. */\n readonly preOpenMaxHoldMs?: number;\n /** Prebuilt (non-factory) content also waits behind the loading placeholder until after the open motion. Default false. */\n readonly deferPrebuiltContent?: boolean;\n /** `'platformNative'` (lynx-ui's motion) or `'timed'` (tween over the durations). Default platformNative. */\n readonly motionStyle?: 'platformNative' | 'timed';\n /** The app version the persisted sheet heights belong to; another version discards them. Default `'0'`. */\n readonly heightMemoVersion?: string;\n}\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst finite = (v: number | undefined, fallback: number) =>\n typeof v === 'number' && Number.isFinite(v) ? v : fallback;\n\n/** {@link G9SheetSettings} with defaults, clamped like MAUI `G9BottomSheetSettings.Normalize`. */\nexport function resolveSheetSettings(settings: G9SheetSettings | undefined): Required<G9SheetSettings> {\n const s = settings ?? {};\n let min = clamp(finite(s.modalOverlayMinimumOpacity, 0.3), 0, 1);\n let max = clamp(finite(s.modalOverlayMaximumOpacity, 0.9), 0, 1);\n if (min > max) [min, max] = [max, min];\n return Object.freeze({\n modalOverlayColor: s.modalOverlayColor ?? '#000000',\n modalOverlayMinimumOpacity: min,\n modalOverlayMaximumOpacity: max,\n openAnimationDurationMs: Math.max(0, finite(s.openAnimationDurationMs, 300)),\n closeAnimationDurationMs: Math.max(0, finite(s.closeAnimationDurationMs, 300)),\n sizeScaledAnimationDuration: s.sizeScaledAnimationDuration ?? true,\n enableBackdropCardEffect: s.enableBackdropCardEffect ?? true,\n backdropCardColor: s.backdropCardColor ?? '#000000',\n stageBeforeShow: s.stageBeforeShow ?? true,\n preOpenMaxHoldMs: clamp(finite(s.preOpenMaxHoldMs, 250), 0, 5000),\n deferPrebuiltContent: s.deferPrebuiltContent ?? false,\n motionStyle: s.motionStyle ?? 'platformNative',\n heightMemoVersion: s.heightMemoVersion ?? '0',\n });\n}\n\n/** MAUI `DefaultOptions()`: medium, `[medium, large]`, modal, cancelable, handle, draggable. */\nexport function defaultSheetOptions(): G9SheetOptions {\n return {\n currentState: 'medium',\n states: ['medium', 'large'],\n sizeMode: 'states',\n halfExpandedRatio: 0.5,\n fullExpandedRatio: 1,\n };\n}\n\n/** MAUI `FitToContentOptions()`: sized to a non-scrolling body, capped at 75 % of the host. */\nexport function fitToContentSheetOptions(): G9SheetOptions {\n return { sizeMode: 'fitToContent', isCancelable: true, hasHandle: true, isDraggable: true, deferContent: true };\n}\n\n/** MAUI `FullScreenWithoutHandleOptions()`. */\nexport function fullScreenWithoutHandleSheetOptions(): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n deferContent: true,\n };\n}\n\n/** MAUI `FullScreenModalOptions(title, showCloseButton, hardwareBackCloses, toolbarItems)`. */\nexport function fullScreenModalSheetOptions(\n title?: string | null,\n showCloseButton = true,\n hardwareBackCloses = true,\n toolbarItems?: ReadonlyArray<G9SheetToolbarItem> | null,\n): G9SheetOptions {\n return {\n currentState: 'large',\n states: ['large'],\n sizeMode: 'states',\n isCancelable: false,\n isDraggable: false,\n hasHandle: false,\n cornerRadius: 0,\n backgroundColor: 'var(--g9-background)',\n showToolbar: true,\n showCloseButton,\n title: title ?? null,\n toolbarItems: toolbarItems ?? null,\n hardwareBackCloses,\n };\n}\n\n/** MAUI `FullScreenEdgeToEdgeModalOptions(hardwareBackCloses)`: no header, flush top. */\nexport function fullScreenEdgeToEdgeModalSheetOptions(hardwareBackCloses = true): G9SheetOptions {\n return {\n ...fullScreenModalSheetOptions(null, false, hardwareBackCloses),\n showToolbar: false,\n useTopSafeAreaPadding: false,\n topSafeAreaPaddingOverride: 0,\n additionalTopSafeAreaPadding: 0,\n };\n}\n"],"names":["clamp","v","lo","hi","Math","finite","fallback","Number","resolveSheetSettings","settings","_s_modalOverlayColor","_s_sizeScaledAnimationDuration","_s_enableBackdropCardEffect","_s_backdropCardColor","_s_stageBeforeShow","_s_deferPrebuiltContent","_s_motionStyle","_s_heightMemoVersion","s","min","max","Object","defaultSheetOptions","fitToContentSheetOptions","fullScreenWithoutHandleSheetOptions","fullScreenModalSheetOptions","title","showCloseButton","hardwareBackCloses","toolbarItems","fullScreenEdgeToEdgeModalSheetOptions"],"mappings":"AA6NA,MAAMA,QAAQ,CAACC,GAAWC,IAAYC,KAAeC,KAAK,GAAG,CAACD,IAAIC,KAAK,GAAG,CAACF,IAAID;AAC/E,MAAMI,SAAS,CAACJ,GAAuBK,WACrC,AAAa,YAAb,OAAOL,KAAkBM,OAAO,QAAQ,CAACN,KAAKA,IAAIK;AAG7C,SAASE,qBAAqBC,QAAqC;QAMnDC,sBAKUC,gCACHC,6BACPC,sBACFC,oBAEKC,yBACTC,gBACMC;IAjBrB,MAAMC,IAAIT,QAAAA,WAAAA,WAAY,CAAC;IACvB,IAAIU,MAAMnB,MAAMK,OAAOa,EAAE,0BAA0B,EAAE,MAAM,GAAG;IAC9D,IAAIE,MAAMpB,MAAMK,OAAOa,EAAE,0BAA0B,EAAE,MAAM,GAAG;IAC9D,IAAIC,MAAMC,KAAK,CAACD,KAAKC,IAAI,GAAG;QAACA;QAAKD;KAAI;IACtC,OAAOE,OAAO,MAAM,CAAC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,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"}
|