@omerdlw/base-framework 3.0.1 → 3.2.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/MIGRATION.md +75 -0
- package/README.md +33 -25
- package/dist/ambient/index.d.ts +1 -0
- package/dist/ambient/index.js +14 -0
- package/dist/ambient/server/index.d.ts +1 -0
- package/dist/ambient/server/index.js +238 -0
- package/dist/ambient/server/index.js.map +1 -0
- package/dist/ambient/worker/index.d.ts +1 -0
- package/dist/ambient/worker/index.js +143 -0
- package/dist/ambient/worker/index.js.map +1 -0
- package/dist/background/index.d.ts +1 -0
- package/dist/background/index.js +13 -0
- package/dist/chunk-2223J34C.js +850 -0
- package/dist/chunk-2223J34C.js.map +1 -0
- package/dist/chunk-2LGI33JP.js +832 -0
- package/dist/chunk-2LGI33JP.js.map +1 -0
- package/dist/chunk-37OBXNEO.js +116 -0
- package/dist/chunk-37OBXNEO.js.map +1 -0
- package/dist/chunk-4OQGXZIH.js +1435 -0
- package/dist/chunk-4OQGXZIH.js.map +1 -0
- package/dist/chunk-5H6FZW3N.js +535 -0
- package/dist/chunk-5H6FZW3N.js.map +1 -0
- package/dist/chunk-7RSRDKYE.js +22 -0
- package/dist/chunk-7RSRDKYE.js.map +1 -0
- package/dist/chunk-AYUEZPAN.js +15762 -0
- package/dist/chunk-AYUEZPAN.js.map +1 -0
- package/dist/chunk-BCFJSPTI.js +261 -0
- package/dist/chunk-BCFJSPTI.js.map +1 -0
- package/dist/chunk-BMFHS3GV.js +118 -0
- package/dist/chunk-BMFHS3GV.js.map +1 -0
- package/dist/chunk-CRKJAACG.js +81 -0
- package/dist/chunk-CRKJAACG.js.map +1 -0
- package/dist/chunk-CT4UILO2.js +537 -0
- package/dist/chunk-CT4UILO2.js.map +1 -0
- package/dist/chunk-ESD5EQ5H.js +178 -0
- package/dist/chunk-ESD5EQ5H.js.map +1 -0
- package/dist/chunk-GCHQ5OC4.js +460 -0
- package/dist/chunk-GCHQ5OC4.js.map +1 -0
- package/dist/chunk-GT4COZI7.js +110 -0
- package/dist/chunk-GT4COZI7.js.map +1 -0
- package/dist/chunk-H6HRU3XN.js +567 -0
- package/dist/chunk-H6HRU3XN.js.map +1 -0
- package/dist/chunk-J3VTDBC6.js +14 -0
- package/dist/chunk-J3VTDBC6.js.map +1 -0
- package/dist/chunk-LTO77WSO.js +140 -0
- package/dist/chunk-LTO77WSO.js.map +1 -0
- package/dist/chunk-MCYHKFZL.js +17 -0
- package/dist/chunk-MCYHKFZL.js.map +1 -0
- package/dist/chunk-NHOJWICA.js +2367 -0
- package/dist/chunk-NHOJWICA.js.map +1 -0
- package/dist/chunk-QMFV53PP.js +1766 -0
- package/dist/chunk-QMFV53PP.js.map +1 -0
- package/dist/chunk-RDYYP36I.js +27 -0
- package/dist/chunk-RDYYP36I.js.map +1 -0
- package/dist/chunk-RF2YGILF.js +656 -0
- package/dist/chunk-RF2YGILF.js.map +1 -0
- package/dist/chunk-RTCJ35UC.js +825 -0
- package/dist/chunk-RTCJ35UC.js.map +1 -0
- package/dist/chunk-TUUGWQY5.js +3488 -0
- package/dist/chunk-TUUGWQY5.js.map +1 -0
- package/dist/chunk-WXEOP6Z4.js +577 -0
- package/dist/chunk-WXEOP6Z4.js.map +1 -0
- package/dist/chunk-WYVA6AN5.js +590 -0
- package/dist/chunk-WYVA6AN5.js.map +1 -0
- package/dist/chunk-Y2Q74PJP.js +537 -0
- package/dist/chunk-Y2Q74PJP.js.map +1 -0
- package/dist/chunk-ZFTQY7OF.js +139 -0
- package/dist/chunk-ZFTQY7OF.js.map +1 -0
- package/dist/chunk-ZSNP26VU.js +493 -0
- package/dist/chunk-ZSNP26VU.js.map +1 -0
- package/dist/context-menu/index.d.ts +1 -0
- package/dist/context-menu/index.js +19 -0
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.js +10 -0
- package/dist/core/error/boundary.d.ts +27 -0
- package/dist/core/error/boundary.d.ts.map +1 -0
- package/dist/core/error/constants.d.ts +33 -0
- package/dist/core/error/constants.d.ts.map +1 -0
- package/dist/core/error/index.d.ts +9 -0
- package/dist/core/error/index.d.ts.map +1 -0
- package/dist/core/error/listener.d.ts +6 -0
- package/dist/core/error/listener.d.ts.map +1 -0
- package/dist/core/error/reporter.d.ts +49 -0
- package/dist/core/error/reporter.d.ts.map +1 -0
- package/dist/core/error/theme.d.ts +10 -0
- package/dist/core/error/theme.d.ts.map +1 -0
- package/dist/core/error/types.d.ts +128 -0
- package/dist/core/error/types.d.ts.map +1 -0
- package/dist/core/error/utils.d.ts +55 -0
- package/dist/core/error/utils.d.ts.map +1 -0
- package/dist/core/kernel/adapters.d.ts +9 -0
- package/dist/core/kernel/adapters.d.ts.map +1 -0
- package/dist/core/kernel/compose.d.ts +21 -0
- package/dist/core/kernel/compose.d.ts.map +1 -0
- package/dist/core/kernel/constants.d.ts +42 -0
- package/dist/core/kernel/constants.d.ts.map +1 -0
- package/dist/core/kernel/handlers.d.ts +7 -0
- package/dist/core/kernel/handlers.d.ts.map +1 -0
- package/dist/core/kernel/hooks.d.ts +13 -0
- package/dist/core/kernel/hooks.d.ts.map +1 -0
- package/dist/core/kernel/index.d.ts +15 -0
- package/dist/core/kernel/index.d.ts.map +1 -0
- package/dist/core/kernel/installed.d.ts +28 -0
- package/dist/core/kernel/installed.d.ts.map +1 -0
- package/dist/core/kernel/module.d.ts +57 -0
- package/dist/core/kernel/module.d.ts.map +1 -0
- package/dist/core/kernel/operations-records.d.ts +25 -0
- package/dist/core/kernel/operations-records.d.ts.map +1 -0
- package/dist/core/kernel/operations-resolve.d.ts +5 -0
- package/dist/core/kernel/operations-resolve.d.ts.map +1 -0
- package/dist/core/kernel/operations.d.ts +23 -0
- package/dist/core/kernel/operations.d.ts.map +1 -0
- package/dist/core/kernel/page-controller.d.ts +20 -0
- package/dist/core/kernel/page-controller.d.ts.map +1 -0
- package/dist/core/kernel/provider.d.ts +29 -0
- package/dist/core/kernel/provider.d.ts.map +1 -0
- package/dist/core/kernel/runtime.d.ts.map +1 -0
- package/dist/core/kernel/schema.d.ts +13 -0
- package/dist/core/kernel/schema.d.ts.map +1 -0
- package/dist/core/kernel/stabilize.d.ts +13 -0
- package/dist/core/kernel/stabilize.d.ts.map +1 -0
- package/dist/core/kernel/store-batch.d.ts +17 -0
- package/dist/core/kernel/store-batch.d.ts.map +1 -0
- package/dist/core/kernel/store-entries.d.ts +6 -0
- package/dist/core/kernel/store-entries.d.ts.map +1 -0
- package/dist/core/kernel/store-handles.d.ts +4 -0
- package/dist/core/kernel/store-handles.d.ts.map +1 -0
- package/dist/core/kernel/store-registration.d.ts +14 -0
- package/dist/core/kernel/store-registration.d.ts.map +1 -0
- package/dist/core/kernel/store-snapshots.d.ts +14 -0
- package/dist/core/kernel/store-snapshots.d.ts.map +1 -0
- package/dist/core/kernel/store-subscriptions.d.ts +16 -0
- package/dist/core/kernel/store-subscriptions.d.ts.map +1 -0
- package/dist/core/kernel/store.d.ts +8 -0
- package/dist/core/kernel/store.d.ts.map +1 -0
- package/dist/core/kernel/types-modules.d.ts +82 -0
- package/dist/core/kernel/types-modules.d.ts.map +1 -0
- package/dist/core/kernel/types-page.d.ts +67 -0
- package/dist/core/kernel/types-page.d.ts.map +1 -0
- package/dist/core/kernel/types-store.d.ts +71 -0
- package/dist/core/kernel/types-store.d.ts.map +1 -0
- package/dist/core/kernel/types.d.ts +169 -0
- package/dist/core/kernel/types.d.ts.map +1 -0
- package/dist/core/kernel/utils.d.ts +21 -0
- package/dist/core/kernel/utils.d.ts.map +1 -0
- package/dist/core/navigation/constants.d.ts +48 -0
- package/dist/core/navigation/constants.d.ts.map +1 -0
- package/dist/core/navigation/navigator-defaults.d.ts +4 -0
- package/dist/core/navigation/navigator-defaults.d.ts.map +1 -0
- package/dist/core/navigation/navigator-holds.d.ts +8 -0
- package/dist/core/navigation/navigator-holds.d.ts.map +1 -0
- package/dist/core/navigation/navigator-patience.d.ts +15 -0
- package/dist/core/navigation/navigator-patience.d.ts.map +1 -0
- package/dist/core/navigation/navigator-payload.d.ts +6 -0
- package/dist/core/navigation/navigator-payload.d.ts.map +1 -0
- package/dist/core/navigation/navigator-prefetch.d.ts +13 -0
- package/dist/core/navigation/navigator-prefetch.d.ts.map +1 -0
- package/dist/core/navigation/navigator.d.ts +7 -0
- package/dist/core/navigation/navigator.d.ts.map +1 -0
- package/dist/core/navigation/settings.d.ts +12 -0
- package/dist/core/navigation/settings.d.ts.map +1 -0
- package/dist/core/navigation/state.d.ts +26 -0
- package/dist/core/navigation/state.d.ts.map +1 -0
- package/dist/core/navigation/types.d.ts +194 -0
- package/dist/core/navigation/types.d.ts.map +1 -0
- package/dist/core/navigation/utils.d.ts +18 -0
- package/dist/core/navigation/utils.d.ts.map +1 -0
- package/dist/core/provider/index.d.ts +31 -0
- package/dist/core/provider/index.d.ts.map +1 -0
- package/dist/dock/index.d.ts +1 -0
- package/dist/dock/index.js +18 -0
- package/dist/error/index.d.ts +1 -9
- package/dist/error/index.js +8 -5
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.js +83 -0
- package/dist/events/index.js.map +1 -0
- package/dist/foundation/events/index.d.ts +67 -0
- package/dist/foundation/events/index.d.ts.map +1 -0
- package/dist/foundation/recipes/anatomy.d.ts +139 -0
- package/dist/foundation/recipes/anatomy.d.ts.map +1 -0
- package/dist/foundation/recipes/cn.d.ts +17 -0
- package/dist/foundation/recipes/cn.d.ts.map +1 -0
- package/dist/foundation/recipes/define.d.ts +134 -0
- package/dist/foundation/recipes/define.d.ts.map +1 -0
- package/dist/foundation/recipes/index.d.ts +11 -0
- package/dist/foundation/recipes/index.d.ts.map +1 -0
- package/dist/foundation/recipes/recipe.d.ts +97 -0
- package/dist/foundation/recipes/recipe.d.ts.map +1 -0
- package/dist/foundation/recipes/split.d.ts +10 -0
- package/dist/foundation/recipes/split.d.ts.map +1 -0
- package/dist/foundation/result/index.d.ts +98 -0
- package/dist/foundation/result/index.d.ts.map +1 -0
- package/dist/foundation/utils/dom.d.ts +19 -0
- package/dist/foundation/utils/dom.d.ts.map +1 -0
- package/dist/foundation/utils/index.d.ts +17 -0
- package/dist/foundation/utils/index.d.ts.map +1 -0
- package/dist/foundation/utils/number.d.ts +9 -0
- package/dist/foundation/utils/number.d.ts.map +1 -0
- package/dist/foundation/utils/object.d.ts +17 -0
- package/dist/foundation/utils/object.d.ts.map +1 -0
- package/dist/foundation/utils/report.d.ts +18 -0
- package/dist/foundation/utils/report.d.ts.map +1 -0
- package/dist/foundation/utils/scheduler.d.ts +52 -0
- package/dist/foundation/utils/scheduler.d.ts.map +1 -0
- package/dist/foundation/utils/store.d.ts +21 -0
- package/dist/foundation/utils/store.d.ts.map +1 -0
- package/dist/foundation/utils/string.d.ts +18 -0
- package/dist/foundation/utils/string.d.ts.map +1 -0
- package/dist/foundation/utils/tempo.d.ts +61 -0
- package/dist/foundation/utils/tempo.d.ts.map +1 -0
- package/dist/foundation/utils/timing.d.ts +13 -0
- package/dist/foundation/utils/timing.d.ts.map +1 -0
- package/dist/foundation/utils/transform.d.ts +17 -0
- package/dist/foundation/utils/transform.d.ts.map +1 -0
- package/dist/foundation/utils/user-message.d.ts +32 -0
- package/dist/foundation/utils/user-message.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -10
- package/dist/hooks/index.js +3 -1
- package/dist/index.d.ts +8 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -20
- package/dist/kernel/index.d.ts +1 -15
- package/dist/kernel/index.js +5 -2
- package/dist/loading/index.d.ts +1 -0
- package/dist/loading/index.js +12 -0
- package/dist/media/index.d.ts +1 -0
- package/dist/media/index.js +9 -0
- package/dist/modal/index.d.ts +1 -0
- package/dist/modal/index.js +310 -0
- package/dist/modal/index.js.map +1 -0
- package/dist/modules/ambient/analyze-bounds.d.ts +12 -0
- package/dist/modules/ambient/analyze-bounds.d.ts.map +1 -0
- package/dist/modules/ambient/analyze-clusters.d.ts +14 -0
- package/dist/modules/ambient/analyze-clusters.d.ts.map +1 -0
- package/dist/modules/ambient/analyze-measures.d.ts +22 -0
- package/dist/modules/ambient/analyze-measures.d.ts.map +1 -0
- package/dist/modules/ambient/analyze-swatches.d.ts +16 -0
- package/dist/modules/ambient/analyze-swatches.d.ts.map +1 -0
- package/dist/modules/ambient/analyze.d.ts +9 -49
- package/dist/modules/ambient/analyze.d.ts.map +1 -1
- package/dist/modules/ambient/constants.d.ts +4 -1
- package/dist/modules/ambient/constants.d.ts.map +1 -1
- package/dist/modules/ambient/context.d.ts +6 -0
- package/dist/modules/ambient/context.d.ts.map +1 -1
- package/dist/modules/ambient/dom.d.ts +23 -12
- package/dist/modules/ambient/dom.d.ts.map +1 -1
- package/dist/modules/ambient/extractor.d.ts +6 -4
- package/dist/modules/ambient/extractor.d.ts.map +1 -1
- package/dist/modules/ambient/hooks.d.ts +12 -0
- package/dist/modules/ambient/hooks.d.ts.map +1 -1
- package/dist/modules/ambient/index.d.ts +2 -2
- package/dist/modules/ambient/index.d.ts.map +1 -1
- package/dist/modules/ambient/module.d.ts +12 -1
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/oklab.d.ts +18 -13
- package/dist/modules/ambient/oklab.d.ts.map +1 -1
- package/dist/modules/ambient/pipeline.d.ts +0 -7
- package/dist/modules/ambient/pipeline.d.ts.map +1 -1
- package/dist/modules/ambient/quantize.d.ts +2 -9
- package/dist/modules/ambient/quantize.d.ts.map +1 -1
- package/dist/modules/ambient/server/address.d.ts +8 -3
- package/dist/modules/ambient/server/address.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.d.ts +20 -23
- package/dist/modules/ambient/server/index.d.ts.map +1 -1
- package/dist/modules/ambient/settings.d.ts +23 -3
- package/dist/modules/ambient/settings.d.ts.map +1 -1
- package/dist/modules/ambient/types.d.ts +98 -36
- package/dist/modules/ambient/types.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts +16 -1
- package/dist/modules/ambient/worker/index.d.ts.map +1 -1
- package/dist/modules/background/components/background-gradients.d.ts +8 -0
- package/dist/modules/background/components/background-gradients.d.ts.map +1 -0
- package/dist/modules/background/components/edge-gradient.d.ts +9 -0
- package/dist/modules/background/components/edge-gradient.d.ts.map +1 -0
- package/dist/modules/background/components/native-video.d.ts +4 -0
- package/dist/modules/background/components/native-video.d.ts.map +1 -0
- package/dist/modules/background/components/noise-overlay.d.ts +11 -0
- package/dist/modules/background/components/noise-overlay.d.ts.map +1 -0
- package/dist/modules/background/components/overlay.d.ts +6 -0
- package/dist/modules/background/components/overlay.d.ts.map +1 -0
- package/dist/modules/background/components/solid-overlay.d.ts +10 -0
- package/dist/modules/background/components/solid-overlay.d.ts.map +1 -0
- package/dist/modules/background/constants.d.ts +14 -1
- package/dist/modules/background/constants.d.ts.map +1 -1
- package/dist/modules/background/context.d.ts +7 -0
- package/dist/modules/background/context.d.ts.map +1 -1
- package/dist/modules/background/hooks/use-background-media-source.d.ts +4 -0
- package/dist/modules/background/hooks/use-background-media-source.d.ts.map +1 -0
- package/dist/modules/background/hooks/use-background-motion-model.d.ts +15 -0
- package/dist/modules/background/hooks/use-background-motion-model.d.ts.map +1 -0
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts +929 -0
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts.map +1 -0
- package/dist/modules/background/hooks/use-native-video-model.d.ts +22 -0
- package/dist/modules/background/hooks/use-native-video-model.d.ts.map +1 -0
- package/dist/modules/background/hooks.d.ts +20 -1
- package/dist/modules/background/hooks.d.ts.map +1 -1
- package/dist/modules/background/index.d.ts +7 -7
- package/dist/modules/background/index.d.ts.map +1 -1
- package/dist/modules/background/lib/theme.d.ts +4 -0
- package/dist/modules/background/lib/theme.d.ts.map +1 -0
- package/dist/modules/background/model/override.d.ts +14 -0
- package/dist/modules/background/model/override.d.ts.map +1 -0
- package/dist/modules/background/model/playback.d.ts +25 -0
- package/dist/modules/background/model/playback.d.ts.map +1 -0
- package/dist/modules/background/model/state.d.ts +31 -0
- package/dist/modules/background/model/state.d.ts.map +1 -0
- package/dist/modules/background/model/video-frame.d.ts +31 -0
- package/dist/modules/background/model/video-frame.d.ts.map +1 -0
- package/dist/modules/background/model/visual.d.ts +932 -0
- package/dist/modules/background/model/visual.d.ts.map +1 -0
- package/dist/modules/background/module.d.ts +11 -0
- package/dist/modules/background/module.d.ts.map +1 -1
- package/dist/modules/background/motion.d.ts.map +1 -1
- package/dist/modules/background/types.d.ts +66 -10
- package/dist/modules/background/types.d.ts.map +1 -1
- package/dist/modules/background/youtube/components/player.d.ts +7 -0
- package/dist/modules/background/youtube/components/player.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-background-player-model.d.ts +27 -0
- package/dist/modules/background/youtube/hooks/use-youtube-background-player-model.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts +20 -0
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts +8 -0
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-video-sync.d.ts +16 -0
- package/dist/modules/background/youtube/hooks/use-youtube-video-sync.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/audio.d.ts +17 -0
- package/dist/modules/background/youtube/lib/audio.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts +29 -0
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts +47 -0
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/iframe.d.ts +47 -0
- package/dist/modules/background/youtube/lib/iframe.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/parse.d.ts +36 -0
- package/dist/modules/background/youtube/lib/parse.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/timing.d.ts +11 -0
- package/dist/modules/background/youtube/lib/timing.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/video-events.d.ts +53 -0
- package/dist/modules/background/youtube/lib/video-events.d.ts.map +1 -0
- package/dist/modules/context-menu/constants.d.ts +30 -1
- package/dist/modules/context-menu/constants.d.ts.map +1 -1
- package/dist/modules/context-menu/context.d.ts +10 -2
- package/dist/modules/context-menu/context.d.ts.map +1 -1
- package/dist/modules/context-menu/dom.d.ts +13 -0
- package/dist/modules/context-menu/dom.d.ts.map +1 -1
- package/dist/modules/context-menu/hooks.d.ts +32 -5
- package/dist/modules/context-menu/hooks.d.ts.map +1 -1
- package/dist/modules/context-menu/index.d.ts +1 -1
- package/dist/modules/context-menu/index.d.ts.map +1 -1
- package/dist/modules/context-menu/items.d.ts +25 -0
- package/dist/modules/context-menu/items.d.ts.map +1 -1
- package/dist/modules/context-menu/module.d.ts +6 -0
- package/dist/modules/context-menu/module.d.ts.map +1 -1
- package/dist/modules/context-menu/motion.d.ts.map +1 -1
- package/dist/modules/context-menu/overlay.d.ts +30 -8
- package/dist/modules/context-menu/overlay.d.ts.map +1 -1
- package/dist/modules/context-menu/resolver.d.ts +8 -0
- package/dist/modules/context-menu/resolver.d.ts.map +1 -1
- package/dist/modules/context-menu/state.d.ts +9 -0
- package/dist/modules/context-menu/state.d.ts.map +1 -1
- package/dist/modules/context-menu/types.d.ts +85 -9
- package/dist/modules/context-menu/types.d.ts.map +1 -1
- package/dist/modules/controls/constants.d.ts +18 -1
- package/dist/modules/controls/constants.d.ts.map +1 -1
- package/dist/modules/controls/entries.d.ts +23 -1
- package/dist/modules/controls/entries.d.ts.map +1 -1
- package/dist/modules/controls/hooks.d.ts +11 -1
- package/dist/modules/controls/hooks.d.ts.map +1 -1
- package/dist/modules/controls/layout.d.ts +17 -0
- package/dist/modules/controls/layout.d.ts.map +1 -1
- package/dist/modules/controls/module.d.ts +7 -1
- package/dist/modules/controls/module.d.ts.map +1 -1
- package/dist/modules/controls/overlay.d.ts +11 -1
- package/dist/modules/controls/overlay.d.ts.map +1 -1
- package/dist/modules/controls/types.d.ts +51 -2
- package/dist/modules/controls/types.d.ts.map +1 -1
- package/dist/modules/dock/components/badge.d.ts +5 -0
- package/dist/modules/dock/components/badge.d.ts.map +1 -0
- package/dist/modules/dock/components/breadcrumbs-card.d.ts +6 -0
- package/dist/modules/dock/components/breadcrumbs-card.d.ts.map +1 -0
- package/dist/modules/dock/components/card-banner.d.ts +4 -0
- package/dist/modules/dock/components/card-banner.d.ts.map +1 -0
- package/dist/modules/dock/components/card-header.d.ts +4 -0
- package/dist/modules/dock/components/card-header.d.ts.map +1 -0
- package/dist/modules/dock/components/card-item.d.ts +3 -0
- package/dist/modules/dock/components/card-item.d.ts.map +1 -0
- package/dist/modules/dock/components/command-bar.d.ts +7 -0
- package/dist/modules/dock/components/command-bar.d.ts.map +1 -0
- package/dist/modules/dock/components/description.d.ts +4 -0
- package/dist/modules/dock/components/description.d.ts.map +1 -0
- package/dist/modules/dock/components/dock.d.ts +4 -0
- package/dist/modules/dock/components/dock.d.ts.map +1 -0
- package/dist/modules/dock/components/hud-view.d.ts +7 -0
- package/dist/modules/dock/components/hud-view.d.ts.map +1 -0
- package/dist/modules/dock/components/icon.d.ts +6 -0
- package/dist/modules/dock/components/icon.d.ts.map +1 -0
- package/dist/modules/dock/components/item-content.d.ts +4 -0
- package/dist/modules/dock/components/item-content.d.ts.map +1 -0
- package/dist/modules/dock/components/media-action.d.ts +4 -0
- package/dist/modules/dock/components/media-action.d.ts.map +1 -0
- package/dist/modules/dock/components/media-controls.d.ts +4 -0
- package/dist/modules/dock/components/media-controls.d.ts.map +1 -0
- package/dist/modules/dock/components/media-scrubber.d.ts +5 -0
- package/dist/modules/dock/components/media-scrubber.d.ts.map +1 -0
- package/dist/modules/dock/components/status-actions.d.ts +10 -0
- package/dist/modules/dock/components/status-actions.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/action.d.ts +17 -0
- package/dist/modules/dock/components/surface/action.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/controls.d.ts +12 -0
- package/dist/modules/dock/components/surface/controls.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/extensions-bar.d.ts +5 -0
- package/dist/modules/dock/components/surface/extensions-bar.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/header-button.d.ts +14 -0
- package/dist/modules/dock/components/surface/header-button.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/item-content.d.ts +6 -0
- package/dist/modules/dock/components/surface/item-content.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/shell.d.ts +3 -0
- package/dist/modules/dock/components/surface/shell.d.ts.map +1 -0
- package/dist/modules/dock/components/title.d.ts +4 -0
- package/dist/modules/dock/components/title.d.ts.map +1 -0
- package/dist/modules/dock/constants.d.ts +11 -2
- package/dist/modules/dock/constants.d.ts.map +1 -1
- package/dist/modules/dock/context.d.ts +8 -2
- package/dist/modules/dock/context.d.ts.map +1 -1
- package/dist/modules/dock/hooks/use-action-slot.d.ts +6 -0
- package/dist/modules/dock/hooks/use-action-slot.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-badge.d.ts +4 -0
- package/dist/modules/dock/hooks/use-badge.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts +18 -0
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-card-header-model.d.ts +7 -0
- package/dist/modules/dock/hooks/use-card-header-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-card-item-model.d.ts +1612 -0
- package/dist/modules/dock/hooks/use-card-item-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts +12 -0
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-banner.d.ts +11 -0
- package/dist/modules/dock/hooks/use-dock-banner.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-config.d.ts +19 -0
- package/dist/modules/dock/hooks/use-dock-config.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts +7 -0
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts +7 -0
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts +6 -0
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts +11 -0
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-registration.d.ts +8 -0
- package/dist/modules/dock/hooks/use-dock-registration.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts +2 -0
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-theme.d.ts +6 -0
- package/dist/modules/dock/hooks/use-dock-theme.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts +6 -0
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-element-height.d.ts +3 -0
- package/dist/modules/dock/hooks/use-element-height.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-hud-registry.d.ts +16 -0
- package/dist/modules/dock/hooks/use-hud-registry.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts +9 -0
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-media-controls-model.d.ts +27 -0
- package/dist/modules/dock/hooks/use-media-controls-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts +27 -0
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts +12 -0
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-surface-return.d.ts +8 -0
- package/dist/modules/dock/hooks/use-surface-return.d.ts.map +1 -0
- package/dist/modules/dock/hud.d.ts +8 -34
- package/dist/modules/dock/hud.d.ts.map +1 -1
- package/dist/modules/dock/index.d.ts +18 -12
- package/dist/modules/dock/index.d.ts.map +1 -1
- package/dist/modules/dock/lib/banner.d.ts +43 -0
- package/dist/modules/dock/lib/banner.d.ts.map +1 -0
- package/dist/modules/dock/lib/card-item.d.ts +46 -0
- package/dist/modules/dock/lib/card-item.d.ts.map +1 -0
- package/dist/modules/dock/lib/card.d.ts +20 -0
- package/dist/modules/dock/lib/card.d.ts.map +1 -0
- package/dist/modules/dock/lib/command-bar.d.ts +8 -0
- package/dist/modules/dock/lib/command-bar.d.ts.map +1 -0
- package/dist/modules/dock/lib/dom.d.ts +7 -0
- package/dist/modules/dock/lib/dom.d.ts.map +1 -0
- package/dist/modules/dock/lib/element-helpers.d.ts +8 -0
- package/dist/modules/dock/lib/element-helpers.d.ts.map +1 -0
- package/dist/modules/dock/lib/helpers.d.ts +19 -0
- package/dist/modules/dock/lib/helpers.d.ts.map +1 -0
- package/dist/modules/dock/lib/media.d.ts +35 -0
- package/dist/modules/dock/lib/media.d.ts.map +1 -0
- package/dist/modules/dock/lib/styles.d.ts +902 -0
- package/dist/modules/dock/lib/styles.d.ts.map +1 -0
- package/dist/modules/dock/model/hud-definition.d.ts +13 -0
- package/dist/modules/dock/model/hud-definition.d.ts.map +1 -0
- package/dist/modules/dock/model/hud.d.ts +10 -0
- package/dist/modules/dock/model/hud.d.ts.map +1 -0
- package/dist/modules/dock/model/layout.d.ts +28 -0
- package/dist/modules/dock/model/layout.d.ts.map +1 -0
- package/dist/modules/dock/model/page-entry.d.ts +11 -0
- package/dist/modules/dock/model/page-entry.d.ts.map +1 -0
- package/dist/modules/dock/model/page-surface.d.ts +4 -0
- package/dist/modules/dock/model/page-surface.d.ts.map +1 -0
- package/dist/modules/dock/model/paths.d.ts +15 -0
- package/dist/modules/dock/model/paths.d.ts.map +1 -0
- package/dist/modules/dock/model/state.d.ts +28 -0
- package/dist/modules/dock/model/state.d.ts.map +1 -0
- package/dist/modules/dock/model/surface-return.d.ts +14 -0
- package/dist/modules/dock/model/surface-return.d.ts.map +1 -0
- package/dist/modules/dock/module.d.ts +5 -7
- package/dist/modules/dock/module.d.ts.map +1 -1
- package/dist/modules/dock/motion.d.ts +716 -11
- package/dist/modules/dock/motion.d.ts.map +1 -1
- package/dist/modules/dock/provider.d.ts +2 -1
- package/dist/modules/dock/provider.d.ts.map +1 -1
- package/dist/modules/dock/routing/breadcrumbs.d.ts +6 -2
- package/dist/modules/dock/routing/breadcrumbs.d.ts.map +1 -1
- package/dist/modules/dock/routing/continuity.d.ts +46 -14
- package/dist/modules/dock/routing/continuity.d.ts.map +1 -1
- package/dist/modules/dock/routing/guards.d.ts +10 -1
- package/dist/modules/dock/routing/guards.d.ts.map +1 -1
- package/dist/modules/dock/routing/hooks/use-route-prefetch.d.ts +12 -0
- package/dist/modules/dock/routing/hooks/use-route-prefetch.d.ts.map +1 -0
- package/dist/modules/dock/routing/lib/restore.d.ts +7 -0
- package/dist/modules/dock/routing/lib/restore.d.ts.map +1 -0
- package/dist/modules/dock/routing/model/continuity.d.ts +21 -0
- package/dist/modules/dock/routing/model/continuity.d.ts.map +1 -0
- package/dist/modules/dock/routing/model/policy.d.ts +7 -0
- package/dist/modules/dock/routing/model/policy.d.ts.map +1 -0
- package/dist/modules/dock/routing/model/topology.d.ts +5 -0
- package/dist/modules/dock/routing/model/topology.d.ts.map +1 -0
- package/dist/modules/dock/routing/navigation.d.ts +10 -23
- package/dist/modules/dock/routing/navigation.d.ts.map +1 -1
- package/dist/modules/dock/runtime/commands.d.ts +10 -1
- package/dist/modules/dock/runtime/commands.d.ts.map +1 -1
- package/dist/modules/dock/runtime/display.d.ts +9 -48
- package/dist/modules/dock/runtime/display.d.ts.map +1 -1
- package/dist/modules/dock/runtime/dock.d.ts +11 -70
- package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts +10 -0
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts +10 -0
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts +14 -0
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts +7 -0
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock.d.ts +30 -0
- package/dist/modules/dock/runtime/hooks/use-dock.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/attention.d.ts +25 -0
- package/dist/modules/dock/runtime/model/attention.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/cards.d.ts +64 -0
- package/dist/modules/dock/runtime/model/cards.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/items.d.ts +31 -0
- package/dist/modules/dock/runtime/model/items.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/layout.d.ts +10 -0
- package/dist/modules/dock/runtime/model/layout.d.ts.map +1 -0
- package/dist/modules/dock/runtime/pipeline.d.ts +1 -1
- package/dist/modules/dock/runtime/pipeline.d.ts.map +1 -1
- package/dist/modules/dock/runtime/provider-actions.d.ts +38 -0
- package/dist/modules/dock/runtime/provider-actions.d.ts.map +1 -0
- package/dist/modules/dock/status/action-options.d.ts +35 -0
- package/dist/modules/dock/status/action-options.d.ts.map +1 -0
- package/dist/modules/dock/status/events.d.ts +2 -2
- package/dist/modules/dock/status/events.d.ts.map +1 -1
- package/dist/modules/dock/status/hooks.d.ts +1 -1
- package/dist/modules/dock/status/hooks.d.ts.map +1 -1
- package/dist/modules/dock/status/model.d.ts +12 -32
- package/dist/modules/dock/status/model.d.ts.map +1 -1
- package/dist/modules/dock/status/state.d.ts +12 -0
- package/dist/modules/dock/status/state.d.ts.map +1 -0
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts +5 -0
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts.map +1 -0
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts +7 -0
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts.map +1 -0
- package/dist/modules/dock/surface/constants.d.ts +5 -0
- package/dist/modules/dock/surface/constants.d.ts.map +1 -0
- package/dist/modules/dock/surface/context.d.ts +14 -1
- package/dist/modules/dock/surface/context.d.ts.map +1 -1
- package/dist/modules/dock/surface/definition.d.ts +28 -2
- package/dist/modules/dock/surface/definition.d.ts.map +1 -1
- package/dist/modules/dock/surface/helpers.d.ts +2 -1
- package/dist/modules/dock/surface/helpers.d.ts.map +1 -1
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts +15 -0
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts +7 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts +14 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-flow.d.ts +20 -0
- package/dist/modules/dock/surface/hooks/use-surface-flow.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts +13 -0
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-shell-model.d.ts +28 -0
- package/dist/modules/dock/surface/hooks/use-surface-shell-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/lib/drag.d.ts +9 -0
- package/dist/modules/dock/surface/lib/drag.d.ts.map +1 -0
- package/dist/modules/dock/surface/lib/target.d.ts +8 -0
- package/dist/modules/dock/surface/lib/target.d.ts.map +1 -0
- package/dist/modules/dock/surface/machine.d.ts +17 -62
- package/dist/modules/dock/surface/machine.d.ts.map +1 -1
- package/dist/modules/dock/surface/model/builder.d.ts +39 -0
- package/dist/modules/dock/surface/model/builder.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/normalize.d.ts +13 -0
- package/dist/modules/dock/surface/model/normalize.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/open.d.ts +26 -0
- package/dist/modules/dock/surface/model/open.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/records.d.ts +45 -0
- package/dist/modules/dock/surface/model/records.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/steps.d.ts +9 -0
- package/dist/modules/dock/surface/model/steps.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/transition-state.d.ts +23 -0
- package/dist/modules/dock/surface/model/transition-state.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/url.d.ts +14 -0
- package/dist/modules/dock/surface/model/url.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/choreography.d.ts +22 -0
- package/dist/modules/dock/surface/runtime/choreography.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/context.d.ts +29 -0
- package/dist/modules/dock/surface/runtime/context.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/flows.d.ts +21 -0
- package/dist/modules/dock/surface/runtime/flows.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/open.d.ts +6 -0
- package/dist/modules/dock/surface/runtime/open.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/release.d.ts +9 -0
- package/dist/modules/dock/surface/runtime/release.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/steps.d.ts +10 -0
- package/dist/modules/dock/surface/runtime/steps.d.ts.map +1 -0
- package/dist/modules/dock/surface/stack.d.ts +20 -11
- package/dist/modules/dock/surface/stack.d.ts.map +1 -1
- package/dist/modules/dock/surface/view-model.d.ts +5 -1
- package/dist/modules/dock/surface/view-model.d.ts.map +1 -1
- package/dist/modules/dock/types/card.d.ts +297 -0
- package/dist/modules/dock/types/card.d.ts.map +1 -0
- package/dist/modules/dock/types/hud.d.ts +142 -0
- package/dist/modules/dock/types/hud.d.ts.map +1 -0
- package/dist/modules/dock/types/index.d.ts +8 -0
- package/dist/modules/dock/types/index.d.ts.map +1 -0
- package/dist/modules/dock/types/media.d.ts +66 -0
- package/dist/modules/dock/types/media.d.ts.map +1 -0
- package/dist/modules/dock/types/routing.d.ts +336 -0
- package/dist/modules/dock/types/routing.d.ts.map +1 -0
- package/dist/modules/dock/types/surface-flow.d.ts +231 -0
- package/dist/modules/dock/types/surface-flow.d.ts.map +1 -0
- package/dist/modules/dock/types/surface.d.ts +194 -0
- package/dist/modules/dock/types/surface.d.ts.map +1 -0
- package/dist/modules/dock/types/theme.d.ts +201 -0
- package/dist/modules/dock/types/theme.d.ts.map +1 -0
- package/dist/modules/index.d.ts +4 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +23 -18
- package/dist/modules/loading/constants.d.ts +18 -1
- package/dist/modules/loading/constants.d.ts.map +1 -1
- package/dist/modules/loading/context.d.ts +11 -1
- package/dist/modules/loading/context.d.ts.map +1 -1
- package/dist/modules/loading/hooks.d.ts +24 -1
- package/dist/modules/loading/hooks.d.ts.map +1 -1
- package/dist/modules/loading/index.d.ts +1 -1
- package/dist/modules/loading/index.d.ts.map +1 -1
- package/dist/modules/loading/module.d.ts +6 -0
- package/dist/modules/loading/module.d.ts.map +1 -1
- package/dist/modules/loading/overlay.d.ts +3 -0
- package/dist/modules/loading/overlay.d.ts.map +1 -1
- package/dist/modules/loading/state.d.ts +13 -0
- package/dist/modules/loading/state.d.ts.map +1 -1
- package/dist/modules/loading/types.d.ts +42 -2
- package/dist/modules/loading/types.d.ts.map +1 -1
- package/dist/modules/media/constants.d.ts +19 -0
- package/dist/modules/media/constants.d.ts.map +1 -1
- package/dist/modules/media/context.d.ts +11 -1
- package/dist/modules/media/context.d.ts.map +1 -1
- package/dist/modules/media/hooks.d.ts +17 -0
- package/dist/modules/media/hooks.d.ts.map +1 -1
- package/dist/modules/media/index.d.ts +1 -1
- package/dist/modules/media/index.d.ts.map +1 -1
- package/dist/modules/media/module.d.ts +4 -0
- package/dist/modules/media/module.d.ts.map +1 -1
- package/dist/modules/media/overlay.d.ts +7 -0
- package/dist/modules/media/overlay.d.ts.map +1 -1
- package/dist/modules/media/playback.d.ts +13 -0
- package/dist/modules/media/playback.d.ts.map +1 -1
- package/dist/modules/media/session.d.ts +20 -0
- package/dist/modules/media/session.d.ts.map +1 -1
- package/dist/modules/media/types.d.ts +49 -2
- package/dist/modules/media/types.d.ts.map +1 -1
- package/dist/modules/modal/components/close-button.d.ts +6 -0
- package/dist/modules/modal/components/close-button.d.ts.map +1 -0
- package/dist/modules/modal/components/modal-container.d.ts +7 -0
- package/dist/modules/modal/components/modal-container.d.ts.map +1 -0
- package/dist/modules/modal/components/modal-layer-switcher.d.ts +9 -0
- package/dist/modules/modal/components/modal-layer-switcher.d.ts.map +1 -0
- package/dist/modules/modal/components/modal-layer.d.ts +17 -0
- package/dist/modules/modal/components/modal-layer.d.ts.map +1 -0
- package/dist/modules/modal/components/overlay.d.ts +6 -0
- package/dist/modules/modal/components/overlay.d.ts.map +1 -0
- package/dist/modules/modal/components/resolve-header.d.ts +10 -0
- package/dist/modules/modal/components/resolve-header.d.ts.map +1 -0
- package/dist/modules/modal/components/slot-row.d.ts +12 -0
- package/dist/modules/modal/components/slot-row.d.ts.map +1 -0
- package/dist/modules/modal/constants.d.ts +16 -1
- package/dist/modules/modal/constants.d.ts.map +1 -1
- package/dist/modules/modal/context.d.ts +7 -1
- package/dist/modules/modal/context.d.ts.map +1 -1
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts +3 -0
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts.map +1 -0
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts +12 -0
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts.map +1 -0
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts +3 -0
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts.map +1 -0
- package/dist/modules/modal/hooks.d.ts +30 -4
- package/dist/modules/modal/hooks.d.ts.map +1 -1
- package/dist/modules/modal/index.d.ts +8 -7
- package/dist/modules/modal/index.d.ts.map +1 -1
- package/dist/modules/modal/lib/dom.d.ts +13 -0
- package/dist/modules/modal/lib/dom.d.ts.map +1 -0
- package/dist/modules/modal/lib/theme.d.ts +4 -0
- package/dist/modules/modal/lib/theme.d.ts.map +1 -0
- package/dist/modules/modal/model/entry.d.ts +18 -0
- package/dist/modules/modal/model/entry.d.ts.map +1 -0
- package/dist/modules/modal/model/header.d.ts +16 -0
- package/dist/modules/modal/model/header.d.ts.map +1 -0
- package/dist/modules/modal/model/identity.d.ts +13 -0
- package/dist/modules/modal/model/identity.d.ts.map +1 -0
- package/dist/modules/modal/model/layout.d.ts +37 -0
- package/dist/modules/modal/model/layout.d.ts.map +1 -0
- package/dist/modules/modal/model/state.d.ts +10 -0
- package/dist/modules/modal/model/state.d.ts.map +1 -0
- package/dist/modules/modal/module.d.ts +7 -0
- package/dist/modules/modal/module.d.ts.map +1 -1
- package/dist/modules/modal/motion.d.ts.map +1 -1
- package/dist/modules/modal/types.d.ts +73 -10
- package/dist/modules/modal/types.d.ts.map +1 -1
- package/dist/modules/navigation/context.d.ts +16 -5
- package/dist/modules/navigation/context.d.ts.map +1 -1
- package/dist/modules/navigation/hooks.d.ts +22 -13
- package/dist/modules/navigation/hooks.d.ts.map +1 -1
- package/dist/modules/navigation/index.d.ts +5 -5
- package/dist/modules/navigation/index.d.ts.map +1 -1
- package/dist/modules/navigation/listeners.d.ts +6 -8
- package/dist/modules/navigation/listeners.d.ts.map +1 -1
- package/dist/modules/navigation/module.d.ts +5 -2
- package/dist/modules/navigation/module.d.ts.map +1 -1
- package/dist/modules/notification/constants.d.ts +22 -2
- package/dist/modules/notification/constants.d.ts.map +1 -1
- package/dist/modules/notification/context.d.ts +12 -2
- package/dist/modules/notification/context.d.ts.map +1 -1
- package/dist/modules/notification/hooks.d.ts +32 -1
- package/dist/modules/notification/hooks.d.ts.map +1 -1
- package/dist/modules/notification/module.d.ts +3 -0
- package/dist/modules/notification/module.d.ts.map +1 -1
- package/dist/modules/notification/motion.d.ts.map +1 -1
- package/dist/modules/notification/overlay.d.ts.map +1 -1
- package/dist/modules/notification/state.d.ts +28 -0
- package/dist/modules/notification/state.d.ts.map +1 -1
- package/dist/modules/notification/types.d.ts +48 -5
- package/dist/modules/notification/types.d.ts.map +1 -1
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +189 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/notification/index.d.ts +1 -0
- package/dist/notification/index.js +11 -0
- package/dist/overlay-QHSJBV3O.js +13 -0
- package/dist/overlay-QHSJBV3O.js.map +1 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +14 -0
- package/dist/react/context/index.d.ts +4 -0
- package/dist/react/context/index.d.ts.map +1 -0
- package/dist/react/hooks/index.d.ts +10 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/types.d.ts +25 -0
- package/dist/react/hooks/types.d.ts.map +1 -0
- package/dist/react/hooks/use-click-outside.d.ts +6 -0
- package/dist/react/hooks/use-click-outside.d.ts.map +1 -0
- package/dist/react/hooks/use-controllable-state.d.ts +7 -0
- package/dist/react/hooks/use-controllable-state.d.ts.map +1 -0
- package/dist/react/hooks/use-fullscreen-state.d.ts +7 -0
- package/dist/react/hooks/use-fullscreen-state.d.ts.map +1 -0
- package/dist/react/hooks/use-global-event.d.ts +9 -0
- package/dist/react/hooks/use-global-event.d.ts.map +1 -0
- package/dist/react/hooks/use-hotkey.d.ts +10 -0
- package/dist/react/hooks/use-hotkey.d.ts.map +1 -0
- package/dist/react/hooks/use-required-context.d.ts +6 -0
- package/dist/react/hooks/use-required-context.d.ts.map +1 -0
- package/dist/react/hooks/use-scroll-lock.d.ts +9 -0
- package/dist/react/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/react/hooks/use-store.d.ts +3 -0
- package/dist/react/hooks/use-store.d.ts.map +1 -0
- package/dist/react/theme/index.d.ts +82 -0
- package/dist/react/theme/index.d.ts.map +1 -0
- package/dist/react/ui/components/avatar.d.ts +6 -0
- package/dist/react/ui/components/avatar.d.ts.map +1 -0
- package/dist/react/ui/components/button.d.ts +6 -0
- package/dist/react/ui/components/button.d.ts.map +1 -0
- package/dist/react/ui/components/carousel.d.ts +6 -0
- package/dist/react/ui/components/carousel.d.ts.map +1 -0
- package/dist/react/ui/components/checkbox.d.ts +10 -0
- package/dist/react/ui/components/checkbox.d.ts.map +1 -0
- package/dist/react/ui/components/icon.d.ts +6 -0
- package/dist/react/ui/components/icon.d.ts.map +1 -0
- package/dist/react/ui/components/image.d.ts +6 -0
- package/dist/react/ui/components/image.d.ts.map +1 -0
- package/dist/react/ui/components/indicator.d.ts +45 -0
- package/dist/react/ui/components/indicator.d.ts.map +1 -0
- package/dist/react/ui/components/input.d.ts +10 -0
- package/dist/react/ui/components/input.d.ts.map +1 -0
- package/dist/react/ui/components/loader.d.ts +10 -0
- package/dist/react/ui/components/loader.d.ts.map +1 -0
- package/dist/react/ui/components/segmented.d.ts +6 -0
- package/dist/react/ui/components/segmented.d.ts.map +1 -0
- package/dist/react/ui/components/select-parts.d.ts +22 -0
- package/dist/react/ui/components/select-parts.d.ts.map +1 -0
- package/dist/react/ui/components/select.d.ts +6 -0
- package/dist/react/ui/components/select.d.ts.map +1 -0
- package/dist/react/ui/components/skeleton.d.ts +10 -0
- package/dist/react/ui/components/skeleton.d.ts.map +1 -0
- package/dist/react/ui/components/switch.d.ts +6 -0
- package/dist/react/ui/components/switch.d.ts.map +1 -0
- package/dist/react/ui/components/tooltip.d.ts +11 -0
- package/dist/react/ui/components/tooltip.d.ts.map +1 -0
- package/dist/react/ui/index.d.ts +19 -0
- package/dist/react/ui/index.d.ts.map +1 -0
- package/dist/react/ui/provider.d.ts +22 -0
- package/dist/react/ui/provider.d.ts.map +1 -0
- package/dist/react/ui/types-controls.d.ts +133 -0
- package/dist/react/ui/types-controls.d.ts.map +1 -0
- package/dist/react/ui/types.d.ts +192 -0
- package/dist/react/ui/types.d.ts.map +1 -0
- package/dist/react/ui/utils.d.ts +65 -0
- package/dist/react/ui/utils.d.ts.map +1 -0
- package/dist/recipes/index.d.ts +1 -0
- package/dist/recipes/index.js +233 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/result/index.d.ts +1 -0
- package/dist/result/index.js +98 -0
- package/dist/result/index.js.map +1 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +6 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +2268 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/index.d.ts +1 -15
- package/dist/utils/index.js +194 -71
- package/dist/utils/index.js.map +1 -1
- package/docs/README.md +58 -57
- package/docs/architecture-and-rules.md +133 -58
- package/docs/core-engine.md +36 -52
- package/docs/custom-modules.md +43 -32
- package/docs/design.md +185 -0
- package/docs/getting-started.md +49 -57
- package/docs/modules/README.md +50 -61
- package/docs/modules/ambient.md +95 -87
- package/docs/modules/background.md +39 -36
- package/docs/modules/context-menu.md +19 -18
- package/docs/modules/controls.md +13 -13
- package/docs/modules/dock.md +74 -93
- package/docs/modules/error-boundary.md +2 -2
- package/docs/modules/kernel.md +38 -26
- package/docs/modules/loading.md +14 -14
- package/docs/modules/media.md +13 -13
- package/docs/modules/modal.md +14 -14
- package/docs/modules/navigation.md +87 -84
- package/docs/modules/notification.md +13 -13
- package/docs/modules/result.md +22 -22
- package/docs/proposals/navigation.md +32 -31
- package/docs/testing.md +34 -28
- package/docs/theming.md +67 -44
- package/package.json +106 -88
- package/templates/AGENTS.md +35 -25
- package/dist/atoms/button.d.ts +0 -11
- package/dist/atoms/button.d.ts.map +0 -1
- package/dist/atoms/icon.d.ts +0 -15
- package/dist/atoms/icon.d.ts.map +0 -1
- package/dist/atoms/index.d.ts +0 -5
- package/dist/atoms/index.d.ts.map +0 -1
- package/dist/atoms/index.js +0 -4
- package/dist/atoms/spinner.d.ts +0 -9
- package/dist/atoms/spinner.d.ts.map +0 -1
- package/dist/atoms/tooltip.d.ts +0 -18
- package/dist/atoms/tooltip.d.ts.map +0 -1
- package/dist/chunk-3BUP64Q6.js +0 -105
- package/dist/chunk-3BUP64Q6.js.map +0 -1
- package/dist/chunk-4GMQKD6F.js +0 -353
- package/dist/chunk-4GMQKD6F.js.map +0 -1
- package/dist/chunk-66EYJBIP.js +0 -300
- package/dist/chunk-66EYJBIP.js.map +0 -1
- package/dist/chunk-7HQMXTNP.js +0 -419
- package/dist/chunk-7HQMXTNP.js.map +0 -1
- package/dist/chunk-7TAVYJ3A.js +0 -371
- package/dist/chunk-7TAVYJ3A.js.map +0 -1
- package/dist/chunk-AQ4BNXA2.js +0 -349
- package/dist/chunk-AQ4BNXA2.js.map +0 -1
- package/dist/chunk-CGHZSSFR.js +0 -2166
- package/dist/chunk-CGHZSSFR.js.map +0 -1
- package/dist/chunk-DGCQWQLZ.js +0 -61
- package/dist/chunk-DGCQWQLZ.js.map +0 -1
- package/dist/chunk-FIMPHODX.js +0 -67
- package/dist/chunk-FIMPHODX.js.map +0 -1
- package/dist/chunk-GF7TUX5I.js +0 -1889
- package/dist/chunk-GF7TUX5I.js.map +0 -1
- package/dist/chunk-HHWRTQKQ.js +0 -610
- package/dist/chunk-HHWRTQKQ.js.map +0 -1
- package/dist/chunk-HLL5EHXC.js +0 -485
- package/dist/chunk-HLL5EHXC.js.map +0 -1
- package/dist/chunk-I5GK7VOV.js +0 -28
- package/dist/chunk-I5GK7VOV.js.map +0 -1
- package/dist/chunk-JELG4JLT.js +0 -454
- package/dist/chunk-JELG4JLT.js.map +0 -1
- package/dist/chunk-K676GL7Z.js +0 -51
- package/dist/chunk-K676GL7Z.js.map +0 -1
- package/dist/chunk-QI3ALLIB.js +0 -38
- package/dist/chunk-QI3ALLIB.js.map +0 -1
- package/dist/chunk-R2YGFJDJ.js +0 -408
- package/dist/chunk-R2YGFJDJ.js.map +0 -1
- package/dist/chunk-RFZQWLC5.js +0 -27
- package/dist/chunk-RFZQWLC5.js.map +0 -1
- package/dist/chunk-RIOKLMYM.js +0 -145
- package/dist/chunk-RIOKLMYM.js.map +0 -1
- package/dist/chunk-RRAZKP3J.js +0 -888
- package/dist/chunk-RRAZKP3J.js.map +0 -1
- package/dist/chunk-SYAVGTOX.js +0 -521
- package/dist/chunk-SYAVGTOX.js.map +0 -1
- package/dist/chunk-TG6NMHXI.js +0 -1218
- package/dist/chunk-TG6NMHXI.js.map +0 -1
- package/dist/chunk-TV3WEF5G.js +0 -784
- package/dist/chunk-TV3WEF5G.js.map +0 -1
- package/dist/chunk-WVRMABDN.js +0 -9727
- package/dist/chunk-WVRMABDN.js.map +0 -1
- package/dist/error/boundary.d.ts +0 -14
- package/dist/error/boundary.d.ts.map +0 -1
- package/dist/error/constants.d.ts +0 -18
- package/dist/error/constants.d.ts.map +0 -1
- package/dist/error/index.d.ts.map +0 -1
- package/dist/error/listener.d.ts +0 -2
- package/dist/error/listener.d.ts.map +0 -1
- package/dist/error/reporter.d.ts +0 -32
- package/dist/error/reporter.d.ts.map +0 -1
- package/dist/error/theme.d.ts +0 -3
- package/dist/error/theme.d.ts.map +0 -1
- package/dist/error/types.d.ts +0 -91
- package/dist/error/types.d.ts.map +0 -1
- package/dist/error/utils.d.ts +0 -21
- package/dist/error/utils.d.ts.map +0 -1
- package/dist/events.d.ts +0 -51
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js +0 -82
- package/dist/events.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/types.d.ts +0 -16
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/use-click-outside.d.ts +0 -3
- package/dist/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/hooks/use-controllable-state.d.ts +0 -3
- package/dist/hooks/use-controllable-state.d.ts.map +0 -1
- package/dist/hooks/use-fullscreen-state.d.ts +0 -4
- package/dist/hooks/use-fullscreen-state.d.ts.map +0 -1
- package/dist/hooks/use-global-event.d.ts +0 -5
- package/dist/hooks/use-global-event.d.ts.map +0 -1
- package/dist/hooks/use-hotkey.d.ts +0 -4
- package/dist/hooks/use-hotkey.d.ts.map +0 -1
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +0 -3
- package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +0 -1
- package/dist/hooks/use-required-context.d.ts +0 -3
- package/dist/hooks/use-required-context.d.ts.map +0 -1
- package/dist/hooks/use-store.d.ts +0 -3
- package/dist/hooks/use-store.d.ts.map +0 -1
- package/dist/kernel/adapters.d.ts +0 -5
- package/dist/kernel/adapters.d.ts.map +0 -1
- package/dist/kernel/compose.d.ts +0 -15
- package/dist/kernel/compose.d.ts.map +0 -1
- package/dist/kernel/constants.d.ts +0 -12
- package/dist/kernel/constants.d.ts.map +0 -1
- package/dist/kernel/context-registry.d.ts +0 -3
- package/dist/kernel/context-registry.d.ts.map +0 -1
- package/dist/kernel/handlers.d.ts +0 -3
- package/dist/kernel/handlers.d.ts.map +0 -1
- package/dist/kernel/hooks.d.ts +0 -7
- package/dist/kernel/hooks.d.ts.map +0 -1
- package/dist/kernel/index.d.ts.map +0 -1
- package/dist/kernel/installed.d.ts +0 -21
- package/dist/kernel/installed.d.ts.map +0 -1
- package/dist/kernel/module.d.ts +0 -32
- package/dist/kernel/module.d.ts.map +0 -1
- package/dist/kernel/operations.d.ts +0 -21
- package/dist/kernel/operations.d.ts.map +0 -1
- package/dist/kernel/page-controller.d.ts +0 -8
- package/dist/kernel/page-controller.d.ts.map +0 -1
- package/dist/kernel/provider.d.ts +0 -18
- package/dist/kernel/provider.d.ts.map +0 -1
- package/dist/kernel/runtime.d.ts.map +0 -1
- package/dist/kernel/schema.d.ts +0 -11
- package/dist/kernel/schema.d.ts.map +0 -1
- package/dist/kernel/store.d.ts +0 -4
- package/dist/kernel/store.d.ts.map +0 -1
- package/dist/kernel/types.d.ts +0 -233
- package/dist/kernel/types.d.ts.map +0 -1
- package/dist/kernel/utils.d.ts +0 -18
- package/dist/kernel/utils.d.ts.map +0 -1
- package/dist/modules/ambient/index.js +0 -10
- package/dist/modules/ambient/server/index.js +0 -221
- package/dist/modules/ambient/server/index.js.map +0 -1
- package/dist/modules/ambient/worker/index.js +0 -114
- package/dist/modules/ambient/worker/index.js.map +0 -1
- package/dist/modules/background/index.js +0 -9
- package/dist/modules/background/overlay.d.ts +0 -135
- package/dist/modules/background/overlay.d.ts.map +0 -1
- package/dist/modules/background/playback.d.ts +0 -10
- package/dist/modules/background/playback.d.ts.map +0 -1
- package/dist/modules/background/state.d.ts +0 -9
- package/dist/modules/background/state.d.ts.map +0 -1
- package/dist/modules/background/visual.d.ts +0 -48
- package/dist/modules/background/visual.d.ts.map +0 -1
- package/dist/modules/background/youtube/iframe.d.ts +0 -52
- package/dist/modules/background/youtube/iframe.d.ts.map +0 -1
- package/dist/modules/background/youtube/parse.d.ts +0 -17
- package/dist/modules/background/youtube/parse.d.ts.map +0 -1
- package/dist/modules/background/youtube/player.d.ts +0 -28
- package/dist/modules/background/youtube/player.d.ts.map +0 -1
- package/dist/modules/context-menu/index.js +0 -14
- package/dist/modules/controls/index.js +0 -7
- package/dist/modules/dock/cards.d.ts +0 -1722
- package/dist/modules/dock/cards.d.ts.map +0 -1
- package/dist/modules/dock/dom.d.ts +0 -24
- package/dist/modules/dock/dom.d.ts.map +0 -1
- package/dist/modules/dock/helpers.d.ts +0 -25
- package/dist/modules/dock/helpers.d.ts.map +0 -1
- package/dist/modules/dock/hooks.d.ts +0 -42
- package/dist/modules/dock/hooks.d.ts.map +0 -1
- package/dist/modules/dock/index.js +0 -13
- package/dist/modules/dock/layout.d.ts +0 -26
- package/dist/modules/dock/layout.d.ts.map +0 -1
- package/dist/modules/dock/overlay.d.ts +0 -79
- package/dist/modules/dock/overlay.d.ts.map +0 -1
- package/dist/modules/dock/paths.d.ts +0 -10
- package/dist/modules/dock/paths.d.ts.map +0 -1
- package/dist/modules/dock/state.d.ts +0 -22
- package/dist/modules/dock/state.d.ts.map +0 -1
- package/dist/modules/dock/styles.d.ts +0 -900
- package/dist/modules/dock/styles.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks.d.ts +0 -110
- package/dist/modules/dock/surface/hooks.d.ts.map +0 -1
- package/dist/modules/dock/types.d.ts +0 -1362
- package/dist/modules/dock/types.d.ts.map +0 -1
- package/dist/modules/loading/index.js +0 -8
- package/dist/modules/media/index.js +0 -6
- package/dist/modules/modal/dom.d.ts +0 -4
- package/dist/modules/modal/dom.d.ts.map +0 -1
- package/dist/modules/modal/header.d.ts +0 -7
- package/dist/modules/modal/header.d.ts.map +0 -1
- package/dist/modules/modal/identity.d.ts +0 -7
- package/dist/modules/modal/identity.d.ts.map +0 -1
- package/dist/modules/modal/index.js +0 -11
- package/dist/modules/modal/layout.d.ts +0 -13
- package/dist/modules/modal/layout.d.ts.map +0 -1
- package/dist/modules/modal/overlay.d.ts +0 -4
- package/dist/modules/modal/overlay.d.ts.map +0 -1
- package/dist/modules/modal/state.d.ts +0 -4
- package/dist/modules/modal/state.d.ts.map +0 -1
- package/dist/modules/navigation/constants.d.ts +0 -37
- package/dist/modules/navigation/constants.d.ts.map +0 -1
- package/dist/modules/navigation/index.js +0 -81
- package/dist/modules/navigation/index.js.map +0 -1
- package/dist/modules/navigation/navigator.d.ts +0 -8
- package/dist/modules/navigation/navigator.d.ts.map +0 -1
- package/dist/modules/navigation/settings.d.ts +0 -10
- package/dist/modules/navigation/settings.d.ts.map +0 -1
- package/dist/modules/navigation/state.d.ts +0 -20
- package/dist/modules/navigation/state.d.ts.map +0 -1
- package/dist/modules/navigation/types.d.ts +0 -168
- package/dist/modules/navigation/types.d.ts.map +0 -1
- package/dist/modules/navigation/utils.d.ts +0 -11
- package/dist/modules/navigation/utils.d.ts.map +0 -1
- package/dist/modules/notification/index.js +0 -7
- package/dist/overlay-TZ6L52A5.js +0 -9
- package/dist/overlay-TZ6L52A5.js.map +0 -1
- package/dist/provider.d.ts +0 -23
- package/dist/provider.d.ts.map +0 -1
- package/dist/provider.js +0 -9
- package/dist/provider.js.map +0 -1
- package/dist/result.d.ts +0 -50
- package/dist/result.d.ts.map +0 -1
- package/dist/result.js +0 -102
- package/dist/result.js.map +0 -1
- package/dist/theme.d.ts +0 -63
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -6
- package/dist/theme.js.map +0 -1
- package/dist/tokens/index.d.ts +0 -4
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/tokens/index.js +0 -296
- package/dist/tokens/index.js.map +0 -1
- package/dist/tokens/motion-config.d.ts +0 -44
- package/dist/tokens/motion-config.d.ts.map +0 -1
- package/dist/tokens/motion.d.ts +0 -164
- package/dist/tokens/motion.d.ts.map +0 -1
- package/dist/tokens/tokens.d.ts +0 -34
- package/dist/tokens/tokens.d.ts.map +0 -1
- package/dist/utils/cn.d.ts +0 -3
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/dom.d.ts +0 -5
- package/dist/utils/dom.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/number.d.ts +0 -3
- package/dist/utils/number.d.ts.map +0 -1
- package/dist/utils/object.d.ts +0 -5
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/report.d.ts +0 -5
- package/dist/utils/report.d.ts.map +0 -1
- package/dist/utils/scheduler.d.ts +0 -34
- package/dist/utils/scheduler.d.ts.map +0 -1
- package/dist/utils/store.d.ts +0 -11
- package/dist/utils/store.d.ts.map +0 -1
- package/dist/utils/string.d.ts +0 -5
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/timing.d.ts +0 -7
- package/dist/utils/timing.d.ts.map +0 -1
- package/dist/utils/user-message.d.ts +0 -20
- package/dist/utils/user-message.d.ts.map +0 -1
- package/templates/motion/background.ts +0 -17
- package/templates/motion/context-menu.ts +0 -63
- package/templates/motion/dock.ts +0 -395
- package/templates/motion/modal.ts +0 -79
- package/templates/motion/notification.ts +0 -27
- package/templates/motion/tokens.ts +0 -47
- /package/dist/{atoms → ambient}/index.js.map +0 -0
- /package/dist/{modules/ambient → background}/index.js.map +0 -0
- /package/dist/{modules/background → context-menu}/index.js.map +0 -0
- /package/dist/{modules/context-menu → controls}/index.js.map +0 -0
- /package/dist/{kernel → core/kernel}/runtime.d.ts +0 -0
- /package/dist/{modules/controls → dock}/index.js.map +0 -0
- /package/dist/{modules/dock → loading}/index.js.map +0 -0
- /package/dist/{modules/loading → media}/index.js.map +0 -0
- /package/dist/{modules/media → notification}/index.js.map +0 -0
- /package/dist/{modules/modal → provider}/index.js.map +0 -0
- /package/dist/{modules/notification → theme}/index.js.map +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/modules/ambient/oklab.ts","../src/modules/ambient/settings.ts","../src/modules/ambient/quantize.ts","../src/modules/ambient/analyze.ts"],"names":["round","share"],"mappings":";AAQA,IAAM,GAAA,GAAM,KAAK,EAAA,GAAK,GAAA;AAEtB,IAAM,UAAA,GAAa,IAAI,YAAA,CAAa,GAAG,CAAA;AACvC,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,GAAA,EAAK,CAAA,EAAA,EAAK;AAC5B,EAAA,MAAM,IAAI,CAAA,GAAI,GAAA;AACd,EAAA,UAAA,CAAW,CAAC,CAAA,GAAI,CAAA,IAAK,OAAA,GAAU,CAAA,GAAI,KAAA,GAAQ,IAAA,CAAK,GAAA,CAAA,CAAK,CAAA,GAAI,KAAA,IAAS,KAAA,EAAO,GAAG,CAAA;AAC9E;AAEO,SAAS,KAAA,CAAM,KAAA,EAAe,GAAA,EAAa,GAAA,EAAqB;AACrE,EAAA,OAAO,KAAK,GAAA,CAAI,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA,EAAK,KAAK,CAAC,CAAA;AAC3C;AAEO,SAAS,UAAA,CAAW,KAAA,EAAe,KAAA,EAAe,KAAA,EAAuB;AA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,IAAA,CAAK,CAAC,CAAA;AAAA,MAChB,QAAA,EAAU,OAAO,MAAA,GAAS,KAAA,CAAM,UAAU,CAAA,EAAG,CAAC,IAAI,CAAC;AAAA,KACrD;AAAA,EACF,CAAC,CAAA;AAED,EAAA,OAAO;AAAA,IACL,OAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA,EAAQ,YAAY,MAAM;AAAA,GAC5B;AACF;AAGO,SAAS,SAAA,CAAU,KAAA,EAAe,MAAA,EAAgB,IAAA,EAAc;AACrE,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,IAAA,GAAO,KAAK,GAAA,CAAI,KAAA,EAAO,MAAA,EAAQ,CAAC,CAAC,CAAA;AAC3D,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,KAAK,GAAA,CAAI,CAAA,EAAG,KAAK,KAAA,CAAM,MAAA,GAAS,KAAK,CAAC,CAAA;AAAA,IAC9C,KAAA,EAAO,KAAK,GAAA,CAAI,CAAA,EAAG,KAAK,KAAA,CAAM,KAAA,GAAQ,KAAK,CAAC;AAAA,GAC9C;AACF","file":"chunk-HHWRTQKQ.js","sourcesContent":["import type { OklchColor } from \"./types\";\n\n// Pure OKLab / OKLCH math shared by the client, the worker and the server.\n// Nothing here touches the DOM or React.\n\nexport type Lab = [l: number, a: number, b: number];\nexport type Rgb = [r: number, g: number, b: number];\n\nconst DEG = Math.PI / 180;\n\nconst LINEAR_LUT = new Float32Array(256);\nfor (let i = 0; i < 256; i++) {\n const v = i / 255;\n LINEAR_LUT[i] = v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n}\n\nexport function clamp(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, value));\n}\n\nexport function smoothstep(edge0: number, edge1: number, value: number): number {\n const t = clamp((value - edge0) / (edge1 - edge0), 0, 1);\n return t * t * (3 - 2 * t);\n}\n\n/** 8-bit sRGB channels → OKLab. */\nexport function srgbToOklab(r: number, g: number, b: number): Lab {\n const lr = LINEAR_LUT[r & 255];\n const lg = LINEAR_LUT[g & 255];\n const lb = LINEAR_LUT[b & 255];\n\n const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);\n const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);\n const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);\n\n return [\n 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,\n 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,\n 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s,\n ];\n}\n\n/** OKLCH → linear sRGB; channels outside 0–1 mean the colour is out of gamut. */\nexport function oklchToLinearSrgb(l: number, c: number, h: number): Rgb {\n const a = c * Math.cos(h * DEG);\n const b = c * Math.sin(h * DEG);\n const l_ = (l + 0.3963377774 * a + 0.2158037573 * b) ** 3;\n const m_ = (l - 0.1055613458 * a - 0.0638541728 * b) ** 3;\n const s_ = (l - 0.0894841775 * a - 1.291485548 * b) ** 3;\n return [\n 4.0767416621 * l_ - 3.3077115913 * m_ + 0.2309699292 * s_,\n -1.2684380046 * l_ + 2.6097574011 * m_ - 0.3413193965 * s_,\n -0.0041960863 * l_ - 0.7034186147 * m_ + 1.707614701 * s_,\n ];\n}\n\nexport function labToLch([l, a, b]: Lab): OklchColor {\n const c = Math.sqrt(a * a + b * b);\n const h = c < 1e-6 ? 0 : (Math.atan2(b, a) / DEG + 360) % 360;\n return { c, h, l };\n}\n\nconst inGamut = (rgb: Rgb) => rgb.every((v) => v >= -1e-5 && v <= 1 + 1e-5);\n\n/**\n * The most chroma sRGB can show at this lightness and hue (binary search on\n * the gamut boundary). Dark blues and purples have far more room than dark\n * greens or yellows, which is why one fixed chroma never looks right.\n */\nexport function maxChroma(l: number, h: number): number {\n if (l <= 0 || l >= 1) return 0;\n let low = 0;\n let high = 0.4;\n for (let step = 0; step < 18; step++) {\n const middle = (low + high) / 2;\n if (inGamut(oklchToLinearSrgb(l, middle, h))) low = middle;\n else high = middle;\n }\n return low;\n}\n\n/** Share of the available chroma a colour uses (0 grey … 1 on the gamut edge). */\nexport function relativeChroma({ c, h, l }: OklchColor): number {\n const room = maxChroma(l, h);\n return room <= 0 ? 0 : clamp(c / room, 0, 1);\n}\n\nexport function hueDistance(a: number, b: number): number {\n const d = Math.abs(a - b) % 360;\n return d > 180 ? 360 - d : d;\n}\n\n/** WCAG 2 relative luminance of an OKLCH colour (gamut-clipped). */\nexport function luminance({ c, h, l }: OklchColor): number {\n const [r, g, b] = oklchToLinearSrgb(l, c, h).map((v) => clamp(v, 0, 1));\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n}\n\nexport function contrastRatio(a: OklchColor, b: OklchColor): number {\n const la = luminance(a);\n const lb = luminance(b);\n return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);\n}\n\nconst round = (value: number, digits: number) => {\n const factor = 10 ** digits;\n return Math.round(value * factor) / factor;\n};\n\nexport function formatOklch({ c, h, l }: OklchColor): string {\n const chroma = c < 0.0005 ? 0 : c;\n return `oklch(${round(clamp(l, 0, 1), 3).toFixed(3)} ${round(chroma, 3).toFixed(3)} ${round(chroma === 0 ? 0 : h, 1).toFixed(1)})`;\n}\n\n/**\n * A tone of a hue at lightness `l`, using `rel` of the chroma sRGB allows\n * there (never more than `cap`). This keeps a hue's character across a whole\n * ramp: dark tones of blue stay blue instead of collapsing to grey.\n */\nexport function toneOf(\n h: number,\n l: number,\n rel: number,\n cap = 0.3,\n): OklchColor {\n const room = maxChroma(l, h) * 0.96;\n return { c: Math.min(cap, clamp(rel, 0, 1) * room), h, l };\n}\n\n/**\n * Text colour for a background: a near-white or near-black carrying a hint of\n * the background's hue, pushed toward pure white / black until it reaches\n * `minContrast` (WCAG 2 ratio).\n */\nexport function onColorFor(\n background: OklchColor,\n minContrast = 4.5,\n): OklchColor {\n const light = (l: number) => toneOf(background.h, l, 0.12, 0.012);\n const dark = (l: number) => toneOf(background.h, l, 0.35, 0.03);\n const towardLight = contrastRatio(light(0.985), background);\n const towardDark = contrastRatio(dark(0.18), background);\n const useLight = towardLight >= minContrast || towardLight >= towardDark;\n\n for (let step = 0; step <= 12; step++) {\n const candidate = useLight\n ? light(Math.min(1, 0.985 + step * 0.0025))\n : dark(Math.max(0, 0.18 - step * 0.015));\n if (contrastRatio(candidate, background) >= minContrast) return candidate;\n }\n return useLight ? { c: 0, h: 0, l: 1 } : { c: 0, h: 0, l: 0 };\n}\n","import type {\n AmbientAnalysisOptions,\n AmbientCssVarNames,\n AmbientProxy,\n AmbientSettings,\n AmbientSettingsInput,\n AmbientTone,\n} from \"./types\";\n\nexport const AMBIENT_TONES = Object.freeze([\n 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 95,\n] as const) satisfies readonly AmbientTone[];\n\nexport const AMBIENT_ROLES = Object.freeze([\n \"dominant\",\n \"vibrant\",\n \"muted\",\n \"accent\",\n] as const);\n\nexport const AMBIENT_REGIONS = Object.freeze([\n \"top\",\n \"bottom\",\n \"left\",\n \"right\",\n \"center\",\n] as const);\n\nexport const DEFAULT_ANALYSIS: Readonly<AmbientAnalysisOptions> = Object.freeze({\n centerWeight: 0.5,\n clusters: 7,\n letterbox: true,\n minContrast: 4.5,\n minHueDistance: 40,\n sampleSize: 128,\n shadowLightness: 0.16,\n});\n\nexport const DEFAULT_CSS_VAR_NAMES: Readonly<AmbientCssVarNames> = Object.freeze({\n on: \"--ambient-on-{role}\",\n region: \"--ambient-{region}\",\n role: \"--ambient-{role}\",\n shadow: \"--ambient-shadow\",\n tone: \"--ambient-{role}-{tone}\",\n});\n\nexport const DEFAULT_PROXY = \"/api/ambient/proxy?url=\";\n\nexport const DEFAULT_LINGER_MS = 3_000;\n\nconst createDefaults = (): AmbientSettings => ({\n analysis: { ...DEFAULT_ANALYSIS },\n cacheLimit: 100,\n cssVars: { ...DEFAULT_CSS_VAR_NAMES, tones: AMBIENT_TONES },\n linger: DEFAULT_LINGER_MS,\n proxy: DEFAULT_PROXY,\n strategy: \"auto\",\n worker: null,\n});\n\n// Kept on globalThis so every bundled copy of this module (one per package\n// entry) shares one configuration.\nconst SETTINGS_KEY = Symbol.for(\"@omerdlw/base-framework/ambient/settings\");\ntype GlobalWithSettings = typeof globalThis & {\n [SETTINGS_KEY]?: AmbientSettings;\n};\nconst scope = globalThis as GlobalWithSettings;\n\nexport function getAmbientSettings(): AmbientSettings {\n return (scope[SETTINGS_KEY] ??= createDefaults());\n}\n\nexport function mergeAmbientSettings(\n base: AmbientSettings,\n input: AmbientSettingsInput,\n): AmbientSettings {\n return {\n analysis: { ...base.analysis, ...input.analysis },\n cacheLimit: input.cacheLimit ?? base.cacheLimit,\n cssVars: { ...base.cssVars, ...input.cssVars },\n linger: input.linger ?? base.linger,\n proxy: input.proxy === undefined ? base.proxy : input.proxy,\n strategy: input.strategy ?? base.strategy,\n worker: input.worker === undefined ? base.worker : input.worker,\n };\n}\n\n/**\n * Sets the proxy, CSS variable names, extraction strategy, worker and analysis\n * defaults for every ambient theme. Returns a function that restores the\n * previous settings.\n */\nexport function configureAmbient(input: AmbientSettingsInput): () => void {\n const previous = getAmbientSettings();\n const next = mergeAmbientSettings(previous, input);\n scope[SETTINGS_KEY] = next;\n return () => {\n if (scope[SETTINGS_KEY] === next) scope[SETTINGS_KEY] = previous;\n };\n}\n\nexport function resolveAnalysis(\n overrides?: Partial<AmbientAnalysisOptions> | null,\n): AmbientAnalysisOptions {\n return { ...getAmbientSettings().analysis, ...overrides };\n}\n\n/** The URL to retry through, or `null` when no proxy applies. */\nexport function resolveProxyUrl(proxy: AmbientProxy, src: string): string | null {\n if (!proxy || !/^https?:\\/\\//i.test(src)) return null;\n if (typeof proxy === \"function\") return proxy(src);\n const encoded = encodeURIComponent(src);\n return proxy.includes(\"{url}\")\n ? proxy.replace(\"{url}\", encoded)\n : `${proxy}${encoded}`;\n}\n","export interface KMeansResult {\n /** Index of the cluster each point belongs to. */\n assignment: Int32Array;\n /** `k × 3` OKLab centroids. */\n centroids: Float64Array;\n /** Number of clusters actually found (≤ the requested k). */\n k: number;\n}\n\nexport interface KMeansOptions {\n iterations?: number;\n /** Weight of ΔL² against Δa² + Δb²; below 1 favours hue over lightness. */\n lightnessWeight?: number;\n}\n\n/**\n * Weighted k-means in OKLab with deterministic seeding (the heaviest point,\n * then repeatedly the point that is heaviest × furthest from every seed), so\n * the same pixels always give the same palette on the server and the client.\n *\n * `points` holds `n × 3` OKLab values and `weights` one weight per point.\n */\nexport function kmeans(\n points: Float64Array,\n weights: Float64Array,\n requested: number,\n { iterations = 16, lightnessWeight = 0.45 }: KMeansOptions = {},\n): KMeansResult {\n const n = weights.length;\n const assignment = new Int32Array(n);\n const k = Math.max(0, Math.min(requested, n));\n const centroids = new Float64Array(k * 3);\n if (k === 0) return { assignment, centroids, k };\n\n const distance = (i: number, j: number) => {\n const dl = points[i * 3] - centroids[j * 3];\n const da = points[i * 3 + 1] - centroids[j * 3 + 1];\n const db = points[i * 3 + 2] - centroids[j * 3 + 2];\n return lightnessWeight * dl * dl + da * da + db * db;\n };\n\n let first = 0;\n for (let i = 1; i < n; i++) if (weights[i] > weights[first]) first = i;\n centroids.set(points.subarray(first * 3, first * 3 + 3), 0);\n\n const nearest = new Float64Array(n).fill(Infinity);\n let found = 1;\n for (; found < k; found++) {\n let best = -1;\n let bestScore = 0;\n for (let i = 0; i < n; i++) {\n const d = distance(i, found - 1);\n if (d < nearest[i]) nearest[i] = d;\n const score = weights[i] * nearest[i];\n if (score > bestScore) {\n bestScore = score;\n best = i;\n }\n }\n if (best < 0) break; // every remaining point sits on a seed\n centroids.set(points.subarray(best * 3, best * 3 + 3), found * 3);\n }\n\n const sums = new Float64Array(found * 4);\n for (let round = 0; round < iterations; round++) {\n let moved = round === 0;\n for (let i = 0; i < n; i++) {\n let best = 0;\n let bestDistance = Infinity;\n for (let j = 0; j < found; j++) {\n const d = distance(i, j);\n if (d < bestDistance) {\n bestDistance = d;\n best = j;\n }\n }\n if (assignment[i] !== best) {\n assignment[i] = best;\n moved = true;\n }\n }\n if (!moved) break;\n\n sums.fill(0);\n for (let i = 0; i < n; i++) {\n const j = assignment[i] * 4;\n const w = weights[i];\n sums[j] += points[i * 3] * w;\n sums[j + 1] += points[i * 3 + 1] * w;\n sums[j + 2] += points[i * 3 + 2] * w;\n sums[j + 3] += w;\n }\n for (let j = 0; j < found; j++) {\n const w = sums[j * 4 + 3];\n if (w <= 0) continue; // an empty cluster keeps its seed\n centroids[j * 3] = sums[j * 4] / w;\n centroids[j * 3 + 1] = sums[j * 4 + 1] / w;\n centroids[j * 3 + 2] = sums[j * 4 + 2] / w;\n }\n }\n\n return { assignment, centroids: centroids.slice(0, found * 3), k: found };\n}\n","import {\n clamp,\n formatOklch,\n hueDistance,\n labToLch,\n maxChroma,\n onColorFor,\n smoothstep,\n srgbToOklab,\n toneOf,\n} from \"./oklab\";\nimport { kmeans } from \"./quantize\";\nimport { AMBIENT_REGIONS, AMBIENT_TONES, DEFAULT_ANALYSIS } from \"./settings\";\nimport type {\n AmbientAnalysisOptions,\n AmbientPalette,\n AmbientPixels,\n AmbientRamp,\n AmbientRegion,\n AmbientRegionColor,\n AmbientRole,\n AmbientSwatch,\n OklchColor,\n} from \"./types\";\n\n/**\n * Bumped whenever the same pixels would give a different palette. Put it in\n * the key of any palette cache that outlives a deploy (`unstable_cache`, a\n * database), so stored palettes are computed again.\n */\nexport const AMBIENT_ANALYSIS_VERSION = 2;\n\n// Below this chroma a colour reads as grey; its hue is noise.\nconst MIN_CHROMA = 0.022;\n// Below this share of coloured pixels an image is treated as neutral.\nconst MIN_PRESENCE = 0.03;\n// A colour this small still counts as a role when it is vivid enough.\nconst MIN_POPULATION = 0.004;\n\nconst REGION_BITS: Record<AmbientRegion, number> = {\n top: 1,\n bottom: 2,\n left: 4,\n right: 8,\n center: 16,\n};\n\nexport interface Cluster extends OklchColor {\n /** Share of the (centre-weighted) image. */\n pop: number;\n /** Share of the chroma sRGB allows at this lightness and hue. */\n rel: number;\n /** How far the hue can be trusted at this lightness (0–1). */\n rely: number;\n}\n\ninterface Bounds {\n bottom: number;\n left: number;\n right: number;\n top: number;\n}\n\nconst lightnessAt = (data: ArrayLike<number>, index: number) =>\n srgbToOklab(data[index], data[index + 1], data[index + 2])[0];\n\n/**\n * Finds black bars along the edges (letterbox / pillarbox): rows or columns\n * that are uniformly near-black. At most 22% of each side is cut.\n */\nexport function findContentBounds({ data, height, width }: AmbientPixels): Bounds {\n const isBar = (count: number, at: (step: number) => number) => {\n let sum = 0;\n let max = 0;\n let seen = 0;\n for (let step = 0; step < count; step++) {\n const index = at(step);\n if (data[index + 3] < 128) continue;\n const l = lightnessAt(data, index);\n sum += l;\n if (l > max) max = l;\n seen++;\n }\n return seen > 0 && sum / seen < 0.12 && max < 0.2;\n };\n const row = (y: number) => isBar(width, (x) => (y * width + x) * 4);\n const maxRows = Math.floor(height * 0.22);\n const maxColumns = Math.floor(width * 0.22);\n\n let top = 0;\n while (top < maxRows && row(top)) top++;\n let bottom = height;\n while (height - bottom < maxRows && bottom - 1 > top && row(bottom - 1)) bottom--;\n\n const column = (x: number) =>\n isBar(bottom - top, (step) => ((top + step) * width + x) * 4);\n let left = 0;\n while (left < maxColumns && column(left)) left++;\n let right = width;\n while (width - right < maxColumns && right - 1 > left && column(right - 1)) right--;\n\n return { bottom, left, right, top };\n}\n\nconst reliability = (l: number) =>\n smoothstep(0.1, 0.28, l) * (1 - smoothstep(0.9, 0.98, l));\n\nconst colorfulness = (c: number) => smoothstep(MIN_CHROMA, 0.06, c);\n\nconst isChromatic = (cluster: Cluster) =>\n cluster.c >= MIN_CHROMA && cluster.rely > 0;\n\nfunction pickBest<T>(items: T[], score: (item: T) => number): T | null {\n let best: T | null = null;\n let bestScore = 0;\n for (const item of items) {\n const value = score(item);\n if (value > bestScore) {\n bestScore = value;\n best = item;\n }\n }\n return best;\n}\n\nconst round3 = (value: number) => Math.round(value * 1000) / 1000;\n\n/**\n * How much a colour looks like skin, hair, wood or a tungsten-lit wall: the\n * warm, low-chroma band most film frames are full of. It is what a frame\n * shows, rarely its mood.\n */\nexport function skinLikeness({ c, h, l }: OklchColor): number {\n return (\n (1 - smoothstep(12, 26, hueDistance(h, 54))) *\n smoothstep(0.02, 0.035, c) *\n (1 - smoothstep(0.11, 0.15, c)) *\n smoothstep(0.26, 0.38, l) *\n (1 - smoothstep(0.88, 0.95, l))\n );\n}\n\n// Reds and oranges read louder than blues or greens at the same chroma\n// (Helmholtz–Kohlrausch), so they are given less of it.\nconst warmth = (h: number) => 1 - smoothstep(22, 50, hueDistance(h, 42));\n\n// Weight of a colour in the role and region picks: skin still counts, less.\nconst salience = (color: OklchColor) => 1 - 0.65 * skinLikeness(color);\n\ninterface ChromaSpec {\n cap: number;\n gain: number;\n}\n\n/**\n * The chroma a role carries: its source's own, raised by `gain`, held back\n * for skin and warm hues, never above `cap`. Chroma, not a share of the\n * gamut: at mid lightness orange has twice the room teal has, so carrying\n * the share would turn a pale face into a loud orange.\n */\nconst roleChroma = (source: OklchColor, { cap, gain }: ChromaSpec) =>\n Math.min(\n cap * (1 - 0.3 * warmth(source.h)),\n // A faint tint is raised further, so it still reads as a colour.\n Math.max(source.c * gain, Math.min(0.05, source.c * 1.6)) *\n (1 - 0.3 * skinLikeness(source)),\n );\n\n/** `c` at hue `h` and lightness `l`, inside sRGB. */\nconst fitTone = (h: number, l: number, c: number): OklchColor => ({\n c: Math.max(0, Math.min(c, maxChroma(l, h) * 0.96)),\n h,\n l,\n});\n\nfunction buildSwatch(\n tone: OklchColor,\n population: number,\n fromImage: boolean,\n minContrast: number,\n): AmbientSwatch {\n // The ramp keeps the swatch's share of the gamut, so its dark tones stay\n // hued instead of collapsing to grey.\n const room = maxChroma(tone.l, tone.h) * 0.96;\n const rel = room > 0 ? tone.c / room : 0;\n const ramp = {} as AmbientRamp;\n for (const step of AMBIENT_TONES) {\n ramp[step] = formatOklch(toneOf(tone.h, step / 100, rel, Math.max(tone.c, 0.04)));\n }\n return {\n c: round3(tone.c),\n color: formatOklch(tone),\n fromImage,\n h: Math.round(tone.h * 10) / 10,\n l: round3(tone.l),\n on: formatOklch(onColorFor(tone, minContrast)),\n population: round3(population),\n ramp,\n };\n}\n\ninterface RoleSpec extends ChromaSpec {\n max: number;\n min: number;\n}\n\n/** A role's tone from its source cluster, or `fallback` when there is none. */\nfunction roleTone(\n source: Cluster | null,\n spec: RoleSpec,\n fallback: OklchColor,\n dilution = 1,\n): OklchColor {\n if (!source) return fitTone(fallback.h, clamp(fallback.l, spec.min, spec.max), fallback.c);\n return fitTone(\n source.h,\n clamp(source.l, spec.min, spec.max),\n roleChroma(source, spec) * dilution,\n );\n}\n\nexport interface AmbientClustering {\n clusters: Cluster[];\n /** Centre-weighted mean lightness. */\n meanL: number;\n /** Per region, the OKLab sum (`L, a, b` per cluster) of each cluster's pixels. */\n regionLab: Float64Array[];\n /** Per region, the pixel count of each cluster. */\n regionWeights: Float64Array[];\n}\n\n/**\n * Step one of the analysis: the image's colours as OKLab k-means clusters,\n * with each cluster's share of the frame and of each region.\n */\nexport function clusterAmbientPixels(\n pixels: AmbientPixels,\n options: AmbientAnalysisOptions,\n): AmbientClustering {\n const { data, width, height } = pixels;\n const bounds = options.letterbox\n ? findContentBounds(pixels)\n : { bottom: height, left: 0, right: width, top: 0 };\n const boxWidth = Math.max(1, bounds.right - bounds.left);\n const boxHeight = Math.max(1, bounds.bottom - bounds.top);\n\n // 1. Bin pixels by 15-bit RGB, averaging their OKLab values per bin.\n const binOf = new Int32Array(32768).fill(-1);\n const binSums: number[] = [];\n const pixelBins = new Int32Array(boxWidth * boxHeight).fill(-1);\n const pixelRegions = new Uint8Array(boxWidth * boxHeight);\n const sigma2 = 2 * 0.35 * 0.35;\n let total = 0;\n let sumL = 0;\n\n for (let y = bounds.top; y < bounds.bottom; y++) {\n const v = (y - bounds.top + 0.5) / boxHeight;\n for (let x = bounds.left; x < bounds.right; x++) {\n const index = (y * width + x) * 4;\n if (data[index + 3] < 128) continue;\n const r = data[index];\n const g = data[index + 1];\n const b = data[index + 2];\n const [l, a, bb] = srgbToOklab(r, g, b);\n const u = (x - bounds.left + 0.5) / boxWidth;\n const du = (u - 0.5) * 2;\n const dv = (v - 0.5) * 2;\n const weight =\n 1 -\n options.centerWeight +\n 2 * options.centerWeight * Math.exp(-(du * du + dv * dv) / sigma2);\n\n const key = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);\n let bin = binOf[key];\n if (bin < 0) {\n bin = binSums.length / 4;\n binOf[key] = bin;\n binSums.push(0, 0, 0, 0);\n }\n binSums[bin * 4] += l * weight;\n binSums[bin * 4 + 1] += a * weight;\n binSums[bin * 4 + 2] += bb * weight;\n binSums[bin * 4 + 3] += weight;\n total += weight;\n sumL += l * weight;\n\n const local = (y - bounds.top) * boxWidth + (x - bounds.left);\n pixelBins[local] = bin;\n pixelRegions[local] =\n (v < 1 / 3 ? REGION_BITS.top : 0) |\n (v > 2 / 3 ? REGION_BITS.bottom : 0) |\n (u < 1 / 3 ? REGION_BITS.left : 0) |\n (u > 2 / 3 ? REGION_BITS.right : 0) |\n (Math.abs(u - 0.5) < 0.25 && Math.abs(v - 0.5) < 0.25\n ? REGION_BITS.center\n : 0);\n }\n }\n\n const meanL = total > 0 ? sumL / total : 0.5;\n const bins = binSums.length / 4;\n\n // 2. Cluster coloured and grey bins apart, so the greys of a mostly dark\n // poster cannot use up every cluster and swallow its one red coat.\n const groups: [number[], number[]] = [[], []];\n for (let i = 0; i < bins; i++) {\n const w = binSums[i * 4 + 3];\n const a = binSums[i * 4 + 1] / w;\n const b = binSums[i * 4 + 2] / w;\n const coloured =\n Math.sqrt(a * a + b * b) >= MIN_CHROMA && binSums[i * 4] / w >= 0.06;\n groups[coloured ? 0 : 1].push(i);\n }\n const requested = clamp(Math.round(options.clusters), 2, 16);\n const greyClusters =\n groups[0].length === 0 ? requested : groups[1].length === 0 ? 0 : requested >= 8 ? 3 : 2;\n const budgets = [requested - greyClusters, greyClusters];\n\n const clusters: Cluster[] = [];\n const clusterOfBin = new Int32Array(bins).fill(-1);\n groups.forEach((members, group) => {\n if (members.length === 0 || budgets[group] <= 0) return;\n const points = new Float64Array(members.length * 3);\n const weights = new Float64Array(members.length);\n members.forEach((bin, i) => {\n const w = binSums[bin * 4 + 3];\n const a = binSums[bin * 4 + 1] / w;\n const b = binSums[bin * 4 + 2] / w;\n points[i * 3] = binSums[bin * 4] / w;\n points[i * 3 + 1] = a;\n points[i * 3 + 2] = b;\n // Vivid colours pull harder, so a small saturated area keeps its own cluster.\n weights[i] = w * (1 + 5 * Math.sqrt(a * a + b * b));\n });\n const { assignment, k } = kmeans(points, weights, budgets[group]);\n // A cluster's colour is the plain mean of its pixels: the vivid pull that\n // shaped the clusters would tint a face toward the red title beside it.\n const sums = new Float64Array(k * 4);\n members.forEach((bin, i) => {\n for (let channel = 0; channel < 4; channel++) {\n sums[assignment[i] * 4 + channel] += binSums[bin * 4 + channel];\n }\n });\n const index = new Int32Array(k).fill(-1);\n for (let j = 0; j < k; j++) {\n const pop = sums[j * 4 + 3];\n if (pop <= 0) continue;\n const lch = labToLch([sums[j * 4] / pop, sums[j * 4 + 1] / pop, sums[j * 4 + 2] / pop]);\n const room = maxChroma(lch.l, lch.h);\n index[j] = clusters.length;\n clusters.push({\n ...lch,\n pop: pop / total,\n rel: room > 0 ? clamp(lch.c / room, 0, 1) : 0,\n rely: reliability(lch.l),\n });\n }\n members.forEach((bin, i) => (clusterOfBin[bin] = index[assignment[i]]));\n });\n\n // 3. Region shares per cluster, and the OKLab sum of each cluster's pixels\n // in each region: a cluster spanning the frame looks different in parts.\n const regionWeights = AMBIENT_REGIONS.map(() => new Float64Array(clusters.length));\n const regionLab = AMBIENT_REGIONS.map(() => new Float64Array(clusters.length * 3));\n for (let i = 0; i < pixelBins.length; i++) {\n const bin = pixelBins[i];\n if (bin < 0) continue;\n const cluster = clusterOfBin[bin];\n const bits = pixelRegions[i];\n const w = binSums[bin * 4 + 3];\n AMBIENT_REGIONS.forEach((region, r) => {\n if (!(bits & REGION_BITS[region])) return;\n regionWeights[r][cluster] += 1;\n for (let channel = 0; channel < 3; channel++) {\n regionLab[r][cluster * 3 + channel] += binSums[bin * 4 + channel] / w;\n }\n });\n }\n\n return { clusters, meanL, regionLab, regionWeights };\n}\n\n/**\n * The palette of an image: OKLab k-means clusters scored by population ×\n * chroma (skin tones counted less), turned into four roles (each with a tonal\n * ramp and a contrast-safe text colour), five region colours, and the deep\n * `shadow` tone. Roles keep about their source's chroma rather than its share\n * of the gamut, so warm hues are not inflated.\n */\nexport function analyzeAmbientPixels(\n pixels: AmbientPixels,\n overrides: Partial<AmbientAnalysisOptions> = {},\n): AmbientPalette {\n const options = { ...DEFAULT_ANALYSIS, ...overrides };\n const { clusters, meanL, regionLab, regionWeights } = clusterAmbientPixels(pixels, options);\n\n // 4. Roles.\n const chromatic = clusters.filter(isChromatic);\n const presence = chromatic.reduce(\n (sum, cluster) => sum + cluster.pop * colorfulness(cluster.c) * cluster.rely,\n 0,\n );\n const neutral = presence < MIN_PRESENCE;\n // A coloured detail on an almost grey image is kept, but quieter.\n const dilution = 0.55 + 0.45 * Math.min(1, presence / 0.25);\n const { minContrast, minHueDistance } = options;\n const grey = { c: 0, h: 0, l: clamp(meanL, 0.3, 0.8) };\n\n // k-means splits one hue into several lightness levels; a hue's share is\n // that of its whole family (clusters within 20°), so it is not undercounted.\n const family = new Map<Cluster, number>();\n for (const cluster of chromatic) {\n let share = 0;\n for (const other of chromatic) {\n if (hueDistance(cluster.h, other.h) <= 20) share += other.pop;\n }\n family.set(cluster, share);\n }\n const share = (cluster: Cluster) => family.get(cluster) ?? cluster.pop;\n\n const dominantPick = neutral\n ? null\n : pickBest(\n chromatic,\n (cluster) => share(cluster) * cluster.c * cluster.rely * salience(cluster),\n );\n // A grey image keeps a grey `vibrant`: no hue is invented.\n const vividPick = neutral\n ? null\n : pickBest(\n chromatic.filter((cluster) => share(cluster) >= MIN_POPULATION),\n (cluster) =>\n cluster.c *\n cluster.c *\n Math.pow(share(cluster), 0.3) *\n cluster.rely *\n salience(cluster),\n );\n // …but a coloured detail on it (the red coat) becomes the accent.\n const accentPick = pickBest(\n chromatic.filter((cluster) =>\n neutral\n ? share(cluster) >= 0.006 && cluster.c >= 0.06\n : share(cluster) >= MIN_POPULATION &&\n cluster.c >= 0.035 &&\n (!dominantPick || hueDistance(cluster.h, dominantPick.h) >= minHueDistance),\n ),\n (cluster) =>\n Math.pow(share(cluster), 0.6) * cluster.c * cluster.rely * salience(cluster),\n );\n const mutedPick = neutral\n ? null\n : pickBest(\n chromatic.filter((cluster) => cluster.c <= 0.09),\n (cluster) => share(cluster) * cluster.rely * (1 - cluster.c / 0.12),\n );\n\n const dominantHue = dominantPick?.h ?? vividPick?.h ?? 0;\n const accentSource = accentPick ?? vividPick;\n const roles: Record<AmbientRole, AmbientSwatch> = {\n dominant: buildSwatch(\n roleTone(dominantPick, { cap: 0.2, gain: 1.15, max: 0.74, min: 0.42 }, grey),\n dominantPick ? share(dominantPick) : 0,\n true,\n minContrast,\n ),\n vibrant: buildSwatch(\n roleTone(\n vividPick,\n { cap: 0.22, gain: 1.35, max: 0.84, min: 0.62 },\n { c: 0, h: dominantHue, l: 0.78 },\n dilution,\n ),\n vividPick ? share(vividPick) : 0,\n true,\n minContrast,\n ),\n muted: buildSwatch(\n roleTone(\n mutedPick,\n { cap: 0.07, gain: 1, max: 0.66, min: 0.38 },\n { c: dominantPick ? 0.035 : 0, h: dominantHue, l: clamp(meanL, 0.38, 0.66) },\n ),\n mutedPick ? share(mutedPick) : 0,\n Boolean(mutedPick) || neutral,\n minContrast,\n ),\n accent: buildSwatch(\n roleTone(\n accentSource,\n { cap: 0.22, gain: 1.3, max: 0.8, min: 0.55 },\n { c: 0, h: dominantHue, l: 0.72 },\n dilution,\n ),\n accentSource ? share(accentSource) : 0,\n Boolean(accentPick),\n minContrast,\n ),\n };\n\n // 5. `shadow`: the shadows' own hue when they have one, else the dominant's.\n // In the dark, relative chroma says more than chroma: a navy at L 0.14\n // uses most of what sRGB has there.\n const shadowPick = neutral\n ? null\n : pickBest(\n clusters.filter(\n (cluster) => cluster.l <= 0.5 && cluster.c >= 0.02 && cluster.pop >= 0.02,\n ),\n (cluster) => cluster.pop * cluster.rel * smoothstep(0.05, 0.14, cluster.l),\n );\n const deepSource = shadowPick ?? dominantPick;\n const shadowL = clamp(\n options.shadowLightness + (meanL - 0.45) * 0.06,\n options.shadowLightness - 0.02,\n options.shadowLightness + 0.02,\n );\n const shadow = deepSource\n ? toneOf(deepSource.h, shadowL, clamp(0.3 + 0.7 * deepSource.rel, 0, 0.85), 0.1)\n : { c: 0, h: 0, l: shadowL };\n\n // 6. Regions: the most telling colour in each part of the frame, as that\n // part shows it (a cluster's own pixels there, not its frame-wide mean).\n const regions = {} as Record<AmbientRegion, AmbientRegionColor>;\n AMBIENT_REGIONS.forEach((region, r) => {\n const weights = regionWeights[r];\n const lab = regionLab[r];\n let regionTotal = 0;\n let regionL = 0;\n clusters.forEach((cluster, j) => {\n regionTotal += weights[j];\n regionL += cluster.l * weights[j];\n });\n let strength = 0;\n let pick: OklchColor | null = null;\n let pickScore = 0;\n clusters.forEach((_, j) => {\n const count = weights[j];\n if (count <= 0) return;\n const local = labToLch([lab[j * 3] / count, lab[j * 3 + 1] / count, lab[j * 3 + 2] / count]);\n const rely = reliability(local.l);\n if (local.c < MIN_CHROMA || rely <= 0) return;\n const part = count / regionTotal;\n strength += part * colorfulness(local.c) * rely;\n const score = part * local.c * rely * salience(local);\n if (score > pickScore) {\n pickScore = score;\n pick = local;\n }\n });\n const chosen = neutral || strength < MIN_PRESENCE ? null : (pick as OklchColor | null);\n const tone = chosen\n ? fitTone(\n chosen.h,\n clamp(chosen.l, 0.42, 0.72),\n roleChroma(chosen, { cap: 0.18, gain: 1.15 }),\n )\n : {\n c: 0,\n h: 0,\n l: clamp(regionTotal > 0 ? regionL / regionTotal : meanL, 0.3, 0.7),\n };\n regions[region] = {\n c: round3(tone.c),\n color: formatOklch(tone),\n h: Math.round(tone.h * 10) / 10,\n l: round3(tone.l),\n strength: round3(chosen ? clamp(strength, 0, 1) : 0),\n };\n });\n\n return {\n neutral,\n regions,\n roles,\n shadow: formatOklch(shadow),\n };\n}\n\n/** Width and height that fit `width × height` inside `size` on the long side. */\nexport function fitSample(width: number, height: number, size: number) {\n const scale = Math.min(1, size / Math.max(width, height, 1));\n return {\n height: Math.max(1, Math.round(height * scale)),\n width: Math.max(1, Math.round(width * scale)),\n };\n}\n"]}
|
package/dist/chunk-HLL5EHXC.js
DELETED
|
@@ -1,485 +0,0 @@
|
|
|
1
|
-
import { normalizePath, createStore, report, globalEvents } from './chunk-TV3WEF5G.js';
|
|
2
|
-
|
|
3
|
-
// src/modules/navigation/constants.ts
|
|
4
|
-
var NAVIGATION_STATUS = Object.freeze({
|
|
5
|
-
PENDING: "pending",
|
|
6
|
-
COMPLETED: "completed",
|
|
7
|
-
CANCELLED: "cancelled",
|
|
8
|
-
FAILED: "failed",
|
|
9
|
-
TIMED_OUT: "timed-out"
|
|
10
|
-
});
|
|
11
|
-
var NAVIGATION_PHASE = Object.freeze({
|
|
12
|
-
LEAVING: "leaving",
|
|
13
|
-
ROUTING: "routing"
|
|
14
|
-
});
|
|
15
|
-
var NAVIGATION_REASON = Object.freeze({
|
|
16
|
-
GUARD: "guard",
|
|
17
|
-
RETURNED: "returned",
|
|
18
|
-
SUPERSEDED: "superseded",
|
|
19
|
-
TIME_OUT: "time-out"
|
|
20
|
-
});
|
|
21
|
-
var NAVIGATION_SOURCE = Object.freeze({
|
|
22
|
-
HISTORY: "history",
|
|
23
|
-
NAVIGATE: "navigate"
|
|
24
|
-
});
|
|
25
|
-
var NAVIGATION_EVENTS = Object.freeze({
|
|
26
|
-
/** A trip started (phase `leaving`). */
|
|
27
|
-
START: "NAVIGATION_START",
|
|
28
|
-
/** The router was asked for the route (phase `routing`). */
|
|
29
|
-
COMMIT: "NAVIGATION_COMMIT",
|
|
30
|
-
/** The trip settled, whatever its status. */
|
|
31
|
-
END: "NAVIGATION_END"
|
|
32
|
-
});
|
|
33
|
-
var NAVIGATION_INTENT_DELAY_MS = 180;
|
|
34
|
-
var NAVIGATION_PREFETCH_TTL_MS = 4 * 6e4;
|
|
35
|
-
var NAVIGATION_ARRIVAL_TTL_MS = 2e4;
|
|
36
|
-
var NAVIGATION_MAX_HOLD_MS = 5e3;
|
|
37
|
-
var NAVIGATION_TIMEOUT_MS = 15e3;
|
|
38
|
-
var NAVIGATION_PREFETCH_ATTRIBUTE = "data-prefetch";
|
|
39
|
-
|
|
40
|
-
// src/modules/navigation/settings.ts
|
|
41
|
-
var matchEveryLink = () => true;
|
|
42
|
-
var DEFAULT_INTENT = Object.freeze({
|
|
43
|
-
delayMs: NAVIGATION_INTENT_DELAY_MS,
|
|
44
|
-
match: matchEveryLink
|
|
45
|
-
});
|
|
46
|
-
var createDefaults = () => ({
|
|
47
|
-
arrivalTtlMs: NAVIGATION_ARRIVAL_TTL_MS,
|
|
48
|
-
intent: { ...DEFAULT_INTENT },
|
|
49
|
-
maxHoldMs: NAVIGATION_MAX_HOLD_MS,
|
|
50
|
-
prefetchKind: "full",
|
|
51
|
-
prefetchTtlMs: NAVIGATION_PREFETCH_TTL_MS,
|
|
52
|
-
timeoutMs: NAVIGATION_TIMEOUT_MS
|
|
53
|
-
});
|
|
54
|
-
var SETTINGS_KEY = /* @__PURE__ */ Symbol.for("@omerdlw/base-framework/navigation/settings");
|
|
55
|
-
var scope = globalThis;
|
|
56
|
-
function getNavigationSettings() {
|
|
57
|
-
return scope[SETTINGS_KEY] ??= createDefaults();
|
|
58
|
-
}
|
|
59
|
-
function mergeNavigationSettings(base, input) {
|
|
60
|
-
const { intent, ...rest } = input;
|
|
61
|
-
const defined = Object.fromEntries(
|
|
62
|
-
Object.entries(rest).filter(([, value]) => value !== void 0)
|
|
63
|
-
);
|
|
64
|
-
let nextIntent = base.intent;
|
|
65
|
-
if (intent === false) nextIntent = false;
|
|
66
|
-
else if (intent === true) nextIntent = base.intent || { ...DEFAULT_INTENT };
|
|
67
|
-
else if (intent)
|
|
68
|
-
nextIntent = { ...base.intent || DEFAULT_INTENT, ...intent };
|
|
69
|
-
return { ...base, ...defined, intent: nextIntent };
|
|
70
|
-
}
|
|
71
|
-
function configureNavigation(input) {
|
|
72
|
-
const previous = getNavigationSettings();
|
|
73
|
-
const next = mergeNavigationSettings(previous, input);
|
|
74
|
-
scope[SETTINGS_KEY] = next;
|
|
75
|
-
return () => {
|
|
76
|
-
if (scope[SETTINGS_KEY] === next) scope[SETTINGS_KEY] = previous;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// src/modules/navigation/utils.ts
|
|
81
|
-
function isSafeInternalHref(value) {
|
|
82
|
-
const href = typeof value === "string" ? value.trim() : "";
|
|
83
|
-
return href.startsWith("/") && !href.startsWith("//");
|
|
84
|
-
}
|
|
85
|
-
function pathOf(href) {
|
|
86
|
-
return normalizePath(String(href).split(/[?#]/)[0]) || "/";
|
|
87
|
-
}
|
|
88
|
-
function locationKeyOf(href) {
|
|
89
|
-
const value = String(href).trim();
|
|
90
|
-
const cut = value.search(/[?#]/);
|
|
91
|
-
if (cut === -1) return pathOf(value);
|
|
92
|
-
return `${pathOf(value)}${value.slice(cut)}`;
|
|
93
|
-
}
|
|
94
|
-
function isSameLocation(left, right) {
|
|
95
|
-
return Boolean(left) && locationKeyOf(left) === locationKeyOf(right);
|
|
96
|
-
}
|
|
97
|
-
function isSamePathname(left, right) {
|
|
98
|
-
return Boolean(left) && Boolean(right) && pathOf(left) === pathOf(right);
|
|
99
|
-
}
|
|
100
|
-
function readWindowLocation() {
|
|
101
|
-
if (typeof window === "undefined") return null;
|
|
102
|
-
const { hash, pathname, search } = window.location;
|
|
103
|
-
return locationKeyOf(`${pathname}${search}${hash}`);
|
|
104
|
-
}
|
|
105
|
-
function internalLinkOf(target) {
|
|
106
|
-
if (typeof Element === "undefined" || !(target instanceof Element))
|
|
107
|
-
return null;
|
|
108
|
-
const link = target.closest("a[href]");
|
|
109
|
-
return link && isSafeInternalHref(link.getAttribute("href")) ? link : null;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// src/modules/navigation/state.ts
|
|
113
|
-
function createNavigationState(location = "") {
|
|
114
|
-
return { active: null, last: null, location };
|
|
115
|
-
}
|
|
116
|
-
function createTrip({
|
|
117
|
-
from,
|
|
118
|
-
href,
|
|
119
|
-
id,
|
|
120
|
-
payload = {},
|
|
121
|
-
signal,
|
|
122
|
-
source,
|
|
123
|
-
startedAt
|
|
124
|
-
}) {
|
|
125
|
-
return {
|
|
126
|
-
from,
|
|
127
|
-
href,
|
|
128
|
-
id,
|
|
129
|
-
payload,
|
|
130
|
-
phase: NAVIGATION_PHASE.LEAVING,
|
|
131
|
-
signal,
|
|
132
|
-
source,
|
|
133
|
-
startedAt,
|
|
134
|
-
status: NAVIGATION_STATUS.PENDING,
|
|
135
|
-
to: locationKeyOf(href)
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function settleTrip(trip, status, {
|
|
139
|
-
arrivedAt,
|
|
140
|
-
endedAt,
|
|
141
|
-
error = null,
|
|
142
|
-
reason = null
|
|
143
|
-
}) {
|
|
144
|
-
const settled = { ...trip, endedAt, error, reason, status };
|
|
145
|
-
if (arrivedAt && arrivedAt !== trip.to) settled.arrivedAt = arrivedAt;
|
|
146
|
-
return settled;
|
|
147
|
-
}
|
|
148
|
-
var tripDestination = (trip) => trip.arrivedAt ?? trip.to;
|
|
149
|
-
|
|
150
|
-
// src/modules/navigation/navigator.ts
|
|
151
|
-
var emitGlobal = (event, payload) => globalEvents.emit(event, payload);
|
|
152
|
-
var afterPaint = (callback) => {
|
|
153
|
-
if (typeof requestAnimationFrame === "function")
|
|
154
|
-
requestAnimationFrame(() => callback());
|
|
155
|
-
else setTimeout(callback, 0);
|
|
156
|
-
};
|
|
157
|
-
function createNavigator(options = {}) {
|
|
158
|
-
const now = options.now ?? Date.now;
|
|
159
|
-
const settings = options.settings ?? getNavigationSettings;
|
|
160
|
-
const readLocation = options.readLocation ?? readWindowLocation;
|
|
161
|
-
const emit = options.emit ?? emitGlobal;
|
|
162
|
-
const nextFrame = options.nextFrame ?? afterPaint;
|
|
163
|
-
let router = options.router ?? null;
|
|
164
|
-
const store = createStore(
|
|
165
|
-
createNavigationState(locationKeyOf(readLocation() ?? "") || ""),
|
|
166
|
-
// Payload values belong to the app; freezing them would surprise it.
|
|
167
|
-
{ freezeSnapshots: false }
|
|
168
|
-
);
|
|
169
|
-
let nextTripId = 0;
|
|
170
|
-
let controller = null;
|
|
171
|
-
let patience = null;
|
|
172
|
-
let replay = null;
|
|
173
|
-
let visit = 0;
|
|
174
|
-
let landedVisit = -1;
|
|
175
|
-
let nextHoldId = 0;
|
|
176
|
-
const holds = /* @__PURE__ */ new Map();
|
|
177
|
-
const providers = [];
|
|
178
|
-
const warmed = /* @__PURE__ */ new Map();
|
|
179
|
-
const intentListeners = /* @__PURE__ */ new Set();
|
|
180
|
-
const active = () => store.getSnapshot().active;
|
|
181
|
-
const isCurrent = (id) => active()?.id === id;
|
|
182
|
-
const latest = (id) => active()?.id === id ? active() : store.getSnapshot().last;
|
|
183
|
-
const currentLocation = () => store.getSnapshot().location || locationKeyOf(readLocation() ?? "");
|
|
184
|
-
const announce = (event, trip) => emit(event, {
|
|
185
|
-
from: trip.from,
|
|
186
|
-
source: trip.source,
|
|
187
|
-
timestamp: now(),
|
|
188
|
-
to: tripDestination(trip),
|
|
189
|
-
trip,
|
|
190
|
-
type: event
|
|
191
|
-
});
|
|
192
|
-
const clearPatience = () => {
|
|
193
|
-
if (patience === null) return;
|
|
194
|
-
clearTimeout(patience);
|
|
195
|
-
patience = null;
|
|
196
|
-
};
|
|
197
|
-
const waitFor = (id) => {
|
|
198
|
-
clearPatience();
|
|
199
|
-
const ms = Number(settings().timeoutMs);
|
|
200
|
-
if (!Number.isFinite(ms) || ms <= 0) return;
|
|
201
|
-
patience = setTimeout(() => {
|
|
202
|
-
patience = null;
|
|
203
|
-
settle(id, NAVIGATION_STATUS.TIMED_OUT, {
|
|
204
|
-
reason: NAVIGATION_REASON.TIME_OUT
|
|
205
|
-
});
|
|
206
|
-
}, ms);
|
|
207
|
-
};
|
|
208
|
-
function settle(id, status, details = {}) {
|
|
209
|
-
const trip = active();
|
|
210
|
-
if (!trip || trip.id !== id) return false;
|
|
211
|
-
clearPatience();
|
|
212
|
-
replay = null;
|
|
213
|
-
const settled = settleTrip(trip, status, { ...details, endedAt: now() });
|
|
214
|
-
const abort = status === NAVIGATION_STATUS.COMPLETED ? null : controller;
|
|
215
|
-
controller = null;
|
|
216
|
-
if (status === NAVIGATION_STATUS.COMPLETED) landedVisit = visit;
|
|
217
|
-
store.publish((state) => ({ ...state, active: null, last: settled }));
|
|
218
|
-
abort?.abort(details.reason ?? status);
|
|
219
|
-
announce(NAVIGATION_EVENTS.END, settled);
|
|
220
|
-
return true;
|
|
221
|
-
}
|
|
222
|
-
function collectPayload(extra) {
|
|
223
|
-
const payload = {};
|
|
224
|
-
for (const { key, value } of providers) {
|
|
225
|
-
try {
|
|
226
|
-
payload[key] = typeof value === "function" ? value() : value;
|
|
227
|
-
} catch (error) {
|
|
228
|
-
report(`Navigation payload (${key})`, error);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
return { ...payload, ...extra };
|
|
232
|
-
}
|
|
233
|
-
function begin(href, source, extra) {
|
|
234
|
-
const previous = active();
|
|
235
|
-
if (previous)
|
|
236
|
-
settle(previous.id, NAVIGATION_STATUS.CANCELLED, {
|
|
237
|
-
reason: NAVIGATION_REASON.SUPERSEDED
|
|
238
|
-
});
|
|
239
|
-
controller = new AbortController();
|
|
240
|
-
const trip = createTrip({
|
|
241
|
-
from: currentLocation(),
|
|
242
|
-
href,
|
|
243
|
-
id: ++nextTripId,
|
|
244
|
-
payload: collectPayload(extra),
|
|
245
|
-
signal: controller.signal,
|
|
246
|
-
source,
|
|
247
|
-
startedAt: now()
|
|
248
|
-
});
|
|
249
|
-
store.publish((state) => ({ ...state, active: trip }));
|
|
250
|
-
waitFor(trip.id);
|
|
251
|
-
announce(NAVIGATION_EVENTS.START, trip);
|
|
252
|
-
return trip;
|
|
253
|
-
}
|
|
254
|
-
function commit(id, go) {
|
|
255
|
-
const trip = active();
|
|
256
|
-
if (!trip || trip.id !== id) return false;
|
|
257
|
-
const routing = { ...trip, phase: NAVIGATION_PHASE.ROUTING };
|
|
258
|
-
store.publish((state) => ({ ...state, active: routing }));
|
|
259
|
-
waitFor(id);
|
|
260
|
-
announce(NAVIGATION_EVENTS.COMMIT, routing);
|
|
261
|
-
try {
|
|
262
|
-
go();
|
|
263
|
-
} catch (error) {
|
|
264
|
-
settle(id, NAVIGATION_STATUS.FAILED, { error });
|
|
265
|
-
report("Navigation commit", error);
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
if (isSamePathname(routing.to, routing.from)) {
|
|
269
|
-
nextFrame(() => {
|
|
270
|
-
const location = readLocation();
|
|
271
|
-
if (isCurrent(id) && location && isSameLocation(location, routing.to))
|
|
272
|
-
arrive(location);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
return true;
|
|
276
|
-
}
|
|
277
|
-
function runHolds(trip, history) {
|
|
278
|
-
const pending = [];
|
|
279
|
-
for (const entry of holds.values()) {
|
|
280
|
-
if (history && !entry.history) continue;
|
|
281
|
-
try {
|
|
282
|
-
const result = entry.hold(trip);
|
|
283
|
-
if (result && typeof result.then === "function")
|
|
284
|
-
pending.push(
|
|
285
|
-
Promise.resolve(result).catch(
|
|
286
|
-
(error) => report("Navigation hold", error)
|
|
287
|
-
)
|
|
288
|
-
);
|
|
289
|
-
} catch (error) {
|
|
290
|
-
report("Navigation hold", error);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
if (pending.length === 0) return Promise.resolve();
|
|
294
|
-
return new Promise((resolve) => {
|
|
295
|
-
const done = () => {
|
|
296
|
-
clearTimeout(cap);
|
|
297
|
-
trip.signal.removeEventListener("abort", done);
|
|
298
|
-
resolve();
|
|
299
|
-
};
|
|
300
|
-
const cap = setTimeout(done, Math.max(0, settings().maxHoldMs));
|
|
301
|
-
trip.signal.addEventListener("abort", done);
|
|
302
|
-
Promise.all(pending).then(done);
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
async function navigate(href, {
|
|
306
|
-
force = false,
|
|
307
|
-
guard,
|
|
308
|
-
onCommit,
|
|
309
|
-
payload,
|
|
310
|
-
replace = false,
|
|
311
|
-
scroll,
|
|
312
|
-
source = NAVIGATION_SOURCE.NAVIGATE
|
|
313
|
-
} = {}) {
|
|
314
|
-
if (!isSafeInternalHref(href) || isSameLocation(href, currentLocation()))
|
|
315
|
-
return { ok: false, trip: null };
|
|
316
|
-
if (!router) {
|
|
317
|
-
report("Navigation", `No router bound; cannot open ${href}`, "warn");
|
|
318
|
-
return { ok: false, trip: null };
|
|
319
|
-
}
|
|
320
|
-
const trip = begin(href, source, payload);
|
|
321
|
-
try {
|
|
322
|
-
if (!force && guard) {
|
|
323
|
-
const verdict = await guard(trip);
|
|
324
|
-
if (!isCurrent(trip.id)) return { ok: false, trip: latest(trip.id) };
|
|
325
|
-
const block = typeof verdict === "boolean" ? { blocked: verdict } : verdict ?? { blocked: false };
|
|
326
|
-
if (block.blocked) {
|
|
327
|
-
settle(trip.id, NAVIGATION_STATUS.CANCELLED, {
|
|
328
|
-
reason: NAVIGATION_REASON.GUARD
|
|
329
|
-
});
|
|
330
|
-
return { blocked: block, ok: false, trip: latest(trip.id) };
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
await runHolds(trip, false);
|
|
334
|
-
if (!isCurrent(trip.id)) return { ok: false, trip: latest(trip.id) };
|
|
335
|
-
const options2 = scroll === void 0 ? void 0 : { scroll };
|
|
336
|
-
const ok = commit(trip.id, () => {
|
|
337
|
-
if (!router) throw new Error("No router bound");
|
|
338
|
-
onCommit?.(active());
|
|
339
|
-
if (replace) router.replace(href, options2);
|
|
340
|
-
else router.push(href, options2);
|
|
341
|
-
});
|
|
342
|
-
return { ok, trip: latest(trip.id) };
|
|
343
|
-
} catch (error) {
|
|
344
|
-
settle(trip.id, NAVIGATION_STATUS.FAILED, { error });
|
|
345
|
-
report("Navigation", error);
|
|
346
|
-
return { ok: false, trip: latest(trip.id) };
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
function depart(to, {
|
|
350
|
-
replay: go,
|
|
351
|
-
source = NAVIGATION_SOURCE.HISTORY
|
|
352
|
-
} = {}) {
|
|
353
|
-
if (!isSafeInternalHref(to)) return null;
|
|
354
|
-
const trip = begin(to, source);
|
|
355
|
-
if (!go) {
|
|
356
|
-
commit(trip.id, () => {
|
|
357
|
-
});
|
|
358
|
-
return latest(trip.id);
|
|
359
|
-
}
|
|
360
|
-
replay = go;
|
|
361
|
-
void runHolds(trip, true).then(() => {
|
|
362
|
-
if (!isCurrent(trip.id) || replay !== go) return;
|
|
363
|
-
replay = null;
|
|
364
|
-
commit(trip.id, go);
|
|
365
|
-
});
|
|
366
|
-
return latest(trip.id);
|
|
367
|
-
}
|
|
368
|
-
function arrive(location) {
|
|
369
|
-
const key = locationKeyOf(location);
|
|
370
|
-
if (!key) return;
|
|
371
|
-
const state = store.getSnapshot();
|
|
372
|
-
if (key !== state.location) {
|
|
373
|
-
visit += 1;
|
|
374
|
-
store.publish((current) => ({ ...current, location: key }));
|
|
375
|
-
}
|
|
376
|
-
const trip = state.active;
|
|
377
|
-
if (!trip) return;
|
|
378
|
-
if (trip.phase === NAVIGATION_PHASE.ROUTING) {
|
|
379
|
-
if (isSameLocation(key, trip.from) && !isSameLocation(key, trip.to))
|
|
380
|
-
return;
|
|
381
|
-
settle(trip.id, NAVIGATION_STATUS.COMPLETED, { arrivedAt: key });
|
|
382
|
-
} else if (isSameLocation(key, trip.to)) {
|
|
383
|
-
settle(trip.id, NAVIGATION_STATUS.COMPLETED, { arrivedAt: key });
|
|
384
|
-
} else if (!isSameLocation(key, trip.from)) {
|
|
385
|
-
settle(trip.id, NAVIGATION_STATUS.CANCELLED, {
|
|
386
|
-
reason: NAVIGATION_REASON.SUPERSEDED
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
function arrival(pathname) {
|
|
391
|
-
const { active: trip, last } = store.getSnapshot();
|
|
392
|
-
const ttl = settings().arrivalTtlMs;
|
|
393
|
-
const fresh = (candidate) => now() - candidate.startedAt < ttl && isSamePathname(tripDestination(candidate), pathname);
|
|
394
|
-
if (trip?.phase === NAVIGATION_PHASE.ROUTING && fresh(trip)) return trip;
|
|
395
|
-
if (last?.status === NAVIGATION_STATUS.COMPLETED && landedVisit === visit && fresh(last))
|
|
396
|
-
return last;
|
|
397
|
-
return null;
|
|
398
|
-
}
|
|
399
|
-
function cancel(reason = null) {
|
|
400
|
-
const trip = active();
|
|
401
|
-
return trip ? settle(trip.id, NAVIGATION_STATUS.CANCELLED, { reason }) : false;
|
|
402
|
-
}
|
|
403
|
-
function hold(run, { history = true } = {}) {
|
|
404
|
-
const id = ++nextHoldId;
|
|
405
|
-
holds.set(id, { history, hold: run });
|
|
406
|
-
return () => {
|
|
407
|
-
holds.delete(id);
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function holdsHistory() {
|
|
411
|
-
for (const entry of holds.values()) if (entry.history) return true;
|
|
412
|
-
return false;
|
|
413
|
-
}
|
|
414
|
-
function provide(key, value) {
|
|
415
|
-
const entry = { key, value };
|
|
416
|
-
providers.push(entry);
|
|
417
|
-
return () => {
|
|
418
|
-
const index = providers.indexOf(entry);
|
|
419
|
-
if (index !== -1) providers.splice(index, 1);
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
function prefetch(href, { force = false, kind } = {}) {
|
|
423
|
-
if (!isSafeInternalHref(href) || typeof router?.prefetch !== "function")
|
|
424
|
-
return false;
|
|
425
|
-
const key = locationKeyOf(href.split("#")[0]);
|
|
426
|
-
const at = warmed.get(key);
|
|
427
|
-
if (!force && at !== void 0 && now() - at < settings().prefetchTtlMs)
|
|
428
|
-
return false;
|
|
429
|
-
warmed.set(key, now());
|
|
430
|
-
for (const listener of intentListeners) {
|
|
431
|
-
try {
|
|
432
|
-
listener(pathOf(href), href);
|
|
433
|
-
} catch (error) {
|
|
434
|
-
report("Navigation intent listener", error);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
try {
|
|
438
|
-
router.prefetch(href, {
|
|
439
|
-
kind: kind ?? settings().prefetchKind,
|
|
440
|
-
onInvalidate: () => {
|
|
441
|
-
if (warmed.get(key) !== void 0) warmed.delete(key);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
return true;
|
|
445
|
-
} catch (error) {
|
|
446
|
-
warmed.delete(key);
|
|
447
|
-
report("Navigation prefetch", error, "warn");
|
|
448
|
-
return false;
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
function onIntent(listener) {
|
|
452
|
-
intentListeners.add(listener);
|
|
453
|
-
return () => {
|
|
454
|
-
intentListeners.delete(listener);
|
|
455
|
-
};
|
|
456
|
-
}
|
|
457
|
-
function setRouter(next) {
|
|
458
|
-
router = next;
|
|
459
|
-
}
|
|
460
|
-
function dispose() {
|
|
461
|
-
clearPatience();
|
|
462
|
-
const go = replay;
|
|
463
|
-
replay = null;
|
|
464
|
-
go?.();
|
|
465
|
-
}
|
|
466
|
-
return {
|
|
467
|
-
arrival,
|
|
468
|
-
arrive,
|
|
469
|
-
cancel,
|
|
470
|
-
depart,
|
|
471
|
-
dispose,
|
|
472
|
-
hold,
|
|
473
|
-
holdsHistory,
|
|
474
|
-
navigate,
|
|
475
|
-
onIntent,
|
|
476
|
-
prefetch,
|
|
477
|
-
provide,
|
|
478
|
-
setRouter,
|
|
479
|
-
store
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
export { NAVIGATION_EVENTS, NAVIGATION_PHASE, NAVIGATION_PREFETCH_ATTRIBUTE, NAVIGATION_REASON, NAVIGATION_SOURCE, NAVIGATION_STATUS, configureNavigation, createNavigationState, createNavigator, getNavigationSettings, internalLinkOf, isSafeInternalHref, isSameLocation, isSamePathname, locationKeyOf, pathOf, readWindowLocation, tripDestination };
|
|
484
|
-
//# sourceMappingURL=chunk-HLL5EHXC.js.map
|
|
485
|
-
//# sourceMappingURL=chunk-HLL5EHXC.js.map
|