@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,355 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
3
|
+
value: value,
|
|
4
|
+
enumerable: true,
|
|
5
|
+
configurable: true,
|
|
6
|
+
writable: true
|
|
7
|
+
});
|
|
8
|
+
else obj[key] = value;
|
|
9
|
+
return obj;
|
|
10
|
+
}
|
|
11
|
+
const G9ToastType = {
|
|
12
|
+
Information: 'information',
|
|
13
|
+
Success: 'success',
|
|
14
|
+
Warning: 'warning',
|
|
15
|
+
Error: 'error'
|
|
16
|
+
};
|
|
17
|
+
const G9ToastPosition = {
|
|
18
|
+
TopLeft: 'topLeft',
|
|
19
|
+
TopCenter: 'topCenter',
|
|
20
|
+
TopRight: 'topRight',
|
|
21
|
+
MiddleLeft: 'middleLeft',
|
|
22
|
+
MiddleCenter: 'middleCenter',
|
|
23
|
+
MiddleRight: 'middleRight',
|
|
24
|
+
BottomLeft: 'bottomLeft',
|
|
25
|
+
BottomCenter: 'bottomCenter',
|
|
26
|
+
BottomRight: 'bottomRight'
|
|
27
|
+
};
|
|
28
|
+
const g9DefaultToastOptions = Object.freeze({
|
|
29
|
+
durationMs: 3000
|
|
30
|
+
});
|
|
31
|
+
const g9ToastTimings = Object.freeze({
|
|
32
|
+
enterMs: 250,
|
|
33
|
+
exitMs: 200,
|
|
34
|
+
loaderFadeInMs: 200,
|
|
35
|
+
loaderFadeOutMs: 180,
|
|
36
|
+
reanchorMs: 220
|
|
37
|
+
});
|
|
38
|
+
const g9MaxToastsPerStack = 4;
|
|
39
|
+
const isPlain = (r)=>!r.entry.hasAction;
|
|
40
|
+
class G9ToastStore {
|
|
41
|
+
getSnapshot() {
|
|
42
|
+
return this.snapshot;
|
|
43
|
+
}
|
|
44
|
+
subscribe(listener) {
|
|
45
|
+
this.listeners.add(listener);
|
|
46
|
+
return ()=>this.listeners.delete(listener);
|
|
47
|
+
}
|
|
48
|
+
show(message, type = 'information', options = {}) {
|
|
49
|
+
var _options_position, _options_durationMs;
|
|
50
|
+
const position = null != (_options_position = options.position) ? _options_position : this.config.defaultPosition();
|
|
51
|
+
const hasAction = !!options.actionText && !!options.action;
|
|
52
|
+
const duration = null != (_options_durationMs = options.durationMs) ? _options_durationMs : g9DefaultToastOptions.durationMs;
|
|
53
|
+
const stack = this.records.filter((r)=>r.entry.position === position && 'leaving' !== r.entry.status);
|
|
54
|
+
const newest = stack[stack.length - 1];
|
|
55
|
+
if (!this.disposed && newest && !hasAction && isPlain(newest) && newest.entry.message === message && newest.entry.type === type) {
|
|
56
|
+
newest.entry = {
|
|
57
|
+
...newest.entry,
|
|
58
|
+
refreshes: newest.entry.refreshes + 1,
|
|
59
|
+
durationMs: duration
|
|
60
|
+
};
|
|
61
|
+
newest.durationMs = duration;
|
|
62
|
+
this.arm(newest);
|
|
63
|
+
this.emit();
|
|
64
|
+
return this.handle(newest);
|
|
65
|
+
}
|
|
66
|
+
let closed;
|
|
67
|
+
const done = new Promise((r)=>closed = r);
|
|
68
|
+
const record = {
|
|
69
|
+
entry: {
|
|
70
|
+
id: this.nextId++,
|
|
71
|
+
message,
|
|
72
|
+
type,
|
|
73
|
+
position,
|
|
74
|
+
icon: options.icon,
|
|
75
|
+
actionText: hasAction ? options.actionText : null,
|
|
76
|
+
hasAction,
|
|
77
|
+
status: 'entering',
|
|
78
|
+
refreshes: 0,
|
|
79
|
+
durationMs: duration
|
|
80
|
+
},
|
|
81
|
+
action: hasAction ? options.action : null,
|
|
82
|
+
durationMs: duration,
|
|
83
|
+
timer: null,
|
|
84
|
+
actionRan: false,
|
|
85
|
+
closed
|
|
86
|
+
};
|
|
87
|
+
if (this.disposed) {
|
|
88
|
+
closed();
|
|
89
|
+
return {
|
|
90
|
+
id: record.entry.id,
|
|
91
|
+
dismiss: ()=>{},
|
|
92
|
+
closed: done
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
this.records.push(record);
|
|
96
|
+
for (const extra of stack.slice(0, Math.max(0, stack.length + 1 - g9MaxToastsPerStack)))this.leave(extra);
|
|
97
|
+
this.later(()=>{
|
|
98
|
+
if ('entering' === record.entry.status) {
|
|
99
|
+
record.entry = {
|
|
100
|
+
...record.entry,
|
|
101
|
+
status: 'shown'
|
|
102
|
+
};
|
|
103
|
+
this.emit();
|
|
104
|
+
}
|
|
105
|
+
}, g9ToastTimings.enterMs);
|
|
106
|
+
this.arm(record);
|
|
107
|
+
this.emit();
|
|
108
|
+
return {
|
|
109
|
+
...this.handle(record),
|
|
110
|
+
closed: done
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
dismissToast(id) {
|
|
114
|
+
for (const r of [
|
|
115
|
+
...this.records
|
|
116
|
+
])if (void 0 === id || r.entry.id === id) this.leave(r);
|
|
117
|
+
}
|
|
118
|
+
pressAction(id) {
|
|
119
|
+
const r = this.records.find((x)=>x.entry.id === id);
|
|
120
|
+
if (!r || r.actionRan || !r.action) return;
|
|
121
|
+
r.actionRan = true;
|
|
122
|
+
this.config.runAction(r.action);
|
|
123
|
+
this.leave(r);
|
|
124
|
+
}
|
|
125
|
+
showLoading(text = '') {
|
|
126
|
+
this.hold({
|
|
127
|
+
token: this.nextId++,
|
|
128
|
+
text,
|
|
129
|
+
lease: false
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
beginLoading(text = '') {
|
|
133
|
+
const hold = {
|
|
134
|
+
token: this.nextId++,
|
|
135
|
+
text,
|
|
136
|
+
lease: true
|
|
137
|
+
};
|
|
138
|
+
this.hold(hold);
|
|
139
|
+
let released = false;
|
|
140
|
+
return {
|
|
141
|
+
dispose: ()=>{
|
|
142
|
+
if (released) return;
|
|
143
|
+
released = true;
|
|
144
|
+
this.release(hold.token);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
dismissLoading() {
|
|
149
|
+
const anonymous = [
|
|
150
|
+
...this.holds
|
|
151
|
+
].reverse().find((h)=>!h.lease);
|
|
152
|
+
if (anonymous) this.release(anonymous.token);
|
|
153
|
+
}
|
|
154
|
+
showLoadingToast(text = '', position = null) {
|
|
155
|
+
this.loadingToast = {
|
|
156
|
+
text,
|
|
157
|
+
position: null != position ? position : this.config.defaultPosition()
|
|
158
|
+
};
|
|
159
|
+
this.emit();
|
|
160
|
+
}
|
|
161
|
+
dismissLoadingToast() {
|
|
162
|
+
if (!this.loadingToast) return;
|
|
163
|
+
this.loadingToast = null;
|
|
164
|
+
this.emit();
|
|
165
|
+
}
|
|
166
|
+
showProgress(title, detail = null, progress = 0, position = null) {
|
|
167
|
+
this.progress = {
|
|
168
|
+
title,
|
|
169
|
+
detail,
|
|
170
|
+
progress: clamp01(progress),
|
|
171
|
+
position: null != position ? position : this.config.defaultPosition()
|
|
172
|
+
};
|
|
173
|
+
this.emit();
|
|
174
|
+
}
|
|
175
|
+
updateProgress(title, detail, progress) {
|
|
176
|
+
if (!this.progress) return;
|
|
177
|
+
this.progress = {
|
|
178
|
+
...this.progress,
|
|
179
|
+
...null != title ? {
|
|
180
|
+
title
|
|
181
|
+
} : {},
|
|
182
|
+
...null != detail ? {
|
|
183
|
+
detail
|
|
184
|
+
} : {},
|
|
185
|
+
...null != progress ? {
|
|
186
|
+
progress: clamp01(progress)
|
|
187
|
+
} : {}
|
|
188
|
+
};
|
|
189
|
+
this.emit();
|
|
190
|
+
}
|
|
191
|
+
dismissProgress() {
|
|
192
|
+
if (!this.progress) return;
|
|
193
|
+
this.progress = null;
|
|
194
|
+
this.emit();
|
|
195
|
+
}
|
|
196
|
+
refreshBottomInsets(animate = true) {
|
|
197
|
+
this.insetVersion += 1;
|
|
198
|
+
this.reanchorAnimated = animate;
|
|
199
|
+
this.emit();
|
|
200
|
+
}
|
|
201
|
+
setBottomOverlay(key, heightPx) {
|
|
202
|
+
if (null === heightPx || heightPx <= 0) this.overlays.delete(key);
|
|
203
|
+
else this.overlays.set(key, heightPx);
|
|
204
|
+
this.emit();
|
|
205
|
+
}
|
|
206
|
+
dismissAll() {
|
|
207
|
+
this.dismissToast();
|
|
208
|
+
this.holds = [];
|
|
209
|
+
this.updateLoader();
|
|
210
|
+
this.loadingToast = null;
|
|
211
|
+
this.progress = null;
|
|
212
|
+
this.emit();
|
|
213
|
+
}
|
|
214
|
+
dispose() {
|
|
215
|
+
this.disposed = true;
|
|
216
|
+
for (const r of this.records){
|
|
217
|
+
if (null !== r.timer) this.config.clearTimer(r.timer);
|
|
218
|
+
r.closed();
|
|
219
|
+
}
|
|
220
|
+
this.records = [];
|
|
221
|
+
if (null !== this.loaderTimer) this.config.clearTimer(this.loaderTimer);
|
|
222
|
+
this.holds = [];
|
|
223
|
+
this.loaderStatus = null;
|
|
224
|
+
this.emit();
|
|
225
|
+
}
|
|
226
|
+
handle(record) {
|
|
227
|
+
return {
|
|
228
|
+
id: record.entry.id,
|
|
229
|
+
dismiss: ()=>this.leave(record),
|
|
230
|
+
closed: Promise.resolve()
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
arm(record) {
|
|
234
|
+
if (null !== record.timer) this.config.clearTimer(record.timer);
|
|
235
|
+
record.timer = this.config.setTimer(()=>{
|
|
236
|
+
record.timer = null;
|
|
237
|
+
this.leave(record);
|
|
238
|
+
}, record.durationMs);
|
|
239
|
+
}
|
|
240
|
+
leave(record) {
|
|
241
|
+
if ('leaving' === record.entry.status || !this.records.includes(record)) return;
|
|
242
|
+
if (null !== record.timer) this.config.clearTimer(record.timer);
|
|
243
|
+
record.timer = null;
|
|
244
|
+
record.entry = {
|
|
245
|
+
...record.entry,
|
|
246
|
+
status: 'leaving'
|
|
247
|
+
};
|
|
248
|
+
this.emit();
|
|
249
|
+
this.later(()=>{
|
|
250
|
+
this.records = this.records.filter((r)=>r !== record);
|
|
251
|
+
record.closed();
|
|
252
|
+
this.emit();
|
|
253
|
+
}, g9ToastTimings.exitMs);
|
|
254
|
+
}
|
|
255
|
+
hold(hold) {
|
|
256
|
+
this.holds.push(hold);
|
|
257
|
+
this.updateLoader();
|
|
258
|
+
this.emit();
|
|
259
|
+
}
|
|
260
|
+
release(token) {
|
|
261
|
+
this.holds = this.holds.filter((h)=>h.token !== token);
|
|
262
|
+
this.updateLoader();
|
|
263
|
+
this.emit();
|
|
264
|
+
}
|
|
265
|
+
updateLoader() {
|
|
266
|
+
const top = this.holds[this.holds.length - 1];
|
|
267
|
+
if (top) {
|
|
268
|
+
this.loaderText = top.text;
|
|
269
|
+
if (null === this.loaderStatus || 'leaving' === this.loaderStatus) {
|
|
270
|
+
if (null !== this.loaderTimer) this.config.clearTimer(this.loaderTimer);
|
|
271
|
+
this.loaderStatus = 'entering';
|
|
272
|
+
this.loaderTimer = this.config.setTimer(()=>{
|
|
273
|
+
this.loaderTimer = null;
|
|
274
|
+
this.loaderStatus = 'shown';
|
|
275
|
+
this.emit();
|
|
276
|
+
}, g9ToastTimings.loaderFadeInMs);
|
|
277
|
+
}
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
if (null === this.loaderStatus || 'leaving' === this.loaderStatus) return;
|
|
281
|
+
if (null !== this.loaderTimer) this.config.clearTimer(this.loaderTimer);
|
|
282
|
+
this.loaderStatus = 'leaving';
|
|
283
|
+
this.loaderTimer = this.config.setTimer(()=>{
|
|
284
|
+
this.loaderTimer = null;
|
|
285
|
+
this.loaderStatus = null;
|
|
286
|
+
this.emit();
|
|
287
|
+
}, g9ToastTimings.loaderFadeOutMs);
|
|
288
|
+
}
|
|
289
|
+
later(callback, ms) {
|
|
290
|
+
this.config.setTimer(()=>{
|
|
291
|
+
if (!this.disposed) callback();
|
|
292
|
+
}, ms);
|
|
293
|
+
}
|
|
294
|
+
build() {
|
|
295
|
+
return {
|
|
296
|
+
toasts: this.records.map((r)=>r.entry),
|
|
297
|
+
loader: this.loaderStatus ? {
|
|
298
|
+
text: this.loaderText,
|
|
299
|
+
status: this.loaderStatus
|
|
300
|
+
} : null,
|
|
301
|
+
loadingToast: this.loadingToast,
|
|
302
|
+
progress: this.progress,
|
|
303
|
+
insetVersion: this.insetVersion,
|
|
304
|
+
reanchorAnimated: this.reanchorAnimated,
|
|
305
|
+
bottomOverlayHeight: [
|
|
306
|
+
...this.overlays.values()
|
|
307
|
+
].reduce((a, b)=>a + b, 0)
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
emit() {
|
|
311
|
+
this.snapshot = this.build();
|
|
312
|
+
for (const l of this.listeners)l();
|
|
313
|
+
}
|
|
314
|
+
constructor(config){
|
|
315
|
+
_define_property(this, "config", void 0);
|
|
316
|
+
_define_property(this, "records", void 0);
|
|
317
|
+
_define_property(this, "holds", void 0);
|
|
318
|
+
_define_property(this, "loaderStatus", void 0);
|
|
319
|
+
_define_property(this, "loaderText", void 0);
|
|
320
|
+
_define_property(this, "loaderTimer", void 0);
|
|
321
|
+
_define_property(this, "loadingToast", void 0);
|
|
322
|
+
_define_property(this, "progress", void 0);
|
|
323
|
+
_define_property(this, "insetVersion", void 0);
|
|
324
|
+
_define_property(this, "reanchorAnimated", void 0);
|
|
325
|
+
_define_property(this, "overlays", void 0);
|
|
326
|
+
_define_property(this, "nextId", void 0);
|
|
327
|
+
_define_property(this, "listeners", void 0);
|
|
328
|
+
_define_property(this, "snapshot", void 0);
|
|
329
|
+
_define_property(this, "disposed", void 0);
|
|
330
|
+
this.config = config;
|
|
331
|
+
this.records = [];
|
|
332
|
+
this.holds = [];
|
|
333
|
+
this.loaderStatus = null;
|
|
334
|
+
this.loaderText = '';
|
|
335
|
+
this.loaderTimer = null;
|
|
336
|
+
this.loadingToast = null;
|
|
337
|
+
this.progress = null;
|
|
338
|
+
this.insetVersion = 0;
|
|
339
|
+
this.reanchorAnimated = true;
|
|
340
|
+
this.overlays = new Map();
|
|
341
|
+
this.nextId = 1;
|
|
342
|
+
this.listeners = new Set();
|
|
343
|
+
this.disposed = false;
|
|
344
|
+
this.snapshot = this.build();
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
function clamp01(v) {
|
|
348
|
+
return Number.isFinite(v) ? Math.min(1, Math.max(0, v)) : 0;
|
|
349
|
+
}
|
|
350
|
+
function resolveToastPosition(position, rtl) {
|
|
351
|
+
return null != position ? position : rtl ? 'bottomLeft' : 'bottomRight';
|
|
352
|
+
}
|
|
353
|
+
export { G9ToastPosition, G9ToastStore, G9ToastType, g9DefaultToastOptions, g9MaxToastsPerStack, g9ToastTimings, resolveToastPosition };
|
|
354
|
+
|
|
355
|
+
//# sourceMappingURL=store.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast/store.jsx","sources":["../../src/toast/store.ts"],"sourcesContent":["import type { G9IconInput } from '../icon/icon';\n\n// Toast state (MAUI `G9ToastHelper`): typed toasts in per-position stacks, the reference-counted full-screen loader,\n// the compact loading toast and the progress toast, as a pure store. The view renders `getSnapshot()`; timers come\n// from the caller so tests drive time.\n\n/** Toast kind (MAUI `G9ToastType`). */\nexport const G9ToastType = {\n Information: 'information',\n Success: 'success',\n Warning: 'warning',\n Error: 'error',\n} as const;\nexport type G9ToastType = (typeof G9ToastType)[keyof typeof G9ToastType];\n\n/** Nine anchors (MAUI `G9ToastPosition`). */\nexport const G9ToastPosition = {\n TopLeft: 'topLeft',\n TopCenter: 'topCenter',\n TopRight: 'topRight',\n MiddleLeft: 'middleLeft',\n MiddleCenter: 'middleCenter',\n MiddleRight: 'middleRight',\n BottomLeft: 'bottomLeft',\n BottomCenter: 'bottomCenter',\n BottomRight: 'bottomRight',\n} as const;\nexport type G9ToastPosition = (typeof G9ToastPosition)[keyof typeof G9ToastPosition];\n\n/** Options of one toast (MAUI `G9ToastOptions`). */\nexport interface G9ToastOptions {\n /** Default: bottom right (LTR) / bottom left (RTL). */\n readonly position?: G9ToastPosition | null;\n /** Auto-dismiss after this many ms. Default 3000. */\n readonly durationMs?: number;\n /** Icon override; default the type's glyph. */\n readonly icon?: G9IconInput;\n /** Action button text (e.g. \"Undo\"); with `action`. */\n readonly actionText?: string | null;\n /** Runs once when the action button is tapped (through the provider's safe executor). */\n readonly action?: (() => unknown) | null;\n}\n\n/** Default toast options (MAUI `G9ToastOptions.Default`). */\nexport const g9DefaultToastOptions: Readonly<Required<Pick<G9ToastOptions, 'durationMs'>>> = Object.freeze({\n durationMs: 3000,\n});\n\n/** Timings (MAUI toast guide). */\nexport const g9ToastTimings = Object.freeze({\n enterMs: 250,\n exitMs: 200,\n loaderFadeInMs: 200,\n loaderFadeOutMs: 180,\n reanchorMs: 220,\n});\n/** Most toasts per stack (MAUI `MaxToastsPerStack`). */\nexport const g9MaxToastsPerStack = 4;\n\n/** One live toast. */\nexport interface G9ToastEntry {\n readonly id: number;\n readonly message: string;\n readonly type: G9ToastType;\n readonly position: G9ToastPosition;\n readonly icon: G9IconInput;\n readonly actionText: string | null;\n readonly hasAction: boolean;\n readonly status: 'entering' | 'shown' | 'leaving';\n /** Bumped when an identical toast collapsed into this one (its lifetime restarted). */\n readonly refreshes: number;\n /** Its lifetime (the countdown fill runs over it; 0 or less = sticky, no fill). */\n readonly durationMs: number;\n}\n\n/** The full-screen loader (visible while at least one hold is open). */\nexport interface G9LoaderState {\n readonly text: string;\n readonly status: 'entering' | 'shown' | 'leaving';\n}\n\n/** The compact loading toast. */\nexport interface G9LoadingToastState {\n readonly text: string;\n readonly position: G9ToastPosition;\n}\n\n/** The progress toast. */\nexport interface G9ProgressToastState {\n readonly title: string;\n readonly detail: string | null;\n /** 0…1. */\n readonly progress: number;\n readonly position: G9ToastPosition;\n}\n\n/** What the view renders. */\nexport interface G9ToastSnapshot {\n readonly toasts: ReadonlyArray<G9ToastEntry>;\n readonly loader: G9LoaderState | null;\n readonly loadingToast: G9LoadingToastState | null;\n readonly progress: G9ProgressToastState | null;\n /** Bumped by `refreshBottomInsets`; `reanchorAnimated` says whether the move glides. */\n readonly insetVersion: number;\n readonly reanchorAnimated: boolean;\n /** Heights of bottom-anchored overlays the bottom stacks sit above (MAUI `IG9BottomAnchoredOverlay`). */\n readonly bottomOverlayHeight: number;\n}\n\n/** A hold on the full-screen loader (MAUI `BeginLoadingAsync` lease); disposing twice is harmless. */\nexport interface G9LoadingLease {\n dispose(): void;\n}\n\n/** A shown toast. */\nexport interface G9ToastHandle {\n readonly id: number;\n dismiss(): void;\n /** Settles when the toast left the screen. */\n readonly closed: Promise<void>;\n}\n\n/** Timing and action plumbing of the store. */\nexport interface G9ToastStoreConfig {\n setTimer(callback: () => void, ms: number): unknown;\n clearTimer(handle: unknown): void;\n /** Runs a toast action (once per tap is the store's job; errors are the runner's). */\n runAction(action: () => unknown): void;\n /** Where a toast without a position goes (bottom right in LTR, bottom left in RTL). */\n defaultPosition(): G9ToastPosition;\n}\n\ninterface ToastRecord {\n entry: G9ToastEntry;\n action: (() => unknown) | null;\n durationMs: number;\n timer: unknown;\n actionRan: boolean;\n closed: () => void;\n}\n\ninterface Hold {\n readonly token: number;\n readonly text: string;\n readonly lease: boolean;\n}\n\nconst isPlain = (r: ToastRecord) => !r.entry.hasAction;\n\n/** The toast store. */\nexport class G9ToastStore {\n private records: ToastRecord[] = [];\n private holds: Hold[] = [];\n private loaderStatus: G9LoaderState['status'] | null = null;\n private loaderText = '';\n private loaderTimer: unknown = null;\n private loadingToast: G9LoadingToastState | null = null;\n private progress: G9ProgressToastState | null = null;\n private insetVersion = 0;\n private reanchorAnimated = true;\n private readonly overlays = new Map<string, number>();\n private nextId = 1;\n private readonly listeners = new Set<() => void>();\n private snapshot: G9ToastSnapshot;\n private disposed = false;\n\n constructor(private readonly config: G9ToastStoreConfig) {\n this.snapshot = this.build();\n }\n\n getSnapshot(): G9ToastSnapshot {\n return this.snapshot;\n }\n\n subscribe(listener: () => void): () => void {\n this.listeners.add(listener);\n return () => this.listeners.delete(listener);\n }\n\n /**\n * Shows a toast (MAUI `ShowToastAsync`). An identical newest toast of the same stack (same message and type, no\n * action on either) is refreshed instead (lifetime restarted). Past four per stack the oldest leaves.\n */\n show(message: string, type: G9ToastType = 'information', options: G9ToastOptions = {}): G9ToastHandle {\n const position = options.position ?? this.config.defaultPosition();\n const hasAction = !!options.actionText && !!options.action;\n const duration = options.durationMs ?? g9DefaultToastOptions.durationMs;\n const stack = this.records.filter((r) => r.entry.position === position && r.entry.status !== 'leaving');\n const newest = stack[stack.length - 1];\n if (\n !this.disposed &&\n newest &&\n !hasAction &&\n isPlain(newest) &&\n newest.entry.message === message &&\n newest.entry.type === type\n ) {\n newest.entry = { ...newest.entry, refreshes: newest.entry.refreshes + 1, durationMs: duration };\n newest.durationMs = duration;\n this.arm(newest);\n this.emit();\n return this.handle(newest);\n }\n let closed!: () => void;\n const done = new Promise<void>((r) => (closed = r));\n const record: ToastRecord = {\n entry: {\n id: this.nextId++,\n message,\n type,\n position,\n icon: options.icon,\n actionText: hasAction ? (options.actionText as string) : null,\n hasAction,\n status: 'entering',\n refreshes: 0,\n durationMs: duration,\n },\n action: hasAction ? (options.action as () => unknown) : null,\n durationMs: duration,\n timer: null,\n actionRan: false,\n closed,\n };\n if (this.disposed) {\n closed();\n return { id: record.entry.id, dismiss: () => {}, closed: done };\n }\n this.records.push(record);\n for (const extra of stack.slice(0, Math.max(0, stack.length + 1 - g9MaxToastsPerStack))) this.leave(extra);\n this.later(() => {\n if (record.entry.status === 'entering') {\n record.entry = { ...record.entry, status: 'shown' };\n this.emit();\n }\n }, g9ToastTimings.enterMs);\n this.arm(record);\n this.emit();\n return { ...this.handle(record), closed: done };\n }\n\n /** Dismisses one toast, or every typed toast (MAUI `DismissToastAsync`). */\n dismissToast(id?: number): void {\n for (const r of [...this.records]) if (id === undefined || r.entry.id === id) this.leave(r);\n }\n\n /** The action button: runs the action once (a second tap during the exit does nothing) and dismisses. */\n pressAction(id: number): void {\n const r = this.records.find((x) => x.entry.id === id);\n if (!r || r.actionRan || !r.action) return;\n r.actionRan = true;\n this.config.runAction(r.action);\n this.leave(r);\n }\n\n /** Raises the full-screen loader (reference-counted; the newest text wins) (MAUI `ShowLoadingAsync`). */\n showLoading(text = ''): void {\n this.hold({ token: this.nextId++, text, lease: false });\n }\n\n /** A lease on the loader (MAUI `BeginLoadingAsync`). */\n beginLoading(text = ''): G9LoadingLease {\n const hold = { token: this.nextId++, text, lease: true };\n this.hold(hold);\n let released = false;\n return {\n dispose: () => {\n if (released) return;\n released = true;\n this.release(hold.token);\n },\n };\n }\n\n /** Releases the newest anonymous hold; a lease's hold is never released here (MAUI `DismissLoadingAsync`). */\n dismissLoading(): void {\n const anonymous = [...this.holds].reverse().find((h) => !h.lease);\n if (anonymous) this.release(anonymous.token);\n }\n\n /** Shows (or relabels) the compact loading toast (MAUI `ShowLoadingToastAsync`); it never auto-dismisses. */\n showLoadingToast(text = '', position: G9ToastPosition | null = null): void {\n this.loadingToast = { text, position: position ?? this.config.defaultPosition() };\n this.emit();\n }\n\n dismissLoadingToast(): void {\n if (!this.loadingToast) return;\n this.loadingToast = null;\n this.emit();\n }\n\n /** Shows the progress toast, replacing an active one (MAUI `ShowProgressToastAsync`). */\n showProgress(\n title: string,\n detail: string | null = null,\n progress = 0,\n position: G9ToastPosition | null = null,\n ): void {\n this.progress = { title, detail, progress: clamp01(progress), position: position ?? this.config.defaultPosition() };\n this.emit();\n }\n\n /** Updates the progress toast; omitted parts stay (MAUI `UpdateProgressToastAsync`). No-op without one. */\n updateProgress(title?: string | null, detail?: string | null, progress?: number | null): void {\n if (!this.progress) return;\n this.progress = {\n ...this.progress,\n ...(title != null ? { title } : {}),\n ...(detail !== undefined && detail !== null ? { detail } : {}),\n ...(progress != null ? { progress: clamp01(progress) } : {}),\n };\n this.emit();\n }\n\n dismissProgress(): void {\n if (!this.progress) return;\n this.progress = null;\n this.emit();\n }\n\n /** Re-anchors every live toast to the current insets; `animate` glides (220 ms) (MAUI `RefreshBottomInsetsAsync`). */\n refreshBottomInsets(animate = true): void {\n this.insetVersion += 1;\n this.reanchorAnimated = animate;\n this.emit();\n }\n\n /** Registers (or clears with `null`) a bottom-anchored overlay the bottom stacks must sit above. */\n setBottomOverlay(key: string, heightPx: number | null): void {\n if (heightPx === null || heightPx <= 0) this.overlays.delete(key);\n else this.overlays.set(key, heightPx);\n this.emit();\n }\n\n /** Clears everything, the loader regardless of its count (MAUI `DismissAllAsync`). */\n dismissAll(): void {\n this.dismissToast();\n this.holds = [];\n this.updateLoader();\n this.loadingToast = null;\n this.progress = null;\n this.emit();\n }\n\n /** The host unmounted. */\n dispose(): void {\n this.disposed = true;\n for (const r of this.records) {\n if (r.timer !== null) this.config.clearTimer(r.timer);\n r.closed();\n }\n this.records = [];\n if (this.loaderTimer !== null) this.config.clearTimer(this.loaderTimer);\n this.holds = [];\n this.loaderStatus = null;\n this.emit();\n }\n\n private handle(record: ToastRecord): G9ToastHandle {\n return {\n id: record.entry.id,\n dismiss: () => this.leave(record),\n closed: Promise.resolve(),\n };\n }\n\n private arm(record: ToastRecord): void {\n if (record.timer !== null) this.config.clearTimer(record.timer);\n record.timer = this.config.setTimer(() => {\n record.timer = null;\n this.leave(record);\n }, record.durationMs);\n }\n\n private leave(record: ToastRecord): void {\n if (record.entry.status === 'leaving' || !this.records.includes(record)) return;\n if (record.timer !== null) this.config.clearTimer(record.timer);\n record.timer = null;\n record.entry = { ...record.entry, status: 'leaving' };\n this.emit();\n this.later(() => {\n this.records = this.records.filter((r) => r !== record);\n record.closed();\n this.emit();\n }, g9ToastTimings.exitMs);\n }\n\n private hold(hold: Hold): void {\n this.holds.push(hold);\n this.updateLoader();\n this.emit();\n }\n\n private release(token: number): void {\n this.holds = this.holds.filter((h) => h.token !== token);\n this.updateLoader();\n this.emit();\n }\n\n private updateLoader(): void {\n const top = this.holds[this.holds.length - 1];\n if (top) {\n this.loaderText = top.text;\n if (this.loaderStatus === null || this.loaderStatus === 'leaving') {\n if (this.loaderTimer !== null) this.config.clearTimer(this.loaderTimer);\n this.loaderStatus = 'entering';\n this.loaderTimer = this.config.setTimer(() => {\n this.loaderTimer = null;\n this.loaderStatus = 'shown';\n this.emit();\n }, g9ToastTimings.loaderFadeInMs);\n }\n return;\n }\n if (this.loaderStatus === null || this.loaderStatus === 'leaving') return;\n if (this.loaderTimer !== null) this.config.clearTimer(this.loaderTimer);\n this.loaderStatus = 'leaving';\n this.loaderTimer = this.config.setTimer(() => {\n this.loaderTimer = null;\n this.loaderStatus = null;\n this.emit();\n }, g9ToastTimings.loaderFadeOutMs);\n }\n\n private later(callback: () => void, ms: number): void {\n this.config.setTimer(() => {\n if (!this.disposed) callback();\n }, ms);\n }\n\n private build(): G9ToastSnapshot {\n return {\n toasts: this.records.map((r) => r.entry),\n loader: this.loaderStatus ? { text: this.loaderText, status: this.loaderStatus } : null,\n loadingToast: this.loadingToast,\n progress: this.progress,\n insetVersion: this.insetVersion,\n reanchorAnimated: this.reanchorAnimated,\n bottomOverlayHeight: [...this.overlays.values()].reduce((a, b) => a + b, 0),\n };\n }\n\n private emit(): void {\n this.snapshot = this.build();\n for (const l of this.listeners) l();\n }\n}\n\nfunction clamp01(v: number): number {\n return Number.isFinite(v) ? Math.min(1, Math.max(0, v)) : 0;\n}\n\n/** The culture default position: bottom right in LTR, bottom left in RTL. */\nexport function resolveToastPosition(position: G9ToastPosition | null | undefined, rtl: boolean): G9ToastPosition {\n return position ?? (rtl ? 'bottomLeft' : 'bottomRight');\n}\n"],"names":["G9ToastType","G9ToastPosition","g9DefaultToastOptions","Object","g9ToastTimings","g9MaxToastsPerStack","isPlain","r","G9ToastStore","listener","message","type","options","_options_position","_options_durationMs","position","hasAction","duration","stack","newest","closed","done","Promise","record","extra","Math","id","undefined","x","text","hold","released","anonymous","h","title","detail","progress","clamp01","animate","key","heightPx","token","top","callback","ms","a","b","l","config","Map","Set","v","Number","resolveToastPosition","rtl"],"mappings":";;;;;;;;;;AAOO,MAAMA,cAAc;IACzB,aAAa;IACb,SAAS;IACT,SAAS;IACT,OAAO;AACT;AAIO,MAAMC,kBAAkB;IAC7B,SAAS;IACT,WAAW;IACX,UAAU;IACV,YAAY;IACZ,cAAc;IACd,aAAa;IACb,YAAY;IACZ,cAAc;IACd,aAAa;AACf;AAkBO,MAAMC,wBAAgFC,OAAO,MAAM,CAAC;IACzG,YAAY;AACd;AAGO,MAAMC,iBAAiBD,OAAO,MAAM,CAAC;IAC1C,SAAS;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,uBAAQ,YAAR;QACA,uBAAQ,gBAAR;QACA,uBAAQ,oBAAR;QACA,uBAAiB,YAAjB;QACA,uBAAQ,UAAR;QACA,uBAAiB,aAAjB;QACA,uBAAQ,YAAR;QACA,uBAAQ,YAAR;aAE6BA,MAAM,GAANA;aAfrB,OAAO,GAAkB,EAAE;aAC3B,KAAK,GAAW,EAAE;aAClB,YAAY,GAAmC;aAC/C,UAAU,GAAG;aACb,WAAW,GAAY;aACvB,YAAY,GAA+B;aAC3C,QAAQ,GAAgC;aACxC,YAAY,GAAG;aACf,gBAAgB,GAAG;aACV,QAAQ,GAAG,IAAIC;aACxB,MAAM,GAAG;aACA,SAAS,GAAG,IAAIC;aAEzB,QAAQ,GAAG;QAGjB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK;IAC5B;AAuRF;AAEA,SAASb,QAAQc,CAAS;IACxB,OAAOC,OAAO,QAAQ,CAACD,KAAK1B,KAAK,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC,GAAG0B,MAAM;AAC5D;AAGO,SAASE,qBAAqBtC,QAA4C,EAAEuC,GAAY;IAC7F,OAAOvC,QAAAA,WAAAA,WAAauC,MAAM,eAAe;AAC3C"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
.g9-toast-layer {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
bottom: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.g9-toast-stack {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
align-items: stretch;
|
|
13
|
+
display: flex;
|
|
14
|
+
position: fixed;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.g9-toast-stack--bottom {
|
|
18
|
+
flex-direction: column-reverse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.g9-toast-stack--middleLeft, .g9-toast-stack--middleCenter, .g9-toast-stack--middleRight {
|
|
22
|
+
justify-content: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.g9-toast--loading {
|
|
26
|
+
align-self: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.g9-toast {
|
|
30
|
+
border-style: solid;
|
|
31
|
+
border-width: 1px;
|
|
32
|
+
border-color: var(--g9-outline-variant);
|
|
33
|
+
background-color: var(--g9-surface);
|
|
34
|
+
border-radius: 10px;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
align-items: center;
|
|
37
|
+
min-height: 48px;
|
|
38
|
+
margin-top: 4px;
|
|
39
|
+
margin-bottom: 4px;
|
|
40
|
+
padding: 12px 14px;
|
|
41
|
+
display: flex;
|
|
42
|
+
position: relative;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.g9-toast__message {
|
|
47
|
+
color: var(--g9-on-surface);
|
|
48
|
+
flex-shrink: 1;
|
|
49
|
+
margin-left: 10px;
|
|
50
|
+
margin-right: 10px;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.g9-toast__detail {
|
|
55
|
+
color: var(--g9-text-secondary);
|
|
56
|
+
margin-left: 10px;
|
|
57
|
+
margin-right: 10px;
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.g9-toast__countdown {
|
|
62
|
+
border-radius: 10px;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 0;
|
|
65
|
+
bottom: 0;
|
|
66
|
+
left: 0;
|
|
67
|
+
right: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.g9-toast__action {
|
|
71
|
+
border-radius: 6px;
|
|
72
|
+
align-items: center;
|
|
73
|
+
height: 32px;
|
|
74
|
+
margin-left: 10px;
|
|
75
|
+
margin-right: 10px;
|
|
76
|
+
padding-left: 8px;
|
|
77
|
+
padding-right: 8px;
|
|
78
|
+
display: flex;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.g9-toast__action-text {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
font-weight: 700;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.g9-toast--progress {
|
|
87
|
+
min-width: 240px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.g9-toast__fill {
|
|
91
|
+
background-color: var(--g9-primary);
|
|
92
|
+
opacity: .34;
|
|
93
|
+
transition: transform .25s;
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
bottom: 0;
|
|
97
|
+
left: 0;
|
|
98
|
+
right: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.g9-toast__progress-text {
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
flex: 1;
|
|
104
|
+
display: flex;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.g9-toast__pill {
|
|
108
|
+
background-color: var(--g9-primary-container);
|
|
109
|
+
border-radius: 10px;
|
|
110
|
+
padding: 2px 8px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.g9-toast__pill-text {
|
|
114
|
+
color: var(--g9-on-primary-container);
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
font-weight: 700;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.g9-loader {
|
|
120
|
+
justify-content: center;
|
|
121
|
+
align-items: center;
|
|
122
|
+
display: flex;
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 0;
|
|
125
|
+
bottom: 0;
|
|
126
|
+
left: 0;
|
|
127
|
+
right: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.g9-loader__scrim {
|
|
131
|
+
background-color: var(--g9-scrim);
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 0;
|
|
134
|
+
bottom: 0;
|
|
135
|
+
left: 0;
|
|
136
|
+
right: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.g9-loader__card {
|
|
140
|
+
border-style: solid;
|
|
141
|
+
border-width: 1px;
|
|
142
|
+
border-color: var(--g9-outline-variant);
|
|
143
|
+
background-color: var(--g9-inverse-surface);
|
|
144
|
+
border-radius: 14px;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
align-items: center;
|
|
147
|
+
padding: 20px 24px;
|
|
148
|
+
display: flex;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.g9-loader__text {
|
|
152
|
+
text-align: center;
|
|
153
|
+
color: var(--g9-inverse-on-surface);
|
|
154
|
+
margin-top: 12px;
|
|
155
|
+
font-size: 14px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
/*# sourceMappingURL=toast.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./src/toast/toast.css"],"names":[],"mappings":"AAAA;EACE,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAMA;EAHE,sBAAsB;EACtB,2BAA2B;EAC3B,oBAAoB;EACpB,aAAa;EACb,eAAe;AACjB;;AAMA;EAHE,8BAA8B;AAChC;;AAMA;EAHE,uBAAuB;AACzB;;AAQA;EALE,kBAAkB;AACpB;;AASA;EANE,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,mBAAmB;EACnB,mBAAmB;EACnB,mBAAmB;EACnB,gBAAgB;EAChB,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AASA;EANE,2BAA2B;EAC3B,cAAc;EACd,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;AACjB;;AASA;EANE,+BAA+B;EAC/B,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;AACjB;;AAUA;EAPE,mBAAmB;EACnB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,kBAAkB;EAClB,mBAAmB;EACnB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;EAClB,iBAAiB;EACjB,kBAAkB;EAClB,aAAa;AACf;;AAUA;EAPE,eAAe;EACf,gBAAgB;AAClB;;AAUA;EAPE,gBAAgB;AAClB;;AAUA;EAPE,mCAAmC;EACnC,YAAY;EACZ,0BAA0B;EAC1B,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,sBAAsB;EACtB,OAAO;EACP,aAAa;AACf;;AAUA;EAPE,6CAA6C;EAC7C,mBAAmB;EACnB,gBAAgB;AAClB;;AAUA;EAPE,qCAAqC;EACrC,eAAe;EACf,gBAAgB;AAClB;;AAUA;EAPE,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,iCAAiC;EACjC,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAUA;EAPE,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,2CAA2C;EAC3C,mBAAmB;EACnB,sBAAsB;EACtB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;AACf;;AAUA;EAPE,kBAAkB;EAClB,mCAAmC;EACnC,gBAAgB;EAChB,eAAe;AACjB","sourcesContent":[".g9-toast-layer {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n}\n\n/* Fixed (like .g9-popup): a stack exists only while it holds toasts, so it is created after any open sheet — lynx-ui's\n `position: fixed` SheetView — and lands above it instead of under it. Every stack spans the width between the edge\n margins and its toasts FILL it (MAUI ApplyInlineG9ToastPosition: HorizontalOptions = Fill; the position only picks\n top / middle / bottom). The compact loading toast stays centred (MAUI: Center). */\n.g9-toast-stack {\n position: fixed;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n}\n\n.g9-toast-stack--bottom {\n flex-direction: column-reverse;\n}\n\n.g9-toast-stack--middleLeft,\n.g9-toast-stack--middleCenter,\n.g9-toast-stack--middleRight {\n justify-content: center;\n}\n\n.g9-toast--loading {\n align-self: center;\n}\n\n/* MAUI G9ToastHelper.BuildInlineToastView: radius 10, padding 14 / 12, filled with the type's colour (inline style). */\n.g9-toast {\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 48px;\n padding: 12px 14px;\n margin-top: 4px;\n margin-bottom: 4px;\n border-radius: 10px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n overflow: hidden;\n position: relative;\n}\n\n.g9-toast__message {\n flex-shrink: 1;\n font-size: 14px;\n color: var(--g9-on-surface);\n margin-left: 10px;\n margin-right: 10px;\n}\n\n.g9-toast__detail {\n font-size: 12px;\n color: var(--g9-text-secondary);\n margin-left: 10px;\n margin-right: 10px;\n}\n\n/* The lifetime countdown (MAUI's fill layer): grows from the reading start, behind the content. */\n.g9-toast__countdown {\n position: absolute;\n top: 0px;\n bottom: 0px;\n left: 0px;\n right: 0px;\n border-radius: 10px;\n}\n\n.g9-toast__action {\n border-radius: 6px;\n margin-left: 10px;\n margin-right: 10px;\n height: 32px;\n padding-left: 8px;\n padding-right: 8px;\n display: flex;\n align-items: center;\n}\n\n.g9-toast__action-text {\n font-size: 14px;\n font-weight: 700;\n}\n\n.g9-toast--progress {\n min-width: 240px;\n}\n\n.g9-toast__fill {\n position: absolute;\n top: 0px;\n bottom: 0px;\n left: 0px;\n right: 0px;\n background-color: var(--g9-primary);\n opacity: 0.34;\n transition: transform 250ms;\n}\n\n.g9-toast__progress-text {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.g9-toast__pill {\n padding: 2px 8px;\n border-radius: 10px;\n background-color: var(--g9-primary-container);\n}\n\n.g9-toast__pill-text {\n font-size: 12px;\n font-weight: 700;\n color: var(--g9-on-primary-container);\n}\n\n.g9-loader {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.g9-loader__scrim {\n position: absolute;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: var(--g9-scrim);\n}\n\n.g9-loader__card {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 20px 24px;\n border-radius: 14px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-inverse-surface);\n}\n\n.g9-loader__text {\n margin-top: 12px;\n font-size: 14px;\n text-align: center;\n color: var(--g9-inverse-on-surface);\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** Progress at which the box fill is complete. */
|
|
2
|
+
export declare const g9CheckFillPhaseEnd: number;
|
|
3
|
+
/** Progress at which the mark starts drawing. */
|
|
4
|
+
export declare const g9CheckMarkPhaseStart: number;
|
|
5
|
+
/** Clamps to [0, 1]; NaN and negatives give 0 (MAUI `Clamp01`). */
|
|
6
|
+
export declare function clamp01(value: number): number;
|
|
7
|
+
/** Animation target: 1 when checked or indeterminate. */
|
|
8
|
+
export declare function targetProgress(isChecked: boolean, isIndeterminate: boolean): number;
|
|
9
|
+
/** Morph target: 1 (dash) when indeterminate, 0 (tick) otherwise. */
|
|
10
|
+
export declare function targetMorph(isIndeterminate: boolean): number;
|
|
11
|
+
/** Tap transition (ADR-0028): indeterminate → checked; otherwise toggle, never into indeterminate. */
|
|
12
|
+
export declare function nextOnTap(isChecked: boolean, isIndeterminate: boolean): {
|
|
13
|
+
checked: boolean;
|
|
14
|
+
indeterminate: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** How much of the box is filled at `progress`. */
|
|
17
|
+
export declare function fillAmount(progress: number): number;
|
|
18
|
+
/** How much of the mark is drawn at `progress`. */
|
|
19
|
+
export declare function markAmount(progress: number): number;
|
|
20
|
+
/** The two-segment mark A→B→C in unit box coordinates. */
|
|
21
|
+
export interface G9CheckMarkGeometry {
|
|
22
|
+
readonly ax: number;
|
|
23
|
+
readonly ay: number;
|
|
24
|
+
readonly bx: number;
|
|
25
|
+
readonly by: number;
|
|
26
|
+
readonly cx: number;
|
|
27
|
+
readonly cy: number;
|
|
28
|
+
}
|
|
29
|
+
/** The visible part of the mark: the end of the first arm, and of the second when it has started. */
|
|
30
|
+
export interface G9CheckMarkTrim {
|
|
31
|
+
readonly isEmpty: boolean;
|
|
32
|
+
readonly firstEndX: number;
|
|
33
|
+
readonly firstEndY: number;
|
|
34
|
+
readonly hasSecond: boolean;
|
|
35
|
+
readonly secondEndX: number;
|
|
36
|
+
readonly secondEndY: number;
|
|
37
|
+
}
|
|
38
|
+
/** The tick. */
|
|
39
|
+
export declare const g9CheckGeometry: G9CheckMarkGeometry;
|
|
40
|
+
/** The indeterminate dash. */
|
|
41
|
+
export declare const g9DashGeometry: G9CheckMarkGeometry;
|
|
42
|
+
/** The mark between tick (0) and dash (1). */
|
|
43
|
+
export declare function resolveCheckMarkGeometry(morph: number): G9CheckMarkGeometry;
|
|
44
|
+
/** Length of the first arm A→B. */
|
|
45
|
+
export declare function firstArmLength(g: G9CheckMarkGeometry): number;
|
|
46
|
+
/** Length of the second arm B→C. */
|
|
47
|
+
export declare function secondArmLength(g: G9CheckMarkGeometry): number;
|
|
48
|
+
/** The visible part of the mark when `amount` of its length is drawn (MAUI `Trim`). */
|
|
49
|
+
export declare function trimCheckMark(g: G9CheckMarkGeometry, amount: number): G9CheckMarkTrim;
|
|
50
|
+
/** SVG path (in a `size` box) of the mark drawn at `progress` and `morph` (tick → dash). */
|
|
51
|
+
export declare function checkMarkPath(progress: number, morph: number, size: number): string;
|
|
52
|
+
//# sourceMappingURL=checkbox-math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-math.d.ts","sourceRoot":"","sources":["../../src/toggle/checkbox-math.ts"],"names":[],"mappings":"AAKA,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAC1C,iDAAiD;AACjD,eAAO,MAAM,qBAAqB,QA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