@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,66 @@
|
|
|
1
|
+
import { G9StringKey } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { useEffect, useRef, useState } from "@lynx-js/react";
|
|
3
|
+
import { G9ActivityIndicator } from "../display/activity-indicator.jsx";
|
|
4
|
+
import { useG9Executor, useG9Strings } from "../provider/hooks.jsx";
|
|
5
|
+
import { useG9SheetContext } from "./frame.jsx";
|
|
6
|
+
function G9ProcessingSheetContent(props) {
|
|
7
|
+
var _props_loadingHeight;
|
|
8
|
+
const sheet = useG9SheetContext();
|
|
9
|
+
const executor = useG9Executor();
|
|
10
|
+
const strings = useG9Strings();
|
|
11
|
+
const [built, setBuilt] = useState(null);
|
|
12
|
+
const started = useRef(false);
|
|
13
|
+
const latest = useRef(props);
|
|
14
|
+
latest.current = props;
|
|
15
|
+
useEffect(()=>{
|
|
16
|
+
var _ref;
|
|
17
|
+
var _props_handle;
|
|
18
|
+
if (started.current || !sheet) return;
|
|
19
|
+
started.current = true;
|
|
20
|
+
const handle = null != (_ref = null == (_props_handle = props.handle) ? void 0 : _props_handle.call(props)) ? _ref : sheet.handle;
|
|
21
|
+
const signal = sheet.signal;
|
|
22
|
+
const run = async ()=>{
|
|
23
|
+
try {
|
|
24
|
+
const node = await latest.current.build(handle, signal);
|
|
25
|
+
if (signal.aborted) return;
|
|
26
|
+
if (null == node) return void handle.close();
|
|
27
|
+
setBuilt({
|
|
28
|
+
node
|
|
29
|
+
});
|
|
30
|
+
} catch (error) {
|
|
31
|
+
if (signal.aborted) return;
|
|
32
|
+
await executor.run(()=>{
|
|
33
|
+
throw error;
|
|
34
|
+
}, {
|
|
35
|
+
source: 'G9ProcessingSheet',
|
|
36
|
+
showErrorPopup: false,
|
|
37
|
+
enableThrottle: false,
|
|
38
|
+
preventConcurrentExecution: false
|
|
39
|
+
});
|
|
40
|
+
const onError = latest.current.onError;
|
|
41
|
+
if (onError) {
|
|
42
|
+
try {
|
|
43
|
+
await onError(error, handle);
|
|
44
|
+
} catch {}
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
await executor.showOperationError(strings.get(G9StringKey.UnexpectedError), {
|
|
48
|
+
title: strings.get(G9StringKey.Error)
|
|
49
|
+
});
|
|
50
|
+
handle.close();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
run();
|
|
54
|
+
}, [
|
|
55
|
+
sheet
|
|
56
|
+
]);
|
|
57
|
+
if (built) return <view className="g9-processing-sheet">{built.node}</view>;
|
|
58
|
+
return <view className="g9-processing-sheet__loading" style={{
|
|
59
|
+
height: `${null != (_props_loadingHeight = props.loadingHeight) ? _props_loadingHeight : 160}px`
|
|
60
|
+
}}>
|
|
61
|
+
<G9ActivityIndicator running size={42}/>
|
|
62
|
+
</view>;
|
|
63
|
+
}
|
|
64
|
+
export { G9ProcessingSheetContent };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=processing.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/processing.jsx","sources":["../../src/sheet/processing.tsx"],"sourcesContent":["import { G9StringKey } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useRef, useState } from '@lynx-js/react';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { useG9Executor, useG9Strings } from '../provider/hooks';\nimport { useG9SheetContext } from './frame';\nimport type { G9SheetHandle } from './stack';\n\n/** Builds the body of a processing sheet: the node, or `null` to close quietly. Called once, after opening. */\nexport type G9ProcessingBuild = (\n handle: G9SheetHandle,\n signal: import('@g9tm/lynxcontrols-foundation').G9AbortSignal,\n) => Promise<ReactNode | null> | ReactNode | null;\n/** Handles a build failure (the sheet stays open unless it closes it). */\nexport type G9ProcessingErrorHandler = (error: unknown, handle: G9SheetHandle) => unknown;\n\n/** Props of {@link G9ProcessingSheetContent}. */\nexport interface G9ProcessingSheetContentProps {\n readonly build: G9ProcessingBuild;\n readonly onError?: G9ProcessingErrorHandler;\n /** Spinner box height. Default 160. */\n readonly loadingHeight?: number;\n /** The sheet handle (for content created before the handle existed). Default the enclosing sheet's. */\n readonly handle?: () => G9SheetHandle | null;\n}\n\n/**\n * The body of a processing sheet (MAUI `ProcessingSheetContentView`): a 42 px spinner in a `loadingHeight` box, then\n * the built body swapped in at once. A failure is always logged (no popup); then `onError` runs, or the error popup\n * shows and the sheet closes. `null` closes the sheet quietly. A close cancels the build (`signal`).\n */\nexport function G9ProcessingSheetContent(props: G9ProcessingSheetContentProps): ReactNode {\n const sheet = useG9SheetContext();\n const executor = useG9Executor();\n const strings = useG9Strings();\n const [built, setBuilt] = useState<{ node: ReactNode } | null>(null);\n const started = useRef(false);\n const latest = useRef(props);\n latest.current = props;\n useEffect(() => {\n if (started.current || !sheet) return;\n started.current = true;\n const handle = props.handle?.() ?? sheet.handle;\n const signal = sheet.signal;\n const run = async () => {\n try {\n const node = await latest.current.build(handle, signal);\n if (signal.aborted) return;\n if (node === null || node === undefined) {\n handle.close();\n return;\n }\n setBuilt({ node });\n } catch (error) {\n if (signal.aborted) return;\n await executor.run(\n () => {\n throw error;\n },\n {\n source: 'G9ProcessingSheet',\n showErrorPopup: false,\n enableThrottle: false,\n preventConcurrentExecution: false,\n },\n );\n const onError = latest.current.onError;\n if (onError) {\n try {\n await onError(error, handle);\n } catch {\n // A failing error handler must not take the sheet down.\n }\n return;\n }\n await executor.showOperationError(strings.get(G9StringKey.UnexpectedError), {\n title: strings.get(G9StringKey.Error),\n });\n handle.close();\n }\n };\n void run();\n }, [sheet]);\n if (built) return <view className=\"g9-processing-sheet\">{built.node}</view>;\n return (\n <view className=\"g9-processing-sheet__loading\" style={{ height: `${props.loadingHeight ?? 160}px` }}>\n <G9ActivityIndicator running size={42} />\n </view>\n );\n}\n"],"names":["G9ProcessingSheetContent","props","_props_loadingHeight","sheet","useG9SheetContext","executor","useG9Executor","strings","useG9Strings","built","setBuilt","useState","started","useRef","latest","useEffect","handle","signal","run","node","error","onError","G9StringKey","view","G9ActivityIndicator"],"mappings":";;;;;AA8BO,SAASA,yBAAyBC,KAAoC;QAsDNC;IArDrE,M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GAAGc;IACtE,QACGA,KAAK,UAAU,+BAA+B,OAAO;QAAE,QAAQ,GAAG,QAAArB,CAAAA,uBAAAA,MAAM,aAAa,AAAD,IAAlBA,uBAAuB,IAAI,EAAE,CAAC;IAAC,GAAG;MACnG,CAACsB,oBAAoB,QAAQ,MAAM,KAAM;IAC3C,EAAED;AAEN"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type G9HostHandle } from '../host/registry.js';
|
|
2
|
+
import { type G9SheetHeightMemo, type G9SheetMemoPreferences } from './height-memo.js';
|
|
3
|
+
import { type G9SheetOptions, type G9SheetSettings } from './options.js';
|
|
4
|
+
import { type G9ProcessingBuild, type G9ProcessingErrorHandler } from './processing.js';
|
|
5
|
+
import { type G9SheetContent, type G9SheetHandle, G9SheetStack } from './stack.js';
|
|
6
|
+
/** The sheet API of one host (MAUI `G9BottomSheetHelper` + `G9BottomSheetExtensions`). */
|
|
7
|
+
export interface G9SheetService {
|
|
8
|
+
/**
|
|
9
|
+
* Opens a sheet (MAUI `ShowG9BottomSheet`): auto-stacks over an open sheet, hands off with `replaceCurrentSheet`,
|
|
10
|
+
* otherwise opens as primary. `content` may be a factory, built after the open motion (`deferContent`). Returns the
|
|
11
|
+
* sheet-scoped handle, or `null` when throttled (a second show/replace within 369 ms).
|
|
12
|
+
*/
|
|
13
|
+
show(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;
|
|
14
|
+
/** `show` as a promise (MAUI `ShowG9BottomSheetAsync`): resolves with the handle (or `null`). */
|
|
15
|
+
showAsync(content: G9SheetContent, options?: G9SheetOptions): Promise<G9SheetHandle | null>;
|
|
16
|
+
/** Replaces the open sheet in place when it can morph, else back-closes it and opens (MAUI `ReplaceG9BottomSheet`). */
|
|
17
|
+
replace(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;
|
|
18
|
+
/**
|
|
19
|
+
* Opens at once with a spinner, then builds the body (MAUI `ShowProcessingG9BottomSheet`): `build(handle, signal)`
|
|
20
|
+
* returns the body (the sheet grows to fit), `null` (closes quietly) or throws (`onError`, else error popup + close).
|
|
21
|
+
* Default options: fit to content, not deferred.
|
|
22
|
+
*/
|
|
23
|
+
showProcessing(build: G9ProcessingBuild, options?: G9SheetOptions, onError?: G9ProcessingErrorHandler, loadingHeight?: number): G9SheetHandle | null;
|
|
24
|
+
/** Full-screen modal sheet, not throttled (MAUI `ShowFullScreenAsync`). */
|
|
25
|
+
showFullScreen(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle;
|
|
26
|
+
/** Back-routes the top sheet (MAUI `CloseTopG9BottomSheet`). */
|
|
27
|
+
closeTop(): void;
|
|
28
|
+
/** Closes every sheet (MAUI `CloseG9BottomSheet`). */
|
|
29
|
+
closeAll(): void;
|
|
30
|
+
/** Open sheets (MAUI `GetOpenSheetCount`). */
|
|
31
|
+
getOpenCount(): number;
|
|
32
|
+
/** Routes hardware back to the top sheet; `false` when none is open (MAUI `HandleHardwareBackPressed`). */
|
|
33
|
+
handleHardwareBack(): boolean;
|
|
34
|
+
/** `true` while a hand-off successor is replacing this sheet (MAUI `IsBeingReplaced`). */
|
|
35
|
+
isBeingReplaced(handle: G9SheetHandle | null | undefined): boolean;
|
|
36
|
+
/** The scrim colour behind receded pages (MAUI `GetBackdropCardColor`). */
|
|
37
|
+
getBackdropCardColor(): string;
|
|
38
|
+
/** The height memory of this host's sheets. */
|
|
39
|
+
readonly heightMemo: G9SheetHeightMemo;
|
|
40
|
+
/** The stack (advanced: rendering, tests). */
|
|
41
|
+
readonly stack: G9SheetStack;
|
|
42
|
+
}
|
|
43
|
+
/** The sheet service of a host, created on first use. */
|
|
44
|
+
export declare function sheetServiceOf(host: G9HostHandle, settings?: Required<G9SheetSettings>, preferences?: G9SheetMemoPreferences): G9SheetService;
|
|
45
|
+
/**
|
|
46
|
+
* The sheets of the nearest `G9Host` (MAUI `G9BottomSheetHelper` for that page). Sheets render in the host's
|
|
47
|
+
* `sheets` layer; hardware back closes the top sheet first; the host's unmount settles every open sheet.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useG9Sheets(): G9SheetService;
|
|
50
|
+
/**
|
|
51
|
+
* The sheets of the active host for code outside components (MAUI's static `G9BottomSheetHelper`): view models,
|
|
52
|
+
* services. Throws `host-missing` when no host is mounted.
|
|
53
|
+
*/
|
|
54
|
+
export declare function g9Sheets(): G9SheetService;
|
|
55
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/sheet/service.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAG9D,OAAO,EAAyB,KAAK,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EAErB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,wBAAwB,EAA4B,MAAM,cAAc,CAAC;AAE/G,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEhF,0FAA0F;AAC1F,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,IAAI,CAAC;IAC9E,iGAAiG;IACjG,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IAC5F,uHAAuH;IACvH,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,IAAI,CAAC;IACjF;;;;OAIG;IACH,cAAc,CACZ,KAAK,EAAE,iBAAiB,EACxB,OAAO,CAAC,EAAE,cAAc,EACxB,OAAO,CAAC,EAAE,wBAAwB,EAClC,aAAa,CAAC,EAAE,MAAM,GACrB,aAAa,GAAG,IAAI,CAAC;IACxB,2EAA2E;IAC3E,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IACjF,gEAAgE;IAChE,QAAQ,IAAI,IAAI,CAAC;IACjB,sDAAsD;IACtD,QAAQ,IAAI,IAAI,CAAC;IACjB,8CAA8C;IAC9C,YAAY,IAAI,MAAM,CAAC;IACvB,2GAA2G;IAC3G,kBAAkB,IAAI,OAAO,CAAC;IAC9B,0FAA0F;IAC1F,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;IACnE,2EAA2E;IAC3E,oBAAoB,IAAI,MAAM,CAAC;IAC/B,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AA+ID,yDAAyD;AACzD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,YAAY,EAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,EACpC,WAAW,CAAC,EAAE,sBAAsB,GACnC,cAAc,CAIhB;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,cAAc,CAI5C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAEzC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { useEffect, useRef, useState, useSyncExternalStore } from "@lynx-js/react";
|
|
2
|
+
import { startTimer, stopTimer } from "../base/timers.jsx";
|
|
3
|
+
import { useG9Host, useG9HostInsets } from "../host/hooks.jsx";
|
|
4
|
+
import { g9Hosts } from "../host/registry.jsx";
|
|
5
|
+
import { useG9Culture, useG9Preferences, useG9Settings, useG9Theme, useG9Window } from "../provider/hooks.jsx";
|
|
6
|
+
import { G9SheetFrame } from "./frame.jsx";
|
|
7
|
+
import { createSheetHeightMemo } from "./height-memo.jsx";
|
|
8
|
+
import { fitToContentSheetOptions, fullScreenModalSheetOptions, resolveSheetSettings } from "./options.jsx";
|
|
9
|
+
import { G9ProcessingSheetContent } from "./processing.jsx";
|
|
10
|
+
import { backdropCardTransform, sheetVisibleRatio } from "./sizing.jsx";
|
|
11
|
+
import { G9SheetStack } from "./stack.jsx";
|
|
12
|
+
const FEATURE = 'g9.sheets';
|
|
13
|
+
function StackView(props) {
|
|
14
|
+
var _primary_options_backdropCardEffectThreshold;
|
|
15
|
+
const { state } = props;
|
|
16
|
+
state.settings = useG9Settings().sheets;
|
|
17
|
+
const win = useG9Window();
|
|
18
|
+
const insets = useG9HostInsets();
|
|
19
|
+
const culture = useG9Culture();
|
|
20
|
+
const stack = state.service.stack;
|
|
21
|
+
const entries = useSyncExternalStore((l)=>stack.subscribe(l), ()=>stack.getSnapshot());
|
|
22
|
+
const host = useG9Host();
|
|
23
|
+
const [rest, setRest] = useState(null);
|
|
24
|
+
const primary = entries.find((e)=>'opening' === e.status || 'open' === e.status);
|
|
25
|
+
const card = state.settings.enableBackdropCardEffect && void 0 !== primary && false !== primary.options.enableBackdropCardEffect && 'fitToContent' !== primary.options.sizeMode && backdropCardTransform(sheetVisibleRatio(primary.options, win.height, (null == rest ? void 0 : rest.id) === primary.id ? rest.heightPx : null), Math.min(0.99, Math.max(0.1, null != (_primary_options_backdropCardEffectThreshold = primary.options.backdropCardEffectThreshold) ? _primary_options_backdropCardEffectThreshold : 0.75)));
|
|
26
|
+
const effectOn = card && card.scale < 1 ? card : null;
|
|
27
|
+
const effect = effectOn ? {
|
|
28
|
+
scale: Math.round(1000 * effectOn.scale) / 1000,
|
|
29
|
+
translateY: Math.round(10 * effectOn.translateY) / 10,
|
|
30
|
+
durationMs: state.settings.openAnimationDurationMs,
|
|
31
|
+
backdropColor: state.settings.backdropCardColor
|
|
32
|
+
} : null;
|
|
33
|
+
const effectKey = effect ? `${effect.scale}|${effect.translateY}|${effect.durationMs}|${effect.backdropColor}` : '';
|
|
34
|
+
useEffect(()=>{
|
|
35
|
+
host.setContentEffect(effect);
|
|
36
|
+
}, [
|
|
37
|
+
effectKey
|
|
38
|
+
]);
|
|
39
|
+
useEffect(()=>()=>stack.dispose(), [
|
|
40
|
+
stack
|
|
41
|
+
]);
|
|
42
|
+
const scheme = useG9Theme().scheme;
|
|
43
|
+
const lastScheme = useRef(scheme);
|
|
44
|
+
useEffect(()=>{
|
|
45
|
+
if (lastScheme.current === scheme) return;
|
|
46
|
+
lastScheme.current = scheme;
|
|
47
|
+
state.service.heightMemo.invalidate();
|
|
48
|
+
}, [
|
|
49
|
+
scheme
|
|
50
|
+
]);
|
|
51
|
+
const top = [
|
|
52
|
+
...entries
|
|
53
|
+
].reverse().find((e)=>'opening' === e.status || 'open' === e.status);
|
|
54
|
+
return <view className="g9-sheet-stack">
|
|
55
|
+
{entries.map((entry)=><G9SheetFrame key={entry.frameKey} entry={entry} stack={stack} hostHeight={win.height} hostWidth={win.width} topInset={insets.top} bottomInset={insets.bottom} settings={state.settings} memo={state.service.heightMemo} culture={culture.locale} isTop={entry === top} onRest={(heightPx)=>setRest({
|
|
56
|
+
id: entry.id,
|
|
57
|
+
heightPx
|
|
58
|
+
})}/>)}
|
|
59
|
+
</view>;
|
|
60
|
+
}
|
|
61
|
+
function createSheetService(host, settings, preferences) {
|
|
62
|
+
const clock = host.services.clock;
|
|
63
|
+
const state = {
|
|
64
|
+
settings: null != settings ? settings : resolveSheetSettings(void 0)
|
|
65
|
+
};
|
|
66
|
+
const stack = new G9SheetStack({
|
|
67
|
+
now: ()=>clock.monotonicNow(),
|
|
68
|
+
setTimer: (cb, ms)=>startTimer(cb, ms),
|
|
69
|
+
clearTimer: (h)=>stopTimer(h),
|
|
70
|
+
durations: (o)=>{
|
|
71
|
+
var _o_openAnimationDurationMs, _o_closeAnimationDurationMs;
|
|
72
|
+
return {
|
|
73
|
+
open: null != (_o_openAnimationDurationMs = o.openAnimationDurationMs) ? _o_openAnimationDurationMs : state.settings.openAnimationDurationMs,
|
|
74
|
+
close: null != (_o_closeAnimationDurationMs = o.closeAnimationDurationMs) ? _o_closeAnimationDurationMs : state.settings.closeAnimationDurationMs
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
stageBeforeShow: ()=>state.settings.stageBeforeShow,
|
|
78
|
+
preOpenMaxHoldMs: ()=>state.settings.preOpenMaxHoldMs
|
|
79
|
+
});
|
|
80
|
+
const heightMemo = createSheetHeightMemo({
|
|
81
|
+
...preferences ? {
|
|
82
|
+
preferences
|
|
83
|
+
} : {},
|
|
84
|
+
appVersion: state.settings.heightMemoVersion,
|
|
85
|
+
setTimer: (cb, ms)=>startTimer(cb, ms),
|
|
86
|
+
clearTimer: (h)=>stopTimer(h)
|
|
87
|
+
});
|
|
88
|
+
const service = {
|
|
89
|
+
stack,
|
|
90
|
+
heightMemo,
|
|
91
|
+
show: (content, options)=>stack.show(content, null != options ? options : {}),
|
|
92
|
+
showAsync: (content, options)=>Promise.resolve(stack.show(content, null != options ? options : {})),
|
|
93
|
+
replace: (content, options)=>stack.replace(content, null != options ? options : fitToContentSheetOptions()),
|
|
94
|
+
showProcessing (build, options, onError, loadingHeight) {
|
|
95
|
+
let handle = null;
|
|
96
|
+
const content = ()=><G9ProcessingSheetContent build={build} {...onError ? {
|
|
97
|
+
onError
|
|
98
|
+
} : {}} loadingHeight={loadingHeight && loadingHeight > 0 ? loadingHeight : 160} handle={()=>handle}/>;
|
|
99
|
+
handle = stack.show(content, {
|
|
100
|
+
...null != options ? options : fitToContentSheetOptions(),
|
|
101
|
+
deferContent: false
|
|
102
|
+
});
|
|
103
|
+
return handle;
|
|
104
|
+
},
|
|
105
|
+
showFullScreen: (content, options)=>stack.show(content, null != options ? options : fullScreenModalSheetOptions(), false),
|
|
106
|
+
closeTop: ()=>stack.closeTop(),
|
|
107
|
+
closeAll: ()=>stack.closeAll(),
|
|
108
|
+
getOpenCount: ()=>stack.openCount(),
|
|
109
|
+
handleHardwareBack: ()=>stack.handleHardwareBack(),
|
|
110
|
+
isBeingReplaced: (handle)=>{
|
|
111
|
+
if (!handle) return false;
|
|
112
|
+
const entry = stack.getSnapshot().find((e)=>e.id === handle.id);
|
|
113
|
+
return (null == entry ? void 0 : entry.handingOff) === true;
|
|
114
|
+
},
|
|
115
|
+
getBackdropCardColor: ()=>state.settings.backdropCardColor
|
|
116
|
+
};
|
|
117
|
+
state.service = service;
|
|
118
|
+
host.attachFeature(FEATURE, state);
|
|
119
|
+
host.registerLayerItem('sheets', {
|
|
120
|
+
key: FEATURE,
|
|
121
|
+
element: <StackView state={state}/>,
|
|
122
|
+
order: 0
|
|
123
|
+
});
|
|
124
|
+
host.back.push(()=>stack.handleHardwareBack() ? 'handled' : 'pass', {
|
|
125
|
+
layer: 'sheets'
|
|
126
|
+
});
|
|
127
|
+
return state;
|
|
128
|
+
}
|
|
129
|
+
function sheetServiceOf(host, settings, preferences) {
|
|
130
|
+
const existing = host.getFeature(FEATURE);
|
|
131
|
+
if (existing && settings) existing.settings = settings;
|
|
132
|
+
return (null != existing ? existing : createSheetService(host, settings, preferences)).service;
|
|
133
|
+
}
|
|
134
|
+
function useG9Sheets() {
|
|
135
|
+
const settings = useG9Settings().sheets;
|
|
136
|
+
return sheetServiceOf(useG9Host(), settings, useG9Preferences());
|
|
137
|
+
}
|
|
138
|
+
function g9Sheets() {
|
|
139
|
+
return sheetServiceOf(g9Hosts.require());
|
|
140
|
+
}
|
|
141
|
+
export { g9Sheets, sheetServiceOf, useG9Sheets };
|
|
142
|
+
|
|
143
|
+
//# sourceMappingURL=service.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/service.jsx","sources":["../../src/sheet/service.tsx"],"sourcesContent":["import { type ReactNode, useEffect, useRef, useState, useSyncExternalStore } from '@lynx-js/react';\nimport { startTimer, stopTimer } from '../base/timers';\nimport { useG9Host, useG9HostInsets } from '../host/hooks';\nimport { type G9HostHandle, g9Hosts } from '../host/registry';\nimport { useG9Culture, useG9Preferences, useG9Settings, useG9Theme, useG9Window } from '../provider/hooks';\nimport { G9SheetFrame } from './frame';\nimport { createSheetHeightMemo, type G9SheetHeightMemo, type G9SheetMemoPreferences } from './height-memo';\nimport {\n fitToContentSheetOptions,\n fullScreenModalSheetOptions,\n type G9SheetOptions,\n type G9SheetSettings,\n resolveSheetSettings,\n} from './options';\nimport { type G9ProcessingBuild, type G9ProcessingErrorHandler, G9ProcessingSheetContent } from './processing';\nimport { backdropCardTransform, sheetVisibleRatio } from './sizing';\nimport { type G9SheetContent, type G9SheetHandle, G9SheetStack } from './stack';\n\n/** The sheet API of one host (MAUI `G9BottomSheetHelper` + `G9BottomSheetExtensions`). */\nexport interface G9SheetService {\n /**\n * Opens a sheet (MAUI `ShowG9BottomSheet`): auto-stacks over an open sheet, hands off with `replaceCurrentSheet`,\n * otherwise opens as primary. `content` may be a factory, built after the open motion (`deferContent`). Returns the\n * sheet-scoped handle, or `null` when throttled (a second show/replace within 369 ms).\n */\n show(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /** `show` as a promise (MAUI `ShowG9BottomSheetAsync`): resolves with the handle (or `null`). */\n showAsync(content: G9SheetContent, options?: G9SheetOptions): Promise<G9SheetHandle | null>;\n /** Replaces the open sheet in place when it can morph, else back-closes it and opens (MAUI `ReplaceG9BottomSheet`). */\n replace(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /**\n * Opens at once with a spinner, then builds the body (MAUI `ShowProcessingG9BottomSheet`): `build(handle, signal)`\n * returns the body (the sheet grows to fit), `null` (closes quietly) or throws (`onError`, else error popup + close).\n * Default options: fit to content, not deferred.\n */\n showProcessing(\n build: G9ProcessingBuild,\n options?: G9SheetOptions,\n onError?: G9ProcessingErrorHandler,\n loadingHeight?: number,\n ): G9SheetHandle | null;\n /** Full-screen modal sheet, not throttled (MAUI `ShowFullScreenAsync`). */\n showFullScreen(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle;\n /** Back-routes the top sheet (MAUI `CloseTopG9BottomSheet`). */\n closeTop(): void;\n /** Closes every sheet (MAUI `CloseG9BottomSheet`). */\n closeAll(): void;\n /** Open sheets (MAUI `GetOpenSheetCount`). */\n getOpenCount(): number;\n /** Routes hardware back to the top sheet; `false` when none is open (MAUI `HandleHardwareBackPressed`). */\n handleHardwareBack(): boolean;\n /** `true` while a hand-off successor is replacing this sheet (MAUI `IsBeingReplaced`). */\n isBeingReplaced(handle: G9SheetHandle | null | undefined): boolean;\n /** The scrim colour behind receded pages (MAUI `GetBackdropCardColor`). */\n getBackdropCardColor(): string;\n /** The height memory of this host's sheets. */\n readonly heightMemo: G9SheetHeightMemo;\n /** The stack (advanced: rendering, tests). */\n readonly stack: G9SheetStack;\n}\n\nconst FEATURE = 'g9.sheets';\n\ninterface ServiceState {\n readonly service: G9SheetService;\n settings: Required<G9SheetSettings>;\n}\n\nfunction StackView(props: { readonly state: ServiceState }): ReactNode {\n const { state } = props;\n state.settings = useG9Settings().sheets;\n const win = useG9Window();\n const insets = useG9HostInsets();\n const culture = useG9Culture();\n const stack = state.service.stack;\n const entries = useSyncExternalStore(\n (l) => stack.subscribe(l),\n () => stack.getSnapshot(),\n );\n const host = useG9Host();\n // Backdrop card: the page recedes behind a tall primary sheet (not fit, not stacked over) once its visible ratio\n // reaches `backdropCardEffectThreshold` (default 0.75): the opening detent first, then where the sheet came to rest.\n const [rest, setRest] = useState<{ readonly id: number; readonly heightPx: number } | null>(null);\n const primary = entries.find((e) => e.status === 'opening' || e.status === 'open');\n const card =\n state.settings.enableBackdropCardEffect &&\n primary !== undefined &&\n primary.options.enableBackdropCardEffect !== false &&\n primary.options.sizeMode !== 'fitToContent' &&\n backdropCardTransform(\n sheetVisibleRatio(primary.options, win.height, rest?.id === primary.id ? rest.heightPx : null),\n Math.min(0.99, Math.max(0.1, primary.options.backdropCardEffectThreshold ?? 0.75)),\n );\n const effectOn = card && card.scale < 1 ? card : null;\n const effect = effectOn\n ? {\n scale: Math.round(effectOn.scale * 1000) / 1000,\n translateY: Math.round(effectOn.translateY * 10) / 10,\n durationMs: state.settings.openAnimationDurationMs,\n backdropColor: state.settings.backdropCardColor,\n }\n : null;\n const effectKey = effect ? `${effect.scale}|${effect.translateY}|${effect.durationMs}|${effect.backdropColor}` : '';\n useEffect(() => {\n host.setContentEffect(effect);\n }, [effectKey]);\n useEffect(() => () => stack.dispose(), [stack]);\n // Learned heights belong to one look: a theme change re-measures (viewport and culture are part of the key).\n const scheme = useG9Theme().scheme;\n const lastScheme = useRef(scheme);\n useEffect(() => {\n if (lastScheme.current === scheme) return;\n lastScheme.current = scheme;\n state.service.heightMemo.invalidate();\n }, [scheme]);\n const top = [...entries].reverse().find((e) => e.status === 'opening' || e.status === 'open');\n return (\n <view className=\"g9-sheet-stack\">\n {entries.map((entry) => (\n <G9SheetFrame\n key={entry.frameKey}\n entry={entry}\n stack={stack}\n hostHeight={win.height}\n hostWidth={win.width}\n topInset={insets.top}\n bottomInset={insets.bottom}\n settings={state.settings}\n memo={state.service.heightMemo}\n culture={culture.locale}\n isTop={entry === top}\n onRest={(heightPx) => setRest({ id: entry.id, heightPx })}\n />\n ))}\n </view>\n );\n}\n\n/** Creates the sheet service of a host (attached once as a host feature). */\nfunction createSheetService(\n host: G9HostHandle,\n settings?: Required<G9SheetSettings>,\n preferences?: G9SheetMemoPreferences,\n): ServiceState {\n const clock = host.services.clock;\n const state = { settings: settings ?? resolveSheetSettings(undefined) } as ServiceState;\n const stack = new G9SheetStack({\n now: () => clock.monotonicNow(),\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h),\n durations: (o) => ({\n open: o.openAnimationDurationMs ?? state.settings.openAnimationDurationMs,\n close: o.closeAnimationDurationMs ?? state.settings.closeAnimationDurationMs,\n }),\n stageBeforeShow: () => state.settings.stageBeforeShow,\n preOpenMaxHoldMs: () => state.settings.preOpenMaxHoldMs,\n });\n const heightMemo = createSheetHeightMemo({\n ...(preferences ? { preferences } : {}),\n appVersion: state.settings.heightMemoVersion,\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h),\n });\n const service: G9SheetService = {\n stack,\n heightMemo,\n show: (content, options) => stack.show(content, options ?? {}),\n showAsync: (content, options) => Promise.resolve(stack.show(content, options ?? {})),\n replace: (content, options) => stack.replace(content, options ?? fitToContentSheetOptions()),\n showProcessing(build, options, onError, loadingHeight) {\n let handle: G9SheetHandle | null = null;\n const content = () => (\n <G9ProcessingSheetContent\n build={build}\n {...(onError ? { onError } : {})}\n loadingHeight={loadingHeight && loadingHeight > 0 ? loadingHeight : 160}\n handle={() => handle}\n />\n );\n handle = stack.show(content, { ...(options ?? fitToContentSheetOptions()), deferContent: false });\n return handle;\n },\n showFullScreen: (content, options) =>\n stack.show(content, options ?? fullScreenModalSheetOptions(), false) as G9SheetHandle,\n closeTop: () => stack.closeTop(),\n closeAll: () => stack.closeAll(),\n getOpenCount: () => stack.openCount(),\n handleHardwareBack: () => stack.handleHardwareBack(),\n isBeingReplaced: (handle) => {\n if (!handle) return false;\n const entry = stack.getSnapshot().find((e) => e.id === handle.id);\n return entry?.handingOff === true;\n },\n getBackdropCardColor: () => state.settings.backdropCardColor,\n };\n (state as { service: G9SheetService }).service = service;\n host.attachFeature(FEATURE, state);\n host.registerLayerItem('sheets', { key: FEATURE, element: <StackView state={state} />, order: 0 });\n host.back.push(() => (stack.handleHardwareBack() ? 'handled' : 'pass'), { layer: 'sheets' });\n return state;\n}\n\n/** The sheet service of a host, created on first use. */\nexport function sheetServiceOf(\n host: G9HostHandle,\n settings?: Required<G9SheetSettings>,\n preferences?: G9SheetMemoPreferences,\n): G9SheetService {\n const existing = host.getFeature(FEATURE) as ServiceState | undefined;\n if (existing && settings) existing.settings = settings;\n return (existing ?? createSheetService(host, settings, preferences)).service;\n}\n\n/**\n * The sheets of the nearest `G9Host` (MAUI `G9BottomSheetHelper` for that page). Sheets render in the host's\n * `sheets` layer; hardware back closes the top sheet first; the host's unmount settles every open sheet.\n */\nexport function useG9Sheets(): G9SheetService {\n const settings = useG9Settings().sheets;\n // Learned heights persist in the provider's preferences (key `g9controls.sheet-heights`).\n return sheetServiceOf(useG9Host(), settings, useG9Preferences());\n}\n\n/**\n * The sheets of the active host for code outside components (MAUI's static `G9BottomSheetHelper`): view models,\n * services. Throws `host-missing` when no host is mounted.\n */\nexport function g9Sheets(): G9SheetService {\n return sheetServiceOf(g9Hosts.require());\n}\n"],"names":["FEATURE","StackView","props","_primary_options_backdropCardEffectThreshold","state","useG9Settings","win","useG9Window","insets","useG9HostInsets","culture","useG9Culture","stack","entries","useSyncExternalStore","l","host","useG9Host","rest","setRest","useState","primary","e","card","undefined","backdropCardTransform","sheetVisibleRatio","Math","effectOn","effect","effectKey","useEffect","scheme","useG9Theme","lastScheme","useRef","top","view","entry","G9SheetFrame","heightPx","createSheetService","settings","preferences","clock","resolveSheetSettings","G9SheetStack","cb","ms","startTimer","h","stopTimer","o","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","heightMemo","createSheetHeightMemo","service","content","options","Promise","fitToContentSheetOptions","build","onError","loadingHeight","handle","G9ProcessingSheetContent","fullScreenModalSheetOptions","sheetServiceOf","existing","useG9Sheets","useG9Preferences","g9Sheets","g9Hosts"],"mappings":";;;;;;;;;;;AA6DA,MAAMA,UAAU;AAOhB,SAASC,UAAUC,KAAuC;QAuBvBC;IAtBjC,MAAM,EAAEC,KAAK,EAAE,GAAGF;IAClBE,MAAM,QAAQ,GAAGC,gBAAgB,MAAM;IACvC,MAAMC,MAAMC;IACZ,MAAMC,SAASC;IACf,MAAMC,UAAUC;IAChB,MAAMC,QAAQR,MAAM,OAAO,CAAC,KAAK;IACjC,MAAMS,UAAUC,qBACd,CAACC,IAAMH,MAAM,SAAS,CAACG,IACvB,IAAMH,MAAM,WAAW;IAEzB,MAAMI,OAAOC;IAGb,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoE;IAC5F,MAAMC,UAAUR,QAAQ,I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__view {
|
|
11
|
+
top: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.g9-sheet__view--passthrough {
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.g9-sheet__view--passthrough .g9-sheet {
|
|
22
|
+
pointer-events: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.g9-sheet {
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
display: flex;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.g9-sheet__frame {
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
flex-grow: 1;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
display: flex;
|
|
37
|
+
position: relative;
|
|
38
|
+
overflow: visible;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.g9-sheet__surface {
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
flex-grow: 1;
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
display: flex;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.g9-sheet__skirt {
|
|
50
|
+
height: 50vh;
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 100%;
|
|
53
|
+
left: 0;
|
|
54
|
+
right: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.g9-sheet__scrim {
|
|
58
|
+
pointer-events: auto;
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
right: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.g9-sheet__scrim--covered {
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.g9-sheet__grabber-area {
|
|
71
|
+
justify-content: center;
|
|
72
|
+
align-items: center;
|
|
73
|
+
height: 30px;
|
|
74
|
+
display: flex;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.g9-sheet__grabber {
|
|
78
|
+
background-color: var(--g9-outline-variant);
|
|
79
|
+
border-radius: 12px;
|
|
80
|
+
width: 32px;
|
|
81
|
+
height: 4px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.g9-sheet__body {
|
|
85
|
+
flex-shrink: 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.g9-sheet__body--fill {
|
|
89
|
+
flex: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.g9-sheet__content {
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
display: flex;
|
|
95
|
+
position: relative;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.g9-sheet__body--static {
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
flex: 1 1 0;
|
|
101
|
+
display: flex;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.g9-sheet__content--fill {
|
|
106
|
+
flex: 1 1 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.g9-sheet__placeholder {
|
|
110
|
+
justify-content: center;
|
|
111
|
+
align-items: center;
|
|
112
|
+
display: flex;
|
|
113
|
+
position: relative;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.g9-sheet__cover {
|
|
117
|
+
background-color: var(--g9-surface-container);
|
|
118
|
+
animation: .22s ease-out forwards g9-sheet-cover-out;
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 0;
|
|
121
|
+
left: 0;
|
|
122
|
+
right: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@keyframes g9-sheet-cover-out {
|
|
126
|
+
from {
|
|
127
|
+
opacity: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
to {
|
|
131
|
+
opacity: 0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.g9-sheet-reveal {
|
|
136
|
+
animation: .14s ease-out g9-sheet-reveal-in;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
@keyframes g9-sheet-reveal-in {
|
|
140
|
+
from {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
to {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.g9-sheet-loading, .g9-processing-sheet__loading {
|
|
150
|
+
justify-content: center;
|
|
151
|
+
align-items: center;
|
|
152
|
+
display: flex;
|
|
153
|
+
position: relative;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.g9-sheet-header {
|
|
157
|
+
border-bottom: 1px solid #79747e59;
|
|
158
|
+
flex-direction: row;
|
|
159
|
+
align-items: center;
|
|
160
|
+
padding: 10px 16px;
|
|
161
|
+
display: flex;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.g9-sheet-header__side {
|
|
165
|
+
flex-direction: row;
|
|
166
|
+
flex: 1;
|
|
167
|
+
align-items: center;
|
|
168
|
+
display: flex;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.g9-sheet-header__start {
|
|
172
|
+
flex-direction: row;
|
|
173
|
+
align-items: center;
|
|
174
|
+
display: flex;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.g9-sheet-header__end {
|
|
178
|
+
flex-direction: row;
|
|
179
|
+
justify-content: flex-end;
|
|
180
|
+
align-items: center;
|
|
181
|
+
display: flex;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.g9-sheet-header__side.g9-sheet-header__end {
|
|
185
|
+
justify-content: flex-end;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.g9-sheet-header__grow {
|
|
189
|
+
flex-direction: row;
|
|
190
|
+
flex: 1;
|
|
191
|
+
align-items: center;
|
|
192
|
+
display: flex;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.g9-sheet-header__title-near {
|
|
196
|
+
padding: 0 8px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.g9-sheet-header__back {
|
|
200
|
+
justify-content: flex-start;
|
|
201
|
+
align-items: center;
|
|
202
|
+
display: flex;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.g9-sheet-header__title {
|
|
206
|
+
color: var(--g9-secondary);
|
|
207
|
+
text-overflow: ellipsis;
|
|
208
|
+
font-weight: bold;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.g9-sheet-header__items {
|
|
212
|
+
flex-direction: row;
|
|
213
|
+
column-gap: 8px;
|
|
214
|
+
display: flex;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.g9-sheet__footer-slot {
|
|
218
|
+
flex-direction: column;
|
|
219
|
+
flex-shrink: 0;
|
|
220
|
+
display: flex;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.g9-sheet-footer {
|
|
224
|
+
border-top-style: solid;
|
|
225
|
+
border-top-width: 1px;
|
|
226
|
+
border-top-color: var(--g9-outline-variant);
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
row-gap: 8px;
|
|
229
|
+
padding: 12px 16px;
|
|
230
|
+
display: flex;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.g9-sheet-footer__row {
|
|
234
|
+
flex-direction: row;
|
|
235
|
+
column-gap: 8px;
|
|
236
|
+
display: flex;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.g9-sheet-footer__cell {
|
|
240
|
+
flex-direction: column;
|
|
241
|
+
flex: 1;
|
|
242
|
+
display: flex;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
/*# sourceMappingURL=sheet.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./src/sheet/sheet.css"],"names":[],"mappings":"AACA;EAAE,oBAAoB;EACpB,kBAAkB;EAClB,MA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nB,aAAa;EACb,kBAAkB;AACpB;;AAWA;EARE,kCAAkC;EAClC,mBAAmB;EACnB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,mBAAmB;EACnB,yBAAyB;EACzB,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,yBAAyB;AAC3B;;AAaA;EAVE,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,cAAc;AAChB;;AAaA;EAVE,2BAA2B;EAC3B,mBAAmB;EACnB,aAAa;AACf;;AAaA;EAVE,0BAA0B;EAC1B,uBAAuB;EACvB,iBAAiB;AACnB;;AAaA;EAVE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAcA;EAXE,sBAAsB;EACtB,cAAc;EACd,aAAa;AACf;;AAcA;EAXE,uBAAuB;EACvB,qBAAqB;EACrB,2CAA2C;EAC3C,sBAAsB;EACtB,YAAY;EACZ,kBAAkB;EAClB,aAAa;AACf;;AAcA;EAXE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAgBA;EAbE,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf","sourcesContent":["/* G9 sheets on lynx-ui Sheet (MAUI G9SheetView / header template). No shadows. */\n.g9-sheet-stack {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n\n/* lynx-ui SheetView (position: fixed): the whole viewport, so the sheet rises from the bottom edge. */\n.g9-sheet__view {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n\n/* A non-modal sheet's view lets every touch it does not cover through to the page, native views included. */\n.g9-sheet__view--passthrough {\n pointer-events: none;\n}\n\n.g9-sheet__view--passthrough .g9-sheet {\n pointer-events: auto;\n}\n\n.g9-sheet {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n pointer-events: auto;\n}\n\n/* G9's own views inside lynx-ui's SheetContent (whose style a worklet owns): the frame recedes, the surface paints. */\n.g9-sheet__frame {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n position: relative;\n overflow: visible;\n}\n\n.g9-sheet__surface {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 0;\n overflow: hidden;\n}\n\n/* Paints below the surface for a drag past the top detent; outside the layout, so fit heights ignore it. */\n.g9-sheet__skirt {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n height: 50vh;\n}\n\n.g9-sheet__scrim {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: auto;\n}\n\n.g9-sheet__scrim--covered {\n pointer-events: none;\n}\n\n.g9-sheet__grabber-area {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 30px;\n}\n\n.g9-sheet__grabber {\n width: 32px;\n height: 4px;\n border-radius: 12px;\n background-color: var(--g9-outline-variant);\n}\n\n.g9-sheet__body {\n flex-shrink: 1;\n}\n\n.g9-sheet__body--fill {\n flex: 1;\n}\n\n.g9-sheet__content {\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n/* scrollBody: false — the content scrolls itself and fills the body (longhands: a definite basis for its children). */\n.g9-sheet__body--static {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n overflow: hidden;\n}\n\n.g9-sheet__content--fill {\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n}\n\n.g9-sheet__placeholder {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet__cover {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n background-color: var(--g9-surface-container);\n animation: g9-sheet-cover-out 220ms ease-out forwards;\n}\n\n@keyframes g9-sheet-cover-out {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.g9-sheet-reveal {\n animation: g9-sheet-reveal-in 140ms ease-out;\n}\n\n@keyframes g9-sheet-reveal-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n.g9-sheet-loading,\n.g9-processing-sheet__loading {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-sheet-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 10px 16px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(121, 116, 126, 0.35);\n}\n\n.g9-sheet-header__side {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__start {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.g9-sheet-header__end {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n}\n\n.g9-sheet-header__side.g9-sheet-header__end {\n justify-content: flex-end;\n}\n\n.g9-sheet-header__grow {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n}\n\n.g9-sheet-header__title-near {\n padding: 0px 8px;\n}\n\n.g9-sheet-header__back {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n\n.g9-sheet-header__title {\n font-weight: bold;\n color: var(--g9-secondary);\n text-overflow: ellipsis;\n}\n\n.g9-sheet-header__items {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* Holds the footer (or nothing) so its height is measured with the body's for a fit sheet. */\n.g9-sheet__footer-slot {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n}\n\n.g9-sheet-footer {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n padding: 12px 16px;\n border-top-width: 1px;\n border-top-style: solid;\n border-top-color: var(--g9-outline-variant);\n}\n\n.g9-sheet-footer__row {\n display: flex;\n flex-direction: row;\n column-gap: 8px;\n}\n\n/* A column: whatever a cell holds (a button, a wrapper around one) stretches to the cell's width, as MAUI's footer\n buttons fill their cell. */\n.g9-sheet-footer__cell {\n display: flex;\n flex-direction: column;\n flex: 1;\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from '@lynx-js/react';
|
|
2
|
+
import type { G9SheetOptions } from './options.js';
|
|
3
|
+
import type { G9SheetCloseReason } from './stack.js';
|
|
4
|
+
/** Props of {@link G9Sheet}. */
|
|
5
|
+
export interface G9SheetProps {
|
|
6
|
+
/** Controlled visibility. */
|
|
7
|
+
readonly open: boolean;
|
|
8
|
+
/** Told `false` once with the reason when the sheet closes by itself (back, overlay tap, drag, toolbar). */
|
|
9
|
+
readonly onOpenChange?: (open: boolean, reason: G9SheetCloseReason) => void;
|
|
10
|
+
readonly options?: G9SheetOptions;
|
|
11
|
+
readonly children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Declarative sheet (the `G9Sheet` adapter): mounts the children as a sheet of the nearest host while `open`, keeps
|
|
15
|
+
* them live (re-renders update the sheet in place), and reports closes the sheet made itself through
|
|
16
|
+
* `onOpenChange(false, reason)`. Use `useG9Sheets()` for the imperative MAUI API.
|
|
17
|
+
*/
|
|
18
|
+
export declare function G9Sheet(props: G9SheetProps): ReactNode;
|
|
19
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/sheet/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAqB,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,SAAS,CAAC;AAEjE,gCAAgC;AAChC,MAAM,WAAW,YAAY;IAC3B,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,4GAA4G;IAC5G,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC5E,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAgCtD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useEffect, useRef } from "@lynx-js/react";
|
|
2
|
+
import { useG9Sheets } from "./service.jsx";
|
|
3
|
+
function G9Sheet(props) {
|
|
4
|
+
const sheets = useG9Sheets();
|
|
5
|
+
const handle = useRef(null);
|
|
6
|
+
const latest = useRef(props);
|
|
7
|
+
latest.current = props;
|
|
8
|
+
useEffect(()=>{
|
|
9
|
+
if (props.open && !handle.current) {
|
|
10
|
+
var _props_children, _props_options;
|
|
11
|
+
const h = sheets.stack.show(null != (_props_children = props.children) ? _props_children : null, null != (_props_options = props.options) ? _props_options : {}, false);
|
|
12
|
+
handle.current = h;
|
|
13
|
+
null == h || h.result.then((result)=>{
|
|
14
|
+
var _latest_current_onOpenChange, _latest_current;
|
|
15
|
+
if (handle.current !== h) return;
|
|
16
|
+
handle.current = null;
|
|
17
|
+
if ('closed' !== result.reason && 'unmount' !== result.reason) null == (_latest_current_onOpenChange = (_latest_current = latest.current).onOpenChange) || _latest_current_onOpenChange.call(_latest_current, false, result.reason);
|
|
18
|
+
});
|
|
19
|
+
} else if (!props.open && handle.current) {
|
|
20
|
+
const h = handle.current;
|
|
21
|
+
handle.current = null;
|
|
22
|
+
h.close();
|
|
23
|
+
}
|
|
24
|
+
}, [
|
|
25
|
+
props.open
|
|
26
|
+
]);
|
|
27
|
+
useEffect(()=>{
|
|
28
|
+
var _props_children;
|
|
29
|
+
if (handle.current) sheets.stack.update(handle.current.id, null != (_props_children = props.children) ? _props_children : null, props.options);
|
|
30
|
+
});
|
|
31
|
+
useEffect(()=>()=>{
|
|
32
|
+
var _handle_current;
|
|
33
|
+
null == (_handle_current = handle.current) || _handle_current.close();
|
|
34
|
+
handle.current = null;
|
|
35
|
+
}, []);
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
export { G9Sheet };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=sheet.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet/sheet.jsx","sources":["../../src/sheet/sheet.tsx"],"sourcesContent":["import { type ReactNode, useEffect, useRef } from '@lynx-js/react';\nimport type { G9SheetOptions } from './options';\nimport { useG9Sheets } from './service';\nimport type { G9SheetCloseReason, G9SheetHandle } from './stack';\n\n/** Props of {@link G9Sheet}. */\nexport interface G9SheetProps {\n /** Controlled visibility. */\n readonly open: boolean;\n /** Told `false` once with the reason when the sheet closes by itself (back, overlay tap, drag, toolbar). */\n readonly onOpenChange?: (open: boolean, reason: G9SheetCloseReason) => void;\n readonly options?: G9SheetOptions;\n readonly children?: ReactNode;\n}\n\n/**\n * Declarative sheet (the `G9Sheet` adapter): mounts the children as a sheet of the nearest host while `open`, keeps\n * them live (re-renders update the sheet in place), and reports closes the sheet made itself through\n * `onOpenChange(false, reason)`. Use `useG9Sheets()` for the imperative MAUI API.\n */\nexport function G9Sheet(props: G9SheetProps): ReactNode {\n const sheets = useG9Sheets();\n const handle = useRef<G9SheetHandle | null>(null);\n const latest = useRef(props);\n latest.current = props;\n useEffect(() => {\n if (props.open && !handle.current) {\n const h = sheets.stack.show(props.children ?? null, props.options ?? {}, false);\n handle.current = h;\n void h?.result.then((result) => {\n if (handle.current !== h) return;\n handle.current = null;\n if (result.reason !== 'closed' && result.reason !== 'unmount')\n latest.current.onOpenChange?.(false, result.reason);\n });\n } else if (!props.open && handle.current) {\n const h = handle.current;\n handle.current = null;\n h.close();\n }\n }, [props.open]);\n useEffect(() => {\n if (handle.current) sheets.stack.update(handle.current.id, props.children ?? null, props.options);\n });\n useEffect(\n () => () => {\n handle.current?.close();\n handle.current = null;\n },\n [],\n );\n return null;\n}\n"],"names":["G9Sheet","props","sheets","useG9Sheets","handle","useRef","latest","useEffect","_props_children","_props_options","h","result","_latest_current","_handle_current"],"mappings":";;AAoBO,SAASA,QAAQC,KAAmB;IACzC,MAAMC,SAASC;IACf,MAAMC,SAASC,OAA6B;IAC5C,MAAMC,SAASD,OAAOJ;IACtBK,OAAO,OAAO,GAAGL;IACjBM,UAAU;QACR,IAAIN,MAAM,IAAI,IAAI,CAACG,OAAO,OAAO,EAAE;gBACLI,iBAAwBC;YAApD,MAAMC,IAAIR,OAAO,KAAK,CAAC,IAAI,CAAC,QAAAM,CAAAA,kBAAAA,MAAM,QAAQ,AAAD,IAAbA,kBAAkB,MAAM,QAAAC,CAAAA,iBAAAA,MAAM,OAAO,AAAD,IAAZA,iBAAiB,CAAC,GAAG;YACzEL,OAAO,OAAO,GAAGM;YACZA,QAAAA,KAAAA,EAAG,MAAM,CAAC,IAAI,CAAC,CAACC;oBAIjBC,8BAAAA;gBAHF,IAAIR,OAAO,OAAO,KAAKM,GAAG;gBAC1BN,OAAO,OAAO,GAAG;gBACjB,IAAIO,AAAkB,aAAlBA,OAAO,MAAM,IAAiBA,AAAkB,cAAlBA,OAAO,MAAM,EAAK,QAClDC,CAAAA,+BAAAA,AAAAA,CAAAA,kBAAAA,OAAO,OAAO,AAAD,EAAE,YAAY,AAAD,KAA1BA,6BAAAA,IAAAA,CAAAA,iBAA8B,OAAOD,OAAO,MAAM;YACtD;QACF,OAAO,IAAI,CAACV,MAAM,IAAI,IAAIG,OAAO,OAAO,EAAE;YACxC,MAAMM,IAAIN,OAAO,OAAO;YACxBA,OAAO,OAAO,GAAG;YACjBM,EAAE,KAAK;QACT;IACF,GAAG;QAACT,MAAM,IAAI;KAAC;IACfM,UAAU;YACmDC;QAA3D,IAAIJ,OAAO,OAAO,EAAEF,OAAO,KAAK,CAAC,MAAM,CAACE,OAAO,OAAO,CAAC,EAAE,EAAE,QAAAI,CAAAA,kBAAAA,MAAM,QAAQ,AAAD,IAAbA,kBAAkB,MAAMP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