@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/navigation/hooks.ts"],"names":["useNavigation","useRequiredContext","NavigationContext","actions","useOptionalNavigation","use","INERT_NAVIGATION_ACTIONS","useNavigationState","selector","isEqual","store","NOOP_NAVIGATION_STORE","useStore","useNavigationHold","hold","t0","$","_c","t1","undefined","history","t2","register","t3","trip","runHold","useEffectEvent","enabled","Boolean","t4","trip_0","t5","useEffect","useNavigationPayload","key","value","provide","readValue","useNavigationIntent","listener","onIntent","path","href","handleIntent","path_0","href_0","useDeparture","pathname","usePathname","active","_temp","isSamePathname","tripDestination","state","useArrival","routePathname","target","arrival"],"mappings":";;;;;;;;;;;;;AA4BO,SAAAA,aAAAA,GAAA;AAAA,EAAA,OACEC,kBAAAA,CACLC,iBAAAA,EACA,eAAA,EACA,oBACF,CAAA,CAACC,OAAAA;AAAQ;AAMJ,SAASC,qBAAAA,GAA2C;AACzD,EAAA,OAAOC,GAAAA,CAAIH,iBAAiB,CAAA,EAAGC,OAAAA,IAAWG,wBAAAA;AAC5C;AAWO,SAAAC,kBAAAA,CAAAC,UAAAC,OAAAA,EAAA;AAIL,EAAA,MAAAC,KAAAA,GAAcL,GAAAA,CAAIH,iBAAwB,CAAA,EAACQ,KAAAA,IA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ffect, useEffectEvent } from \"react\";\n\nimport { tripDestination } from \"@/core/navigation/state\";\nimport type {\n NavigationActions,\n NavigationHold,\n NavigationHoldOptions,\n NavigationIntentListener,\n NavigationPayloadKey,\n NavigationPayloadValue,\n NavigationState,\n NavigationTrip,\n} from \"@/core/navigation/types\";\nimport { isSamePathname } from \"@/core/navigation/utils\";\nimport { useRequiredContext, useStore } from \"@/react/hooks\";\n\nimport {\n INERT_NAVIGATION_ACTIONS,\n NavigationContext,\n NOOP_NAVIGATION_STORE,\n} from \"./context\";\n\n/**\n * Returns the navigation actions.\n */\nexport function useNavigation(): NavigationActions {\n return useRequiredContext(\n NavigationContext,\n \"useNavigation\",\n \"NavigationProvider\",\n ).actions;\n}\n\n/**\n * Like useNavigation, but returns inert actions outside a NavigationProvider.\n */\nexport function useOptionalNavigation(): NavigationActions {\n return use(NavigationContext)?.actions ?? INERT_NAVIGATION_ACTIONS;\n}\n\n/**\n * Subscribes to the navigation state. Accepts a selector; works outside a\n * provider with an idle state.\n */\nexport function useNavigationState(): NavigationState;\nexport function useNavigationState<T>(\n selector: (state: NavigationState) => T,\n isEqual?: (a: T, b: T) => boolean,\n): T;\nexport function useNavigationState<T = NavigationState>(\n selector?: (state: NavigationState) => T,\n isEqual?: (a: T, b: T) => boolean,\n): T {\n const store = use(NavigationContext)?.store ?? NOOP_NAVIGATION_STORE;\n return useStore(store, selector as (state: NavigationState) => T, isEqual);\n}\n\n/**\n * Registers a hold that can delay or block navigation while the component is\n * mounted.\n */\nexport function useNavigationHold(\n hold: NavigationHold | false | null | undefined,\n { history = true }: NavigationHoldOptions = {},\n): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method -- the navigation API comes from createNavigator closures or the arrow-function default context, none of which use this\n const { hold: register } = useOptionalNavigation();\n const runHold = useEffectEvent((trip: NavigationTrip) =>\n hold ? hold(trip) : undefined,\n );\n const enabled = Boolean(hold);\n useEffect(() => {\n if (!enabled) return;\n return register((trip) => runHold(trip), { history });\n }, [enabled, history, register]);\n}\n\n/**\n * Attaches a value to every navigation trip under a key while the component is\n * mounted.\n */\nexport function useNavigationPayload<K extends NavigationPayloadKey>(\n key: K,\n value: NavigationPayloadValue<K>,\n): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method -- the navigation API comes from createNavigator closures or the arrow-function default context, none of which use this\n const { provide } = useOptionalNavigation();\n const readValue = useEffectEvent(() =>\n typeof value === \"function\" ? (value as () => unknown)() : value,\n );\n useEffect(\n () => provide(key, readValue as NavigationPayloadValue<K>),\n [key, provide],\n );\n}\n\n/**\n * Calls a listener when the user shows intent to navigate to a route.\n */\nexport function useNavigationIntent(listener: NavigationIntentListener): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method -- the navigation API comes from createNavigator closures or the arrow-function default context, none of which use this\n const { onIntent } = useOptionalNavigation();\n const handleIntent = useEffectEvent(\n (\n path: Parameters<NavigationIntentListener>[0],\n href: Parameters<NavigationIntentListener>[1],\n ) => listener(path, href),\n );\n useEffect(\n () => onIntent((path, href) => handleIntent(path, href)),\n [onIntent],\n );\n}\n\n/**\n * The active trip that is leaving the current page, or null.\n */\nexport function useDeparture(): NavigationTrip | null {\n const pathname = usePathname();\n const active = useNavigationState((state) => state.active);\n return active && !isSamePathname(tripDestination(active), pathname)\n ? active\n : null;\n}\n\n/**\n * The trip that just arrived at a page (default: the current one), or null.\n */\nexport function useArrival(pathname?: string): NavigationTrip | null {\n const routePathname = usePathname();\n const target = pathname ?? routePathname;\n // eslint-disable-next-line @typescript-eslint/unbound-method -- the navigation API comes from createNavigator closures or the arrow-function default context, none of which use this\n const { arrival } = useOptionalNavigation();\n return useNavigationState(() => arrival(target));\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/modules/navigation/hooks.ts"],"names":["useNavigation","useRequiredContext","NavigationContext","actions","useOptionalNavigation","use","INERT_NAVIGATION_ACTIONS","useNavigationState","selector","isEqual","store","NOOP_NAVIGATION_STORE","useStore","useNavigationHold","hold","t0","$","_c","t1","undefined","history","t2","navigation","t3","trip","runHold","useEffectEvent","enabled","Boolean","t4","trip_0","t5","useEffect","useNavigationPayload","key","value","readValue","provide","useNavigationIntent","listener","path","href","handleIntent","onIntent","path_0","href_0","useDeparture","pathname","usePathname","active","_temp","isSamePathname","tripDestination","state","useArrival","routePathname","target","arrival"],"mappings":";;;;;;;;;;;;;AA4BO,SAAAA,aAAAA,GAAA;AAAA,EAAA,OACEC,kBAAAA,CACLC,iBAAAA,EACA,eAAA,EACA,oBACF,CAAA,CAACC,OAAAA;AAAQ;AAMJ,SAASC,qBAAAA,GAA2C;AACzD,EAAA,OAAOC,GAAAA,CAAIH,iBAAiB,CAAA,EAAGC,OAAAA,IAAWG,wBAAAA;AAC5C;AAWO,SAAAC,kBAAAA,CAAAC,UAAAC,OAAAA,EAAA;AAIL,EAAA,MAAAC,KAAAA,GAAcL,GAAAA,CAAIH,iBAAwB,CAAA,EAACQ,KAAAA,IAA7BC,qBAAAA;AAAuD,EAAA,OAC9DC,QAAAA,CAASF,KAAAA,EAAOF,QAAAA,EAA2CC,OAAO,CAAA;AAAC;AAOrE,SAAAI,iBAAAA,CAAAC,MAAAC,EAAAA,EAAA;AAAA,EAAA,MAAAC,CAAAA,GAAAC,EAAA,EAAA,CAAA;AAAA,EAAA,IAAAC,EAAAA;AAAA,EAAA,IAAAF,CAAAA,CAAA,CAAA,CAAA,KAAAD,EAAAA,EAAA;AAELG,IAAAA,EAAAA,GAAAH,EAAAA,KAAAI,MAAAA,GAAA,EAA6C,GAA7CJ,EAAAA;AAA8CC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAD,EAAAA;AAAAC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAE,EAAAA;EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAAA,GAAAF,EAAA,CAAA,CAAA;AAAA,EAAA;AAA9C,EAAA,MAAA;IAAAI,OAAAA,EAAAC;GAAA,GAAAH,EAAAA;AAAE,EAAA,MAAAE,OAAAA,GAAAC,EAAAA,KAAAF,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AAM,cAAAN,CAAAA,CAAA,CAAA,MAAAwC,MAAAA,EAAA;AACjBzC,IAAAA,EAAAA,GAAAA,MAAMO,UAAAA,CAAUmC,OAAAA,CAASD,MAAM,CAAA;AAACxC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAM,UAAAA;AAAAN,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAwC,MAAAA;AAAAxC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAD,EAAAA;EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAAA,GAAAC,EAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,OAAnDT,mBAAmBQ,EAAgC,CAAA;AAAC","file":"index.js","sourcesContent":["\"use client\";\n\nimport { usePathname } from \"next/navigation\";\nimport { use, useEffect, useEffectEvent } from \"react\";\n\nimport { tripDestination } from \"@/core/navigation/state\";\nimport type {\n NavigationActions,\n NavigationHold,\n NavigationHoldOptions,\n NavigationIntentListener,\n NavigationPayloadKey,\n NavigationPayloadValue,\n NavigationState,\n NavigationTrip,\n} from \"@/core/navigation/types\";\nimport { isSamePathname } from \"@/core/navigation/utils\";\nimport { useRequiredContext, useStore } from \"@/react/hooks\";\n\nimport {\n INERT_NAVIGATION_ACTIONS,\n NavigationContext,\n NOOP_NAVIGATION_STORE,\n} from \"./context\";\n\n/**\n * Returns the navigation actions.\n */\nexport function useNavigation(): NavigationActions {\n return useRequiredContext(\n NavigationContext,\n \"useNavigation\",\n \"NavigationProvider\",\n ).actions;\n}\n\n/**\n * Like useNavigation, but returns inert actions outside a NavigationProvider.\n */\nexport function useOptionalNavigation(): NavigationActions {\n return use(NavigationContext)?.actions ?? INERT_NAVIGATION_ACTIONS;\n}\n\n/**\n * Subscribes to the navigation state. Accepts a selector; works outside a\n * provider with an idle state.\n */\nexport function useNavigationState(): NavigationState;\nexport function useNavigationState<T>(\n selector: (state: NavigationState) => T,\n isEqual?: (a: T, b: T) => boolean,\n): T;\nexport function useNavigationState<T = NavigationState>(\n selector?: (state: NavigationState) => T,\n isEqual?: (a: T, b: T) => boolean,\n): T {\n const store = use(NavigationContext)?.store ?? NOOP_NAVIGATION_STORE;\n return useStore(store, selector as (state: NavigationState) => T, isEqual);\n}\n\n/**\n * Registers a hold that can delay or block navigation while the component is\n * mounted.\n */\nexport function useNavigationHold(\n hold: NavigationHold | false | null | undefined,\n { history = true }: NavigationHoldOptions = {},\n): void {\n const navigation = useOptionalNavigation();\n const runHold = useEffectEvent((trip: NavigationTrip) =>\n hold ? hold(trip) : undefined,\n );\n const enabled = Boolean(hold);\n useEffect(() => {\n if (!enabled) return;\n return navigation.hold((trip) => runHold(trip), { history });\n }, [enabled, history, navigation]);\n}\n\n/**\n * Attaches a value to every navigation trip under a key while the component is\n * mounted.\n */\nexport function useNavigationPayload<K extends NavigationPayloadKey>(\n key: K,\n value: NavigationPayloadValue<K>,\n): void {\n const navigation = useOptionalNavigation();\n const readValue = useEffectEvent(() =>\n typeof value === \"function\" ? (value as () => unknown)() : value,\n );\n useEffect(\n () => navigation.provide(key, readValue as NavigationPayloadValue<K>),\n [key, navigation],\n );\n}\n\n/**\n * Calls a listener when the user shows intent to navigate to a route.\n */\nexport function useNavigationIntent(listener: NavigationIntentListener): void {\n const navigation = useOptionalNavigation();\n const handleIntent = useEffectEvent(\n (\n path: Parameters<NavigationIntentListener>[0],\n href: Parameters<NavigationIntentListener>[1],\n ) => listener(path, href),\n );\n useEffect(\n () => navigation.onIntent((path, href) => handleIntent(path, href)),\n [navigation],\n );\n}\n\n/**\n * The active trip that is leaving the current page, or null.\n */\nexport function useDeparture(): NavigationTrip | null {\n const pathname = usePathname();\n const active = useNavigationState((state) => state.active);\n return active && !isSamePathname(tripDestination(active), pathname)\n ? active\n : null;\n}\n\n/**\n * The trip that just arrived at a page (default: the current one), or null.\n */\nexport function useArrival(pathname?: string): NavigationTrip | null {\n const routePathname = usePathname();\n const target = pathname ?? routePathname;\n const navigation = useOptionalNavigation();\n return useNavigationState(() => navigation.arrival(target));\n}\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { DOCK_STACK_ELEMENT_ID, INERT_NOTIFICATION_ACTIONS, INITIAL_NOTIFICATION_STATE, NOOP_NOTIFICATION_STORE, NotificationContext, NotificationListener, NotificationProvider, SESSION_EXPIRED_MESSAGE, TOAST_DURATIONS, createNotificationEntry, getActiveNotification, getOutcomeMessage, isNotificationDataObject, normalizeDuration, normalizeFeedbackText, normalizeToastOptions, notificationModule, notificationTheme, useNotification, useNotificationActions, useNotificationContainerModel, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, useToast, withDefaultDuration } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
2
|
+
export { DOCK_STACK_ELEMENT_ID, INERT_NOTIFICATION_ACTIONS, INITIAL_NOTIFICATION_STATE, NOOP_NOTIFICATION_STORE, NotificationContext, NotificationListener, NotificationProvider, SESSION_EXPIRED_MESSAGE, TOAST_DURATIONS, createNotificationEntry, getActiveNotification, getOutcomeMessage, isNotificationDataObject, normalizeDuration, normalizeFeedbackText, normalizeToastOptions, notificationModule, notificationTheme, useNotification, useNotificationActions, useNotificationContainerModel, useNotificationState, useNotificationVisible, useOptionalNotificationActions, useOptionalNotificationState, useToast, withDefaultDuration } from '../chunk-JA75E4BG.js';
|
|
3
|
+
import '../chunk-T53WFIZN.js';
|
|
4
|
+
import '../chunk-GG2ILNK2.js';
|
|
5
|
+
import '../chunk-ED32WLAD.js';
|
|
6
|
+
import '../chunk-JWUKAZ3A.js';
|
|
7
|
+
import '../chunk-AKPH5CEJ.js';
|
|
8
|
+
import '../chunk-S67HGKJ2.js';
|
|
8
9
|
import '../chunk-J3VTDBC6.js';
|
|
9
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-YHWA7FXX.js';
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Modal } from './chunk-5TQSH6KE.js';
|
|
2
|
+
import './chunk-WVED7PDH.js';
|
|
3
|
+
import './chunk-T53WFIZN.js';
|
|
4
|
+
import './chunk-GG2ILNK2.js';
|
|
5
|
+
import './chunk-ED32WLAD.js';
|
|
6
|
+
import './chunk-JWUKAZ3A.js';
|
|
7
|
+
import './chunk-AKPH5CEJ.js';
|
|
8
|
+
import './chunk-S67HGKJ2.js';
|
|
9
|
+
import './chunk-J3VTDBC6.js';
|
|
10
|
+
import './chunk-YHWA7FXX.js';
|
|
11
|
+
//# sourceMappingURL=overlay-ZCMQVNYT.js.map
|
|
12
|
+
//# sourceMappingURL=overlay-ZCMQVNYT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"overlay-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"overlay-ZCMQVNYT.js"}
|
package/dist/provider/index.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { CoreProvider } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-7VU2OAJB.js';
|
|
9
|
-
import '../chunk-TAWTGCWJ.js';
|
|
10
|
-
import '../chunk-ESD5EQ5H.js';
|
|
11
|
-
import '../chunk-D222OCTV.js';
|
|
2
|
+
export { CoreProvider } from '../chunk-FG2AKFXP.js';
|
|
3
|
+
import '../chunk-QZA5AIT6.js';
|
|
4
|
+
import '../chunk-ED32WLAD.js';
|
|
5
|
+
import '../chunk-JWUKAZ3A.js';
|
|
6
|
+
import '../chunk-AKPH5CEJ.js';
|
|
7
|
+
import '../chunk-S67HGKJ2.js';
|
|
12
8
|
import '../chunk-J3VTDBC6.js';
|
|
13
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-YHWA7FXX.js';
|
|
14
10
|
//# sourceMappingURL=index.js.map
|
|
15
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,5 +6,7 @@ export { useIsFullscreenStateActive } from "./use-fullscreen-state";
|
|
|
6
6
|
export { useControllableState } from "./use-controllable-state";
|
|
7
7
|
export { useHotkey, useEscapeKey } from "./use-hotkey";
|
|
8
8
|
export { SCROLL_LOCK, useScrollLock } from "./use-scroll-lock";
|
|
9
|
-
export type
|
|
9
|
+
export type { UseControllableStateOptions } from "./use-controllable-state";
|
|
10
|
+
export type { UseGlobalEventOptions } from "./use-global-event";
|
|
11
|
+
export type { UseHotkeyOptions } from "./use-hotkey";
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE/D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE/D,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A browser-only value that never changes: `serverValue` during server
|
|
3
|
+
* rendering and hydration, then `read()` on the client. `read` must return
|
|
4
|
+
* the same value on every call.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useClientValue<T>(read: () => T, serverValue: T): T;
|
|
7
|
+
/**
|
|
8
|
+
* False during server rendering and hydration, true on the client.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useIsClient(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* `document.body` on the client, null during server rendering and hydration.
|
|
13
|
+
*/
|
|
14
|
+
export declare function usePortalTarget(): HTMLElement | null;
|
|
15
|
+
//# sourceMappingURL=use-client-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-client-value.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-client-value.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,CAAC,CAElE;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAID;;GAEG;AACH,wBAAgB,eAAe,IAAI,WAAW,GAAG,IAAI,CAEpD"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Options for `useControllableState`: a default, an optional controlled value and a change callback.
|
|
3
|
+
*/
|
|
4
|
+
export interface UseControllableStateOptions<T> {
|
|
5
|
+
defaultValue: T;
|
|
6
|
+
onChange?: (nextValue: T) => void;
|
|
7
|
+
value?: T;
|
|
8
|
+
}
|
|
2
9
|
/**
|
|
3
10
|
* State that is controlled when `value` is given and uncontrolled otherwise.
|
|
4
11
|
* Returns the current value and a setter that also calls `onChange`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-controllable-state.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-controllable-state.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"use-controllable-state.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-controllable-state.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,2BAA2B,CAAC,CAAC;IAC5C,YAAY,EAAE,CAAC,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,CAAC,CAAC;CACX;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,YAAY,EACZ,QAAQ,EACR,KAAK,GACN,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CA8B5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-fullscreen-state.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-fullscreen-state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-fullscreen-state.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-fullscreen-state.ts"],"names":[],"mappings":"AAmDA;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { type FrameworkEventMap } from "../../foundation/events";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Options for `useGlobalEvent`: debounce or throttle the handler.
|
|
4
|
+
*/
|
|
5
|
+
export interface UseGlobalEventOptions {
|
|
6
|
+
debounceMs?: number;
|
|
7
|
+
throttleMs?: number;
|
|
8
|
+
}
|
|
3
9
|
/**
|
|
4
10
|
* Subscribes to one or more framework events for the life of the component,
|
|
5
11
|
* optionally debounced or throttled.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-global-event.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-global-event.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAgB,MAAM,qBAAqB,CAAC;AAE3E,
|
|
1
|
+
{"version":3,"file":"use-global-event.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-global-event.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,iBAAiB,EAAgB,MAAM,qBAAqB,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,iBAAiB,EAC9D,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EACjC,QAAQ,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,EACjD,OAAO,CAAC,EAAE,qBAAqB,GAC9B,IAAI,CAAC;AAER,wBAAgB,cAAc,CAAC,CAAC,GAAG,OAAO,EACxC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EAC3C,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,IAAI,EAC9B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,IAAI,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Options for `useHotkey`: whether it is active, whether it fires in form fields, and event handling.
|
|
3
|
+
*/
|
|
4
|
+
export interface UseHotkeyOptions {
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
enableOnFormTags?: boolean;
|
|
7
|
+
preventDefault?: boolean;
|
|
8
|
+
stopPropagation?: boolean;
|
|
9
|
+
}
|
|
2
10
|
/**
|
|
3
11
|
* Runs `callback` when a key combination such as "mod+k" is pressed.
|
|
4
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-hotkey.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-hotkey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use-hotkey.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-hotkey.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAyED;;GAEG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,EACxC,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI,CAyBN;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,EACxC,OAAO,UAAO,GACb,IAAI,CAMN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-scroll-lock.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-scroll-lock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-scroll-lock.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-scroll-lock.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAkF9C;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAMnD"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { type ExternalStore } from "../../foundation/utils";
|
|
2
|
+
/**
|
|
3
|
+
* Subscribes a component to an external store, optionally to a selected slice with a custom equality check.
|
|
4
|
+
*/
|
|
2
5
|
export declare function useStore<TState, TSlice = TState>(store: ExternalStore<TState>, selector?: (state: TState) => TSlice, isEqual?: (a: TSlice, b: TSlice) => boolean): TSlice;
|
|
3
6
|
//# sourceMappingURL=use-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-store.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-store.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/use-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAC9C,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,EAE5B,QAAQ,GAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAElB,EACX,OAAO,GAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAmB,GACrD,MAAM,CAmDR"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
import { type MotionTokens } from "../../foundation/utils/tempo";
|
|
3
|
+
import { type ThemeComponents, type ThemeIcons } from "./parts";
|
|
4
|
+
export { type FrameworkIcon, type ThemeButtonProps, type ThemeComponents, ThemeButton, ThemeIcon, type ThemeIconProps, type ThemeIcons, ThemeSpinner, type ThemeSpinnerProps, ThemeTooltip, type ThemeTooltipProps, useIconName, useThemeComponents, } from "./parts";
|
|
3
5
|
/**
|
|
4
6
|
* A theme's identity and, through its type parameters, its slot names and motion shape.
|
|
5
7
|
*/
|
|
@@ -46,13 +48,17 @@ export declare function defineThemeSpec<S extends string, M = never>(id: string)
|
|
|
46
48
|
export declare function defineTheme<S extends string, M = never>(spec: ThemeSpec<S, M>, config: ThemeConfig<NoInfer<S>, NoInfer<M>>): ThemeEntry;
|
|
47
49
|
interface ThemeProviderProps {
|
|
48
50
|
children?: ReactNode;
|
|
51
|
+
/** The button, icon, spinner and tooltip the modules draw with. */
|
|
52
|
+
components?: Partial<ThemeComponents>;
|
|
53
|
+
/** The app's icon name for each icon the framework's modules show. */
|
|
54
|
+
icons?: ThemeIcons;
|
|
49
55
|
motion?: MotionTokens;
|
|
50
56
|
themes: readonly ThemeEntry[];
|
|
51
57
|
}
|
|
52
58
|
/**
|
|
53
59
|
* Provides themes, and motion tokens when given, to the tree below it.
|
|
54
60
|
*/
|
|
55
|
-
export declare function ThemeProvider({ children, motion, themes, }: ThemeProviderProps): import("react").JSX.Element;
|
|
61
|
+
export declare function ThemeProvider({ children, components, icons, motion, themes, }: ThemeProviderProps): import("react").JSX.Element;
|
|
56
62
|
/**
|
|
57
63
|
* Returns the slot classes and styles configured for a theme spec.
|
|
58
64
|
*/
|
|
@@ -78,5 +84,4 @@ interface ModuleMotionConfigProps {
|
|
|
78
84
|
* Applies the motion tokens' reduced-motion policy to motion components below it.
|
|
79
85
|
*/
|
|
80
86
|
export declare function ModuleMotionConfig({ children }: ModuleMotionConfigProps): import("react").JSX.Element;
|
|
81
|
-
export {};
|
|
82
87
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/theme/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAgB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/theme/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAgB,MAAM,OAAO,CAAC;AAGzE,OAAO,EAGL,KAAK,YAAY,EAGlB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,UAAU,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,WAAW,EACX,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,iBAAiB,EACtB,YAAY,EACZ,KAAK,iBAAiB,EACtB,WAAW,EACX,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAIjB;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,KAAK;IAC7D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACpB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;CACtB;AAED,UAAU,YAAY,CAAC,CAAC,SAAS,MAAM;IACrC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,CAAC,OAAO,C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Q,CAAC,EAAE,SAAS,CAAC;IACrB,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACtC,sEAAsE;IACtE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,UAAU,EACV,KAAK,EACL,MAAM,EACN,MAAM,GACP,EAAE,kBAAkB,+BAiCpB;AAUD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvC,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,GAC1B,aAAa,CAAC,CAAC,CAAC,CAOlB;AAQD;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,KAAK,CAAC,GAAG;IAC5E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B,CAOA;AAUD;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAUhE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EACvC,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,GACzB,CAAC,GAAG,IAAI,CAKV;AAID,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,uBAAuB,+BAKvE"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ComponentType, type CSSProperties, type MouseEventHandler, type ReactElement, type ReactNode, type Ref } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props a module passes to the app's button. Module buttons carry no variant:
|
|
4
|
+
* the look comes from the module theme's slot in `className`.
|
|
5
|
+
*/
|
|
6
|
+
export interface ThemeButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
[data: `data-${string}`]: string | number | boolean | undefined;
|
|
8
|
+
ref?: Ref<HTMLButtonElement>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Props a module passes to the app's icon: an icon name (the app's own, or
|
|
12
|
+
* one of the framework's keys already resolved through `icons`) and a size in px.
|
|
13
|
+
*/
|
|
14
|
+
export interface ThemeIconProps {
|
|
15
|
+
className?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
19
|
+
size?: number;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Props a module passes to the app's spinner.
|
|
24
|
+
*/
|
|
25
|
+
export interface ThemeSpinnerProps {
|
|
26
|
+
className?: string;
|
|
27
|
+
size?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Props a module passes to the app's tooltip; `children` is the trigger.
|
|
31
|
+
*/
|
|
32
|
+
export interface ThemeTooltipProps {
|
|
33
|
+
children: ReactElement;
|
|
34
|
+
className?: string;
|
|
35
|
+
sideOffset?: number;
|
|
36
|
+
text?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The components the modules draw with. Each one is optional: without it a
|
|
40
|
+
* module renders a plain `<button>`, no icon, no spinner and no tooltip.
|
|
41
|
+
*/
|
|
42
|
+
export interface ThemeComponents {
|
|
43
|
+
Button: ComponentType<ThemeButtonProps>;
|
|
44
|
+
Icon: ComponentType<ThemeIconProps>;
|
|
45
|
+
Spinner: ComponentType<ThemeSpinnerProps>;
|
|
46
|
+
Tooltip: ComponentType<ThemeTooltipProps>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The icons the framework's own modules show, by key. The app maps each key
|
|
50
|
+
* to an icon name its `Icon` understands; an unmapped key draws nothing.
|
|
51
|
+
*/
|
|
52
|
+
export type FrameworkIcon = "back" | "close" | "danger" | "error" | "forbidden" | "forward" | "next" | "pause" | "pip" | "play" | "repeat" | "rewind" | "volumeLoud" | "volumeMuted" | "volumeSmall" | "wifi" | "wifiOff";
|
|
53
|
+
/**
|
|
54
|
+
* The app's icon name for each framework icon key.
|
|
55
|
+
*/
|
|
56
|
+
export type ThemeIcons = Readonly<Partial<Record<FrameworkIcon, string>>>;
|
|
57
|
+
export declare const ComponentsContext: import("react").Context<ThemeComponents>;
|
|
58
|
+
export declare const IconsContext: import("react").Context<Readonly<Partial<Record<FrameworkIcon, string>>>>;
|
|
59
|
+
/**
|
|
60
|
+
* Merges the app's components over the plain ones (or over the ones a parent
|
|
61
|
+
* provider already set).
|
|
62
|
+
*/
|
|
63
|
+
export declare function mergeComponents(parent: ThemeComponents, own: Partial<ThemeComponents> | undefined): ThemeComponents;
|
|
64
|
+
/**
|
|
65
|
+
* The components the modules draw with.
|
|
66
|
+
*/
|
|
67
|
+
export declare function useThemeComponents(): ThemeComponents;
|
|
68
|
+
/**
|
|
69
|
+
* Resolves a framework icon key to the app's icon name; any other string (an
|
|
70
|
+
* icon name the app gave a module) passes through unchanged.
|
|
71
|
+
*/
|
|
72
|
+
export declare function useIconName(): (source: string) => string;
|
|
73
|
+
/**
|
|
74
|
+
* Draws an icon by name or framework key with the app's `Icon`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function ThemeIcon({ icon, ...props }: ThemeIconProps): import("react").JSX.Element;
|
|
77
|
+
/**
|
|
78
|
+
* Draws a module button with the app's `Button`.
|
|
79
|
+
*/
|
|
80
|
+
export declare function ThemeButton(props: ThemeButtonProps): import("react").JSX.Element;
|
|
81
|
+
/**
|
|
82
|
+
* Draws a spinner with the app's `Spinner`.
|
|
83
|
+
*/
|
|
84
|
+
export declare function ThemeSpinner(props: ThemeSpinnerProps): import("react").JSX.Element;
|
|
85
|
+
/**
|
|
86
|
+
* Wraps a trigger in the app's `Tooltip`.
|
|
87
|
+
*/
|
|
88
|
+
export declare function ThemeTooltip(props: ThemeTooltipProps): import("react").JSX.Element;
|
|
89
|
+
//# sourceMappingURL=parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/react/theme/parts.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,GAAG,EAET,MAAM,OAAO,CAAC;AAQf;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC/E,CAAC,IAAI,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;;GAG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|
package/dist/recipes/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { extendTailwindMerge } from 'tailwind-merge';
|
|
|
2
2
|
|
|
3
3
|
// src/foundation/recipes/recipe.ts
|
|
4
4
|
var key = (value) => (
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-base-to-string --
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string -- any value is accepted; objects become "[object Object]"
|
|
6
6
|
value === null || value === void 0 ? null : String(value)
|
|
7
7
|
);
|
|
8
8
|
function matches(selected, compound) {
|
|
@@ -78,11 +78,10 @@ function appendClasses(value, out) {
|
|
|
78
78
|
}
|
|
79
79
|
if (typeof value !== "object") return out;
|
|
80
80
|
if (Array.isArray(value)) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return next2;
|
|
81
|
+
return value.reduce(
|
|
82
|
+
(next2, item) => appendClasses(item, next2),
|
|
83
|
+
out
|
|
84
|
+
);
|
|
86
85
|
}
|
|
87
86
|
const record = value;
|
|
88
87
|
let next = out;
|
|
@@ -92,79 +91,6 @@ function appendClasses(value, out) {
|
|
|
92
91
|
return next;
|
|
93
92
|
}
|
|
94
93
|
var joinClasses = (...inputs) => appendClasses(inputs, "");
|
|
95
|
-
|
|
96
|
-
// src/foundation/recipes/anatomy.ts
|
|
97
|
-
var part = () => defineRecipe({});
|
|
98
|
-
var flag = { false: "", true: "" };
|
|
99
|
-
var layout = { fill: "", intrinsic: "" };
|
|
100
|
-
var ANATOMY = {
|
|
101
|
-
button: {
|
|
102
|
-
root: defineRecipe({ variants: { intent: {} } }),
|
|
103
|
-
bare: part(),
|
|
104
|
-
busy: part(),
|
|
105
|
-
busyLabel: part(),
|
|
106
|
-
busySpinner: part()
|
|
107
|
-
},
|
|
108
|
-
input: { field: part(), area: part() },
|
|
109
|
-
switch: { track: part(), thumb: part() },
|
|
110
|
-
checkbox: {
|
|
111
|
-
root: part(),
|
|
112
|
-
box: defineRecipe({ variants: { checked: flag } }),
|
|
113
|
-
glyph: defineRecipe({ variants: { checked: flag } })
|
|
114
|
-
},
|
|
115
|
-
segmented: {
|
|
116
|
-
root: part(),
|
|
117
|
-
segment: defineRecipe({ variants: { active: flag } }),
|
|
118
|
-
pill: part(),
|
|
119
|
-
chosen: part(),
|
|
120
|
-
icon: part(),
|
|
121
|
-
count: part()
|
|
122
|
-
},
|
|
123
|
-
select: {
|
|
124
|
-
root: part(),
|
|
125
|
-
trigger: part(),
|
|
126
|
-
value: part(),
|
|
127
|
-
label: part(),
|
|
128
|
-
placeholder: part(),
|
|
129
|
-
chevron: part(),
|
|
130
|
-
menu: part(),
|
|
131
|
-
option: part(),
|
|
132
|
-
highlight: part(),
|
|
133
|
-
optionBody: part(),
|
|
134
|
-
text: part(),
|
|
135
|
-
description: part(),
|
|
136
|
-
icon: part(),
|
|
137
|
-
check: part(),
|
|
138
|
-
empty: part()
|
|
139
|
-
},
|
|
140
|
-
carousel: {
|
|
141
|
-
root: part(),
|
|
142
|
-
track: part(),
|
|
143
|
-
slide: part(),
|
|
144
|
-
arrow: defineRecipe({
|
|
145
|
-
variants: { side: { left: "", right: "" }, visible: flag }
|
|
146
|
-
}),
|
|
147
|
-
icon: part()
|
|
148
|
-
},
|
|
149
|
-
tooltip: { content: part(), label: part() },
|
|
150
|
-
loader: {
|
|
151
|
-
root: defineRecipe({ variants: { over: flag } }),
|
|
152
|
-
label: part(),
|
|
153
|
-
overlay: part(),
|
|
154
|
-
dots: part(),
|
|
155
|
-
dot: part(),
|
|
156
|
-
spinner: part(),
|
|
157
|
-
icon: part()
|
|
158
|
-
},
|
|
159
|
-
skeleton: { block: part(), lines: part(), line: part(), bar: part() },
|
|
160
|
-
image: {
|
|
161
|
-
frame: defineRecipe({ variants: { layout, loading: flag } }),
|
|
162
|
-
picture: defineRecipe({ variants: { layout } }),
|
|
163
|
-
fallback: part()
|
|
164
|
-
},
|
|
165
|
-
avatar: { root: part(), image: part(), initials: part() },
|
|
166
|
-
highlight: { fill: part() }
|
|
167
|
-
};
|
|
168
94
|
function createCn(vocabulary = {}) {
|
|
169
95
|
const merge = extendTailwindMerge({
|
|
170
96
|
extend: {
|
|
@@ -181,47 +107,6 @@ function createCn(vocabulary = {}) {
|
|
|
181
107
|
}
|
|
182
108
|
var cn = createCn();
|
|
183
109
|
|
|
184
|
-
// src/foundation/recipes/define.ts
|
|
185
|
-
var DEFAULT_LABELS = {
|
|
186
|
-
loading: "Loading",
|
|
187
|
-
placeholder: "Select an option...",
|
|
188
|
-
empty: "No options available",
|
|
189
|
-
previous: "Scroll left",
|
|
190
|
-
next: "Scroll right"
|
|
191
|
-
};
|
|
192
|
-
function compileComponent(defaults, own, cn2) {
|
|
193
|
-
const parts = {};
|
|
194
|
-
for (const part2 of /* @__PURE__ */ new Set([...Object.keys(defaults), ...Object.keys(own)])) {
|
|
195
|
-
const def = defaults[part2] ? extendRecipe(defaults[part2], own[part2]) : own[part2];
|
|
196
|
-
parts[part2] = compileRecipe(def, cn2);
|
|
197
|
-
}
|
|
198
|
-
return parts;
|
|
199
|
-
}
|
|
200
|
-
function compileParts(config, cn2) {
|
|
201
|
-
const out = {};
|
|
202
|
-
const overrides = config.parts ?? {};
|
|
203
|
-
const names2 = /* @__PURE__ */ new Set([...Object.keys(ANATOMY), ...Object.keys(overrides)]);
|
|
204
|
-
for (const component of names2) {
|
|
205
|
-
const defaults = ANATOMY[component] ?? {};
|
|
206
|
-
out[component] = compileComponent(defaults, overrides[component] ?? {}, cn2);
|
|
207
|
-
}
|
|
208
|
-
return out;
|
|
209
|
-
}
|
|
210
|
-
function defineUi(config) {
|
|
211
|
-
const own = config ?? {};
|
|
212
|
-
const cn2 = createCn(own.merge);
|
|
213
|
-
return Object.freeze({
|
|
214
|
-
// compileParts returns generic parts; the option type narrows them per component.
|
|
215
|
-
parts: compileParts(own, cn2),
|
|
216
|
-
cn: cn2,
|
|
217
|
-
motion: Object.freeze({ ...own.motion }),
|
|
218
|
-
icons: Object.freeze({ ...own.icons }),
|
|
219
|
-
labels: Object.freeze({ ...DEFAULT_LABELS, ...own.labels }),
|
|
220
|
-
config: own
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
var defaultUi = defineUi();
|
|
224
|
-
|
|
225
110
|
// src/foundation/recipes/split.ts
|
|
226
111
|
var names = /* @__PURE__ */ new WeakMap();
|
|
227
112
|
function variantNames(recipe) {
|
|
@@ -247,6 +132,6 @@ function splitVariants(props, ...recipes) {
|
|
|
247
132
|
return [variants, rest];
|
|
248
133
|
}
|
|
249
134
|
|
|
250
|
-
export {
|
|
135
|
+
export { cn, compileRecipe, createCn, defineRecipe, extendRecipe, joinClasses, resolveRecipe, splitVariants, variantNames };
|
|
251
136
|
//# sourceMappingURL=index.js.map
|
|
252
137
|
//# sourceMappingURL=index.js.map
|