@g9tm/lynxcontrols 0.0.0-stage → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/base/base.css +16 -0
- package/dist/base/base.css.map +1 -0
- package/dist/base/control.d.ts +44 -0
- package/dist/base/control.d.ts.map +1 -0
- package/dist/base/control.jsx +24 -0
- package/dist/base/control.jsx.map +1 -0
- package/dist/base/corner-badge.d.ts +35 -0
- package/dist/base/corner-badge.d.ts.map +1 -0
- package/dist/base/corner-badge.jsx +45 -0
- package/dist/base/corner-badge.jsx.map +1 -0
- package/dist/base/disposer.d.ts +28 -0
- package/dist/base/disposer.d.ts.map +1 -0
- package/dist/base/disposer.jsx +61 -0
- package/dist/base/disposer.jsx.map +1 -0
- package/dist/base/index.d.ts +10 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.jsx +9 -0
- package/dist/base/press.d.ts +38 -0
- package/dist/base/press.d.ts.map +1 -0
- package/dist/base/press.jsx +73 -0
- package/dist/base/press.jsx.map +1 -0
- package/dist/base/pressable.d.ts +25 -0
- package/dist/base/pressable.d.ts.map +1 -0
- package/dist/base/pressable.jsx +38 -0
- package/dist/base/pressable.jsx.map +1 -0
- package/dist/base/selection-item.d.ts +29 -0
- package/dist/base/selection-item.d.ts.map +1 -0
- package/dist/base/selection-item.jsx +6 -0
- package/dist/base/selection-item.jsx.map +1 -0
- package/dist/base/timers.d.ts +7 -0
- package/dist/base/timers.d.ts.map +1 -0
- package/dist/base/timers.jsx +10 -0
- package/dist/base/timers.jsx.map +1 -0
- package/dist/base/use-controllable-state.d.ts +30 -0
- package/dist/base/use-controllable-state.d.ts.map +1 -0
- package/dist/base/use-controllable-state.jsx +49 -0
- package/dist/base/use-controllable-state.jsx.map +1 -0
- package/dist/base/use-stable-callback.d.ts +8 -0
- package/dist/base/use-stable-callback.d.ts.map +1 -0
- package/dist/base/use-stable-callback.jsx +12 -0
- package/dist/base/use-stable-callback.jsx.map +1 -0
- package/dist/button/button.css +162 -0
- package/dist/button/button.css.map +1 -0
- package/dist/button/button.d.ts +52 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/button.jsx +87 -0
- package/dist/button/button.jsx.map +1 -0
- package/dist/button/header-action-button.d.ts +34 -0
- package/dist/button/header-action-button.d.ts.map +1 -0
- package/dist/button/header-action-button.jsx +51 -0
- package/dist/button/header-action-button.jsx.map +1 -0
- package/dist/button/icon-button.d.ts +46 -0
- package/dist/button/icon-button.d.ts.map +1 -0
- package/dist/button/icon-button.jsx +69 -0
- package/dist/button/icon-button.jsx.map +1 -0
- package/dist/button/index.d.ts +9 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button/index.jsx +8 -0
- package/dist/button/nav-card.d.ts +58 -0
- package/dist/button/nav-card.d.ts.map +1 -0
- package/dist/button/nav-card.jsx +95 -0
- package/dist/button/nav-card.jsx.map +1 -0
- package/dist/button/safe-tap.d.ts +27 -0
- package/dist/button/safe-tap.d.ts.map +1 -0
- package/dist/button/safe-tap.jsx +46 -0
- package/dist/button/safe-tap.jsx.map +1 -0
- package/dist/button/safe.d.ts +84 -0
- package/dist/button/safe.d.ts.map +1 -0
- package/dist/button/safe.jsx +116 -0
- package/dist/button/safe.jsx.map +1 -0
- package/dist/button/vertical-icon-text-button.d.ts +18 -0
- package/dist/button/vertical-icon-text-button.d.ts.map +1 -0
- package/dist/button/vertical-icon-text-button.jsx +21 -0
- package/dist/button/vertical-icon-text-button.jsx.map +1 -0
- package/dist/button/visuals.d.ts +53 -0
- package/dist/button/visuals.d.ts.map +1 -0
- package/dist/button/visuals.jsx +92 -0
- package/dist/button/visuals.jsx.map +1 -0
- package/dist/cascade/cascade-panel.d.ts +80 -0
- package/dist/cascade/cascade-panel.d.ts.map +1 -0
- package/dist/cascade/cascade-panel.jsx +179 -0
- package/dist/cascade/cascade-panel.jsx.map +1 -0
- package/dist/cascade/cascade.css +70 -0
- package/dist/cascade/cascade.css.map +1 -0
- package/dist/cascade/index.d.ts +3 -0
- package/dist/cascade/index.d.ts.map +1 -0
- package/dist/cascade/index.jsx +2 -0
- package/dist/cascade/model.d.ts +68 -0
- package/dist/cascade/model.d.ts.map +1 -0
- package/dist/cascade/model.jsx +161 -0
- package/dist/cascade/model.jsx.map +1 -0
- package/dist/deferred/deferred-content.d.ts +82 -0
- package/dist/deferred/deferred-content.d.ts.map +1 -0
- package/dist/deferred/deferred-content.jsx +263 -0
- package/dist/deferred/deferred-content.jsx.map +1 -0
- package/dist/deferred/deferred.css +62 -0
- package/dist/deferred/deferred.css.map +1 -0
- package/dist/deferred/index.d.ts +3 -0
- package/dist/deferred/index.d.ts.map +1 -0
- package/dist/deferred/index.jsx +2 -0
- package/dist/deferred/readiness-signal.d.ts +16 -0
- package/dist/deferred/readiness-signal.d.ts.map +1 -0
- package/dist/deferred/readiness-signal.jsx +29 -0
- package/dist/deferred/readiness-signal.jsx.map +1 -0
- package/dist/display/activity-indicator.d.ts +21 -0
- package/dist/display/activity-indicator.d.ts.map +1 -0
- package/dist/display/activity-indicator.jsx +22 -0
- package/dist/display/activity-indicator.jsx.map +1 -0
- package/dist/display/culture-date-time-label.d.ts +64 -0
- package/dist/display/culture-date-time-label.d.ts.map +1 -0
- package/dist/display/culture-date-time-label.jsx +71 -0
- package/dist/display/culture-date-time-label.jsx.map +1 -0
- package/dist/display/display.css +217 -0
- package/dist/display/display.css.map +1 -0
- package/dist/display/index.d.ts +7 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.jsx +6 -0
- package/dist/display/progress-bar.d.ts +38 -0
- package/dist/display/progress-bar.d.ts.map +1 -0
- package/dist/display/progress-bar.jsx +57 -0
- package/dist/display/progress-bar.jsx.map +1 -0
- package/dist/display/separator.d.ts +30 -0
- package/dist/display/separator.d.ts.map +1 -0
- package/dist/display/separator.jsx +55 -0
- package/dist/display/separator.jsx.map +1 -0
- package/dist/display/shimmer.d.ts +41 -0
- package/dist/display/shimmer.d.ts.map +1 -0
- package/dist/display/shimmer.jsx +41 -0
- package/dist/display/shimmer.jsx.map +1 -0
- package/dist/display/title-with-line.d.ts +13 -0
- package/dist/display/title-with-line.d.ts.map +1 -0
- package/dist/display/title-with-line.jsx +21 -0
- package/dist/display/title-with-line.jsx.map +1 -0
- package/dist/edge-panel/edge-panel.css +132 -0
- package/dist/edge-panel/edge-panel.css.map +1 -0
- package/dist/edge-panel/edge-panel.d.ts +87 -0
- package/dist/edge-panel/edge-panel.d.ts.map +1 -0
- package/dist/edge-panel/edge-panel.jsx +326 -0
- package/dist/edge-panel/edge-panel.jsx.map +1 -0
- package/dist/edge-panel/helper.d.ts +27 -0
- package/dist/edge-panel/helper.d.ts.map +1 -0
- package/dist/edge-panel/helper.jsx +118 -0
- package/dist/edge-panel/helper.jsx.map +1 -0
- package/dist/edge-panel/index.d.ts +4 -0
- package/dist/edge-panel/index.d.ts.map +1 -0
- package/dist/edge-panel/index.jsx +3 -0
- package/dist/edge-panel/types.d.ts +155 -0
- package/dist/edge-panel/types.d.ts.map +1 -0
- package/dist/edge-panel/types.jsx +139 -0
- package/dist/edge-panel/types.jsx.map +1 -0
- package/dist/expander/expander.css +54 -0
- package/dist/expander/expander.css.map +1 -0
- package/dist/expander/expander.d.ts +46 -0
- package/dist/expander/expander.d.ts.map +1 -0
- package/dist/expander/expander.jsx +110 -0
- package/dist/expander/expander.jsx.map +1 -0
- package/dist/expander/index.d.ts +2 -0
- package/dist/expander/index.d.ts.map +1 -0
- package/dist/expander/index.jsx +1 -0
- package/dist/fields/dictation.d.ts +43 -0
- package/dist/fields/dictation.d.ts.map +1 -0
- package/dist/fields/dictation.jsx +124 -0
- package/dist/fields/dictation.jsx.map +1 -0
- package/dist/fields/editor.d.ts +26 -0
- package/dist/fields/editor.d.ts.map +1 -0
- package/dist/fields/editor.jsx +46 -0
- package/dist/fields/editor.jsx.map +1 -0
- package/dist/fields/fields.css +156 -0
- package/dist/fields/fields.css.map +1 -0
- package/dist/fields/index.d.ts +12 -0
- package/dist/fields/index.d.ts.map +1 -0
- package/dist/fields/index.jsx +11 -0
- package/dist/fields/input-policy.d.ts +48 -0
- package/dist/fields/input-policy.d.ts.map +1 -0
- package/dist/fields/input-policy.jsx +215 -0
- package/dist/fields/input-policy.jsx.map +1 -0
- package/dist/fields/outlined-field.d.ts +146 -0
- package/dist/fields/outlined-field.d.ts.map +1 -0
- package/dist/fields/outlined-field.jsx +196 -0
- package/dist/fields/outlined-field.jsx.map +1 -0
- package/dist/fields/pin-entry.d.ts +63 -0
- package/dist/fields/pin-entry.d.ts.map +1 -0
- package/dist/fields/pin-entry.jsx +293 -0
- package/dist/fields/pin-entry.jsx.map +1 -0
- package/dist/fields/search-entry.d.ts +35 -0
- package/dist/fields/search-entry.d.ts.map +1 -0
- package/dist/fields/search-entry.jsx +118 -0
- package/dist/fields/search-entry.jsx.map +1 -0
- package/dist/fields/slot-layout.d.ts +33 -0
- package/dist/fields/slot-layout.d.ts.map +1 -0
- package/dist/fields/slot-layout.jsx +33 -0
- package/dist/fields/slot-layout.jsx.map +1 -0
- package/dist/fields/text-entry.d.ts +62 -0
- package/dist/fields/text-entry.d.ts.map +1 -0
- package/dist/fields/text-entry.jsx +72 -0
- package/dist/fields/text-entry.jsx.map +1 -0
- package/dist/fields/use-dictation.d.ts +34 -0
- package/dist/fields/use-dictation.d.ts.map +1 -0
- package/dist/fields/use-dictation.jsx +80 -0
- package/dist/fields/use-dictation.jsx.map +1 -0
- package/dist/fields/use-text-input.d.ts +150 -0
- package/dist/fields/use-text-input.d.ts.map +1 -0
- package/dist/fields/use-text-input.jsx +237 -0
- package/dist/fields/use-text-input.jsx.map +1 -0
- package/dist/fields/validator.d.ts +14 -0
- package/dist/fields/validator.d.ts.map +1 -0
- package/dist/fields/validator.jsx +20 -0
- package/dist/fields/validator.jsx.map +1 -0
- package/dist/host/back.d.ts +42 -0
- package/dist/host/back.d.ts.map +1 -0
- package/dist/host/back.jsx +47 -0
- package/dist/host/back.jsx.map +1 -0
- package/dist/host/hooks.d.ts +85 -0
- package/dist/host/hooks.d.ts.map +1 -0
- package/dist/host/hooks.jsx +163 -0
- package/dist/host/hooks.jsx.map +1 -0
- package/dist/host/host.css +81 -0
- package/dist/host/host.css.map +1 -0
- package/dist/host/host.d.ts +70 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.jsx +229 -0
- package/dist/host/host.jsx.map +1 -0
- package/dist/host/index.d.ts +9 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.jsx +8 -0
- package/dist/host/keyboard.d.ts +24 -0
- package/dist/host/keyboard.d.ts.map +1 -0
- package/dist/host/keyboard.jsx +28 -0
- package/dist/host/keyboard.jsx.map +1 -0
- package/dist/host/layers.d.ts +69 -0
- package/dist/host/layers.d.ts.map +1 -0
- package/dist/host/layers.jsx +111 -0
- package/dist/host/layers.jsx.map +1 -0
- package/dist/host/page-loading-overlay.d.ts +17 -0
- package/dist/host/page-loading-overlay.d.ts.map +1 -0
- package/dist/host/page-loading-overlay.jsx +16 -0
- package/dist/host/page-loading-overlay.jsx.map +1 -0
- package/dist/host/readiness.d.ts +57 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.jsx +138 -0
- package/dist/host/readiness.jsx.map +1 -0
- package/dist/host/registry.d.ts +106 -0
- package/dist/host/registry.d.ts.map +1 -0
- package/dist/host/registry.jsx +93 -0
- package/dist/host/registry.jsx.map +1 -0
- package/dist/icon/icon.css +39 -0
- package/dist/icon/icon.css.map +1 -0
- package/dist/icon/icon.d.ts +57 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/icon.jsx +115 -0
- package/dist/icon/icon.jsx.map +1 -0
- package/dist/icon/index.d.ts +4 -0
- package/dist/icon/index.d.ts.map +1 -0
- package/dist/icon/index.jsx +3 -0
- package/dist/icon/slot.d.ts +45 -0
- package/dist/icon/slot.d.ts.map +1 -0
- package/dist/icon/slot.jsx +61 -0
- package/dist/icon/slot.jsx.map +1 -0
- package/dist/icon/swatch.d.ts +29 -0
- package/dist/icon/swatch.d.ts.map +1 -0
- package/dist/icon/swatch.jsx +25 -0
- package/dist/icon/swatch.jsx.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.jsx +1 -0
- package/dist/pickers/combo-box.d.ts +42 -0
- package/dist/pickers/combo-box.d.ts.map +1 -0
- package/dist/pickers/combo-box.jsx +129 -0
- package/dist/pickers/combo-box.jsx.map +1 -0
- package/dist/pickers/date-time-picker.d.ts +63 -0
- package/dist/pickers/date-time-picker.d.ts.map +1 -0
- package/dist/pickers/date-time-picker.jsx +141 -0
- package/dist/pickers/date-time-picker.jsx.map +1 -0
- package/dist/pickers/date-time.d.ts +82 -0
- package/dist/pickers/date-time.d.ts.map +1 -0
- package/dist/pickers/date-time.jsx +130 -0
- package/dist/pickers/date-time.jsx.map +1 -0
- package/dist/pickers/index.d.ts +10 -0
- package/dist/pickers/index.d.ts.map +1 -0
- package/dist/pickers/index.jsx +9 -0
- package/dist/pickers/picker-sheet.d.ts +21 -0
- package/dist/pickers/picker-sheet.d.ts.map +1 -0
- package/dist/pickers/picker-sheet.jsx +61 -0
- package/dist/pickers/picker-sheet.jsx.map +1 -0
- package/dist/pickers/picker.d.ts +32 -0
- package/dist/pickers/picker.d.ts.map +1 -0
- package/dist/pickers/picker.jsx +72 -0
- package/dist/pickers/picker.jsx.map +1 -0
- package/dist/pickers/pickers.css +219 -0
- package/dist/pickers/pickers.css.map +1 -0
- package/dist/pickers/timespan-picker.d.ts +36 -0
- package/dist/pickers/timespan-picker.d.ts.map +1 -0
- package/dist/pickers/timespan-picker.jsx +99 -0
- package/dist/pickers/timespan-picker.jsx.map +1 -0
- package/dist/pickers/timespan.d.ts +38 -0
- package/dist/pickers/timespan.d.ts.map +1 -0
- package/dist/pickers/timespan.jsx +49 -0
- package/dist/pickers/timespan.jsx.map +1 -0
- package/dist/pickers/trigger.d.ts +34 -0
- package/dist/pickers/trigger.d.ts.map +1 -0
- package/dist/pickers/trigger.jsx +77 -0
- package/dist/pickers/trigger.jsx.map +1 -0
- package/dist/pickers/wheel-column.d.ts +32 -0
- package/dist/pickers/wheel-column.d.ts.map +1 -0
- package/dist/pickers/wheel-column.jsx +99 -0
- package/dist/pickers/wheel-column.jsx.map +1 -0
- package/dist/plus-button/index.d.ts +3 -0
- package/dist/plus-button/index.d.ts.map +1 -0
- package/dist/plus-button/index.jsx +2 -0
- package/dist/plus-button/model.d.ts +65 -0
- package/dist/plus-button/model.d.ts.map +1 -0
- package/dist/plus-button/model.jsx +86 -0
- package/dist/plus-button/model.jsx.map +1 -0
- package/dist/plus-button/plus-button.css +67 -0
- package/dist/plus-button/plus-button.css.map +1 -0
- package/dist/plus-button/plus-button.d.ts +38 -0
- package/dist/plus-button/plus-button.d.ts.map +1 -0
- package/dist/plus-button/plus-button.jsx +155 -0
- package/dist/plus-button/plus-button.jsx.map +1 -0
- package/dist/popup/frame.d.ts +101 -0
- package/dist/popup/frame.d.ts.map +1 -0
- package/dist/popup/frame.jsx +244 -0
- package/dist/popup/frame.jsx.map +1 -0
- package/dist/popup/index.d.ts +8 -0
- package/dist/popup/index.d.ts.map +1 -0
- package/dist/popup/index.jsx +7 -0
- package/dist/popup/input-form.d.ts +35 -0
- package/dist/popup/input-form.d.ts.map +1 -0
- package/dist/popup/input-form.jsx +160 -0
- package/dist/popup/input-form.jsx.map +1 -0
- package/dist/popup/input.d.ts +175 -0
- package/dist/popup/input.d.ts.map +1 -0
- package/dist/popup/input.jsx +176 -0
- package/dist/popup/input.jsx.map +1 -0
- package/dist/popup/popup-view.d.ts +25 -0
- package/dist/popup/popup-view.d.ts.map +1 -0
- package/dist/popup/popup-view.jsx +67 -0
- package/dist/popup/popup-view.jsx.map +1 -0
- package/dist/popup/popup.css +203 -0
- package/dist/popup/popup.css.map +1 -0
- package/dist/popup/queue.d.ts +90 -0
- package/dist/popup/queue.d.ts.map +1 -0
- package/dist/popup/queue.jsx +309 -0
- package/dist/popup/queue.jsx.map +1 -0
- package/dist/popup/service.d.ts +60 -0
- package/dist/popup/service.d.ts.map +1 -0
- package/dist/popup/service.jsx +342 -0
- package/dist/popup/service.jsx.map +1 -0
- package/dist/popup/types.d.ts +211 -0
- package/dist/popup/types.d.ts.map +1 -0
- package/dist/popup/types.jsx +218 -0
- package/dist/popup/types.jsx.map +1 -0
- package/dist/provider/contexts.d.ts +41 -0
- package/dist/provider/contexts.d.ts.map +1 -0
- package/dist/provider/contexts.jsx +11 -0
- package/dist/provider/contexts.jsx.map +1 -0
- package/dist/provider/global-events.d.ts +8 -0
- package/dist/provider/global-events.d.ts.map +1 -0
- package/dist/provider/global-events.jsx +17 -0
- package/dist/provider/global-events.jsx.map +1 -0
- package/dist/provider/hooks.d.ts +49 -0
- package/dist/provider/hooks.d.ts.map +1 -0
- package/dist/provider/hooks.jsx +72 -0
- package/dist/provider/hooks.jsx.map +1 -0
- package/dist/provider/index.d.ts +5 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.jsx +3 -0
- package/dist/provider/provider.css +18 -0
- package/dist/provider/provider.css.map +1 -0
- package/dist/provider/provider.d.ts +51 -0
- package/dist/provider/provider.d.ts.map +1 -0
- package/dist/provider/provider.jsx +290 -0
- package/dist/provider/provider.jsx.map +1 -0
- package/dist/provider/settings.d.ts +99 -0
- package/dist/provider/settings.d.ts.map +1 -0
- package/dist/provider/settings.jsx +45 -0
- package/dist/provider/settings.jsx.map +1 -0
- package/dist/provider/theme-css.d.ts +12 -0
- package/dist/provider/theme-css.d.ts.map +1 -0
- package/dist/provider/theme-css.jsx +19 -0
- package/dist/provider/theme-css.jsx.map +1 -0
- package/dist/provider/theme-root.d.ts +10 -0
- package/dist/provider/theme-root.d.ts.map +1 -0
- package/dist/provider/theme-root.jsx +24 -0
- package/dist/provider/theme-root.jsx.map +1 -0
- package/dist/provider/theme.css +473 -0
- package/dist/provider/theme.css.map +1 -0
- package/dist/range-slider/index.d.ts +3 -0
- package/dist/range-slider/index.d.ts.map +1 -0
- package/dist/range-slider/index.jsx +2 -0
- package/dist/range-slider/math.d.ts +23 -0
- package/dist/range-slider/math.d.ts.map +1 -0
- package/dist/range-slider/math.jsx +71 -0
- package/dist/range-slider/math.jsx.map +1 -0
- package/dist/range-slider/range-slider.css +90 -0
- package/dist/range-slider/range-slider.css.map +1 -0
- package/dist/range-slider/range-slider.d.ts +52 -0
- package/dist/range-slider/range-slider.d.ts.map +1 -0
- package/dist/range-slider/range-slider.jsx +159 -0
- package/dist/range-slider/range-slider.jsx.map +1 -0
- package/dist/selection/index.d.ts +5 -0
- package/dist/selection/index.d.ts.map +1 -0
- package/dist/selection/index.jsx +3 -0
- package/dist/selection/model.d.ts +53 -0
- package/dist/selection/model.d.ts.map +1 -0
- package/dist/selection/model.jsx +69 -0
- package/dist/selection/model.jsx.map +1 -0
- package/dist/selection/selection-sheet.d.ts +80 -0
- package/dist/selection/selection-sheet.d.ts.map +1 -0
- package/dist/selection/selection-sheet.jsx +362 -0
- package/dist/selection/selection-sheet.jsx.map +1 -0
- package/dist/selection/selection.css +75 -0
- package/dist/selection/selection.css.map +1 -0
- package/dist/selection/use-selection-model.d.ts +9 -0
- package/dist/selection/use-selection-model.d.ts.map +1 -0
- package/dist/selection/use-selection-model.jsx +22 -0
- package/dist/selection/use-selection-model.jsx.map +1 -0
- package/dist/sheet/frame.d.ts +45 -0
- package/dist/sheet/frame.d.ts.map +1 -0
- package/dist/sheet/frame.jsx +205 -0
- package/dist/sheet/frame.jsx.map +1 -0
- package/dist/sheet/header.d.ts +35 -0
- package/dist/sheet/header.d.ts.map +1 -0
- package/dist/sheet/header.jsx +145 -0
- package/dist/sheet/header.jsx.map +1 -0
- package/dist/sheet/height-memo.d.ts +47 -0
- package/dist/sheet/height-memo.d.ts.map +1 -0
- package/dist/sheet/height-memo.jsx +100 -0
- package/dist/sheet/height-memo.jsx.map +1 -0
- package/dist/sheet/index.d.ts +11 -0
- package/dist/sheet/index.d.ts.map +1 -0
- package/dist/sheet/index.jsx +10 -0
- package/dist/sheet/loadable.d.ts +35 -0
- package/dist/sheet/loadable.d.ts.map +1 -0
- package/dist/sheet/loadable.jsx +65 -0
- package/dist/sheet/loadable.jsx.map +1 -0
- package/dist/sheet/options.d.ts +220 -0
- package/dist/sheet/options.d.ts.map +1 -0
- package/dist/sheet/options.jsx +91 -0
- package/dist/sheet/options.jsx.map +1 -0
- package/dist/sheet/processing.d.ts +22 -0
- package/dist/sheet/processing.d.ts.map +1 -0
- package/dist/sheet/processing.jsx +66 -0
- package/dist/sheet/processing.jsx.map +1 -0
- package/dist/sheet/service.d.ts +55 -0
- package/dist/sheet/service.d.ts.map +1 -0
- package/dist/sheet/service.jsx +143 -0
- package/dist/sheet/service.jsx.map +1 -0
- package/dist/sheet/sheet.css +195 -0
- package/dist/sheet/sheet.css.map +1 -0
- package/dist/sheet/sheet.d.ts +19 -0
- package/dist/sheet/sheet.d.ts.map +1 -0
- package/dist/sheet/sheet.jsx +40 -0
- package/dist/sheet/sheet.jsx.map +1 -0
- package/dist/sheet/sizing.d.ts +69 -0
- package/dist/sheet/sizing.d.ts.map +1 -0
- package/dist/sheet/sizing.jsx +146 -0
- package/dist/sheet/sizing.jsx.map +1 -0
- package/dist/sheet/stack.d.ts +161 -0
- package/dist/sheet/stack.d.ts.map +1 -0
- package/dist/sheet/stack.jsx +378 -0
- package/dist/sheet/stack.jsx.map +1 -0
- package/dist/swipe/index.d.ts +3 -0
- package/dist/swipe/index.d.ts.map +1 -0
- package/dist/swipe/index.jsx +2 -0
- package/dist/swipe/model.d.ts +72 -0
- package/dist/swipe/model.d.ts.map +1 -0
- package/dist/swipe/model.jsx +66 -0
- package/dist/swipe/model.jsx.map +1 -0
- package/dist/swipe/swipe-view.d.ts +40 -0
- package/dist/swipe/swipe-view.d.ts.map +1 -0
- package/dist/swipe/swipe-view.jsx +163 -0
- package/dist/swipe/swipe-view.jsx.map +1 -0
- package/dist/swipe/swipe.css +34 -0
- package/dist/swipe/swipe.css.map +1 -0
- package/dist/tab-bar/index.d.ts +4 -0
- package/dist/tab-bar/index.d.ts.map +1 -0
- package/dist/tab-bar/index.jsx +3 -0
- package/dist/tab-bar/metrics.d.ts +230 -0
- package/dist/tab-bar/metrics.d.ts.map +1 -0
- package/dist/tab-bar/metrics.jsx +221 -0
- package/dist/tab-bar/metrics.jsx.map +1 -0
- package/dist/tab-bar/model.d.ts +170 -0
- package/dist/tab-bar/model.d.ts.map +1 -0
- package/dist/tab-bar/model.jsx +349 -0
- package/dist/tab-bar/model.jsx.map +1 -0
- package/dist/tab-bar/tab-bar.css +173 -0
- package/dist/tab-bar/tab-bar.css.map +1 -0
- package/dist/tab-bar/tab-bar.d.ts +56 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -0
- package/dist/tab-bar/tab-bar.jsx +343 -0
- package/dist/tab-bar/tab-bar.jsx.map +1 -0
- package/dist/tabs/index.d.ts +3 -0
- package/dist/tabs/index.d.ts.map +1 -0
- package/dist/tabs/index.jsx +2 -0
- package/dist/tabs/model.d.ts +83 -0
- package/dist/tabs/model.d.ts.map +1 -0
- package/dist/tabs/model.jsx +113 -0
- package/dist/tabs/model.jsx.map +1 -0
- package/dist/tabs/tab-view.d.ts +47 -0
- package/dist/tabs/tab-view.d.ts.map +1 -0
- package/dist/tabs/tab-view.jsx +227 -0
- package/dist/tabs/tab-view.jsx.map +1 -0
- package/dist/tabs/tabs.css +182 -0
- package/dist/tabs/tabs.css.map +1 -0
- package/dist/toast/index.d.ts +3 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/toast/index.jsx +2 -0
- package/dist/toast/service.d.ts +48 -0
- package/dist/toast/service.d.ts.map +1 -0
- package/dist/toast/service.jsx +201 -0
- package/dist/toast/service.jsx.map +1 -0
- package/dist/toast/store.d.ts +174 -0
- package/dist/toast/store.d.ts.map +1 -0
- package/dist/toast/store.jsx +353 -0
- package/dist/toast/store.jsx.map +1 -0
- package/dist/toast/toast.css +152 -0
- package/dist/toast/toast.css.map +1 -0
- package/dist/toggle/checkbox-math.d.ts +52 -0
- package/dist/toggle/checkbox-math.d.ts.map +1 -0
- package/dist/toggle/checkbox-math.jsx +111 -0
- package/dist/toggle/checkbox-math.jsx.map +1 -0
- package/dist/toggle/checkbox.d.ts +56 -0
- package/dist/toggle/checkbox.d.ts.map +1 -0
- package/dist/toggle/checkbox.jsx +152 -0
- package/dist/toggle/checkbox.jsx.map +1 -0
- package/dist/toggle/chip-group.d.ts +50 -0
- package/dist/toggle/chip-group.d.ts.map +1 -0
- package/dist/toggle/chip-group.jsx +107 -0
- package/dist/toggle/chip-group.jsx.map +1 -0
- package/dist/toggle/index.d.ts +5 -0
- package/dist/toggle/index.d.ts.map +1 -0
- package/dist/toggle/index.jsx +4 -0
- package/dist/toggle/switch.d.ts +52 -0
- package/dist/toggle/switch.d.ts.map +1 -0
- package/dist/toggle/switch.jsx +192 -0
- package/dist/toggle/switch.jsx.map +1 -0
- package/dist/toggle/toggle.css +189 -0
- package/dist/toggle/toggle.css.map +1 -0
- package/package.json +155 -4
- package/rspeedy/index.d.ts +21 -0
- package/rspeedy/index.mjs +75 -0
- package/rspeedy/index.test.mjs +52 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { G9InputType, G9TextInputDirection } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { KeyboardAwareTriggerContext } from "@lynx-js/lynx-ui-input";
|
|
3
|
+
import { useContext, useEffect, useRef, useState } from "@lynx-js/react";
|
|
4
|
+
import { startTimer } from "../base/timers.jsx";
|
|
5
|
+
import { useControllableState } from "../base/use-controllable-state.jsx";
|
|
6
|
+
import { g9KeyboardTargetProps } from "../host/keyboard.jsx";
|
|
7
|
+
import { useG9Culture, useG9Strings } from "../provider/hooks.jsx";
|
|
8
|
+
import { decimalSeparatorFor, inputTypeHasValidationRule, inputTypePrefersLeftToRight, sanitizeInputText, validateInputText } from "./input-policy.jsx";
|
|
9
|
+
import { useDictation } from "./use-dictation.jsx";
|
|
10
|
+
import { runTextValidator } from "./validator.jsx";
|
|
11
|
+
function resolveInputTextDirection(inputTextDirection, inputType, isPassword, cultureDirection) {
|
|
12
|
+
if (inputTextDirection === G9TextInputDirection.LeftToRight) return 'ltr';
|
|
13
|
+
if (inputTextDirection === G9TextInputDirection.RightToLeft) return 'rtl';
|
|
14
|
+
if (inputTypePrefersLeftToRight(inputType) || isPassword) return 'ltr';
|
|
15
|
+
return cultureDirection;
|
|
16
|
+
}
|
|
17
|
+
function invokeNode(ref, method, params) {
|
|
18
|
+
const node = ref.current;
|
|
19
|
+
if (!node) return false;
|
|
20
|
+
try {
|
|
21
|
+
node.invoke({
|
|
22
|
+
method,
|
|
23
|
+
...params ? {
|
|
24
|
+
params
|
|
25
|
+
} : {},
|
|
26
|
+
success: ()=>{},
|
|
27
|
+
fail: ()=>{}
|
|
28
|
+
}).exec();
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function invokeNodeWhenReady(ref, method, params, attempts = 5) {
|
|
35
|
+
if (invokeNode(ref, method, params) || attempts <= 0) return;
|
|
36
|
+
startTimer(()=>invokeNodeWhenReady(ref, method, params, attempts - 1), 0);
|
|
37
|
+
}
|
|
38
|
+
function useTextInput(props, options) {
|
|
39
|
+
var _props_inputType, _props_defaultValue, _props_voiceLocale, _props_inputTextDirection;
|
|
40
|
+
const culture = useG9Culture();
|
|
41
|
+
const strings = useG9Strings();
|
|
42
|
+
const keyboardAware = useContext(KeyboardAwareTriggerContext);
|
|
43
|
+
const inputType = null != (_props_inputType = props.inputType) ? _props_inputType : G9InputType.Default;
|
|
44
|
+
const separator = decimalSeparatorFor(culture.numberingSystem);
|
|
45
|
+
const sanitize = (raw)=>sanitizeInputText(inputType, raw, props.allowedCharsPattern, separator);
|
|
46
|
+
const [text, setText] = useControllableState({
|
|
47
|
+
value: props.value,
|
|
48
|
+
defaultValue: null != (_props_defaultValue = props.defaultValue) ? _props_defaultValue : '',
|
|
49
|
+
onChange: props.onValueChange,
|
|
50
|
+
name: options.name
|
|
51
|
+
});
|
|
52
|
+
const display = sanitize(text);
|
|
53
|
+
const latestText = useRef(display);
|
|
54
|
+
latestText.current = display;
|
|
55
|
+
const elementRef = useRef(null);
|
|
56
|
+
const native = useRef('');
|
|
57
|
+
const [focused, setFocused] = useState(false);
|
|
58
|
+
const focusedRef = useRef(false);
|
|
59
|
+
const [passwordVisible, setPasswordVisible] = useState(false);
|
|
60
|
+
const [, bump] = useState(0);
|
|
61
|
+
const [validation, setValidation] = useState(null);
|
|
62
|
+
const hasValue = '' !== display;
|
|
63
|
+
const runValidation = (value)=>{
|
|
64
|
+
var _runTextValidator;
|
|
65
|
+
var _props_onValidationChange;
|
|
66
|
+
const message = null != (_runTextValidator = runTextValidator(options.validator, value)) ? _runTextValidator : validateInputText(inputType, value, props.validationPattern, props.validationErrorText, strings);
|
|
67
|
+
setValidation({
|
|
68
|
+
message,
|
|
69
|
+
hasError: props.hasError,
|
|
70
|
+
errorText: props.errorText
|
|
71
|
+
});
|
|
72
|
+
null == (_props_onValidationChange = props.onValidationChange) || _props_onValidationChange.call(props, message);
|
|
73
|
+
return null === message;
|
|
74
|
+
};
|
|
75
|
+
const hasRule = null != options.validator || inputTypeHasValidationRule(inputType, props.validationPattern);
|
|
76
|
+
const dictation = useDictation({
|
|
77
|
+
enabled: true === props.voiceEnabled,
|
|
78
|
+
locale: null != (_props_voiceLocale = props.voiceLocale) ? _props_voiceLocale : null,
|
|
79
|
+
readText: ()=>latestText.current,
|
|
80
|
+
writeText: (value)=>{
|
|
81
|
+
setText(sanitize(value), {
|
|
82
|
+
source: 'dictation'
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
...props.onVoiceListeningStarted ? {
|
|
86
|
+
onListeningStarted: props.onVoiceListeningStarted
|
|
87
|
+
} : {},
|
|
88
|
+
...props.onVoiceListeningEnded ? {
|
|
89
|
+
onListeningEnded: props.onVoiceListeningEnded
|
|
90
|
+
} : {},
|
|
91
|
+
...props.onVoiceFailed ? {
|
|
92
|
+
onFailed: props.onVoiceFailed
|
|
93
|
+
} : {}
|
|
94
|
+
});
|
|
95
|
+
const refiltered = useRef(null);
|
|
96
|
+
useEffect(()=>{
|
|
97
|
+
if (display !== text && refiltered.current !== text) {
|
|
98
|
+
refiltered.current = text;
|
|
99
|
+
setText(display, {
|
|
100
|
+
source: 'programmatic'
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
const retries = useRef(0);
|
|
105
|
+
const sync = ()=>{
|
|
106
|
+
const value = latestText.current;
|
|
107
|
+
if (native.current === value) return;
|
|
108
|
+
if (invokeNode(elementRef, 'setValue', {
|
|
109
|
+
value
|
|
110
|
+
})) {
|
|
111
|
+
native.current = value;
|
|
112
|
+
retries.current = 0;
|
|
113
|
+
} else if (elementRef.current && retries.current < 5) {
|
|
114
|
+
retries.current += 1;
|
|
115
|
+
startTimer(()=>syncRef.current(), 0);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const syncRef = useRef(sync);
|
|
119
|
+
syncRef.current = sync;
|
|
120
|
+
const attach = useRef((node)=>{
|
|
121
|
+
elementRef.current = node;
|
|
122
|
+
if (node) syncRef.current();
|
|
123
|
+
}).current;
|
|
124
|
+
useEffect(()=>{
|
|
125
|
+
sync();
|
|
126
|
+
});
|
|
127
|
+
useEffect(()=>{
|
|
128
|
+
if (!hasValue && passwordVisible) setPasswordVisible(false);
|
|
129
|
+
}, [
|
|
130
|
+
hasValue,
|
|
131
|
+
passwordVisible
|
|
132
|
+
]);
|
|
133
|
+
const validationCurrent = null !== validation && validation.hasError === props.hasError && validation.errorText === props.errorText;
|
|
134
|
+
const hasError = validationCurrent ? null !== validation.message : true === props.hasError;
|
|
135
|
+
const errorText = validationCurrent && null !== validation.message ? validation.message : props.errorText;
|
|
136
|
+
const onInput = (event)=>{
|
|
137
|
+
var _ref;
|
|
138
|
+
var _event_detail, _event_detail1;
|
|
139
|
+
const raw = null != (_ref = null == (_event_detail = event.detail) ? void 0 : _event_detail.value) ? _ref : '';
|
|
140
|
+
native.current = raw;
|
|
141
|
+
if (null == (_event_detail1 = event.detail) ? void 0 : _event_detail1.isComposing) return;
|
|
142
|
+
const clean = sanitize(raw);
|
|
143
|
+
latestText.current = clean;
|
|
144
|
+
setText(clean, {
|
|
145
|
+
source: 'user'
|
|
146
|
+
});
|
|
147
|
+
if (options.validateOnTextChanged) runValidation(clean);
|
|
148
|
+
bump((n)=>n + 1);
|
|
149
|
+
};
|
|
150
|
+
const onFocus = ()=>{
|
|
151
|
+
var _keyboardAware_onInputFocused, _props_onFocus;
|
|
152
|
+
focusedRef.current = true;
|
|
153
|
+
setFocused(true);
|
|
154
|
+
null == (_keyboardAware_onInputFocused = keyboardAware.onInputFocused) || _keyboardAware_onInputFocused.call(keyboardAware);
|
|
155
|
+
if (dictation.listening) dictation.stop();
|
|
156
|
+
null == (_props_onFocus = props.onFocus) || _props_onFocus.call(props);
|
|
157
|
+
};
|
|
158
|
+
const onBlur = ()=>{
|
|
159
|
+
var _keyboardAware_onInputBlurred, _props_onBlur;
|
|
160
|
+
focusedRef.current = false;
|
|
161
|
+
setFocused(false);
|
|
162
|
+
null == (_keyboardAware_onInputBlurred = keyboardAware.onInputBlurred) || _keyboardAware_onInputBlurred.call(keyboardAware);
|
|
163
|
+
if (hasRule && '' !== latestText.current) runValidation(latestText.current);
|
|
164
|
+
null == (_props_onBlur = props.onBlur) || _props_onBlur.call(props);
|
|
165
|
+
};
|
|
166
|
+
const onConfirm = ()=>{
|
|
167
|
+
var _props_onConfirm;
|
|
168
|
+
return null == (_props_onConfirm = props.onConfirm) ? void 0 : _props_onConfirm.call(props, latestText.current);
|
|
169
|
+
};
|
|
170
|
+
const focus = ()=>{
|
|
171
|
+
if (props.disabled) return;
|
|
172
|
+
invokeNode(elementRef, 'focus');
|
|
173
|
+
};
|
|
174
|
+
const blur = ()=>invokeNode(elementRef, 'blur');
|
|
175
|
+
const showMic = options.showMic({
|
|
176
|
+
available: dictation.available,
|
|
177
|
+
listening: dictation.listening,
|
|
178
|
+
hasValue
|
|
179
|
+
});
|
|
180
|
+
const pressMic = ()=>{
|
|
181
|
+
if (!dictation.listening && focusedRef.current) blur();
|
|
182
|
+
dictation.toggle();
|
|
183
|
+
};
|
|
184
|
+
const direction = resolveInputTextDirection(null != (_props_inputTextDirection = props.inputTextDirection) ? _props_inputTextDirection : G9TextInputDirection.MatchParent, inputType, true === options.isPassword, culture.direction);
|
|
185
|
+
const font = props.customFont && '' !== props.customFont.trim() ? props.customFont : 'rtl' === culture.direction ? culture.rtlFontFamily : culture.ltrFontFamily;
|
|
186
|
+
const handle = {
|
|
187
|
+
focus,
|
|
188
|
+
blur,
|
|
189
|
+
validate: ()=>runValidation(latestText.current),
|
|
190
|
+
get isListening () {
|
|
191
|
+
return dictation.listening;
|
|
192
|
+
},
|
|
193
|
+
toggleVoice: ()=>dictation.toggle(),
|
|
194
|
+
startVoice: ()=>dictation.start(),
|
|
195
|
+
stopVoice: ()=>dictation.stop(),
|
|
196
|
+
get element () {
|
|
197
|
+
return elementRef.current;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
return {
|
|
201
|
+
text: display,
|
|
202
|
+
setText,
|
|
203
|
+
hasValue,
|
|
204
|
+
focused,
|
|
205
|
+
hasError,
|
|
206
|
+
errorText,
|
|
207
|
+
passwordVisible,
|
|
208
|
+
setPasswordVisible,
|
|
209
|
+
dictation,
|
|
210
|
+
showMic,
|
|
211
|
+
pressMic,
|
|
212
|
+
focus,
|
|
213
|
+
blur,
|
|
214
|
+
handle,
|
|
215
|
+
inputType,
|
|
216
|
+
elementProps: {
|
|
217
|
+
...g9KeyboardTargetProps,
|
|
218
|
+
ref: attach,
|
|
219
|
+
...props.inputId ? {
|
|
220
|
+
id: props.inputId
|
|
221
|
+
} : {},
|
|
222
|
+
'ignore-focus': true,
|
|
223
|
+
readonly: true === props.readOnly,
|
|
224
|
+
disabled: true === props.disabled,
|
|
225
|
+
maxlength: void 0 !== props.maxLength && props.maxLength > 0 ? props.maxLength : 2147483647,
|
|
226
|
+
bindinput: onInput,
|
|
227
|
+
bindfocus: onFocus,
|
|
228
|
+
bindblur: onBlur,
|
|
229
|
+
bindconfirm: onConfirm
|
|
230
|
+
},
|
|
231
|
+
textDirection: direction,
|
|
232
|
+
font
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
export { invokeNode, invokeNodeWhenReady, resolveInputTextDirection, useTextInput };
|
|
236
|
+
|
|
237
|
+
//# sourceMappingURL=use-text-input.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields/use-text-input.jsx","sources":["../../src/fields/use-text-input.ts"],"sourcesContent":["import { G9InputType, type G9KeyboardType, G9TextInputDirection } from '@g9tm/lynxcontrols-foundation';\nimport { KeyboardAwareTriggerContext } from '@lynx-js/lynx-ui-input';\nimport { useContext, useEffect, useRef, useState } from '@lynx-js/react';\nimport type { NodesRef } from '@lynx-js/types';\nimport { startTimer } from '../base/timers';\nimport { useControllableState } from '../base/use-controllable-state';\nimport { g9KeyboardTargetProps } from '../host/keyboard';\nimport { useG9Culture, useG9Strings } from '../provider/hooks';\nimport {\n decimalSeparatorFor,\n inputTypeHasValidationRule,\n inputTypePrefersLeftToRight,\n sanitizeInputText,\n validateInputText,\n} from './input-policy';\nimport type { G9OutlinedFieldProps } from './outlined-field';\nimport { useDictation } from './use-dictation';\nimport { type G9TextValidator, runTextValidator } from './validator';\n\n/** Where a value change came from (plan/specs/03 §3). */\nexport type G9ValueChangeSource = 'user' | 'dictation' | 'clear' | 'programmatic';\n\n/** Payload of `onValueChange`. */\nexport interface G9ValueChangeDetails {\n readonly source: G9ValueChangeSource;\n}\n\n/** Props the text inputs (`G9TextEntry`, `G9Editor`, `G9SearchEntry`) share on top of the outlined-field props. */\nexport interface G9TextInputProps extends G9OutlinedFieldProps {\n /** The text (controlled; MAUI `Text`). Present, the caller owns it and must apply `onValueChange`. */\n readonly value?: string;\n /** Initial text while uncontrolled. Default `''`. */\n readonly defaultValue?: string;\n /**\n * Once per change of the field's value, with where it came from: `'user'` (typing, paste), `'dictation'`,\n * `'clear'` (the clear button) or `'programmatic'` (the field re-filtered a value it was given, e.g. after an\n * `inputType` change). Never for a value the parent pushed in that needed no filtering.\n */\n readonly onValueChange?: (value: string, details: G9ValueChangeDetails) => void;\n /** On-screen keyboard; used when `inputType` is `'default'` (any other type picks its own). Default `'default'`. */\n readonly keyboardType?: G9KeyboardType;\n /** Semantic input type: keyboard, live filter and blur validation. Default `'default'`. */\n readonly inputType?: G9InputType;\n /** Per-character filter regex (a single character class) for `inputType: 'custom'`. */\n readonly allowedCharsPattern?: string | null;\n /** Blur validation regex for `inputType: 'custom'`. An invalid pattern fails closed. */\n readonly validationPattern?: string | null;\n /** Message for a failed type validation; default the culture's `invalidEmail` / `invalidUrl` / `invalidValue`. */\n readonly validationErrorText?: string | null;\n /** Direction of the entered text; `'matchParent'` (default) pins numbers, phone, email, URL and passwords LTR. */\n readonly inputTextDirection?: G9TextInputDirection;\n /** Font family of the entered text; default the culture's font. */\n readonly customFont?: string | null;\n /** Offer dictation through `services.speech` (hidden without the service or recogniser). Default false. */\n readonly voiceEnabled?: boolean;\n /** Locale to recognise (MAUI `VoiceCulture`); default the active culture. */\n readonly voiceLocale?: string | null;\n readonly onVoiceListeningStarted?: () => void;\n readonly onVoiceListeningEnded?: () => void;\n /** Dictation could not run or finish; a localized message for a toast. */\n readonly onVoiceFailed?: (message: string) => void;\n /** Validation ran (blur, `validateOnTextChanged` or `validate()`): the message, or `null` when valid. */\n readonly onValidationChange?: (message: string | null) => void;\n readonly onFocus?: () => void;\n readonly onBlur?: () => void;\n /** The keyboard's confirm key was pressed. */\n readonly onConfirm?: (value: string) => void;\n /** Element id of the inner `<input>`/`<textarea>`. */\n readonly inputId?: string;\n}\n\n/** Imperative handle of the text inputs (MAUI public methods). */\nexport interface G9TextInputHandle {\n /** Focuses the inner element (raises the keyboard). */\n focus(): void;\n /** Removes focus (hides the keyboard). */\n blur(): void;\n /** Runs the validator and the type rule now; sets or clears the error; `true` when valid (MAUI `Validate`). */\n validate(): boolean;\n /** `true` while dictating (MAUI `IsListening`). */\n readonly isListening: boolean;\n /** MAUI `ToggleVoiceAsync`. */\n toggleVoice(): Promise<void>;\n /** MAUI `StartVoiceAsync`. */\n startVoice(): Promise<void>;\n /** MAUI `StopVoiceAsync`; safe when nothing runs. */\n stopVoice(): Promise<void>;\n /** The inner element's node ref (MAUI `InnerEntry` / `InnerEditor`), for `invoke` calls G9 does not wrap. */\n readonly element: G9NodeRef | null;\n}\n\n/** The Lynx node ref of a field's inner element. */\nexport type G9NodeRef = NodesRef;\n\n/** Lynx input event detail. */\ninterface InputDetail {\n readonly value?: string;\n readonly isComposing?: boolean;\n}\n\n/** Resolves the entered text's direction (MAUI `ResolveInputFlowDirection`). */\nexport function resolveInputTextDirection(\n inputTextDirection: G9TextInputDirection,\n inputType: G9InputType,\n isPassword: boolean,\n cultureDirection: 'ltr' | 'rtl',\n): 'ltr' | 'rtl' {\n if (inputTextDirection === G9TextInputDirection.LeftToRight) return 'ltr';\n if (inputTextDirection === G9TextInputDirection.RightToLeft) return 'rtl';\n if (inputTypePrefersLeftToRight(inputType) || isPassword) return 'ltr';\n return cultureDirection;\n}\n\n/** Calls a UI method on a node; a missing node or a failing call is ignored (the element is gone). */\nexport function invokeNode(\n ref: { current: G9NodeRef | null },\n method: string,\n params?: Record<string, unknown>,\n): boolean {\n const node = ref.current;\n if (!node) return false;\n try {\n node\n .invoke({\n method,\n ...(params ? { params } : {}),\n success: () => {},\n fail: () => {},\n })\n .exec();\n } catch {\n // The element was unmounted between the call and its execution.\n return false;\n }\n return true;\n}\n\n/**\n * {@link invokeNode}, retried on the next ticks (up to `attempts` times) while the element is not created natively\n * yet, e.g. a focus requested during the first commit.\n */\nexport function invokeNodeWhenReady(\n ref: { current: G9NodeRef | null },\n method: string,\n params?: Record<string, unknown>,\n attempts = 5,\n): void {\n if (invokeNode(ref, method, params) || attempts <= 0) return;\n startTimer(() => invokeNodeWhenReady(ref, method, params, attempts - 1), 0);\n}\n\ninterface ValidationResult {\n readonly message: string | null;\n // The external error props this result overrides; new props from the parent win again.\n readonly hasError: boolean | undefined;\n readonly errorText: string | null | undefined;\n}\n\n/** Options of {@link useTextInput}. */\nexport interface G9TextInputCoreOptions {\n /** Name for the controlled/uncontrolled diagnostic, e.g. `'G9TextEntry.value'`. */\n readonly name: string;\n /** Whether the microphone is shown, given the dictation and value state. */\n readonly showMic: (state: { available: boolean; listening: boolean; hasValue: boolean }) => boolean;\n /** Extra validator (`G9TextEntry.validator`; the editor has none). */\n readonly validator?: G9TextValidator | null;\n /** Validate on every change (`G9TextEntry.validateOnTextChanged`). */\n readonly validateOnTextChanged?: boolean;\n /** A password field (its text is pinned LTR). */\n readonly isPassword?: boolean;\n}\n\n/**\n * The state machine behind the text inputs: value ownership, the live filter, the native element sync, focus,\n * validation and dictation. Returns what the input element and the outlined frame need.\n */\nexport function useTextInput(props: G9TextInputProps, options: G9TextInputCoreOptions) {\n const culture = useG9Culture();\n const strings = useG9Strings();\n const keyboardAware = useContext(KeyboardAwareTriggerContext);\n const inputType = props.inputType ?? G9InputType.Default;\n const separator = decimalSeparatorFor(culture.numberingSystem);\n const sanitize = (raw: string) => sanitizeInputText(inputType, raw, props.allowedCharsPattern, separator);\n\n const [text, setText] = useControllableState<string, [G9ValueChangeDetails]>({\n value: props.value,\n defaultValue: props.defaultValue ?? '',\n onChange: props.onValueChange,\n name: options.name,\n });\n const display = sanitize(text);\n const latestText = useRef(display);\n latestText.current = display;\n\n const elementRef = useRef<NodesRef | null>(null);\n const native = useRef('');\n const [focused, setFocused] = useState(false);\n const focusedRef = useRef(false);\n const [passwordVisible, setPasswordVisible] = useState(false);\n const [, bump] = useState(0);\n const [validation, setValidation] = useState<ValidationResult | null>(null);\n const hasValue = display !== '';\n\n const runValidation = (value: string): boolean => {\n const message =\n runTextValidator(options.validator, value) ??\n validateInputText(inputType, value, props.validationPattern, props.validationErrorText, strings);\n setValidation({ message, hasError: props.hasError, errorText: props.errorText });\n props.onValidationChange?.(message);\n return message === null;\n };\n const hasRule = options.validator != null || inputTypeHasValidationRule(inputType, props.validationPattern);\n\n const dictation = useDictation({\n enabled: props.voiceEnabled === true,\n locale: props.voiceLocale ?? null,\n readText: () => latestText.current,\n writeText: (value) => {\n setText(sanitize(value), { source: 'dictation' });\n },\n ...(props.onVoiceListeningStarted ? { onListeningStarted: props.onVoiceListeningStarted } : {}),\n ...(props.onVoiceListeningEnded ? { onListeningEnded: props.onVoiceListeningEnded } : {}),\n ...(props.onVoiceFailed ? { onFailed: props.onVoiceFailed } : {}),\n });\n\n // A value the field was given that its filter rejects is replaced once (MAUI OnTextChanged writes it back).\n const refiltered = useRef<string | null>(null);\n useEffect(() => {\n if (display !== text && refiltered.current !== text) {\n refiltered.current = text;\n setText(display, { source: 'programmatic' });\n }\n });\n\n // Keep the native element showing the field's value (lynx-ui pattern: `invoke('setValue')`). The node ref can\n // attach after the first effect, so attaching syncs too.\n const retries = useRef(0);\n const sync = () => {\n const value = latestText.current;\n if (native.current === value) return;\n if (invokeNode(elementRef, 'setValue', { value })) {\n native.current = value;\n retries.current = 0;\n } else if (elementRef.current && retries.current < 5) {\n // The element is not created natively yet (first commit): try again on the next tick.\n retries.current += 1;\n startTimer(() => syncRef.current(), 0);\n }\n };\n const syncRef = useRef(sync);\n syncRef.current = sync;\n const attach = useRef((node: NodesRef | null) => {\n elementRef.current = node;\n if (node) syncRef.current();\n }).current;\n useEffect(() => {\n sync();\n });\n\n // Clearing the value re-masks a revealed password (MAUI OnTextChanged).\n useEffect(() => {\n if (!hasValue && passwordVisible) setPasswordVisible(false);\n }, [hasValue, passwordVisible]);\n\n // New external error props win over an earlier validation result.\n const validationCurrent =\n validation !== null && validation.hasError === props.hasError && validation.errorText === props.errorText;\n const hasError = validationCurrent ? validation.message !== null : props.hasError === true;\n const errorText = validationCurrent && validation.message !== null ? validation.message : props.errorText;\n\n const onInput = (event: { detail?: InputDetail }) => {\n const raw = event.detail?.value ?? '';\n native.current = raw;\n // IME composition is never interrupted: the composed text is filtered when it is committed.\n if (event.detail?.isComposing) return;\n const clean = sanitize(raw);\n latestText.current = clean;\n setText(clean, { source: 'user' });\n if (options.validateOnTextChanged) runValidation(clean);\n bump((n) => n + 1);\n };\n const onFocus = () => {\n focusedRef.current = true;\n setFocused(true);\n keyboardAware.onInputFocused?.();\n // Tapping the field while dictating means typing: end the session (ADR-0024).\n if (dictation.listening) void dictation.stop();\n props.onFocus?.();\n };\n const onBlur = () => {\n focusedRef.current = false;\n setFocused(false);\n keyboardAware.onInputBlurred?.();\n // Only fields with a rule validate on blur, so an externally set error survives.\n if (hasRule && latestText.current !== '') runValidation(latestText.current);\n props.onBlur?.();\n };\n const onConfirm = () => props.onConfirm?.(latestText.current);\n\n const focus = () => {\n if (props.disabled) return;\n invokeNode(elementRef, 'focus');\n };\n const blur = () => invokeNode(elementRef, 'blur');\n\n const showMic = options.showMic({ available: dictation.available, listening: dictation.listening, hasValue });\n const pressMic = () => {\n // The microphone never focuses the field, and starting takes the keyboard down (ADR-0024).\n if (!dictation.listening && focusedRef.current) blur();\n void dictation.toggle();\n };\n\n const direction = resolveInputTextDirection(\n props.inputTextDirection ?? G9TextInputDirection.MatchParent,\n inputType,\n options.isPassword === true,\n culture.direction,\n );\n const font =\n props.customFont && props.customFont.trim() !== ''\n ? props.customFont\n : culture.direction === 'rtl'\n ? culture.rtlFontFamily\n : culture.ltrFontFamily;\n\n const handle: G9TextInputHandle = {\n focus,\n blur,\n validate: () => runValidation(latestText.current),\n get isListening() {\n return dictation.listening;\n },\n toggleVoice: () => dictation.toggle(),\n startVoice: () => dictation.start(),\n stopVoice: () => dictation.stop(),\n get element() {\n return elementRef.current;\n },\n };\n\n return {\n text: display,\n setText,\n hasValue,\n focused,\n hasError,\n errorText,\n passwordVisible,\n setPasswordVisible,\n dictation,\n showMic,\n pressMic,\n focus,\n blur,\n handle,\n inputType,\n /** Element attributes and handlers shared by `<input>` and `<textarea>`. */\n elementProps: {\n ...g9KeyboardTargetProps,\n ref: attach,\n ...(props.inputId ? { id: props.inputId } : {}),\n 'ignore-focus': true,\n readonly: props.readOnly === true,\n disabled: props.disabled === true,\n maxlength: props.maxLength !== undefined && props.maxLength > 0 ? props.maxLength : 2147483647,\n bindinput: onInput,\n bindfocus: onFocus,\n bindblur: onBlur,\n bindconfirm: onConfirm,\n },\n textDirection: direction,\n font,\n };\n}\n"],"names":["resolveInputTextDirection","inputTextDirection","inputType","isPassword","cultureDirection","G9TextInputDirection","inputTypePrefersLeftToRight","invokeNode","ref","method","params","node","invokeNodeWhenReady","attempts","startTimer","useTextInput","props","options","_props_inputType","_props_defaultValue","_props_voiceLocale","_props_inputTextDirection","culture","useG9Culture","strings","useG9Strings","keyboardAware","useContext","KeyboardAwareTriggerContext","G9InputType","separator","decimalSeparatorFor","sanitize","raw","sanitizeInputText","text","setText","useControllableState","display","latestText","useRef","elementRef","native","focused","setFocused","useState","focusedRef","passwordVisible","setPasswordVisible","bump","validation","setValidation","hasValue","runValidation","value","_runTextValidator","message","validateInputText","hasRule","inputTypeHasValidationRule","dictation","useDictation","refiltered","useEffect","retries","sync","syncRef","attach","validationCurrent","hasError","errorText","onInput","event","_event_detail","_event_detail1","clean","n","onFocus","onBlur","onConfirm","focus","blur","showMic","pressMic","direction","font","handle","g9KeyboardTargetProps","undefined"],"mappings":";;;;;;;;;;AAqGO,SAASA,0BACdC,kBAAwC,EACxCC,SAAsB,EACtBC,UAAmB,EACnBC,gBAA+B;IAE/B,IAAIH,uBAAuBI,qBAAqB,WAAW,EAAE,OAAO;IACpE,IAAIJ,uBAAuBI,qBAAqB,WAAW,EAAE,OAAO;IACpE,IAAIC,4BAA4BJ,cAAcC,YAAY,OAAO;IACjE,OAAOC;AACT;AAGO,SAASG,WACdC,GAAkC,EAClCC,MAAc,EACdC,MAAgC;IAEhC,M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,SAAS,GAAG;YACpF,WAAWuD;YACX,WAAWM;YACX,UAAUC;YACV,aAAaC;QACf;QACA,eAAeK;QACfC;IACF;AACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A field validator (MAUI `IG9TextValidator`): returns the error message for a value, or `null`/`undefined` when it
|
|
3
|
+
* is valid. Either an object with `validate` (MAUI shape) or a plain function.
|
|
4
|
+
*/
|
|
5
|
+
export type G9TextValidator = {
|
|
6
|
+
validate(text: string | null): string | null | undefined;
|
|
7
|
+
} | ((text: string | null) => string | null | undefined);
|
|
8
|
+
/** Runs a {@link G9TextValidator}; a blank message counts as valid (MAUI `string.IsNullOrWhiteSpace`). */
|
|
9
|
+
export declare function runTextValidator(validator: G9TextValidator | null | undefined, text: string | null): string | null;
|
|
10
|
+
/** Validators for common rules, composable with {@link combineValidators}. */
|
|
11
|
+
export declare function requiredValidator(message: string): G9TextValidator;
|
|
12
|
+
/** The first message any validator returns, in order. */
|
|
13
|
+
export declare function combineValidators(...validators: ReadonlyArray<G9TextValidator>): G9TextValidator;
|
|
14
|
+
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/fields/validator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAC5D,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAEzD,0GAA0G;AAC1G,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAIlH;AAED,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAElE;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,GAAG,UAAU,EAAE,aAAa,CAAC,eAAe,CAAC,GAAG,eAAe,CAQhG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function runTextValidator(validator, text) {
|
|
2
|
+
if (!validator) return null;
|
|
3
|
+
const message = 'function' == typeof validator ? validator(text) : validator.validate(text);
|
|
4
|
+
return null == message || '' === message.trim() ? null : message;
|
|
5
|
+
}
|
|
6
|
+
function requiredValidator(message) {
|
|
7
|
+
return (text)=>null == text || '' === text.trim() ? message : null;
|
|
8
|
+
}
|
|
9
|
+
function combineValidators(...validators) {
|
|
10
|
+
return (text)=>{
|
|
11
|
+
for (const validator of validators){
|
|
12
|
+
const message = runTextValidator(validator, text);
|
|
13
|
+
if (message) return message;
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export { combineValidators, requiredValidator, runTextValidator };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=validator.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields/validator.jsx","sources":["../../src/fields/validator.ts"],"sourcesContent":["/**\n * A field validator (MAUI `IG9TextValidator`): returns the error message for a value, or `null`/`undefined` when it\n * is valid. Either an object with `validate` (MAUI shape) or a plain function.\n */\nexport type G9TextValidator =\n | { validate(text: string | null): string | null | undefined }\n | ((text: string | null) => string | null | undefined);\n\n/** Runs a {@link G9TextValidator}; a blank message counts as valid (MAUI `string.IsNullOrWhiteSpace`). */\nexport function runTextValidator(validator: G9TextValidator | null | undefined, text: string | null): string | null {\n if (!validator) return null;\n const message = typeof validator === 'function' ? validator(text) : validator.validate(text);\n return message == null || message.trim() === '' ? null : message;\n}\n\n/** Validators for common rules, composable with {@link combineValidators}. */\nexport function requiredValidator(message: string): G9TextValidator {\n return (text) => (text == null || text.trim() === '' ? message : null);\n}\n\n/** The first message any validator returns, in order. */\nexport function combineValidators(...validators: ReadonlyArray<G9TextValidator>): G9TextValidator {\n return (text) => {\n for (const validator of validators) {\n const message = runTextValidator(validator, text);\n if (message) return message;\n }\n return null;\n };\n}\n"],"names":["runTextValidator","validator","text","message","requiredValidator","combineValidators","validators"],"mappings":"AASO,SAASA,iBAAiBC,SAA6C,EAAEC,IAAmB;IACjG,IAAI,CAACD,WAAW,OAAO;IACvB,MAAME,UAAU,AAAqB,cAArB,OAAOF,YAA2BA,UAAUC,QAAQD,UAAU,QAAQ,CAACC;IACvF,OAAOC,AAAW,QAAXA,WAAmBA,AAAmB,OAAnBA,QAAQ,IAAI,KAAY,OAAOA;AAC3D;AAGO,SAASC,kBAAkBD,OAAe;IAC/C,OAAO,CAACD,OAAUA,AAAQ,QAARA,QAAgBA,AAAgB,OAAhBA,KAAK,IAAI,KAAYC,UAAU;AACnE;AAGO,SAASE,kBAAkB,GAAGC,UAA0C;IAC7E,OAAO,CAACJ;QACN,KAAK,MAAMD,aAAaK,WAAY;YAClC,MAAMH,UAAUH,iBAAiBC,WAAWC;YAC5C,IAAIC,SAAS,OAAOA;QACtB;QACA,OAAO;IACT;AACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type G9Layer } from './layers.js';
|
|
2
|
+
/** What a back handler did: consumed the press, or let the next handler (and finally the app exit) have it. */
|
|
3
|
+
export type G9BackResult = 'handled' | 'pass';
|
|
4
|
+
/**
|
|
5
|
+
* A back handler. `'handled'` (or `true`, MAUI `OnHardwareBackPressed` / `TryHandleInAppBack` returned `bool`)
|
|
6
|
+
* consumes the press; `'pass'` (or `false`) lets it continue.
|
|
7
|
+
*/
|
|
8
|
+
export type G9BackHandler = () => G9BackResult | boolean;
|
|
9
|
+
/** Where a handler sits in the back order. */
|
|
10
|
+
export interface G9BackOptions {
|
|
11
|
+
/**
|
|
12
|
+
* The layer the handler belongs to. Handlers of a higher layer run first (popups before sheets before the page,
|
|
13
|
+
* MAUI's order), then newest first within a layer. Default `'content'` (the page's in-app back).
|
|
14
|
+
*/
|
|
15
|
+
readonly layer?: G9Layer;
|
|
16
|
+
}
|
|
17
|
+
/** The back handlers of one host (plan/specs/01 §5): a LIFO per layer, top layer first. */
|
|
18
|
+
export interface G9BackStack {
|
|
19
|
+
/** Number of registered handlers. */
|
|
20
|
+
readonly size: number;
|
|
21
|
+
/** Registers `handler`; returns its unregister function (idempotent). */
|
|
22
|
+
push(handler: G9BackHandler, options?: G9BackOptions): () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Offers one back press to the handlers in order until one handles it. While the host suppresses back (MAUI
|
|
25
|
+
* `IsHardwareBackSuppressed`) the press is swallowed before any handler runs and reported `'handled'`.
|
|
26
|
+
* A handler that throws is reported to `onHandlerError` and counts as `'handled'`: a broken handler must never turn
|
|
27
|
+
* a back press into leaving the app.
|
|
28
|
+
*/
|
|
29
|
+
dispatch(): G9BackResult;
|
|
30
|
+
/** Drops every handler (host unmount). */
|
|
31
|
+
clear(): void;
|
|
32
|
+
}
|
|
33
|
+
/** Options of {@link createBackStack}. */
|
|
34
|
+
export interface G9BackStackOptions {
|
|
35
|
+
/** Read on every dispatch; `true` swallows the press. */
|
|
36
|
+
readonly isSuppressed?: () => boolean;
|
|
37
|
+
/** Receives an error thrown by a handler. */
|
|
38
|
+
readonly onHandlerError?: (error: unknown) => void;
|
|
39
|
+
}
|
|
40
|
+
/** Creates an empty {@link G9BackStack}. */
|
|
41
|
+
export declare function createBackStack(options?: G9BackStackOptions): G9BackStack;
|
|
42
|
+
//# sourceMappingURL=back.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"back.d.ts","sourceRoot":"","sources":["../../src/host/back.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAa,MAAM,UAAU,CAAC;AAEnD,+GAA+G;AAC/G,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,YAAY,GAAG,OAAO,CAAC;AAEzD,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,2FAA2F;AAC3F,MAAM,WAAW,WAAW;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,IAAI,CAAC;IAClE;;;;;OAKG;IACH,QAAQ,IAAI,YAAY,CAAC;IACzB,0CAA0C;IAC1C,KAAK,IAAI,IAAI,CAAC;CACf;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IACtC,6CAA6C;IAC7C,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD;AAQD,4CAA4C;AAC5C,wBAAgB,eAAe,CAAC,OAAO,GAAE,kBAAuB,GAAG,WAAW,CAmC7E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { layerRank } from "./layers.jsx";
|
|
2
|
+
function createBackStack(options = {}) {
|
|
3
|
+
const entries = new Set();
|
|
4
|
+
let sequence = 0;
|
|
5
|
+
return {
|
|
6
|
+
get size () {
|
|
7
|
+
return entries.size;
|
|
8
|
+
},
|
|
9
|
+
push (handler, pushOptions) {
|
|
10
|
+
var _ref;
|
|
11
|
+
sequence += 1;
|
|
12
|
+
const entry = {
|
|
13
|
+
handler,
|
|
14
|
+
rank: layerRank(null != (_ref = null == pushOptions ? void 0 : pushOptions.layer) ? _ref : 'content'),
|
|
15
|
+
sequence
|
|
16
|
+
};
|
|
17
|
+
entries.add(entry);
|
|
18
|
+
return ()=>{
|
|
19
|
+
entries.delete(entry);
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
dispatch () {
|
|
23
|
+
var _options_isSuppressed;
|
|
24
|
+
if (null == (_options_isSuppressed = options.isSuppressed) ? void 0 : _options_isSuppressed.call(options)) return 'handled';
|
|
25
|
+
const ordered = Array.from(entries).sort((a, b)=>b.rank - a.rank || b.sequence - a.sequence);
|
|
26
|
+
for (const entry of ordered){
|
|
27
|
+
if (!entries.has(entry)) continue;
|
|
28
|
+
let result;
|
|
29
|
+
try {
|
|
30
|
+
result = entry.handler();
|
|
31
|
+
} catch (error) {
|
|
32
|
+
var _options_onHandlerError;
|
|
33
|
+
null == (_options_onHandlerError = options.onHandlerError) || _options_onHandlerError.call(options, error);
|
|
34
|
+
return 'handled';
|
|
35
|
+
}
|
|
36
|
+
if ('handled' === result || true === result) return 'handled';
|
|
37
|
+
}
|
|
38
|
+
return 'pass';
|
|
39
|
+
},
|
|
40
|
+
clear () {
|
|
41
|
+
entries.clear();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export { createBackStack };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=back.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host/back.jsx","sources":["../../src/host/back.ts"],"sourcesContent":["import { type G9Layer, layerRank } from './layers';\n\n/** What a back handler did: consumed the press, or let the next handler (and finally the app exit) have it. */\nexport type G9BackResult = 'handled' | 'pass';\n\n/**\n * A back handler. `'handled'` (or `true`, MAUI `OnHardwareBackPressed` / `TryHandleInAppBack` returned `bool`)\n * consumes the press; `'pass'` (or `false`) lets it continue.\n */\nexport type G9BackHandler = () => G9BackResult | boolean;\n\n/** Where a handler sits in the back order. */\nexport interface G9BackOptions {\n /**\n * The layer the handler belongs to. Handlers of a higher layer run first (popups before sheets before the page,\n * MAUI's order), then newest first within a layer. Default `'content'` (the page's in-app back).\n */\n readonly layer?: G9Layer;\n}\n\n/** The back handlers of one host (plan/specs/01 §5): a LIFO per layer, top layer first. */\nexport interface G9BackStack {\n /** Number of registered handlers. */\n readonly size: number;\n /** Registers `handler`; returns its unregister function (idempotent). */\n push(handler: G9BackHandler, options?: G9BackOptions): () => void;\n /**\n * Offers one back press to the handlers in order until one handles it. While the host suppresses back (MAUI\n * `IsHardwareBackSuppressed`) the press is swallowed before any handler runs and reported `'handled'`.\n * A handler that throws is reported to `onHandlerError` and counts as `'handled'`: a broken handler must never turn\n * a back press into leaving the app.\n */\n dispatch(): G9BackResult;\n /** Drops every handler (host unmount). */\n clear(): void;\n}\n\n/** Options of {@link createBackStack}. */\nexport interface G9BackStackOptions {\n /** Read on every dispatch; `true` swallows the press. */\n readonly isSuppressed?: () => boolean;\n /** Receives an error thrown by a handler. */\n readonly onHandlerError?: (error: unknown) => void;\n}\n\ninterface Entry {\n readonly handler: G9BackHandler;\n readonly rank: number;\n readonly sequence: number;\n}\n\n/** Creates an empty {@link G9BackStack}. */\nexport function createBackStack(options: G9BackStackOptions = {}): G9BackStack {\n const entries = new Set<Entry>();\n let sequence = 0;\n return {\n get size() {\n return entries.size;\n },\n push(handler, pushOptions) {\n sequence += 1;\n const entry: Entry = { handler, rank: layerRank(pushOptions?.layer ?? 'content'), sequence };\n entries.add(entry);\n return () => {\n entries.delete(entry);\n };\n },\n dispatch() {\n if (options.isSuppressed?.()) return 'handled';\n const ordered = Array.from(entries).sort((a, b) => b.rank - a.rank || b.sequence - a.sequence);\n for (const entry of ordered) {\n if (!entries.has(entry)) continue;\n let result: G9BackResult | boolean;\n try {\n result = entry.handler();\n } catch (error) {\n options.onHandlerError?.(error);\n return 'handled';\n }\n if (result === 'handled' || result === true) return 'handled';\n }\n return 'pass';\n },\n clear() {\n entries.clear();\n },\n };\n}\n"],"names":["createBackStack","options","entries","Set","sequence","handler","pushOptions","entry","layerRank","ordered","Array","a","b","result","error"],"mappings":";AAoDO,SAASA,gBAAgBC,UAA8B,CAAC,CAAC;IAC9D,MAAMC,UAAU,IAAIC;IACpB,IAAIC,WAAW;IACf,OAAO;QACL,IAAI;YACF,OAAOF,QAAQ,IAAI;QACrB;QACA,MAAKG,OAAO,EAAEC,WAAW;;YACvBF,YAAY;YACZ,MAAMG,QAAe;gBAAEF;gBAAS,MAAMG,UAAU,QAADA,CAAAA,OAACF,QAAAA,cAAAA,KAAAA,IAAAA,YAAa,KAAK,AAAD,IAAC,OAAI;gBAAYF;YAAS;YAC3FF,QAAQ,GAAG,CAACK;YACZ,OAAO;gBACLL,QAAQ,MAAM,CAACK;YACjB;QACF;QACA;gBACMN;YAAJ,IAAI,QAAAA,CAAAA,wBAAAA,QAAQ,YAAY,AAAD,IAAnBA,KAAAA,IAAAA,sBAAAA,IAAAA,CAAAA,UAA0B,OAAO;YACrC,MAAMQ,UAAUC,MAAM,IAAI,CAACR,SAAS,IAAI,CAAC,CAACS,GAAGC,IAAMA,EAAE,IAAI,GAAGD,EAAE,IAAI,IAAIC,EAAE,QAAQ,GAAGD,EAAE,QAAQ;YAC7F,KAAK,MAAMJ,SAASE,QAAS;gBAC3B,IAAI,CAACP,QAAQ,GAAG,CAACK,QAAQ;gBACzB,IAAIM;gBACJ,IAAI;oBACFA,SAASN,MAAM,OAAO;gBACxB,EAAE,OAAOO,OAAO;wBACdb;4BAAAA,CAAAA,0BAAAA,QAAQ,cAAc,AAAD,KAArBA,wBAAAA,IAAAA,CAAAA,SAAyBa;oBACzB,OAAO;gBACT;gBACA,IAAID,AAAW,cAAXA,UAAwBA,AAAW,SAAXA,QAAiB,OAAO;YACtD;YACA,OAAO;QACT;QACA;YACEX,QAAQ,KAAK;QACf;IACF;AACF"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type G9AbortSignal } from '@g9tm/lynxcontrols-foundation';
|
|
2
|
+
import { type ReactNode } from '@lynx-js/react';
|
|
3
|
+
import type { G9BackHandler } from './back.js';
|
|
4
|
+
import type { G9Layer, G9OverlayLayer } from './layers.js';
|
|
5
|
+
import type { G9HostReadinessSnapshot } from './readiness.js';
|
|
6
|
+
import type { G9HostHandle, G9HostInsets } from './registry.js';
|
|
7
|
+
/** The nearest `G9Host`. Throws `host-missing` outside one. */
|
|
8
|
+
export declare function useG9Host(): G9HostHandle;
|
|
9
|
+
/** Insets of the nearest host (MAUI `TopSafeAreaInset` … `BottomSafeAreaWithTabBar`). Re-renders when they change. */
|
|
10
|
+
export declare function useG9HostInsets(): G9HostInsets;
|
|
11
|
+
/** Readiness of the nearest host, plus `release` (MAUI `ReleasePageLoadingOverlay`) and `whenDismissed`. */
|
|
12
|
+
export interface G9HostReadyState extends G9HostReadinessSnapshot {
|
|
13
|
+
release(): void;
|
|
14
|
+
whenDismissed(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The nearest host's ready state and loading cover (MAUI `ReleasePageLoadingOverlay`, `PageLoadingOverlayDismissed`,
|
|
18
|
+
* `G9ContentViewBase.ReleaseHostPageLoadingOverlay`). A page with `manualRelease` calls `release()` when its first
|
|
19
|
+
* meaningful frame is ready.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useG9HostReady(): G9HostReadyState;
|
|
22
|
+
/** Options of {@link useG9Back}. */
|
|
23
|
+
export interface G9UseBackOptions {
|
|
24
|
+
/** The layer the handler belongs to (overlays pass theirs so they are asked first). Default `'content'`. */
|
|
25
|
+
readonly layer?: G9Layer;
|
|
26
|
+
/** Register only while `true`. Default `true`. */
|
|
27
|
+
readonly enabled?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Registers a back handler on the nearest host while mounted (and enabled). Handlers of higher layers run first, then
|
|
31
|
+
* newest first; returning `'handled'` (or `true`) consumes the press, `'pass'` lets it continue. When nothing handles
|
|
32
|
+
* it, the provider calls `services.host.exit()`. The latest `handler` is always called.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useG9Back(handler: G9BackHandler, options?: G9UseBackOptions): void;
|
|
35
|
+
/** Options of {@link useG9LayerItem}. */
|
|
36
|
+
export interface G9UseLayerItemOptions {
|
|
37
|
+
/** Ordering inside the layer (lower paints below). Default 0. */
|
|
38
|
+
readonly order?: number;
|
|
39
|
+
/** Mount only while `true`. Default `true`. */
|
|
40
|
+
readonly enabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Mounts `element` into an overlay layer of the nearest host while the calling component is mounted (and enabled),
|
|
44
|
+
* keeping it in step with `element`. The key must be unique within the layer.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useG9LayerItem(layer: G9OverlayLayer, key: string, element: ReactNode, options?: G9UseLayerItemOptions): void;
|
|
47
|
+
/** Inputs of {@link useG9Activation} (MAUI `G9ContentViewBase`). */
|
|
48
|
+
export interface G9ActivationOptions {
|
|
49
|
+
/** Whether this view is the active one (MAUI `Activate` / `Deactivate`, driven by the hosting page). */
|
|
50
|
+
readonly active: boolean;
|
|
51
|
+
/** First activation only (MAUI `OnFirstActivatedAsync`): heavy one-shot setup. */
|
|
52
|
+
readonly onFirstActivated?: (context: {
|
|
53
|
+
readonly signal: G9AbortSignal;
|
|
54
|
+
}) => void | Promise<void>;
|
|
55
|
+
/** Every activation, after the first-activation work (MAUI `OnActivatedAsync`). */
|
|
56
|
+
readonly onActivated?: (context: {
|
|
57
|
+
readonly signal: G9AbortSignal;
|
|
58
|
+
}) => void | Promise<void>;
|
|
59
|
+
/** Every deactivation, after the activation signal was aborted (MAUI `OnDeactivated`). */
|
|
60
|
+
readonly onDeactivated?: () => void;
|
|
61
|
+
/** Ask the app to pause background work while active (MAUI `SuppressesBackgroundWork`). Default `false`. */
|
|
62
|
+
readonly suppressesBackgroundWork?: boolean;
|
|
63
|
+
/** Back handling while active (MAUI `OnHardwareBackPressed`); asked after overlays. */
|
|
64
|
+
readonly onBack?: G9BackHandler;
|
|
65
|
+
/** Names the view in diagnostics. Default `'G9ActivatedView'`. */
|
|
66
|
+
readonly name?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Activation lifecycle of a view kept alive across tab switches (MAUI `G9ContentViewBase`): a fresh abort signal per
|
|
70
|
+
* activation (aborted on deactivation and unmount), first-activation and every-activation work run through the
|
|
71
|
+
* provider's safe executor, the app's background-work pause held while active
|
|
72
|
+
* (`settings.backgroundWorkSuppression`), and back handling while active. Unmounting while active deactivates too
|
|
73
|
+
* (MAUI handler teardown: signal aborted, pause released, `onDeactivated` called). Returns whether the view is active.
|
|
74
|
+
*/
|
|
75
|
+
export declare function useG9Activation(options: G9ActivationOptions): {
|
|
76
|
+
readonly active: boolean;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Holds Android's pan soft-input mode while `enabled` (MAUI `G9KeyboardHelper.UseAndroidPanSoftInputMode` scoped to
|
|
80
|
+
* a sheet or page); restores on disable and unmount.
|
|
81
|
+
*/
|
|
82
|
+
export declare function useG9PanSoftInputMode(enabled?: boolean): void;
|
|
83
|
+
/** The keyboard dismiss path (MAUI `G9KeyboardHelper.HideKeyboardAndClearFocus`): `services.host.hideKeyboard`. */
|
|
84
|
+
export declare function useG9HideKeyboard(): () => void;
|
|
85
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/host/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAAiE,MAAM,gBAAgB,CAAC;AAG/G,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,QAAQ,CAAC;AAG1D,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM7D,+DAA+D;AAC/D,wBAAgB,SAAS,IAAI,YAAY,CAIxC;AAED,sHAAsH;AAC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