@g9tm/lynxcontrols 1.7.2 → 2.1.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 +12 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/anchor/context.jsx +0 -2
- package/dist/anchor/hooks.d.ts.map +1 -1
- package/dist/anchor/hooks.jsx +6 -4
- package/dist/anchor/measure.jsx +0 -2
- package/dist/anchor/registry.d.ts +12 -2
- package/dist/anchor/registry.d.ts.map +1 -1
- package/dist/anchor/registry.jsx +11 -3
- package/dist/anchor/scroll.jsx +0 -2
- package/dist/base/control.d.ts +18 -2
- package/dist/base/control.d.ts.map +1 -1
- package/dist/base/control.jsx +16 -9
- package/dist/base/corner-badge.jsx +0 -2
- package/dist/base/disposer.jsx +0 -2
- package/dist/base/index.d.ts +3 -2
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.jsx +3 -2
- package/dist/base/press.css +83 -0
- package/dist/base/press.css.map +1 -0
- package/dist/base/press.d.ts +13 -2
- package/dist/base/press.d.ts.map +1 -1
- package/dist/base/press.jsx +49 -5
- package/dist/base/pressable.d.ts +10 -1
- package/dist/base/pressable.d.ts.map +1 -1
- package/dist/base/pressable.jsx +13 -8
- package/dist/base/selection-item.jsx +0 -2
- package/dist/base/timers.jsx +0 -2
- package/dist/base/tone.d.ts +15 -0
- package/dist/base/tone.d.ts.map +1 -0
- package/dist/base/tone.jsx +71 -0
- package/dist/base/use-controllable-state.jsx +0 -2
- package/dist/base/use-stable-callback.jsx +0 -2
- package/dist/button/button-variants.css +236 -0
- package/dist/button/button-variants.css.map +1 -0
- package/dist/button/button.css +21 -0
- package/dist/button/button.css.map +1 -1
- package/dist/button/button.d.ts +13 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.jsx +51 -38
- package/dist/button/header-action-button.d.ts +1 -0
- package/dist/button/header-action-button.d.ts.map +1 -1
- package/dist/button/header-action-button.jsx +6 -7
- package/dist/button/icon-button.d.ts +11 -1
- package/dist/button/icon-button.d.ts.map +1 -1
- package/dist/button/icon-button.jsx +21 -17
- package/dist/button/nav-card.d.ts +1 -0
- package/dist/button/nav-card.d.ts.map +1 -1
- package/dist/button/nav-card.jsx +6 -7
- package/dist/button/safe-tap.jsx +0 -2
- package/dist/button/safe.jsx +3 -5
- package/dist/button/variant-css.d.ts +8 -0
- package/dist/button/variant-css.d.ts.map +1 -0
- package/dist/button/variant-css.jsx +47 -0
- package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
- package/dist/button/vertical-icon-text-button.jsx +1 -3
- package/dist/button/visuals.d.ts +7 -1
- package/dist/button/visuals.d.ts.map +1 -1
- package/dist/button/visuals.jsx +5 -5
- package/dist/cascade/cascade-panel.jsx +0 -2
- package/dist/cascade/model.jsx +0 -2
- package/dist/commands/commands.css +167 -0
- package/dist/commands/commands.css.map +1 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.jsx +2 -0
- package/dist/commands/keys.d.ts +22 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.jsx +119 -0
- package/dist/commands/palette.d.ts +62 -0
- package/dist/commands/palette.d.ts.map +1 -0
- package/dist/commands/palette.jsx +175 -0
- package/dist/deferred/deferred-content.jsx +2 -4
- package/dist/deferred/readiness-signal.jsx +0 -2
- package/dist/display/activity-indicator.jsx +0 -2
- package/dist/display/culture-date-time-label.jsx +1 -3
- package/dist/display/extras.css +117 -0
- package/dist/display/extras.css.map +1 -0
- package/dist/display/extras.d.ts +65 -0
- package/dist/display/extras.d.ts.map +1 -0
- package/dist/display/extras.jsx +118 -0
- package/dist/display/figures-index.d.ts +3 -0
- package/dist/display/figures-index.d.ts.map +1 -0
- package/dist/display/figures-index.jsx +2 -0
- package/dist/display/figures.css +249 -0
- package/dist/display/figures.css.map +1 -0
- package/dist/display/figures.d.ts +132 -0
- package/dist/display/figures.d.ts.map +1 -0
- package/dist/display/figures.jsx +223 -0
- package/dist/display/image.css +46 -0
- package/dist/display/image.css.map +1 -0
- package/dist/display/image.d.ts +32 -0
- package/dist/display/image.d.ts.map +1 -0
- package/dist/display/image.jsx +49 -0
- package/dist/display/index.d.ts +6 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.jsx +6 -0
- package/dist/display/keycap.css +32 -0
- package/dist/display/keycap.css.map +1 -0
- package/dist/display/keycap.d.ts +20 -0
- package/dist/display/keycap.d.ts.map +1 -0
- package/dist/display/keycap.jsx +17 -0
- package/dist/display/motion-figures.css +168 -0
- package/dist/display/motion-figures.css.map +1 -0
- package/dist/display/motion-figures.d.ts +155 -0
- package/dist/display/motion-figures.d.ts.map +1 -0
- package/dist/display/motion-figures.jsx +246 -0
- package/dist/display/progress-bar.jsx +1 -3
- package/dist/display/separator.d.ts.map +1 -1
- package/dist/display/separator.jsx +2 -4
- package/dist/display/shimmer.jsx +0 -2
- package/dist/display/skeleton.css +72 -0
- package/dist/display/skeleton.css.map +1 -0
- package/dist/display/status.css +111 -0
- package/dist/display/status.css.map +1 -0
- package/dist/display/status.d.ts +67 -0
- package/dist/display/status.d.ts.map +1 -0
- package/dist/display/status.jsx +117 -0
- package/dist/display/theme-preview.css +244 -0
- package/dist/display/theme-preview.css.map +1 -0
- package/dist/display/theme-preview.d.ts +19 -0
- package/dist/display/theme-preview.d.ts.map +1 -0
- package/dist/display/theme-preview.jsx +89 -0
- package/dist/display/title-with-line.d.ts.map +1 -1
- package/dist/display/title-with-line.jsx +2 -4
- package/dist/edge-panel/edge-panel.jsx +0 -2
- package/dist/edge-panel/helper.jsx +0 -2
- package/dist/edge-panel/types.jsx +0 -2
- package/dist/effects/effects.css +94 -0
- package/dist/effects/effects.css.map +1 -0
- package/dist/effects/effects.d.ts +83 -0
- package/dist/effects/effects.d.ts.map +1 -0
- package/dist/effects/effects.jsx +183 -0
- package/dist/effects/index.d.ts +2 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.jsx +1 -0
- package/dist/expander/expander.d.ts +1 -0
- package/dist/expander/expander.d.ts.map +1 -1
- package/dist/expander/expander.jsx +22 -23
- package/dist/fields/dictation.jsx +0 -2
- package/dist/fields/editor.d.ts.map +1 -1
- package/dist/fields/editor.jsx +5 -6
- package/dist/fields/extra-entries.css +133 -0
- package/dist/fields/extra-entries.css.map +1 -0
- package/dist/fields/extra-entries.d.ts +98 -0
- package/dist/fields/extra-entries.d.ts.map +1 -0
- package/dist/fields/extra-entries.jsx +323 -0
- package/dist/fields/fields.css +4 -0
- package/dist/fields/fields.css.map +1 -1
- package/dist/fields/index.d.ts +4 -3
- package/dist/fields/index.d.ts.map +1 -1
- package/dist/fields/index.jsx +1 -0
- package/dist/fields/input-policy.jsx +0 -2
- package/dist/fields/notch.jsx +0 -2
- package/dist/fields/outlined-field.d.ts +14 -0
- package/dist/fields/outlined-field.d.ts.map +1 -1
- package/dist/fields/outlined-field.jsx +12 -10
- package/dist/fields/pin-entry.d.ts.map +1 -1
- package/dist/fields/pin-entry.jsx +11 -13
- package/dist/fields/search-entry.jsx +2 -4
- package/dist/fields/slot-layout.jsx +0 -2
- package/dist/fields/text-entry.jsx +2 -4
- package/dist/fields/use-dictation.jsx +0 -2
- package/dist/fields/use-text-input.d.ts +1 -1
- package/dist/fields/use-text-input.jsx +0 -2
- package/dist/fields/validator.jsx +0 -2
- package/dist/guide/confirm-sheet.jsx +0 -2
- package/dist/guide/journey.jsx +0 -2
- package/dist/guide/placement.jsx +0 -2
- package/dist/guide/service.jsx +0 -2
- package/dist/guide/settings.jsx +0 -2
- package/dist/header/app-bar.d.ts +35 -0
- package/dist/header/app-bar.d.ts.map +1 -0
- package/dist/header/app-bar.jsx +64 -0
- package/dist/header/header.css +79 -0
- package/dist/header/header.css.map +1 -0
- package/dist/header/index.d.ts +2 -0
- package/dist/header/index.d.ts.map +1 -0
- package/dist/header/index.jsx +1 -0
- package/dist/host/back.jsx +0 -2
- package/dist/host/hooks.jsx +0 -2
- package/dist/host/host.css +1 -0
- package/dist/host/host.css.map +1 -1
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.jsx +50 -17
- package/dist/host/keyboard.jsx +0 -2
- package/dist/host/layers.jsx +0 -2
- package/dist/host/page-loading-overlay.jsx +0 -2
- package/dist/host/readiness.jsx +0 -2
- package/dist/host/registry.d.ts +9 -0
- package/dist/host/registry.d.ts.map +1 -1
- package/dist/host/registry.jsx +0 -2
- package/dist/icon/icon.d.ts +16 -0
- package/dist/icon/icon.d.ts.map +1 -1
- package/dist/icon/icon.jsx +53 -14
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.d.ts.map +1 -1
- package/dist/icon/index.jsx +1 -1
- package/dist/icon/slot.jsx +0 -2
- package/dist/icon/swatch.jsx +0 -2
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/containers.d.ts +113 -0
- package/dist/layout/containers.d.ts.map +1 -0
- package/dist/layout/containers.jsx +195 -0
- package/dist/layout/index.d.ts +4 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.jsx +3 -0
- package/dist/layout/layout.css +361 -0
- package/dist/layout/layout.css.map +1 -0
- package/dist/layout/scroll-spy.d.ts +18 -0
- package/dist/layout/scroll-spy.d.ts.map +1 -0
- package/dist/layout/scroll-spy.jsx +38 -0
- package/dist/layout/scrollers.d.ts +96 -0
- package/dist/layout/scrollers.d.ts.map +1 -0
- package/dist/layout/scrollers.jsx +208 -0
- package/dist/list/gestures.d.ts +40 -0
- package/dist/list/gestures.d.ts.map +1 -0
- package/dist/list/gestures.jsx +142 -0
- package/dist/list/index.d.ts +4 -0
- package/dist/list/index.d.ts.map +1 -0
- package/dist/list/index.jsx +3 -0
- package/dist/list/list.css +194 -0
- package/dist/list/list.css.map +1 -0
- package/dist/list/rows.d.ts +69 -0
- package/dist/list/rows.d.ts.map +1 -0
- package/dist/list/rows.jsx +105 -0
- package/dist/list/virtual-list.d.ts +94 -0
- package/dist/list/virtual-list.d.ts.map +1 -0
- package/dist/list/virtual-list.jsx +159 -0
- package/dist/orb/hold-button.d.ts +26 -0
- package/dist/orb/hold-button.d.ts.map +1 -0
- package/dist/orb/hold-button.jsx +33 -0
- package/dist/orb/hold.d.ts +36 -0
- package/dist/orb/hold.d.ts.map +1 -0
- package/dist/orb/hold.jsx +76 -0
- package/dist/orb/index.d.ts +5 -0
- package/dist/orb/index.d.ts.map +1 -0
- package/dist/orb/index.jsx +4 -0
- package/dist/orb/model.d.ts +42 -0
- package/dist/orb/model.d.ts.map +1 -0
- package/dist/orb/model.jsx +42 -0
- package/dist/orb/orb.css +81 -0
- package/dist/orb/orb.css.map +1 -0
- package/dist/orb/orb.d.ts +61 -0
- package/dist/orb/orb.d.ts.map +1 -0
- package/dist/orb/orb.jsx +171 -0
- package/dist/pickers/combo-box.jsx +0 -2
- package/dist/pickers/date-time-picker.jsx +0 -2
- package/dist/pickers/date-time.jsx +0 -2
- package/dist/pickers/day-stepper.css +43 -0
- package/dist/pickers/day-stepper.css.map +1 -0
- package/dist/pickers/day-stepper.d.ts +31 -0
- package/dist/pickers/day-stepper.d.ts.map +1 -0
- package/dist/pickers/day-stepper.jsx +60 -0
- package/dist/pickers/index.d.ts +1 -0
- package/dist/pickers/index.d.ts.map +1 -1
- package/dist/pickers/index.jsx +1 -0
- package/dist/pickers/picker-sheet.jsx +0 -2
- package/dist/pickers/picker.d.ts +11 -0
- package/dist/pickers/picker.d.ts.map +1 -1
- package/dist/pickers/picker.jsx +53 -9
- package/dist/pickers/timespan-picker.jsx +0 -2
- package/dist/pickers/timespan.jsx +0 -2
- package/dist/pickers/trigger.jsx +0 -2
- package/dist/pickers/wheel-column.jsx +0 -2
- package/dist/plus-button/model.jsx +0 -2
- package/dist/plus-button/plus-button.jsx +0 -2
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.d.ts.map +1 -0
- package/dist/popover/index.jsx +2 -0
- package/dist/popover/popover.css +183 -0
- package/dist/popover/popover.css.map +1 -0
- package/dist/popover/popover.d.ts +139 -0
- package/dist/popover/popover.d.ts.map +1 -0
- package/dist/popover/popover.jsx +291 -0
- package/dist/popover/position.d.ts +35 -0
- package/dist/popover/position.d.ts.map +1 -0
- package/dist/popover/position.jsx +53 -0
- package/dist/popup/frame.jsx +0 -2
- package/dist/popup/input-form.jsx +0 -2
- package/dist/popup/input.jsx +0 -2
- package/dist/popup/popup-view.jsx +0 -2
- package/dist/popup/queue.jsx +0 -2
- package/dist/popup/service.jsx +0 -2
- package/dist/popup/types.jsx +0 -2
- package/dist/provider/activity.d.ts +13 -0
- package/dist/provider/activity.d.ts.map +1 -0
- package/dist/provider/activity.jsx +55 -0
- package/dist/provider/contexts.d.ts +32 -1
- package/dist/provider/contexts.d.ts.map +1 -1
- package/dist/provider/contexts.jsx +7 -3
- package/dist/provider/global-events.jsx +0 -2
- package/dist/provider/hooks.d.ts +16 -2
- package/dist/provider/hooks.d.ts.map +1 -1
- package/dist/provider/hooks.jsx +35 -7
- package/dist/provider/index.d.ts +4 -2
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.jsx +3 -1
- package/dist/provider/keep-alive.css +19 -0
- package/dist/provider/keep-alive.css.map +1 -0
- package/dist/provider/keep-alive.d.ts +23 -0
- package/dist/provider/keep-alive.d.ts.map +1 -0
- package/dist/provider/keep-alive.jsx +9 -0
- package/dist/provider/provider.css +1 -1
- package/dist/provider/provider.css.map +1 -1
- package/dist/provider/provider.d.ts +13 -1
- package/dist/provider/provider.d.ts.map +1 -1
- package/dist/provider/provider.jsx +128 -15
- package/dist/provider/settings.d.ts +23 -0
- package/dist/provider/settings.d.ts.map +1 -1
- package/dist/provider/settings.jsx +5 -4
- package/dist/provider/theme-css.d.ts +1 -1
- package/dist/provider/theme-css.d.ts.map +1 -1
- package/dist/provider/theme-css.jsx +21 -10
- package/dist/provider/theme-root.d.ts.map +1 -1
- package/dist/provider/theme-root.jsx +7 -5
- package/dist/provider/theme.css +72 -0
- package/dist/provider/theme.css.map +1 -1
- package/dist/range-slider/index.d.ts +1 -0
- package/dist/range-slider/index.d.ts.map +1 -1
- package/dist/range-slider/index.jsx +1 -0
- package/dist/range-slider/math.jsx +0 -2
- package/dist/range-slider/range-slider.css +82 -0
- package/dist/range-slider/range-slider.css.map +1 -1
- package/dist/range-slider/range-slider.jsx +0 -2
- package/dist/range-slider/step-slider.d.ts +18 -0
- package/dist/range-slider/step-slider.d.ts.map +1 -0
- package/dist/range-slider/step-slider.jsx +55 -0
- package/dist/route/hooks.jsx +0 -2
- package/dist/route/router.jsx +0 -2
- package/dist/selection/model.jsx +0 -2
- package/dist/selection/selection-sheet.jsx +0 -2
- package/dist/selection/use-selection-model.jsx +0 -2
- package/dist/selection/window.jsx +0 -2
- package/dist/sheet/backdrop-scope.d.ts +14 -0
- package/dist/sheet/backdrop-scope.d.ts.map +1 -0
- package/dist/sheet/backdrop-scope.jsx +25 -0
- package/dist/sheet/context.d.ts +22 -0
- package/dist/sheet/context.d.ts.map +1 -0
- package/dist/sheet/context.jsx +7 -0
- package/dist/sheet/frame.d.ts +2 -17
- package/dist/sheet/frame.d.ts.map +1 -1
- package/dist/sheet/frame.jsx +23 -19
- package/dist/sheet/gesture.jsx +1 -3
- package/dist/sheet/handoff.jsx +0 -2
- package/dist/sheet/header.jsx +3 -3
- package/dist/sheet/height-memo.jsx +0 -2
- package/dist/sheet/index.d.ts +2 -0
- package/dist/sheet/index.d.ts.map +1 -1
- package/dist/sheet/index.jsx +2 -0
- package/dist/sheet/loadable.jsx +0 -2
- package/dist/sheet/motion.jsx +0 -2
- package/dist/sheet/options.d.ts +17 -0
- package/dist/sheet/options.d.ts.map +1 -1
- package/dist/sheet/options.jsx +2 -3
- package/dist/sheet/panel-frame.css +204 -0
- package/dist/sheet/panel-frame.css.map +1 -0
- package/dist/sheet/panel-frame.d.ts +16 -0
- package/dist/sheet/panel-frame.d.ts.map +1 -0
- package/dist/sheet/panel-frame.jsx +103 -0
- package/dist/sheet/processing.jsx +0 -2
- package/dist/sheet/scroll-indicator.jsx +0 -2
- package/dist/sheet/scroll-region.d.ts +19 -0
- package/dist/sheet/scroll-region.d.ts.map +1 -0
- package/dist/sheet/scroll-region.jsx +58 -0
- package/dist/sheet/service.d.ts.map +1 -1
- package/dist/sheet/service.jsx +23 -9
- package/dist/sheet/sheet.css +33 -0
- package/dist/sheet/sheet.css.map +1 -1
- package/dist/sheet/sheet.jsx +0 -2
- package/dist/sheet/sizing.d.ts +3 -3
- package/dist/sheet/sizing.jsx +0 -2
- package/dist/sheet/stack.jsx +0 -2
- package/dist/shell/index.d.ts +2 -0
- package/dist/shell/index.d.ts.map +1 -0
- package/dist/shell/index.jsx +1 -0
- package/dist/shell/shell.css +342 -0
- package/dist/shell/shell.css.map +1 -0
- package/dist/shell/shell.d.ts +121 -0
- package/dist/shell/shell.d.ts.map +1 -0
- package/dist/shell/shell.jsx +214 -0
- package/dist/survey/index.d.ts +2 -0
- package/dist/survey/index.d.ts.map +1 -0
- package/dist/survey/index.jsx +1 -0
- package/dist/survey/survey.css +204 -0
- package/dist/survey/survey.css.map +1 -0
- package/dist/survey/survey.d.ts +76 -0
- package/dist/survey/survey.d.ts.map +1 -0
- package/dist/survey/survey.jsx +205 -0
- package/dist/swipe/model.jsx +0 -2
- package/dist/swipe/swipe-view.jsx +0 -2
- package/dist/tab-bar/metrics.jsx +20 -22
- package/dist/tab-bar/model.d.ts +2 -0
- package/dist/tab-bar/model.d.ts.map +1 -1
- package/dist/tab-bar/model.jsx +10 -6
- package/dist/tab-bar/tab-bar.css +74 -0
- package/dist/tab-bar/tab-bar.css.map +1 -1
- package/dist/tab-bar/tab-bar.d.ts +7 -0
- package/dist/tab-bar/tab-bar.d.ts.map +1 -1
- package/dist/tab-bar/tab-bar.jsx +51 -17
- package/dist/tabs/model.jsx +0 -2
- package/dist/tabs/tab-view.d.ts +1 -0
- package/dist/tabs/tab-view.d.ts.map +1 -1
- package/dist/tabs/tab-view.jsx +6 -5
- package/dist/tabs/tabs.css +1 -0
- package/dist/tabs/tabs.css.map +1 -1
- package/dist/toast/service.d.ts.map +1 -1
- package/dist/toast/service.jsx +34 -16
- package/dist/toast/store.jsx +0 -2
- package/dist/toggle/checkbox-math.jsx +0 -2
- package/dist/toggle/checkbox.d.ts.map +1 -1
- package/dist/toggle/checkbox.jsx +10 -12
- package/dist/toggle/chip-group.d.ts.map +1 -1
- package/dist/toggle/chip-group.jsx +8 -7
- package/dist/toggle/choice.css +254 -0
- package/dist/toggle/choice.css.map +1 -0
- package/dist/toggle/choice.d.ts +125 -0
- package/dist/toggle/choice.d.ts.map +1 -0
- package/dist/toggle/choice.jsx +367 -0
- package/dist/toggle/index.d.ts +2 -1
- package/dist/toggle/index.d.ts.map +1 -1
- package/dist/toggle/index.jsx +1 -0
- package/dist/toggle/switch.d.ts.map +1 -1
- package/dist/toggle/switch.jsx +8 -11
- package/package.json +126 -16
- package/tailwind/index.d.ts +13 -0
- package/tailwind/index.mjs +87 -0
- package/tailwind/index.test.mjs +24 -0
- package/tailwind/tokens.mjs +98 -0
- package/dist/anchor/context.jsx.map +0 -1
- package/dist/anchor/hooks.jsx.map +0 -1
- package/dist/anchor/measure.jsx.map +0 -1
- package/dist/anchor/registry.jsx.map +0 -1
- package/dist/anchor/scroll.jsx.map +0 -1
- package/dist/base/control.jsx.map +0 -1
- package/dist/base/corner-badge.jsx.map +0 -1
- package/dist/base/disposer.jsx.map +0 -1
- package/dist/base/press.jsx.map +0 -1
- package/dist/base/pressable.jsx.map +0 -1
- package/dist/base/selection-item.jsx.map +0 -1
- package/dist/base/timers.jsx.map +0 -1
- package/dist/base/use-controllable-state.jsx.map +0 -1
- package/dist/base/use-stable-callback.jsx.map +0 -1
- package/dist/button/button.jsx.map +0 -1
- package/dist/button/header-action-button.jsx.map +0 -1
- package/dist/button/icon-button.jsx.map +0 -1
- package/dist/button/nav-card.jsx.map +0 -1
- package/dist/button/safe-tap.jsx.map +0 -1
- package/dist/button/safe.jsx.map +0 -1
- package/dist/button/vertical-icon-text-button.jsx.map +0 -1
- package/dist/button/visuals.jsx.map +0 -1
- package/dist/cascade/cascade-panel.jsx.map +0 -1
- package/dist/cascade/model.jsx.map +0 -1
- package/dist/deferred/deferred-content.jsx.map +0 -1
- package/dist/deferred/readiness-signal.jsx.map +0 -1
- package/dist/display/activity-indicator.jsx.map +0 -1
- package/dist/display/culture-date-time-label.jsx.map +0 -1
- package/dist/display/progress-bar.jsx.map +0 -1
- package/dist/display/separator.jsx.map +0 -1
- package/dist/display/shimmer.jsx.map +0 -1
- package/dist/display/title-with-line.jsx.map +0 -1
- package/dist/edge-panel/edge-panel.jsx.map +0 -1
- package/dist/edge-panel/helper.jsx.map +0 -1
- package/dist/edge-panel/types.jsx.map +0 -1
- package/dist/expander/expander.jsx.map +0 -1
- package/dist/fields/dictation.jsx.map +0 -1
- package/dist/fields/editor.jsx.map +0 -1
- package/dist/fields/input-policy.jsx.map +0 -1
- package/dist/fields/notch.jsx.map +0 -1
- package/dist/fields/outlined-field.jsx.map +0 -1
- package/dist/fields/pin-entry.jsx.map +0 -1
- package/dist/fields/search-entry.jsx.map +0 -1
- package/dist/fields/slot-layout.jsx.map +0 -1
- package/dist/fields/text-entry.jsx.map +0 -1
- package/dist/fields/use-dictation.jsx.map +0 -1
- package/dist/fields/use-text-input.jsx.map +0 -1
- package/dist/fields/validator.jsx.map +0 -1
- package/dist/guide/confirm-sheet.jsx.map +0 -1
- package/dist/guide/journey.jsx.map +0 -1
- package/dist/guide/placement.jsx.map +0 -1
- package/dist/guide/service.jsx.map +0 -1
- package/dist/guide/settings.jsx.map +0 -1
- package/dist/host/back.jsx.map +0 -1
- package/dist/host/hooks.jsx.map +0 -1
- package/dist/host/host.jsx.map +0 -1
- package/dist/host/keyboard.jsx.map +0 -1
- package/dist/host/layers.jsx.map +0 -1
- package/dist/host/page-loading-overlay.jsx.map +0 -1
- package/dist/host/readiness.jsx.map +0 -1
- package/dist/host/registry.jsx.map +0 -1
- package/dist/icon/icon.jsx.map +0 -1
- package/dist/icon/slot.jsx.map +0 -1
- package/dist/icon/swatch.jsx.map +0 -1
- package/dist/pickers/combo-box.jsx.map +0 -1
- package/dist/pickers/date-time-picker.jsx.map +0 -1
- package/dist/pickers/date-time.jsx.map +0 -1
- package/dist/pickers/picker-sheet.jsx.map +0 -1
- package/dist/pickers/picker.jsx.map +0 -1
- package/dist/pickers/timespan-picker.jsx.map +0 -1
- package/dist/pickers/timespan.jsx.map +0 -1
- package/dist/pickers/trigger.jsx.map +0 -1
- package/dist/pickers/wheel-column.jsx.map +0 -1
- package/dist/plus-button/model.jsx.map +0 -1
- package/dist/plus-button/plus-button.jsx.map +0 -1
- package/dist/popup/frame.jsx.map +0 -1
- package/dist/popup/input-form.jsx.map +0 -1
- package/dist/popup/input.jsx.map +0 -1
- package/dist/popup/popup-view.jsx.map +0 -1
- package/dist/popup/queue.jsx.map +0 -1
- package/dist/popup/service.jsx.map +0 -1
- package/dist/popup/types.jsx.map +0 -1
- package/dist/provider/contexts.jsx.map +0 -1
- package/dist/provider/global-events.jsx.map +0 -1
- package/dist/provider/hooks.jsx.map +0 -1
- package/dist/provider/provider.jsx.map +0 -1
- package/dist/provider/settings.jsx.map +0 -1
- package/dist/provider/theme-css.jsx.map +0 -1
- package/dist/provider/theme-root.jsx.map +0 -1
- package/dist/range-slider/math.jsx.map +0 -1
- package/dist/range-slider/range-slider.jsx.map +0 -1
- package/dist/route/hooks.jsx.map +0 -1
- package/dist/route/router.jsx.map +0 -1
- package/dist/selection/model.jsx.map +0 -1
- package/dist/selection/selection-sheet.jsx.map +0 -1
- package/dist/selection/use-selection-model.jsx.map +0 -1
- package/dist/selection/window.jsx.map +0 -1
- package/dist/sheet/frame.jsx.map +0 -1
- package/dist/sheet/gesture.jsx.map +0 -1
- package/dist/sheet/handoff.jsx.map +0 -1
- package/dist/sheet/header.jsx.map +0 -1
- package/dist/sheet/height-memo.jsx.map +0 -1
- package/dist/sheet/loadable.jsx.map +0 -1
- package/dist/sheet/motion.jsx.map +0 -1
- package/dist/sheet/options.jsx.map +0 -1
- package/dist/sheet/processing.jsx.map +0 -1
- package/dist/sheet/scroll-indicator.jsx.map +0 -1
- package/dist/sheet/service.jsx.map +0 -1
- package/dist/sheet/sheet.jsx.map +0 -1
- package/dist/sheet/sizing.jsx.map +0 -1
- package/dist/sheet/stack.jsx.map +0 -1
- package/dist/swipe/model.jsx.map +0 -1
- package/dist/swipe/swipe-view.jsx.map +0 -1
- package/dist/tab-bar/metrics.jsx.map +0 -1
- package/dist/tab-bar/model.jsx.map +0 -1
- package/dist/tab-bar/tab-bar.jsx.map +0 -1
- package/dist/tabs/model.jsx.map +0 -1
- package/dist/tabs/tab-view.jsx.map +0 -1
- package/dist/toast/service.jsx.map +0 -1
- package/dist/toast/store.jsx.map +0 -1
- package/dist/toggle/checkbox-math.jsx.map +0 -1
- package/dist/toggle/checkbox.jsx.map +0 -1
- package/dist/toggle/chip-group.jsx.map +0 -1
- package/dist/toggle/switch.jsx.map +0 -1
package/dist/provider/hooks.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { G9Error, hasCapability, requireCapability } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
-
import { useContext, useSyncExternalStore } from "@lynx-js/react";
|
|
3
|
-
import {
|
|
1
|
+
import { G9Error, createDesignRegistry, hasCapability, requireCapability } from "@g9tm/lynxcontrols-foundation";
|
|
2
|
+
import { useContext, useMemo, useRef, useSyncExternalStore } from "@lynx-js/react";
|
|
3
|
+
import { subscribeThemeAndActivity } from "./activity.jsx";
|
|
4
|
+
import { G9ActivityContext, G9CoreContext, G9CultureContext, G9InsetsContext, G9KeyboardContext, G9LayoutContext, G9SettingsContext, G9WindowContext } from "./contexts.jsx";
|
|
4
5
|
function missing(hook) {
|
|
5
6
|
return new G9Error('provider-missing', `${hook} must be used inside <G9Provider>.`);
|
|
6
7
|
}
|
|
@@ -26,7 +27,19 @@ function useG9CultureStore() {
|
|
|
26
27
|
}
|
|
27
28
|
function useG9Theme() {
|
|
28
29
|
const store = useRequired(G9CoreContext, 'useG9Theme').themeStore;
|
|
29
|
-
|
|
30
|
+
const activity = useContext(G9ActivityContext);
|
|
31
|
+
const shown = useRef(null);
|
|
32
|
+
const subscribe = useMemo(()=>subscribeThemeAndActivity(store.subscribe, activity), [
|
|
33
|
+
store,
|
|
34
|
+
activity
|
|
35
|
+
]);
|
|
36
|
+
const theme = useSyncExternalStore(subscribe, ()=>activity.visible() || !shown.current ? store.getSnapshot() : shown.current);
|
|
37
|
+
shown.current = theme;
|
|
38
|
+
return theme;
|
|
39
|
+
}
|
|
40
|
+
function useG9ActivityVisible() {
|
|
41
|
+
const activity = useContext(G9ActivityContext);
|
|
42
|
+
return useSyncExternalStore(activity.subscribe, activity.visible);
|
|
30
43
|
}
|
|
31
44
|
function useG9ThemeStore() {
|
|
32
45
|
return useRequired(G9CoreContext, 'useG9ThemeStore').themeStore;
|
|
@@ -67,6 +80,21 @@ function useG9Window() {
|
|
|
67
80
|
function useG9SafeInsets() {
|
|
68
81
|
return useRequired(G9InsetsContext, 'useG9SafeInsets');
|
|
69
82
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
function useG9Layout() {
|
|
84
|
+
return useRequired(G9LayoutContext, 'useG9Layout');
|
|
85
|
+
}
|
|
86
|
+
function useG9Shape() {
|
|
87
|
+
const { shape } = useG9Core();
|
|
88
|
+
return useSyncExternalStore(shape.subscribe, shape.get);
|
|
89
|
+
}
|
|
90
|
+
function useG9DesignRegistry() {
|
|
91
|
+
const core = useG9Core();
|
|
92
|
+
return useMemo(()=>createDesignRegistry({
|
|
93
|
+
theme: core.themeStore,
|
|
94
|
+
shape: core.shape
|
|
95
|
+
}), [
|
|
96
|
+
core.themeStore,
|
|
97
|
+
core.shape
|
|
98
|
+
]);
|
|
99
|
+
}
|
|
100
|
+
export { useG9ActivityVisible, useG9Capability, useG9Core, useG9Culture, useG9CultureStore, useG9DesignRegistry, useG9Diagnostics, useG9Direction, useG9Executor, useG9Keyboard, useG9Layout, useG9OptionalService, useG9Preferences, useG9SafeInsets, useG9Service, useG9Settings, useG9Shape, useG9Strings, useG9Theme, useG9ThemeStore, useG9Window };
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { G9Activity, type G9ActivityProps } from './activity.js';
|
|
2
|
+
export type { G9CultureContextValue, G9KeyboardState, G9LayoutInfo, G9ProviderCore, G9ShapeStore, G9WindowState, } from './contexts.js';
|
|
3
|
+
export { type G9WindowInfo, useG9ActivityVisible, useG9Capability, useG9Core, useG9Culture, useG9CultureStore, useG9DesignRegistry, useG9Diagnostics, useG9Direction, useG9Executor, useG9Keyboard, useG9Layout, useG9OptionalService, useG9Preferences, useG9SafeInsets, useG9Service, useG9Settings, useG9Shape, useG9Strings, useG9Theme, useG9ThemeStore, useG9Window, } from './hooks.js';
|
|
4
|
+
export { G9KeepAlive, type G9KeepAliveProps } from './keep-alive.js';
|
|
3
5
|
export { G9Provider, type G9ProviderProps } from './provider.js';
|
|
4
6
|
export { type G9ExecutorSettings, type G9FieldSettings, type G9ImageRenderer, type G9PageLoadingSettings, type G9ResolvedSettings, type G9Settings, g9DefaultBackEventName, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings, } from './settings.js';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,UAAU,EACV,eAAe,EACf,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
package/dist/provider/index.jsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { G9Activity } from "./activity.jsx";
|
|
2
|
+
export { useG9ActivityVisible, useG9Capability, useG9Core, useG9Culture, useG9CultureStore, useG9DesignRegistry, useG9Diagnostics, useG9Direction, useG9Executor, useG9Keyboard, useG9Layout, useG9OptionalService, useG9Preferences, useG9SafeInsets, useG9Service, useG9Settings, useG9Shape, useG9Strings, useG9Theme, useG9ThemeStore, useG9Window } from "./hooks.jsx";
|
|
3
|
+
export { G9KeepAlive } from "./keep-alive.jsx";
|
|
2
4
|
export { G9Provider } from "./provider.jsx";
|
|
3
5
|
export { g9DefaultBackEventName, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings } from "./settings.jsx";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.g9-kept {
|
|
2
|
+
flex-direction: column;
|
|
3
|
+
flex: 1 1 0;
|
|
4
|
+
min-height: 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.g9-kept--hidden {
|
|
9
|
+
visibility: hidden;
|
|
10
|
+
height: 0;
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/*# sourceMappingURL=keep-alive.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://./src/provider/keep-alive.css"],"names":[],"mappings":"AAKA;EAJE,sBAAsB;EACtB,WAAW;EACX,aAAa;EACb,aAAa;AACf;;AASA;EANE,kBAAkB;EAClB,SAAS;EACT,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,QAAQ;EACR,gBAAgB;AAClB","sourcesContent":["/* G9KeepAlive and the hidden panels of G9TabView: a kept-mounted region that is not shown is COLLAPSED (out of the\n flow, no height, invisible, untouchable), never `display: none`. Lynx 4.2 on Android re-processes a display:none\n subtree on every layout pass of the page: with a hidden page mounted, each row a fling brought into a list paid for\n that page (A21s, release build, 2026-11-18: 16 frames and p95 85–93 ms after the Kits page, 220–270 frames and p95\n 32–42 ms collapsed, 285 frames and p95 31 ms with no hidden page). */\n.g9-kept {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n flex-shrink: 1;\n flex-basis: 0px;\n min-height: 0px;\n}\n\n.g9-kept--hidden {\n position: absolute;\n left: 0px;\n top: 0px;\n right: 0px;\n height: 0px;\n overflow: hidden;\n visibility: hidden;\n}\n"],"sourceRoot":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './keep-alive.css';
|
|
2
|
+
import type { ReactNode } from '@lynx-js/react';
|
|
3
|
+
/** Props of {@link G9KeepAlive}. */
|
|
4
|
+
export interface G9KeepAliveProps {
|
|
5
|
+
/** Shown (`true`) or kept mounted and collapsed (`false`). */
|
|
6
|
+
readonly active: boolean;
|
|
7
|
+
readonly id?: string;
|
|
8
|
+
/** Extra class on the region's view (the region fills its parent as a flex column). */
|
|
9
|
+
readonly className?: string;
|
|
10
|
+
readonly children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A region kept mounted while hidden (the pages of a shell, the screens of a stack): state, scroll position and loaded
|
|
14
|
+
* data survive, switching back costs a style change. Hidden, it is collapsed — out of the flow, no height, invisible,
|
|
15
|
+
* untouchable — and its theme-driven work waits ({@link G9Activity}).
|
|
16
|
+
*
|
|
17
|
+
* Why not `display: none`: Lynx 4.2 on Android re-processes a display:none subtree on every layout pass, so a hidden
|
|
18
|
+
* page made every row a fling brought into another page's list pay for it. On a Galaxy A21s the fling after the Kits
|
|
19
|
+
* page dropped to 16 frames (p95 85–93 ms); collapsed it is 220–270 frames (p95 32–42 ms), against 285 frames (p95
|
|
20
|
+
* 31 ms) with no hidden page.
|
|
21
|
+
*/
|
|
22
|
+
export declare function G9KeepAlive(props: G9KeepAliveProps): ReactNode;
|
|
23
|
+
//# sourceMappingURL=keep-alive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keep-alive.d.ts","sourceRoot":"","sources":["../../src/provider/keep-alive.tsx"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAU9D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./keep-alive.css";
|
|
2
|
+
import { g9IdProps } from "../base/control.jsx";
|
|
3
|
+
import { G9Activity } from "./activity.jsx";
|
|
4
|
+
function G9KeepAlive(props) {
|
|
5
|
+
return <view className={`g9-kept${props.active ? '' : ' g9-kept--hidden'}${props.className ? ` ${props.className}` : ''}`} {...g9IdProps(props.id)} user-interaction-enabled={props.active}>
|
|
6
|
+
<G9Activity mode={props.active ? 'visible' : 'hidden'}>{props.children}</G9Activity>
|
|
7
|
+
</view>;
|
|
8
|
+
}
|
|
9
|
+
export { G9KeepAlive };
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
direction: rtl;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.g9-motion-off .g9-deferred__cover, .g9-motion-off .g9-progress__fill, .g9-motion-off .g9-expander__chevron, .g9-motion-off .g9-expander__clip, .g9-motion-off .g9-field__label, .g9-motion-off .g9-page-loading, .g9-motion-off .g9-toast__fill, .g9-motion-off .g9-switch__track, .g9-motion-off .g9-switch__thumb, .g9-motion-off .g9-chip, .g9-motion-off .g9-chip__check {
|
|
17
|
+
.g9-motion-off .g9-deferred__cover, .g9-motion-off .g9-progress__fill, .g9-motion-off .g9-expander__chevron, .g9-motion-off .g9-expander__clip, .g9-motion-off .g9-field__label, .g9-motion-off .g9-page-loading, .g9-motion-off .g9-toast__fill, .g9-motion-off .g9-switch__track, .g9-motion-off .g9-switch__thumb, .g9-motion-off .g9-chip, .g9-motion-off .g9-chip__check, .g9-motion-off .g9-press-s96, .g9-motion-off .g9-press-s96:active, .g9-motion-off .g9-press-s92, .g9-motion-off .g9-press-s92:active, .g9-motion-off .g9-press-s82, .g9-motion-off .g9-press-s82:active, .g9-motion-off .g9-press-s985, .g9-motion-off .g9-press-s985:active, .g9-motion-off .g9-press-s99, .g9-motion-off .g9-press-s99:active, .g9-motion-off .g9-press-o78, .g9-motion-off .g9-press-o78:active, .g9-motion-off .g9-press-o78b, .g9-motion-off .g9-press-o78b:active, .g9-motion-off .g9-press-card, .g9-motion-off .g9-press-card:active, .g9-motion-off .g9-card--down, .g9-motion-off .g9-list-row--pressable, .g9-motion-off .g9-steps__dot, .g9-motion-off .g9-shell__tab-bar, .g9-motion-off .g9-update-bar, .g9-motion-off .g9-scale__step, .g9-motion-off .g9-seg__indicator {
|
|
18
18
|
transition-duration: 0s;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/provider/provider.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAIA;EADE,cAAc;AAChB;;AAIA;EADE,cAAc;AAChB;;AAOA;EAJE,uBAAuB;AACzB","sourcesContent":["/* G9Provider root: fills the LynxView and carries the theme variables (set inline / with setProperty). */\n.g9-provider {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n}\n\n/* direction does not inherit in Lynx (plan/specs/02 §2): every G9 root sets it; these are the provider's. */\n.g9-dir-ltr {\n direction: ltr;\n}\n\n.g9-dir-rtl {\n direction: rtl;\n}\n\n/* Reduced motion (setG9MotionScale(0), the provider's `g9-motion-off`): every CSS transition of the kit ends at once, as\n the JS-timed motion does. Listed one by one (no universal selector); a new transition in a component belongs here too\n (provider-motion.test.ts checks); another package lists its own in its own stylesheet (progress-overlay.css). The infinite spinners keep turning: they say «busy», they move nothing a test waits for. */\n.g9-motion-off .g9-deferred__cover,\n.g9-motion-off .g9-progress__fill,\n.g9-motion-off .g9-expander__chevron,\n.g9-motion-off .g9-expander__clip,\n.g9-motion-off .g9-field__label,\n.g9-motion-off .g9-page-loading,\n.g9-motion-off .g9-toast__fill,\n.g9-motion-off .g9-switch__track,\n.g9-motion-off .g9-switch__thumb,\n.g9-motion-off .g9-chip,\n.g9-motion-off .g9-chip__check {\n transition-duration: 0ms;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/provider/provider.css"],"names":[],"mappings":"AACA;EAAE,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAIA;EADE,cAAc;AAChB;;AAIA;EADE,cAAc;AAChB;;AAOA;EAJE,uBAAuB;AACzB","sourcesContent":["/* G9Provider root: fills the LynxView and carries the theme variables (set inline / with setProperty). */\n.g9-provider {\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n}\n\n/* direction does not inherit in Lynx (plan/specs/02 §2): every G9 root sets it; these are the provider's. */\n.g9-dir-ltr {\n direction: ltr;\n}\n\n.g9-dir-rtl {\n direction: rtl;\n}\n\n/* Reduced motion (setG9MotionScale(0), the provider's `g9-motion-off`): every CSS transition of the kit ends at once, as\n the JS-timed motion does. Listed one by one (no universal selector); a new transition in a component belongs here too\n (provider-motion.test.ts checks); another package lists its own in its own stylesheet (progress-overlay.css). The infinite spinners keep turning: they say «busy», they move nothing a test waits for. */\n.g9-motion-off .g9-deferred__cover,\n.g9-motion-off .g9-progress__fill,\n.g9-motion-off .g9-expander__chevron,\n.g9-motion-off .g9-expander__clip,\n.g9-motion-off .g9-field__label,\n.g9-motion-off .g9-page-loading,\n.g9-motion-off .g9-toast__fill,\n.g9-motion-off .g9-switch__track,\n.g9-motion-off .g9-switch__thumb,\n.g9-motion-off .g9-chip,\n.g9-motion-off .g9-chip__check,\n.g9-motion-off .g9-press-s96,\n.g9-motion-off .g9-press-s96:active,\n.g9-motion-off .g9-press-s92,\n.g9-motion-off .g9-press-s92:active,\n.g9-motion-off .g9-press-s82,\n.g9-motion-off .g9-press-s82:active,\n.g9-motion-off .g9-press-s985,\n.g9-motion-off .g9-press-s985:active,\n.g9-motion-off .g9-press-s99,\n.g9-motion-off .g9-press-s99:active,\n.g9-motion-off .g9-press-o78,\n.g9-motion-off .g9-press-o78:active,\n.g9-motion-off .g9-press-o78b,\n.g9-motion-off .g9-press-o78b:active,\n.g9-motion-off .g9-press-card,\n.g9-motion-off .g9-press-card:active,\n.g9-motion-off .g9-card--down,\n.g9-motion-off .g9-list-row--pressable,\n.g9-motion-off .g9-steps__dot,\n.g9-motion-off .g9-shell__tab-bar,\n.g9-motion-off .g9-update-bar,\n.g9-motion-off .g9-scale__step,\n.g9-motion-off .g9-seg__indicator {\n transition-duration: 0ms;\n}\n"],"sourceRoot":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type G9Capabilities, type G9ColorScheme, type G9Culture, type G9CultureStore, type G9Diagnostics, type G9ThemeOptions, type G9ThemeStore } from '@g9tm/lynxcontrols-foundation';
|
|
1
|
+
import { type G9Breakpoints, type G9Capabilities, type G9ColorScheme, type G9Culture, type G9CultureStore, type G9Diagnostics, type G9ShapeSet, type G9ThemeOptions, type G9ThemeStore, type G9TokenAliasMap } from '@g9tm/lynxcontrols-foundation';
|
|
2
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
3
3
|
import { type G9Settings } from './settings.js';
|
|
4
4
|
import './provider.css';
|
|
@@ -29,6 +29,18 @@ export interface G9ProviderProps {
|
|
|
29
29
|
readonly persistTheme?: boolean;
|
|
30
30
|
/** App-wide settings (plan/specs/03 §6). Validated at mount and on change. */
|
|
31
31
|
readonly settings?: G9Settings;
|
|
32
|
+
/** Widths at which the layout class changes (default phone < 720 ≤ tablet < 1100 ≤ desktop; dialogs from 860). */
|
|
33
|
+
readonly breakpoints?: Partial<G9Breakpoints>;
|
|
34
|
+
/** The theme's shape (radii, type roles, control heights) over the library's; changes repaint through CSS variables. */
|
|
35
|
+
readonly shape?: Partial<G9ShapeSet>;
|
|
36
|
+
/**
|
|
37
|
+
* The app's own colour names as CSS variables pointing at library tokens (`g9AliasPresets.berjis`…), so the app's
|
|
38
|
+
* stylesheets follow the library theme while it migrates. `prefix` is prepended to each name.
|
|
39
|
+
*/
|
|
40
|
+
readonly tokenAliases?: {
|
|
41
|
+
readonly map: G9TokenAliasMap;
|
|
42
|
+
readonly prefix?: string;
|
|
43
|
+
};
|
|
32
44
|
/** The diagnostics hub. Default: a hub the provider creates. */
|
|
33
45
|
readonly diagnostics?: G9Diagnostics;
|
|
34
46
|
readonly className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/provider/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,aAAa,EAGlB,KAAK,UAAU,EAEf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,eAAe,EAYrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAA8D,MAAM,gBAAgB,CAAC;AAqB5G,OAAO,EAAE,KAAK,UAAU,EAA4C,MAAM,YAAY,CAAC;AAEvF,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AAErB,mCAAmC;AACnC,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;IACvD;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC;IAC/C,kHAAkH;IAClH,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAC/B,kHAAkH;IAClH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9C,wHAAwH;IACxH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpF,gEAAgE;IAChE,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAC/B;AAyDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,CA0T5D"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { assertRequiredCapabilities, createCultureStore, createDiagnostics, createIconFontRegistry, createPreferences, createSafeExecutor, createStrings, createThemeStore, g9MotionScale, subscribeG9Motion, toCssVariables, toLayoutCssVariables, toMetricCssVariables } from "@g9tm/lynxcontrols-foundation";
|
|
1
|
+
import { aliasCssVariables, assertRequiredCapabilities, createCultureStore, createDiagnostics, createIconFontRegistry, createPreferences, createSafeExecutor, createStrings, createThemeStore, g9Breakpoints, g9MotionScale, resolveLayout, resolveShape, setG9Feedback, subscribeG9Motion, toCssVariables, toDerivedCssVariables, toLayoutCssVariables, toMetricCssVariables, toShapeCssVariables } from "@g9tm/lynxcontrols-foundation";
|
|
2
2
|
import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "@lynx-js/react";
|
|
3
3
|
import { G9AnchorRegistryContext } from "../anchor/context.jsx";
|
|
4
4
|
import { createAnchorRegistry } from "../anchor/registry.jsx";
|
|
5
5
|
import { useStableCallback } from "../base/use-stable-callback.jsx";
|
|
6
6
|
import { g9Hosts } from "../host/registry.jsx";
|
|
7
|
-
import { G9CoreContext, G9CultureContext, G9DiagnosticsContext, G9InsetsContext, G9KeyboardContext, G9SettingsContext, G9WindowContext } from "./contexts.jsx";
|
|
7
|
+
import { G9CoreContext, G9CultureContext, G9DiagnosticsContext, G9InsetsContext, G9KeyboardContext, G9LayoutContext, G9SettingsContext, G9WindowContext } from "./contexts.jsx";
|
|
8
8
|
import { addGlobalListener } from "./global-events.jsx";
|
|
9
9
|
import { g9DefaultErrorPresenter, resolveSettings } from "./settings.jsx";
|
|
10
10
|
import { applyThemeVariables, changedVariables } from "./theme-root.jsx";
|
|
@@ -14,8 +14,34 @@ const THEME_PREFERENCE_KEY = 'theme';
|
|
|
14
14
|
const THEME_MODES = [
|
|
15
15
|
'system',
|
|
16
16
|
'light',
|
|
17
|
-
'dark'
|
|
17
|
+
'dark',
|
|
18
|
+
'scheduled'
|
|
18
19
|
];
|
|
20
|
+
function createShapeStore(initial) {
|
|
21
|
+
let shape = initial;
|
|
22
|
+
const listeners = new Set();
|
|
23
|
+
return {
|
|
24
|
+
get: ()=>shape,
|
|
25
|
+
set (next) {
|
|
26
|
+
if (next === shape) return;
|
|
27
|
+
shape = next;
|
|
28
|
+
for (const l of Array.from(listeners))l();
|
|
29
|
+
},
|
|
30
|
+
subscribe (listener) {
|
|
31
|
+
listeners.add(listener);
|
|
32
|
+
return ()=>void listeners.delete(listener);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function layoutInfo(width, height, breakpoints) {
|
|
37
|
+
const l = resolveLayout(width, height, breakpoints);
|
|
38
|
+
return Object.freeze({
|
|
39
|
+
layout: l.layout,
|
|
40
|
+
wide: l.wide,
|
|
41
|
+
landscape: l.landscape,
|
|
42
|
+
breakpoints
|
|
43
|
+
});
|
|
44
|
+
}
|
|
19
45
|
let providerSequence = 0;
|
|
20
46
|
function isCultureStore(value) {
|
|
21
47
|
return 'object' == typeof value && null !== value && 'function' == typeof value.getSnapshot;
|
|
@@ -40,8 +66,14 @@ const HIDDEN_KEYBOARD = Object.freeze({
|
|
|
40
66
|
function finite(value) {
|
|
41
67
|
return 'number' == typeof value && Number.isFinite(value) && value > 0 ? value : 0;
|
|
42
68
|
}
|
|
69
|
+
function themeVariables(theme) {
|
|
70
|
+
return {
|
|
71
|
+
...toCssVariables(theme),
|
|
72
|
+
...toDerivedCssVariables(theme)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
43
75
|
function G9Provider(props) {
|
|
44
|
-
var _props_diagnostics, _props_culture;
|
|
76
|
+
var _props_diagnostics, _props_culture, _props_shape, _props_breakpoints;
|
|
45
77
|
const { services, persistTheme = true } = props;
|
|
46
78
|
assertRequiredCapabilities(services);
|
|
47
79
|
const [ownDiagnostics] = useState(createDiagnostics);
|
|
@@ -112,6 +144,14 @@ function G9Provider(props) {
|
|
|
112
144
|
return `g9-provider-${providerSequence}`;
|
|
113
145
|
});
|
|
114
146
|
const [anchors] = useState(createAnchorRegistry);
|
|
147
|
+
const [shapeStore] = useState(()=>createShapeStore(resolveShape(props.shape)));
|
|
148
|
+
const shapeKey = JSON.stringify(null != (_props_shape = props.shape) ? _props_shape : null);
|
|
149
|
+
useEffect(()=>{
|
|
150
|
+
shapeStore.set(resolveShape(props.shape));
|
|
151
|
+
}, [
|
|
152
|
+
shapeStore,
|
|
153
|
+
shapeKey
|
|
154
|
+
]);
|
|
115
155
|
const core = useMemo(()=>{
|
|
116
156
|
var _executorSettings_showError;
|
|
117
157
|
const preferences = createPreferences({
|
|
@@ -156,7 +196,8 @@ function G9Provider(props) {
|
|
|
156
196
|
diagnostics,
|
|
157
197
|
executor,
|
|
158
198
|
rootId,
|
|
159
|
-
anchors
|
|
199
|
+
anchors,
|
|
200
|
+
shape: shapeStore
|
|
160
201
|
});
|
|
161
202
|
}, [
|
|
162
203
|
services,
|
|
@@ -164,15 +205,57 @@ function G9Provider(props) {
|
|
|
164
205
|
diagnostics,
|
|
165
206
|
settings.executor,
|
|
166
207
|
rootId,
|
|
167
|
-
anchors
|
|
208
|
+
anchors,
|
|
209
|
+
shapeStore
|
|
210
|
+
]);
|
|
211
|
+
const feedbackFor = useRef(null);
|
|
212
|
+
if (feedbackFor.current !== services) {
|
|
213
|
+
var _services_haptics, _services_sounds;
|
|
214
|
+
feedbackFor.current = services;
|
|
215
|
+
setG9Feedback({
|
|
216
|
+
haptics: null != (_services_haptics = services.haptics) ? _services_haptics : null,
|
|
217
|
+
sounds: null != (_services_sounds = services.sounds) ? _services_sounds : null
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
useEffect(()=>()=>setG9Feedback({
|
|
221
|
+
haptics: null,
|
|
222
|
+
sounds: null
|
|
223
|
+
}), []);
|
|
224
|
+
const [themeMode, setThemeMode] = useState(()=>themeStore.getSnapshot().mode);
|
|
225
|
+
useEffect(()=>themeStore.subscribe((t)=>setThemeMode(t.mode)), [
|
|
226
|
+
themeStore
|
|
227
|
+
]);
|
|
228
|
+
useEffect(()=>{
|
|
229
|
+
if ('scheduled' !== themeMode) return;
|
|
230
|
+
let timer;
|
|
231
|
+
const tick = ()=>{
|
|
232
|
+
const now = new Date(services.clock.now());
|
|
233
|
+
themeStore.setHour(now.getHours());
|
|
234
|
+
const msToHour = (60 - now.getMinutes()) * 60000 - 1000 * now.getSeconds() - now.getMilliseconds() + 50;
|
|
235
|
+
timer = setTimeout(tick, Math.max(1000, msToHour));
|
|
236
|
+
};
|
|
237
|
+
tick();
|
|
238
|
+
return ()=>{
|
|
239
|
+
if (timer) clearTimeout(timer);
|
|
240
|
+
};
|
|
241
|
+
}, [
|
|
242
|
+
themeMode,
|
|
243
|
+
themeStore,
|
|
244
|
+
services.clock
|
|
168
245
|
]);
|
|
169
246
|
useEffect(()=>()=>core.executor.dispose(), [
|
|
170
247
|
core
|
|
171
248
|
]);
|
|
249
|
+
const aliasKey = props.tokenAliases ? JSON.stringify(props.tokenAliases) : '';
|
|
250
|
+
const aliasVariables = useMemo(()=>props.tokenAliases ? aliasCssVariables(props.tokenAliases.map, props.tokenAliases.prefix) : {}, [
|
|
251
|
+
aliasKey
|
|
252
|
+
]);
|
|
172
253
|
const [initialVariables] = useState(()=>({
|
|
173
254
|
...toMetricCssVariables(),
|
|
174
255
|
...toLayoutCssVariables(),
|
|
175
|
-
...
|
|
256
|
+
...toShapeCssVariables(shapeStore.get()),
|
|
257
|
+
...aliasVariables,
|
|
258
|
+
...themeVariables(themeStore.getSnapshot())
|
|
176
259
|
}));
|
|
177
260
|
const [initialScheme] = useState(()=>themeStore.getSnapshot().scheme);
|
|
178
261
|
const applied = useRef({});
|
|
@@ -182,7 +265,7 @@ function G9Provider(props) {
|
|
|
182
265
|
const next = {
|
|
183
266
|
...initialVariables,
|
|
184
267
|
...applied.current,
|
|
185
|
-
...
|
|
268
|
+
...themeVariables(themeStore.getSnapshot())
|
|
186
269
|
};
|
|
187
270
|
const diff = changedVariables(applied.current, next);
|
|
188
271
|
applied.current = next;
|
|
@@ -196,6 +279,24 @@ function G9Provider(props) {
|
|
|
196
279
|
rootId,
|
|
197
280
|
initialVariables
|
|
198
281
|
]);
|
|
282
|
+
useEffect(()=>{
|
|
283
|
+
const apply = ()=>{
|
|
284
|
+
const next = {
|
|
285
|
+
...applied.current,
|
|
286
|
+
...toShapeCssVariables(shapeStore.get()),
|
|
287
|
+
...aliasVariables
|
|
288
|
+
};
|
|
289
|
+
const diff = changedVariables(applied.current, next);
|
|
290
|
+
applied.current = next;
|
|
291
|
+
if (diff && !applyThemeVariables(rootId, diff)) setFallbackVariables(next);
|
|
292
|
+
};
|
|
293
|
+
apply();
|
|
294
|
+
return shapeStore.subscribe(apply);
|
|
295
|
+
}, [
|
|
296
|
+
shapeStore,
|
|
297
|
+
aliasVariables,
|
|
298
|
+
rootId
|
|
299
|
+
]);
|
|
199
300
|
useEffect(()=>{
|
|
200
301
|
if (!persistTheme) return;
|
|
201
302
|
let alive = true;
|
|
@@ -254,6 +355,18 @@ function G9Provider(props) {
|
|
|
254
355
|
return next.width === current.width && next.height === current.height ? current : Object.freeze(next);
|
|
255
356
|
});
|
|
256
357
|
}), []);
|
|
358
|
+
const breakpointsKey = JSON.stringify(null != (_props_breakpoints = props.breakpoints) ? _props_breakpoints : null);
|
|
359
|
+
const breakpoints = useMemo(()=>Object.freeze({
|
|
360
|
+
...g9Breakpoints,
|
|
361
|
+
...props.breakpoints
|
|
362
|
+
}), [
|
|
363
|
+
breakpointsKey
|
|
364
|
+
]);
|
|
365
|
+
const layoutRef = useRef(null);
|
|
366
|
+
const nextLayout = layoutInfo(windowState.width, windowState.height, breakpoints);
|
|
367
|
+
const prevLayout = layoutRef.current;
|
|
368
|
+
const layout = prevLayout && prevLayout.layout === nextLayout.layout && prevLayout.wide === nextLayout.wide && prevLayout.landscape === nextLayout.landscape && prevLayout.breakpoints === nextLayout.breakpoints ? prevLayout : nextLayout;
|
|
369
|
+
layoutRef.current = layout;
|
|
257
370
|
const [insets, setInsets] = useState(()=>services.host.getSafeInsets());
|
|
258
371
|
useEffect(()=>{
|
|
259
372
|
setInsets(services.host.getSafeInsets());
|
|
@@ -281,11 +394,13 @@ function G9Provider(props) {
|
|
|
281
394
|
<G9CultureContext.Provider value={cultureValue}>
|
|
282
395
|
<G9KeyboardContext.Provider value={keyboard}>
|
|
283
396
|
<G9WindowContext.Provider value={windowState}>
|
|
284
|
-
<
|
|
285
|
-
<
|
|
286
|
-
{props.
|
|
287
|
-
|
|
288
|
-
|
|
397
|
+
<G9LayoutContext.Provider value={layout}>
|
|
398
|
+
<G9InsetsContext.Provider value={insets}>
|
|
399
|
+
<view id={rootId} className={`g9-provider g9-theme-${initialScheme} ${directionClass}${motionOff ? ' g9-motion-off' : ''}${props.className ? ` ${props.className}` : ''}`} style={rootStyle}>
|
|
400
|
+
{props.children}
|
|
401
|
+
</view>
|
|
402
|
+
</G9InsetsContext.Provider>
|
|
403
|
+
</G9LayoutContext.Provider>
|
|
289
404
|
</G9WindowContext.Provider>
|
|
290
405
|
</G9KeyboardContext.Provider>
|
|
291
406
|
</G9CultureContext.Provider>
|
|
@@ -295,5 +410,3 @@ function G9Provider(props) {
|
|
|
295
410
|
</G9CoreContext.Provider>;
|
|
296
411
|
}
|
|
297
412
|
export { G9Provider };
|
|
298
|
-
|
|
299
|
-
//# sourceMappingURL=provider.jsx.map
|
|
@@ -69,7 +69,29 @@ export interface G9Settings {
|
|
|
69
69
|
readonly toggles?: G9ToggleSettings;
|
|
70
70
|
/** The guide's words and timings (`@g9tm/lynxcontrols/guide`): the app gives them in the person's language. */
|
|
71
71
|
readonly guide?: G9GuideSettings;
|
|
72
|
+
/** Where toasts stand and how they look (SAC: ink toasts, 420 wide and at the bottom on a desk). */
|
|
73
|
+
readonly toasts?: G9ToastSettings;
|
|
72
74
|
}
|
|
75
|
+
/** App-wide toast settings. */
|
|
76
|
+
export interface G9ToastSettings {
|
|
77
|
+
/**
|
|
78
|
+
* Where a toast shown without a position goes, per layout: `phone` (compact windows) and `wide` (tablet and desktop).
|
|
79
|
+
* Default MAUI's: the bottom corner on the reading end (`bottomRight`, `bottomLeft` in RTL) everywhere.
|
|
80
|
+
*/
|
|
81
|
+
readonly position?: {
|
|
82
|
+
readonly phone?: G9ToastPositionName;
|
|
83
|
+
readonly wide?: G9ToastPositionName;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* `'tone'` (default, MAUI): the card filled with the toast type's colour. `'ink'` (SAC, Material snackbar): the
|
|
87
|
+
* inverse surface for every type, its text light, only the icon in the type's colour.
|
|
88
|
+
*/
|
|
89
|
+
readonly surface?: 'tone' | 'ink';
|
|
90
|
+
/** On a wide window the stacks take this width, centred, instead of the full width between the margins (SAC 420). */
|
|
91
|
+
readonly wideWidth?: number | null;
|
|
92
|
+
}
|
|
93
|
+
/** A toast position (`G9ToastPosition` of the toast service). */
|
|
94
|
+
export type G9ToastPositionName = 'topLeft' | 'topCenter' | 'topRight' | 'middleLeft' | 'middleCenter' | 'middleRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
73
95
|
/** App-wide toggle settings. */
|
|
74
96
|
export interface G9ToggleSettings {
|
|
75
97
|
/**
|
|
@@ -102,6 +124,7 @@ export interface G9ResolvedSettings {
|
|
|
102
124
|
readonly popups: G9PopupSettings;
|
|
103
125
|
readonly toggles: Required<G9ToggleSettings>;
|
|
104
126
|
readonly guide: G9GuideSettings;
|
|
127
|
+
readonly toasts: G9ToastSettings;
|
|
105
128
|
}
|
|
106
129
|
/** MAUI `G9PageBase.PageLoadingDismissDelayMs` default. */
|
|
107
130
|
export declare const g9PageLoadingDismissDelayMs = 369;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/provider/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAA8B,KAAK,eAAe,EAAsB,MAAM,gBAAgB,CAAC;AACtG,OAAO,EAAE,KAAK,eAAe,EAAwB,MAAM,kBAAkB,CAAC;AAE9E,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAEhD,iHAAiH;AACjH,MAAM,WAAW,qBAAqB;IACpC,2GAA2G;IAC3G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,sFAAsF;IACtF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,yGAAyG;IACzG,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,8FAA8F;IAC9F,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;;GAGG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_strings, _ref, _s_iconFonts, _loading_backgroundColor, _loading_spinnerColor, _s_executor, _ref1, _ref2, _s_guide;
|
|
16
|
+
var _s_backEventName, _s_pageLoading, _s_strings, _ref, _s_iconFonts, _loading_backgroundColor, _loading_spinnerColor, _s_executor, _ref1, _ref2, _s_guide, _s_toasts;
|
|
17
17
|
var _s_fields, _s_toggles;
|
|
18
18
|
const s = null != settings ? settings : {};
|
|
19
19
|
const backEventName = null != (_s_backEventName = s.backEventName) ? _s_backEventName : g9DefaultBackEventName;
|
|
@@ -41,9 +41,10 @@ function resolveSettings(settings, fallbackIconFonts) {
|
|
|
41
41
|
toggles: Object.freeze({
|
|
42
42
|
switchMirrorInRtl: null != (_ref2 = null == (_s_toggles = s.toggles) ? void 0 : _s_toggles.switchMirrorInRtl) ? _ref2 : true
|
|
43
43
|
}),
|
|
44
|
-
guide: null != (_s_guide = s.guide) ? _s_guide : {}
|
|
44
|
+
guide: null != (_s_guide = s.guide) ? _s_guide : {},
|
|
45
|
+
toasts: Object.freeze({
|
|
46
|
+
...null != (_s_toasts = s.toasts) ? _s_toasts : {}
|
|
47
|
+
})
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
export { g9DefaultBackEventName, g9DefaultErrorPresenter, g9PageLoadingDismissDelayMs, g9PageLoadingSafetyTimeoutMs, resolveSettings };
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=settings.jsx.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The stylesheet behind `theme.css`: the stock light and dark palettes as `.g9-theme-light` / `.g9-theme-dark`
|
|
3
|
-
* classes and the default metric and
|
|
3
|
+
* classes and the default metric, layout and shape variables (radii, type scale, control heights) on `.g9-provider`.
|
|
4
4
|
*
|
|
5
5
|
* Why a stylesheet: the Lynx engine ignores custom properties written in an inline style object unless the page
|
|
6
6
|
* config `enableCSSInlineVariables` is on, which the ReactLynx toolchain does not expose (found in the Lynxtron window
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../src/provider/theme-css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-css.d.ts","sourceRoot":"","sources":["../../src/provider/theme-css.ts"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAwB9C"}
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { cssVariablesToText, g9DarkPalette, g9LightPalette, toCssVariables, toLayoutCssVariables, toMetricCssVariables } from "@g9tm/lynxcontrols-foundation";
|
|
1
|
+
import { cssVariablesToText, g9DarkPalette, g9DefaultShape, g9LightPalette, toCssVariables, toDerivedCssVariables, toLayoutCssVariables, toMetricCssVariables, toShapeCssVariables } from "@g9tm/lynxcontrols-foundation";
|
|
2
2
|
function renderThemeStylesheet() {
|
|
3
3
|
return [
|
|
4
4
|
'/* Generated by renderThemeStylesheet (src/provider/theme-css.ts); `npm run gen:theme-css` rewrites it. */',
|
|
5
|
-
cssVariablesToText(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
cssVariablesToText({
|
|
6
|
+
...toCssVariables({
|
|
7
|
+
palette: g9LightPalette
|
|
8
|
+
}),
|
|
9
|
+
...toDerivedCssVariables({
|
|
10
|
+
palette: g9LightPalette,
|
|
11
|
+
scheme: 'light'
|
|
12
|
+
})
|
|
13
|
+
}, '.g9-theme-light'),
|
|
14
|
+
cssVariablesToText({
|
|
15
|
+
...toCssVariables({
|
|
16
|
+
palette: g9DarkPalette
|
|
17
|
+
}),
|
|
18
|
+
...toDerivedCssVariables({
|
|
19
|
+
palette: g9DarkPalette,
|
|
20
|
+
scheme: 'dark'
|
|
21
|
+
})
|
|
22
|
+
}, '.g9-theme-dark'),
|
|
11
23
|
cssVariablesToText({
|
|
12
24
|
...toMetricCssVariables(),
|
|
13
|
-
...toLayoutCssVariables()
|
|
25
|
+
...toLayoutCssVariables(),
|
|
26
|
+
...toShapeCssVariables(g9DefaultShape)
|
|
14
27
|
}, '.g9-provider')
|
|
15
28
|
].join('\n');
|
|
16
29
|
}
|
|
17
30
|
export { renderThemeStylesheet };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=theme-css.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-root.d.ts","sourceRoot":"","sources":["../../src/provider/theme-root.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI,CAWtG;AAMD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"theme-root.d.ts","sourceRoot":"","sources":["../../src/provider/theme-root.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI,CAWtG;AAMD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,OAAO,CAWlF"}
|
|
@@ -14,11 +14,13 @@ function applyThemeVariables(id, variables) {
|
|
|
14
14
|
var _lynx_getElementById, _lynx;
|
|
15
15
|
const element = null == (_lynx_getElementById = (_lynx = lynx).getElementById) ? void 0 : _lynx_getElementById.call(_lynx, id);
|
|
16
16
|
if (!element || 'function' != typeof element.setProperty) return false;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
try {
|
|
18
|
+
element.setProperty({
|
|
19
|
+
...variables
|
|
20
|
+
});
|
|
21
|
+
} catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
20
24
|
return true;
|
|
21
25
|
}
|
|
22
26
|
export { applyThemeVariables, changedVariables };
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=theme-root.jsx.map
|