@omerdlw/base-framework 3.1.0 → 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 -11
- 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 +14 -22
- 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 +25 -2
- package/dist/modules/ambient/dom.d.ts.map +1 -1
- package/dist/modules/ambient/extractor.d.ts +10 -0
- 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/module.d.ts +12 -1
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/oklab.d.ts +24 -0
- package/dist/modules/ambient/oklab.d.ts.map +1 -1
- package/dist/modules/ambient/quantize.d.ts +4 -0
- package/dist/modules/ambient/quantize.d.ts.map +1 -1
- package/dist/modules/ambient/server/address.d.ts +8 -0
- package/dist/modules/ambient/server/address.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.d.ts +24 -0
- package/dist/modules/ambient/server/index.d.ts.map +1 -1
- package/dist/modules/ambient/settings.d.ts +26 -0
- package/dist/modules/ambient/settings.d.ts.map +1 -1
- package/dist/modules/ambient/types.d.ts +100 -1
- package/dist/modules/ambient/types.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts +16 -0
- 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 +6 -6
- 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 -3
- 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/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 -3
- 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 -5
- 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 -22
- 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 -42
- 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/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/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 +7 -6
- 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 -1
- package/dist/modules/modal/types.d.ts.map +1 -1
- package/dist/modules/navigation/context.d.ts +16 -4
- package/dist/modules/navigation/context.d.ts.map +1 -1
- package/dist/modules/navigation/hooks.d.ts +28 -1
- 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 +10 -1
- 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 -2
- 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 -19
- package/dist/ui/index.js +2158 -1860
- package/dist/ui/index.js.map +1 -1
- 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 -61
- 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 +100 -97
- 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-6UFMD6TK.js +0 -419
- package/dist/chunk-6UFMD6TK.js.map +0 -1
- package/dist/chunk-AA2TWJQI.js +0 -2186
- package/dist/chunk-AA2TWJQI.js.map +0 -1
- package/dist/chunk-ACLLDU3J.js +0 -888
- package/dist/chunk-ACLLDU3J.js.map +0 -1
- package/dist/chunk-DGCQWQLZ.js +0 -61
- package/dist/chunk-DGCQWQLZ.js.map +0 -1
- package/dist/chunk-E6ANX5YP.js +0 -1273
- package/dist/chunk-E6ANX5YP.js.map +0 -1
- package/dist/chunk-GDCVEINL.js +0 -408
- package/dist/chunk-GDCVEINL.js.map +0 -1
- package/dist/chunk-GN666KV5.js +0 -28
- package/dist/chunk-GN666KV5.js.map +0 -1
- package/dist/chunk-HCSDQEFB.js +0 -845
- package/dist/chunk-HCSDQEFB.js.map +0 -1
- package/dist/chunk-HMEWYAWU.js +0 -1889
- package/dist/chunk-HMEWYAWU.js.map +0 -1
- package/dist/chunk-I3IZUBBU.js +0 -97
- package/dist/chunk-I3IZUBBU.js.map +0 -1
- package/dist/chunk-JCZUCKI3.js +0 -27
- package/dist/chunk-JCZUCKI3.js.map +0 -1
- package/dist/chunk-MAGYFVKH.js +0 -67
- package/dist/chunk-MAGYFVKH.js.map +0 -1
- package/dist/chunk-NEBGCFE3.js +0 -521
- package/dist/chunk-NEBGCFE3.js.map +0 -1
- package/dist/chunk-NK2DQB3G.js +0 -306
- package/dist/chunk-NK2DQB3G.js.map +0 -1
- package/dist/chunk-QI3ALLIB.js +0 -38
- package/dist/chunk-QI3ALLIB.js.map +0 -1
- package/dist/chunk-QM2P6TIU.js +0 -353
- package/dist/chunk-QM2P6TIU.js.map +0 -1
- package/dist/chunk-RFP2DJAB.js +0 -658
- package/dist/chunk-RFP2DJAB.js.map +0 -1
- package/dist/chunk-SQ7XZMCN.js +0 -481
- package/dist/chunk-SQ7XZMCN.js.map +0 -1
- package/dist/chunk-TMTMQNEQ.js +0 -372
- package/dist/chunk-TMTMQNEQ.js.map +0 -1
- package/dist/chunk-VDNE3A7X.js +0 -9724
- package/dist/chunk-VDNE3A7X.js.map +0 -1
- package/dist/chunk-XATRMFGU.js +0 -139
- package/dist/chunk-XATRMFGU.js.map +0 -1
- package/dist/chunk-ZAP2YHZG.js +0 -454
- package/dist/chunk-ZAP2YHZG.js.map +0 -1
- package/dist/chunk-ZH5FUYPG.js +0 -349
- package/dist/chunk-ZH5FUYPG.js.map +0 -1
- package/dist/chunk-ZKM4RETZ.js +0 -51
- package/dist/chunk-ZKM4RETZ.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-scroll-lock.d.ts +0 -3
- package/dist/hooks/use-scroll-lock.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 -225
- package/dist/modules/ambient/server/index.js.map +0 -1
- package/dist/modules/ambient/worker/index.js +0 -122
- 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 -1274
- 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 -33
- package/dist/modules/navigation/constants.d.ts.map +0 -1
- package/dist/modules/navigation/index.js +0 -80
- package/dist/modules/navigation/index.js.map +0 -1
- package/dist/modules/navigation/navigator.d.ts +0 -3
- package/dist/modules/navigation/navigator.d.ts.map +0 -1
- package/dist/modules/navigation/settings.d.ts +0 -5
- package/dist/modules/navigation/settings.d.ts.map +0 -1
- package/dist/modules/navigation/state.d.ts +0 -19
- package/dist/modules/navigation/state.d.ts.map +0 -1
- package/dist/modules/navigation/types.d.ts +0 -118
- package/dist/modules/navigation/types.d.ts.map +0 -1
- package/dist/modules/navigation/utils.d.ts +0 -8
- package/dist/modules/navigation/utils.d.ts.map +0 -1
- package/dist/modules/notification/index.js +0 -7
- package/dist/overlay-LTRZUZQD.js +0 -9
- package/dist/overlay-LTRZUZQD.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 -46
- 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 -297
- package/dist/tokens/index.js.map +0 -1
- package/dist/tokens/motion-config.d.ts +0 -35
- 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/ui/carousel/carousel.d.ts +0 -24
- package/dist/ui/carousel/carousel.d.ts.map +0 -1
- package/dist/ui/carousel/track.d.ts +0 -11
- package/dist/ui/carousel/track.d.ts.map +0 -1
- package/dist/ui/carousel/use-drag-scroll.d.ts +0 -3
- package/dist/ui/carousel/use-drag-scroll.d.ts.map +0 -1
- package/dist/ui/cn.d.ts +0 -19
- package/dist/ui/cn.d.ts.map +0 -1
- package/dist/ui/components/avatar.d.ts +0 -14
- package/dist/ui/components/avatar.d.ts.map +0 -1
- package/dist/ui/components/button.d.ts +0 -9
- package/dist/ui/components/button.d.ts.map +0 -1
- package/dist/ui/components/checkbox.d.ts +0 -18
- package/dist/ui/components/checkbox.d.ts.map +0 -1
- package/dist/ui/components/icon.d.ts +0 -4
- package/dist/ui/components/icon.d.ts.map +0 -1
- package/dist/ui/components/image.d.ts +0 -13
- package/dist/ui/components/image.d.ts.map +0 -1
- package/dist/ui/components/indicator.d.ts +0 -37
- package/dist/ui/components/indicator.d.ts.map +0 -1
- package/dist/ui/components/input.d.ts +0 -15
- package/dist/ui/components/input.d.ts.map +0 -1
- package/dist/ui/components/loader.d.ts +0 -17
- package/dist/ui/components/loader.d.ts.map +0 -1
- package/dist/ui/components/segmented.d.ts +0 -21
- package/dist/ui/components/segmented.d.ts.map +0 -1
- package/dist/ui/components/select.d.ts +0 -34
- package/dist/ui/components/select.d.ts.map +0 -1
- package/dist/ui/components/skeleton.d.ts +0 -16
- package/dist/ui/components/skeleton.d.ts.map +0 -1
- package/dist/ui/components/switch.d.ts +0 -11
- package/dist/ui/components/switch.d.ts.map +0 -1
- package/dist/ui/components/tooltip.d.ts +0 -25
- package/dist/ui/components/tooltip.d.ts.map +0 -1
- package/dist/ui/defaults.d.ts +0 -250
- package/dist/ui/defaults.d.ts.map +0 -1
- package/dist/ui/define.d.ts +0 -112
- package/dist/ui/define.d.ts.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/provider.d.ts +0 -11
- package/dist/ui/provider.d.ts.map +0 -1
- package/dist/ui/recipe.d.ts +0 -70
- package/dist/ui/recipe.d.ts.map +0 -1
- package/dist/ui/recipes.d.ts +0 -9
- package/dist/ui/recipes.d.ts.map +0 -1
- package/dist/ui/recipes.js +0 -648
- package/dist/ui/recipes.js.map +0 -1
- package/dist/ui/split.d.ts +0 -4
- package/dist/ui/split.d.ts.map +0 -1
- package/dist/ui/tones.d.ts +0 -23
- package/dist/ui/tones.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/docs/ui.md +0 -183
- package/styles/effects.css +0 -219
- package/styles/index.css +0 -8
- package/styles/interaction.css +0 -273
- package/styles/palette.css +0 -81
- package/styles/time.css +0 -26
- package/styles/tokens.css +0 -114
- package/styles/utilities.css +0 -110
- package/templates/motion/background.ts +0 -15
- package/templates/motion/context-menu.ts +0 -65
- package/templates/motion/dock.ts +0 -421
- package/templates/motion/modal.ts +0 -82
- package/templates/motion/notification.ts +0 -26
- package/templates/motion/tokens.ts +0 -36
- /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
|
@@ -0,0 +1,832 @@
|
|
|
1
|
+
// src/modules/ambient/oklab.ts
|
|
2
|
+
var DEG = Math.PI / 180;
|
|
3
|
+
var GAMUT_EPSILON = 1e-5;
|
|
4
|
+
var CHROMA_SEARCH_LIMIT = 0.4;
|
|
5
|
+
var CHROMA_SEARCH_STEPS = 18;
|
|
6
|
+
var ACHROMATIC_CHROMA = 1e-6;
|
|
7
|
+
var DISPLAY_ACHROMATIC_CHROMA = 5e-4;
|
|
8
|
+
var GAMUT_HEADROOM = 0.96;
|
|
9
|
+
var DEFAULT_TONE_CHROMA_CAP = 0.3;
|
|
10
|
+
var DEFAULT_MIN_CONTRAST = 4.5;
|
|
11
|
+
var ON_COLOR_STEPS = 12;
|
|
12
|
+
var ON_LIGHT_START = 0.985;
|
|
13
|
+
var ON_LIGHT_STEP = 25e-4;
|
|
14
|
+
var ON_DARK_START = 0.18;
|
|
15
|
+
var ON_DARK_STEP = 0.015;
|
|
16
|
+
var LINEAR_LUT = new Float32Array(256);
|
|
17
|
+
for (let i = 0; i < 256; i++) {
|
|
18
|
+
const v = i / 255;
|
|
19
|
+
LINEAR_LUT[i] = v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
|
|
20
|
+
}
|
|
21
|
+
function clamp(value, min, max) {
|
|
22
|
+
return Math.max(min, Math.min(max, value));
|
|
23
|
+
}
|
|
24
|
+
function smoothstep(edge0, edge1, value) {
|
|
25
|
+
const t = clamp((value - edge0) / (edge1 - edge0), 0, 1);
|
|
26
|
+
return t * t * (3 - 2 * t);
|
|
27
|
+
}
|
|
28
|
+
function srgbToOklab(r, g, b) {
|
|
29
|
+
const lr = LINEAR_LUT[r & 255];
|
|
30
|
+
const lg = LINEAR_LUT[g & 255];
|
|
31
|
+
const lb = LINEAR_LUT[b & 255];
|
|
32
|
+
const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb);
|
|
33
|
+
const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb);
|
|
34
|
+
const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb);
|
|
35
|
+
return [0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s, 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s, 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s];
|
|
36
|
+
}
|
|
37
|
+
function oklchToLinearSrgb(l, c, h) {
|
|
38
|
+
const a = c * Math.cos(h * DEG);
|
|
39
|
+
const b = c * Math.sin(h * DEG);
|
|
40
|
+
const l_ = (l + 0.3963377774 * a + 0.2158037573 * b) ** 3;
|
|
41
|
+
const m_ = (l - 0.1055613458 * a - 0.0638541728 * b) ** 3;
|
|
42
|
+
const s_ = (l - 0.0894841775 * a - 1.291485548 * b) ** 3;
|
|
43
|
+
return [4.0767416621 * l_ - 3.3077115913 * m_ + 0.2309699292 * s_, -1.2684380046 * l_ + 2.6097574011 * m_ - 0.3413193965 * s_, -0.0041960863 * l_ - 0.7034186147 * m_ + 1.707614701 * s_];
|
|
44
|
+
}
|
|
45
|
+
function labToLch([l, a, b]) {
|
|
46
|
+
const c = Math.sqrt(a * a + b * b);
|
|
47
|
+
const h = c < ACHROMATIC_CHROMA ? 0 : (Math.atan2(b, a) / DEG + 360) % 360;
|
|
48
|
+
return {
|
|
49
|
+
c,
|
|
50
|
+
h,
|
|
51
|
+
l
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
var inGamut = (rgb) => rgb.every((v) => v >= -GAMUT_EPSILON && v <= 1 + GAMUT_EPSILON);
|
|
55
|
+
function maxChroma(l, h) {
|
|
56
|
+
if (l <= 0 || l >= 1) return 0;
|
|
57
|
+
let low = 0;
|
|
58
|
+
let high = CHROMA_SEARCH_LIMIT;
|
|
59
|
+
for (let step = 0; step < CHROMA_SEARCH_STEPS; step++) {
|
|
60
|
+
const middle = (low + high) / 2;
|
|
61
|
+
if (inGamut(oklchToLinearSrgb(l, middle, h))) low = middle;
|
|
62
|
+
else high = middle;
|
|
63
|
+
}
|
|
64
|
+
return low;
|
|
65
|
+
}
|
|
66
|
+
function hueDistance(a, b) {
|
|
67
|
+
const d = Math.abs(a - b) % 360;
|
|
68
|
+
return d > 180 ? 360 - d : d;
|
|
69
|
+
}
|
|
70
|
+
function luminance({
|
|
71
|
+
c,
|
|
72
|
+
h,
|
|
73
|
+
l
|
|
74
|
+
}) {
|
|
75
|
+
const [r, g, b] = oklchToLinearSrgb(l, c, h).map((v) => clamp(v, 0, 1));
|
|
76
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
77
|
+
}
|
|
78
|
+
function contrastRatio(a, b) {
|
|
79
|
+
const la = luminance(a);
|
|
80
|
+
const lb = luminance(b);
|
|
81
|
+
return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);
|
|
82
|
+
}
|
|
83
|
+
var round = (value, digits) => {
|
|
84
|
+
const factor = 10 ** digits;
|
|
85
|
+
return Math.round(value * factor) / factor;
|
|
86
|
+
};
|
|
87
|
+
function formatOklch({
|
|
88
|
+
c,
|
|
89
|
+
h,
|
|
90
|
+
l
|
|
91
|
+
}) {
|
|
92
|
+
const chroma = c < DISPLAY_ACHROMATIC_CHROMA ? 0 : c;
|
|
93
|
+
return `oklch(${round(clamp(l, 0, 1), 3).toFixed(3)} ${round(chroma, 3).toFixed(3)} ${round(chroma === 0 ? 0 : h, 1).toFixed(1)})`;
|
|
94
|
+
}
|
|
95
|
+
function toneOf(h, l, rel, cap = DEFAULT_TONE_CHROMA_CAP) {
|
|
96
|
+
const room = maxChroma(l, h) * GAMUT_HEADROOM;
|
|
97
|
+
return {
|
|
98
|
+
c: Math.min(cap, clamp(rel, 0, 1) * room),
|
|
99
|
+
h,
|
|
100
|
+
l
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function onColorFor(background, minContrast = DEFAULT_MIN_CONTRAST) {
|
|
104
|
+
const light = (l) => toneOf(background.h, l, 0.12, 0.012);
|
|
105
|
+
const dark = (l) => toneOf(background.h, l, 0.35, 0.03);
|
|
106
|
+
const towardLight = contrastRatio(light(ON_LIGHT_START), background);
|
|
107
|
+
const towardDark = contrastRatio(dark(ON_DARK_START), background);
|
|
108
|
+
const useLight = towardLight >= minContrast || towardLight >= towardDark;
|
|
109
|
+
for (let step = 0; step <= ON_COLOR_STEPS; step++) {
|
|
110
|
+
const candidate = useLight ? light(Math.min(1, ON_LIGHT_START + step * ON_LIGHT_STEP)) : dark(Math.max(0, ON_DARK_START - step * ON_DARK_STEP));
|
|
111
|
+
if (contrastRatio(candidate, background) >= minContrast) return candidate;
|
|
112
|
+
}
|
|
113
|
+
return useLight ? {
|
|
114
|
+
c: 0,
|
|
115
|
+
h: 0,
|
|
116
|
+
l: 1
|
|
117
|
+
} : {
|
|
118
|
+
c: 0,
|
|
119
|
+
h: 0,
|
|
120
|
+
l: 0
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/modules/ambient/analyze-bounds.ts
|
|
125
|
+
var ALPHA_THRESHOLD = 128;
|
|
126
|
+
var BAR_MEAN_LIGHTNESS = 0.12;
|
|
127
|
+
var BAR_MAX_LIGHTNESS = 0.2;
|
|
128
|
+
var MAX_BAR_SHARE = 0.22;
|
|
129
|
+
var lightnessAt = (data, index) => srgbToOklab(data[index], data[index + 1], data[index + 2])[0];
|
|
130
|
+
function findContentBounds({
|
|
131
|
+
data,
|
|
132
|
+
height,
|
|
133
|
+
width
|
|
134
|
+
}) {
|
|
135
|
+
const isBar = (count, at) => {
|
|
136
|
+
let sum = 0;
|
|
137
|
+
let max = 0;
|
|
138
|
+
let seen = 0;
|
|
139
|
+
for (let step = 0; step < count; step++) {
|
|
140
|
+
const index = at(step);
|
|
141
|
+
if (data[index + 3] < ALPHA_THRESHOLD) continue;
|
|
142
|
+
const l = lightnessAt(data, index);
|
|
143
|
+
sum += l;
|
|
144
|
+
if (l > max) max = l;
|
|
145
|
+
seen++;
|
|
146
|
+
}
|
|
147
|
+
return seen > 0 && sum / seen < BAR_MEAN_LIGHTNESS && max < BAR_MAX_LIGHTNESS;
|
|
148
|
+
};
|
|
149
|
+
const row = (y) => isBar(width, (x) => (y * width + x) * 4);
|
|
150
|
+
const maxRows = Math.floor(height * MAX_BAR_SHARE);
|
|
151
|
+
const maxColumns = Math.floor(width * MAX_BAR_SHARE);
|
|
152
|
+
let top = 0;
|
|
153
|
+
while (top < maxRows && row(top)) top++;
|
|
154
|
+
let bottom = height;
|
|
155
|
+
while (height - bottom < maxRows && bottom - 1 > top && row(bottom - 1)) bottom--;
|
|
156
|
+
const column = (x) => isBar(bottom - top, (step) => ((top + step) * width + x) * 4);
|
|
157
|
+
let left = 0;
|
|
158
|
+
while (left < maxColumns && column(left)) left++;
|
|
159
|
+
let right = width;
|
|
160
|
+
while (width - right < maxColumns && right - 1 > left && column(right - 1)) right--;
|
|
161
|
+
return {
|
|
162
|
+
bottom,
|
|
163
|
+
left,
|
|
164
|
+
right,
|
|
165
|
+
top
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// src/modules/ambient/settings.ts
|
|
170
|
+
var AMBIENT_TONES = Object.freeze([10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 95]);
|
|
171
|
+
var AMBIENT_REGIONS = Object.freeze(["top", "bottom", "left", "right", "center"]);
|
|
172
|
+
var DEFAULT_ANALYSIS = Object.freeze({
|
|
173
|
+
centerWeight: 0.5,
|
|
174
|
+
clusters: 7,
|
|
175
|
+
letterbox: true,
|
|
176
|
+
minContrast: 4.5,
|
|
177
|
+
minHueDistance: 40,
|
|
178
|
+
sampleSize: 128,
|
|
179
|
+
shadowLightness: 0.16
|
|
180
|
+
});
|
|
181
|
+
var DEFAULT_CSS_VAR_NAMES = Object.freeze({
|
|
182
|
+
on: "--ambient-on-{role}",
|
|
183
|
+
region: "--ambient-{region}",
|
|
184
|
+
role: "--ambient-{role}",
|
|
185
|
+
shadow: "--ambient-shadow",
|
|
186
|
+
tone: "--ambient-{role}-{tone}"
|
|
187
|
+
});
|
|
188
|
+
var DEFAULT_PROXY = "/api/ambient/proxy?url=";
|
|
189
|
+
var DEFAULT_LINGER_MS = 3e3;
|
|
190
|
+
var createDefaults = () => ({
|
|
191
|
+
analysis: {
|
|
192
|
+
...DEFAULT_ANALYSIS
|
|
193
|
+
},
|
|
194
|
+
cacheLimit: 100,
|
|
195
|
+
cssVars: {
|
|
196
|
+
...DEFAULT_CSS_VAR_NAMES,
|
|
197
|
+
tones: AMBIENT_TONES
|
|
198
|
+
},
|
|
199
|
+
linger: DEFAULT_LINGER_MS,
|
|
200
|
+
proxy: DEFAULT_PROXY,
|
|
201
|
+
strategy: "auto",
|
|
202
|
+
worker: null
|
|
203
|
+
});
|
|
204
|
+
var SETTINGS_KEY = /* @__PURE__ */ Symbol.for("@omerdlw/base-framework/ambient/settings");
|
|
205
|
+
var scope = globalThis;
|
|
206
|
+
function getAmbientSettings() {
|
|
207
|
+
return scope[SETTINGS_KEY] ??= createDefaults();
|
|
208
|
+
}
|
|
209
|
+
function mergeAmbientSettings(base, input) {
|
|
210
|
+
return {
|
|
211
|
+
analysis: {
|
|
212
|
+
...base.analysis,
|
|
213
|
+
...input.analysis
|
|
214
|
+
},
|
|
215
|
+
cacheLimit: input.cacheLimit ?? base.cacheLimit,
|
|
216
|
+
cssVars: {
|
|
217
|
+
...base.cssVars,
|
|
218
|
+
...input.cssVars
|
|
219
|
+
},
|
|
220
|
+
linger: input.linger ?? base.linger,
|
|
221
|
+
proxy: input.proxy === void 0 ? base.proxy : input.proxy,
|
|
222
|
+
strategy: input.strategy ?? base.strategy,
|
|
223
|
+
worker: input.worker === void 0 ? base.worker : input.worker
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
function configureAmbient(input) {
|
|
227
|
+
const previous = getAmbientSettings();
|
|
228
|
+
const next = mergeAmbientSettings(previous, input);
|
|
229
|
+
scope[SETTINGS_KEY] = next;
|
|
230
|
+
return () => {
|
|
231
|
+
if (scope[SETTINGS_KEY] === next) scope[SETTINGS_KEY] = previous;
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function resolveAnalysis(overrides) {
|
|
235
|
+
return {
|
|
236
|
+
...getAmbientSettings().analysis,
|
|
237
|
+
...overrides
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// src/modules/ambient/analyze-measures.ts
|
|
242
|
+
var MIN_CHROMA = 0.022;
|
|
243
|
+
var MIN_PRESENCE = 0.03;
|
|
244
|
+
var MIN_POPULATION = 4e-3;
|
|
245
|
+
var REGION_BITS = {
|
|
246
|
+
top: 1,
|
|
247
|
+
bottom: 2,
|
|
248
|
+
left: 4,
|
|
249
|
+
right: 8,
|
|
250
|
+
center: 16
|
|
251
|
+
};
|
|
252
|
+
var reliability = (l) => smoothstep(0.1, 0.28, l) * (1 - smoothstep(0.9, 0.98, l));
|
|
253
|
+
var colorfulness = (c) => smoothstep(MIN_CHROMA, 0.06, c);
|
|
254
|
+
var isChromatic = (cluster) => cluster.c >= MIN_CHROMA && cluster.rely > 0;
|
|
255
|
+
function pickBest(items, score) {
|
|
256
|
+
let best = null;
|
|
257
|
+
let bestScore = 0;
|
|
258
|
+
for (const item of items) {
|
|
259
|
+
const value = score(item);
|
|
260
|
+
if (value > bestScore) {
|
|
261
|
+
bestScore = value;
|
|
262
|
+
best = item;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return best;
|
|
266
|
+
}
|
|
267
|
+
var round3 = (value) => Math.round(value * 1e3) / 1e3;
|
|
268
|
+
function skinLikeness({
|
|
269
|
+
c,
|
|
270
|
+
h,
|
|
271
|
+
l
|
|
272
|
+
}) {
|
|
273
|
+
return (1 - smoothstep(12, 26, hueDistance(h, 54))) * smoothstep(0.02, 0.035, c) * (1 - smoothstep(0.11, 0.15, c)) * smoothstep(0.26, 0.38, l) * (1 - smoothstep(0.88, 0.95, l));
|
|
274
|
+
}
|
|
275
|
+
var warmth = (h) => 1 - smoothstep(22, 50, hueDistance(h, 42));
|
|
276
|
+
var salience = (color) => 1 - 0.65 * skinLikeness(color);
|
|
277
|
+
|
|
278
|
+
// src/modules/ambient/quantize.ts
|
|
279
|
+
function seedCentroids(points, weights, centroids, k, distance) {
|
|
280
|
+
const n = weights.length;
|
|
281
|
+
let first = 0;
|
|
282
|
+
for (let i = 1; i < n; i++) if (weights[i] > weights[first]) first = i;
|
|
283
|
+
centroids.set(points.subarray(first * 3, first * 3 + 3), 0);
|
|
284
|
+
const nearest = new Float64Array(n).fill(Infinity);
|
|
285
|
+
let found = 1;
|
|
286
|
+
for (; found < k; found++) {
|
|
287
|
+
let best = -1;
|
|
288
|
+
let bestScore = 0;
|
|
289
|
+
for (let i = 0; i < n; i++) {
|
|
290
|
+
const d = distance(i, found - 1);
|
|
291
|
+
if (d < nearest[i]) nearest[i] = d;
|
|
292
|
+
const score = weights[i] * nearest[i];
|
|
293
|
+
if (score > bestScore) {
|
|
294
|
+
bestScore = score;
|
|
295
|
+
best = i;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (best < 0) break;
|
|
299
|
+
centroids.set(points.subarray(best * 3, best * 3 + 3), found * 3);
|
|
300
|
+
}
|
|
301
|
+
return found;
|
|
302
|
+
}
|
|
303
|
+
function assignPoints(assignment, found, distance, moved) {
|
|
304
|
+
for (let i = 0; i < assignment.length; i++) {
|
|
305
|
+
let best = 0;
|
|
306
|
+
let bestDistance = Infinity;
|
|
307
|
+
for (let j = 0; j < found; j++) {
|
|
308
|
+
const d = distance(i, j);
|
|
309
|
+
if (d < bestDistance) {
|
|
310
|
+
bestDistance = d;
|
|
311
|
+
best = j;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (assignment[i] !== best) {
|
|
315
|
+
assignment[i] = best;
|
|
316
|
+
moved = true;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return moved;
|
|
320
|
+
}
|
|
321
|
+
function updateCentroids(points, weights, assignment, centroids, sums, found) {
|
|
322
|
+
sums.fill(0);
|
|
323
|
+
for (let i = 0; i < weights.length; i++) {
|
|
324
|
+
const j = assignment[i] * 4;
|
|
325
|
+
const w = weights[i];
|
|
326
|
+
sums[j] += points[i * 3] * w;
|
|
327
|
+
sums[j + 1] += points[i * 3 + 1] * w;
|
|
328
|
+
sums[j + 2] += points[i * 3 + 2] * w;
|
|
329
|
+
sums[j + 3] += w;
|
|
330
|
+
}
|
|
331
|
+
for (let j = 0; j < found; j++) {
|
|
332
|
+
const w = sums[j * 4 + 3];
|
|
333
|
+
if (w <= 0) continue;
|
|
334
|
+
centroids[j * 3] = sums[j * 4] / w;
|
|
335
|
+
centroids[j * 3 + 1] = sums[j * 4 + 1] / w;
|
|
336
|
+
centroids[j * 3 + 2] = sums[j * 4 + 2] / w;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function kmeans(points, weights, requested, {
|
|
340
|
+
iterations = 16,
|
|
341
|
+
lightnessWeight = 0.45
|
|
342
|
+
} = {}) {
|
|
343
|
+
const n = weights.length;
|
|
344
|
+
const assignment = new Int32Array(n);
|
|
345
|
+
const k = Math.max(0, Math.min(requested, n));
|
|
346
|
+
const centroids = new Float64Array(k * 3);
|
|
347
|
+
if (k === 0) return {
|
|
348
|
+
assignment,
|
|
349
|
+
centroids,
|
|
350
|
+
k
|
|
351
|
+
};
|
|
352
|
+
const distance = (i, j) => {
|
|
353
|
+
const dl = points[i * 3] - centroids[j * 3];
|
|
354
|
+
const da = points[i * 3 + 1] - centroids[j * 3 + 1];
|
|
355
|
+
const db = points[i * 3 + 2] - centroids[j * 3 + 2];
|
|
356
|
+
return lightnessWeight * dl * dl + da * da + db * db;
|
|
357
|
+
};
|
|
358
|
+
const found = seedCentroids(points, weights, centroids, k, distance);
|
|
359
|
+
const sums = new Float64Array(found * 4);
|
|
360
|
+
for (let round2 = 0; round2 < iterations; round2++) {
|
|
361
|
+
const moved = assignPoints(assignment, found, distance, round2 === 0);
|
|
362
|
+
if (!moved) break;
|
|
363
|
+
updateCentroids(points, weights, assignment, centroids, sums, found);
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
assignment,
|
|
367
|
+
centroids: centroids.slice(0, found * 3),
|
|
368
|
+
k: found
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// src/modules/ambient/analyze-clusters.ts
|
|
373
|
+
var COLOR_KEY_SPACE = 32768;
|
|
374
|
+
var BIN_STRIDE = 4;
|
|
375
|
+
var ALPHA_THRESHOLD2 = 128;
|
|
376
|
+
var CENTER_SIGMA = 0.35;
|
|
377
|
+
var MIN_COLOURED_LIGHTNESS = 0.06;
|
|
378
|
+
var MIN_CLUSTERS = 2;
|
|
379
|
+
var MAX_CLUSTERS = 16;
|
|
380
|
+
var MANY_CLUSTERS = 8;
|
|
381
|
+
var GREY_CLUSTERS_FEW = 2;
|
|
382
|
+
var GREY_CLUSTERS_MANY = 3;
|
|
383
|
+
var CHROMA_WEIGHT_GAIN = 5;
|
|
384
|
+
var CENTER_REGION_HALF = 0.25;
|
|
385
|
+
var LOW_EDGE = 1 / 3;
|
|
386
|
+
var HIGH_EDGE = 2 / 3;
|
|
387
|
+
function regionBitsAt(u, v) {
|
|
388
|
+
return (v < LOW_EDGE ? REGION_BITS.top : 0) | (v > HIGH_EDGE ? REGION_BITS.bottom : 0) | (u < LOW_EDGE ? REGION_BITS.left : 0) | (u > HIGH_EDGE ? REGION_BITS.right : 0) | (Math.abs(u - 0.5) < CENTER_REGION_HALF && Math.abs(v - 0.5) < CENTER_REGION_HALF ? REGION_BITS.center : 0);
|
|
389
|
+
}
|
|
390
|
+
function accumulateBins({
|
|
391
|
+
data,
|
|
392
|
+
width
|
|
393
|
+
}, bounds, centerWeight) {
|
|
394
|
+
const boxWidth = Math.max(1, bounds.right - bounds.left);
|
|
395
|
+
const boxHeight = Math.max(1, bounds.bottom - bounds.top);
|
|
396
|
+
const binOf = new Int32Array(COLOR_KEY_SPACE).fill(-1);
|
|
397
|
+
const binSums = [];
|
|
398
|
+
const pixelBins = new Int32Array(boxWidth * boxHeight).fill(-1);
|
|
399
|
+
const pixelRegions = new Uint8Array(boxWidth * boxHeight);
|
|
400
|
+
const sigma2 = 2 * CENTER_SIGMA * CENTER_SIGMA;
|
|
401
|
+
let total = 0;
|
|
402
|
+
let sumL = 0;
|
|
403
|
+
for (let y = bounds.top; y < bounds.bottom; y++) {
|
|
404
|
+
const v = (y - bounds.top + 0.5) / boxHeight;
|
|
405
|
+
for (let x = bounds.left; x < bounds.right; x++) {
|
|
406
|
+
const index = (y * width + x) * 4;
|
|
407
|
+
if (data[index + 3] < ALPHA_THRESHOLD2) continue;
|
|
408
|
+
const r = data[index];
|
|
409
|
+
const g = data[index + 1];
|
|
410
|
+
const b = data[index + 2];
|
|
411
|
+
const [l, a, bb] = srgbToOklab(r, g, b);
|
|
412
|
+
const u = (x - bounds.left + 0.5) / boxWidth;
|
|
413
|
+
const du = (u - 0.5) * 2;
|
|
414
|
+
const dv = (v - 0.5) * 2;
|
|
415
|
+
const weight = 1 - centerWeight + 2 * centerWeight * Math.exp(-(du * du + dv * dv) / sigma2);
|
|
416
|
+
const key = r >> 3 << 10 | g >> 3 << 5 | b >> 3;
|
|
417
|
+
let bin = binOf[key];
|
|
418
|
+
if (bin < 0) {
|
|
419
|
+
bin = binSums.length / BIN_STRIDE;
|
|
420
|
+
binOf[key] = bin;
|
|
421
|
+
binSums.push(0, 0, 0, 0);
|
|
422
|
+
}
|
|
423
|
+
binSums[bin * BIN_STRIDE] += l * weight;
|
|
424
|
+
binSums[bin * BIN_STRIDE + 1] += a * weight;
|
|
425
|
+
binSums[bin * BIN_STRIDE + 2] += bb * weight;
|
|
426
|
+
binSums[bin * BIN_STRIDE + 3] += weight;
|
|
427
|
+
total += weight;
|
|
428
|
+
sumL += l * weight;
|
|
429
|
+
const local = (y - bounds.top) * boxWidth + (x - bounds.left);
|
|
430
|
+
pixelBins[local] = bin;
|
|
431
|
+
pixelRegions[local] = regionBitsAt(u, v);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return {
|
|
435
|
+
binSums,
|
|
436
|
+
boxHeight,
|
|
437
|
+
boxWidth,
|
|
438
|
+
pixelBins,
|
|
439
|
+
pixelRegions,
|
|
440
|
+
sumL,
|
|
441
|
+
total
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function splitByColour(binSums) {
|
|
445
|
+
const groups = [[], []];
|
|
446
|
+
const bins = binSums.length / BIN_STRIDE;
|
|
447
|
+
for (let i = 0; i < bins; i++) {
|
|
448
|
+
const w = binSums[i * BIN_STRIDE + 3];
|
|
449
|
+
const a = binSums[i * BIN_STRIDE + 1] / w;
|
|
450
|
+
const b = binSums[i * BIN_STRIDE + 2] / w;
|
|
451
|
+
const coloured = Math.sqrt(a * a + b * b) >= MIN_CHROMA && binSums[i * BIN_STRIDE] / w >= MIN_COLOURED_LIGHTNESS;
|
|
452
|
+
groups[coloured ? 0 : 1].push(i);
|
|
453
|
+
}
|
|
454
|
+
return groups;
|
|
455
|
+
}
|
|
456
|
+
function allocateBudgets(groups, requestedClusters) {
|
|
457
|
+
const requested = clamp(Math.round(requestedClusters), MIN_CLUSTERS, MAX_CLUSTERS);
|
|
458
|
+
let greyClusters;
|
|
459
|
+
if (groups[0].length === 0) greyClusters = requested;
|
|
460
|
+
else if (groups[1].length === 0) greyClusters = 0;
|
|
461
|
+
else if (requested >= MANY_CLUSTERS) greyClusters = GREY_CLUSTERS_MANY;
|
|
462
|
+
else greyClusters = GREY_CLUSTERS_FEW;
|
|
463
|
+
return [requested - greyClusters, greyClusters];
|
|
464
|
+
}
|
|
465
|
+
function clusterBins(groups, budgets, {
|
|
466
|
+
binSums,
|
|
467
|
+
total
|
|
468
|
+
}, clusters) {
|
|
469
|
+
const clusterOfBin = new Int32Array(binSums.length / BIN_STRIDE).fill(-1);
|
|
470
|
+
groups.forEach((members, group) => {
|
|
471
|
+
if (members.length === 0 || budgets[group] <= 0) return;
|
|
472
|
+
const points = new Float64Array(members.length * 3);
|
|
473
|
+
const weights = new Float64Array(members.length);
|
|
474
|
+
members.forEach((bin, i) => {
|
|
475
|
+
const w = binSums[bin * BIN_STRIDE + 3];
|
|
476
|
+
const a = binSums[bin * BIN_STRIDE + 1] / w;
|
|
477
|
+
const b = binSums[bin * BIN_STRIDE + 2] / w;
|
|
478
|
+
points[i * 3] = binSums[bin * BIN_STRIDE] / w;
|
|
479
|
+
points[i * 3 + 1] = a;
|
|
480
|
+
points[i * 3 + 2] = b;
|
|
481
|
+
weights[i] = w * (1 + CHROMA_WEIGHT_GAIN * Math.sqrt(a * a + b * b));
|
|
482
|
+
});
|
|
483
|
+
const {
|
|
484
|
+
assignment,
|
|
485
|
+
k
|
|
486
|
+
} = kmeans(points, weights, budgets[group]);
|
|
487
|
+
const sums = new Float64Array(k * BIN_STRIDE);
|
|
488
|
+
members.forEach((bin, i) => {
|
|
489
|
+
for (let channel = 0; channel < BIN_STRIDE; channel++) {
|
|
490
|
+
sums[assignment[i] * BIN_STRIDE + channel] += binSums[bin * BIN_STRIDE + channel];
|
|
491
|
+
}
|
|
492
|
+
});
|
|
493
|
+
const index = new Int32Array(k).fill(-1);
|
|
494
|
+
for (let j = 0; j < k; j++) {
|
|
495
|
+
const pop = sums[j * BIN_STRIDE + 3];
|
|
496
|
+
if (pop <= 0) continue;
|
|
497
|
+
const lch = labToLch([sums[j * BIN_STRIDE] / pop, sums[j * BIN_STRIDE + 1] / pop, sums[j * BIN_STRIDE + 2] / pop]);
|
|
498
|
+
const room = maxChroma(lch.l, lch.h);
|
|
499
|
+
index[j] = clusters.length;
|
|
500
|
+
clusters.push({
|
|
501
|
+
...lch,
|
|
502
|
+
pop: pop / total,
|
|
503
|
+
rel: room > 0 ? clamp(lch.c / room, 0, 1) : 0,
|
|
504
|
+
rely: reliability(lch.l)
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
members.forEach((bin, i) => clusterOfBin[bin] = index[assignment[i]]);
|
|
508
|
+
});
|
|
509
|
+
return clusterOfBin;
|
|
510
|
+
}
|
|
511
|
+
function accumulateRegions(clusterCount, clusterOfBin, {
|
|
512
|
+
binSums,
|
|
513
|
+
pixelBins,
|
|
514
|
+
pixelRegions
|
|
515
|
+
}) {
|
|
516
|
+
const regionWeights = AMBIENT_REGIONS.map(() => new Float64Array(clusterCount));
|
|
517
|
+
const regionLab = AMBIENT_REGIONS.map(() => new Float64Array(clusterCount * 3));
|
|
518
|
+
for (let i = 0; i < pixelBins.length; i++) {
|
|
519
|
+
const bin = pixelBins[i];
|
|
520
|
+
if (bin < 0) continue;
|
|
521
|
+
const cluster = clusterOfBin[bin];
|
|
522
|
+
const bits = pixelRegions[i];
|
|
523
|
+
const w = binSums[bin * BIN_STRIDE + 3];
|
|
524
|
+
AMBIENT_REGIONS.forEach((region, r) => {
|
|
525
|
+
if (!(bits & REGION_BITS[region])) return;
|
|
526
|
+
regionWeights[r][cluster] += 1;
|
|
527
|
+
for (let channel = 0; channel < 3; channel++) {
|
|
528
|
+
regionLab[r][cluster * 3 + channel] += binSums[bin * BIN_STRIDE + channel] / w;
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
return {
|
|
533
|
+
regionLab,
|
|
534
|
+
regionWeights
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
function clusterAmbientPixels(pixels, options) {
|
|
538
|
+
const {
|
|
539
|
+
height,
|
|
540
|
+
width
|
|
541
|
+
} = pixels;
|
|
542
|
+
const bounds = options.letterbox ? findContentBounds(pixels) : {
|
|
543
|
+
bottom: height,
|
|
544
|
+
left: 0,
|
|
545
|
+
right: width,
|
|
546
|
+
top: 0
|
|
547
|
+
};
|
|
548
|
+
const accumulation = accumulateBins(pixels, bounds, options.centerWeight);
|
|
549
|
+
const {
|
|
550
|
+
binSums,
|
|
551
|
+
sumL,
|
|
552
|
+
total
|
|
553
|
+
} = accumulation;
|
|
554
|
+
const meanL = total > 0 ? sumL / total : 0.5;
|
|
555
|
+
const groups = splitByColour(binSums);
|
|
556
|
+
const budgets = allocateBudgets(groups, options.clusters);
|
|
557
|
+
const clusters = [];
|
|
558
|
+
const clusterOfBin = clusterBins(groups, budgets, accumulation, clusters);
|
|
559
|
+
const regions = accumulateRegions(clusters.length, clusterOfBin, accumulation);
|
|
560
|
+
return {
|
|
561
|
+
clusters,
|
|
562
|
+
meanL,
|
|
563
|
+
...regions
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// src/modules/ambient/analyze-swatches.ts
|
|
568
|
+
var roleChroma = (source, {
|
|
569
|
+
cap,
|
|
570
|
+
gain
|
|
571
|
+
}) => Math.min(cap * (1 - 0.3 * warmth(source.h)), Math.max(source.c * gain, Math.min(0.05, source.c * 1.6)) * (1 - 0.3 * skinLikeness(source)));
|
|
572
|
+
var fitTone = (h, l, c) => ({
|
|
573
|
+
c: Math.max(0, Math.min(c, maxChroma(l, h) * GAMUT_HEADROOM)),
|
|
574
|
+
h,
|
|
575
|
+
l
|
|
576
|
+
});
|
|
577
|
+
function buildSwatch(tone, population, fromImage, minContrast) {
|
|
578
|
+
const room = maxChroma(tone.l, tone.h) * GAMUT_HEADROOM;
|
|
579
|
+
const rel = room > 0 ? tone.c / room : 0;
|
|
580
|
+
const ramp = {};
|
|
581
|
+
for (const step of AMBIENT_TONES) {
|
|
582
|
+
ramp[step] = formatOklch(toneOf(tone.h, step / 100, rel, Math.max(tone.c, 0.04)));
|
|
583
|
+
}
|
|
584
|
+
return {
|
|
585
|
+
c: round3(tone.c),
|
|
586
|
+
color: formatOklch(tone),
|
|
587
|
+
fromImage,
|
|
588
|
+
h: Math.round(tone.h * 10) / 10,
|
|
589
|
+
l: round3(tone.l),
|
|
590
|
+
on: formatOklch(onColorFor(tone, minContrast)),
|
|
591
|
+
population: round3(population),
|
|
592
|
+
ramp
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
function roleTone(source, spec, fallback, dilution = 1) {
|
|
596
|
+
if (!source) return fitTone(fallback.h, clamp(fallback.l, spec.min, spec.max), fallback.c);
|
|
597
|
+
return fitTone(source.h, clamp(source.l, spec.min, spec.max), roleChroma(source, spec) * dilution);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// src/modules/ambient/analyze.ts
|
|
601
|
+
var AMBIENT_ANALYSIS_VERSION = 2;
|
|
602
|
+
var FAMILY_HUE_RANGE = 20;
|
|
603
|
+
var MUTED_MAX_CHROMA = 0.09;
|
|
604
|
+
var MUTED_CHROMA_SPAN = 0.12;
|
|
605
|
+
var NEUTRAL_ACCENT_MIN_SHARE = 6e-3;
|
|
606
|
+
var NEUTRAL_ACCENT_MIN_CHROMA = 0.06;
|
|
607
|
+
var ACCENT_MIN_CHROMA = 0.035;
|
|
608
|
+
var FULL_DILUTION_PRESENCE = 0.25;
|
|
609
|
+
var MIN_DILUTION = 0.55;
|
|
610
|
+
var DILUTION_RANGE = 0.45;
|
|
611
|
+
var GREY_LIGHTNESS_RANGE = [0.3, 0.8];
|
|
612
|
+
var DOMINANT_SPEC = {
|
|
613
|
+
cap: 0.2,
|
|
614
|
+
gain: 1.15,
|
|
615
|
+
max: 0.74,
|
|
616
|
+
min: 0.42
|
|
617
|
+
};
|
|
618
|
+
var VIBRANT_SPEC = {
|
|
619
|
+
cap: 0.22,
|
|
620
|
+
gain: 1.35,
|
|
621
|
+
max: 0.84,
|
|
622
|
+
min: 0.62
|
|
623
|
+
};
|
|
624
|
+
var MUTED_SPEC = {
|
|
625
|
+
cap: 0.07,
|
|
626
|
+
gain: 1,
|
|
627
|
+
max: 0.66,
|
|
628
|
+
min: 0.38
|
|
629
|
+
};
|
|
630
|
+
var ACCENT_SPEC = {
|
|
631
|
+
cap: 0.22,
|
|
632
|
+
gain: 1.3,
|
|
633
|
+
max: 0.8,
|
|
634
|
+
min: 0.55
|
|
635
|
+
};
|
|
636
|
+
var REGION_SPEC = {
|
|
637
|
+
cap: 0.18,
|
|
638
|
+
gain: 1.15
|
|
639
|
+
};
|
|
640
|
+
var REGION_LIGHTNESS_RANGE = [0.42, 0.72];
|
|
641
|
+
var REGION_FALLBACK_LIGHTNESS_RANGE = [0.3, 0.7];
|
|
642
|
+
var SHADOW_MAX_SOURCE_LIGHTNESS = 0.5;
|
|
643
|
+
var SHADOW_MIN_SOURCE_CHROMA = 0.02;
|
|
644
|
+
var SHADOW_MIN_SOURCE_POPULATION = 0.02;
|
|
645
|
+
var SHADOW_LIGHTNESS_DRIFT = 0.02;
|
|
646
|
+
var SHADOW_MEAN_LIGHTNESS_PIVOT = 0.45;
|
|
647
|
+
var SHADOW_MEAN_LIGHTNESS_GAIN = 0.06;
|
|
648
|
+
var SHADOW_CHROMA_CAP = 0.1;
|
|
649
|
+
function createFamilyShare(chromatic) {
|
|
650
|
+
const family = /* @__PURE__ */ new Map();
|
|
651
|
+
for (const cluster of chromatic) {
|
|
652
|
+
let share = 0;
|
|
653
|
+
for (const other of chromatic) {
|
|
654
|
+
if (hueDistance(cluster.h, other.h) <= FAMILY_HUE_RANGE) {
|
|
655
|
+
share += other.pop;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
family.set(cluster, share);
|
|
659
|
+
}
|
|
660
|
+
return (cluster) => family.get(cluster) ?? cluster.pop;
|
|
661
|
+
}
|
|
662
|
+
function pickRoleClusters(chromatic, share, neutral, minHueDistance) {
|
|
663
|
+
const dominant = neutral ? null : pickBest(chromatic, (cluster) => share(cluster) * cluster.c * cluster.rely * salience(cluster));
|
|
664
|
+
const vivid = neutral ? null : pickBest(chromatic.filter((cluster) => share(cluster) >= MIN_POPULATION), (cluster) => cluster.c * cluster.c * Math.pow(share(cluster), 0.3) * cluster.rely * salience(cluster));
|
|
665
|
+
const isAccentCandidate = (cluster) => {
|
|
666
|
+
if (neutral) {
|
|
667
|
+
return share(cluster) >= NEUTRAL_ACCENT_MIN_SHARE && cluster.c >= NEUTRAL_ACCENT_MIN_CHROMA;
|
|
668
|
+
}
|
|
669
|
+
return share(cluster) >= MIN_POPULATION && cluster.c >= ACCENT_MIN_CHROMA && (!dominant || hueDistance(cluster.h, dominant.h) >= minHueDistance);
|
|
670
|
+
};
|
|
671
|
+
const accent = pickBest(chromatic.filter(isAccentCandidate), (cluster) => Math.pow(share(cluster), 0.6) * cluster.c * cluster.rely * salience(cluster));
|
|
672
|
+
const muted = neutral ? null : pickBest(chromatic.filter((cluster) => cluster.c <= MUTED_MAX_CHROMA), (cluster) => share(cluster) * cluster.rely * (1 - cluster.c / MUTED_CHROMA_SPAN));
|
|
673
|
+
return {
|
|
674
|
+
accent,
|
|
675
|
+
dominant,
|
|
676
|
+
muted,
|
|
677
|
+
vivid
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
function buildRoles(picks, {
|
|
681
|
+
dilution,
|
|
682
|
+
meanL,
|
|
683
|
+
minContrast,
|
|
684
|
+
neutral,
|
|
685
|
+
share
|
|
686
|
+
}) {
|
|
687
|
+
const {
|
|
688
|
+
accent,
|
|
689
|
+
dominant,
|
|
690
|
+
muted,
|
|
691
|
+
vivid
|
|
692
|
+
} = picks;
|
|
693
|
+
const grey = {
|
|
694
|
+
c: 0,
|
|
695
|
+
h: 0,
|
|
696
|
+
l: clamp(meanL, GREY_LIGHTNESS_RANGE[0], GREY_LIGHTNESS_RANGE[1])
|
|
697
|
+
};
|
|
698
|
+
const dominantHue = dominant?.h ?? vivid?.h ?? 0;
|
|
699
|
+
const accentSource = accent ?? vivid;
|
|
700
|
+
return {
|
|
701
|
+
dominant: buildSwatch(roleTone(dominant, DOMINANT_SPEC, grey), dominant ? share(dominant) : 0, true, minContrast),
|
|
702
|
+
vibrant: buildSwatch(roleTone(vivid, VIBRANT_SPEC, {
|
|
703
|
+
c: 0,
|
|
704
|
+
h: dominantHue,
|
|
705
|
+
l: 0.78
|
|
706
|
+
}, dilution), vivid ? share(vivid) : 0, true, minContrast),
|
|
707
|
+
muted: buildSwatch(roleTone(muted, MUTED_SPEC, {
|
|
708
|
+
c: dominant ? 0.035 : 0,
|
|
709
|
+
h: dominantHue,
|
|
710
|
+
l: clamp(meanL, 0.38, 0.66)
|
|
711
|
+
}), muted ? share(muted) : 0, Boolean(muted) || neutral, minContrast),
|
|
712
|
+
accent: buildSwatch(roleTone(accentSource, ACCENT_SPEC, {
|
|
713
|
+
c: 0,
|
|
714
|
+
h: dominantHue,
|
|
715
|
+
l: 0.72
|
|
716
|
+
}, dilution), accentSource ? share(accentSource) : 0, Boolean(accent), minContrast)
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
function buildShadow(dominant, {
|
|
720
|
+
clusters,
|
|
721
|
+
meanL,
|
|
722
|
+
neutral
|
|
723
|
+
}, baseLightness) {
|
|
724
|
+
const shadowPick = neutral ? null : pickBest(clusters.filter((cluster) => cluster.l <= SHADOW_MAX_SOURCE_LIGHTNESS && cluster.c >= SHADOW_MIN_SOURCE_CHROMA && cluster.pop >= SHADOW_MIN_SOURCE_POPULATION), (cluster) => cluster.pop * cluster.rel * smoothstep(0.05, 0.14, cluster.l));
|
|
725
|
+
const deepSource = shadowPick ?? dominant;
|
|
726
|
+
const lightness = clamp(baseLightness + (meanL - SHADOW_MEAN_LIGHTNESS_PIVOT) * SHADOW_MEAN_LIGHTNESS_GAIN, baseLightness - SHADOW_LIGHTNESS_DRIFT, baseLightness + SHADOW_LIGHTNESS_DRIFT);
|
|
727
|
+
if (!deepSource) return {
|
|
728
|
+
c: 0,
|
|
729
|
+
h: 0,
|
|
730
|
+
l: lightness
|
|
731
|
+
};
|
|
732
|
+
return toneOf(deepSource.h, lightness, clamp(0.3 + 0.7 * deepSource.rel, 0, 0.85), SHADOW_CHROMA_CAP);
|
|
733
|
+
}
|
|
734
|
+
function pickRegionColor(clusters, weights, lab, regionTotal) {
|
|
735
|
+
let strength = 0;
|
|
736
|
+
let pick = null;
|
|
737
|
+
let pickScore = 0;
|
|
738
|
+
for (let j = 0; j < clusters.length; j++) {
|
|
739
|
+
const count = weights[j];
|
|
740
|
+
if (count <= 0) continue;
|
|
741
|
+
const local = labToLch([lab[j * 3] / count, lab[j * 3 + 1] / count, lab[j * 3 + 2] / count]);
|
|
742
|
+
const rely = reliability(local.l);
|
|
743
|
+
if (local.c < MIN_CHROMA || rely <= 0) continue;
|
|
744
|
+
const part = count / regionTotal;
|
|
745
|
+
strength += part * colorfulness(local.c) * rely;
|
|
746
|
+
const score = part * local.c * rely * salience(local);
|
|
747
|
+
if (score > pickScore) {
|
|
748
|
+
pickScore = score;
|
|
749
|
+
pick = local;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
return {
|
|
753
|
+
pick,
|
|
754
|
+
strength
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
function buildRegion(weights, lab, {
|
|
758
|
+
clusters,
|
|
759
|
+
meanL,
|
|
760
|
+
neutral
|
|
761
|
+
}) {
|
|
762
|
+
let regionTotal = 0;
|
|
763
|
+
let regionL = 0;
|
|
764
|
+
clusters.forEach((cluster, j) => {
|
|
765
|
+
regionTotal += weights[j];
|
|
766
|
+
regionL += cluster.l * weights[j];
|
|
767
|
+
});
|
|
768
|
+
const {
|
|
769
|
+
pick,
|
|
770
|
+
strength
|
|
771
|
+
} = pickRegionColor(clusters, weights, lab, regionTotal);
|
|
772
|
+
const chosen = neutral || strength < MIN_PRESENCE ? null : pick;
|
|
773
|
+
const tone = chosen ? fitTone(chosen.h, clamp(chosen.l, REGION_LIGHTNESS_RANGE[0], REGION_LIGHTNESS_RANGE[1]), roleChroma(chosen, REGION_SPEC)) : {
|
|
774
|
+
c: 0,
|
|
775
|
+
h: 0,
|
|
776
|
+
l: clamp(regionTotal > 0 ? regionL / regionTotal : meanL, REGION_FALLBACK_LIGHTNESS_RANGE[0], REGION_FALLBACK_LIGHTNESS_RANGE[1])
|
|
777
|
+
};
|
|
778
|
+
return {
|
|
779
|
+
c: round3(tone.c),
|
|
780
|
+
color: formatOklch(tone),
|
|
781
|
+
h: Math.round(tone.h * 10) / 10,
|
|
782
|
+
l: round3(tone.l),
|
|
783
|
+
strength: round3(chosen ? clamp(strength, 0, 1) : 0)
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function buildRegions(context, regionWeights, regionLab) {
|
|
787
|
+
const regions = {};
|
|
788
|
+
AMBIENT_REGIONS.forEach((region, r) => {
|
|
789
|
+
regions[region] = buildRegion(regionWeights[r], regionLab[r], context);
|
|
790
|
+
});
|
|
791
|
+
return regions;
|
|
792
|
+
}
|
|
793
|
+
function analyzeAmbientPixels(pixels, overrides = {}) {
|
|
794
|
+
const options = {
|
|
795
|
+
...DEFAULT_ANALYSIS,
|
|
796
|
+
...overrides
|
|
797
|
+
};
|
|
798
|
+
const {
|
|
799
|
+
clusters,
|
|
800
|
+
meanL,
|
|
801
|
+
regionLab,
|
|
802
|
+
regionWeights
|
|
803
|
+
} = clusterAmbientPixels(pixels, options);
|
|
804
|
+
const chromatic = clusters.filter(isChromatic);
|
|
805
|
+
const presence = chromatic.reduce((sum, cluster) => sum + cluster.pop * colorfulness(cluster.c) * cluster.rely, 0);
|
|
806
|
+
const context = {
|
|
807
|
+
clusters,
|
|
808
|
+
dilution: MIN_DILUTION + DILUTION_RANGE * Math.min(1, presence / FULL_DILUTION_PRESENCE),
|
|
809
|
+
meanL,
|
|
810
|
+
minContrast: options.minContrast,
|
|
811
|
+
neutral: presence < MIN_PRESENCE,
|
|
812
|
+
share: createFamilyShare(chromatic)
|
|
813
|
+
};
|
|
814
|
+
const picks = pickRoleClusters(chromatic, context.share, context.neutral, options.minHueDistance);
|
|
815
|
+
return {
|
|
816
|
+
neutral: context.neutral,
|
|
817
|
+
regions: buildRegions(context, regionWeights, regionLab),
|
|
818
|
+
roles: buildRoles(picks, context),
|
|
819
|
+
shadow: formatOklch(buildShadow(picks.dominant, context, options.shadowLightness))
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
function fitSample(width, height, size) {
|
|
823
|
+
const scale = Math.min(1, size / Math.max(width, height, 1));
|
|
824
|
+
return {
|
|
825
|
+
height: Math.max(1, Math.round(height * scale)),
|
|
826
|
+
width: Math.max(1, Math.round(width * scale))
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export { AMBIENT_ANALYSIS_VERSION, analyzeAmbientPixels, configureAmbient, contrastRatio, findContentBounds, fitSample, formatOklch, getAmbientSettings, maxChroma, onColorFor, resolveAnalysis, srgbToOklab, toneOf };
|
|
831
|
+
//# sourceMappingURL=chunk-2LGI33JP.js.map
|
|
832
|
+
//# sourceMappingURL=chunk-2LGI33JP.js.map
|