@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,357 @@
|
|
|
1
|
+
import { getOrCreateGlobalContext } from './chunk-J3VTDBC6.js';
|
|
2
|
+
import { defineMotion, NEUTRAL_TEMPO, getOrInsert, retimeModuleMotion } from './chunk-YHWA7FXX.js';
|
|
3
|
+
import { c } from 'react/compiler-runtime';
|
|
4
|
+
import { MotionConfig, useReducedMotion } from 'motion/react';
|
|
5
|
+
import { use } from 'react';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
function PlainButton(t0) {
|
|
9
|
+
const $ = c(6);
|
|
10
|
+
let props;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({
|
|
14
|
+
type: t1,
|
|
15
|
+
...props
|
|
16
|
+
} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = props;
|
|
19
|
+
$[2] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
props = $[1];
|
|
22
|
+
t1 = $[2];
|
|
23
|
+
}
|
|
24
|
+
const type = t1 === void 0 ? "button" : t1;
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[3] !== props || $[4] !== type) {
|
|
27
|
+
t2 = /* @__PURE__ */ jsx("button", { type, ...props });
|
|
28
|
+
$[3] = props;
|
|
29
|
+
$[4] = type;
|
|
30
|
+
$[5] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
t2 = $[5];
|
|
33
|
+
}
|
|
34
|
+
return t2;
|
|
35
|
+
}
|
|
36
|
+
var Nothing = () => null;
|
|
37
|
+
function Untipped({
|
|
38
|
+
children
|
|
39
|
+
}) {
|
|
40
|
+
return children;
|
|
41
|
+
}
|
|
42
|
+
var PLAIN = Object.freeze({
|
|
43
|
+
Button: PlainButton,
|
|
44
|
+
Icon: Nothing,
|
|
45
|
+
Spinner: Nothing,
|
|
46
|
+
Tooltip: Untipped
|
|
47
|
+
});
|
|
48
|
+
var NO_ICONS = Object.freeze({});
|
|
49
|
+
var ComponentsContext = getOrCreateGlobalContext("ThemeComponentsContext", PLAIN);
|
|
50
|
+
var IconsContext = getOrCreateGlobalContext("ThemeIconsContext", NO_ICONS);
|
|
51
|
+
function mergeComponents(parent, own) {
|
|
52
|
+
return own ? Object.freeze({
|
|
53
|
+
...parent,
|
|
54
|
+
...own
|
|
55
|
+
}) : parent;
|
|
56
|
+
}
|
|
57
|
+
function useThemeComponents() {
|
|
58
|
+
return use(ComponentsContext);
|
|
59
|
+
}
|
|
60
|
+
function useIconName() {
|
|
61
|
+
const icons = use(IconsContext);
|
|
62
|
+
return (source) => icons[source] ?? source;
|
|
63
|
+
}
|
|
64
|
+
function ThemeIcon(t0) {
|
|
65
|
+
const $ = c(10);
|
|
66
|
+
let icon;
|
|
67
|
+
let props;
|
|
68
|
+
if ($[0] !== t0) {
|
|
69
|
+
({
|
|
70
|
+
icon,
|
|
71
|
+
...props
|
|
72
|
+
} = t0);
|
|
73
|
+
$[0] = t0;
|
|
74
|
+
$[1] = icon;
|
|
75
|
+
$[2] = props;
|
|
76
|
+
} else {
|
|
77
|
+
icon = $[1];
|
|
78
|
+
props = $[2];
|
|
79
|
+
}
|
|
80
|
+
const {
|
|
81
|
+
Icon
|
|
82
|
+
} = use(ComponentsContext);
|
|
83
|
+
const name = useIconName();
|
|
84
|
+
let t1;
|
|
85
|
+
if ($[3] !== icon || $[4] !== name) {
|
|
86
|
+
t1 = name(icon);
|
|
87
|
+
$[3] = icon;
|
|
88
|
+
$[4] = name;
|
|
89
|
+
$[5] = t1;
|
|
90
|
+
} else {
|
|
91
|
+
t1 = $[5];
|
|
92
|
+
}
|
|
93
|
+
let t2;
|
|
94
|
+
if ($[6] !== Icon || $[7] !== props || $[8] !== t1) {
|
|
95
|
+
t2 = /* @__PURE__ */ jsx(Icon, { icon: t1, ...props });
|
|
96
|
+
$[6] = Icon;
|
|
97
|
+
$[7] = props;
|
|
98
|
+
$[8] = t1;
|
|
99
|
+
$[9] = t2;
|
|
100
|
+
} else {
|
|
101
|
+
t2 = $[9];
|
|
102
|
+
}
|
|
103
|
+
return t2;
|
|
104
|
+
}
|
|
105
|
+
function ThemeButton(props) {
|
|
106
|
+
const $ = c(3);
|
|
107
|
+
const {
|
|
108
|
+
Button
|
|
109
|
+
} = use(ComponentsContext);
|
|
110
|
+
let t0;
|
|
111
|
+
if ($[0] !== Button || $[1] !== props) {
|
|
112
|
+
t0 = /* @__PURE__ */ jsx(Button, { ...props });
|
|
113
|
+
$[0] = Button;
|
|
114
|
+
$[1] = props;
|
|
115
|
+
$[2] = t0;
|
|
116
|
+
} else {
|
|
117
|
+
t0 = $[2];
|
|
118
|
+
}
|
|
119
|
+
return t0;
|
|
120
|
+
}
|
|
121
|
+
function ThemeSpinner(props) {
|
|
122
|
+
const $ = c(3);
|
|
123
|
+
const {
|
|
124
|
+
Spinner
|
|
125
|
+
} = use(ComponentsContext);
|
|
126
|
+
let t0;
|
|
127
|
+
if ($[0] !== Spinner || $[1] !== props) {
|
|
128
|
+
t0 = /* @__PURE__ */ jsx(Spinner, { ...props });
|
|
129
|
+
$[0] = Spinner;
|
|
130
|
+
$[1] = props;
|
|
131
|
+
$[2] = t0;
|
|
132
|
+
} else {
|
|
133
|
+
t0 = $[2];
|
|
134
|
+
}
|
|
135
|
+
return t0;
|
|
136
|
+
}
|
|
137
|
+
function ThemeTooltip(props) {
|
|
138
|
+
const $ = c(3);
|
|
139
|
+
const {
|
|
140
|
+
Tooltip
|
|
141
|
+
} = use(ComponentsContext);
|
|
142
|
+
let t0;
|
|
143
|
+
if ($[0] !== Tooltip || $[1] !== props) {
|
|
144
|
+
t0 = /* @__PURE__ */ jsx(Tooltip, { ...props });
|
|
145
|
+
$[0] = Tooltip;
|
|
146
|
+
$[1] = props;
|
|
147
|
+
$[2] = t0;
|
|
148
|
+
} else {
|
|
149
|
+
t0 = $[2];
|
|
150
|
+
}
|
|
151
|
+
return t0;
|
|
152
|
+
}
|
|
153
|
+
function defineThemeSpec(id) {
|
|
154
|
+
return Object.freeze({
|
|
155
|
+
id
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function defineTheme(spec, config) {
|
|
159
|
+
return {
|
|
160
|
+
id: spec.id,
|
|
161
|
+
config
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
var EMPTY = /* @__PURE__ */ new Map();
|
|
165
|
+
var ThemeContext = getOrCreateGlobalContext("ThemeContext", EMPTY);
|
|
166
|
+
var DEFAULT_MOTION = defineMotion({});
|
|
167
|
+
var NO_MOTION_PROVIDER = Object.freeze({
|
|
168
|
+
reduced: false,
|
|
169
|
+
tempo: NEUTRAL_TEMPO,
|
|
170
|
+
tokens: DEFAULT_MOTION
|
|
171
|
+
});
|
|
172
|
+
var MotionContext = getOrCreateGlobalContext("MotionContext", NO_MOTION_PROVIDER);
|
|
173
|
+
function MotionProvider(t0) {
|
|
174
|
+
const $ = c(6);
|
|
175
|
+
const {
|
|
176
|
+
children,
|
|
177
|
+
tokens
|
|
178
|
+
} = t0;
|
|
179
|
+
const prefersReduced = useReducedMotion() === true;
|
|
180
|
+
const reduced = tokens.reducedMotion === "always" || tokens.reducedMotion === "user" && prefersReduced;
|
|
181
|
+
let t1;
|
|
182
|
+
if ($[0] !== reduced || $[1] !== tokens) {
|
|
183
|
+
t1 = Object.freeze({
|
|
184
|
+
reduced,
|
|
185
|
+
still: tokens.still,
|
|
186
|
+
tempo: tokens.tempo,
|
|
187
|
+
tokens
|
|
188
|
+
});
|
|
189
|
+
$[0] = reduced;
|
|
190
|
+
$[1] = tokens;
|
|
191
|
+
$[2] = t1;
|
|
192
|
+
} else {
|
|
193
|
+
t1 = $[2];
|
|
194
|
+
}
|
|
195
|
+
const state = t1;
|
|
196
|
+
let t2;
|
|
197
|
+
if ($[3] !== children || $[4] !== state) {
|
|
198
|
+
t2 = /* @__PURE__ */ jsx(MotionContext, { value: state, children });
|
|
199
|
+
$[3] = children;
|
|
200
|
+
$[4] = state;
|
|
201
|
+
$[5] = t2;
|
|
202
|
+
} else {
|
|
203
|
+
t2 = $[5];
|
|
204
|
+
}
|
|
205
|
+
return t2;
|
|
206
|
+
}
|
|
207
|
+
function ThemeProvider(t0) {
|
|
208
|
+
const $ = c(21);
|
|
209
|
+
const {
|
|
210
|
+
children,
|
|
211
|
+
components,
|
|
212
|
+
icons,
|
|
213
|
+
motion,
|
|
214
|
+
themes
|
|
215
|
+
} = t0;
|
|
216
|
+
let t1;
|
|
217
|
+
if ($[0] !== themes) {
|
|
218
|
+
t1 = new Map(themes.map(_temp));
|
|
219
|
+
$[0] = themes;
|
|
220
|
+
$[1] = t1;
|
|
221
|
+
} else {
|
|
222
|
+
t1 = $[1];
|
|
223
|
+
}
|
|
224
|
+
const configs = t1;
|
|
225
|
+
const inheritsMotion = use(MotionContext) !== NO_MOTION_PROVIDER;
|
|
226
|
+
const providesMotion = Boolean(motion) || !inheritsMotion;
|
|
227
|
+
let t2;
|
|
228
|
+
if ($[2] !== children || $[3] !== motion || $[4] !== providesMotion) {
|
|
229
|
+
t2 = providesMotion ? /* @__PURE__ */ jsx(MotionProvider, { tokens: motion ?? DEFAULT_MOTION, children }) : children;
|
|
230
|
+
$[2] = children;
|
|
231
|
+
$[3] = motion;
|
|
232
|
+
$[4] = providesMotion;
|
|
233
|
+
$[5] = t2;
|
|
234
|
+
} else {
|
|
235
|
+
t2 = $[5];
|
|
236
|
+
}
|
|
237
|
+
const content = t2;
|
|
238
|
+
const parentComponents = use(ComponentsContext);
|
|
239
|
+
const parentIcons = use(IconsContext);
|
|
240
|
+
let t3;
|
|
241
|
+
if ($[6] !== components || $[7] !== parentComponents) {
|
|
242
|
+
t3 = mergeComponents(parentComponents, components);
|
|
243
|
+
$[6] = components;
|
|
244
|
+
$[7] = parentComponents;
|
|
245
|
+
$[8] = t3;
|
|
246
|
+
} else {
|
|
247
|
+
t3 = $[8];
|
|
248
|
+
}
|
|
249
|
+
const parts = t3;
|
|
250
|
+
let t4;
|
|
251
|
+
if ($[9] !== icons || $[10] !== parentIcons) {
|
|
252
|
+
t4 = icons ? Object.freeze({
|
|
253
|
+
...parentIcons,
|
|
254
|
+
...icons
|
|
255
|
+
}) : parentIcons;
|
|
256
|
+
$[9] = icons;
|
|
257
|
+
$[10] = parentIcons;
|
|
258
|
+
$[11] = t4;
|
|
259
|
+
} else {
|
|
260
|
+
t4 = $[11];
|
|
261
|
+
}
|
|
262
|
+
const names = t4;
|
|
263
|
+
let t5;
|
|
264
|
+
if ($[12] !== content || $[13] !== names) {
|
|
265
|
+
t5 = /* @__PURE__ */ jsx(IconsContext, { value: names, children: content });
|
|
266
|
+
$[12] = content;
|
|
267
|
+
$[13] = names;
|
|
268
|
+
$[14] = t5;
|
|
269
|
+
} else {
|
|
270
|
+
t5 = $[14];
|
|
271
|
+
}
|
|
272
|
+
let t6;
|
|
273
|
+
if ($[15] !== parts || $[16] !== t5) {
|
|
274
|
+
t6 = /* @__PURE__ */ jsx(ComponentsContext, { value: parts, children: t5 });
|
|
275
|
+
$[15] = parts;
|
|
276
|
+
$[16] = t5;
|
|
277
|
+
$[17] = t6;
|
|
278
|
+
} else {
|
|
279
|
+
t6 = $[17];
|
|
280
|
+
}
|
|
281
|
+
let t7;
|
|
282
|
+
if ($[18] !== configs || $[19] !== t6) {
|
|
283
|
+
t7 = /* @__PURE__ */ jsx(ThemeContext, { value: configs, children: t6 });
|
|
284
|
+
$[18] = configs;
|
|
285
|
+
$[19] = t6;
|
|
286
|
+
$[20] = t7;
|
|
287
|
+
} else {
|
|
288
|
+
t7 = $[20];
|
|
289
|
+
}
|
|
290
|
+
return t7;
|
|
291
|
+
}
|
|
292
|
+
function _temp(entry) {
|
|
293
|
+
return [entry.id, entry.config];
|
|
294
|
+
}
|
|
295
|
+
function missingTheme(id) {
|
|
296
|
+
return new Error(`Theme "${id}" is missing. Ensure its theme configuration is provided to <ThemeProvider themes={[...]}> (e.g. in src/config/ or your theme setup).`);
|
|
297
|
+
}
|
|
298
|
+
function useTheme(spec) {
|
|
299
|
+
const config = use(ThemeContext).get(spec.id);
|
|
300
|
+
if (!config) throw missingTheme(spec.id);
|
|
301
|
+
return {
|
|
302
|
+
slots: config.slots,
|
|
303
|
+
styles: config.styles ?? {}
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
var motionTokens = /* @__PURE__ */ new WeakMap();
|
|
307
|
+
function useMotionTokens() {
|
|
308
|
+
const state = use(MotionContext);
|
|
309
|
+
const tokens = getOrInsert(motionTokens, state, () => ({
|
|
310
|
+
...state.tokens,
|
|
311
|
+
reduced: state.reduced
|
|
312
|
+
}));
|
|
313
|
+
return tokens;
|
|
314
|
+
}
|
|
315
|
+
var resolvedMotion = /* @__PURE__ */ new WeakMap();
|
|
316
|
+
function resolveModuleMotion(state, motion) {
|
|
317
|
+
const byConfig = getOrInsert(resolvedMotion, state, () => /* @__PURE__ */ new WeakMap());
|
|
318
|
+
return getOrInsert(byConfig, motion, () => retimeModuleMotion(motion, state));
|
|
319
|
+
}
|
|
320
|
+
function useModuleMotion(spec) {
|
|
321
|
+
const config = use(ThemeContext).get(spec.id);
|
|
322
|
+
const state = use(MotionContext);
|
|
323
|
+
if (!config) throw missingTheme(spec.id);
|
|
324
|
+
if (!config.motion || typeof config.motion !== "object") {
|
|
325
|
+
throw new Error(`Motion for theme "${spec.id}" is missing. Add \`motion\` to its defineTheme(...) next to \`slots\` (see docs/theming.md).`);
|
|
326
|
+
}
|
|
327
|
+
return resolveModuleMotion(state, config.motion);
|
|
328
|
+
}
|
|
329
|
+
function useOptionalModuleMotion(spec) {
|
|
330
|
+
const motion = use(ThemeContext).get(spec.id)?.motion;
|
|
331
|
+
const state = use(MotionContext);
|
|
332
|
+
if (!motion || typeof motion !== "object") return null;
|
|
333
|
+
return resolveModuleMotion(state, motion);
|
|
334
|
+
}
|
|
335
|
+
function ModuleMotionConfig(t0) {
|
|
336
|
+
const $ = c(3);
|
|
337
|
+
const {
|
|
338
|
+
children
|
|
339
|
+
} = t0;
|
|
340
|
+
const {
|
|
341
|
+
tokens
|
|
342
|
+
} = use(MotionContext);
|
|
343
|
+
let t1;
|
|
344
|
+
if ($[0] !== children || $[1] !== tokens.reducedMotion) {
|
|
345
|
+
t1 = /* @__PURE__ */ jsx(MotionConfig, { reducedMotion: tokens.reducedMotion, children });
|
|
346
|
+
$[0] = children;
|
|
347
|
+
$[1] = tokens.reducedMotion;
|
|
348
|
+
$[2] = t1;
|
|
349
|
+
} else {
|
|
350
|
+
t1 = $[2];
|
|
351
|
+
}
|
|
352
|
+
return t1;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export { ModuleMotionConfig, ThemeButton, ThemeIcon, ThemeProvider, ThemeSpinner, ThemeTooltip, defineTheme, defineThemeSpec, useIconName, useModuleMotion, useMotionTokens, useOptionalModuleMotion, useTheme, useThemeComponents };
|
|
356
|
+
//# sourceMappingURL=chunk-AKPH5CEJ.js.map
|
|
357
|
+
//# sourceMappingURL=chunk-AKPH5CEJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/react/theme/parts.tsx","../src/react/theme/index.tsx"],"names":["PlainButton","t0","$","_c","props","t1","type","undefined","t2","Nothing","Untipped","children","PLAIN","Object","freeze","Button","Icon","Spinner","Tooltip","NO_ICONS","ComponentsContext","getOrCreateGlobalContext","IconsContext","mergeComponents","parent","own","useThemeComponents","use","useIconName","icons","source","ThemeIcon","icon","name","ThemeButton","ThemeSpinner","ThemeTooltip","defineThemeSpec","id","defineTheme","spec","config","EMPTY","Map","ThemeContext","DEFAULT_MOTION","defineMotion","NO_MOTION_PROVIDER","reduced","tempo","NEUTRAL_TEMPO","tokens","MotionContext","MotionProvider","prefersReduced","useReducedMotion","reducedMotion","still","state","jsx","ThemeProvider","components","motion","themes","map","_temp","configs","inheritsMotion","providesMotion","Boolean","content","parentComponents","parentIcons","t3","parts","t4","names","t5","t6","t7","entry","missingTheme","Error","useTheme","get","slots","styles","motionTokens","WeakMap","useMotionTokens","getOrInsert","resolvedMotion","resolveModuleMotion","byConfig","retimeModuleMotion","useModuleMotion","useOptionalModuleMotion","ModuleMotionConfig"],"mappings":";;;;;;;AAkGA,SAAAA,YAAAC,EAAAA,EAAA;AAAA,EAAA,MAAAC,CAAAA,GAAAC,EAAA,CAAA,CAAA;AAAA,EAAA,IAAAC,KAAAA;AAAA,EAAA,IAAAC,EAAAA;AAAA,EAAA,IAAAH,CAAAA,CAAA,CAAA,CAAA,KAAAD,EAAAA,EAAA;AAAqB,IAAA,CAAA;MAAAK,IAAAA,EAAAD,EAAAA;MAAA,GAAAD;KAAA,GAAAH,EAAAA;AAA+CC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAD,EAAAA;AAAAC,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAE,KAAAA;AAAAF,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAG,EAAAA;EAAA,CAAA,MAAA;AAAAD,IAAAA,KAAAA,GAAAF,EAAA,CAAA,CAAA;AAAAG,IAAAA,EAAAA,GAAAH,EAAA,CAAA,CAAA;AAAA,EAAA;AAA7C,EAAA,MAAAI,IAAAA,GAAAD,EAAAA,KAAAE,MAAAA,GAAA,QAAA,GAAAF,EAAAA;AAAe,EAAA,IAAAG,EAAAA;AAAA,EAAA,IAAAN,EAAA,CAAA,CAAA,KAAAE,SAAAF,CAAAA,CAAA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AAAA;GAAA,GAAAV,EAAAA;AACjC,EAAA,MAAA;AAAAkD,IAAAA;AAAA,GAAA,GAAmBxB,IAAIyB,aAAa,CAAA;AAAE,EAAA,IAAA/C,EAAAA;AAAA,EAAA,IAAAH,CAAAA,CAAA,CAAA,CAAA,KAAAS,QAAAA,IAAAT,EAAA,CAAA,CAAA,KAAAiD,OAAAK,aAAAA,EAAA;AAEpCnD,IAAAA,EAAAA,mBAAAsD,GAAAA,CAAC,YAAA,EAAA,EAA4B,aAAA,EAAAR,MAAAA,CAAMK,eAAiB7C,QAAAA,EAAS,CAAA;AAAeT,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAS,QAAAA;AAAAT,IAAAA,CAAAA,CAAA,CAAA,IAAAiD,MAAAA,CAAAK,aAAAA;AAAAtD,IAAAA,CAAAA,CAAA,CAAA,CAAA,GAAAG,EAAAA;EAAA,CAAA,MAAA;AAAAA,IAAAA,EAAAA,GAAAH,EAAA,CAAA,CAAA;AAAA,EAAA;AAAA,EAAA,OAA5EG,EAAAA;AAA4E","file":"chunk-AKPH5CEJ.js","sourcesContent":["\"use client\";\n\nimport {\n type ButtonHTMLAttributes,\n type ComponentType,\n type CSSProperties,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n type Ref,\n use,\n} from \"react\";\n\nimport { getOrCreateGlobalContext } from \"@/react/context\";\n\n// The framework draws no UI of its own. Where a module needs a button, an\n// icon, a spinner or a tooltip it renders the component the app hands to\n// `ThemeProvider` (`components`), and names its own icons by key (`icons`).\n\n/**\n * Props a module passes to the app's button. Module buttons carry no variant:\n * the look comes from the module theme's slot in `className`.\n */\nexport interface ThemeButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n [data: `data-${string}`]: string | number | boolean | undefined;\n ref?: Ref<HTMLButtonElement>;\n}\n\n/**\n * Props a module passes to the app's icon: an icon name (the app's own, or\n * one of the framework's keys already resolved through `icons`) and a size in px.\n */\nexport interface ThemeIconProps {\n className?: string;\n color?: string;\n icon: string;\n onClick?: MouseEventHandler<HTMLElement>;\n size?: number;\n style?: CSSProperties;\n}\n\n/**\n * Props a module passes to the app's spinner.\n */\nexport interface ThemeSpinnerProps {\n className?: string;\n size?: number;\n}\n\n/**\n * Props a module passes to the app's tooltip; `children` is the trigger.\n */\nexport interface ThemeTooltipProps {\n children: ReactElement;\n className?: string;\n sideOffset?: number;\n text?: ReactNode;\n}\n\n/**\n * The components the modules draw with. Each one is optional: without it a\n * module renders a plain `<button>`, no icon, no spinner and no tooltip.\n */\nexport interface ThemeComponents {\n Button: ComponentType<ThemeButtonProps>;\n Icon: ComponentType<ThemeIconProps>;\n Spinner: ComponentType<ThemeSpinnerProps>;\n Tooltip: ComponentType<ThemeTooltipProps>;\n}\n\n/**\n * The icons the framework's own modules show, by key. The app maps each key\n * to an icon name its `Icon` understands; an unmapped key draws nothing.\n */\nexport type FrameworkIcon =\n | \"back\"\n | \"close\"\n | \"danger\"\n | \"error\"\n | \"forbidden\"\n | \"forward\"\n | \"next\"\n | \"pause\"\n | \"pip\"\n | \"play\"\n | \"repeat\"\n | \"rewind\"\n | \"volumeLoud\"\n | \"volumeMuted\"\n | \"volumeSmall\"\n | \"wifi\"\n | \"wifiOff\";\n\n/**\n * The app's icon name for each framework icon key.\n */\nexport type ThemeIcons = Readonly<Partial<Record<FrameworkIcon, string>>>;\n\nfunction PlainButton({ type = \"button\", ...props }: ThemeButtonProps) {\n return <button type={type} {...props} />;\n}\n\nconst Nothing = () => null;\n\nfunction Untipped({ children }: ThemeTooltipProps) {\n return children;\n}\n\nconst PLAIN: ThemeComponents = Object.freeze({\n Button: PlainButton,\n Icon: Nothing,\n Spinner: Nothing,\n Tooltip: Untipped,\n});\n\nconst NO_ICONS: ThemeIcons = Object.freeze({});\n\nexport const ComponentsContext = getOrCreateGlobalContext<ThemeComponents>(\n \"ThemeComponentsContext\",\n PLAIN,\n);\n\nexport const IconsContext = getOrCreateGlobalContext<ThemeIcons>(\n \"ThemeIconsContext\",\n NO_ICONS,\n);\n\n/**\n * Merges the app's components over the plain ones (or over the ones a parent\n * provider already set).\n */\nexport function mergeComponents(\n parent: ThemeComponents,\n own: Partial<ThemeComponents> | undefined,\n): ThemeComponents {\n return own ? Object.freeze({ ...parent, ...own }) : parent;\n}\n\n/**\n * The components the modules draw with.\n */\nexport function useThemeComponents(): ThemeComponents {\n return use(ComponentsContext);\n}\n\n/**\n * Resolves a framework icon key to the app's icon name; any other string (an\n * icon name the app gave a module) passes through unchanged.\n */\nexport function useIconName(): (source: string) => string {\n const icons = use(IconsContext);\n return (source) => icons[source as FrameworkIcon] ?? source;\n}\n\n/**\n * Draws an icon by name or framework key with the app's `Icon`.\n */\nexport function ThemeIcon({ icon, ...props }: ThemeIconProps) {\n const { Icon } = use(ComponentsContext);\n const name = useIconName();\n return <Icon icon={name(icon)} {...props} />;\n}\n\n/**\n * Draws a module button with the app's `Button`.\n */\nexport function ThemeButton(props: ThemeButtonProps) {\n const { Button } = use(ComponentsContext);\n return <Button {...props} />;\n}\n\n/**\n * Draws a spinner with the app's `Spinner`.\n */\nexport function ThemeSpinner(props: ThemeSpinnerProps) {\n const { Spinner } = use(ComponentsContext);\n return <Spinner {...props} />;\n}\n\n/**\n * Wraps a trigger in the app's `Tooltip`.\n */\nexport function ThemeTooltip(props: ThemeTooltipProps) {\n const { Tooltip } = use(ComponentsContext);\n return <Tooltip {...props} />;\n}\n","\"use client\";\n\nimport { MotionConfig, useReducedMotion } from \"motion/react\";\nimport { type CSSProperties, type ReactNode, use, useMemo } from \"react\";\n\nimport { getOrInsert } from \"@/foundation/utils/collections\";\nimport {\n defineMotion,\n type MotionClock,\n type MotionTokens,\n NEUTRAL_TEMPO,\n retimeModuleMotion,\n} from \"@/foundation/utils/tempo\";\nimport { getOrCreateGlobalContext } from \"@/react/context\";\n\nimport {\n ComponentsContext,\n IconsContext,\n mergeComponents,\n type ThemeComponents,\n type ThemeIcons,\n} from \"./parts\";\n\nexport {\n type FrameworkIcon,\n type ThemeButtonProps,\n type ThemeComponents,\n ThemeButton,\n ThemeIcon,\n type ThemeIconProps,\n type ThemeIcons,\n ThemeSpinner,\n type ThemeSpinnerProps,\n ThemeTooltip,\n type ThemeTooltipProps,\n useIconName,\n useThemeComponents,\n} from \"./parts\";\n\n// ---- Theme definitions ----\n\n/**\n * A theme's identity and, through its type parameters, its slot names and motion shape.\n */\nexport interface ThemeSpec<S extends string = string, M = never> {\n readonly id: string;\n readonly _slots?: S;\n readonly _motion?: M;\n}\n\ninterface ThemeVisuals<S extends string> {\n slots: Readonly<Record<S, string>>;\n styles?: Readonly<Partial<Record<S, CSSProperties>>>;\n}\n\n/**\n * The slot classes, styles and (when the spec has motion) motion of a theme.\n */\nexport type ThemeConfig<S extends string, M = never> = ThemeVisuals<S> &\n ([M] extends [never] ? { motion?: undefined } : { motion: M });\n\n/**\n * The slot classes and styles a component receives from `useTheme`.\n */\nexport interface ResolvedTheme<S extends string> {\n readonly slots: Readonly<Record<S, string>>;\n readonly styles: Readonly<Partial<Record<S, CSSProperties>>>;\n}\n\n/**\n * A theme id paired with its configuration, as passed to `ThemeProvider`.\n */\nexport interface ThemeEntry {\n readonly id: string;\n readonly config: ThemeVisuals<string> & { motion?: unknown };\n}\n\n/**\n * Declares a theme's identity with its slot names and optional motion type.\n */\nexport function defineThemeSpec<S extends string, M = never>(\n id: string,\n): ThemeSpec<S, M> {\n return Object.freeze({ id });\n}\n\n/**\n * Binds a configuration to a theme spec.\n */\nexport function defineTheme<S extends string, M = never>(\n spec: ThemeSpec<S, M>,\n config: ThemeConfig<NoInfer<S>, NoInfer<M>>,\n): ThemeEntry {\n return { id: spec.id, config };\n}\n\n// ---- Contexts and providers ----\n\nconst EMPTY: ReadonlyMap<string, ThemeEntry[\"config\"]> = new Map();\nconst ThemeContext = getOrCreateGlobalContext<\n ReadonlyMap<string, ThemeEntry[\"config\"]>\n>(\"ThemeContext\", EMPTY);\n\ninterface MotionState extends MotionClock {\n readonly tokens: MotionTokens;\n}\n\nconst DEFAULT_MOTION = defineMotion({});\nconst NO_MOTION_PROVIDER: MotionState = Object.freeze({\n reduced: false,\n tempo: NEUTRAL_TEMPO,\n tokens: DEFAULT_MOTION,\n});\nconst MotionContext = getOrCreateGlobalContext<MotionState>(\n \"MotionContext\",\n NO_MOTION_PROVIDER,\n);\n\ninterface MotionProviderProps {\n children?: ReactNode;\n tokens: MotionTokens;\n}\n\nfunction MotionProvider({ children, tokens }: MotionProviderProps) {\n const prefersReduced = useReducedMotion() === true;\n const reduced =\n tokens.reducedMotion === \"always\" ||\n (tokens.reducedMotion === \"user\" && prefersReduced);\n // stable identity: consumers subscribe by reference\n const state = useMemo<MotionState>(\n () =>\n Object.freeze({\n reduced,\n still: tokens.still,\n tempo: tokens.tempo,\n tokens,\n }),\n [reduced, tokens],\n );\n return <MotionContext value={state}>{children}</MotionContext>;\n}\n\ninterface ThemeProviderProps {\n children?: ReactNode;\n /** The button, icon, spinner and tooltip the modules draw with. */\n components?: Partial<ThemeComponents>;\n /** The app's icon name for each icon the framework's modules show. */\n icons?: ThemeIcons;\n motion?: MotionTokens;\n themes: readonly ThemeEntry[];\n}\n\n/**\n * Provides themes, and motion tokens when given, to the tree below it.\n */\nexport function ThemeProvider({\n children,\n components,\n icons,\n motion,\n themes,\n}: ThemeProviderProps) {\n // stable identity: consumers subscribe by reference\n const configs = useMemo(\n () => new Map(themes.map((entry) => [entry.id, entry.config])),\n [themes],\n );\n const inheritsMotion = use(MotionContext) !== NO_MOTION_PROVIDER;\n const providesMotion = Boolean(motion) || !inheritsMotion;\n const content = providesMotion ? (\n <MotionProvider tokens={motion ?? DEFAULT_MOTION}>\n {children}\n </MotionProvider>\n ) : (\n children\n );\n const parentComponents = use(ComponentsContext);\n const parentIcons = use(IconsContext);\n // stable identity: consumers subscribe by reference\n const parts = useMemo(\n () => mergeComponents(parentComponents, components),\n [components, parentComponents],\n );\n const names = useMemo(\n () => (icons ? Object.freeze({ ...parentIcons, ...icons }) : parentIcons),\n [icons, parentIcons],\n );\n return (\n <ThemeContext value={configs}>\n <ComponentsContext value={parts}>\n <IconsContext value={names}>{content}</IconsContext>\n </ComponentsContext>\n </ThemeContext>\n );\n}\n\n// ---- Hooks ----\n\nfunction missingTheme(id: string): Error {\n return new Error(\n `Theme \"${id}\" is missing. Ensure its theme configuration is provided to <ThemeProvider themes={[...]}> (e.g. in src/config/ or your theme setup).`,\n );\n}\n\n/**\n * Returns the slot classes and styles configured for a theme spec.\n */\nexport function useTheme<S extends string>(\n spec: ThemeSpec<S, unknown>,\n): ResolvedTheme<S> {\n const config = use(ThemeContext).get(spec.id);\n if (!config) throw missingTheme(spec.id);\n return {\n slots: config.slots,\n styles: config.styles ?? {},\n };\n}\n\n// Cached per motion state, so `useMotionTokens` returns a stable object without memo.\nconst motionTokens = new WeakMap<\n MotionState,\n MotionTokens & { readonly reduced: boolean }\n>();\n\n/**\n * Returns the current motion tokens plus whether motion is reduced.\n */\nexport function useMotionTokens<T extends MotionTokens = MotionTokens>(): T & {\n readonly reduced: boolean;\n} {\n const state = use(MotionContext);\n const tokens = getOrInsert(motionTokens, state, () => ({\n ...state.tokens,\n reduced: state.reduced,\n }));\n return tokens as T & { readonly reduced: boolean };\n}\n\n// Retimed module motion, cached per motion state and motion config.\nconst resolvedMotion = new WeakMap<MotionState, WeakMap<object, unknown>>();\n\nfunction resolveModuleMotion(state: MotionState, motion: object): unknown {\n const byConfig = getOrInsert(resolvedMotion, state, () => new WeakMap());\n return getOrInsert(byConfig, motion, () => retimeModuleMotion(motion, state));\n}\n\n/**\n * Returns a theme's motion, retimed to the current tempo; throws if it has none.\n */\nexport function useModuleMotion<M>(spec: ThemeSpec<string, M>): M {\n const config = use(ThemeContext).get(spec.id);\n const state = use(MotionContext);\n if (!config) throw missingTheme(spec.id);\n if (!config.motion || typeof config.motion !== \"object\") {\n throw new Error(\n `Motion for theme \"${spec.id}\" is missing. Add \\`motion\\` to its defineTheme(...) next to \\`slots\\` (see docs/theming.md).`,\n );\n }\n return resolveModuleMotion(state, config.motion) as M;\n}\n\n/**\n * Like `useModuleMotion`, but returns null when the theme has no motion.\n */\nexport function useOptionalModuleMotion<M>(\n spec: ThemeSpec<string, M>,\n): M | null {\n const motion = use(ThemeContext).get(spec.id)?.motion;\n const state = use(MotionContext);\n if (!motion || typeof motion !== \"object\") return null;\n return resolveModuleMotion(state, motion) as M;\n}\n\n// ---- Motion config ----\n\ninterface ModuleMotionConfigProps {\n children?: ReactNode;\n}\n\n/**\n * Applies the motion tokens' reduced-motion policy to motion components below it.\n */\nexport function ModuleMotionConfig({ children }: ModuleMotionConfigProps) {\n const { tokens } = use(MotionContext);\n return (\n <MotionConfig reducedMotion={tokens.reducedMotion}>{children}</MotionConfig>\n );\n}\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useOptionalDockState } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { defineThemeSpec, useTheme, useModuleMotion } from './chunk-
|
|
6
|
-
import { createStore, toFiniteNumber, report, isBrowser, isImageIconSource } from './chunk-
|
|
1
|
+
import { useOptionalDockState } from './chunk-XIFQMK2Z.js';
|
|
2
|
+
import { useIsClient } from './chunk-T53WFIZN.js';
|
|
3
|
+
import { defineModule, useRegistryEntries, useModuleRegistration } from './chunk-ED32WLAD.js';
|
|
4
|
+
import { useStore, useRequiredContext } from './chunk-JWUKAZ3A.js';
|
|
5
|
+
import { defineThemeSpec, useTheme, ThemeIcon, useModuleMotion } from './chunk-AKPH5CEJ.js';
|
|
6
|
+
import { createStore, toFiniteNumber, report, isBrowser, isImageIconSource } from './chunk-S67HGKJ2.js';
|
|
7
7
|
import { getOrCreateGlobalContext } from './chunk-J3VTDBC6.js';
|
|
8
|
-
import { isObject, toArray } from './chunk-
|
|
9
|
-
import { useState, useLayoutEffect, useEffect, isValidElement, useRef
|
|
8
|
+
import { isObject, toArray } from './chunk-YHWA7FXX.js';
|
|
9
|
+
import { useState, useLayoutEffect, useEffect, isValidElement, useRef } from 'react';
|
|
10
10
|
import { c } from 'react/compiler-runtime';
|
|
11
11
|
import { usePathname } from 'next/navigation';
|
|
12
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -50,7 +50,8 @@ function resolveAsBoolean(value, context, defaultValue = true) {
|
|
|
50
50
|
if (typeof value === "function") {
|
|
51
51
|
try {
|
|
52
52
|
return Boolean(value(context));
|
|
53
|
-
} catch {
|
|
53
|
+
} catch (error) {
|
|
54
|
+
report("Context menu condition", error);
|
|
54
55
|
return false;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
@@ -64,7 +65,8 @@ function resolveAsValue(value, context, fallback) {
|
|
|
64
65
|
try {
|
|
65
66
|
const resolved = value(context);
|
|
66
67
|
return resolved === void 0 ? fallback : resolved;
|
|
67
|
-
} catch {
|
|
68
|
+
} catch (error) {
|
|
69
|
+
report("Context menu value", error);
|
|
68
70
|
return fallback;
|
|
69
71
|
}
|
|
70
72
|
}
|
|
@@ -221,7 +223,8 @@ function isPathAllowed(config, registryKey, pathname) {
|
|
|
221
223
|
if (typeof config.pathMatcher === "function") {
|
|
222
224
|
try {
|
|
223
225
|
return Boolean(config.pathMatcher(pathname));
|
|
224
|
-
} catch {
|
|
226
|
+
} catch (error) {
|
|
227
|
+
report("Context menu pathMatcher", error);
|
|
225
228
|
return false;
|
|
226
229
|
}
|
|
227
230
|
}
|
|
@@ -274,7 +277,8 @@ function buildMenuContext(config, event, pathname, targetElement) {
|
|
|
274
277
|
try {
|
|
275
278
|
const payload = config.resolvePayload?.(event, context);
|
|
276
279
|
if (payload !== void 0) context.payload = payload;
|
|
277
|
-
} catch {
|
|
280
|
+
} catch (error) {
|
|
281
|
+
report("Context menu resolvePayload", error);
|
|
278
282
|
}
|
|
279
283
|
try {
|
|
280
284
|
const extra = config.resolveContext?.(event, context);
|
|
@@ -282,7 +286,8 @@ function buildMenuContext(config, event, pathname, targetElement) {
|
|
|
282
286
|
...context,
|
|
283
287
|
...extra
|
|
284
288
|
};
|
|
285
|
-
} catch {
|
|
289
|
+
} catch (error) {
|
|
290
|
+
report("Context menu resolveContext", error);
|
|
286
291
|
}
|
|
287
292
|
return context;
|
|
288
293
|
}
|
|
@@ -308,7 +313,8 @@ function passesWhen(config, event, info) {
|
|
|
308
313
|
if (typeof config.when !== "function") return config.when !== false;
|
|
309
314
|
try {
|
|
310
315
|
return Boolean(config.when(event, info));
|
|
311
|
-
} catch {
|
|
316
|
+
} catch (error) {
|
|
317
|
+
report("Context menu when", error);
|
|
312
318
|
return false;
|
|
313
319
|
}
|
|
314
320
|
}
|
|
@@ -519,10 +525,10 @@ function ContextMenuProvider(t0) {
|
|
|
519
525
|
}
|
|
520
526
|
|
|
521
527
|
// src/modules/context-menu/dom.ts
|
|
528
|
+
var SCROLL_LOCK_KEYS = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "End", "Home", "PageDown", "PageUp", " ", "Spacebar"]);
|
|
522
529
|
function joinClassNames(...classes) {
|
|
523
530
|
return classes.filter(Boolean).join(" ");
|
|
524
531
|
}
|
|
525
|
-
var SCROLL_LOCK_KEYS = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "End", "Home", "PageDown", "PageUp", " ", "Spacebar"]);
|
|
526
532
|
function isScrollLockKey(event) {
|
|
527
533
|
return SCROLL_LOCK_KEYS.has(event.key);
|
|
528
534
|
}
|
|
@@ -541,10 +547,8 @@ function positionMenu(menuElement, position) {
|
|
|
541
547
|
}
|
|
542
548
|
function getNextActiveIndex(items, current, direction) {
|
|
543
549
|
const count = items.length;
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
else if (direction === 1) start = 0;
|
|
547
|
-
else start = count - 1;
|
|
550
|
+
const fromEdge = direction === 1 ? 0 : count - 1;
|
|
551
|
+
const start = current >= 0 ? current + direction : fromEdge;
|
|
548
552
|
for (let step = 0; step < count; step++) {
|
|
549
553
|
const index = ((start + step * direction) % count + count) % count;
|
|
550
554
|
if (items[index].type === "action" && !items[index].disabled) return index;
|
|
@@ -900,6 +904,13 @@ function useContextMenuContentModel(t0) {
|
|
|
900
904
|
function useContextMenuMotion() {
|
|
901
905
|
return useModuleMotion(contextMenuTheme);
|
|
902
906
|
}
|
|
907
|
+
var EMPTY_MENU_CONTEXT = Object.freeze({
|
|
908
|
+
pathname: "",
|
|
909
|
+
point: {
|
|
910
|
+
x: 0,
|
|
911
|
+
y: 0
|
|
912
|
+
}
|
|
913
|
+
});
|
|
903
914
|
function ContextMenuHeaderIcon(t0) {
|
|
904
915
|
const $ = c(10);
|
|
905
916
|
const {
|
|
@@ -932,7 +943,7 @@ function ContextMenuHeaderIcon(t0) {
|
|
|
932
943
|
}
|
|
933
944
|
let t1;
|
|
934
945
|
if ($[5] !== icon) {
|
|
935
|
-
t1 = typeof icon === "string" ? /* @__PURE__ */ jsx(
|
|
946
|
+
t1 = typeof icon === "string" ? /* @__PURE__ */ jsx(ThemeIcon, { icon, size: HEADER_ICON_SIZE }) : icon;
|
|
936
947
|
$[5] = icon;
|
|
937
948
|
$[6] = t1;
|
|
938
949
|
} else {
|
|
@@ -1068,7 +1079,7 @@ function ContextMenuItem(t0) {
|
|
|
1068
1079
|
const itemIconClassName = t2;
|
|
1069
1080
|
let t3;
|
|
1070
1081
|
if ($[8] !== item.icon || $[9] !== itemIconClassName) {
|
|
1071
|
-
t3 = typeof item.icon === "string" ? /* @__PURE__ */ jsx(
|
|
1082
|
+
t3 = typeof item.icon === "string" ? /* @__PURE__ */ jsx(ThemeIcon, { icon: item.icon, className: itemIconClassName, size: ITEM_ICON_SIZE }) : item.icon;
|
|
1072
1083
|
$[8] = item.icon;
|
|
1073
1084
|
$[9] = itemIconClassName;
|
|
1074
1085
|
$[10] = t3;
|
|
@@ -1129,13 +1140,6 @@ function ContextMenuItem(t0) {
|
|
|
1129
1140
|
}
|
|
1130
1141
|
return t9;
|
|
1131
1142
|
}
|
|
1132
|
-
var EMPTY_MENU_CONTEXT = Object.freeze({
|
|
1133
|
-
pathname: "",
|
|
1134
|
-
point: {
|
|
1135
|
-
x: 0,
|
|
1136
|
-
y: 0
|
|
1137
|
-
}
|
|
1138
|
-
});
|
|
1139
1143
|
function ContextMenuContent(t0) {
|
|
1140
1144
|
const $ = c(49);
|
|
1141
1145
|
const {
|
|
@@ -1295,8 +1299,6 @@ function ContextMenuContent(t0) {
|
|
|
1295
1299
|
}
|
|
1296
1300
|
return t13;
|
|
1297
1301
|
}
|
|
1298
|
-
var emptySubscribe = () => () => {
|
|
1299
|
-
};
|
|
1300
1302
|
function ContextMenuRenderer() {
|
|
1301
1303
|
const $ = c(13);
|
|
1302
1304
|
const {
|
|
@@ -1307,7 +1309,7 @@ function ContextMenuRenderer() {
|
|
|
1307
1309
|
items,
|
|
1308
1310
|
position
|
|
1309
1311
|
} = useContextMenu();
|
|
1310
|
-
const isMounted =
|
|
1312
|
+
const isMounted = useIsClient();
|
|
1311
1313
|
if (!isMounted) {
|
|
1312
1314
|
return null;
|
|
1313
1315
|
}
|
|
@@ -1346,12 +1348,6 @@ function ContextMenuRenderer() {
|
|
|
1346
1348
|
}
|
|
1347
1349
|
return t2;
|
|
1348
1350
|
}
|
|
1349
|
-
function _temp2() {
|
|
1350
|
-
return false;
|
|
1351
|
-
}
|
|
1352
|
-
function _temp3() {
|
|
1353
|
-
return true;
|
|
1354
|
-
}
|
|
1355
1351
|
function ContextMenuGlobal() {
|
|
1356
1352
|
const $ = c(1);
|
|
1357
1353
|
useContextMenuListener();
|
|
@@ -1431,5 +1427,5 @@ function defineContextMenu(definition = {}) {
|
|
|
1431
1427
|
}
|
|
1432
1428
|
|
|
1433
1429
|
export { CONTEXT_MENU_VISIBILITY_EVENT, CURRENT_PAGE_KEY, ContextMenuContext, ContextMenuGlobal, ContextMenuHeader, ContextMenuHeaderIcon, ContextMenuItem, ContextMenuProvider, ContextMenuRenderer, GLOBAL_MENU_KEY, INITIAL_POSITION, MENU_SCREEN_MARGIN, contextMenuModule, contextMenuTheme, createInitialMenuState, defineContextMenu, emitContextMenuVisibility, extractNodeText, getNextActiveIndex, isScrollLockKey, joinClassNames, positionMenu, prepareMenu, resolveAsBoolean, resolveAsValue, resolveContextMenu, resolveContextMenuPageMeta, resolveMenuHeader, resolveMenuItems, resolveNextOpenState, safeInvoke, useContextMenu, useContextMenuActions, useContextMenuContentModel, useContextMenuListener, useContextMenuRegistration, useContextMenuState, useMenuDismissal };
|
|
1434
|
-
//# sourceMappingURL=chunk-
|
|
1435
|
-
//# sourceMappingURL=chunk-
|
|
1430
|
+
//# sourceMappingURL=chunk-AWLK2I56.js.map
|
|
1431
|
+
//# sourceMappingURL=chunk-AWLK2I56.js.map
|