@omerdlw/base-framework 3.1.0 → 3.2.1
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-26K6W4OQ.js +1435 -0
- package/dist/chunk-26K6W4OQ.js.map +1 -0
- package/dist/chunk-2BLGNT5I.js +850 -0
- package/dist/chunk-2BLGNT5I.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-5GVH4BQV.js +577 -0
- package/dist/chunk-5GVH4BQV.js.map +1 -0
- package/dist/chunk-5H6FZW3N.js +535 -0
- package/dist/chunk-5H6FZW3N.js.map +1 -0
- package/dist/chunk-66MHDFNF.js +3488 -0
- package/dist/chunk-66MHDFNF.js.map +1 -0
- package/dist/chunk-7RSRDKYE.js +22 -0
- package/dist/chunk-7RSRDKYE.js.map +1 -0
- package/dist/chunk-AAT3QWHN.js +567 -0
- package/dist/chunk-AAT3QWHN.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-GQKGOLHJ.js +1766 -0
- package/dist/chunk-GQKGOLHJ.js.map +1 -0
- package/dist/chunk-IR3DCLBM.js +17 -0
- package/dist/chunk-IR3DCLBM.js.map +1 -0
- package/dist/chunk-J3VTDBC6.js +14 -0
- package/dist/chunk-J3VTDBC6.js.map +1 -0
- package/dist/chunk-J4WUCHNR.js +825 -0
- package/dist/chunk-J4WUCHNR.js.map +1 -0
- package/dist/chunk-KMN6J5SL.js +493 -0
- package/dist/chunk-KMN6J5SL.js.map +1 -0
- package/dist/chunk-LA3CQ6NY.js +261 -0
- package/dist/chunk-LA3CQ6NY.js.map +1 -0
- package/dist/chunk-LTO77WSO.js +140 -0
- package/dist/chunk-LTO77WSO.js.map +1 -0
- package/dist/chunk-NTUQYA73.js +110 -0
- package/dist/chunk-NTUQYA73.js.map +1 -0
- package/dist/chunk-OEXWOZPS.js +139 -0
- package/dist/chunk-OEXWOZPS.js.map +1 -0
- package/dist/chunk-PUD4IB3L.js +15762 -0
- package/dist/chunk-PUD4IB3L.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-WBBM67WL.js +460 -0
- package/dist/chunk-WBBM67WL.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-ZE6OGGA7.js +2341 -0
- package/dist/chunk-ZE6OGGA7.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-YC336DAS.js +13 -0
- package/dist/overlay-YC336DAS.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 +134 -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
package/dist/chunk-NEBGCFE3.js
DELETED
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
import { defineThemeSpec, useTheme, useModuleMotion } from './chunk-TMTMQNEQ.js';
|
|
2
|
-
import { getOrCreateGlobalContext, defineModule } from './chunk-HMEWYAWU.js';
|
|
3
|
-
import { USER_MESSAGES, createStore, toUserMessage, useGlobalEvent, EVENT_TYPES, cn, useRequiredContext, isObject, useStore, UserError, report } from './chunk-HCSDQEFB.js';
|
|
4
|
-
import { useMemo, useState, useRef, useCallback, useEffect, useSyncExternalStore, useContext } from 'react';
|
|
5
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { createPortal } from 'react-dom';
|
|
7
|
-
import { AnimatePresence, motion } from 'motion/react';
|
|
8
|
-
|
|
9
|
-
// src/modules/notification/constants.ts
|
|
10
|
-
var TOAST_DURATIONS = Object.freeze({
|
|
11
|
-
DEFAULT: 2e3,
|
|
12
|
-
SHORT: 1500
|
|
13
|
-
});
|
|
14
|
-
var SESSION_EXPIRED_MESSAGE = USER_MESSAGES.unauthorized;
|
|
15
|
-
var DOCK_STACK_ELEMENT_ID = "dock-card-stack";
|
|
16
|
-
var notificationTheme = defineThemeSpec("notification");
|
|
17
|
-
var INITIAL_NOTIFICATION_STATE = Object.freeze({
|
|
18
|
-
notifications: {}
|
|
19
|
-
});
|
|
20
|
-
var INERT_NOTIFICATION_ACTIONS = Object.freeze({
|
|
21
|
-
dismissAllNotifications: () => {
|
|
22
|
-
},
|
|
23
|
-
dismissNotification: () => {
|
|
24
|
-
},
|
|
25
|
-
showNotification: () => null
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
// src/result.ts
|
|
29
|
-
function ok(data, code) {
|
|
30
|
-
return { data, success: true, ...code ? { code } : {} };
|
|
31
|
-
}
|
|
32
|
-
function err(error, code) {
|
|
33
|
-
return { error, success: false, ...code ? { code } : {} };
|
|
34
|
-
}
|
|
35
|
-
function isResult(value) {
|
|
36
|
-
return typeof value === "object" && value !== null && "success" in value && typeof value.success === "boolean" && ("data" in value && value.success === true || "error" in value && value.success === false);
|
|
37
|
-
}
|
|
38
|
-
function isOk(result) {
|
|
39
|
-
return result.success === true;
|
|
40
|
-
}
|
|
41
|
-
function isErr(result) {
|
|
42
|
-
return result.success === false;
|
|
43
|
-
}
|
|
44
|
-
function unwrap(result) {
|
|
45
|
-
if (result.success) {
|
|
46
|
-
return result.data;
|
|
47
|
-
}
|
|
48
|
-
if (result.error instanceof Error) {
|
|
49
|
-
throw result.error;
|
|
50
|
-
}
|
|
51
|
-
throw new Error(
|
|
52
|
-
typeof result.error === "string" ? result.error : String(result.error)
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
function unwrapOr(result, fallback) {
|
|
56
|
-
return result.success ? result.data : fallback;
|
|
57
|
-
}
|
|
58
|
-
function map(result, fn) {
|
|
59
|
-
return result.success ? ok(fn(result.data), result.code) : result;
|
|
60
|
-
}
|
|
61
|
-
function mapErr(result, fn) {
|
|
62
|
-
return result.success ? result : err(fn(result.error), result.code);
|
|
63
|
-
}
|
|
64
|
-
function match(result, branches) {
|
|
65
|
-
return result.success ? branches.ok(result.data) : branches.err(result.error);
|
|
66
|
-
}
|
|
67
|
-
function mapCaught(error, mapError) {
|
|
68
|
-
if (!(error instanceof UserError)) report("Result", error);
|
|
69
|
-
return mapError ? mapError(error) : toUserMessage(error);
|
|
70
|
-
}
|
|
71
|
-
async function tryCatch(promiseOrFn, mapError) {
|
|
72
|
-
try {
|
|
73
|
-
const data = typeof promiseOrFn === "function" ? await promiseOrFn() : await promiseOrFn;
|
|
74
|
-
return ok(data);
|
|
75
|
-
} catch (error) {
|
|
76
|
-
return err(mapCaught(error, mapError));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function createSafeAction(handler, options = {}) {
|
|
80
|
-
const { errorCode, mapError, schema, validate } = options;
|
|
81
|
-
return async (...args) => {
|
|
82
|
-
try {
|
|
83
|
-
let effectiveArgs = args;
|
|
84
|
-
if (schema) {
|
|
85
|
-
const parsed = schema.safeParse(args[0]);
|
|
86
|
-
if (!parsed.success) {
|
|
87
|
-
const issueMessage = parsed.error?.issues?.[0]?.message || parsed.error?.message || "Invalid input";
|
|
88
|
-
return err(
|
|
89
|
-
mapError ? mapError(issueMessage) : issueMessage,
|
|
90
|
-
errorCode ?? "VALIDATION_ERROR"
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
effectiveArgs = [parsed.data, ...args.slice(1)];
|
|
94
|
-
}
|
|
95
|
-
if (validate) {
|
|
96
|
-
const validationResult = validate(...effectiveArgs);
|
|
97
|
-
if (isResult(validationResult)) {
|
|
98
|
-
if (isErr(validationResult)) {
|
|
99
|
-
return validationResult;
|
|
100
|
-
}
|
|
101
|
-
} else if (validationResult === false) {
|
|
102
|
-
return err(
|
|
103
|
-
mapError ? mapError("Validation failed") : "Validation failed",
|
|
104
|
-
errorCode ?? "VALIDATION_ERROR"
|
|
105
|
-
);
|
|
106
|
-
} else if (typeof validationResult === "string" && validationResult.length > 0) {
|
|
107
|
-
return err(
|
|
108
|
-
mapError ? mapError(validationResult) : validationResult,
|
|
109
|
-
errorCode ?? "VALIDATION_ERROR"
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
const output = await handler(...effectiveArgs);
|
|
114
|
-
if (isResult(output)) {
|
|
115
|
-
return output;
|
|
116
|
-
}
|
|
117
|
-
return ok(output);
|
|
118
|
-
} catch (error) {
|
|
119
|
-
return err(mapCaught(error, mapError), errorCode);
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// src/modules/notification/state.ts
|
|
125
|
-
function normalizeFeedbackText(value) {
|
|
126
|
-
if (typeof value !== "string") return value;
|
|
127
|
-
return value.trim().replace(/[.\s]+$/, "");
|
|
128
|
-
}
|
|
129
|
-
function getActiveNotification(notifications) {
|
|
130
|
-
let active = null;
|
|
131
|
-
for (const entry of Object.values(notifications)) {
|
|
132
|
-
if (!active || entry.timestamp >= active.timestamp) active = entry;
|
|
133
|
-
}
|
|
134
|
-
return active;
|
|
135
|
-
}
|
|
136
|
-
function normalizeToastOptions(options) {
|
|
137
|
-
return typeof options === "number" ? { duration: options } : options || {};
|
|
138
|
-
}
|
|
139
|
-
function normalizeDuration(value) {
|
|
140
|
-
if (value === null) return null;
|
|
141
|
-
if (value === void 0) return TOAST_DURATIONS.DEFAULT;
|
|
142
|
-
const duration = Number(value);
|
|
143
|
-
return Number.isFinite(duration) && duration > 0 ? duration : null;
|
|
144
|
-
}
|
|
145
|
-
function withDefaultDuration(duration, options) {
|
|
146
|
-
const normalized = normalizeToastOptions(options);
|
|
147
|
-
return {
|
|
148
|
-
...normalized,
|
|
149
|
-
duration: normalized.duration !== void 0 ? normalized.duration : duration
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function isNotificationDataObject(value) {
|
|
153
|
-
return isObject(value) && "message" in value;
|
|
154
|
-
}
|
|
155
|
-
function resolveMessage(message, arg) {
|
|
156
|
-
return typeof message === "function" ? message(arg) : message;
|
|
157
|
-
}
|
|
158
|
-
function getOutcomeMessage(value, messages) {
|
|
159
|
-
if (!isResult(value)) return resolveMessage(messages.success, value);
|
|
160
|
-
return value.success ? resolveMessage(messages.success, value.data) : resolveMessage(messages.error, value.error) || toUserMessage(value.error);
|
|
161
|
-
}
|
|
162
|
-
function createNotificationEntry(messageOrData, options, fallbackId) {
|
|
163
|
-
const normalizedOptions = normalizeToastOptions(options);
|
|
164
|
-
const payload = isNotificationDataObject(messageOrData) ? { ...normalizedOptions, ...messageOrData } : { ...normalizedOptions, message: messageOrData };
|
|
165
|
-
const normalizedMessage = normalizeFeedbackText(payload.message);
|
|
166
|
-
if (normalizedMessage === null || normalizedMessage === void 0 || normalizedMessage === "") {
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
const id = payload.dedupeKey || payload.id || (typeof normalizedMessage === "string" ? normalizedMessage.slice(0, 64) : fallbackId || `notification-${Date.now()}`);
|
|
170
|
-
const entry = {
|
|
171
|
-
dedupeKey: payload.dedupeKey,
|
|
172
|
-
duration: payload.duration,
|
|
173
|
-
id,
|
|
174
|
-
message: normalizedMessage,
|
|
175
|
-
timestamp: Date.now()
|
|
176
|
-
};
|
|
177
|
-
return {
|
|
178
|
-
duration: normalizeDuration(payload.duration),
|
|
179
|
-
entry
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
var NotificationContext = getOrCreateGlobalContext(
|
|
183
|
-
"NotificationContext",
|
|
184
|
-
null
|
|
185
|
-
);
|
|
186
|
-
var NOOP_NOTIFICATION_STORE = createStore(
|
|
187
|
-
INITIAL_NOTIFICATION_STATE
|
|
188
|
-
);
|
|
189
|
-
var notificationIdCounter = 0;
|
|
190
|
-
var NotificationProvider = ({
|
|
191
|
-
children
|
|
192
|
-
}) => {
|
|
193
|
-
const [store] = useState(
|
|
194
|
-
() => createStore(INITIAL_NOTIFICATION_STATE, {
|
|
195
|
-
freezeSnapshots: false
|
|
196
|
-
})
|
|
197
|
-
);
|
|
198
|
-
const timersRef = useRef(
|
|
199
|
-
/* @__PURE__ */ new Map()
|
|
200
|
-
);
|
|
201
|
-
const clearTimers = useCallback(() => {
|
|
202
|
-
timersRef.current.forEach(clearTimeout);
|
|
203
|
-
timersRef.current.clear();
|
|
204
|
-
}, []);
|
|
205
|
-
useEffect(() => clearTimers, [clearTimers]);
|
|
206
|
-
const dismissNotification = useCallback(
|
|
207
|
-
(id) => {
|
|
208
|
-
clearTimeout(timersRef.current.get(id));
|
|
209
|
-
timersRef.current.delete(id);
|
|
210
|
-
store.publish((prev) => {
|
|
211
|
-
if (!Object.hasOwn(prev.notifications, id)) return prev;
|
|
212
|
-
const notifications = { ...prev.notifications };
|
|
213
|
-
delete notifications[id];
|
|
214
|
-
return { notifications };
|
|
215
|
-
});
|
|
216
|
-
},
|
|
217
|
-
[store]
|
|
218
|
-
);
|
|
219
|
-
const dismissAllNotifications = useCallback(() => {
|
|
220
|
-
clearTimers();
|
|
221
|
-
store.publish(
|
|
222
|
-
(prev) => Object.keys(prev.notifications).length === 0 ? prev : { notifications: {} }
|
|
223
|
-
);
|
|
224
|
-
}, [clearTimers, store]);
|
|
225
|
-
const showNotification = useCallback(
|
|
226
|
-
(messageOrData, options) => {
|
|
227
|
-
const fallbackId = `notification-${++notificationIdCounter}`;
|
|
228
|
-
const result = createNotificationEntry(
|
|
229
|
-
messageOrData,
|
|
230
|
-
options,
|
|
231
|
-
fallbackId
|
|
232
|
-
);
|
|
233
|
-
if (!result) return null;
|
|
234
|
-
const { entry, duration } = result;
|
|
235
|
-
const { id } = entry;
|
|
236
|
-
clearTimers();
|
|
237
|
-
store.publish({ notifications: { [id]: entry } });
|
|
238
|
-
if (duration) {
|
|
239
|
-
timersRef.current.set(
|
|
240
|
-
id,
|
|
241
|
-
setTimeout(() => dismissNotification(id), duration)
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
return id;
|
|
245
|
-
},
|
|
246
|
-
[clearTimers, dismissNotification, store]
|
|
247
|
-
);
|
|
248
|
-
const actions = useMemo(
|
|
249
|
-
() => ({
|
|
250
|
-
dismissAllNotifications,
|
|
251
|
-
dismissNotification,
|
|
252
|
-
showNotification
|
|
253
|
-
}),
|
|
254
|
-
[dismissAllNotifications, dismissNotification, showNotification]
|
|
255
|
-
);
|
|
256
|
-
const value = useMemo(
|
|
257
|
-
() => ({ actions, store }),
|
|
258
|
-
[actions, store]
|
|
259
|
-
);
|
|
260
|
-
return /* @__PURE__ */ jsx(NotificationContext, { value, children });
|
|
261
|
-
};
|
|
262
|
-
var toastPromiseIdCounter = 0;
|
|
263
|
-
function useNotificationActions() {
|
|
264
|
-
return useRequiredContext(
|
|
265
|
-
NotificationContext,
|
|
266
|
-
"useNotificationActions",
|
|
267
|
-
"NotificationProvider"
|
|
268
|
-
).actions;
|
|
269
|
-
}
|
|
270
|
-
function useNotificationState() {
|
|
271
|
-
const { store } = useRequiredContext(
|
|
272
|
-
NotificationContext,
|
|
273
|
-
"useNotificationState",
|
|
274
|
-
"NotificationProvider"
|
|
275
|
-
);
|
|
276
|
-
return useStore(store);
|
|
277
|
-
}
|
|
278
|
-
function useNotification() {
|
|
279
|
-
const actions = useNotificationActions();
|
|
280
|
-
const state = useNotificationState();
|
|
281
|
-
return useMemo(() => ({ ...actions, ...state }), [actions, state]);
|
|
282
|
-
}
|
|
283
|
-
function useOptionalNotificationState(selector, isEqual) {
|
|
284
|
-
const ctx = useContext(NotificationContext);
|
|
285
|
-
return useStore(
|
|
286
|
-
ctx?.store ?? NOOP_NOTIFICATION_STORE,
|
|
287
|
-
selector,
|
|
288
|
-
isEqual
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
function useOptionalNotificationActions() {
|
|
292
|
-
const ctx = useContext(NotificationContext);
|
|
293
|
-
return ctx?.actions ?? INERT_NOTIFICATION_ACTIONS;
|
|
294
|
-
}
|
|
295
|
-
function useNotificationVisible() {
|
|
296
|
-
return useOptionalNotificationState(
|
|
297
|
-
({ notifications }) => Object.keys(notifications).length > 0
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
function useToast(defaultDuration) {
|
|
301
|
-
const { dismissAllNotifications, dismissNotification, showNotification } = useNotificationActions();
|
|
302
|
-
const resolvedDefaultDuration = defaultDuration ?? TOAST_DURATIONS.DEFAULT;
|
|
303
|
-
const triggerToast = useCallback(
|
|
304
|
-
(message, options) => showNotification(
|
|
305
|
-
message,
|
|
306
|
-
withDefaultDuration(resolvedDefaultDuration, options)
|
|
307
|
-
),
|
|
308
|
-
[resolvedDefaultDuration, showNotification]
|
|
309
|
-
);
|
|
310
|
-
const dismiss = useCallback(
|
|
311
|
-
(id) => {
|
|
312
|
-
if (id) dismissNotification(id);
|
|
313
|
-
else dismissAllNotifications();
|
|
314
|
-
},
|
|
315
|
-
[dismissAllNotifications, dismissNotification]
|
|
316
|
-
);
|
|
317
|
-
const fromResult = useCallback(
|
|
318
|
-
(result, messages = {}, options) => {
|
|
319
|
-
const message = getOutcomeMessage(result, messages);
|
|
320
|
-
if (message) triggerToast(message, options);
|
|
321
|
-
return result;
|
|
322
|
-
},
|
|
323
|
-
[triggerToast]
|
|
324
|
-
);
|
|
325
|
-
const promise = useCallback(
|
|
326
|
-
async (promiseOrFn, messages = {}, options) => {
|
|
327
|
-
const normalized = normalizeToastOptions(options);
|
|
328
|
-
const id = normalized.id || normalized.dedupeKey || `toast-promise-${++toastPromiseIdCounter}`;
|
|
329
|
-
const sharedOptions = { ...normalized, id };
|
|
330
|
-
if (messages.loading) {
|
|
331
|
-
showNotification(messages.loading, {
|
|
332
|
-
...sharedOptions,
|
|
333
|
-
duration: null
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
try {
|
|
337
|
-
const resolved = await (typeof promiseOrFn === "function" ? promiseOrFn() : promiseOrFn);
|
|
338
|
-
const message = getOutcomeMessage(resolved, messages);
|
|
339
|
-
if (message) triggerToast(message, sharedOptions);
|
|
340
|
-
else if (messages.loading) dismiss(id);
|
|
341
|
-
return resolved;
|
|
342
|
-
} catch (error) {
|
|
343
|
-
triggerToast(
|
|
344
|
-
resolveMessage(messages.error, error) || toUserMessage(error),
|
|
345
|
-
sharedOptions
|
|
346
|
-
);
|
|
347
|
-
throw error;
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
[dismiss, showNotification, triggerToast]
|
|
351
|
-
);
|
|
352
|
-
return useMemo(
|
|
353
|
-
() => Object.assign(
|
|
354
|
-
(message, options) => triggerToast(message, options),
|
|
355
|
-
{ dismiss, dismissAll: dismissAllNotifications, fromResult, promise }
|
|
356
|
-
),
|
|
357
|
-
[dismiss, dismissAllNotifications, fromResult, promise, triggerToast]
|
|
358
|
-
);
|
|
359
|
-
}
|
|
360
|
-
var emptySubscribe = () => () => {
|
|
361
|
-
};
|
|
362
|
-
function NotificationListener() {
|
|
363
|
-
const { showNotification } = useNotificationActions();
|
|
364
|
-
useGlobalEvent(EVENT_TYPES.API_UNAUTHORIZED, (data) => {
|
|
365
|
-
if (data?.source && data.source !== "app") return;
|
|
366
|
-
showNotification(SESSION_EXPIRED_MESSAGE);
|
|
367
|
-
});
|
|
368
|
-
useGlobalEvent(
|
|
369
|
-
EVENT_TYPES.APP_ERROR,
|
|
370
|
-
(data) => {
|
|
371
|
-
if (!data?.notify || !data.message) return;
|
|
372
|
-
showNotification(data.message);
|
|
373
|
-
}
|
|
374
|
-
);
|
|
375
|
-
useGlobalEvent(
|
|
376
|
-
EVENT_TYPES.STATE_CHANGE,
|
|
377
|
-
(data) => {
|
|
378
|
-
if (!data?.notify || !data.message) return;
|
|
379
|
-
showNotification(data.message);
|
|
380
|
-
}
|
|
381
|
-
);
|
|
382
|
-
return null;
|
|
383
|
-
}
|
|
384
|
-
function useNotificationContainerModel() {
|
|
385
|
-
const { notifications } = useNotificationState();
|
|
386
|
-
const { dismissNotification } = useNotificationActions();
|
|
387
|
-
const isHydrated = useSyncExternalStore(
|
|
388
|
-
emptySubscribe,
|
|
389
|
-
() => true,
|
|
390
|
-
() => false
|
|
391
|
-
);
|
|
392
|
-
const activeEntry = useMemo(
|
|
393
|
-
() => getActiveNotification(notifications),
|
|
394
|
-
[notifications]
|
|
395
|
-
);
|
|
396
|
-
const theme = useTheme(notificationTheme);
|
|
397
|
-
return { dismissNotification, isHydrated, activeEntry, theme };
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// src/modules/notification/motion.ts
|
|
401
|
-
var NOTIFICATION_COMPOSITOR_STYLE = Object.freeze({
|
|
402
|
-
WebkitBackfaceVisibility: "hidden",
|
|
403
|
-
WebkitFontSmoothing: "antialiased",
|
|
404
|
-
backfaceVisibility: "hidden",
|
|
405
|
-
transform: "translateZ(0)",
|
|
406
|
-
willChange: "transform, opacity, filter"
|
|
407
|
-
});
|
|
408
|
-
function useNotificationMotion() {
|
|
409
|
-
return useModuleMotion(notificationTheme);
|
|
410
|
-
}
|
|
411
|
-
function Toast({
|
|
412
|
-
className,
|
|
413
|
-
entry,
|
|
414
|
-
messageClassName,
|
|
415
|
-
onDismiss,
|
|
416
|
-
polite,
|
|
417
|
-
style
|
|
418
|
-
}) {
|
|
419
|
-
const toastMotion = useNotificationMotion();
|
|
420
|
-
return /* @__PURE__ */ jsx(
|
|
421
|
-
motion.div,
|
|
422
|
-
{
|
|
423
|
-
role: "alert",
|
|
424
|
-
"aria-atomic": "true",
|
|
425
|
-
"aria-live": polite ? "polite" : void 0,
|
|
426
|
-
"aria-keyshortcuts": "Escape",
|
|
427
|
-
tabIndex: 0,
|
|
428
|
-
variants: toastMotion.toast,
|
|
429
|
-
initial: "hidden",
|
|
430
|
-
animate: "visible",
|
|
431
|
-
exit: "exit",
|
|
432
|
-
transition: toastMotion.transition,
|
|
433
|
-
style: { ...NOTIFICATION_COMPOSITOR_STYLE, ...style },
|
|
434
|
-
className,
|
|
435
|
-
onClick: (event) => {
|
|
436
|
-
event.stopPropagation();
|
|
437
|
-
onDismiss();
|
|
438
|
-
},
|
|
439
|
-
onKeyDown: (event) => {
|
|
440
|
-
if (event.key !== "Escape") return;
|
|
441
|
-
event.preventDefault();
|
|
442
|
-
event.stopPropagation();
|
|
443
|
-
onDismiss();
|
|
444
|
-
},
|
|
445
|
-
children: /* @__PURE__ */ jsx("div", { className: messageClassName, children: entry.message })
|
|
446
|
-
}
|
|
447
|
-
);
|
|
448
|
-
}
|
|
449
|
-
function NotificationContainer() {
|
|
450
|
-
const { dismissNotification, isHydrated, activeEntry, theme } = useNotificationContainerModel();
|
|
451
|
-
if (!isHydrated) return null;
|
|
452
|
-
const dockElement = document.getElementById(DOCK_STACK_ELEMENT_ID);
|
|
453
|
-
const toast = (className, polite) => /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: activeEntry && /* @__PURE__ */ jsx(
|
|
454
|
-
Toast,
|
|
455
|
-
{
|
|
456
|
-
className,
|
|
457
|
-
entry: activeEntry,
|
|
458
|
-
messageClassName: theme.slots.toastMessage,
|
|
459
|
-
polite,
|
|
460
|
-
style: theme.styles.toast,
|
|
461
|
-
onDismiss: () => dismissNotification(activeEntry.id)
|
|
462
|
-
},
|
|
463
|
-
activeEntry.id
|
|
464
|
-
) });
|
|
465
|
-
if (dockElement) {
|
|
466
|
-
return createPortal(
|
|
467
|
-
toast(cn(theme.slots.toast, theme.slots.toastDocked), true),
|
|
468
|
-
dockElement
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
return createPortal(
|
|
472
|
-
/* @__PURE__ */ jsx(
|
|
473
|
-
"div",
|
|
474
|
-
{
|
|
475
|
-
"aria-atomic": "true",
|
|
476
|
-
"aria-live": "polite",
|
|
477
|
-
className: theme.slots.layer,
|
|
478
|
-
style: theme.styles.layer,
|
|
479
|
-
children: toast(theme.slots.toast)
|
|
480
|
-
}
|
|
481
|
-
),
|
|
482
|
-
document.body
|
|
483
|
-
);
|
|
484
|
-
}
|
|
485
|
-
function NotificationLayer() {
|
|
486
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
487
|
-
/* @__PURE__ */ jsx(NotificationListener, {}),
|
|
488
|
-
/* @__PURE__ */ jsx(NotificationContainer, {})
|
|
489
|
-
] });
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
// src/modules/notification/module.tsx
|
|
493
|
-
function selectToastDuration(config) {
|
|
494
|
-
const notification = config.notification;
|
|
495
|
-
if (typeof notification === "number") return notification;
|
|
496
|
-
return notification?.duration ?? null;
|
|
497
|
-
}
|
|
498
|
-
function useNotificationPage(duration, page) {
|
|
499
|
-
const toast = useToast(duration);
|
|
500
|
-
return useMemo(
|
|
501
|
-
() => ({
|
|
502
|
-
set: (notification) => page.set({ notification }),
|
|
503
|
-
toast
|
|
504
|
-
}),
|
|
505
|
-
[page, toast]
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
var notificationModule = defineModule({
|
|
509
|
-
id: "notification",
|
|
510
|
-
context: NotificationContext,
|
|
511
|
-
Provider: NotificationProvider,
|
|
512
|
-
Overlay: NotificationLayer,
|
|
513
|
-
page: {
|
|
514
|
-
select: selectToastDuration,
|
|
515
|
-
use: useNotificationPage
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
|
|
519
|
-
export { DOCK_STACK_ELEMENT_ID, INERT_NOTIFICATION_ACTIONS, INITIAL_NOTIFICATION_STATE, NOOP_NOTIFICATION_STORE, NotificationContext, NotificationListener, NotificationProvider, SESSION_EXPIRED_MESSAGE, TOAST_DURATIONS, createNotificationEntry, createSafeAction, err, getActiveNotification, getOutcomeMessage, isErr, isNotificationDataObject, isOk, isResult, map, mapErr, match, normalizeDuration, normalizeFeedbackText, normalizeToastOptions, notificationModule, notificationTheme, ok, tryCatch, unwrap, unwrapOr, useNotification, useNotificationActions, useNotificationContainerModel, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, useToast, withDefaultDuration };
|
|
520
|
-
//# sourceMappingURL=chunk-NEBGCFE3.js.map
|
|
521
|
-
//# sourceMappingURL=chunk-NEBGCFE3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/modules/notification/constants.ts","../src/result.ts","../src/modules/notification/state.ts","../src/modules/notification/context.tsx","../src/modules/notification/hooks.ts","../src/modules/notification/motion.ts","../src/modules/notification/overlay.tsx","../src/modules/notification/module.tsx"],"names":["useMemo","useCallback","jsx"],"mappings":";;;;;;;;;AASO,IAAM,eAAA,GAAkB,OAAO,MAAA,CAAO;AAAA,EAC3C,OAAA,EAAS,GAAA;AAAA,EACT,KAAA,EAAO;AACT,CAAU;AAEH,IAAM,0BAA0B,aAAA,CAAc;AAE9C,IAAM,qBAAA,GAAwB;AAE9B,IAAM,iBAAA,GAAoB,gBAG/B,cAAc;AAET,IAAM,0BAAA,GAAgD,OAAO,MAAA,CAAO;AAAA,EACzE,eAAe;AACjB,CAAC;AAEM,IAAM,0BAAA,GAAkD,OAAO,MAAA,CAAO;AAAA,EAC3E,yBAAyB,MAAM;AAAA,EAAC,CAAA;AAAA,EAChC,qBAAqB,MAAM;AAAA,EAAC,CAAA;AAAA,EAC5B,kBAAkB,MAAM;AAC1B,CAAC;;;ACZM,SAAS,EAAA,CAAM,MAAS,IAAA,EAAiC;AAC9D,EAAA,OAAO,EAAE,IAAA,EAAM,OAAA,EAAS,IAAA,EAAM,GAAI,OAAO,EAAE,IAAA,EAAK,GAAI,EAAC,EAAG;AAC1D;AAEO,SAAS,GAAA,CAAgB,OAAU,IAAA,EAA+B;AACvE,EAAA,OAAO,EAAE,KAAA,EAAO,OAAA,EAAS,KAAA,EAAO,GAAI,OAAO,EAAE,IAAA,EAAK,GAAI,EAAC,EAAG;AAC5D;AAEO,SAAS,SAAS,KAAA,EAAmD;AAC1E,EAAA,OACE,OAAO,KAAA,KAAU,QAAA,IACjB,UAAU,IAAA,IACV,SAAA,IAAa,SACb,OAAQ,KAAA,CAA+B,YAAY,SAAA,KACjD,MAAA,IAAU,SAAU,KAAA,C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KAAA;AAAA,QAEnB,QAAA,EAAA,KAAA,CAAM,KAAA,CAAM,KAAA,CAAM,KAAK;AAAA;AAAA,KAC1B;AAAA,IACA,QAAA,CAAS;AAAA,GACX;AACF;AAEO,SAAS,iBAAA,GAAoB;AAClC,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAAA,IAAC,oBAAA,EAAA,EAAqB,CAAA;AAAA,oBACtBA,IAAC,qBAAA,EAAA,EAAsB;AAAA,GAAA,EACzB,CAAA;AAEJ;;;AC/FA,SAAS,oBAAoB,MAAA,EAAmC;AAC9D,EAAA,MAAM,eAAe,MAAA,CAAO,YAAA;AAC5B,EAAA,IAAI,OAAO,YAAA,KAAiB,QAAA,EAAU,OAAO,YAAA;AAC7C,EAAA,OAAO,cAAc,QAAA,IAAY,IAAA;AACnC;AAEA,SAAS,mBAAA,CACP,UACA,IAAA,EACqB;AACrB,EAAA,MAAM,KAAA,GAAQ,SAAS,QAAQ,CAAA;AAC/B,EAAA,OAAOF,OAAAA;AAAA,IACL,OAAO;AAAA,MACL,KAAK,CAAC,YAAA,KAAyC,KAAK,GAAA,CAAI,EAAE,cAAc,CAAA;AAAA,MACxE;AAAA,KACF,CAAA;AAAA,IACA,CAAC,MAAM,KAAK;AAAA,GACd;AACF;AAEO,IAAM,qBAAqB,YAAA,CAAa;AAAA,EAC7C,EAAA,EAAI,cAAA;AAAA,EACJ,OAAA,EAAS,mBAAA;AAAA,EACT,QAAA,EAAU,oBAAA;AAAA,EACV,OAAA,EAAS,iBAAA;AAAA,EACT,IAAA,EAAM;AAAA,IACJ,MAAA,EAAQ,mBAAA;AAAA,IACR,GAAA,EAAK;AAAA;AAET,CAAC","file":"chunk-NEBGCFE3.js","sourcesContent":["import { USER_MESSAGES } from \"@/utils\";\nimport { defineThemeSpec } from \"@/theme\";\nimport {\n type NotificationActions,\n type NotificationState,\n type NotificationMotion,\n type NotificationThemeSlot,\n} from \"./types\";\n\nexport const TOAST_DURATIONS = Object.freeze({\n DEFAULT: 2000,\n SHORT: 1500,\n} as const);\n\nexport const SESSION_EXPIRED_MESSAGE = USER_MESSAGES.unauthorized;\n\nexport const DOCK_STACK_ELEMENT_ID = \"dock-card-stack\";\n\nexport const notificationTheme = defineThemeSpec<\n NotificationThemeSlot,\n NotificationMotion\n>(\"notification\");\n\nexport const INITIAL_NOTIFICATION_STATE: NotificationState = Object.freeze({\n notifications: {},\n});\n\nexport const INERT_NOTIFICATION_ACTIONS: NotificationActions = Object.freeze({\n dismissAllNotifications: () => {},\n dismissNotification: () => {},\n showNotification: () => null,\n});\n","import { UserError, toUserMessage } from \"./utils/user-message\";\nimport { report } from \"./utils/report\";\n\nexport interface SuccessResult<T> {\n readonly code?: string;\n readonly data: T;\n readonly error?: never;\n readonly success: true;\n}\n\nexport interface ErrorResult<E = string> {\n readonly code?: string;\n readonly data?: never;\n readonly error: E;\n readonly success: false;\n}\n\nexport type Result<T, E = string> = SuccessResult<T> | ErrorResult<E>;\n\nexport function ok<T>(data: T, code?: string): SuccessResult<T> {\n return { data, success: true, ...(code ? { code } : {}) };\n}\n\nexport function err<E = string>(error: E, code?: string): ErrorResult<E> {\n return { error, success: false, ...(code ? { code } : {}) };\n}\n\nexport function isResult(value: unknown): value is Result<unknown, unknown> {\n return (\n typeof value === \"object\" &&\n value !== null &&\n \"success\" in value &&\n typeof (value as { success: unknown }).success === \"boolean\" &&\n ((\"data\" in value && (value as { success: boolean }).success === true) ||\n (\"error\" in value && (value as { success: boolean }).success === false))\n );\n}\n\nexport function isOk<T, E = string>(\n result: Result<T, E>,\n): result is SuccessResult<T> {\n return result.success === true;\n}\n\nexport function isErr<T, E = string>(\n result: Result<T, E>,\n): result is ErrorResult<E> {\n return result.success === false;\n}\n\nexport function unwrap<T, E = string>(result: Result<T, E>): T {\n if (result.success) {\n return result.data;\n }\n if (result.error instanceof Error) {\n throw result.error;\n }\n throw new Error(\n typeof result.error === \"string\" ? result.error : String(result.error),\n );\n}\n\nexport function unwrapOr<T, E = string>(result: Result<T, E>, fallback: T): T {\n return result.success ? result.data : fallback;\n}\n\nexport function map<T, U, E = string>(\n result: Result<T, E>,\n fn: (data: T) => U,\n): Result<U, E> {\n return result.success ? ok(fn(result.data), result.code) : result;\n}\n\nexport function mapErr<T, E, F>(\n result: Result<T, E>,\n fn: (error: E) => F,\n): Result<T, F> {\n return result.success ? result : err(fn(result.error), result.code);\n}\n\nexport function match<T, E, R>(\n result: Result<T, E>,\n branches: { ok: (data: T) => R; err: (error: E) => R },\n): R {\n return result.success ? branches.ok(result.data) : branches.err(result.error);\n}\n\nfunction mapCaught<E>(error: unknown, mapError?: (error: unknown) => E): E {\n if (!(error instanceof UserError)) report(\"Result\", error);\n return mapError ? mapError(error) : (toUserMessage(error) as unknown as E);\n}\n\nexport async function tryCatch<T, E = string>(\n promiseOrFn: Promise<T> | (() => Promise<T>),\n mapError?: (error: unknown) => E,\n): Promise<Result<T, E>> {\n try {\n const data =\n typeof promiseOrFn === \"function\"\n ? await promiseOrFn()\n : await promiseOrFn;\n return ok(data);\n } catch (error) {\n return err(mapCaught(error, mapError));\n }\n}\n\ninterface SafeActionSchema<TParsed> {\n safeParse: (input: unknown) =>\n | { data: TParsed; success: true }\n | {\n error?: {\n issues?: Array<{ message?: string }>;\n message?: string;\n };\n success: false;\n };\n}\n\nexport interface SafeActionOptions<TArgs extends unknown[], E = string> {\n errorCode?: string;\n mapError?: (error: unknown) => E;\n schema?: SafeActionSchema<TArgs[0]>;\n validate?: (\n ...args: TArgs\n ) => Result<unknown, E> | string | boolean | null | undefined;\n}\n\nexport function createSafeAction<TArgs extends unknown[], TOutput, E = string>(\n handler: (\n ...args: TArgs\n ) => Promise<Result<TOutput, E> | TOutput> | Result<TOutput, E> | TOutput,\n options: SafeActionOptions<TArgs, E> = {},\n): (...args: TArgs) => Promise<Result<TOutput, E>> {\n const { errorCode, mapError, schema, validate } = options;\n\n return async (...args: TArgs): Promise<Result<TOutput, E>> => {\n try {\n let effectiveArgs = args;\n\n if (schema) {\n const parsed = schema.safeParse(args[0]);\n if (!parsed.success) {\n const issueMessage =\n parsed.error?.issues?.[0]?.message ||\n parsed.error?.message ||\n \"Invalid input\";\n return err(\n mapError ? mapError(issueMessage) : (issueMessage as unknown as E),\n errorCode ?? \"VALIDATION_ERROR\",\n );\n }\n effectiveArgs = [parsed.data, ...args.slice(1)] as TArgs;\n }\n\n if (validate) {\n const validationResult = validate(...effectiveArgs);\n if (isResult(validationResult)) {\n if (isErr(validationResult)) {\n return validationResult as ErrorResult<E>;\n }\n } else if (validationResult === false) {\n return err(\n mapError\n ? mapError(\"Validation failed\")\n : (\"Validation failed\" as unknown as E),\n errorCode ?? \"VALIDATION_ERROR\",\n );\n } else if (\n typeof validationResult === \"string\" &&\n validationResult.length > 0\n ) {\n return err(\n mapError\n ? mapError(validationResult)\n : (validationResult as unknown as E),\n errorCode ?? \"VALIDATION_ERROR\",\n );\n }\n }\n\n const output = await handler(...effectiveArgs);\n if (isResult(output)) {\n return output as Result<TOutput, E>;\n }\n return ok(output as TOutput);\n } catch (error) {\n return err(mapCaught(error, mapError), errorCode);\n }\n };\n}\n","import { type ReactNode } from \"react\";\nimport { isObject, toUserMessage } from \"@/utils\";\nimport { isResult } from \"@/result\";\nimport { TOAST_DURATIONS } from \"./constants\";\nimport {\n type NotificationData,\n type NotificationEntry,\n type NotificationOptions,\n type ToastOptionsInput,\n type ToastPromiseMessages,\n} from \"./types\";\n\nexport function normalizeFeedbackText<T = unknown>(value: T): T {\n if (typeof value !== \"string\") return value;\n return value.trim().replace(/[.\\s]+$/, \"\") as T;\n}\n\nexport function getActiveNotification(\n notifications: Record<string, NotificationEntry>,\n): NotificationEntry | null {\n let active: NotificationEntry | null = null;\n for (const entry of Object.values(notifications)) {\n if (!active || entry.timestamp >= active.timestamp) active = entry;\n }\n return active;\n}\n\nexport function normalizeToastOptions(\n options?: ToastOptionsInput,\n): NotificationOptions {\n return typeof options === \"number\" ? { duration: options } : options || {};\n}\n\nexport function normalizeDuration(value: unknown): number | null {\n if (value === null) return null;\n if (value === undefined) return TOAST_DURATIONS.DEFAULT;\n const duration = Number(value);\n return Number.isFinite(duration) && duration > 0 ? duration : null;\n}\n\nexport function withDefaultDuration(\n duration: number,\n options?: ToastOptionsInput,\n): NotificationOptions & { duration: number | null } {\n const normalized = normalizeToastOptions(options);\n return {\n ...normalized,\n duration:\n normalized.duration !== undefined ? normalized.duration : duration,\n };\n}\n\nexport function isNotificationDataObject(\n value: unknown,\n): value is NotificationData {\n return isObject(value) && \"message\" in value;\n}\n\nexport function resolveMessage<A>(\n message: ReactNode | ((arg: A) => ReactNode),\n arg: A,\n): ReactNode {\n return typeof message === \"function\" ? message(arg) : message;\n}\n\nexport function getOutcomeMessage<T, E>(\n value: unknown,\n messages: ToastPromiseMessages<T, E>,\n): ReactNode {\n if (!isResult(value)) return resolveMessage(messages.success, value as T);\n return value.success\n ? resolveMessage(messages.success, value.data as T)\n : resolveMessage(messages.error, value.error as E) ||\n toUserMessage(value.error);\n}\n\nexport function createNotificationEntry(\n messageOrData: ReactNode | NotificationData,\n options?: ToastOptionsInput,\n fallbackId?: string,\n): { entry: NotificationEntry; duration: number | null } | null {\n const normalizedOptions = normalizeToastOptions(options);\n const payload: NotificationData = isNotificationDataObject(messageOrData)\n ? { ...normalizedOptions, ...messageOrData }\n : { ...normalizedOptions, message: messageOrData };\n\n const normalizedMessage = normalizeFeedbackText(payload.message);\n if (\n normalizedMessage === null ||\n normalizedMessage === undefined ||\n normalizedMessage === \"\"\n ) {\n return null;\n }\n\n const id =\n payload.dedupeKey ||\n payload.id ||\n (typeof normalizedMessage === \"string\"\n ? normalizedMessage.slice(0, 64)\n : fallbackId || `notification-${Date.now()}`);\n\n const entry: NotificationEntry = {\n dedupeKey: payload.dedupeKey,\n duration: payload.duration,\n id,\n message: normalizedMessage,\n timestamp: Date.now(),\n };\n\n return {\n duration: normalizeDuration(payload.duration),\n entry,\n };\n}\n","\"use client\";\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\nimport { getOrCreateGlobalContext } from \"@/kernel\";\nimport { createStore } from \"@/utils\";\nimport { INITIAL_NOTIFICATION_STATE } from \"./constants\";\nimport { createNotificationEntry } from \"./state\";\nimport {\n type NotificationActions,\n type NotificationContextValue,\n type NotificationData,\n type NotificationProviderProps,\n type NotificationState,\n type ToastOptionsInput,\n} from \"./types\";\n\nexport const NotificationContext =\n getOrCreateGlobalContext<NotificationContextValue | null>(\n \"NotificationContext\",\n null,\n );\n\nexport const NOOP_NOTIFICATION_STORE = createStore<NotificationState>(\n INITIAL_NOTIFICATION_STATE,\n);\n\nlet notificationIdCounter = 0;\n\nexport const NotificationProvider = ({\n children,\n}: NotificationProviderProps) => {\n const [store] = useState(() =>\n createStore<NotificationState>(INITIAL_NOTIFICATION_STATE, {\n freezeSnapshots: false,\n }),\n );\n const timersRef = useRef<Map<string, ReturnType<typeof setTimeout>>>(\n new Map(),\n );\n\n const clearTimers = useCallback(() => {\n timersRef.current.forEach(clearTimeout);\n timersRef.current.clear();\n }, []);\n\n useEffect(() => clearTimers, [clearTimers]);\n\n const dismissNotification = useCallback(\n (id: string) => {\n clearTimeout(timersRef.current.get(id));\n timersRef.current.delete(id);\n\n store.publish((prev) => {\n if (!Object.hasOwn(prev.notifications, id)) return prev;\n const notifications = { ...prev.notifications };\n delete notifications[id];\n return { notifications };\n });\n },\n [store],\n );\n\n const dismissAllNotifications = useCallback(() => {\n clearTimers();\n store.publish((prev) =>\n Object.keys(prev.notifications).length === 0\n ? prev\n : { notifications: {} },\n );\n }, [clearTimers, store]);\n\n const showNotification = useCallback(\n (\n messageOrData: ReactNode | NotificationData,\n options?: ToastOptionsInput,\n ): string | null => {\n const fallbackId = `notification-${++notificationIdCounter}`;\n const result = createNotificationEntry(\n messageOrData,\n options,\n fallbackId,\n );\n if (!result) return null;\n\n const { entry, duration } = result;\n const { id } = entry;\n\n clearTimers();\n store.publish({ notifications: { [id]: entry } });\n\n if (duration) {\n timersRef.current.set(\n id,\n setTimeout(() => dismissNotification(id), duration),\n );\n }\n\n return id;\n },\n [clearTimers, dismissNotification, store],\n );\n\n const actions = useMemo<NotificationActions>(\n () => ({\n dismissAllNotifications,\n dismissNotification,\n showNotification,\n }),\n [dismissAllNotifications, dismissNotification, showNotification],\n );\n\n const value = useMemo<NotificationContextValue>(\n () => ({ actions, store }),\n [actions, store],\n );\n\n return <NotificationContext value={value}>{children}</NotificationContext>;\n};\n","\"use client\";\n\nimport {\n useCallback,\n useContext,\n useMemo,\n useSyncExternalStore,\n type ReactNode,\n} from \"react\";\nimport { EVENT_TYPES } from \"@/events\";\nimport { useGlobalEvent, useRequiredContext, useStore } from \"@/hooks\";\nimport { useModuleTheme } from \"@/theme\";\nimport { toUserMessage } from \"@/utils\";\nimport {\n INERT_NOTIFICATION_ACTIONS,\n SESSION_EXPIRED_MESSAGE,\n TOAST_DURATIONS,\n notificationTheme,\n} from \"./constants\";\nimport { NotificationContext, NOOP_NOTIFICATION_STORE } from \"./context\";\nimport {\n getActiveNotification,\n getOutcomeMessage,\n normalizeToastOptions,\n resolveMessage,\n withDefaultDuration,\n} from \"./state\";\nimport {\n type NotificationActions,\n type NotificationState,\n type ToastController,\n type ToastOptionsInput,\n type ToastPromiseMessages,\n} from \"./types\";\n\nlet toastPromiseIdCounter = 0;\n\nexport function useNotificationActions(): NotificationActions {\n return useRequiredContext(\n NotificationContext,\n \"useNotificationActions\",\n \"NotificationProvider\",\n ).actions;\n}\n\nexport function useNotificationState(): NotificationState {\n const { store } = useRequiredContext(\n NotificationContext,\n \"useNotificationState\",\n \"NotificationProvider\",\n );\n return useStore(store);\n}\n\nexport function useNotification(): NotificationState & NotificationActions {\n const actions = useNotificationActions();\n const state = useNotificationState();\n return useMemo(() => ({ ...actions, ...state }), [actions, state]);\n}\n\nexport function useOptionalNotificationState(): NotificationState;\nexport function useOptionalNotificationState<T>(\n selector: (state: NotificationState) => T,\n isEqual?: (a: T, b: T) => boolean,\n): T;\nexport function useOptionalNotificationState<T = NotificationState>(\n selector?: (state: NotificationState) => T,\n isEqual?: (a: T, b: T) => boolean,\n): T {\n const ctx = useContext(NotificationContext);\n return useStore(\n ctx?.store ?? NOOP_NOTIFICATION_STORE,\n selector as (state: NotificationState) => T,\n isEqual,\n );\n}\n\nexport function useOptionalNotificationActions(): NotificationActions {\n const ctx = useContext(NotificationContext);\n return ctx?.actions ?? INERT_NOTIFICATION_ACTIONS;\n}\n\nexport function useNotificationVisible(): boolean {\n return useOptionalNotificationState(\n ({ notifications }) => Object.keys(notifications).length > 0,\n );\n}\n\nexport function useToast(defaultDuration?: number | null): ToastController {\n const { dismissAllNotifications, dismissNotification, showNotification } =\n useNotificationActions();\n\n const resolvedDefaultDuration = defaultDuration ?? TOAST_DURATIONS.DEFAULT;\n\n const triggerToast = useCallback(\n (message: ReactNode, options?: ToastOptionsInput): string | null =>\n showNotification(\n message,\n withDefaultDuration(resolvedDefaultDuration, options),\n ),\n [resolvedDefaultDuration, showNotification],\n );\n\n const dismiss = useCallback(\n (id?: string) => {\n if (id) dismissNotification(id);\n else dismissAllNotifications();\n },\n [dismissAllNotifications, dismissNotification],\n );\n\n const fromResult = useCallback(\n <T = unknown, E = unknown, R = unknown>(\n result: R,\n messages: ToastPromiseMessages<T, E> = {},\n options?: ToastOptionsInput,\n ) => {\n const message = getOutcomeMessage(result, messages);\n if (message) triggerToast(message, options);\n return result;\n },\n [triggerToast],\n );\n\n const promise = useCallback(\n async <T = unknown, E = unknown>(\n promiseOrFn: Promise<T> | (() => Promise<T>),\n messages: ToastPromiseMessages<T, E> = {},\n options?: ToastOptionsInput,\n ): Promise<T> => {\n const normalized = normalizeToastOptions(options);\n const id =\n normalized.id ||\n normalized.dedupeKey ||\n `toast-promise-${++toastPromiseIdCounter}`;\n const sharedOptions = { ...normalized, id };\n\n if (messages.loading) {\n showNotification(messages.loading, {\n ...sharedOptions,\n duration: null,\n });\n }\n\n try {\n const resolved = await (typeof promiseOrFn === \"function\"\n ? promiseOrFn()\n : promiseOrFn);\n const message = getOutcomeMessage(resolved, messages);\n if (message) triggerToast(message, sharedOptions);\n else if (messages.loading) dismiss(id);\n return resolved;\n } catch (error) {\n triggerToast(\n resolveMessage(messages.error, error as E) || toUserMessage(error),\n sharedOptions,\n );\n throw error;\n }\n },\n [dismiss, showNotification, triggerToast],\n );\n\n return useMemo<ToastController>(\n () =>\n Object.assign(\n (message: ReactNode, options?: ToastOptionsInput) =>\n triggerToast(message, options),\n { dismiss, dismissAll: dismissAllNotifications, fromResult, promise },\n ),\n [dismiss, dismissAllNotifications, fromResult, promise, triggerToast],\n );\n}\n\nconst emptySubscribe = () => () => {};\n\nexport function NotificationListener(): null {\n const { showNotification } = useNotificationActions();\n\n useGlobalEvent(EVENT_TYPES.API_UNAUTHORIZED, (data?: { source?: string }) => {\n if (data?.source && data.source !== \"app\") return;\n showNotification(SESSION_EXPIRED_MESSAGE);\n });\n\n useGlobalEvent(\n EVENT_TYPES.APP_ERROR,\n (data?: { message?: string; notify?: boolean }) => {\n if (!data?.notify || !data.message) return;\n showNotification(data.message);\n },\n );\n\n useGlobalEvent(\n EVENT_TYPES.STATE_CHANGE,\n (data?: { message?: string; notify?: boolean }) => {\n if (!data?.notify || !data.message) return;\n showNotification(data.message);\n },\n );\n\n return null;\n}\n\nexport function useNotificationContainerModel() {\n const { notifications } = useNotificationState();\n const { dismissNotification } = useNotificationActions();\n const isHydrated = useSyncExternalStore(\n emptySubscribe,\n () => true,\n () => false,\n );\n const activeEntry = useMemo(\n () => getActiveNotification(notifications),\n [notifications],\n );\n\n const theme = useModuleTheme(notificationTheme);\n\n return { dismissNotification, isHydrated, activeEntry, theme };\n}\n","import { useModuleMotion } from \"@/theme\";\nimport { notificationTheme } from \"./constants\";\n\nexport const NOTIFICATION_COMPOSITOR_STYLE = Object.freeze({\n WebkitBackfaceVisibility: \"hidden\" as const,\n WebkitFontSmoothing: \"antialiased\" as const,\n backfaceVisibility: \"hidden\" as const,\n transform: \"translateZ(0)\",\n willChange: \"transform, opacity, filter\",\n});\n\nexport function useNotificationMotion() {\n return useModuleMotion(notificationTheme);\n}\n","\"use client\";\n\nimport { type KeyboardEvent, type MouseEvent } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { type CSSProperties } from \"react\";\nimport { cn } from \"@/utils\";\nimport { DOCK_STACK_ELEMENT_ID } from \"./constants\";\nimport { type NotificationEntry } from \"./types\";\nimport { NOTIFICATION_COMPOSITOR_STYLE, useNotificationMotion } from \"./motion\";\nimport { useNotificationContainerModel, NotificationListener } from \"./hooks\";\n\nfunction Toast({\n className,\n entry,\n messageClassName,\n onDismiss,\n polite,\n style,\n}: {\n className: string;\n entry: NotificationEntry;\n messageClassName: string;\n onDismiss: () => void;\n polite?: boolean;\n style?: CSSProperties;\n}) {\n const toastMotion = useNotificationMotion();\n return (\n <motion.div\n role=\"alert\"\n aria-atomic=\"true\"\n aria-live={polite ? \"polite\" : undefined}\n aria-keyshortcuts=\"Escape\"\n tabIndex={0}\n variants={toastMotion.toast}\n initial=\"hidden\"\n animate=\"visible\"\n exit=\"exit\"\n transition={toastMotion.transition}\n style={{ ...NOTIFICATION_COMPOSITOR_STYLE, ...style }}\n className={className}\n onClick={(event: MouseEvent<HTMLElement>) => {\n event.stopPropagation();\n onDismiss();\n }}\n onKeyDown={(event: KeyboardEvent<HTMLElement>) => {\n if (event.key !== \"Escape\") return;\n event.preventDefault();\n event.stopPropagation();\n onDismiss();\n }}\n >\n <div className={messageClassName}>{entry.message}</div>\n </motion.div>\n );\n}\n\nexport function NotificationContainer() {\n const { dismissNotification, isHydrated, activeEntry, theme } =\n useNotificationContainerModel();\n if (!isHydrated) return null;\n const dockElement = document.getElementById(DOCK_STACK_ELEMENT_ID);\n const toast = (className: string, polite?: boolean) => (\n <AnimatePresence mode=\"wait\">\n {activeEntry && (\n <Toast\n key={activeEntry.id}\n className={className}\n entry={activeEntry}\n messageClassName={theme.slots.toastMessage}\n polite={polite}\n style={theme.styles.toast}\n onDismiss={() => dismissNotification(activeEntry.id)}\n />\n )}\n </AnimatePresence>\n );\n if (dockElement) {\n return createPortal(\n toast(cn(theme.slots.toast, theme.slots.toastDocked), true),\n dockElement,\n );\n }\n return createPortal(\n <div\n aria-atomic=\"true\"\n aria-live=\"polite\"\n className={theme.slots.layer}\n style={theme.styles.layer}\n >\n {toast(theme.slots.toast)}\n </div>,\n document.body,\n );\n}\n\nexport function NotificationLayer() {\n return (\n <>\n <NotificationListener />\n <NotificationContainer />\n </>\n );\n}\n","\"use client\";\n\nimport { useMemo } from \"react\";\nimport { defineModule, type PageConfig, type PageModuleApi } from \"@/kernel\";\nimport { NotificationContext, NotificationProvider } from \"./context\";\nimport { useToast } from \"./hooks\";\nimport { NotificationLayer } from \"./overlay\";\nimport { type NotificationPageApi, type NotificationPageConfig } from \"./types\";\n\nfunction selectToastDuration(config: PageConfig): number | null {\n const notification = config.notification;\n if (typeof notification === \"number\") return notification;\n return notification?.duration ?? null;\n}\n\nfunction useNotificationPage(\n duration: number | null,\n page: PageModuleApi,\n): NotificationPageApi {\n const toast = useToast(duration);\n return useMemo(\n () => ({\n set: (notification: NotificationPageConfig) => page.set({ notification }),\n toast,\n }),\n [page, toast],\n );\n}\n\nexport const notificationModule = defineModule({\n id: \"notification\",\n context: NotificationContext,\n Provider: NotificationProvider,\n Overlay: NotificationLayer,\n page: {\n select: selectToastDuration,\n use: useNotificationPage,\n },\n});\n\ndeclare module \"@omerdlw/base-framework/kernel\" {\n interface CoreModules {\n notification: typeof notificationModule;\n }\n interface PageConfig {\n notification?: NotificationPageConfig;\n }\n}\n"]}
|