@omerdlw/base-framework 3.4.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -72
- package/dist/ambient/index.js +9 -10
- package/dist/ambient/server/index.js +3 -3
- package/dist/ambient/server/index.js.map +1 -1
- package/dist/ambient/worker/index.js +7 -4
- package/dist/ambient/worker/index.js.map +1 -1
- package/dist/background/index.js +8 -9
- package/dist/{chunk-KOYTJW5E.js → chunk-3FSDBJ7V.js} +7 -7
- package/dist/chunk-3FSDBJ7V.js.map +1 -0
- package/dist/{chunk-CRKJAACG.js → chunk-4QQ3QVY7.js} +10 -10
- package/dist/{chunk-CRKJAACG.js.map → chunk-4QQ3QVY7.js.map} +1 -1
- package/dist/{chunk-UQLTP3XB.js → chunk-5TQSH6KE.js} +143 -144
- package/dist/chunk-5TQSH6KE.js.map +1 -0
- package/dist/{chunk-HFR6YROB.js → chunk-6P3F4JU3.js} +1160 -1172
- package/dist/chunk-6P3F4JU3.js.map +1 -0
- package/dist/chunk-AKPH5CEJ.js +357 -0
- package/dist/chunk-AKPH5CEJ.js.map +1 -0
- package/dist/{chunk-QGPRTUED.js → chunk-AWLK2I56.js} +35 -39
- package/dist/chunk-AWLK2I56.js.map +1 -0
- package/dist/{chunk-ZXRE2KZO.js → chunk-C3SEBNF5.js} +11 -15
- package/dist/chunk-C3SEBNF5.js.map +1 -0
- package/dist/{chunk-R4K6VAOK.js → chunk-C527JOJQ.js} +11 -18
- package/dist/chunk-C527JOJQ.js.map +1 -0
- package/dist/{chunk-VNSMNGWP.js → chunk-DMQKXBWO.js} +5 -5
- package/dist/{chunk-VNSMNGWP.js.map → chunk-DMQKXBWO.js.map} +1 -1
- package/dist/{chunk-IH3STE7W.js → chunk-ED32WLAD.js} +1168 -1215
- package/dist/chunk-ED32WLAD.js.map +1 -0
- package/dist/{chunk-67MOKJFZ.js → chunk-EXB7VFD3.js} +16 -16
- package/dist/chunk-EXB7VFD3.js.map +1 -0
- package/dist/chunk-FG2AKFXP.js +108 -0
- package/dist/chunk-FG2AKFXP.js.map +1 -0
- package/dist/chunk-GA5SZ6E2.js +17 -0
- package/dist/{chunk-AZ2ZDFNP.js.map → chunk-GA5SZ6E2.js.map} +1 -1
- package/dist/chunk-GG2ILNK2.js +44 -0
- package/dist/chunk-GG2ILNK2.js.map +1 -0
- package/dist/{chunk-6IP6YFQX.js → chunk-JA75E4BG.js} +21 -31
- package/dist/chunk-JA75E4BG.js.map +1 -0
- package/dist/{chunk-WQTMOUCA.js → chunk-JWUKAZ3A.js} +45 -67
- package/dist/chunk-JWUKAZ3A.js.map +1 -0
- package/dist/{chunk-LKYW4LH6.js → chunk-QZA5AIT6.js} +37 -47
- package/dist/chunk-QZA5AIT6.js.map +1 -0
- package/dist/{chunk-D222OCTV.js → chunk-S67HGKJ2.js} +49 -55
- package/dist/chunk-S67HGKJ2.js.map +1 -0
- package/dist/chunk-T53WFIZN.js +29 -0
- package/dist/chunk-T53WFIZN.js.map +1 -0
- package/dist/{chunk-RDYYP36I.js → chunk-TMKA5ZHO.js} +7 -6
- package/dist/chunk-TMKA5ZHO.js.map +1 -0
- package/dist/{chunk-XGAYTDSI.js → chunk-UWX7GCNX.js} +23 -26
- package/dist/chunk-UWX7GCNX.js.map +1 -0
- package/dist/{chunk-QRXDXAQI.js → chunk-WVED7PDH.js} +161 -165
- package/dist/chunk-WVED7PDH.js.map +1 -0
- package/dist/{chunk-FFJWJ4OB.js → chunk-XIFQMK2Z.js} +12317 -12355
- package/dist/chunk-XIFQMK2Z.js.map +1 -0
- package/dist/{chunk-BMFHS3GV.js → chunk-YHWA7FXX.js} +22 -12
- package/dist/chunk-YHWA7FXX.js.map +1 -0
- package/dist/{chunk-YZS2B6YE.js → chunk-YKHAFHB7.js} +9 -12
- package/dist/chunk-YKHAFHB7.js.map +1 -0
- package/dist/{chunk-GKAJ4EM2.js → chunk-ZQI4ZCVU.js} +83 -83
- package/dist/chunk-ZQI4ZCVU.js.map +1 -0
- package/dist/context-menu/index.js +13 -15
- package/dist/controls/index.js +7 -6
- package/dist/core/error/boundary.d.ts.map +1 -1
- package/dist/core/error/constants.d.ts +9 -0
- package/dist/core/error/constants.d.ts.map +1 -1
- package/dist/core/error/index.d.ts +2 -3
- package/dist/core/error/index.d.ts.map +1 -1
- package/dist/core/error/listener.d.ts.map +1 -1
- package/dist/core/error/reporter.d.ts +7 -6
- package/dist/core/error/reporter.d.ts.map +1 -1
- package/dist/core/error/utils.d.ts.map +1 -1
- package/dist/core/kernel/constants.d.ts +1 -1
- package/dist/core/kernel/constants.d.ts.map +1 -1
- package/dist/core/kernel/{compose.d.ts → host/compose.d.ts} +0 -4
- package/dist/core/kernel/host/compose.d.ts.map +1 -0
- package/dist/core/kernel/{installed.d.ts → host/installed.d.ts} +1 -1
- package/dist/core/kernel/host/installed.d.ts.map +1 -0
- package/dist/core/kernel/{module.d.ts → host/module.d.ts} +2 -5
- package/dist/core/kernel/host/module.d.ts.map +1 -0
- package/dist/core/kernel/{adapters.d.ts → host/registration.d.ts} +2 -2
- package/dist/core/kernel/host/registration.d.ts.map +1 -0
- package/dist/core/kernel/index.d.ts +12 -12
- package/dist/core/kernel/index.d.ts.map +1 -1
- package/dist/core/kernel/{page-controller.d.ts → page.d.ts} +2 -2
- package/dist/core/kernel/page.d.ts.map +1 -0
- package/dist/core/kernel/{handlers.d.ts → registry/apply.d.ts} +2 -2
- package/dist/core/kernel/registry/apply.d.ts.map +1 -0
- package/dist/core/kernel/{hooks.d.ts → registry/hooks.d.ts} +1 -1
- package/dist/core/kernel/registry/hooks.d.ts.map +1 -0
- package/dist/core/kernel/{operations.d.ts → registry/operations.d.ts} +2 -2
- package/dist/core/kernel/registry/operations.d.ts.map +1 -0
- package/dist/core/kernel/{provider.d.ts → registry/provider.d.ts} +2 -2
- package/dist/core/kernel/registry/provider.d.ts.map +1 -0
- package/dist/core/kernel/{operations-records.d.ts → registry/records.d.ts} +2 -2
- package/dist/core/kernel/registry/records.d.ts.map +1 -0
- package/dist/core/kernel/registry/registration.d.ts +13 -0
- package/dist/core/kernel/registry/registration.d.ts.map +1 -0
- package/dist/core/kernel/{schema.d.ts → registry/schema.d.ts} +1 -1
- package/dist/core/kernel/registry/schema.d.ts.map +1 -0
- package/dist/core/kernel/{store-snapshots.d.ts → registry/snapshots.d.ts} +3 -3
- package/dist/core/kernel/registry/snapshots.d.ts.map +1 -0
- package/dist/core/kernel/{stabilize.d.ts → registry/stabilize.d.ts} +1 -1
- package/dist/core/kernel/registry/stabilize.d.ts.map +1 -0
- package/dist/core/kernel/{store.d.ts → registry/store.d.ts} +2 -2
- package/dist/core/kernel/registry/store.d.ts.map +1 -0
- package/dist/core/kernel/{store-subscriptions.d.ts → registry/subscriptions.d.ts} +2 -6
- package/dist/core/kernel/registry/subscriptions.d.ts.map +1 -0
- package/dist/core/kernel/{runtime.d.ts → registry/transaction.d.ts} +2 -2
- package/dist/core/kernel/registry/transaction.d.ts.map +1 -0
- package/dist/core/kernel/{types-modules.d.ts → types/modules.d.ts} +4 -4
- package/dist/core/kernel/types/modules.d.ts.map +1 -0
- package/dist/core/kernel/{types-page.d.ts → types/page.d.ts} +3 -3
- package/dist/core/kernel/types/page.d.ts.map +1 -0
- package/dist/core/kernel/{types.d.ts → types/registry.d.ts} +4 -4
- package/dist/core/kernel/types/registry.d.ts.map +1 -0
- package/dist/core/kernel/{types-store.d.ts → types/store.d.ts} +3 -3
- package/dist/core/kernel/types/store.d.ts.map +1 -0
- package/dist/core/kernel/utils.d.ts +1 -1
- package/dist/core/kernel/utils.d.ts.map +1 -1
- package/dist/core/navigation/{navigator-holds.d.ts → holds.d.ts} +2 -1
- package/dist/core/navigation/holds.d.ts.map +1 -0
- package/dist/core/navigation/navigator.d.ts.map +1 -1
- package/dist/core/navigation/{navigator-patience.d.ts → patience.d.ts} +1 -1
- package/dist/core/navigation/patience.d.ts.map +1 -0
- package/dist/core/navigation/{navigator-payload.d.ts → payload.d.ts} +2 -1
- package/dist/core/navigation/payload.d.ts.map +1 -0
- package/dist/core/navigation/{navigator-prefetch.d.ts → prefetch.d.ts} +2 -1
- package/dist/core/navigation/prefetch.d.ts.map +1 -0
- package/dist/core/navigation/settings.d.ts.map +1 -1
- package/dist/core/navigation/state.d.ts.map +1 -1
- package/dist/core/navigation/utils.d.ts +3 -0
- package/dist/core/navigation/utils.d.ts.map +1 -1
- package/dist/core/provider/index.d.ts +4 -9
- package/dist/core/provider/index.d.ts.map +1 -1
- package/dist/dock/index.js +12 -14
- package/dist/error/index.js +4 -7
- package/dist/events/index.js +24 -20
- package/dist/events/index.js.map +1 -1
- package/dist/foundation/events/index.d.ts.map +1 -1
- package/dist/foundation/recipes/index.d.ts +0 -7
- package/dist/foundation/recipes/index.d.ts.map +1 -1
- package/dist/foundation/recipes/recipe.d.ts.map +1 -1
- package/dist/foundation/result/index.d.ts.map +1 -1
- package/dist/foundation/utils/collections.d.ts +11 -0
- package/dist/foundation/utils/collections.d.ts.map +1 -0
- package/dist/foundation/utils/dom.d.ts.map +1 -1
- package/dist/foundation/utils/report.d.ts.map +1 -1
- package/dist/foundation/utils/scheduler.d.ts.map +1 -1
- package/dist/foundation/utils/store.d.ts.map +1 -1
- package/dist/foundation/utils/string.d.ts.map +1 -1
- package/dist/foundation/utils/tempo.d.ts.map +1 -1
- package/dist/foundation/utils/timing.d.ts.map +1 -1
- package/dist/foundation/utils/user-message.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -3
- package/dist/index.js +22 -24
- package/dist/kernel/index.js +4 -4
- package/dist/loading/index.js +6 -8
- package/dist/media/index.js +5 -5
- package/dist/modal/index.js +153 -166
- package/dist/modal/index.js.map +1 -1
- package/dist/modules/ambient/{analyze.d.ts → analysis/analyze.d.ts} +3 -3
- package/dist/modules/ambient/analysis/analyze.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-bounds.d.ts → analysis/bounds.d.ts} +2 -2
- package/dist/modules/ambient/analysis/bounds.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-clusters.d.ts → analysis/clusters.d.ts} +3 -3
- package/dist/modules/ambient/analysis/clusters.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-ground.d.ts → analysis/ground.d.ts} +3 -3
- package/dist/modules/ambient/analysis/ground.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-measures.d.ts → analysis/measures.d.ts} +2 -2
- package/dist/modules/ambient/analysis/measures.d.ts.map +1 -0
- package/dist/modules/ambient/{oklab.d.ts → analysis/oklab.d.ts} +1 -3
- package/dist/modules/ambient/analysis/oklab.d.ts.map +1 -0
- package/dist/modules/ambient/analysis/quantize.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-swatches.d.ts → analysis/swatches.d.ts} +3 -3
- package/dist/modules/ambient/analysis/swatches.d.ts.map +1 -0
- package/dist/modules/ambient/hooks.d.ts +0 -1
- package/dist/modules/ambient/hooks.d.ts.map +1 -1
- package/dist/modules/ambient/index.d.ts +2 -2
- package/dist/modules/ambient/index.d.ts.map +1 -1
- package/dist/modules/ambient/module.d.ts +0 -3
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/pipeline.d.ts +6 -5
- package/dist/modules/ambient/pipeline.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.d.ts +2 -2
- package/dist/modules/ambient/server/index.d.ts.map +1 -1
- package/dist/modules/ambient/settings.d.ts +0 -2
- package/dist/modules/ambient/settings.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts.map +1 -1
- package/dist/modules/background/constants.d.ts +3 -1
- package/dist/modules/background/constants.d.ts.map +1 -1
- package/dist/modules/background/context.d.ts +1 -1
- package/dist/modules/background/context.d.ts.map +1 -1
- package/dist/modules/background/hooks.d.ts +929 -0
- 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/module.d.ts +1 -1
- package/dist/modules/background/module.d.ts.map +1 -1
- package/dist/modules/background/{hooks/use-native-video-model.d.ts → native-video.d.ts} +4 -8
- package/dist/modules/background/native-video.d.ts.map +1 -0
- package/dist/modules/background/overlay.d.ts.map +1 -0
- package/dist/modules/background/playback.d.ts.map +1 -0
- package/dist/modules/background/{model/state.d.ts → state.d.ts} +11 -1
- package/dist/modules/background/state.d.ts.map +1 -0
- package/dist/modules/background/{model/visual.d.ts → visual.d.ts} +43 -6
- package/dist/modules/background/visual.d.ts.map +1 -0
- package/dist/modules/background/youtube/audio.d.ts.map +1 -0
- package/dist/modules/background/youtube/iframe.d.ts +92 -0
- package/dist/modules/background/youtube/iframe.d.ts.map +1 -0
- package/dist/modules/background/youtube/{lib/parse.d.ts → parse.d.ts} +1 -1
- package/dist/modules/background/youtube/parse.d.ts.map +1 -0
- package/dist/modules/background/youtube/{components/player.d.ts → player.d.ts} +1 -1
- package/dist/modules/background/youtube/player.d.ts.map +1 -0
- package/dist/modules/background/youtube/{lib/timing.d.ts → timing.d.ts} +0 -2
- package/dist/modules/background/youtube/timing.d.ts.map +1 -0
- package/dist/modules/background/youtube/use-iframe-player.d.ts +37 -0
- package/dist/modules/background/youtube/use-iframe-player.d.ts.map +1 -0
- package/dist/modules/background/youtube/{hooks/use-youtube-background-player-model.d.ts → use-player.d.ts} +2 -2
- package/dist/modules/background/youtube/use-player.d.ts.map +1 -0
- package/dist/modules/background/youtube/{hooks/use-youtube-video-sync.d.ts → use-video-sync.d.ts} +8 -4
- package/dist/modules/background/youtube/use-video-sync.d.ts.map +1 -0
- package/dist/modules/background/youtube/{lib/video-events.d.ts → video-events.d.ts} +8 -8
- package/dist/modules/background/youtube/video-events.d.ts.map +1 -0
- package/dist/modules/context-menu/dom.d.ts.map +1 -1
- package/dist/modules/context-menu/items.d.ts.map +1 -1
- package/dist/modules/context-menu/overlay.d.ts +3 -10
- package/dist/modules/context-menu/overlay.d.ts.map +1 -1
- package/dist/modules/context-menu/resolver.d.ts.map +1 -1
- package/dist/modules/controls/overlay.d.ts +0 -10
- package/dist/modules/controls/overlay.d.ts.map +1 -1
- package/dist/modules/dock/{lib → card}/banner.d.ts +3 -16
- package/dist/modules/dock/card/banner.d.ts.map +1 -0
- package/dist/modules/dock/{components/card-item.d.ts → card/card.d.ts} +5 -2
- package/dist/modules/dock/card/card.d.ts.map +1 -0
- package/dist/modules/dock/card/compact.d.ts.map +1 -0
- package/dist/modules/dock/{components/item-content.d.ts → card/content.d.ts} +1 -1
- package/dist/modules/dock/card/content.d.ts.map +1 -0
- package/dist/modules/dock/card/header.d.ts +8 -0
- package/dist/modules/dock/card/header.d.ts.map +1 -0
- package/dist/modules/dock/{components → card}/icon.d.ts +1 -1
- package/dist/modules/dock/card/icon.d.ts.map +1 -0
- package/dist/modules/dock/{lib/card-item.d.ts → card/model.d.ts} +20 -2
- package/dist/modules/dock/card/model.d.ts.map +1 -0
- package/dist/modules/dock/{hooks/use-card-item-model.d.ts → card/use-card.d.ts} +44 -43
- package/dist/modules/dock/{hooks/use-card-item-model.d.ts.map → card/use-card.d.ts.map} +1 -1
- package/dist/modules/dock/commands/command-bar.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/commands.d.ts → commands/registry.d.ts} +1 -1
- package/dist/modules/dock/commands/registry.d.ts.map +1 -0
- package/dist/modules/dock/constants.d.ts +4 -7
- package/dist/modules/dock/constants.d.ts.map +1 -1
- package/dist/modules/dock/context.d.ts +1 -1
- package/dist/modules/dock/context.d.ts.map +1 -1
- package/dist/modules/dock/hooks.d.ts +47 -0
- package/dist/modules/dock/hooks.d.ts.map +1 -0
- package/dist/modules/dock/{hud.d.ts → hud/hud.d.ts} +14 -7
- package/dist/modules/dock/hud/hud.d.ts.map +1 -0
- package/dist/modules/dock/{model/hud-definition.d.ts → hud/model.d.ts} +7 -1
- package/dist/modules/dock/hud/model.d.ts.map +1 -0
- package/dist/modules/dock/{components/hud-view.d.ts → hud/view.d.ts} +1 -1
- package/dist/modules/dock/hud/view.d.ts.map +1 -0
- package/dist/modules/dock/index.d.ts +22 -22
- package/dist/modules/dock/index.d.ts.map +1 -1
- package/dist/modules/dock/items/attention.d.ts +43 -0
- package/dist/modules/dock/items/attention.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/model/items.d.ts → items/build.d.ts} +2 -2
- package/dist/modules/dock/items/build.d.ts.map +1 -0
- package/dist/modules/dock/{runtime → items}/display.d.ts +2 -5
- package/dist/modules/dock/items/display.d.ts.map +1 -0
- package/dist/modules/dock/items/operations.d.ts +22 -0
- package/dist/modules/dock/items/operations.d.ts.map +1 -0
- package/dist/modules/dock/{runtime → items}/pipeline.d.ts +1 -1
- package/dist/modules/dock/items/pipeline.d.ts.map +1 -0
- package/dist/modules/dock/{components/media-action.d.ts → media/controls.d.ts} +5 -2
- package/dist/modules/dock/media/controls.d.ts.map +1 -0
- package/dist/modules/dock/{lib/media.d.ts → media/model.d.ts} +1 -3
- package/dist/modules/dock/media/model.d.ts.map +1 -0
- package/dist/modules/dock/{components/media-scrubber.d.ts → media/scrubber.d.ts} +1 -1
- package/dist/modules/dock/media/scrubber.d.ts.map +1 -0
- package/dist/modules/dock/{hooks/use-media-controls-model.d.ts → media/use-controls.d.ts} +8 -8
- package/dist/modules/dock/media/use-controls.d.ts.map +1 -0
- package/dist/modules/dock/module.d.ts.map +1 -1
- package/dist/modules/dock/motion.d.ts +27 -28
- package/dist/modules/dock/motion.d.ts.map +1 -1
- package/dist/modules/dock/provider.d.ts.map +1 -1
- package/dist/modules/dock/routing/breadcrumbs-card.d.ts.map +1 -0
- package/dist/modules/dock/routing/{model/continuity.d.ts → continuity-state.d.ts} +2 -2
- package/dist/modules/dock/routing/continuity-state.d.ts.map +1 -0
- package/dist/modules/dock/routing/continuity.d.ts +8 -8
- package/dist/modules/dock/routing/continuity.d.ts.map +1 -1
- package/dist/modules/dock/routing/navigation.d.ts +0 -10
- package/dist/modules/dock/routing/navigation.d.ts.map +1 -1
- package/dist/modules/dock/routing/paths.d.ts.map +1 -0
- package/dist/modules/dock/routing/{model/policy.d.ts → policy.d.ts} +1 -1
- package/dist/modules/dock/routing/policy.d.ts.map +1 -0
- package/dist/modules/dock/routing/{hooks/use-route-prefetch.d.ts → prefetch.d.ts} +3 -3
- package/dist/modules/dock/routing/prefetch.d.ts.map +1 -0
- package/dist/modules/dock/routing/route-bridge.d.ts +8 -0
- package/dist/modules/dock/routing/route-bridge.d.ts.map +1 -0
- package/dist/modules/dock/routing/{model/topology.d.ts → topology.d.ts} +1 -1
- package/dist/modules/dock/routing/topology.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/model → stack}/cards.d.ts +8 -5
- package/dist/modules/dock/stack/cards.d.ts.map +1 -0
- package/dist/modules/dock/stack/dock.d.ts.map +1 -0
- package/dist/modules/dock/stack/focus.d.ts +22 -0
- package/dist/modules/dock/stack/focus.d.ts.map +1 -0
- package/dist/modules/dock/{model → stack}/layout.d.ts +8 -2
- package/dist/modules/dock/stack/layout.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/dock.d.ts → stack/use-dock-model.d.ts} +2 -1
- package/dist/modules/dock/stack/use-dock-model.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/hooks → stack}/use-dock.d.ts +9 -9
- package/dist/modules/dock/stack/use-dock.d.ts.map +1 -0
- package/dist/modules/dock/stack/use-height.d.ts +12 -0
- package/dist/modules/dock/stack/use-height.d.ts.map +1 -0
- package/dist/modules/dock/{components/status-actions.d.ts → status/actions.d.ts} +1 -1
- package/dist/modules/dock/status/actions.d.ts.map +1 -0
- package/dist/modules/dock/status/events.d.ts +4 -4
- package/dist/modules/dock/status/events.d.ts.map +1 -1
- package/dist/modules/dock/status/hooks.d.ts.map +1 -1
- package/dist/modules/dock/status/model.d.ts +34 -4
- package/dist/modules/dock/status/model.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model/builder.d.ts → builder.d.ts} +13 -7
- package/dist/modules/dock/surface/builder.d.ts.map +1 -0
- package/dist/modules/dock/{components/surface/item-content.d.ts → surface/content.d.ts} +2 -2
- package/dist/modules/dock/surface/content.d.ts.map +1 -0
- package/dist/modules/dock/surface/context.d.ts +12 -3
- package/dist/modules/dock/surface/context.d.ts.map +1 -1
- package/dist/modules/dock/surface/controls.d.ts +26 -0
- package/dist/modules/dock/surface/controls.d.ts.map +1 -0
- package/dist/modules/dock/surface/definition.d.ts.map +1 -1
- package/dist/modules/dock/{components/surface → surface}/extensions-bar.d.ts +1 -1
- package/dist/modules/dock/surface/extensions-bar.d.ts.map +1 -0
- package/dist/modules/dock/{components/surface/action.d.ts → surface/extensions.d.ts} +4 -2
- package/dist/modules/dock/surface/extensions.d.ts.map +1 -0
- package/dist/modules/dock/{components/surface → surface}/header-button.d.ts +3 -3
- package/dist/modules/dock/surface/header-button.d.ts.map +1 -0
- package/dist/modules/dock/surface/helpers.d.ts +13 -1
- package/dist/modules/dock/surface/helpers.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model/normalize.d.ts → normalize.d.ts} +1 -1
- package/dist/modules/dock/surface/normalize.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/choreography.d.ts +28 -2
- package/dist/modules/dock/surface/runtime/choreography.d.ts.map +1 -1
- package/dist/modules/dock/surface/runtime/flows.d.ts +1 -1
- package/dist/modules/dock/surface/runtime/flows.d.ts.map +1 -1
- package/dist/modules/dock/surface/{machine.d.ts → runtime/machine.d.ts} +1 -1
- package/dist/modules/dock/surface/runtime/machine.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/open.d.ts +1 -2
- package/dist/modules/dock/surface/runtime/open.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model → runtime}/records.d.ts +1 -1
- package/dist/modules/dock/surface/runtime/records.d.ts.map +1 -0
- package/dist/modules/dock/surface/{stack.d.ts → runtime/stack.d.ts} +10 -10
- package/dist/modules/dock/surface/runtime/stack.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/steps.d.ts +1 -1
- package/dist/modules/dock/surface/runtime/steps.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model/transition-state.d.ts → runtime/transition.d.ts} +1 -1
- package/dist/modules/dock/surface/runtime/transition.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/url.d.ts.map +1 -0
- package/dist/modules/dock/surface/{hooks/use-surface-shell-model.d.ts → shell.d.ts} +9 -3
- package/dist/modules/dock/surface/shell.d.ts.map +1 -0
- package/dist/modules/dock/surface/{hooks/use-surface-flow.d.ts → use-flow.d.ts} +2 -2
- package/dist/modules/dock/surface/use-flow.d.ts.map +1 -0
- package/dist/modules/dock/surface/view-model.d.ts.map +1 -1
- package/dist/modules/dock/{lib/styles.d.ts → theme.d.ts} +22 -18
- package/dist/modules/dock/theme.d.ts.map +1 -0
- package/dist/modules/dock/types/card.d.ts +12 -3
- package/dist/modules/dock/types/card.d.ts.map +1 -1
- package/dist/modules/dock/types/index.d.ts +1 -1
- package/dist/modules/dock/types/index.d.ts.map +1 -1
- package/dist/modules/dock/types/surface.d.ts +2 -2
- package/dist/modules/dock/types/surface.d.ts.map +1 -1
- package/dist/modules/dock/{lib/helpers.d.ts → utils.d.ts} +10 -3
- package/dist/modules/dock/utils.d.ts.map +1 -0
- package/dist/modules/index.js +20 -22
- package/dist/modules/loading/hooks.d.ts +2 -1
- package/dist/modules/loading/hooks.d.ts.map +1 -1
- package/dist/modules/loading/state.d.ts.map +1 -1
- package/dist/modules/media/hooks.d.ts.map +1 -1
- package/dist/modules/media/playback.d.ts.map +1 -1
- package/dist/modules/modal/constants.d.ts +3 -1
- package/dist/modules/modal/constants.d.ts.map +1 -1
- package/dist/modules/modal/{components/modal-container.d.ts → container.d.ts} +2 -2
- package/dist/modules/modal/container.d.ts.map +1 -0
- package/dist/modules/modal/context.d.ts +5 -1
- package/dist/modules/modal/context.d.ts.map +1 -1
- package/dist/modules/modal/dom.d.ts.map +1 -0
- package/dist/modules/modal/hooks.d.ts +3 -2
- package/dist/modules/modal/hooks.d.ts.map +1 -1
- package/dist/modules/modal/index.d.ts +7 -7
- package/dist/modules/modal/index.d.ts.map +1 -1
- package/dist/modules/modal/{model/layout.d.ts → layout.d.ts} +1 -1
- package/dist/modules/modal/layout.d.ts.map +1 -0
- package/dist/modules/modal/module.d.ts +1 -1
- package/dist/modules/modal/module.d.ts.map +1 -1
- package/dist/modules/modal/overlay.d.ts.map +1 -0
- package/dist/modules/modal/state.d.ts +52 -0
- package/dist/modules/modal/state.d.ts.map +1 -0
- package/dist/modules/navigation/hooks.d.ts.map +1 -1
- package/dist/modules/notification/hooks.d.ts.map +1 -1
- package/dist/modules/notification/overlay.d.ts +0 -1
- package/dist/modules/notification/overlay.d.ts.map +1 -1
- package/dist/navigation/index.js +33 -41
- package/dist/navigation/index.js.map +1 -1
- package/dist/notification/index.js +8 -7
- package/dist/overlay-ZCMQVNYT.js +12 -0
- package/dist/{overlay-7QLGWHCH.js.map → overlay-ZCMQVNYT.js.map} +1 -1
- package/dist/provider/index.js +7 -11
- package/dist/react/hooks/index.d.ts +3 -1
- package/dist/react/hooks/index.d.ts.map +1 -1
- package/dist/react/hooks/use-client-value.d.ts +15 -0
- package/dist/react/hooks/use-client-value.d.ts.map +1 -0
- package/dist/react/hooks/use-controllable-state.d.ts +8 -1
- package/dist/react/hooks/use-controllable-state.d.ts.map +1 -1
- package/dist/react/hooks/use-fullscreen-state.d.ts +0 -2
- package/dist/react/hooks/use-fullscreen-state.d.ts.map +1 -1
- package/dist/react/hooks/use-global-event.d.ts +7 -1
- package/dist/react/hooks/use-global-event.d.ts.map +1 -1
- package/dist/react/hooks/use-hotkey.d.ts +9 -1
- package/dist/react/hooks/use-hotkey.d.ts.map +1 -1
- package/dist/react/hooks/use-scroll-lock.d.ts.map +1 -1
- package/dist/react/hooks/use-store.d.ts +3 -0
- package/dist/react/hooks/use-store.d.ts.map +1 -1
- package/dist/react/theme/index.d.ts +7 -2
- package/dist/react/theme/index.d.ts.map +1 -1
- package/dist/react/theme/parts.d.ts +89 -0
- package/dist/react/theme/parts.d.ts.map +1 -0
- package/dist/recipes/index.js +6 -121
- package/dist/recipes/index.js.map +1 -1
- package/dist/result/index.js +12 -15
- package/dist/result/index.js.map +1 -1
- package/dist/theme/index.js +2 -2
- package/dist/utils/index.js +31 -34
- package/dist/utils/index.js.map +1 -1
- package/docs/README.md +11 -12
- package/docs/architecture-and-rules.md +43 -32
- package/docs/core-engine.md +11 -13
- package/docs/custom-modules.md +1 -1
- package/docs/design.md +60 -153
- package/docs/getting-started.md +3 -5
- package/docs/modules/README.md +16 -16
- package/docs/modules/ambient.md +23 -23
- package/docs/modules/background.md +24 -19
- package/docs/modules/context-menu.md +1 -1
- package/docs/modules/dock.md +47 -43
- package/docs/modules/error-boundary.md +2 -3
- package/docs/modules/kernel.md +28 -30
- package/docs/modules/loading.md +1 -1
- package/docs/modules/modal.md +17 -16
- package/docs/modules/navigation.md +14 -14
- package/docs/testing.md +1 -1
- package/package.json +1 -8
- package/templates/AGENTS.md +4 -3
- package/MIGRATION.md +0 -99
- package/dist/chunk-67MOKJFZ.js.map +0 -1
- package/dist/chunk-6IP6YFQX.js.map +0 -1
- package/dist/chunk-7VU2OAJB.js +0 -464
- package/dist/chunk-7VU2OAJB.js.map +0 -1
- package/dist/chunk-AZ2ZDFNP.js +0 -17
- package/dist/chunk-BMFHS3GV.js.map +0 -1
- package/dist/chunk-D222OCTV.js.map +0 -1
- package/dist/chunk-ESD5EQ5H.js +0 -178
- package/dist/chunk-ESD5EQ5H.js.map +0 -1
- package/dist/chunk-FFJWJ4OB.js.map +0 -1
- package/dist/chunk-GKAJ4EM2.js.map +0 -1
- package/dist/chunk-HFR6YROB.js.map +0 -1
- package/dist/chunk-IH3STE7W.js.map +0 -1
- package/dist/chunk-KOYTJW5E.js.map +0 -1
- package/dist/chunk-LKYW4LH6.js.map +0 -1
- package/dist/chunk-QGPRTUED.js.map +0 -1
- package/dist/chunk-QRXDXAQI.js.map +0 -1
- package/dist/chunk-R4K6VAOK.js.map +0 -1
- package/dist/chunk-RDYYP36I.js.map +0 -1
- package/dist/chunk-RGC2VFQO.js +0 -139
- package/dist/chunk-RGC2VFQO.js.map +0 -1
- package/dist/chunk-TAWTGCWJ.js +0 -113
- package/dist/chunk-TAWTGCWJ.js.map +0 -1
- package/dist/chunk-UDJ7ARCH.js +0 -140
- package/dist/chunk-UDJ7ARCH.js.map +0 -1
- package/dist/chunk-UQLTP3XB.js.map +0 -1
- package/dist/chunk-WQTMOUCA.js.map +0 -1
- package/dist/chunk-WZ5T2NXH.js +0 -702
- package/dist/chunk-WZ5T2NXH.js.map +0 -1
- package/dist/chunk-XGAYTDSI.js.map +0 -1
- package/dist/chunk-YZS2B6YE.js.map +0 -1
- package/dist/chunk-ZXRE2KZO.js.map +0 -1
- package/dist/core/error/theme.d.ts +0 -10
- package/dist/core/error/theme.d.ts.map +0 -1
- package/dist/core/kernel/adapters.d.ts.map +0 -1
- package/dist/core/kernel/compose.d.ts.map +0 -1
- package/dist/core/kernel/handlers.d.ts.map +0 -1
- package/dist/core/kernel/hooks.d.ts.map +0 -1
- package/dist/core/kernel/installed.d.ts.map +0 -1
- package/dist/core/kernel/module.d.ts.map +0 -1
- package/dist/core/kernel/operations-records.d.ts.map +0 -1
- package/dist/core/kernel/operations-resolve.d.ts +0 -5
- package/dist/core/kernel/operations-resolve.d.ts.map +0 -1
- package/dist/core/kernel/operations.d.ts.map +0 -1
- package/dist/core/kernel/page-controller.d.ts.map +0 -1
- package/dist/core/kernel/provider.d.ts.map +0 -1
- package/dist/core/kernel/runtime.d.ts.map +0 -1
- package/dist/core/kernel/schema.d.ts.map +0 -1
- package/dist/core/kernel/stabilize.d.ts.map +0 -1
- package/dist/core/kernel/store-batch.d.ts +0 -17
- package/dist/core/kernel/store-batch.d.ts.map +0 -1
- package/dist/core/kernel/store-entries.d.ts +0 -6
- package/dist/core/kernel/store-entries.d.ts.map +0 -1
- package/dist/core/kernel/store-handles.d.ts +0 -4
- package/dist/core/kernel/store-handles.d.ts.map +0 -1
- package/dist/core/kernel/store-registration.d.ts +0 -14
- package/dist/core/kernel/store-registration.d.ts.map +0 -1
- package/dist/core/kernel/store-snapshots.d.ts.map +0 -1
- package/dist/core/kernel/store-subscriptions.d.ts.map +0 -1
- package/dist/core/kernel/store.d.ts.map +0 -1
- package/dist/core/kernel/types-modules.d.ts.map +0 -1
- package/dist/core/kernel/types-page.d.ts.map +0 -1
- package/dist/core/kernel/types-store.d.ts.map +0 -1
- package/dist/core/kernel/types.d.ts.map +0 -1
- package/dist/core/navigation/navigator-defaults.d.ts +0 -4
- package/dist/core/navigation/navigator-defaults.d.ts.map +0 -1
- package/dist/core/navigation/navigator-holds.d.ts.map +0 -1
- package/dist/core/navigation/navigator-patience.d.ts.map +0 -1
- package/dist/core/navigation/navigator-payload.d.ts.map +0 -1
- package/dist/core/navigation/navigator-prefetch.d.ts.map +0 -1
- package/dist/foundation/recipes/anatomy.d.ts +0 -139
- package/dist/foundation/recipes/anatomy.d.ts.map +0 -1
- package/dist/foundation/recipes/define.d.ts +0 -133
- package/dist/foundation/recipes/define.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-bounds.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-clusters.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-ground.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-measures.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-swatches.d.ts.map +0 -1
- package/dist/modules/ambient/analyze.d.ts.map +0 -1
- package/dist/modules/ambient/oklab.d.ts.map +0 -1
- package/dist/modules/ambient/quantize.d.ts.map +0 -1
- package/dist/modules/background/components/background-gradients.d.ts +0 -8
- package/dist/modules/background/components/background-gradients.d.ts.map +0 -1
- package/dist/modules/background/components/edge-gradient.d.ts +0 -9
- package/dist/modules/background/components/edge-gradient.d.ts.map +0 -1
- package/dist/modules/background/components/native-video.d.ts +0 -4
- package/dist/modules/background/components/native-video.d.ts.map +0 -1
- package/dist/modules/background/components/noise-overlay.d.ts +0 -11
- package/dist/modules/background/components/noise-overlay.d.ts.map +0 -1
- package/dist/modules/background/components/overlay.d.ts.map +0 -1
- package/dist/modules/background/components/solid-overlay.d.ts +0 -10
- package/dist/modules/background/components/solid-overlay.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-background-media-source.d.ts +0 -4
- package/dist/modules/background/hooks/use-background-media-source.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-background-motion-model.d.ts +0 -15
- package/dist/modules/background/hooks/use-background-motion-model.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts +0 -929
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-native-video-model.d.ts.map +0 -1
- package/dist/modules/background/lib/theme.d.ts +0 -4
- package/dist/modules/background/lib/theme.d.ts.map +0 -1
- package/dist/modules/background/model/override.d.ts +0 -14
- package/dist/modules/background/model/override.d.ts.map +0 -1
- package/dist/modules/background/model/playback.d.ts.map +0 -1
- package/dist/modules/background/model/state.d.ts.map +0 -1
- package/dist/modules/background/model/video-frame.d.ts +0 -31
- package/dist/modules/background/model/video-frame.d.ts.map +0 -1
- package/dist/modules/background/model/visual.d.ts.map +0 -1
- package/dist/modules/background/youtube/components/player.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-background-player-model.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts +0 -20
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts +0 -8
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-video-sync.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/audio.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts +0 -29
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts +0 -47
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/iframe.d.ts +0 -47
- package/dist/modules/background/youtube/lib/iframe.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/parse.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/timing.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/video-events.d.ts.map +0 -1
- package/dist/modules/dock/components/badge.d.ts +0 -5
- package/dist/modules/dock/components/badge.d.ts.map +0 -1
- package/dist/modules/dock/components/breadcrumbs-card.d.ts.map +0 -1
- package/dist/modules/dock/components/card-banner.d.ts +0 -4
- package/dist/modules/dock/components/card-banner.d.ts.map +0 -1
- package/dist/modules/dock/components/card-header.d.ts +0 -4
- package/dist/modules/dock/components/card-header.d.ts.map +0 -1
- package/dist/modules/dock/components/card-item.d.ts.map +0 -1
- package/dist/modules/dock/components/command-bar.d.ts.map +0 -1
- package/dist/modules/dock/components/compact.d.ts.map +0 -1
- package/dist/modules/dock/components/description.d.ts +0 -4
- package/dist/modules/dock/components/description.d.ts.map +0 -1
- package/dist/modules/dock/components/dock.d.ts.map +0 -1
- package/dist/modules/dock/components/hud-view.d.ts.map +0 -1
- package/dist/modules/dock/components/icon.d.ts.map +0 -1
- package/dist/modules/dock/components/item-content.d.ts.map +0 -1
- package/dist/modules/dock/components/media-action.d.ts.map +0 -1
- package/dist/modules/dock/components/media-controls.d.ts +0 -4
- package/dist/modules/dock/components/media-controls.d.ts.map +0 -1
- package/dist/modules/dock/components/media-scrubber.d.ts.map +0 -1
- package/dist/modules/dock/components/status-actions.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/action.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/controls.d.ts +0 -12
- package/dist/modules/dock/components/surface/controls.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/extensions-bar.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/header-button.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/item-content.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/shell.d.ts +0 -3
- package/dist/modules/dock/components/surface/shell.d.ts.map +0 -1
- package/dist/modules/dock/components/title.d.ts +0 -4
- package/dist/modules/dock/components/title.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-action-slot.d.ts +0 -6
- package/dist/modules/dock/hooks/use-action-slot.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-badge.d.ts +0 -4
- package/dist/modules/dock/hooks/use-badge.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts +0 -18
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-card-header-model.d.ts +0 -7
- package/dist/modules/dock/hooks/use-card-header-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts +0 -12
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-banner.d.ts +0 -11
- package/dist/modules/dock/hooks/use-dock-banner.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-config.d.ts +0 -19
- package/dist/modules/dock/hooks/use-dock-config.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts +0 -7
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts +0 -7
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts +0 -6
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts +0 -11
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-registration.d.ts +0 -8
- package/dist/modules/dock/hooks/use-dock-registration.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts +0 -2
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-theme.d.ts +0 -6
- package/dist/modules/dock/hooks/use-dock-theme.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts +0 -6
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-element-height.d.ts +0 -3
- package/dist/modules/dock/hooks/use-element-height.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-hud-registry.d.ts +0 -16
- package/dist/modules/dock/hooks/use-hud-registry.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts +0 -9
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-media-controls-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts +0 -27
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-pending-skeleton.d.ts +0 -7
- package/dist/modules/dock/hooks/use-pending-skeleton.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts +0 -12
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-surface-return.d.ts +0 -8
- package/dist/modules/dock/hooks/use-surface-return.d.ts.map +0 -1
- package/dist/modules/dock/hud.d.ts.map +0 -1
- package/dist/modules/dock/lib/banner.d.ts.map +0 -1
- package/dist/modules/dock/lib/card-item.d.ts.map +0 -1
- package/dist/modules/dock/lib/card.d.ts +0 -20
- package/dist/modules/dock/lib/card.d.ts.map +0 -1
- package/dist/modules/dock/lib/command-bar.d.ts +0 -8
- package/dist/modules/dock/lib/command-bar.d.ts.map +0 -1
- package/dist/modules/dock/lib/dom.d.ts +0 -7
- package/dist/modules/dock/lib/dom.d.ts.map +0 -1
- package/dist/modules/dock/lib/element-helpers.d.ts +0 -8
- package/dist/modules/dock/lib/element-helpers.d.ts.map +0 -1
- package/dist/modules/dock/lib/helpers.d.ts.map +0 -1
- package/dist/modules/dock/lib/media.d.ts.map +0 -1
- package/dist/modules/dock/lib/styles.d.ts.map +0 -1
- package/dist/modules/dock/model/hud-definition.d.ts.map +0 -1
- package/dist/modules/dock/model/hud.d.ts +0 -10
- package/dist/modules/dock/model/hud.d.ts.map +0 -1
- package/dist/modules/dock/model/layout.d.ts.map +0 -1
- package/dist/modules/dock/model/page-entry.d.ts +0 -11
- package/dist/modules/dock/model/page-entry.d.ts.map +0 -1
- package/dist/modules/dock/model/page-surface.d.ts +0 -4
- package/dist/modules/dock/model/page-surface.d.ts.map +0 -1
- package/dist/modules/dock/model/paths.d.ts.map +0 -1
- package/dist/modules/dock/model/state.d.ts +0 -28
- package/dist/modules/dock/model/state.d.ts.map +0 -1
- package/dist/modules/dock/model/surface-return.d.ts +0 -14
- package/dist/modules/dock/model/surface-return.d.ts.map +0 -1
- package/dist/modules/dock/routing/hooks/use-route-prefetch.d.ts.map +0 -1
- package/dist/modules/dock/routing/lib/restore.d.ts +0 -7
- package/dist/modules/dock/routing/lib/restore.d.ts.map +0 -1
- package/dist/modules/dock/routing/model/continuity.d.ts.map +0 -1
- package/dist/modules/dock/routing/model/policy.d.ts.map +0 -1
- package/dist/modules/dock/routing/model/topology.d.ts.map +0 -1
- package/dist/modules/dock/runtime/commands.d.ts.map +0 -1
- package/dist/modules/dock/runtime/display.d.ts.map +0 -1
- package/dist/modules/dock/runtime/dock.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts +0 -10
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts +0 -10
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts +0 -14
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts +0 -7
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/attention.d.ts +0 -25
- package/dist/modules/dock/runtime/model/attention.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/cards.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/items.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/layout.d.ts +0 -10
- package/dist/modules/dock/runtime/model/layout.d.ts.map +0 -1
- package/dist/modules/dock/runtime/pipeline.d.ts.map +0 -1
- package/dist/modules/dock/runtime/provider-actions.d.ts +0 -38
- package/dist/modules/dock/runtime/provider-actions.d.ts.map +0 -1
- package/dist/modules/dock/status/action-options.d.ts +0 -35
- package/dist/modules/dock/status/action-options.d.ts.map +0 -1
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts +0 -5
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts.map +0 -1
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts +0 -7
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts.map +0 -1
- package/dist/modules/dock/surface/constants.d.ts +0 -5
- package/dist/modules/dock/surface/constants.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts +0 -15
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts +0 -7
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts +0 -14
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-flow.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts +0 -13
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-shell-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/lib/drag.d.ts +0 -9
- package/dist/modules/dock/surface/lib/drag.d.ts.map +0 -1
- package/dist/modules/dock/surface/lib/target.d.ts +0 -8
- package/dist/modules/dock/surface/lib/target.d.ts.map +0 -1
- package/dist/modules/dock/surface/machine.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/builder.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/normalize.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/open.d.ts +0 -26
- package/dist/modules/dock/surface/model/open.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/records.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/steps.d.ts +0 -9
- package/dist/modules/dock/surface/model/steps.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/transition-state.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/url.d.ts.map +0 -1
- package/dist/modules/dock/surface/runtime/context.d.ts +0 -29
- package/dist/modules/dock/surface/runtime/context.d.ts.map +0 -1
- package/dist/modules/dock/surface/runtime/release.d.ts +0 -9
- package/dist/modules/dock/surface/runtime/release.d.ts.map +0 -1
- package/dist/modules/dock/surface/stack.d.ts.map +0 -1
- package/dist/modules/dock/types/compact.d.ts +0 -13
- package/dist/modules/dock/types/compact.d.ts.map +0 -1
- package/dist/modules/modal/components/close-button.d.ts +0 -6
- package/dist/modules/modal/components/close-button.d.ts.map +0 -1
- package/dist/modules/modal/components/modal-container.d.ts.map +0 -1
- package/dist/modules/modal/components/modal-layer-switcher.d.ts +0 -9
- package/dist/modules/modal/components/modal-layer-switcher.d.ts.map +0 -1
- package/dist/modules/modal/components/modal-layer.d.ts +0 -17
- package/dist/modules/modal/components/modal-layer.d.ts.map +0 -1
- package/dist/modules/modal/components/overlay.d.ts.map +0 -1
- package/dist/modules/modal/components/resolve-header.d.ts +0 -10
- package/dist/modules/modal/components/resolve-header.d.ts.map +0 -1
- package/dist/modules/modal/components/slot-row.d.ts +0 -12
- package/dist/modules/modal/components/slot-row.d.ts.map +0 -1
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts +0 -3
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts.map +0 -1
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts +0 -12
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts.map +0 -1
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts +0 -3
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts.map +0 -1
- package/dist/modules/modal/lib/dom.d.ts.map +0 -1
- package/dist/modules/modal/lib/theme.d.ts +0 -4
- package/dist/modules/modal/lib/theme.d.ts.map +0 -1
- package/dist/modules/modal/model/entry.d.ts +0 -18
- package/dist/modules/modal/model/entry.d.ts.map +0 -1
- package/dist/modules/modal/model/header.d.ts +0 -16
- package/dist/modules/modal/model/header.d.ts.map +0 -1
- package/dist/modules/modal/model/identity.d.ts +0 -13
- package/dist/modules/modal/model/identity.d.ts.map +0 -1
- package/dist/modules/modal/model/layout.d.ts.map +0 -1
- package/dist/modules/modal/model/state.d.ts +0 -10
- package/dist/modules/modal/model/state.d.ts.map +0 -1
- package/dist/overlay-7QLGWHCH.js +0 -13
- package/dist/react/hooks/types.d.ts +0 -25
- package/dist/react/hooks/types.d.ts.map +0 -1
- package/dist/react/ui/components/avatar.d.ts +0 -6
- package/dist/react/ui/components/avatar.d.ts.map +0 -1
- package/dist/react/ui/components/button.d.ts +0 -6
- package/dist/react/ui/components/button.d.ts.map +0 -1
- package/dist/react/ui/components/carousel.d.ts +0 -6
- package/dist/react/ui/components/carousel.d.ts.map +0 -1
- package/dist/react/ui/components/checkbox.d.ts +0 -10
- package/dist/react/ui/components/checkbox.d.ts.map +0 -1
- package/dist/react/ui/components/icon.d.ts +0 -6
- package/dist/react/ui/components/icon.d.ts.map +0 -1
- package/dist/react/ui/components/image.d.ts +0 -6
- package/dist/react/ui/components/image.d.ts.map +0 -1
- package/dist/react/ui/components/indicator.d.ts +0 -45
- package/dist/react/ui/components/indicator.d.ts.map +0 -1
- package/dist/react/ui/components/input.d.ts +0 -10
- package/dist/react/ui/components/input.d.ts.map +0 -1
- package/dist/react/ui/components/loader.d.ts +0 -10
- package/dist/react/ui/components/loader.d.ts.map +0 -1
- package/dist/react/ui/components/segmented.d.ts +0 -6
- package/dist/react/ui/components/segmented.d.ts.map +0 -1
- package/dist/react/ui/components/select-parts.d.ts +0 -22
- package/dist/react/ui/components/select-parts.d.ts.map +0 -1
- package/dist/react/ui/components/select.d.ts +0 -6
- package/dist/react/ui/components/select.d.ts.map +0 -1
- package/dist/react/ui/components/skeleton.d.ts +0 -10
- package/dist/react/ui/components/skeleton.d.ts.map +0 -1
- package/dist/react/ui/components/switch.d.ts +0 -6
- package/dist/react/ui/components/switch.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip-group.d.ts +0 -34
- package/dist/react/ui/components/tooltip-group.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip-placement.d.ts +0 -43
- package/dist/react/ui/components/tooltip-placement.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip-slot.d.ts +0 -23
- package/dist/react/ui/components/tooltip-slot.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip.d.ts +0 -13
- package/dist/react/ui/components/tooltip.d.ts.map +0 -1
- package/dist/react/ui/index.d.ts +0 -19
- package/dist/react/ui/index.d.ts.map +0 -1
- package/dist/react/ui/provider.d.ts +0 -22
- package/dist/react/ui/provider.d.ts.map +0 -1
- package/dist/react/ui/types-controls.d.ts +0 -133
- package/dist/react/ui/types-controls.d.ts.map +0 -1
- package/dist/react/ui/types.d.ts +0 -213
- package/dist/react/ui/types.d.ts.map +0 -1
- package/dist/react/ui/utils.d.ts +0 -65
- package/dist/react/ui/utils.d.ts.map +0 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -2268
- package/dist/ui/index.js.map +0 -1
- package/docs/proposals/navigation.md +0 -210
- /package/dist/modules/ambient/{quantize.d.ts → analysis/quantize.d.ts} +0 -0
- /package/dist/modules/background/{components/overlay.d.ts → overlay.d.ts} +0 -0
- /package/dist/modules/background/{model/playback.d.ts → playback.d.ts} +0 -0
- /package/dist/modules/background/youtube/{lib/audio.d.ts → audio.d.ts} +0 -0
- /package/dist/modules/dock/{components → card}/compact.d.ts +0 -0
- /package/dist/modules/dock/{components → commands}/command-bar.d.ts +0 -0
- /package/dist/modules/dock/{components → routing}/breadcrumbs-card.d.ts +0 -0
- /package/dist/modules/dock/{model → routing}/paths.d.ts +0 -0
- /package/dist/modules/dock/{components → stack}/dock.d.ts +0 -0
- /package/dist/modules/dock/surface/{model → runtime}/url.d.ts +0 -0
- /package/dist/modules/modal/{lib/dom.d.ts → dom.d.ts} +0 -0
- /package/dist/modules/modal/{components/overlay.d.ts → overlay.d.ts} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { contextMenuModule } from './chunk-AWLK2I56.js';
|
|
2
|
+
import { controlsModule } from './chunk-C527JOJQ.js';
|
|
3
|
+
import { dockModule } from './chunk-XIFQMK2Z.js';
|
|
4
|
+
import { notificationModule } from './chunk-JA75E4BG.js';
|
|
5
|
+
import { loadingModule } from './chunk-YKHAFHB7.js';
|
|
6
|
+
import { modalModule } from './chunk-3FSDBJ7V.js';
|
|
7
|
+
import { navigationModule } from './chunk-DMQKXBWO.js';
|
|
8
|
+
import { ambientModule } from './chunk-EXB7VFD3.js';
|
|
9
|
+
import { backgroundModule } from './chunk-6P3F4JU3.js';
|
|
10
|
+
import { mediaModule } from './chunk-C3SEBNF5.js';
|
|
11
|
+
|
|
12
|
+
// src/modules/index.ts
|
|
13
|
+
var defaultModules = Object.freeze([backgroundModule, ambientModule, navigationModule, dockModule, controlsModule, contextMenuModule, loadingModule, mediaModule, modalModule, notificationModule]);
|
|
14
|
+
|
|
15
|
+
export { defaultModules };
|
|
16
|
+
//# sourceMappingURL=chunk-GA5SZ6E2.js.map
|
|
17
|
+
//# sourceMappingURL=chunk-GA5SZ6E2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/modules/index.ts"],"names":["defaultModules","Object","freeze","backgroundModule","ambientModule","navigationModule","dockModule","controlsModule","contextMenuModule","loadingModule","mediaModule","modalModule","notificationModule"],"mappings":";;;;;;;;;;;;AA4BO,IAAMA,cAAAA,GAAiBC,MAAAA,CAAOC,MAAAA,CAAO,CAC1CC,kBACAC,aAAAA,EACAC,gBAAAA,EACAC,UAAAA,EACAC,cAAAA,EACAC,iBAAAA,EACAC,aAAAA,EACAC,WAAAA,EACAC,WAAAA,EACAC,kBAAkB,CACV","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/modules/index.ts"],"names":["defaultModules","Object","freeze","backgroundModule","ambientModule","navigationModule","dockModule","controlsModule","contextMenuModule","loadingModule","mediaModule","modalModule","notificationModule"],"mappings":";;;;;;;;;;;;AA4BO,IAAMA,cAAAA,GAAiBC,MAAAA,CAAOC,MAAAA,CAAO,CAC1CC,kBACAC,aAAAA,EACAC,gBAAAA,EACAC,UAAAA,EACAC,cAAAA,EACAC,iBAAAA,EACAC,aAAAA,EACAC,WAAAA,EACAC,WAAAA,EACAC,kBAAkB,CACV","file":"chunk-GA5SZ6E2.js","sourcesContent":["import { ambientModule } from \"./ambient/module\";\nimport { backgroundModule } from \"./background/module\";\nimport { contextMenuModule } from \"./context-menu/module\";\nimport { controlsModule } from \"./controls/module\";\nimport { dockModule } from \"./dock/module\";\nimport { loadingModule } from \"./loading/module\";\nimport { mediaModule } from \"./media/module\";\nimport { modalModule } from \"./modal/module\";\nimport { navigationModule } from \"./navigation/module\";\nimport { notificationModule } from \"./notification/module\";\n\nexport {\n ambientModule,\n backgroundModule,\n contextMenuModule,\n controlsModule,\n dockModule,\n loadingModule,\n mediaModule,\n modalModule,\n navigationModule,\n notificationModule,\n};\n\n/**\n * Every built-in module, in the order they are mounted. Pass it to the core\n * provider to enable them all.\n */\nexport const defaultModules = Object.freeze([\n backgroundModule,\n ambientModule,\n navigationModule,\n dockModule,\n controlsModule,\n contextMenuModule,\n loadingModule,\n mediaModule,\n modalModule,\n notificationModule,\n] as const);\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { extendTailwindMerge } from 'tailwind-merge';
|
|
2
|
+
|
|
3
|
+
// src/foundation/recipes/recipe.ts
|
|
4
|
+
function appendClasses(value, out) {
|
|
5
|
+
if (!value) return out;
|
|
6
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
7
|
+
return out ? `${out} ${value}` : String(value);
|
|
8
|
+
}
|
|
9
|
+
if (typeof value !== "object") return out;
|
|
10
|
+
if (Array.isArray(value)) {
|
|
11
|
+
return value.reduce(
|
|
12
|
+
(next2, item) => appendClasses(item, next2),
|
|
13
|
+
out
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
const record = value;
|
|
17
|
+
let next = out;
|
|
18
|
+
for (const key of Object.keys(record)) {
|
|
19
|
+
if (record[key]) next = next ? `${next} ${key}` : key;
|
|
20
|
+
}
|
|
21
|
+
return next;
|
|
22
|
+
}
|
|
23
|
+
var joinClasses = (...inputs) => appendClasses(inputs, "");
|
|
24
|
+
|
|
25
|
+
// src/foundation/recipes/cn.ts
|
|
26
|
+
function createCn(vocabulary = {}) {
|
|
27
|
+
const merge = extendTailwindMerge({
|
|
28
|
+
extend: {
|
|
29
|
+
theme: vocabulary.theme ?? {},
|
|
30
|
+
classGroups: Object.fromEntries(
|
|
31
|
+
Object.entries(vocabulary.classGroups ?? {}).map(([group, names]) => [
|
|
32
|
+
group,
|
|
33
|
+
[...names]
|
|
34
|
+
])
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return (...inputs) => merge(joinClasses(...inputs));
|
|
39
|
+
}
|
|
40
|
+
var cn = createCn();
|
|
41
|
+
|
|
42
|
+
export { cn };
|
|
43
|
+
//# sourceMappingURL=chunk-GG2ILNK2.js.map
|
|
44
|
+
//# sourceMappingURL=chunk-GG2ILNK2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/foundation/recipes/recipe.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WAAA,IAAe,EAAE,CAAA,CAAE,GAAA,CAAI,CAAC,CAAC,KAAA,EAAO,KAAK,CAAA,KAAM;AAAA,UACnE,KAAA;AAAA,UACA,CAAC,GAAG,KAAK;AAAA,SACV;AAAA;AACH;AACF,GACD,CAAA;AACD,EAAA,OAAO,IAAI,MAAA,KAAW,KAAA,CAAM,WAAA,CAAY,GAAG,MAAM,CAAC,CAAA;AACpD;AAKO,IAAM,KAAK,QAAA","file":"chunk-GG2ILNK2.js","sourcesContent":["/**\n * A class value: strings and numbers, nested arrays, and objects whose keys\n * apply when their value is truthy (the `clsx` contract).\n */\nexport type Classes =\n | string\n | number\n | bigint\n | boolean\n | null\n | undefined\n | readonly Classes[]\n | Readonly<Record<string, unknown>>;\n\n/**\n * Variant names mapped to their values and the classes each applies.\n */\nexport type VariantMap = Readonly<\n Record<string, Readonly<Record<string, Classes>>>\n>;\n\ntype ValueOf<K> = K extends \"true\" | \"false\" ? boolean | K : K;\n\n/**\n * The props a recipe accepts to pick a value for each variant.\n */\nexport type SelectionOf<V> = {\n -readonly [K in keyof V]?: ValueOf<keyof V[K] & string> | null;\n};\n\ntype CompoundMatch<V> = {\n -readonly [K in keyof V]?:\n ValueOf<keyof V[K] & string> | readonly ValueOf<keyof V[K] & string>[];\n};\n\n/**\n * Classes applied only when several variant values match together.\n */\nexport type CompoundVariant<V> = CompoundMatch<V> & {\n readonly class?: Classes;\n readonly className?: Classes;\n};\n\n/**\n * The declarative description of a recipe: base classes, variants, compounds and defaults.\n */\nexport interface RecipeDef<V extends VariantMap = VariantMap> {\n readonly base?: Classes;\n readonly variants?: V;\n readonly compoundVariants?: readonly CompoundVariant<V>[];\n readonly defaultVariants?: SelectionOf<V>;\n}\n\n/**\n * A partial recipe definition that extends, or with `reset` replaces, a default one.\n */\nexport interface RecipeOverride<V extends VariantMap = VariantMap> {\n readonly reset?: boolean;\n readonly base?: Classes;\n readonly variants?: {\n readonly [K in keyof V]?: {\n readonly [Value in keyof V[K]]?: Classes;\n } & Readonly<Record<string, Classes>>;\n } & Readonly<Record<string, Readonly<Record<string, Classes>>>>;\n readonly compoundVariants?: readonly ({\n readonly class?: Classes;\n readonly className?: Classes;\n } & Readonly<Record<string, unknown>>)[];\n readonly defaultVariants?: Readonly<Record<string, unknown>>;\n}\n\nexport type VariantsOf<R> = R extends { readonly variants?: infer V }\n ? V extends VariantMap\n ? V\n : {}\n : {};\n\ntype Union<A, B> = {\n readonly [K in keyof A | keyof B]: (K extends keyof A ? A[K] : {}) &\n (K extends keyof B ? B[K] : {});\n};\n\nexport type MergedVariants<D, O> = O extends { readonly reset: true }\n ? VariantsOf<O>\n : Union<VariantsOf<D>, VariantsOf<O>>;\n\n/**\n * A compiled recipe: call it with variant props to get a class string.\n */\nexport interface Recipe<V = VariantMap> {\n (\n props?: SelectionOf<V> & {\n readonly class?: Classes;\n readonly className?: Classes;\n },\n ): string;\n readonly def: RecipeDef;\n}\n\n/**\n * The variant props accepted by a recipe type.\n */\nexport type RecipeProps<R> = R extends Recipe<infer V> ? SelectionOf<V> : never;\n\nconst key = (value: unknown): string | null =>\n // eslint-disable-next-line @typescript-eslint/no-base-to-string -- any value is accepted; objects become \"[object Object]\"\n value === null || value === undefined ? null : String(value);\n\nfunction matches(\n selected: Record<string, string | null>,\n compound: Record<string, unknown>,\n): boolean {\n for (const [name, wanted] of Object.entries(compound)) {\n if (name === \"class\" || name === \"className\") continue;\n const actual = selected[name] ?? null;\n if (Array.isArray(wanted)) {\n if (!wanted.some((one) => key(one) === actual)) return false;\n } else if (key(wanted) !== actual) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Resolves a recipe definition and props to the ordered class list before merging.\n */\nexport function resolveRecipe(\n def: RecipeDef,\n props: Record<string, unknown> = {},\n): Classes[] {\n const out: Classes[] = [def.base];\n const variants = def.variants ?? {};\n const defaults = (def.defaultVariants ?? {}) as Record<string, unknown>;\n const selected: Record<string, string | null> = {};\n\n for (const name of Object.keys(variants)) {\n const value = props[name] === undefined ? defaults[name] : props[name];\n const chosen = key(value);\n selected[name] = chosen;\n if (chosen !== null) out.push(variants[name][chosen]);\n }\n for (const compound of def.compoundVariants ?? []) {\n if (matches(selected, compound)) {\n out.push(compound.class, compound.className);\n }\n }\n out.push(props.class as Classes, props.className as Classes);\n return out;\n}\n\n/**\n * Combines a default recipe definition with an override.\n */\nexport function extendRecipe(\n base: RecipeDef,\n override: RecipeOverride | undefined,\n): RecipeDef {\n if (!override) return base;\n const { reset, ...rest } = override;\n if (reset) return rest as RecipeDef;\n\n const variants: Record<string, Record<string, Classes>> = {};\n for (const [name, values] of Object.entries(base.variants ?? {})) {\n variants[name] = { ...values };\n }\n for (const [name, values] of Object.entries(rest.variants ?? {})) {\n const target = (variants[name] ??= {});\n for (const [value, classes] of Object.entries(values)) {\n target[value] =\n target[value] === undefined ? classes : [target[value], classes];\n }\n }\n\n return {\n base: rest.base === undefined ? base.base : [base.base, rest.base],\n variants,\n compoundVariants: [\n ...(base.compoundVariants ?? []),\n ...((rest.compoundVariants ?? []) as RecipeDef[\"compoundVariants\"] &\n object),\n ],\n defaultVariants: {\n ...base.defaultVariants,\n ...(rest.defaultVariants as RecipeDef[\"defaultVariants\"]),\n },\n };\n}\n\n/**\n * Declares a recipe definition with its variant types inferred.\n */\nexport function defineRecipe<const V extends VariantMap = {}>(\n def: RecipeDef<V>,\n): RecipeDef<V> {\n return def;\n}\n\n/**\n * Turns a recipe definition into a callable recipe using the given class merger.\n */\nexport function compileRecipe<V>(\n def: RecipeDef,\n merge: (...inputs: Classes[]) => string,\n): Recipe<V> {\n const recipe = ((props?: Record<string, unknown>) =>\n merge(...resolveRecipe(def, props))) as Recipe<V>;\n Object.defineProperty(recipe, \"def\", { value: def, enumerable: true });\n return recipe;\n}\n\nfunction appendClasses(value: Classes, out: string): string {\n if (!value) return out;\n if (typeof value === \"string\" || typeof value === \"number\") {\n return out ? `${out} ${value}` : String(value);\n }\n if (typeof value !== \"object\") return out;\n if (Array.isArray(value)) {\n return (value as readonly Classes[]).reduce<string>(\n (next, item) => appendClasses(item, next),\n out,\n );\n }\n const record = value as Readonly<Record<string, unknown>>;\n let next = out;\n for (const key of Object.keys(record)) {\n if (record[key]) next = next ? `${next} ${key}` : key;\n }\n return next;\n}\n\n/**\n * Joins class values without Tailwind conflict resolution.\n */\nexport const joinClasses = (...inputs: Classes[]): string =>\n appendClasses(inputs, \"\");\n","import { extendTailwindMerge } from \"tailwind-merge\";\n\nimport { type Classes, joinClasses } from \"./recipe\";\n\n/**\n * Extra Tailwind theme values and class groups that `cn` should merge correctly.\n */\nexport interface MergeVocabulary {\n readonly theme?: Readonly<Record<string, readonly string[]>>;\n readonly classGroups?: Readonly<Record<string, readonly string[]>>;\n}\n\n/**\n * Creates a class-name joiner that also resolves Tailwind conflicts using the given vocabulary.\n */\nexport function createCn(\n vocabulary: MergeVocabulary = {},\n): (...inputs: Classes[]) => string {\n const merge = extendTailwindMerge({\n extend: {\n theme: vocabulary.theme ?? {},\n classGroups: Object.fromEntries(\n Object.entries(vocabulary.classGroups ?? {}).map(([group, names]) => [\n group,\n [...names],\n ]),\n ),\n },\n });\n return (...inputs) => merge(joinClasses(...inputs));\n}\n\n/**\n * Joins class values and resolves Tailwind conflicts (default vocabulary).\n */\nexport const cn = createCn();\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useIsClient } from './chunk-T53WFIZN.js';
|
|
2
|
+
import { cn } from './chunk-GG2ILNK2.js';
|
|
3
|
+
import { defineModule } from './chunk-ED32WLAD.js';
|
|
4
|
+
import { useRequiredContext, useStore, useGlobalEvent } from './chunk-JWUKAZ3A.js';
|
|
5
|
+
import { defineThemeSpec, useTheme, useModuleMotion } from './chunk-AKPH5CEJ.js';
|
|
6
|
+
import { USER_MESSAGES, createStore, toUserMessage, EVENT_TYPES, UserError, report } from './chunk-S67HGKJ2.js';
|
|
6
7
|
import { getOrCreateGlobalContext } from './chunk-J3VTDBC6.js';
|
|
7
|
-
import { isObject } from './chunk-
|
|
8
|
+
import { isObject } from './chunk-YHWA7FXX.js';
|
|
8
9
|
import { c } from 'react/compiler-runtime';
|
|
9
|
-
import { useState, useRef, useEffect, use
|
|
10
|
+
import { useState, useRef, useEffect, use } from 'react';
|
|
10
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
12
|
import { AnimatePresence, motion } from 'motion/react';
|
|
12
13
|
import { createPortal } from 'react-dom';
|
|
@@ -32,6 +33,9 @@ var INERT_NOTIFICATION_ACTIONS = Object.freeze({
|
|
|
32
33
|
});
|
|
33
34
|
|
|
34
35
|
// src/foundation/result/index.ts
|
|
36
|
+
var VALIDATION_ERROR_CODE = "VALIDATION_ERROR";
|
|
37
|
+
var INVALID_INPUT_MESSAGE = "Invalid input";
|
|
38
|
+
var VALIDATION_FAILED_MESSAGE = "Validation failed";
|
|
35
39
|
function ok(data, code) {
|
|
36
40
|
return { data, success: true, ...code ? { code } : {} };
|
|
37
41
|
}
|
|
@@ -39,7 +43,10 @@ function err(error, code) {
|
|
|
39
43
|
return { error, success: false, ...code ? { code } : {} };
|
|
40
44
|
}
|
|
41
45
|
function isResult(value) {
|
|
42
|
-
|
|
46
|
+
if (typeof value !== "object" || value === null || !("success" in value)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return value.success === true ? "data" in value : value.success === false && "error" in value;
|
|
43
50
|
}
|
|
44
51
|
function isOk(result) {
|
|
45
52
|
return result.success === true;
|
|
@@ -48,15 +55,9 @@ function isErr(result) {
|
|
|
48
55
|
return result.success === false;
|
|
49
56
|
}
|
|
50
57
|
function unwrap(result) {
|
|
51
|
-
if (result.success)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (result.error instanceof Error) {
|
|
55
|
-
throw result.error;
|
|
56
|
-
}
|
|
57
|
-
throw new Error(
|
|
58
|
-
typeof result.error === "string" ? result.error : String(result.error)
|
|
59
|
-
);
|
|
58
|
+
if (result.success) return result.data;
|
|
59
|
+
if (result.error instanceof Error) throw result.error;
|
|
60
|
+
throw new Error(String(result.error));
|
|
60
61
|
}
|
|
61
62
|
function unwrapOr(result, fallback) {
|
|
62
63
|
return result.success ? result.data : fallback;
|
|
@@ -82,9 +83,6 @@ async function tryCatch(promiseOrFn, mapError) {
|
|
|
82
83
|
return err(mapCaught(error, mapError));
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
|
-
var VALIDATION_ERROR_CODE = "VALIDATION_ERROR";
|
|
86
|
-
var INVALID_INPUT_MESSAGE = "Invalid input";
|
|
87
|
-
var VALIDATION_FAILED_MESSAGE = "Validation failed";
|
|
88
86
|
function createSafeAction(handler, options = {}) {
|
|
89
87
|
const { errorCode, mapError, schema, validate } = options;
|
|
90
88
|
const validationError = (message) => err(
|
|
@@ -549,8 +547,6 @@ function useToast(defaultDuration) {
|
|
|
549
547
|
}
|
|
550
548
|
return t4;
|
|
551
549
|
}
|
|
552
|
-
var emptySubscribe = () => () => {
|
|
553
|
-
};
|
|
554
550
|
function NotificationListener() {
|
|
555
551
|
const $ = c(4);
|
|
556
552
|
const {
|
|
@@ -596,7 +592,7 @@ function useNotificationContainerModel() {
|
|
|
596
592
|
const {
|
|
597
593
|
dismissNotification
|
|
598
594
|
} = useNotificationActions();
|
|
599
|
-
const isHydrated =
|
|
595
|
+
const isHydrated = useIsClient();
|
|
600
596
|
let t0;
|
|
601
597
|
if ($[0] !== notifications) {
|
|
602
598
|
t0 = getActiveNotification(notifications);
|
|
@@ -625,12 +621,6 @@ function useNotificationContainerModel() {
|
|
|
625
621
|
}
|
|
626
622
|
return t1;
|
|
627
623
|
}
|
|
628
|
-
function _temp32() {
|
|
629
|
-
return false;
|
|
630
|
-
}
|
|
631
|
-
function _temp22() {
|
|
632
|
-
return true;
|
|
633
|
-
}
|
|
634
624
|
|
|
635
625
|
// src/modules/notification/motion.ts
|
|
636
626
|
var NOTIFICATION_COMPOSITOR_STYLE = Object.freeze({
|
|
@@ -846,5 +836,5 @@ var notificationModule = defineModule({
|
|
|
846
836
|
});
|
|
847
837
|
|
|
848
838
|
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 };
|
|
849
|
-
//# sourceMappingURL=chunk-
|
|
850
|
-
//# sourceMappingURL=chunk-
|
|
839
|
+
//# sourceMappingURL=chunk-JA75E4BG.js.map
|
|
840
|
+
//# sourceMappingURL=chunk-JA75E4BG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/modules/notification/constants.ts","../src/foundation/result/index.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":["TOAST_DURATIONS","Object","freeze","DEFAULT","SHORT","MESSAGE_ID_LENGTH","SESSION_EXPIRED_MESSAGE","USER_MESSAGES","unauthorized","DOCK_STACK_ELEMENT_ID","notificationTheme","defineThemeSpec","INITIAL_NOTIFICATION_STATE","notifications","INERT_NOTIFICATION_ACTIONS","dismissAllNotifications","dismissNotification","showNotification","normalizeFeedbackText","value","trim","replace","getActiveNotification","active","entry","values","timestamp","normalizeToastOptions","options","duration","normalizeDuration","undefined","Number","isFinite","withDefaultDuration","normalized","isNotificationDataObject","isObject","resolveMessage","message","arg","getOutcomeMessage","messages","isResult","success","data","error","toUserMessage","isEmptyMessage","deriveNotificationId","fallbackId","slice","Date","now","createNotificationEntry","messageOrData","normalizedOptions","payload","normalizedMessage","id","dedupeKey","NotificationContext","getOrCreateGlobalContext","NOOP_NOTIFICATION_STORE","createStore","notificationIdCounter","nextNotificationId","NotificationProvider","t0","$","_c","children","store","useState","_temp","t1","Symbol","for","Map","timersRef","useRef","t2","current","forEach","clearTimeout","clear","clearTimers","t3","t4","useEffect","t5","get","delete","publish","prev","hasOwn","t6","_temp2","t7","result","id_0","set","setTimeout","t8","actions","t9","t10","prev_0","keys","length","freezeSnapshots","toastPromiseIdCounter","nextToastPromiseId","useNotificationActions","useRequiredContext","useNotificationState","useStore","useNotification","state","useOptionalNotificationState","selector","isEqual","ctx","use","useOptionalNotificationActions","useNotificationVisible","runToastPromise","dismiss","triggerToast","promiseOrFn","sharedOptions","loading","resolved","useToastPromise","useToast","defaultDuration","resolvedDefaultDuration","options_0","message_0","fromResult","promise","message_1","options_1","assign","dismissAll","NotificationListener","notify","showRequested","data_0","source","useGlobalEvent","EVENT_TYPES","API_UNAUTHORIZED","APP_ERROR","STATE_CHANGE","useNotificationContainerModel","isHydrated","useIsClient","activeEntry","theme","useTheme","NOTIFICATION_COMPOSITOR_STYLE","WebkitBackfaceVisibility","WebkitFontSmoothing","backfaceVisibility","transform","willChange","useNotificationMotion","useModuleMotion","Toast","className","messageClassName","onDismiss","polite","style","toastMotion","event","stopPropagation","event_0","key","preventDefault","jsx","toast","transition","NotificationContainer","renderToast","slots","toastDocked","toastMessage","styles","bb0","dockElement","document","getElementById","createPortal","cn","layer","body","NotificationLayer","selectToastDuration","config","notification","useNotificationPage","page","notificationModule","defineModule","context","Provider","Overlay","select"],"mappings":";;;;;;;;;;;;;;;AAaO,IAAMA,eAAAA,GAAkBC,OAAOC,MAAAA,CAAO;EAC3CC,OAAAA,EAAS,GAAA;EACTC,KAAAA,EAAO;AACT,CAAU;AAGH,IAAMC,iBAAAA,GAAoB,EAAA;AAK1B,IAAMC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,GAAAD,EAAAA;EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAAA,GAAAC,EAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,IAAAM,EAAAA;AAAA,EAAA,IAAAN,EAAA,CAAA,CAAA,KAAAD,MAAAC,CAAAA,CAAA,CAAA,MAAAiH,KAAAA,EAAA;AADpE3G,IAAAA,EAAAA,GAAA;MAAA0B,GAAAA,EACAjC,EAAAA;AAAoEkH,MAAAA;AAE3E,KAAA;AAACjH,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAD,EAAAA;AAAAC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAiH,KAAAA;AAAAjH,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAM,EAAAA;EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAAA,GAAAN,EAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,OAHMM,EAAAA;AAGN;AAQE,IAAMiI,qBAAqBC,YAAAA,CAAa;EAC7ClJ,EAAAA,EAAI,cAAA;EACJmJ,OAAAA,EAASjJ,mBAAAA;EACTkJ,QAAAA,EAAU5I,oBAAAA;EACV6I,OAAAA,EAASV,iBAAAA;EACTK,IAAAA,EAAM;IACJM,MAAAA,EAAQV,mBAAAA;IACR5E,GAAAA,EAAK+E;AACP;AACF,CAAC","file":"chunk-JA75E4BG.js","sourcesContent":["import { USER_MESSAGES } from \"@/foundation/utils\";\nimport { defineThemeSpec } from \"@/react/theme\";\n\nimport {\n type NotificationActions,\n type NotificationMotion,\n type NotificationState,\n type NotificationThemeSlot,\n} from \"./types\";\n\n/**\n * Default toast durations in milliseconds.\n */\nexport const TOAST_DURATIONS = Object.freeze({\n DEFAULT: 2000,\n SHORT: 1500,\n} as const);\n\n/** Longest text message that still serves as its own notification id. */\nexport const MESSAGE_ID_LENGTH = 64;\n\n/**\n * Message shown when the API reports an unauthorized session.\n */\nexport const SESSION_EXPIRED_MESSAGE = USER_MESSAGES.unauthorized;\n\n/**\n * DOM id of the dock card stack that toasts dock into.\n */\nexport const DOCK_STACK_ELEMENT_ID = \"dock-card-stack\";\n\n/**\n * Theme spec for the notification layer.\n */\nexport const notificationTheme = defineThemeSpec<\n NotificationThemeSlot,\n NotificationMotion\n>(\"notification\");\n\n/**\n * Notification state with nothing shown.\n */\nexport const INITIAL_NOTIFICATION_STATE: NotificationState = Object.freeze({\n notifications: {},\n});\n\n/**\n * Notification actions that do nothing; used outside a NotificationProvider.\n */\nexport const INERT_NOTIFICATION_ACTIONS: NotificationActions = Object.freeze({\n dismissAllNotifications: () => {},\n dismissNotification: () => {},\n showNotification: () => null,\n});\n","import { report } from \"@/foundation/utils/report\";\nimport { toUserMessage, UserError } from \"@/foundation/utils/user-message\";\n\n/**\n * The success branch of a `Result`.\n */\nexport interface SuccessResult<T> {\n readonly code?: string;\n readonly data: T;\n readonly error?: never;\n readonly success: true;\n}\n\n/**\n * The failure branch of a `Result`.\n */\nexport interface ErrorResult<E = string> {\n readonly code?: string;\n readonly data?: never;\n readonly error: E;\n readonly success: false;\n}\n\n/**\n * A value that is either a success with data or a failure with an error.\n */\nexport type Result<T, E = string> = SuccessResult<T> | ErrorResult<E>;\n\nconst VALIDATION_ERROR_CODE = \"VALIDATION_ERROR\";\nconst INVALID_INPUT_MESSAGE = \"Invalid input\";\nconst VALIDATION_FAILED_MESSAGE = \"Validation failed\";\n\n/**\n * Creates a success result.\n */\nexport function ok<T>(data: T, code?: string): SuccessResult<T> {\n return { data, success: true, ...(code ? { code } : {}) };\n}\n\n/**\n * Creates a failure result.\n */\nexport function err<E = string>(error: E, code?: string): ErrorResult<E> {\n return { error, success: false, ...(code ? { code } : {}) };\n}\n\n/**\n * True when a value has the shape of a `Result`.\n */\nexport function isResult(value: unknown): value is Result<unknown, unknown> {\n if (typeof value !== \"object\" || value === null || !(\"success\" in value)) {\n return false;\n }\n return value.success === true\n ? \"data\" in value\n : value.success === false && \"error\" in value;\n}\n\n/**\n * Narrows a result to its success branch.\n */\nexport function isOk<T, E = string>(\n result: Result<T, E>,\n): result is SuccessResult<T> {\n return result.success === true;\n}\n\n/**\n * Narrows a result to its failure branch.\n */\nexport function isErr<T, E = string>(\n result: Result<T, E>,\n): result is ErrorResult<E> {\n return result.success === false;\n}\n\n/**\n * Returns the data of a success, or throws the error of a failure.\n */\nexport function unwrap<T, E = string>(result: Result<T, E>): T {\n if (result.success) return result.data;\n if (result.error instanceof Error) throw result.error;\n throw new Error(String(result.error));\n}\n\n/**\n * Returns the data of a success, or the fallback for a failure.\n */\nexport function unwrapOr<T, E = string>(result: Result<T, E>, fallback: T): T {\n return result.success ? result.data : fallback;\n}\n\n/**\n * Transforms the data of a success and leaves a failure untouched.\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\n/**\n * Transforms the error of a failure and leaves a success untouched.\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\n/**\n * Runs the branch that matches the result and returns its value.\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 // Without mapError the user message stands in for E, by contract.\n return mapError ? mapError(error) : (toUserMessage(error) as unknown as E);\n}\n\n/**\n * Awaits a promise (or function) and returns a result instead of throwing.\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?: { message?: string }[];\n message?: string;\n };\n success: false;\n };\n}\n\n/**\n * Options for `createSafeAction`: schema, validation and error mapping.\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\n/**\n * Wraps a handler so validation failures and thrown errors become results.\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 const validationError = (message: string): ErrorResult<E> =>\n err(\n // Without mapError the message stands in for E, by contract.\n mapError ? mapError(message) : (message as unknown as E),\n errorCode ?? VALIDATION_ERROR_CODE,\n );\n\n const rejectionOf = (\n outcome: ReturnType<NonNullable<typeof validate>>,\n ): ErrorResult<E> | null => {\n if (isResult(outcome)) return isErr(outcome) ? outcome : null;\n if (outcome === false) return validationError(VALIDATION_FAILED_MESSAGE);\n if (typeof outcome === \"string\" && outcome.length > 0) {\n return validationError(outcome);\n }\n return null;\n };\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 return validationError(\n parsed.error?.issues?.[0]?.message ||\n parsed.error?.message ||\n INVALID_INPUT_MESSAGE,\n );\n }\n effectiveArgs = [parsed.data, ...args.slice(1)] as TArgs;\n }\n\n const rejection = validate\n ? rejectionOf(validate(...effectiveArgs))\n : null;\n if (rejection) return rejection;\n\n const output = await handler(...effectiveArgs);\n if (isResult(output)) return output;\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\";\n\nimport { isResult } from \"@/foundation/result\";\nimport { isObject, toUserMessage } from \"@/foundation/utils\";\n\nimport { MESSAGE_ID_LENGTH, TOAST_DURATIONS } from \"./constants\";\nimport {\n type NotificationData,\n type NotificationEntry,\n type NotificationOptions,\n type ToastOptionsInput,\n type ToastPromiseMessages,\n} from \"./types\";\n\n/**\n * Trims a text message and removes trailing periods and spaces; other values\n * pass through.\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\n/**\n * The most recent notification, or null.\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\n/**\n * Turns a duration or options into an options object.\n */\nexport function normalizeToastOptions(\n options?: ToastOptionsInput,\n): NotificationOptions {\n return typeof options === \"number\" ? { duration: options } : options || {};\n}\n\n/**\n * Validates a toast duration in milliseconds. Undefined means the default;\n * null, zero, negative or invalid values mean never dismiss.\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\n/**\n * Normalizes toast options, using a default duration when none is set.\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\n/**\n * Whether a value is a notification data object rather than a plain message.\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\n/**\n * Picks the success or error message for a settled value, falling back to a\n * message derived from the error.\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\nconst isEmptyMessage = (message: ReactNode) =>\n message === null || message === undefined || message === \"\";\n\n/** Text messages identify themselves, so repeating one replaces it. */\nfunction deriveNotificationId(message: ReactNode, fallbackId?: string): string {\n if (typeof message === \"string\") return message.slice(0, MESSAGE_ID_LENGTH);\n return fallbackId || `notification-${Date.now()}`;\n}\n\n/**\n * Builds a notification entry and its auto-dismiss duration from a message or\n * data object. Returns null when the message is empty.\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 (isEmptyMessage(normalizedMessage)) return null;\n\n const id =\n payload.dedupeKey ||\n payload.id ||\n deriveNotificationId(normalizedMessage, fallbackId);\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 type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\n\nimport { getOrCreateGlobalContext } from \"@/core/kernel\";\nimport { createStore } from \"@/foundation/utils\";\n\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\n/**\n * React context holding the notification store and actions.\n */\nexport const NotificationContext =\n getOrCreateGlobalContext<NotificationContextValue | null>(\n \"NotificationContext\",\n null,\n );\n\n/**\n * Store with an empty state; used outside a NotificationProvider.\n */\nexport const NOOP_NOTIFICATION_STORE = createStore<NotificationState>(\n INITIAL_NOTIFICATION_STATE,\n);\n\nlet notificationIdCounter = 0;\n// A function, not `++notificationIdCounter` inline: the compiler cannot lower an\n// update of a module variable inside a hook.\nfunction nextNotificationId() {\n notificationIdCounter += 1;\n return notificationIdCounter;\n}\n\n/**\n * Provides notification state and actions. Showing a notification replaces the\n * current one and dismisses it after its duration.\n */\nexport function NotificationProvider({ children }: 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 // stable identity: part of the notification actions consumers hold by reference\n const clearTimers = useCallback(() => {\n timersRef.current.forEach(clearTimeout);\n timersRef.current.clear();\n }, []);\n\n useEffect(() => clearTimers, [clearTimers]);\n\n // stable identity: part of the notification actions consumers hold by reference\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 // stable identity: part of the notification actions consumers hold by reference\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 // stable identity: part of the notification actions consumers hold by reference\n const showNotification = useCallback(\n (\n messageOrData: ReactNode | NotificationData,\n options?: ToastOptionsInput,\n ): string | null => {\n const fallbackId = `notification-${nextNotificationId()}`;\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 // stable identity: part of the public hook contract (useNotificationActions)\n const actions = useMemo<NotificationActions>(\n () => ({\n dismissAllNotifications,\n dismissNotification,\n showNotification,\n }),\n [dismissAllNotifications, dismissNotification, showNotification],\n );\n\n // stable identity: consumers subscribe by reference\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 { type ReactNode, use, useCallback, useMemo } from \"react\";\n\nimport { EVENT_TYPES } from \"@/foundation/events\";\nimport { toUserMessage } from \"@/foundation/utils\";\nimport { useGlobalEvent, useRequiredContext, useStore } from \"@/react/hooks\";\nimport { useIsClient } from \"@/react/hooks/use-client-value\";\nimport { useTheme } from \"@/react/theme\";\n\nimport {\n INERT_NOTIFICATION_ACTIONS,\n notificationTheme,\n SESSION_EXPIRED_MESSAGE,\n TOAST_DURATIONS,\n} from \"./constants\";\nimport { NOOP_NOTIFICATION_STORE, NotificationContext } 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// A function, not `++toastPromiseIdCounter` inline: the compiler cannot lower an\n// update of a module variable inside a hook.\nfunction nextToastPromiseId() {\n toastPromiseIdCounter += 1;\n return toastPromiseIdCounter;\n}\n\n/**\n * Returns the notification actions without subscribing to state changes.\n */\nexport function useNotificationActions(): NotificationActions {\n return useRequiredContext(\n NotificationContext,\n \"useNotificationActions\",\n \"NotificationProvider\",\n ).actions;\n}\n\n/**\n * Subscribes to the notification state.\n */\nexport function useNotificationState(): NotificationState {\n const { store } = useRequiredContext(\n NotificationContext,\n \"useNotificationState\",\n \"NotificationProvider\",\n );\n return useStore(store);\n}\n\n/**\n * Returns the notification state together with its actions.\n */\nexport function useNotification(): NotificationState & NotificationActions {\n const actions = useNotificationActions();\n const state = useNotificationState();\n // stable identity: part of the public hook contract\n return useMemo(() => ({ ...actions, ...state }), [actions, state]);\n}\n\n/**\n * Like useNotificationState, but returns an empty state outside a\n * NotificationProvider. Accepts a selector.\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 = use(NotificationContext);\n return useStore(\n ctx?.store ?? NOOP_NOTIFICATION_STORE,\n selector as (state: NotificationState) => T,\n isEqual,\n );\n}\n\n/**\n * Like useNotificationActions, but returns inert actions outside a\n * NotificationProvider.\n */\nexport function useOptionalNotificationActions(): NotificationActions {\n const ctx = use(NotificationContext);\n return ctx?.actions ?? INERT_NOTIFICATION_ACTIONS;\n}\n\n/**\n * Whether any notification is currently shown.\n */\nexport function useNotificationVisible(): boolean {\n return useOptionalNotificationState(\n ({ notifications }) => Object.keys(notifications).length > 0,\n );\n}\n\ninterface ToastPromiseDeps {\n dismiss: (id?: string) => void;\n showNotification: NotificationActions[\"showNotification\"];\n triggerToast: (\n message: ReactNode,\n options?: ToastOptionsInput,\n ) => string | null;\n}\n\n/**\n * The body of `toast.promise`. Module level: the compiler cannot lower\n * optional chaining inside a try block in a hook.\n */\nasync function runToastPromise<T = unknown, E = unknown>(\n { dismiss, showNotification, triggerToast }: ToastPromiseDeps,\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-${nextToastPromiseId()}`;\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\n/**\n * Builds `toast.promise`: shows a loading toast, then replaces it with the\n * outcome message once the promise settles.\n */\nfunction useToastPromise({\n dismiss,\n showNotification,\n triggerToast,\n}: ToastPromiseDeps): ToastController[\"promise\"] {\n // stable identity: part of the public hook contract\n return useCallback(\n <T = unknown, E = unknown>(\n promiseOrFn: Promise<T> | (() => Promise<T>),\n messages: ToastPromiseMessages<T, E> = {},\n options?: ToastOptionsInput,\n ): Promise<T> =>\n runToastPromise<T, E>(\n { dismiss, showNotification, triggerToast },\n promiseOrFn,\n messages,\n options,\n ),\n [dismiss, showNotification, triggerToast],\n );\n}\n\n/**\n * Returns the toast API. `defaultDuration` sets how long toasts last unless a\n * call overrides it.\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 // stable identity: part of the public hook contract\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 // stable identity: part of the public hook contract\n const dismiss = useCallback(\n (id?: string) => {\n if (id) dismissNotification(id);\n else dismissAllNotifications();\n },\n [dismissAllNotifications, dismissNotification],\n );\n\n // stable identity: part of the public hook contract\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 = useToastPromise({ dismiss, showNotification, triggerToast });\n\n // stable identity: part of the public hook contract\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\ninterface NotifyRequest {\n message?: string;\n notify?: boolean;\n}\n\n/**\n * Shows notifications for framework events: unauthorized responses and errors\n * or state changes that ask to notify.\n */\nexport function NotificationListener(): null {\n const { showNotification } = useNotificationActions();\n const showRequested = (data?: NotifyRequest) => {\n if (!data?.notify || !data.message) return;\n showNotification(data.message);\n };\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(EVENT_TYPES.APP_ERROR, showRequested);\n useGlobalEvent(EVENT_TYPES.STATE_CHANGE, showRequested);\n\n return null;\n}\n\n/**\n * Active notification, hydration flag and theme for the notification container.\n */\nexport function useNotificationContainerModel() {\n const { notifications } = useNotificationState();\n const { dismissNotification } = useNotificationActions();\n const isHydrated = useIsClient();\n // Returns an entry of `notifications`, so its identity is already stable.\n const activeEntry = getActiveNotification(notifications);\n\n const theme = useTheme(notificationTheme);\n\n return { dismissNotification, isHydrated, activeEntry, theme };\n}\n","import { useModuleMotion } from \"@/react/theme\";\n\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 { AnimatePresence, motion } from \"motion/react\";\nimport { type CSSProperties, type KeyboardEvent, type MouseEvent } from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport { cn } from \"@/foundation/recipes/cn\";\n\nimport { DOCK_STACK_ELEMENT_ID } from \"./constants\";\nimport { NotificationListener, useNotificationContainerModel } from \"./hooks\";\nimport { NOTIFICATION_COMPOSITOR_STYLE, useNotificationMotion } from \"./motion\";\nimport { type NotificationEntry } from \"./types\";\n\ninterface ToastProps {\n className: string;\n entry: NotificationEntry;\n messageClassName: string;\n onDismiss: () => void;\n polite?: boolean;\n style?: CSSProperties;\n}\n\nfunction Toast({\n className,\n entry,\n messageClassName,\n onDismiss,\n polite,\n style,\n}: ToastProps) {\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\nfunction 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 renderToast = (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 renderToast(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 {renderToast(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\";\n\nimport {\n defineModule,\n type PageConfig,\n type PageModuleApi,\n} from \"@/core/kernel\";\n\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 // stable identity: part of the public hook contract\n return useMemo(\n () => ({\n set: (notification: NotificationPageConfig) => page.set({ notification }),\n toast,\n }),\n [page, toast],\n );\n}\n\n/**\n * Module definition that shows toast notifications.\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"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { globalEvents, isBrowser } from './chunk-
|
|
1
|
+
import { globalEvents, isBrowser } from './chunk-S67HGKJ2.js';
|
|
2
2
|
import { use, useRef, useSyncExternalStore, useEffectEvent, useEffect, useState, useLayoutEffect } from 'react';
|
|
3
3
|
import { c } from 'react/compiler-runtime';
|
|
4
4
|
|
|
@@ -192,62 +192,40 @@ function useGlobalEvent(event, callback, options) {
|
|
|
192
192
|
function _temp(unsub) {
|
|
193
193
|
return unsub();
|
|
194
194
|
}
|
|
195
|
-
var
|
|
196
|
-
var activeFullscreenStateIds = /* @__PURE__ */ new Set();
|
|
197
|
-
var ACTIVE_FULLSCREEN_ROOT_SELECTOR = '[data-fullscreen-state-root="true"][data-affect-global-state="true"]';
|
|
195
|
+
var ACTIVE_ROOT_SELECTOR = '[data-fullscreen-state-root="true"][data-affect-global-state="true"]';
|
|
198
196
|
var OBSERVED_ATTRIBUTES = ["data-fullscreen-state", "data-fullscreen-state-root", "data-affect-global-state"];
|
|
199
|
-
var
|
|
197
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
198
|
+
var observer = null;
|
|
200
199
|
var lastSnapshot = false;
|
|
201
|
-
function
|
|
202
|
-
if (typeof document === "undefined")
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
domObserver = new MutationObserver(() => {
|
|
223
|
-
emitIfSnapshotChanged();
|
|
224
|
-
});
|
|
225
|
-
domObserver.observe(document.documentElement, {
|
|
226
|
-
attributes: true,
|
|
227
|
-
childList: true,
|
|
228
|
-
subtree: true,
|
|
229
|
-
attributeFilter: OBSERVED_ATTRIBUTES
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
function releaseDomObserver() {
|
|
233
|
-
if (listeners.size > 0 || !domObserver) {
|
|
234
|
-
return;
|
|
200
|
+
function getSnapshot() {
|
|
201
|
+
if (typeof document === "undefined") return false;
|
|
202
|
+
return document.querySelector(ACTIVE_ROOT_SELECTOR) !== null;
|
|
203
|
+
}
|
|
204
|
+
function emitIfChanged() {
|
|
205
|
+
const next = getSnapshot();
|
|
206
|
+
if (next === lastSnapshot) return;
|
|
207
|
+
lastSnapshot = next;
|
|
208
|
+
listeners.forEach((listener) => listener());
|
|
209
|
+
}
|
|
210
|
+
function subscribe(listener) {
|
|
211
|
+
listeners.add(listener);
|
|
212
|
+
if (!observer && typeof document !== "undefined") {
|
|
213
|
+
observer = new MutationObserver(emitIfChanged);
|
|
214
|
+
observer.observe(document.documentElement, {
|
|
215
|
+
attributeFilter: OBSERVED_ATTRIBUTES,
|
|
216
|
+
attributes: true,
|
|
217
|
+
childList: true,
|
|
218
|
+
subtree: true
|
|
219
|
+
});
|
|
235
220
|
}
|
|
236
|
-
|
|
237
|
-
domObserver = null;
|
|
238
|
-
}
|
|
239
|
-
function subscribe(listener2) {
|
|
240
|
-
listeners.add(listener2);
|
|
241
|
-
ensureDomObserver();
|
|
242
|
-
emitIfSnapshotChanged();
|
|
221
|
+
emitIfChanged();
|
|
243
222
|
return () => {
|
|
244
|
-
listeners.delete(
|
|
245
|
-
|
|
223
|
+
listeners.delete(listener);
|
|
224
|
+
if (listeners.size > 0 || !observer) return;
|
|
225
|
+
observer.disconnect();
|
|
226
|
+
observer = null;
|
|
246
227
|
};
|
|
247
228
|
}
|
|
248
|
-
function getSnapshot() {
|
|
249
|
-
return getDomSnapshot();
|
|
250
|
-
}
|
|
251
229
|
function useIsFullscreenStateActive() {
|
|
252
230
|
return useSyncExternalStore(subscribe, getSnapshot, _temp2);
|
|
253
231
|
}
|
|
@@ -307,15 +285,6 @@ function useControllableState(t0) {
|
|
|
307
285
|
}
|
|
308
286
|
return t3;
|
|
309
287
|
}
|
|
310
|
-
function isEditableElement(target) {
|
|
311
|
-
if (!target || typeof target.tagName !== "string") {
|
|
312
|
-
return false;
|
|
313
|
-
}
|
|
314
|
-
const element = target;
|
|
315
|
-
const tagName = element.tagName.toLowerCase();
|
|
316
|
-
if (EDITABLE_TAGS.has(tagName)) return true;
|
|
317
|
-
return Boolean(element.isContentEditable);
|
|
318
|
-
}
|
|
319
288
|
var EDITABLE_TAGS = /* @__PURE__ */ new Set(["input", "textarea", "select"]);
|
|
320
289
|
var COMBO_SEPARATOR = "+";
|
|
321
290
|
var MOD_ALIASES = ["mod", "cmd", "meta"];
|
|
@@ -325,6 +294,15 @@ var SHIFT_ALIAS = "shift";
|
|
|
325
294
|
var ESCAPE_ALIASES = ["esc", "escape"];
|
|
326
295
|
var SPACE_KEY_NAMES = [" ", "spacebar"];
|
|
327
296
|
var SPACE_ALIAS = "space";
|
|
297
|
+
function isEditableElement(target) {
|
|
298
|
+
if (!target || typeof target.tagName !== "string") {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
const element = target;
|
|
302
|
+
const tagName = element.tagName.toLowerCase();
|
|
303
|
+
if (EDITABLE_TAGS.has(tagName)) return true;
|
|
304
|
+
return Boolean(element.isContentEditable);
|
|
305
|
+
}
|
|
328
306
|
function parseCombo(combo) {
|
|
329
307
|
const parts = combo.toLowerCase().split(COMBO_SEPARATOR).map((p) => p.trim()).filter(Boolean);
|
|
330
308
|
if (parts.length === 0) return null;
|
|
@@ -446,7 +424,7 @@ function useEscapeKey(callback, t0) {
|
|
|
446
424
|
var SCROLL_LOCK = "data-scroll-lock";
|
|
447
425
|
var holds = 0;
|
|
448
426
|
var startY = 0;
|
|
449
|
-
var
|
|
427
|
+
var BLOCKING = {
|
|
450
428
|
capture: true,
|
|
451
429
|
passive: false
|
|
452
430
|
};
|
|
@@ -492,22 +470,22 @@ function onTouchMove(event) {
|
|
|
492
470
|
function hold() {
|
|
493
471
|
if (holds++ > 0) return;
|
|
494
472
|
document.documentElement.setAttribute(SCROLL_LOCK, "");
|
|
495
|
-
window.addEventListener("wheel", onWheel,
|
|
473
|
+
window.addEventListener("wheel", onWheel, BLOCKING);
|
|
496
474
|
window.addEventListener("touchstart", onTouchStart, {
|
|
497
475
|
capture: true,
|
|
498
476
|
passive: true
|
|
499
477
|
});
|
|
500
|
-
window.addEventListener("touchmove", onTouchMove,
|
|
478
|
+
window.addEventListener("touchmove", onTouchMove, BLOCKING);
|
|
501
479
|
}
|
|
502
480
|
function release() {
|
|
503
481
|
if (--holds > 0) return;
|
|
504
482
|
holds = 0;
|
|
505
483
|
document.documentElement.removeAttribute(SCROLL_LOCK);
|
|
506
|
-
window.removeEventListener("wheel", onWheel,
|
|
484
|
+
window.removeEventListener("wheel", onWheel, BLOCKING);
|
|
507
485
|
window.removeEventListener("touchstart", onTouchStart, {
|
|
508
486
|
capture: true
|
|
509
487
|
});
|
|
510
|
-
window.removeEventListener("touchmove", onTouchMove,
|
|
488
|
+
window.removeEventListener("touchmove", onTouchMove, BLOCKING);
|
|
511
489
|
}
|
|
512
490
|
function useScrollLock(active) {
|
|
513
491
|
const $ = c(3);
|
|
@@ -533,5 +511,5 @@ function useScrollLock(active) {
|
|
|
533
511
|
}
|
|
534
512
|
|
|
535
513
|
export { SCROLL_LOCK, useClickOutside, useControllableState, useEscapeKey, useGlobalEvent, useHotkey, useIsFullscreenStateActive, useRequiredContext, useScrollLock, useStore };
|
|
536
|
-
//# sourceMappingURL=chunk-
|
|
537
|
-
//# sourceMappingURL=chunk-
|
|
514
|
+
//# sourceMappingURL=chunk-JWUKAZ3A.js.map
|
|
515
|
+
//# sourceMappingURL=chunk-JWUKAZ3A.js.map
|