@omerdlw/base-framework 3.1.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MIGRATION.md +75 -0
- package/README.md +33 -25
- package/dist/ambient/index.d.ts +1 -0
- package/dist/ambient/index.js +14 -0
- package/dist/ambient/server/index.d.ts +1 -0
- package/dist/ambient/server/index.js +238 -0
- package/dist/ambient/server/index.js.map +1 -0
- package/dist/ambient/worker/index.d.ts +1 -0
- package/dist/ambient/worker/index.js +143 -0
- package/dist/ambient/worker/index.js.map +1 -0
- package/dist/background/index.d.ts +1 -0
- package/dist/background/index.js +13 -0
- package/dist/chunk-26K6W4OQ.js +1435 -0
- package/dist/chunk-26K6W4OQ.js.map +1 -0
- package/dist/chunk-2BLGNT5I.js +850 -0
- package/dist/chunk-2BLGNT5I.js.map +1 -0
- package/dist/chunk-2LGI33JP.js +832 -0
- package/dist/chunk-2LGI33JP.js.map +1 -0
- package/dist/chunk-37OBXNEO.js +116 -0
- package/dist/chunk-37OBXNEO.js.map +1 -0
- package/dist/chunk-5GVH4BQV.js +577 -0
- package/dist/chunk-5GVH4BQV.js.map +1 -0
- package/dist/chunk-5H6FZW3N.js +535 -0
- package/dist/chunk-5H6FZW3N.js.map +1 -0
- package/dist/chunk-66MHDFNF.js +3488 -0
- package/dist/chunk-66MHDFNF.js.map +1 -0
- package/dist/chunk-7RSRDKYE.js +22 -0
- package/dist/chunk-7RSRDKYE.js.map +1 -0
- package/dist/chunk-AAT3QWHN.js +567 -0
- package/dist/chunk-AAT3QWHN.js.map +1 -0
- package/dist/chunk-BMFHS3GV.js +118 -0
- package/dist/chunk-BMFHS3GV.js.map +1 -0
- package/dist/chunk-CRKJAACG.js +81 -0
- package/dist/chunk-CRKJAACG.js.map +1 -0
- package/dist/chunk-CT4UILO2.js +537 -0
- package/dist/chunk-CT4UILO2.js.map +1 -0
- package/dist/chunk-ESD5EQ5H.js +178 -0
- package/dist/chunk-ESD5EQ5H.js.map +1 -0
- package/dist/chunk-GQKGOLHJ.js +1766 -0
- package/dist/chunk-GQKGOLHJ.js.map +1 -0
- package/dist/chunk-IR3DCLBM.js +17 -0
- package/dist/chunk-IR3DCLBM.js.map +1 -0
- package/dist/chunk-J3VTDBC6.js +14 -0
- package/dist/chunk-J3VTDBC6.js.map +1 -0
- package/dist/chunk-J4WUCHNR.js +825 -0
- package/dist/chunk-J4WUCHNR.js.map +1 -0
- package/dist/chunk-KMN6J5SL.js +493 -0
- package/dist/chunk-KMN6J5SL.js.map +1 -0
- package/dist/chunk-LA3CQ6NY.js +261 -0
- package/dist/chunk-LA3CQ6NY.js.map +1 -0
- package/dist/chunk-LTO77WSO.js +140 -0
- package/dist/chunk-LTO77WSO.js.map +1 -0
- package/dist/chunk-NTUQYA73.js +110 -0
- package/dist/chunk-NTUQYA73.js.map +1 -0
- package/dist/chunk-OEXWOZPS.js +139 -0
- package/dist/chunk-OEXWOZPS.js.map +1 -0
- package/dist/chunk-PUD4IB3L.js +15762 -0
- package/dist/chunk-PUD4IB3L.js.map +1 -0
- package/dist/chunk-RDYYP36I.js +27 -0
- package/dist/chunk-RDYYP36I.js.map +1 -0
- package/dist/chunk-RF2YGILF.js +656 -0
- package/dist/chunk-RF2YGILF.js.map +1 -0
- package/dist/chunk-WBBM67WL.js +460 -0
- package/dist/chunk-WBBM67WL.js.map +1 -0
- package/dist/chunk-WYVA6AN5.js +590 -0
- package/dist/chunk-WYVA6AN5.js.map +1 -0
- package/dist/chunk-Y2Q74PJP.js +537 -0
- package/dist/chunk-Y2Q74PJP.js.map +1 -0
- package/dist/chunk-ZE6OGGA7.js +2341 -0
- package/dist/chunk-ZE6OGGA7.js.map +1 -0
- package/dist/context-menu/index.d.ts +1 -0
- package/dist/context-menu/index.js +19 -0
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.js +10 -0
- package/dist/core/error/boundary.d.ts +27 -0
- package/dist/core/error/boundary.d.ts.map +1 -0
- package/dist/core/error/constants.d.ts +33 -0
- package/dist/core/error/constants.d.ts.map +1 -0
- package/dist/core/error/index.d.ts +9 -0
- package/dist/core/error/index.d.ts.map +1 -0
- package/dist/core/error/listener.d.ts +6 -0
- package/dist/core/error/listener.d.ts.map +1 -0
- package/dist/core/error/reporter.d.ts +49 -0
- package/dist/core/error/reporter.d.ts.map +1 -0
- package/dist/core/error/theme.d.ts +10 -0
- package/dist/core/error/theme.d.ts.map +1 -0
- package/dist/core/error/types.d.ts +128 -0
- package/dist/core/error/types.d.ts.map +1 -0
- package/dist/core/error/utils.d.ts +55 -0
- package/dist/core/error/utils.d.ts.map +1 -0
- package/dist/core/kernel/adapters.d.ts +9 -0
- package/dist/core/kernel/adapters.d.ts.map +1 -0
- package/dist/core/kernel/compose.d.ts +21 -0
- package/dist/core/kernel/compose.d.ts.map +1 -0
- package/dist/core/kernel/constants.d.ts +42 -0
- package/dist/core/kernel/constants.d.ts.map +1 -0
- package/dist/core/kernel/handlers.d.ts +7 -0
- package/dist/core/kernel/handlers.d.ts.map +1 -0
- package/dist/core/kernel/hooks.d.ts +13 -0
- package/dist/core/kernel/hooks.d.ts.map +1 -0
- package/dist/core/kernel/index.d.ts +15 -0
- package/dist/core/kernel/index.d.ts.map +1 -0
- package/dist/core/kernel/installed.d.ts +28 -0
- package/dist/core/kernel/installed.d.ts.map +1 -0
- package/dist/core/kernel/module.d.ts +57 -0
- package/dist/core/kernel/module.d.ts.map +1 -0
- package/dist/core/kernel/operations-records.d.ts +25 -0
- package/dist/core/kernel/operations-records.d.ts.map +1 -0
- package/dist/core/kernel/operations-resolve.d.ts +5 -0
- package/dist/core/kernel/operations-resolve.d.ts.map +1 -0
- package/dist/core/kernel/operations.d.ts +23 -0
- package/dist/core/kernel/operations.d.ts.map +1 -0
- package/dist/core/kernel/page-controller.d.ts +20 -0
- package/dist/core/kernel/page-controller.d.ts.map +1 -0
- package/dist/core/kernel/provider.d.ts +29 -0
- package/dist/core/kernel/provider.d.ts.map +1 -0
- package/dist/core/kernel/runtime.d.ts.map +1 -0
- package/dist/core/kernel/schema.d.ts +13 -0
- package/dist/core/kernel/schema.d.ts.map +1 -0
- package/dist/core/kernel/stabilize.d.ts +13 -0
- package/dist/core/kernel/stabilize.d.ts.map +1 -0
- package/dist/core/kernel/store-batch.d.ts +17 -0
- package/dist/core/kernel/store-batch.d.ts.map +1 -0
- package/dist/core/kernel/store-entries.d.ts +6 -0
- package/dist/core/kernel/store-entries.d.ts.map +1 -0
- package/dist/core/kernel/store-handles.d.ts +4 -0
- package/dist/core/kernel/store-handles.d.ts.map +1 -0
- package/dist/core/kernel/store-registration.d.ts +14 -0
- package/dist/core/kernel/store-registration.d.ts.map +1 -0
- package/dist/core/kernel/store-snapshots.d.ts +14 -0
- package/dist/core/kernel/store-snapshots.d.ts.map +1 -0
- package/dist/core/kernel/store-subscriptions.d.ts +16 -0
- package/dist/core/kernel/store-subscriptions.d.ts.map +1 -0
- package/dist/core/kernel/store.d.ts +8 -0
- package/dist/core/kernel/store.d.ts.map +1 -0
- package/dist/core/kernel/types-modules.d.ts +82 -0
- package/dist/core/kernel/types-modules.d.ts.map +1 -0
- package/dist/core/kernel/types-page.d.ts +67 -0
- package/dist/core/kernel/types-page.d.ts.map +1 -0
- package/dist/core/kernel/types-store.d.ts +71 -0
- package/dist/core/kernel/types-store.d.ts.map +1 -0
- package/dist/core/kernel/types.d.ts +169 -0
- package/dist/core/kernel/types.d.ts.map +1 -0
- package/dist/core/kernel/utils.d.ts +21 -0
- package/dist/core/kernel/utils.d.ts.map +1 -0
- package/dist/core/navigation/constants.d.ts +48 -0
- package/dist/core/navigation/constants.d.ts.map +1 -0
- package/dist/core/navigation/navigator-defaults.d.ts +4 -0
- package/dist/core/navigation/navigator-defaults.d.ts.map +1 -0
- package/dist/core/navigation/navigator-holds.d.ts +8 -0
- package/dist/core/navigation/navigator-holds.d.ts.map +1 -0
- package/dist/core/navigation/navigator-patience.d.ts +15 -0
- package/dist/core/navigation/navigator-patience.d.ts.map +1 -0
- package/dist/core/navigation/navigator-payload.d.ts +6 -0
- package/dist/core/navigation/navigator-payload.d.ts.map +1 -0
- package/dist/core/navigation/navigator-prefetch.d.ts +13 -0
- package/dist/core/navigation/navigator-prefetch.d.ts.map +1 -0
- package/dist/core/navigation/navigator.d.ts +7 -0
- package/dist/core/navigation/navigator.d.ts.map +1 -0
- package/dist/core/navigation/settings.d.ts +12 -0
- package/dist/core/navigation/settings.d.ts.map +1 -0
- package/dist/core/navigation/state.d.ts +26 -0
- package/dist/core/navigation/state.d.ts.map +1 -0
- package/dist/core/navigation/types.d.ts +194 -0
- package/dist/core/navigation/types.d.ts.map +1 -0
- package/dist/core/navigation/utils.d.ts +18 -0
- package/dist/core/navigation/utils.d.ts.map +1 -0
- package/dist/core/provider/index.d.ts +31 -0
- package/dist/core/provider/index.d.ts.map +1 -0
- package/dist/dock/index.d.ts +1 -0
- package/dist/dock/index.js +18 -0
- package/dist/error/index.d.ts +1 -9
- package/dist/error/index.js +8 -5
- package/dist/events/index.d.ts +1 -0
- package/dist/events/index.js +83 -0
- package/dist/events/index.js.map +1 -0
- package/dist/foundation/events/index.d.ts +67 -0
- package/dist/foundation/events/index.d.ts.map +1 -0
- package/dist/foundation/recipes/anatomy.d.ts +139 -0
- package/dist/foundation/recipes/anatomy.d.ts.map +1 -0
- package/dist/foundation/recipes/cn.d.ts +17 -0
- package/dist/foundation/recipes/cn.d.ts.map +1 -0
- package/dist/foundation/recipes/define.d.ts +134 -0
- package/dist/foundation/recipes/define.d.ts.map +1 -0
- package/dist/foundation/recipes/index.d.ts +11 -0
- package/dist/foundation/recipes/index.d.ts.map +1 -0
- package/dist/foundation/recipes/recipe.d.ts +97 -0
- package/dist/foundation/recipes/recipe.d.ts.map +1 -0
- package/dist/foundation/recipes/split.d.ts +10 -0
- package/dist/foundation/recipes/split.d.ts.map +1 -0
- package/dist/foundation/result/index.d.ts +98 -0
- package/dist/foundation/result/index.d.ts.map +1 -0
- package/dist/foundation/utils/dom.d.ts +19 -0
- package/dist/foundation/utils/dom.d.ts.map +1 -0
- package/dist/foundation/utils/index.d.ts +17 -0
- package/dist/foundation/utils/index.d.ts.map +1 -0
- package/dist/foundation/utils/number.d.ts +9 -0
- package/dist/foundation/utils/number.d.ts.map +1 -0
- package/dist/foundation/utils/object.d.ts +17 -0
- package/dist/foundation/utils/object.d.ts.map +1 -0
- package/dist/foundation/utils/report.d.ts +18 -0
- package/dist/foundation/utils/report.d.ts.map +1 -0
- package/dist/foundation/utils/scheduler.d.ts +52 -0
- package/dist/foundation/utils/scheduler.d.ts.map +1 -0
- package/dist/foundation/utils/store.d.ts +21 -0
- package/dist/foundation/utils/store.d.ts.map +1 -0
- package/dist/foundation/utils/string.d.ts +18 -0
- package/dist/foundation/utils/string.d.ts.map +1 -0
- package/dist/foundation/utils/tempo.d.ts +61 -0
- package/dist/foundation/utils/tempo.d.ts.map +1 -0
- package/dist/foundation/utils/timing.d.ts +13 -0
- package/dist/foundation/utils/timing.d.ts.map +1 -0
- package/dist/foundation/utils/transform.d.ts +17 -0
- package/dist/foundation/utils/transform.d.ts.map +1 -0
- package/dist/foundation/utils/user-message.d.ts +32 -0
- package/dist/foundation/utils/user-message.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -11
- package/dist/hooks/index.js +3 -1
- package/dist/index.d.ts +8 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -20
- package/dist/kernel/index.d.ts +1 -15
- package/dist/kernel/index.js +5 -2
- package/dist/loading/index.d.ts +1 -0
- package/dist/loading/index.js +12 -0
- package/dist/media/index.d.ts +1 -0
- package/dist/media/index.js +9 -0
- package/dist/modal/index.d.ts +1 -0
- package/dist/modal/index.js +310 -0
- package/dist/modal/index.js.map +1 -0
- package/dist/modules/ambient/analyze-bounds.d.ts +12 -0
- package/dist/modules/ambient/analyze-bounds.d.ts.map +1 -0
- package/dist/modules/ambient/analyze-clusters.d.ts +14 -0
- package/dist/modules/ambient/analyze-clusters.d.ts.map +1 -0
- package/dist/modules/ambient/analyze-measures.d.ts +22 -0
- package/dist/modules/ambient/analyze-measures.d.ts.map +1 -0
- package/dist/modules/ambient/analyze-swatches.d.ts +16 -0
- package/dist/modules/ambient/analyze-swatches.d.ts.map +1 -0
- package/dist/modules/ambient/analyze.d.ts +14 -22
- package/dist/modules/ambient/analyze.d.ts.map +1 -1
- package/dist/modules/ambient/constants.d.ts +4 -1
- package/dist/modules/ambient/constants.d.ts.map +1 -1
- package/dist/modules/ambient/context.d.ts +6 -0
- package/dist/modules/ambient/context.d.ts.map +1 -1
- package/dist/modules/ambient/dom.d.ts +25 -2
- package/dist/modules/ambient/dom.d.ts.map +1 -1
- package/dist/modules/ambient/extractor.d.ts +10 -0
- package/dist/modules/ambient/extractor.d.ts.map +1 -1
- package/dist/modules/ambient/hooks.d.ts +12 -0
- package/dist/modules/ambient/hooks.d.ts.map +1 -1
- package/dist/modules/ambient/module.d.ts +12 -1
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/oklab.d.ts +24 -0
- package/dist/modules/ambient/oklab.d.ts.map +1 -1
- package/dist/modules/ambient/quantize.d.ts +4 -0
- package/dist/modules/ambient/quantize.d.ts.map +1 -1
- package/dist/modules/ambient/server/address.d.ts +8 -0
- package/dist/modules/ambient/server/address.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.d.ts +24 -0
- package/dist/modules/ambient/server/index.d.ts.map +1 -1
- package/dist/modules/ambient/settings.d.ts +26 -0
- package/dist/modules/ambient/settings.d.ts.map +1 -1
- package/dist/modules/ambient/types.d.ts +100 -1
- package/dist/modules/ambient/types.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts +16 -0
- package/dist/modules/ambient/worker/index.d.ts.map +1 -1
- package/dist/modules/background/components/background-gradients.d.ts +8 -0
- package/dist/modules/background/components/background-gradients.d.ts.map +1 -0
- package/dist/modules/background/components/edge-gradient.d.ts +9 -0
- package/dist/modules/background/components/edge-gradient.d.ts.map +1 -0
- package/dist/modules/background/components/native-video.d.ts +4 -0
- package/dist/modules/background/components/native-video.d.ts.map +1 -0
- package/dist/modules/background/components/noise-overlay.d.ts +11 -0
- package/dist/modules/background/components/noise-overlay.d.ts.map +1 -0
- package/dist/modules/background/components/overlay.d.ts +6 -0
- package/dist/modules/background/components/overlay.d.ts.map +1 -0
- package/dist/modules/background/components/solid-overlay.d.ts +10 -0
- package/dist/modules/background/components/solid-overlay.d.ts.map +1 -0
- package/dist/modules/background/constants.d.ts +14 -1
- package/dist/modules/background/constants.d.ts.map +1 -1
- package/dist/modules/background/context.d.ts +7 -0
- package/dist/modules/background/context.d.ts.map +1 -1
- package/dist/modules/background/hooks/use-background-media-source.d.ts +4 -0
- package/dist/modules/background/hooks/use-background-media-source.d.ts.map +1 -0
- package/dist/modules/background/hooks/use-background-motion-model.d.ts +15 -0
- package/dist/modules/background/hooks/use-background-motion-model.d.ts.map +1 -0
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts +929 -0
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts.map +1 -0
- package/dist/modules/background/hooks/use-native-video-model.d.ts +22 -0
- package/dist/modules/background/hooks/use-native-video-model.d.ts.map +1 -0
- package/dist/modules/background/hooks.d.ts +20 -1
- package/dist/modules/background/hooks.d.ts.map +1 -1
- package/dist/modules/background/index.d.ts +6 -6
- package/dist/modules/background/index.d.ts.map +1 -1
- package/dist/modules/background/lib/theme.d.ts +4 -0
- package/dist/modules/background/lib/theme.d.ts.map +1 -0
- package/dist/modules/background/model/override.d.ts +14 -0
- package/dist/modules/background/model/override.d.ts.map +1 -0
- package/dist/modules/background/model/playback.d.ts +25 -0
- package/dist/modules/background/model/playback.d.ts.map +1 -0
- package/dist/modules/background/model/state.d.ts +31 -0
- package/dist/modules/background/model/state.d.ts.map +1 -0
- package/dist/modules/background/model/video-frame.d.ts +31 -0
- package/dist/modules/background/model/video-frame.d.ts.map +1 -0
- package/dist/modules/background/model/visual.d.ts +932 -0
- package/dist/modules/background/model/visual.d.ts.map +1 -0
- package/dist/modules/background/module.d.ts +11 -0
- package/dist/modules/background/module.d.ts.map +1 -1
- package/dist/modules/background/motion.d.ts.map +1 -1
- package/dist/modules/background/types.d.ts +66 -3
- package/dist/modules/background/types.d.ts.map +1 -1
- package/dist/modules/background/youtube/components/player.d.ts +7 -0
- package/dist/modules/background/youtube/components/player.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-background-player-model.d.ts +27 -0
- package/dist/modules/background/youtube/hooks/use-youtube-background-player-model.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts +20 -0
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts +8 -0
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts.map +1 -0
- package/dist/modules/background/youtube/hooks/use-youtube-video-sync.d.ts +16 -0
- package/dist/modules/background/youtube/hooks/use-youtube-video-sync.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/audio.d.ts +17 -0
- package/dist/modules/background/youtube/lib/audio.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts +29 -0
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts +47 -0
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/iframe.d.ts +47 -0
- package/dist/modules/background/youtube/lib/iframe.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/parse.d.ts +36 -0
- package/dist/modules/background/youtube/lib/parse.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/timing.d.ts +11 -0
- package/dist/modules/background/youtube/lib/timing.d.ts.map +1 -0
- package/dist/modules/background/youtube/lib/video-events.d.ts +53 -0
- package/dist/modules/background/youtube/lib/video-events.d.ts.map +1 -0
- package/dist/modules/context-menu/constants.d.ts +30 -1
- package/dist/modules/context-menu/constants.d.ts.map +1 -1
- package/dist/modules/context-menu/context.d.ts +10 -2
- package/dist/modules/context-menu/context.d.ts.map +1 -1
- package/dist/modules/context-menu/dom.d.ts +13 -0
- package/dist/modules/context-menu/dom.d.ts.map +1 -1
- package/dist/modules/context-menu/hooks.d.ts +32 -5
- package/dist/modules/context-menu/hooks.d.ts.map +1 -1
- package/dist/modules/context-menu/items.d.ts +25 -0
- package/dist/modules/context-menu/items.d.ts.map +1 -1
- package/dist/modules/context-menu/module.d.ts +6 -0
- package/dist/modules/context-menu/module.d.ts.map +1 -1
- package/dist/modules/context-menu/motion.d.ts.map +1 -1
- package/dist/modules/context-menu/overlay.d.ts +30 -8
- package/dist/modules/context-menu/overlay.d.ts.map +1 -1
- package/dist/modules/context-menu/resolver.d.ts +8 -0
- package/dist/modules/context-menu/resolver.d.ts.map +1 -1
- package/dist/modules/context-menu/state.d.ts +9 -0
- package/dist/modules/context-menu/state.d.ts.map +1 -1
- package/dist/modules/context-menu/types.d.ts +85 -3
- package/dist/modules/context-menu/types.d.ts.map +1 -1
- package/dist/modules/controls/constants.d.ts +18 -1
- package/dist/modules/controls/constants.d.ts.map +1 -1
- package/dist/modules/controls/entries.d.ts +23 -1
- package/dist/modules/controls/entries.d.ts.map +1 -1
- package/dist/modules/controls/hooks.d.ts +11 -1
- package/dist/modules/controls/hooks.d.ts.map +1 -1
- package/dist/modules/controls/layout.d.ts +17 -0
- package/dist/modules/controls/layout.d.ts.map +1 -1
- package/dist/modules/controls/module.d.ts +7 -1
- package/dist/modules/controls/module.d.ts.map +1 -1
- package/dist/modules/controls/overlay.d.ts +11 -1
- package/dist/modules/controls/overlay.d.ts.map +1 -1
- package/dist/modules/controls/types.d.ts +51 -2
- package/dist/modules/controls/types.d.ts.map +1 -1
- package/dist/modules/dock/components/badge.d.ts +5 -0
- package/dist/modules/dock/components/badge.d.ts.map +1 -0
- package/dist/modules/dock/components/breadcrumbs-card.d.ts +6 -0
- package/dist/modules/dock/components/breadcrumbs-card.d.ts.map +1 -0
- package/dist/modules/dock/components/card-banner.d.ts +4 -0
- package/dist/modules/dock/components/card-banner.d.ts.map +1 -0
- package/dist/modules/dock/components/card-header.d.ts +4 -0
- package/dist/modules/dock/components/card-header.d.ts.map +1 -0
- package/dist/modules/dock/components/card-item.d.ts +3 -0
- package/dist/modules/dock/components/card-item.d.ts.map +1 -0
- package/dist/modules/dock/components/command-bar.d.ts +7 -0
- package/dist/modules/dock/components/command-bar.d.ts.map +1 -0
- package/dist/modules/dock/components/description.d.ts +4 -0
- package/dist/modules/dock/components/description.d.ts.map +1 -0
- package/dist/modules/dock/components/dock.d.ts +4 -0
- package/dist/modules/dock/components/dock.d.ts.map +1 -0
- package/dist/modules/dock/components/hud-view.d.ts +7 -0
- package/dist/modules/dock/components/hud-view.d.ts.map +1 -0
- package/dist/modules/dock/components/icon.d.ts +6 -0
- package/dist/modules/dock/components/icon.d.ts.map +1 -0
- package/dist/modules/dock/components/item-content.d.ts +4 -0
- package/dist/modules/dock/components/item-content.d.ts.map +1 -0
- package/dist/modules/dock/components/media-action.d.ts +4 -0
- package/dist/modules/dock/components/media-action.d.ts.map +1 -0
- package/dist/modules/dock/components/media-controls.d.ts +4 -0
- package/dist/modules/dock/components/media-controls.d.ts.map +1 -0
- package/dist/modules/dock/components/media-scrubber.d.ts +5 -0
- package/dist/modules/dock/components/media-scrubber.d.ts.map +1 -0
- package/dist/modules/dock/components/status-actions.d.ts +10 -0
- package/dist/modules/dock/components/status-actions.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/action.d.ts +17 -0
- package/dist/modules/dock/components/surface/action.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/controls.d.ts +12 -0
- package/dist/modules/dock/components/surface/controls.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/extensions-bar.d.ts +5 -0
- package/dist/modules/dock/components/surface/extensions-bar.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/header-button.d.ts +14 -0
- package/dist/modules/dock/components/surface/header-button.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/item-content.d.ts +6 -0
- package/dist/modules/dock/components/surface/item-content.d.ts.map +1 -0
- package/dist/modules/dock/components/surface/shell.d.ts +3 -0
- package/dist/modules/dock/components/surface/shell.d.ts.map +1 -0
- package/dist/modules/dock/components/title.d.ts +4 -0
- package/dist/modules/dock/components/title.d.ts.map +1 -0
- package/dist/modules/dock/constants.d.ts +11 -2
- package/dist/modules/dock/constants.d.ts.map +1 -1
- package/dist/modules/dock/context.d.ts +8 -2
- package/dist/modules/dock/context.d.ts.map +1 -1
- package/dist/modules/dock/hooks/use-action-slot.d.ts +6 -0
- package/dist/modules/dock/hooks/use-action-slot.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-badge.d.ts +4 -0
- package/dist/modules/dock/hooks/use-badge.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts +18 -0
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-card-header-model.d.ts +7 -0
- package/dist/modules/dock/hooks/use-card-header-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-card-item-model.d.ts +1612 -0
- package/dist/modules/dock/hooks/use-card-item-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts +12 -0
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-banner.d.ts +11 -0
- package/dist/modules/dock/hooks/use-dock-banner.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-config.d.ts +19 -0
- package/dist/modules/dock/hooks/use-dock-config.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts +7 -0
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts +7 -0
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts +6 -0
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts +11 -0
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-registration.d.ts +8 -0
- package/dist/modules/dock/hooks/use-dock-registration.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts +2 -0
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-theme.d.ts +6 -0
- package/dist/modules/dock/hooks/use-dock-theme.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts +6 -0
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-element-height.d.ts +3 -0
- package/dist/modules/dock/hooks/use-element-height.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-hud-registry.d.ts +16 -0
- package/dist/modules/dock/hooks/use-hud-registry.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts +9 -0
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-media-controls-model.d.ts +27 -0
- package/dist/modules/dock/hooks/use-media-controls-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts +27 -0
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts +12 -0
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts.map +1 -0
- package/dist/modules/dock/hooks/use-surface-return.d.ts +8 -0
- package/dist/modules/dock/hooks/use-surface-return.d.ts.map +1 -0
- package/dist/modules/dock/hud.d.ts +8 -34
- package/dist/modules/dock/hud.d.ts.map +1 -1
- package/dist/modules/dock/index.d.ts +18 -12
- package/dist/modules/dock/index.d.ts.map +1 -1
- package/dist/modules/dock/lib/banner.d.ts +43 -0
- package/dist/modules/dock/lib/banner.d.ts.map +1 -0
- package/dist/modules/dock/lib/card-item.d.ts +46 -0
- package/dist/modules/dock/lib/card-item.d.ts.map +1 -0
- package/dist/modules/dock/lib/card.d.ts +20 -0
- package/dist/modules/dock/lib/card.d.ts.map +1 -0
- package/dist/modules/dock/lib/command-bar.d.ts +8 -0
- package/dist/modules/dock/lib/command-bar.d.ts.map +1 -0
- package/dist/modules/dock/lib/dom.d.ts +7 -0
- package/dist/modules/dock/lib/dom.d.ts.map +1 -0
- package/dist/modules/dock/lib/element-helpers.d.ts +8 -0
- package/dist/modules/dock/lib/element-helpers.d.ts.map +1 -0
- package/dist/modules/dock/lib/helpers.d.ts +19 -0
- package/dist/modules/dock/lib/helpers.d.ts.map +1 -0
- package/dist/modules/dock/lib/media.d.ts +35 -0
- package/dist/modules/dock/lib/media.d.ts.map +1 -0
- package/dist/modules/dock/lib/styles.d.ts +902 -0
- package/dist/modules/dock/lib/styles.d.ts.map +1 -0
- package/dist/modules/dock/model/hud-definition.d.ts +13 -0
- package/dist/modules/dock/model/hud-definition.d.ts.map +1 -0
- package/dist/modules/dock/model/hud.d.ts +10 -0
- package/dist/modules/dock/model/hud.d.ts.map +1 -0
- package/dist/modules/dock/model/layout.d.ts +28 -0
- package/dist/modules/dock/model/layout.d.ts.map +1 -0
- package/dist/modules/dock/model/page-entry.d.ts +11 -0
- package/dist/modules/dock/model/page-entry.d.ts.map +1 -0
- package/dist/modules/dock/model/page-surface.d.ts +4 -0
- package/dist/modules/dock/model/page-surface.d.ts.map +1 -0
- package/dist/modules/dock/model/paths.d.ts +15 -0
- package/dist/modules/dock/model/paths.d.ts.map +1 -0
- package/dist/modules/dock/model/state.d.ts +28 -0
- package/dist/modules/dock/model/state.d.ts.map +1 -0
- package/dist/modules/dock/model/surface-return.d.ts +14 -0
- package/dist/modules/dock/model/surface-return.d.ts.map +1 -0
- package/dist/modules/dock/module.d.ts +5 -7
- package/dist/modules/dock/module.d.ts.map +1 -1
- package/dist/modules/dock/motion.d.ts +716 -5
- package/dist/modules/dock/motion.d.ts.map +1 -1
- package/dist/modules/dock/provider.d.ts +2 -1
- package/dist/modules/dock/provider.d.ts.map +1 -1
- package/dist/modules/dock/routing/breadcrumbs.d.ts +6 -2
- package/dist/modules/dock/routing/breadcrumbs.d.ts.map +1 -1
- package/dist/modules/dock/routing/continuity.d.ts +46 -14
- package/dist/modules/dock/routing/continuity.d.ts.map +1 -1
- package/dist/modules/dock/routing/guards.d.ts +10 -1
- package/dist/modules/dock/routing/guards.d.ts.map +1 -1
- package/dist/modules/dock/routing/hooks/use-route-prefetch.d.ts +12 -0
- package/dist/modules/dock/routing/hooks/use-route-prefetch.d.ts.map +1 -0
- package/dist/modules/dock/routing/lib/restore.d.ts +7 -0
- package/dist/modules/dock/routing/lib/restore.d.ts.map +1 -0
- package/dist/modules/dock/routing/model/continuity.d.ts +21 -0
- package/dist/modules/dock/routing/model/continuity.d.ts.map +1 -0
- package/dist/modules/dock/routing/model/policy.d.ts +7 -0
- package/dist/modules/dock/routing/model/policy.d.ts.map +1 -0
- package/dist/modules/dock/routing/model/topology.d.ts +5 -0
- package/dist/modules/dock/routing/model/topology.d.ts.map +1 -0
- package/dist/modules/dock/routing/navigation.d.ts +10 -22
- package/dist/modules/dock/routing/navigation.d.ts.map +1 -1
- package/dist/modules/dock/runtime/commands.d.ts +10 -1
- package/dist/modules/dock/runtime/commands.d.ts.map +1 -1
- package/dist/modules/dock/runtime/display.d.ts +9 -42
- package/dist/modules/dock/runtime/display.d.ts.map +1 -1
- package/dist/modules/dock/runtime/dock.d.ts +11 -70
- package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts +10 -0
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts +10 -0
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts +14 -0
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts +7 -0
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts.map +1 -0
- package/dist/modules/dock/runtime/hooks/use-dock.d.ts +30 -0
- package/dist/modules/dock/runtime/hooks/use-dock.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/attention.d.ts +25 -0
- package/dist/modules/dock/runtime/model/attention.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/cards.d.ts +64 -0
- package/dist/modules/dock/runtime/model/cards.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/items.d.ts +31 -0
- package/dist/modules/dock/runtime/model/items.d.ts.map +1 -0
- package/dist/modules/dock/runtime/model/layout.d.ts +10 -0
- package/dist/modules/dock/runtime/model/layout.d.ts.map +1 -0
- package/dist/modules/dock/runtime/pipeline.d.ts +1 -1
- package/dist/modules/dock/runtime/pipeline.d.ts.map +1 -1
- package/dist/modules/dock/runtime/provider-actions.d.ts +38 -0
- package/dist/modules/dock/runtime/provider-actions.d.ts.map +1 -0
- package/dist/modules/dock/status/action-options.d.ts +35 -0
- package/dist/modules/dock/status/action-options.d.ts.map +1 -0
- package/dist/modules/dock/status/events.d.ts +2 -2
- package/dist/modules/dock/status/events.d.ts.map +1 -1
- package/dist/modules/dock/status/hooks.d.ts +1 -1
- package/dist/modules/dock/status/hooks.d.ts.map +1 -1
- package/dist/modules/dock/status/model.d.ts +12 -32
- package/dist/modules/dock/status/model.d.ts.map +1 -1
- package/dist/modules/dock/status/state.d.ts +12 -0
- package/dist/modules/dock/status/state.d.ts.map +1 -0
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts +5 -0
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts.map +1 -0
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts +7 -0
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts.map +1 -0
- package/dist/modules/dock/surface/constants.d.ts +5 -0
- package/dist/modules/dock/surface/constants.d.ts.map +1 -0
- package/dist/modules/dock/surface/context.d.ts +14 -1
- package/dist/modules/dock/surface/context.d.ts.map +1 -1
- package/dist/modules/dock/surface/definition.d.ts +28 -2
- package/dist/modules/dock/surface/definition.d.ts.map +1 -1
- package/dist/modules/dock/surface/helpers.d.ts +2 -1
- package/dist/modules/dock/surface/helpers.d.ts.map +1 -1
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts +15 -0
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts +7 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts +14 -0
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-flow.d.ts +20 -0
- package/dist/modules/dock/surface/hooks/use-surface-flow.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts +13 -0
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/hooks/use-surface-shell-model.d.ts +28 -0
- package/dist/modules/dock/surface/hooks/use-surface-shell-model.d.ts.map +1 -0
- package/dist/modules/dock/surface/lib/drag.d.ts +9 -0
- package/dist/modules/dock/surface/lib/drag.d.ts.map +1 -0
- package/dist/modules/dock/surface/lib/target.d.ts +8 -0
- package/dist/modules/dock/surface/lib/target.d.ts.map +1 -0
- package/dist/modules/dock/surface/machine.d.ts +17 -62
- package/dist/modules/dock/surface/machine.d.ts.map +1 -1
- package/dist/modules/dock/surface/model/builder.d.ts +39 -0
- package/dist/modules/dock/surface/model/builder.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/normalize.d.ts +13 -0
- package/dist/modules/dock/surface/model/normalize.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/open.d.ts +26 -0
- package/dist/modules/dock/surface/model/open.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/records.d.ts +45 -0
- package/dist/modules/dock/surface/model/records.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/steps.d.ts +9 -0
- package/dist/modules/dock/surface/model/steps.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/transition-state.d.ts +23 -0
- package/dist/modules/dock/surface/model/transition-state.d.ts.map +1 -0
- package/dist/modules/dock/surface/model/url.d.ts +14 -0
- package/dist/modules/dock/surface/model/url.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/choreography.d.ts +22 -0
- package/dist/modules/dock/surface/runtime/choreography.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/context.d.ts +29 -0
- package/dist/modules/dock/surface/runtime/context.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/flows.d.ts +21 -0
- package/dist/modules/dock/surface/runtime/flows.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/open.d.ts +6 -0
- package/dist/modules/dock/surface/runtime/open.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/release.d.ts +9 -0
- package/dist/modules/dock/surface/runtime/release.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/steps.d.ts +10 -0
- package/dist/modules/dock/surface/runtime/steps.d.ts.map +1 -0
- package/dist/modules/dock/surface/stack.d.ts +20 -11
- package/dist/modules/dock/surface/stack.d.ts.map +1 -1
- package/dist/modules/dock/surface/view-model.d.ts +5 -1
- package/dist/modules/dock/surface/view-model.d.ts.map +1 -1
- package/dist/modules/dock/types/card.d.ts +297 -0
- package/dist/modules/dock/types/card.d.ts.map +1 -0
- package/dist/modules/dock/types/hud.d.ts +142 -0
- package/dist/modules/dock/types/hud.d.ts.map +1 -0
- package/dist/modules/dock/types/index.d.ts +8 -0
- package/dist/modules/dock/types/index.d.ts.map +1 -0
- package/dist/modules/dock/types/media.d.ts +66 -0
- package/dist/modules/dock/types/media.d.ts.map +1 -0
- package/dist/modules/dock/types/routing.d.ts +336 -0
- package/dist/modules/dock/types/routing.d.ts.map +1 -0
- package/dist/modules/dock/types/surface-flow.d.ts +231 -0
- package/dist/modules/dock/types/surface-flow.d.ts.map +1 -0
- package/dist/modules/dock/types/surface.d.ts +194 -0
- package/dist/modules/dock/types/surface.d.ts.map +1 -0
- package/dist/modules/dock/types/theme.d.ts +201 -0
- package/dist/modules/dock/types/theme.d.ts.map +1 -0
- package/dist/modules/index.d.ts +4 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +23 -18
- package/dist/modules/loading/constants.d.ts +18 -1
- package/dist/modules/loading/constants.d.ts.map +1 -1
- package/dist/modules/loading/context.d.ts +11 -1
- package/dist/modules/loading/context.d.ts.map +1 -1
- package/dist/modules/loading/hooks.d.ts +24 -1
- package/dist/modules/loading/hooks.d.ts.map +1 -1
- package/dist/modules/loading/module.d.ts +6 -0
- package/dist/modules/loading/module.d.ts.map +1 -1
- package/dist/modules/loading/overlay.d.ts +3 -0
- package/dist/modules/loading/overlay.d.ts.map +1 -1
- package/dist/modules/loading/state.d.ts +13 -0
- package/dist/modules/loading/state.d.ts.map +1 -1
- package/dist/modules/loading/types.d.ts +42 -2
- package/dist/modules/loading/types.d.ts.map +1 -1
- package/dist/modules/media/constants.d.ts +19 -0
- package/dist/modules/media/constants.d.ts.map +1 -1
- package/dist/modules/media/context.d.ts +11 -1
- package/dist/modules/media/context.d.ts.map +1 -1
- package/dist/modules/media/hooks.d.ts +17 -0
- package/dist/modules/media/hooks.d.ts.map +1 -1
- package/dist/modules/media/module.d.ts +4 -0
- package/dist/modules/media/module.d.ts.map +1 -1
- package/dist/modules/media/overlay.d.ts +7 -0
- package/dist/modules/media/overlay.d.ts.map +1 -1
- package/dist/modules/media/playback.d.ts +13 -0
- package/dist/modules/media/playback.d.ts.map +1 -1
- package/dist/modules/media/session.d.ts +20 -0
- package/dist/modules/media/session.d.ts.map +1 -1
- package/dist/modules/media/types.d.ts +49 -2
- package/dist/modules/media/types.d.ts.map +1 -1
- package/dist/modules/modal/components/close-button.d.ts +6 -0
- package/dist/modules/modal/components/close-button.d.ts.map +1 -0
- package/dist/modules/modal/components/modal-container.d.ts +7 -0
- package/dist/modules/modal/components/modal-container.d.ts.map +1 -0
- package/dist/modules/modal/components/modal-layer-switcher.d.ts +9 -0
- package/dist/modules/modal/components/modal-layer-switcher.d.ts.map +1 -0
- package/dist/modules/modal/components/modal-layer.d.ts +17 -0
- package/dist/modules/modal/components/modal-layer.d.ts.map +1 -0
- package/dist/modules/modal/components/overlay.d.ts +6 -0
- package/dist/modules/modal/components/overlay.d.ts.map +1 -0
- package/dist/modules/modal/components/resolve-header.d.ts +10 -0
- package/dist/modules/modal/components/resolve-header.d.ts.map +1 -0
- package/dist/modules/modal/components/slot-row.d.ts +12 -0
- package/dist/modules/modal/components/slot-row.d.ts.map +1 -0
- package/dist/modules/modal/constants.d.ts +16 -1
- package/dist/modules/modal/constants.d.ts.map +1 -1
- package/dist/modules/modal/context.d.ts +7 -1
- package/dist/modules/modal/context.d.ts.map +1 -1
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts +3 -0
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts.map +1 -0
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts +12 -0
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts.map +1 -0
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts +3 -0
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts.map +1 -0
- package/dist/modules/modal/hooks.d.ts +30 -4
- package/dist/modules/modal/hooks.d.ts.map +1 -1
- package/dist/modules/modal/index.d.ts +7 -6
- package/dist/modules/modal/index.d.ts.map +1 -1
- package/dist/modules/modal/lib/dom.d.ts +13 -0
- package/dist/modules/modal/lib/dom.d.ts.map +1 -0
- package/dist/modules/modal/lib/theme.d.ts +4 -0
- package/dist/modules/modal/lib/theme.d.ts.map +1 -0
- package/dist/modules/modal/model/entry.d.ts +18 -0
- package/dist/modules/modal/model/entry.d.ts.map +1 -0
- package/dist/modules/modal/model/header.d.ts +16 -0
- package/dist/modules/modal/model/header.d.ts.map +1 -0
- package/dist/modules/modal/model/identity.d.ts +13 -0
- package/dist/modules/modal/model/identity.d.ts.map +1 -0
- package/dist/modules/modal/model/layout.d.ts +37 -0
- package/dist/modules/modal/model/layout.d.ts.map +1 -0
- package/dist/modules/modal/model/state.d.ts +10 -0
- package/dist/modules/modal/model/state.d.ts.map +1 -0
- package/dist/modules/modal/module.d.ts +7 -0
- package/dist/modules/modal/module.d.ts.map +1 -1
- package/dist/modules/modal/motion.d.ts.map +1 -1
- package/dist/modules/modal/types.d.ts +73 -1
- package/dist/modules/modal/types.d.ts.map +1 -1
- package/dist/modules/navigation/context.d.ts +16 -4
- package/dist/modules/navigation/context.d.ts.map +1 -1
- package/dist/modules/navigation/hooks.d.ts +28 -1
- package/dist/modules/navigation/hooks.d.ts.map +1 -1
- package/dist/modules/navigation/index.d.ts +5 -5
- package/dist/modules/navigation/index.d.ts.map +1 -1
- package/dist/modules/navigation/listeners.d.ts +10 -1
- package/dist/modules/navigation/listeners.d.ts.map +1 -1
- package/dist/modules/navigation/module.d.ts +5 -2
- package/dist/modules/navigation/module.d.ts.map +1 -1
- package/dist/modules/notification/constants.d.ts +22 -2
- package/dist/modules/notification/constants.d.ts.map +1 -1
- package/dist/modules/notification/context.d.ts +12 -2
- package/dist/modules/notification/context.d.ts.map +1 -1
- package/dist/modules/notification/hooks.d.ts +32 -1
- package/dist/modules/notification/hooks.d.ts.map +1 -1
- package/dist/modules/notification/module.d.ts +3 -0
- package/dist/modules/notification/module.d.ts.map +1 -1
- package/dist/modules/notification/motion.d.ts.map +1 -1
- package/dist/modules/notification/overlay.d.ts.map +1 -1
- package/dist/modules/notification/state.d.ts +28 -0
- package/dist/modules/notification/state.d.ts.map +1 -1
- package/dist/modules/notification/types.d.ts +48 -2
- package/dist/modules/notification/types.d.ts.map +1 -1
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +189 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/notification/index.d.ts +1 -0
- package/dist/notification/index.js +11 -0
- package/dist/overlay-YC336DAS.js +13 -0
- package/dist/overlay-YC336DAS.js.map +1 -0
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +14 -0
- package/dist/react/context/index.d.ts +4 -0
- package/dist/react/context/index.d.ts.map +1 -0
- package/dist/react/hooks/index.d.ts +10 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/types.d.ts +25 -0
- package/dist/react/hooks/types.d.ts.map +1 -0
- package/dist/react/hooks/use-click-outside.d.ts +6 -0
- package/dist/react/hooks/use-click-outside.d.ts.map +1 -0
- package/dist/react/hooks/use-controllable-state.d.ts +7 -0
- package/dist/react/hooks/use-controllable-state.d.ts.map +1 -0
- package/dist/react/hooks/use-fullscreen-state.d.ts +7 -0
- package/dist/react/hooks/use-fullscreen-state.d.ts.map +1 -0
- package/dist/react/hooks/use-global-event.d.ts +9 -0
- package/dist/react/hooks/use-global-event.d.ts.map +1 -0
- package/dist/react/hooks/use-hotkey.d.ts +10 -0
- package/dist/react/hooks/use-hotkey.d.ts.map +1 -0
- package/dist/react/hooks/use-required-context.d.ts +6 -0
- package/dist/react/hooks/use-required-context.d.ts.map +1 -0
- package/dist/react/hooks/use-scroll-lock.d.ts +9 -0
- package/dist/react/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/react/hooks/use-store.d.ts +3 -0
- package/dist/react/hooks/use-store.d.ts.map +1 -0
- package/dist/react/theme/index.d.ts +82 -0
- package/dist/react/theme/index.d.ts.map +1 -0
- package/dist/react/ui/components/avatar.d.ts +6 -0
- package/dist/react/ui/components/avatar.d.ts.map +1 -0
- package/dist/react/ui/components/button.d.ts +6 -0
- package/dist/react/ui/components/button.d.ts.map +1 -0
- package/dist/react/ui/components/carousel.d.ts +6 -0
- package/dist/react/ui/components/carousel.d.ts.map +1 -0
- package/dist/react/ui/components/checkbox.d.ts +10 -0
- package/dist/react/ui/components/checkbox.d.ts.map +1 -0
- package/dist/react/ui/components/icon.d.ts +6 -0
- package/dist/react/ui/components/icon.d.ts.map +1 -0
- package/dist/react/ui/components/image.d.ts +6 -0
- package/dist/react/ui/components/image.d.ts.map +1 -0
- package/dist/react/ui/components/indicator.d.ts +45 -0
- package/dist/react/ui/components/indicator.d.ts.map +1 -0
- package/dist/react/ui/components/input.d.ts +10 -0
- package/dist/react/ui/components/input.d.ts.map +1 -0
- package/dist/react/ui/components/loader.d.ts +10 -0
- package/dist/react/ui/components/loader.d.ts.map +1 -0
- package/dist/react/ui/components/segmented.d.ts +6 -0
- package/dist/react/ui/components/segmented.d.ts.map +1 -0
- package/dist/react/ui/components/select-parts.d.ts +22 -0
- package/dist/react/ui/components/select-parts.d.ts.map +1 -0
- package/dist/react/ui/components/select.d.ts +6 -0
- package/dist/react/ui/components/select.d.ts.map +1 -0
- package/dist/react/ui/components/skeleton.d.ts +10 -0
- package/dist/react/ui/components/skeleton.d.ts.map +1 -0
- package/dist/react/ui/components/switch.d.ts +6 -0
- package/dist/react/ui/components/switch.d.ts.map +1 -0
- package/dist/react/ui/components/tooltip.d.ts +11 -0
- package/dist/react/ui/components/tooltip.d.ts.map +1 -0
- package/dist/react/ui/index.d.ts +19 -0
- package/dist/react/ui/index.d.ts.map +1 -0
- package/dist/react/ui/provider.d.ts +22 -0
- package/dist/react/ui/provider.d.ts.map +1 -0
- package/dist/react/ui/types-controls.d.ts +133 -0
- package/dist/react/ui/types-controls.d.ts.map +1 -0
- package/dist/react/ui/types.d.ts +192 -0
- package/dist/react/ui/types.d.ts.map +1 -0
- package/dist/react/ui/utils.d.ts +65 -0
- package/dist/react/ui/utils.d.ts.map +1 -0
- package/dist/recipes/index.d.ts +1 -0
- package/dist/recipes/index.js +233 -0
- package/dist/recipes/index.js.map +1 -0
- package/dist/result/index.d.ts +1 -0
- package/dist/result/index.js +98 -0
- package/dist/result/index.js.map +1 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +6 -0
- package/dist/ui/index.d.ts +1 -19
- package/dist/ui/index.js +2158 -1860
- package/dist/ui/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -15
- package/dist/utils/index.js +194 -71
- package/dist/utils/index.js.map +1 -1
- package/docs/README.md +58 -61
- package/docs/architecture-and-rules.md +134 -58
- package/docs/core-engine.md +36 -52
- package/docs/custom-modules.md +43 -32
- package/docs/design.md +185 -0
- package/docs/getting-started.md +49 -57
- package/docs/modules/README.md +50 -61
- package/docs/modules/ambient.md +95 -87
- package/docs/modules/background.md +39 -36
- package/docs/modules/context-menu.md +19 -18
- package/docs/modules/controls.md +13 -13
- package/docs/modules/dock.md +74 -93
- package/docs/modules/error-boundary.md +2 -2
- package/docs/modules/kernel.md +38 -26
- package/docs/modules/loading.md +14 -14
- package/docs/modules/media.md +13 -13
- package/docs/modules/modal.md +14 -14
- package/docs/modules/navigation.md +87 -84
- package/docs/modules/notification.md +13 -13
- package/docs/modules/result.md +22 -22
- package/docs/proposals/navigation.md +32 -31
- package/docs/testing.md +34 -28
- package/docs/theming.md +67 -44
- package/package.json +100 -97
- package/templates/AGENTS.md +35 -25
- package/dist/atoms/button.d.ts +0 -11
- package/dist/atoms/button.d.ts.map +0 -1
- package/dist/atoms/icon.d.ts +0 -15
- package/dist/atoms/icon.d.ts.map +0 -1
- package/dist/atoms/index.d.ts +0 -5
- package/dist/atoms/index.d.ts.map +0 -1
- package/dist/atoms/index.js +0 -4
- package/dist/atoms/spinner.d.ts +0 -9
- package/dist/atoms/spinner.d.ts.map +0 -1
- package/dist/atoms/tooltip.d.ts +0 -18
- package/dist/atoms/tooltip.d.ts.map +0 -1
- package/dist/chunk-6UFMD6TK.js +0 -419
- package/dist/chunk-6UFMD6TK.js.map +0 -1
- package/dist/chunk-AA2TWJQI.js +0 -2186
- package/dist/chunk-AA2TWJQI.js.map +0 -1
- package/dist/chunk-ACLLDU3J.js +0 -888
- package/dist/chunk-ACLLDU3J.js.map +0 -1
- package/dist/chunk-DGCQWQLZ.js +0 -61
- package/dist/chunk-DGCQWQLZ.js.map +0 -1
- package/dist/chunk-E6ANX5YP.js +0 -1273
- package/dist/chunk-E6ANX5YP.js.map +0 -1
- package/dist/chunk-GDCVEINL.js +0 -408
- package/dist/chunk-GDCVEINL.js.map +0 -1
- package/dist/chunk-GN666KV5.js +0 -28
- package/dist/chunk-GN666KV5.js.map +0 -1
- package/dist/chunk-HCSDQEFB.js +0 -845
- package/dist/chunk-HCSDQEFB.js.map +0 -1
- package/dist/chunk-HMEWYAWU.js +0 -1889
- package/dist/chunk-HMEWYAWU.js.map +0 -1
- package/dist/chunk-I3IZUBBU.js +0 -97
- package/dist/chunk-I3IZUBBU.js.map +0 -1
- package/dist/chunk-JCZUCKI3.js +0 -27
- package/dist/chunk-JCZUCKI3.js.map +0 -1
- package/dist/chunk-MAGYFVKH.js +0 -67
- package/dist/chunk-MAGYFVKH.js.map +0 -1
- package/dist/chunk-NEBGCFE3.js +0 -521
- package/dist/chunk-NEBGCFE3.js.map +0 -1
- package/dist/chunk-NK2DQB3G.js +0 -306
- package/dist/chunk-NK2DQB3G.js.map +0 -1
- package/dist/chunk-QI3ALLIB.js +0 -38
- package/dist/chunk-QI3ALLIB.js.map +0 -1
- package/dist/chunk-QM2P6TIU.js +0 -353
- package/dist/chunk-QM2P6TIU.js.map +0 -1
- package/dist/chunk-RFP2DJAB.js +0 -658
- package/dist/chunk-RFP2DJAB.js.map +0 -1
- package/dist/chunk-SQ7XZMCN.js +0 -481
- package/dist/chunk-SQ7XZMCN.js.map +0 -1
- package/dist/chunk-TMTMQNEQ.js +0 -372
- package/dist/chunk-TMTMQNEQ.js.map +0 -1
- package/dist/chunk-VDNE3A7X.js +0 -9724
- package/dist/chunk-VDNE3A7X.js.map +0 -1
- package/dist/chunk-XATRMFGU.js +0 -139
- package/dist/chunk-XATRMFGU.js.map +0 -1
- package/dist/chunk-ZAP2YHZG.js +0 -454
- package/dist/chunk-ZAP2YHZG.js.map +0 -1
- package/dist/chunk-ZH5FUYPG.js +0 -349
- package/dist/chunk-ZH5FUYPG.js.map +0 -1
- package/dist/chunk-ZKM4RETZ.js +0 -51
- package/dist/chunk-ZKM4RETZ.js.map +0 -1
- package/dist/error/boundary.d.ts +0 -14
- package/dist/error/boundary.d.ts.map +0 -1
- package/dist/error/constants.d.ts +0 -18
- package/dist/error/constants.d.ts.map +0 -1
- package/dist/error/index.d.ts.map +0 -1
- package/dist/error/listener.d.ts +0 -2
- package/dist/error/listener.d.ts.map +0 -1
- package/dist/error/reporter.d.ts +0 -32
- package/dist/error/reporter.d.ts.map +0 -1
- package/dist/error/theme.d.ts +0 -3
- package/dist/error/theme.d.ts.map +0 -1
- package/dist/error/types.d.ts +0 -91
- package/dist/error/types.d.ts.map +0 -1
- package/dist/error/utils.d.ts +0 -21
- package/dist/error/utils.d.ts.map +0 -1
- package/dist/events.d.ts +0 -51
- package/dist/events.d.ts.map +0 -1
- package/dist/events.js +0 -82
- package/dist/events.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/types.d.ts +0 -16
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/use-click-outside.d.ts +0 -3
- package/dist/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/hooks/use-controllable-state.d.ts +0 -3
- package/dist/hooks/use-controllable-state.d.ts.map +0 -1
- package/dist/hooks/use-fullscreen-state.d.ts +0 -4
- package/dist/hooks/use-fullscreen-state.d.ts.map +0 -1
- package/dist/hooks/use-global-event.d.ts +0 -5
- package/dist/hooks/use-global-event.d.ts.map +0 -1
- package/dist/hooks/use-hotkey.d.ts +0 -4
- package/dist/hooks/use-hotkey.d.ts.map +0 -1
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +0 -3
- package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +0 -1
- package/dist/hooks/use-required-context.d.ts +0 -3
- package/dist/hooks/use-required-context.d.ts.map +0 -1
- package/dist/hooks/use-scroll-lock.d.ts +0 -3
- package/dist/hooks/use-scroll-lock.d.ts.map +0 -1
- package/dist/hooks/use-store.d.ts +0 -3
- package/dist/hooks/use-store.d.ts.map +0 -1
- package/dist/kernel/adapters.d.ts +0 -5
- package/dist/kernel/adapters.d.ts.map +0 -1
- package/dist/kernel/compose.d.ts +0 -15
- package/dist/kernel/compose.d.ts.map +0 -1
- package/dist/kernel/constants.d.ts +0 -12
- package/dist/kernel/constants.d.ts.map +0 -1
- package/dist/kernel/context-registry.d.ts +0 -3
- package/dist/kernel/context-registry.d.ts.map +0 -1
- package/dist/kernel/handlers.d.ts +0 -3
- package/dist/kernel/handlers.d.ts.map +0 -1
- package/dist/kernel/hooks.d.ts +0 -7
- package/dist/kernel/hooks.d.ts.map +0 -1
- package/dist/kernel/index.d.ts.map +0 -1
- package/dist/kernel/installed.d.ts +0 -21
- package/dist/kernel/installed.d.ts.map +0 -1
- package/dist/kernel/module.d.ts +0 -32
- package/dist/kernel/module.d.ts.map +0 -1
- package/dist/kernel/operations.d.ts +0 -21
- package/dist/kernel/operations.d.ts.map +0 -1
- package/dist/kernel/page-controller.d.ts +0 -8
- package/dist/kernel/page-controller.d.ts.map +0 -1
- package/dist/kernel/provider.d.ts +0 -18
- package/dist/kernel/provider.d.ts.map +0 -1
- package/dist/kernel/runtime.d.ts.map +0 -1
- package/dist/kernel/schema.d.ts +0 -11
- package/dist/kernel/schema.d.ts.map +0 -1
- package/dist/kernel/store.d.ts +0 -4
- package/dist/kernel/store.d.ts.map +0 -1
- package/dist/kernel/types.d.ts +0 -233
- package/dist/kernel/types.d.ts.map +0 -1
- package/dist/kernel/utils.d.ts +0 -18
- package/dist/kernel/utils.d.ts.map +0 -1
- package/dist/modules/ambient/index.js +0 -10
- package/dist/modules/ambient/server/index.js +0 -225
- package/dist/modules/ambient/server/index.js.map +0 -1
- package/dist/modules/ambient/worker/index.js +0 -122
- package/dist/modules/ambient/worker/index.js.map +0 -1
- package/dist/modules/background/index.js +0 -9
- package/dist/modules/background/overlay.d.ts +0 -135
- package/dist/modules/background/overlay.d.ts.map +0 -1
- package/dist/modules/background/playback.d.ts +0 -10
- package/dist/modules/background/playback.d.ts.map +0 -1
- package/dist/modules/background/state.d.ts +0 -9
- package/dist/modules/background/state.d.ts.map +0 -1
- package/dist/modules/background/visual.d.ts +0 -48
- package/dist/modules/background/visual.d.ts.map +0 -1
- package/dist/modules/background/youtube/iframe.d.ts +0 -52
- package/dist/modules/background/youtube/iframe.d.ts.map +0 -1
- package/dist/modules/background/youtube/parse.d.ts +0 -17
- package/dist/modules/background/youtube/parse.d.ts.map +0 -1
- package/dist/modules/background/youtube/player.d.ts +0 -28
- package/dist/modules/background/youtube/player.d.ts.map +0 -1
- package/dist/modules/context-menu/index.js +0 -14
- package/dist/modules/controls/index.js +0 -7
- package/dist/modules/dock/cards.d.ts +0 -1722
- package/dist/modules/dock/cards.d.ts.map +0 -1
- package/dist/modules/dock/dom.d.ts +0 -24
- package/dist/modules/dock/dom.d.ts.map +0 -1
- package/dist/modules/dock/helpers.d.ts +0 -25
- package/dist/modules/dock/helpers.d.ts.map +0 -1
- package/dist/modules/dock/hooks.d.ts +0 -42
- package/dist/modules/dock/hooks.d.ts.map +0 -1
- package/dist/modules/dock/index.js +0 -13
- package/dist/modules/dock/layout.d.ts +0 -26
- package/dist/modules/dock/layout.d.ts.map +0 -1
- package/dist/modules/dock/overlay.d.ts +0 -79
- package/dist/modules/dock/overlay.d.ts.map +0 -1
- package/dist/modules/dock/paths.d.ts +0 -10
- package/dist/modules/dock/paths.d.ts.map +0 -1
- package/dist/modules/dock/state.d.ts +0 -22
- package/dist/modules/dock/state.d.ts.map +0 -1
- package/dist/modules/dock/styles.d.ts +0 -900
- package/dist/modules/dock/styles.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks.d.ts +0 -110
- package/dist/modules/dock/surface/hooks.d.ts.map +0 -1
- package/dist/modules/dock/types.d.ts +0 -1274
- package/dist/modules/dock/types.d.ts.map +0 -1
- package/dist/modules/loading/index.js +0 -8
- package/dist/modules/media/index.js +0 -6
- package/dist/modules/modal/dom.d.ts +0 -4
- package/dist/modules/modal/dom.d.ts.map +0 -1
- package/dist/modules/modal/header.d.ts +0 -7
- package/dist/modules/modal/header.d.ts.map +0 -1
- package/dist/modules/modal/identity.d.ts +0 -7
- package/dist/modules/modal/identity.d.ts.map +0 -1
- package/dist/modules/modal/index.js +0 -11
- package/dist/modules/modal/layout.d.ts +0 -13
- package/dist/modules/modal/layout.d.ts.map +0 -1
- package/dist/modules/modal/overlay.d.ts +0 -4
- package/dist/modules/modal/overlay.d.ts.map +0 -1
- package/dist/modules/modal/state.d.ts +0 -4
- package/dist/modules/modal/state.d.ts.map +0 -1
- package/dist/modules/navigation/constants.d.ts +0 -33
- package/dist/modules/navigation/constants.d.ts.map +0 -1
- package/dist/modules/navigation/index.js +0 -80
- package/dist/modules/navigation/index.js.map +0 -1
- package/dist/modules/navigation/navigator.d.ts +0 -3
- package/dist/modules/navigation/navigator.d.ts.map +0 -1
- package/dist/modules/navigation/settings.d.ts +0 -5
- package/dist/modules/navigation/settings.d.ts.map +0 -1
- package/dist/modules/navigation/state.d.ts +0 -19
- package/dist/modules/navigation/state.d.ts.map +0 -1
- package/dist/modules/navigation/types.d.ts +0 -118
- package/dist/modules/navigation/types.d.ts.map +0 -1
- package/dist/modules/navigation/utils.d.ts +0 -8
- package/dist/modules/navigation/utils.d.ts.map +0 -1
- package/dist/modules/notification/index.js +0 -7
- package/dist/overlay-LTRZUZQD.js +0 -9
- package/dist/overlay-LTRZUZQD.js.map +0 -1
- package/dist/provider.d.ts +0 -23
- package/dist/provider.d.ts.map +0 -1
- package/dist/provider.js +0 -9
- package/dist/provider.js.map +0 -1
- package/dist/result.d.ts +0 -50
- package/dist/result.d.ts.map +0 -1
- package/dist/result.js +0 -102
- package/dist/result.js.map +0 -1
- package/dist/theme.d.ts +0 -46
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -6
- package/dist/theme.js.map +0 -1
- package/dist/tokens/index.d.ts +0 -4
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/tokens/index.js +0 -297
- package/dist/tokens/index.js.map +0 -1
- package/dist/tokens/motion-config.d.ts +0 -35
- package/dist/tokens/motion-config.d.ts.map +0 -1
- package/dist/tokens/motion.d.ts +0 -164
- package/dist/tokens/motion.d.ts.map +0 -1
- package/dist/tokens/tokens.d.ts +0 -34
- package/dist/tokens/tokens.d.ts.map +0 -1
- package/dist/ui/carousel/carousel.d.ts +0 -24
- package/dist/ui/carousel/carousel.d.ts.map +0 -1
- package/dist/ui/carousel/track.d.ts +0 -11
- package/dist/ui/carousel/track.d.ts.map +0 -1
- package/dist/ui/carousel/use-drag-scroll.d.ts +0 -3
- package/dist/ui/carousel/use-drag-scroll.d.ts.map +0 -1
- package/dist/ui/cn.d.ts +0 -19
- package/dist/ui/cn.d.ts.map +0 -1
- package/dist/ui/components/avatar.d.ts +0 -14
- package/dist/ui/components/avatar.d.ts.map +0 -1
- package/dist/ui/components/button.d.ts +0 -9
- package/dist/ui/components/button.d.ts.map +0 -1
- package/dist/ui/components/checkbox.d.ts +0 -18
- package/dist/ui/components/checkbox.d.ts.map +0 -1
- package/dist/ui/components/icon.d.ts +0 -4
- package/dist/ui/components/icon.d.ts.map +0 -1
- package/dist/ui/components/image.d.ts +0 -13
- package/dist/ui/components/image.d.ts.map +0 -1
- package/dist/ui/components/indicator.d.ts +0 -37
- package/dist/ui/components/indicator.d.ts.map +0 -1
- package/dist/ui/components/input.d.ts +0 -15
- package/dist/ui/components/input.d.ts.map +0 -1
- package/dist/ui/components/loader.d.ts +0 -17
- package/dist/ui/components/loader.d.ts.map +0 -1
- package/dist/ui/components/segmented.d.ts +0 -21
- package/dist/ui/components/segmented.d.ts.map +0 -1
- package/dist/ui/components/select.d.ts +0 -34
- package/dist/ui/components/select.d.ts.map +0 -1
- package/dist/ui/components/skeleton.d.ts +0 -16
- package/dist/ui/components/skeleton.d.ts.map +0 -1
- package/dist/ui/components/switch.d.ts +0 -11
- package/dist/ui/components/switch.d.ts.map +0 -1
- package/dist/ui/components/tooltip.d.ts +0 -25
- package/dist/ui/components/tooltip.d.ts.map +0 -1
- package/dist/ui/defaults.d.ts +0 -250
- package/dist/ui/defaults.d.ts.map +0 -1
- package/dist/ui/define.d.ts +0 -112
- package/dist/ui/define.d.ts.map +0 -1
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/provider.d.ts +0 -11
- package/dist/ui/provider.d.ts.map +0 -1
- package/dist/ui/recipe.d.ts +0 -70
- package/dist/ui/recipe.d.ts.map +0 -1
- package/dist/ui/recipes.d.ts +0 -9
- package/dist/ui/recipes.d.ts.map +0 -1
- package/dist/ui/recipes.js +0 -648
- package/dist/ui/recipes.js.map +0 -1
- package/dist/ui/split.d.ts +0 -4
- package/dist/ui/split.d.ts.map +0 -1
- package/dist/ui/tones.d.ts +0 -23
- package/dist/ui/tones.d.ts.map +0 -1
- package/dist/utils/cn.d.ts +0 -3
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/dom.d.ts +0 -5
- package/dist/utils/dom.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/number.d.ts +0 -3
- package/dist/utils/number.d.ts.map +0 -1
- package/dist/utils/object.d.ts +0 -5
- package/dist/utils/object.d.ts.map +0 -1
- package/dist/utils/report.d.ts +0 -5
- package/dist/utils/report.d.ts.map +0 -1
- package/dist/utils/scheduler.d.ts +0 -34
- package/dist/utils/scheduler.d.ts.map +0 -1
- package/dist/utils/store.d.ts +0 -11
- package/dist/utils/store.d.ts.map +0 -1
- package/dist/utils/string.d.ts +0 -5
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/timing.d.ts +0 -7
- package/dist/utils/timing.d.ts.map +0 -1
- package/dist/utils/user-message.d.ts +0 -20
- package/dist/utils/user-message.d.ts.map +0 -1
- package/docs/ui.md +0 -183
- package/styles/effects.css +0 -219
- package/styles/index.css +0 -8
- package/styles/interaction.css +0 -273
- package/styles/palette.css +0 -81
- package/styles/time.css +0 -26
- package/styles/tokens.css +0 -114
- package/styles/utilities.css +0 -110
- package/templates/motion/background.ts +0 -15
- package/templates/motion/context-menu.ts +0 -65
- package/templates/motion/dock.ts +0 -421
- package/templates/motion/modal.ts +0 -82
- package/templates/motion/notification.ts +0 -26
- package/templates/motion/tokens.ts +0 -36
- /package/dist/{atoms → ambient}/index.js.map +0 -0
- /package/dist/{modules/ambient → background}/index.js.map +0 -0
- /package/dist/{modules/background → context-menu}/index.js.map +0 -0
- /package/dist/{modules/context-menu → controls}/index.js.map +0 -0
- /package/dist/{kernel → core/kernel}/runtime.d.ts +0 -0
- /package/dist/{modules/controls → dock}/index.js.map +0 -0
- /package/dist/{modules/dock → loading}/index.js.map +0 -0
- /package/dist/{modules/loading → media}/index.js.map +0 -0
- /package/dist/{modules/media → notification}/index.js.map +0 -0
- /package/dist/{modules/modal → provider}/index.js.map +0 -0
- /package/dist/{modules/notification → theme}/index.js.map +0 -0
|
@@ -0,0 +1,1435 @@
|
|
|
1
|
+
import { useOptionalDockState } from './chunk-PUD4IB3L.js';
|
|
2
|
+
import { defineModule, useRegistryEntries, useModuleRegistration } from './chunk-ZE6OGGA7.js';
|
|
3
|
+
import { useStore, useRequiredContext } from './chunk-Y2Q74PJP.js';
|
|
4
|
+
import { Icon } from './chunk-CT4UILO2.js';
|
|
5
|
+
import { defineThemeSpec, useTheme, useModuleMotion } from './chunk-ESD5EQ5H.js';
|
|
6
|
+
import { createStore, toFiniteNumber, report, isBrowser, isImageIconSource } from './chunk-5H6FZW3N.js';
|
|
7
|
+
import { getOrCreateGlobalContext } from './chunk-J3VTDBC6.js';
|
|
8
|
+
import { isObject, toArray } from './chunk-BMFHS3GV.js';
|
|
9
|
+
import { useState, useLayoutEffect, useEffect, isValidElement, useRef, useSyncExternalStore } from 'react';
|
|
10
|
+
import { c } from 'react/compiler-runtime';
|
|
11
|
+
import { usePathname } from 'next/navigation';
|
|
12
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
+
import { motion, AnimatePresence } from 'motion/react';
|
|
14
|
+
import { createPortal } from 'react-dom';
|
|
15
|
+
|
|
16
|
+
// src/modules/context-menu/constants.ts
|
|
17
|
+
var contextMenuTheme = defineThemeSpec("context-menu");
|
|
18
|
+
var CURRENT_PAGE_KEY = "current-page";
|
|
19
|
+
var GLOBAL_MENU_KEY = "*";
|
|
20
|
+
var MENU_SCREEN_MARGIN = 10;
|
|
21
|
+
var REGISTRY_CLEANUP_DELAY_MS = 600;
|
|
22
|
+
var HEADER_ICON_SIZE = 20;
|
|
23
|
+
var ITEM_ICON_SIZE = 18;
|
|
24
|
+
var PRIORITY_WEIGHT = 1e4;
|
|
25
|
+
var ROUTE_WEIGHT = 100;
|
|
26
|
+
var EXACT_ROUTE_SCORE = 100;
|
|
27
|
+
var CURRENT_PAGE_SCORE = 70;
|
|
28
|
+
var GLOBAL_MENU_SCORE = 40;
|
|
29
|
+
var DEFAULT_ROUTE_SCORE = 10;
|
|
30
|
+
var MAX_TARGET_SCORE = 100;
|
|
31
|
+
var CONTEXT_MENU_VISIBILITY_EVENT = "context-menu:visibility";
|
|
32
|
+
var INITIAL_POSITION = Object.freeze({
|
|
33
|
+
x: 0,
|
|
34
|
+
y: 0
|
|
35
|
+
});
|
|
36
|
+
function extractNodeText(value) {
|
|
37
|
+
if (typeof value === "string") return value;
|
|
38
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
39
|
+
return String(value);
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(value)) {
|
|
42
|
+
return value.map(extractNodeText).filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
43
|
+
}
|
|
44
|
+
if (isValidElement(value)) {
|
|
45
|
+
return extractNodeText(value.props?.children);
|
|
46
|
+
}
|
|
47
|
+
return "";
|
|
48
|
+
}
|
|
49
|
+
function resolveAsBoolean(value, context, defaultValue = true) {
|
|
50
|
+
if (typeof value === "function") {
|
|
51
|
+
try {
|
|
52
|
+
return Boolean(value(context));
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (value === void 0) {
|
|
58
|
+
return defaultValue;
|
|
59
|
+
}
|
|
60
|
+
return Boolean(value);
|
|
61
|
+
}
|
|
62
|
+
function resolveAsValue(value, context, fallback) {
|
|
63
|
+
if (typeof value === "function") {
|
|
64
|
+
try {
|
|
65
|
+
const resolved = value(context);
|
|
66
|
+
return resolved === void 0 ? fallback : resolved;
|
|
67
|
+
} catch {
|
|
68
|
+
return fallback;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return value === void 0 ? fallback : value;
|
|
72
|
+
}
|
|
73
|
+
function safeInvoke(handler, ...args) {
|
|
74
|
+
if (typeof handler !== "function") return void 0;
|
|
75
|
+
try {
|
|
76
|
+
const result = handler(...args);
|
|
77
|
+
if (result && typeof result.then === "function") {
|
|
78
|
+
result.catch((err) => report("Context menu async callback", err));
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
} catch (error) {
|
|
82
|
+
report("Context menu callback", error);
|
|
83
|
+
return void 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function resolveContextMenuPageMeta(dockItem, pathname = "") {
|
|
87
|
+
if (!isObject(dockItem)) return null;
|
|
88
|
+
const title = dockItem.contextMenuTitle ?? dockItem.title ?? null;
|
|
89
|
+
const description = dockItem.contextMenuDescription ?? dockItem.description ?? null;
|
|
90
|
+
const eyebrow = dockItem.contextMenuEyebrow ?? dockItem.eyebrow ?? null;
|
|
91
|
+
const icon = dockItem.contextMenuIcon ?? dockItem.icon ?? null;
|
|
92
|
+
if (!title && !description && !icon && !eyebrow) return null;
|
|
93
|
+
return {
|
|
94
|
+
description,
|
|
95
|
+
descriptionText: extractNodeText(description),
|
|
96
|
+
eyebrow,
|
|
97
|
+
icon,
|
|
98
|
+
path: typeof dockItem.path === "string" && dockItem.path ? dockItem.path : pathname,
|
|
99
|
+
title,
|
|
100
|
+
titleText: extractNodeText(title) || (typeof dockItem.name === "string" ? dockItem.name : "") || ""
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function resolveLabel(item, context) {
|
|
104
|
+
const label = resolveAsValue(item.label, context, "");
|
|
105
|
+
if (typeof label !== "string" && typeof label !== "number" || !String(label).trim()) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
return String(label);
|
|
109
|
+
}
|
|
110
|
+
function resolveItem(item, index, context) {
|
|
111
|
+
if (!item) return null;
|
|
112
|
+
if (item === "separator" || item.type === "separator") {
|
|
113
|
+
return {
|
|
114
|
+
key: item !== "separator" && item.key || `separator-${index}`,
|
|
115
|
+
type: "separator"
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (resolveAsBoolean(item.hidden, context, false) || !resolveAsBoolean(item.visible, context, true)) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
const label = resolveLabel(item, context);
|
|
122
|
+
if (label === null) return null;
|
|
123
|
+
const handler = item.onSelect ?? item.onClick ?? null;
|
|
124
|
+
const shortcut = resolveAsValue(item.shortcut, context, null);
|
|
125
|
+
return {
|
|
126
|
+
...item,
|
|
127
|
+
className: resolveAsValue(item.className, context, "") || "",
|
|
128
|
+
closeOnSelect: item.closeOnSelect !== false,
|
|
129
|
+
danger: resolveAsBoolean(item.danger, context, false),
|
|
130
|
+
disabled: resolveAsBoolean(item.disabled, context, false),
|
|
131
|
+
icon: resolveAsValue(item.icon, context, null) || null,
|
|
132
|
+
itemIconClassName: resolveAsValue(item.itemIconClassName, context, "") || "",
|
|
133
|
+
key: item.key || `item-${index}`,
|
|
134
|
+
label,
|
|
135
|
+
onClick: handler,
|
|
136
|
+
onSelect: handler,
|
|
137
|
+
shortcut: typeof shortcut === "string" ? shortcut : null,
|
|
138
|
+
type: "action"
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
function resolveMenuItems(config, context) {
|
|
142
|
+
const rawItems = resolveAsValue(config?.items, context, []);
|
|
143
|
+
const items = [];
|
|
144
|
+
toArray(rawItems).forEach((raw, index) => {
|
|
145
|
+
const item = resolveItem(raw, index, context);
|
|
146
|
+
if (!item) return;
|
|
147
|
+
const previous = items[items.length - 1];
|
|
148
|
+
if (item.type === "separator" && (!previous || previous.type === "separator")) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
items.push(item);
|
|
152
|
+
});
|
|
153
|
+
if (items[items.length - 1]?.type === "separator") items.pop();
|
|
154
|
+
return items;
|
|
155
|
+
}
|
|
156
|
+
function pickHeaderSource(configured, page) {
|
|
157
|
+
if (isObject(configured)) return configured;
|
|
158
|
+
if (isObject(page)) return page;
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
function resolveMenuHeader(config, context) {
|
|
162
|
+
if (config?.header === false || config?.showPageHeader === false) return null;
|
|
163
|
+
const configured = resolveAsValue(config?.header, context, null);
|
|
164
|
+
const source = pickHeaderSource(configured, context.page);
|
|
165
|
+
if (!source) return null;
|
|
166
|
+
const title = resolveAsValue(source.title, context, null);
|
|
167
|
+
const description = resolveAsValue(source.description, context, null);
|
|
168
|
+
const icon = resolveAsValue(source.icon, context, null);
|
|
169
|
+
const eyebrow = resolveAsValue(source.eyebrow, context, null);
|
|
170
|
+
if (!title && !description && !icon && !eyebrow) return null;
|
|
171
|
+
return {
|
|
172
|
+
description,
|
|
173
|
+
descriptionText: extractNodeText(description),
|
|
174
|
+
eyebrow,
|
|
175
|
+
icon,
|
|
176
|
+
title,
|
|
177
|
+
titleText: extractNodeText(title)
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// src/modules/context-menu/resolver.ts
|
|
182
|
+
function normalizeMenuCandidates(registryMenus) {
|
|
183
|
+
const candidates = [];
|
|
184
|
+
for (const [registryKey, rawConfig] of Object.entries(registryMenus || {})) {
|
|
185
|
+
if (!isObject(rawConfig)) continue;
|
|
186
|
+
const {
|
|
187
|
+
menus,
|
|
188
|
+
...sharedConfig
|
|
189
|
+
} = rawConfig;
|
|
190
|
+
const nestedMenus = toArray(menus);
|
|
191
|
+
const hasSharedItems = Array.isArray(sharedConfig.items) || typeof sharedConfig.items === "function";
|
|
192
|
+
if (hasSharedItems || nestedMenus.length === 0) {
|
|
193
|
+
candidates.push({
|
|
194
|
+
config: sharedConfig,
|
|
195
|
+
order: candidates.length,
|
|
196
|
+
registryKey
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
for (const menu of nestedMenus) {
|
|
200
|
+
candidates.push({
|
|
201
|
+
config: {
|
|
202
|
+
...sharedConfig,
|
|
203
|
+
...menu,
|
|
204
|
+
classNames: {
|
|
205
|
+
...sharedConfig.classNames,
|
|
206
|
+
...menu.classNames
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
order: candidates.length,
|
|
210
|
+
registryKey
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return candidates;
|
|
215
|
+
}
|
|
216
|
+
function isPathAllowed(config, registryKey, pathname) {
|
|
217
|
+
if (!pathname) return true;
|
|
218
|
+
if (config.path === pathname) return true;
|
|
219
|
+
const explicitPaths = toArray(config.paths).filter(Boolean);
|
|
220
|
+
if (explicitPaths.length > 0) return explicitPaths.includes(pathname);
|
|
221
|
+
if (typeof config.pathMatcher === "function") {
|
|
222
|
+
try {
|
|
223
|
+
return Boolean(config.pathMatcher(pathname));
|
|
224
|
+
} catch {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return registryKey === pathname || registryKey === CURRENT_PAGE_KEY || registryKey === GLOBAL_MENU_KEY;
|
|
229
|
+
}
|
|
230
|
+
function getElementDepth(from, ancestor) {
|
|
231
|
+
let depth = 0;
|
|
232
|
+
for (let node = from; node && node !== ancestor; node = node.parentElement) {
|
|
233
|
+
depth += 1;
|
|
234
|
+
}
|
|
235
|
+
return depth;
|
|
236
|
+
}
|
|
237
|
+
function getTargetScore(config, targetElement) {
|
|
238
|
+
const selectors = toArray(config.target).filter((selector) => typeof selector === "string" && selector.trim());
|
|
239
|
+
if (selectors.length === 0) return 0;
|
|
240
|
+
if (!targetElement) return null;
|
|
241
|
+
let minDepth = Infinity;
|
|
242
|
+
for (const selector of selectors) {
|
|
243
|
+
try {
|
|
244
|
+
const matched = targetElement.closest(selector);
|
|
245
|
+
if (matched) {
|
|
246
|
+
minDepth = Math.min(minDepth, getElementDepth(targetElement, matched));
|
|
247
|
+
}
|
|
248
|
+
} catch {
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return minDepth === Infinity ? null : Math.max(0, MAX_TARGET_SCORE - minDepth);
|
|
252
|
+
}
|
|
253
|
+
function getRouteScore(config, registryKey, pathname) {
|
|
254
|
+
if (!pathname) return 0;
|
|
255
|
+
if (config.path === pathname || toArray(config.paths).includes(pathname) || registryKey === pathname) {
|
|
256
|
+
return EXACT_ROUTE_SCORE;
|
|
257
|
+
}
|
|
258
|
+
if (registryKey === CURRENT_PAGE_KEY) return CURRENT_PAGE_SCORE;
|
|
259
|
+
if (registryKey === GLOBAL_MENU_KEY) return GLOBAL_MENU_SCORE;
|
|
260
|
+
return DEFAULT_ROUTE_SCORE;
|
|
261
|
+
}
|
|
262
|
+
function buildMenuContext(config, event, pathname, targetElement) {
|
|
263
|
+
let context = {
|
|
264
|
+
currentTarget: event.currentTarget ?? null,
|
|
265
|
+
event,
|
|
266
|
+
pathname: pathname || "",
|
|
267
|
+
point: {
|
|
268
|
+
x: Number(event.clientX) || 0,
|
|
269
|
+
y: Number(event.clientY) || 0
|
|
270
|
+
},
|
|
271
|
+
target: targetElement
|
|
272
|
+
};
|
|
273
|
+
if (config.payload !== void 0) context.payload = config.payload;
|
|
274
|
+
try {
|
|
275
|
+
const payload = config.resolvePayload?.(event, context);
|
|
276
|
+
if (payload !== void 0) context.payload = payload;
|
|
277
|
+
} catch {
|
|
278
|
+
}
|
|
279
|
+
try {
|
|
280
|
+
const extra = config.resolveContext?.(event, context);
|
|
281
|
+
if (isObject(extra)) context = {
|
|
282
|
+
...context,
|
|
283
|
+
...extra
|
|
284
|
+
};
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
return context;
|
|
288
|
+
}
|
|
289
|
+
function isMenuOverlayTarget(element) {
|
|
290
|
+
return Boolean(element?.closest?.('[data-context-menu-ignore], [data-context-menu-overlay], [role="menu"]') || element?.classList?.contains("context-menu-overlay"));
|
|
291
|
+
}
|
|
292
|
+
function resolveEventTarget(event) {
|
|
293
|
+
const initialTarget = event.target instanceof Element ? event.target : null;
|
|
294
|
+
if (initialTarget && !isMenuOverlayTarget(initialTarget)) {
|
|
295
|
+
return initialTarget;
|
|
296
|
+
}
|
|
297
|
+
if (!Number.isFinite(event.clientX) || !Number.isFinite(event.clientY)) {
|
|
298
|
+
return initialTarget;
|
|
299
|
+
}
|
|
300
|
+
try {
|
|
301
|
+
const underneath = document.elementsFromPoint(event.clientX, event.clientY).find((element) => !isMenuOverlayTarget(element));
|
|
302
|
+
return underneath || initialTarget;
|
|
303
|
+
} catch {
|
|
304
|
+
return initialTarget;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function passesWhen(config, event, info) {
|
|
308
|
+
if (typeof config.when !== "function") return config.when !== false;
|
|
309
|
+
try {
|
|
310
|
+
return Boolean(config.when(event, info));
|
|
311
|
+
} catch {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function matchCandidate({
|
|
316
|
+
config,
|
|
317
|
+
order,
|
|
318
|
+
registryKey
|
|
319
|
+
}, event, pathname, targetElement) {
|
|
320
|
+
if (!isPathAllowed(config, registryKey, pathname)) return null;
|
|
321
|
+
const context = buildMenuContext(config, event, pathname, targetElement);
|
|
322
|
+
if (!resolveAsBoolean(config.enabled, context, true)) return null;
|
|
323
|
+
if (!passesWhen(config, event, {
|
|
324
|
+
context,
|
|
325
|
+
pathname: pathname || "",
|
|
326
|
+
target: targetElement
|
|
327
|
+
})) {
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
const items = resolveMenuItems(config, context);
|
|
331
|
+
if (!items.length) return null;
|
|
332
|
+
const targetScore = getTargetScore(config, targetElement);
|
|
333
|
+
if (targetScore === null) return null;
|
|
334
|
+
const priority = Number(config.priority);
|
|
335
|
+
const score = (Number.isFinite(priority) ? priority : 0) * PRIORITY_WEIGHT + getRouteScore(config, registryKey, pathname) * ROUTE_WEIGHT + targetScore;
|
|
336
|
+
return {
|
|
337
|
+
config,
|
|
338
|
+
context,
|
|
339
|
+
items,
|
|
340
|
+
order,
|
|
341
|
+
score
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function resolveContextMenu(registryMenus, pathname, event) {
|
|
345
|
+
const targetElement = resolveEventTarget(event);
|
|
346
|
+
let winner = null;
|
|
347
|
+
for (const candidate of normalizeMenuCandidates(registryMenus)) {
|
|
348
|
+
const match = matchCandidate(candidate, event, pathname, targetElement);
|
|
349
|
+
if (match && (!winner || match.score > winner.score)) winner = match;
|
|
350
|
+
}
|
|
351
|
+
return winner;
|
|
352
|
+
}
|
|
353
|
+
function prepareMenu(config, context, event) {
|
|
354
|
+
const onOpenResult = safeInvoke(config.onOpen, event, context);
|
|
355
|
+
if (onOpenResult === false) return null;
|
|
356
|
+
const nextContext = isObject(onOpenResult) ? {
|
|
357
|
+
...context,
|
|
358
|
+
...onOpenResult
|
|
359
|
+
} : context;
|
|
360
|
+
const items = resolveMenuItems(config, nextContext);
|
|
361
|
+
return items.length ? {
|
|
362
|
+
context: nextContext,
|
|
363
|
+
items
|
|
364
|
+
} : null;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// src/modules/context-menu/state.ts
|
|
368
|
+
function createInitialMenuState() {
|
|
369
|
+
return {
|
|
370
|
+
position: INITIAL_POSITION,
|
|
371
|
+
context: null,
|
|
372
|
+
isOpen: false,
|
|
373
|
+
config: null,
|
|
374
|
+
items: []
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
function resolveNextOpenState({
|
|
378
|
+
config,
|
|
379
|
+
context,
|
|
380
|
+
items,
|
|
381
|
+
position
|
|
382
|
+
}) {
|
|
383
|
+
if (!config) return null;
|
|
384
|
+
return {
|
|
385
|
+
config,
|
|
386
|
+
context: context ?? null,
|
|
387
|
+
isOpen: true,
|
|
388
|
+
items: items ?? [],
|
|
389
|
+
position: {
|
|
390
|
+
x: Math.round(toFiniteNumber(position?.x, 0)),
|
|
391
|
+
y: Math.round(toFiniteNumber(position?.y, 0))
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
function emitContextMenuVisibility(isOpen) {
|
|
396
|
+
if (!isBrowser) return;
|
|
397
|
+
window.dispatchEvent(new CustomEvent(CONTEXT_MENU_VISIBILITY_EVENT, {
|
|
398
|
+
detail: {
|
|
399
|
+
isOpen: Boolean(isOpen)
|
|
400
|
+
}
|
|
401
|
+
}));
|
|
402
|
+
}
|
|
403
|
+
var ContextMenuContext = getOrCreateGlobalContext("ContextMenuContext", null);
|
|
404
|
+
function selectIsOpen(state) {
|
|
405
|
+
return state.isOpen;
|
|
406
|
+
}
|
|
407
|
+
function createTriggerContext(event, point, pathname, payload) {
|
|
408
|
+
return {
|
|
409
|
+
currentTarget: event.currentTarget ?? null,
|
|
410
|
+
event,
|
|
411
|
+
pathname,
|
|
412
|
+
payload,
|
|
413
|
+
point,
|
|
414
|
+
target: event.target ?? null
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function createContextMenu() {
|
|
418
|
+
let pathname = "";
|
|
419
|
+
const store = createStore(createInitialMenuState(), {
|
|
420
|
+
freezeSnapshots: false
|
|
421
|
+
});
|
|
422
|
+
const openMenu = (input) => {
|
|
423
|
+
const nextState = resolveNextOpenState(input);
|
|
424
|
+
if (nextState) store.publish(nextState);
|
|
425
|
+
};
|
|
426
|
+
const closeMenu = () => {
|
|
427
|
+
const current = store.getSnapshot();
|
|
428
|
+
if (!current.isOpen) return;
|
|
429
|
+
store.publish(createInitialMenuState());
|
|
430
|
+
safeInvoke(current.config?.onClose, current.context);
|
|
431
|
+
};
|
|
432
|
+
const bind = (payload, configOverride) => ({
|
|
433
|
+
onContextMenu: (event) => {
|
|
434
|
+
const config = configOverride || store.getSnapshot().config;
|
|
435
|
+
if (!config) return;
|
|
436
|
+
event.preventDefault?.();
|
|
437
|
+
event.stopPropagation?.();
|
|
438
|
+
const point = {
|
|
439
|
+
x: Number(event.clientX ?? 0),
|
|
440
|
+
y: Number(event.clientY ?? 0)
|
|
441
|
+
};
|
|
442
|
+
const context = createTriggerContext(event, point, pathname, payload);
|
|
443
|
+
const prepared = prepareMenu(config, context, event);
|
|
444
|
+
if (!prepared) return;
|
|
445
|
+
openMenu({
|
|
446
|
+
config,
|
|
447
|
+
context: prepared.context,
|
|
448
|
+
items: prepared.items,
|
|
449
|
+
position: point
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
const actions = {
|
|
454
|
+
bind,
|
|
455
|
+
closeMenu,
|
|
456
|
+
openMenu
|
|
457
|
+
};
|
|
458
|
+
return {
|
|
459
|
+
setPathname: (next) => {
|
|
460
|
+
pathname = next;
|
|
461
|
+
},
|
|
462
|
+
value: {
|
|
463
|
+
actions,
|
|
464
|
+
store
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
function ContextMenuProvider(t0) {
|
|
469
|
+
const $ = c(10);
|
|
470
|
+
const {
|
|
471
|
+
children
|
|
472
|
+
} = t0;
|
|
473
|
+
const pathname = usePathname();
|
|
474
|
+
const [t1] = useState(createContextMenu);
|
|
475
|
+
const {
|
|
476
|
+
setPathname,
|
|
477
|
+
value: contextValue
|
|
478
|
+
} = t1;
|
|
479
|
+
let t2;
|
|
480
|
+
let t3;
|
|
481
|
+
if ($[0] !== pathname || $[1] !== setPathname) {
|
|
482
|
+
t2 = () => {
|
|
483
|
+
setPathname(pathname || "");
|
|
484
|
+
};
|
|
485
|
+
t3 = [pathname, setPathname];
|
|
486
|
+
$[0] = pathname;
|
|
487
|
+
$[1] = setPathname;
|
|
488
|
+
$[2] = t2;
|
|
489
|
+
$[3] = t3;
|
|
490
|
+
} else {
|
|
491
|
+
t2 = $[2];
|
|
492
|
+
t3 = $[3];
|
|
493
|
+
}
|
|
494
|
+
useLayoutEffect(t2, t3);
|
|
495
|
+
const isOpen = useStore(contextValue.store, selectIsOpen);
|
|
496
|
+
let t4;
|
|
497
|
+
let t5;
|
|
498
|
+
if ($[4] !== isOpen) {
|
|
499
|
+
t4 = () => emitContextMenuVisibility(isOpen);
|
|
500
|
+
t5 = [isOpen];
|
|
501
|
+
$[4] = isOpen;
|
|
502
|
+
$[5] = t4;
|
|
503
|
+
$[6] = t5;
|
|
504
|
+
} else {
|
|
505
|
+
t4 = $[5];
|
|
506
|
+
t5 = $[6];
|
|
507
|
+
}
|
|
508
|
+
useEffect(t4, t5);
|
|
509
|
+
let t6;
|
|
510
|
+
if ($[7] !== children || $[8] !== contextValue) {
|
|
511
|
+
t6 = /* @__PURE__ */ jsx(ContextMenuContext, { value: contextValue, children });
|
|
512
|
+
$[7] = children;
|
|
513
|
+
$[8] = contextValue;
|
|
514
|
+
$[9] = t6;
|
|
515
|
+
} else {
|
|
516
|
+
t6 = $[9];
|
|
517
|
+
}
|
|
518
|
+
return t6;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// src/modules/context-menu/dom.ts
|
|
522
|
+
function joinClassNames(...classes) {
|
|
523
|
+
return classes.filter(Boolean).join(" ");
|
|
524
|
+
}
|
|
525
|
+
var SCROLL_LOCK_KEYS = /* @__PURE__ */ new Set(["ArrowDown", "ArrowUp", "End", "Home", "PageDown", "PageUp", " ", "Spacebar"]);
|
|
526
|
+
function isScrollLockKey(event) {
|
|
527
|
+
return SCROLL_LOCK_KEYS.has(event.key);
|
|
528
|
+
}
|
|
529
|
+
function positionMenu(menuElement, position) {
|
|
530
|
+
if (!menuElement) return;
|
|
531
|
+
const {
|
|
532
|
+
height,
|
|
533
|
+
width
|
|
534
|
+
} = menuElement.getBoundingClientRect();
|
|
535
|
+
const maxX = window.innerWidth - width - MENU_SCREEN_MARGIN;
|
|
536
|
+
const maxY = window.innerHeight - height - MENU_SCREEN_MARGIN;
|
|
537
|
+
const x = Math.min(Number(position?.x) || 0, maxX);
|
|
538
|
+
const y = Math.min(Number(position?.y) || 0, maxY);
|
|
539
|
+
menuElement.style.left = `${Math.round(Math.max(MENU_SCREEN_MARGIN, x))}px`;
|
|
540
|
+
menuElement.style.top = `${Math.round(Math.max(MENU_SCREEN_MARGIN, y))}px`;
|
|
541
|
+
}
|
|
542
|
+
function getNextActiveIndex(items, current, direction) {
|
|
543
|
+
const count = items.length;
|
|
544
|
+
let start;
|
|
545
|
+
if (!(current < 0)) start = current + direction;
|
|
546
|
+
else if (direction === 1) start = 0;
|
|
547
|
+
else start = count - 1;
|
|
548
|
+
for (let step = 0; step < count; step++) {
|
|
549
|
+
const index = ((start + step * direction) % count + count) % count;
|
|
550
|
+
if (items[index].type === "action" && !items[index].disabled) return index;
|
|
551
|
+
}
|
|
552
|
+
return current;
|
|
553
|
+
}
|
|
554
|
+
function useContextMenuRegistration(config, options) {
|
|
555
|
+
useModuleRegistration("contextMenu", config, options);
|
|
556
|
+
}
|
|
557
|
+
function useContextMenu(config, options) {
|
|
558
|
+
const $ = c(9);
|
|
559
|
+
useContextMenuRegistration(config || null, options);
|
|
560
|
+
const {
|
|
561
|
+
actions,
|
|
562
|
+
store
|
|
563
|
+
} = useRequiredContext(ContextMenuContext, "useContextMenu", "ContextMenuProvider");
|
|
564
|
+
const state = useStore(store);
|
|
565
|
+
let t0;
|
|
566
|
+
bb0: {
|
|
567
|
+
let t1;
|
|
568
|
+
if ($[0] !== actions || $[1] !== state) {
|
|
569
|
+
t1 = {
|
|
570
|
+
...state,
|
|
571
|
+
...actions
|
|
572
|
+
};
|
|
573
|
+
$[0] = actions;
|
|
574
|
+
$[1] = state;
|
|
575
|
+
$[2] = t1;
|
|
576
|
+
} else {
|
|
577
|
+
t1 = $[2];
|
|
578
|
+
}
|
|
579
|
+
const ctx = t1;
|
|
580
|
+
if (!config) {
|
|
581
|
+
t0 = ctx;
|
|
582
|
+
break bb0;
|
|
583
|
+
}
|
|
584
|
+
let t2;
|
|
585
|
+
if ($[3] !== actions || $[4] !== config) {
|
|
586
|
+
t2 = (payload, configOverride) => actions.bind(payload, {
|
|
587
|
+
...config,
|
|
588
|
+
...configOverride
|
|
589
|
+
});
|
|
590
|
+
$[3] = actions;
|
|
591
|
+
$[4] = config;
|
|
592
|
+
$[5] = t2;
|
|
593
|
+
} else {
|
|
594
|
+
t2 = $[5];
|
|
595
|
+
}
|
|
596
|
+
let t3;
|
|
597
|
+
if ($[6] !== ctx || $[7] !== t2) {
|
|
598
|
+
t3 = {
|
|
599
|
+
...ctx,
|
|
600
|
+
bind: t2
|
|
601
|
+
};
|
|
602
|
+
$[6] = ctx;
|
|
603
|
+
$[7] = t2;
|
|
604
|
+
$[8] = t3;
|
|
605
|
+
} else {
|
|
606
|
+
t3 = $[8];
|
|
607
|
+
}
|
|
608
|
+
t0 = t3;
|
|
609
|
+
}
|
|
610
|
+
return t0;
|
|
611
|
+
}
|
|
612
|
+
function useContextMenuActions() {
|
|
613
|
+
return useRequiredContext(ContextMenuContext, "useContextMenuActions", "ContextMenuProvider").actions;
|
|
614
|
+
}
|
|
615
|
+
function useContextMenuState() {
|
|
616
|
+
const {
|
|
617
|
+
store
|
|
618
|
+
} = useRequiredContext(ContextMenuContext, "useContextMenuState", "ContextMenuProvider");
|
|
619
|
+
return useStore(store);
|
|
620
|
+
}
|
|
621
|
+
function mergeSlotClasses(slots, overrides) {
|
|
622
|
+
const extra = overrides ?? {};
|
|
623
|
+
const merged = {
|
|
624
|
+
...slots
|
|
625
|
+
};
|
|
626
|
+
for (const slot of Object.keys(merged)) {
|
|
627
|
+
merged[slot] = joinClassNames(slots[slot], extra[slot]);
|
|
628
|
+
}
|
|
629
|
+
return merged;
|
|
630
|
+
}
|
|
631
|
+
function selectDockPageCard(dock) {
|
|
632
|
+
const card = dock.activeItem;
|
|
633
|
+
return card && !card.isSurface ? card : null;
|
|
634
|
+
}
|
|
635
|
+
function useContextMenuListener() {
|
|
636
|
+
const $ = c(6);
|
|
637
|
+
const menus = useRegistryEntries("contextMenu");
|
|
638
|
+
const dockCard = useOptionalDockState(selectDockPageCard);
|
|
639
|
+
const {
|
|
640
|
+
openMenu
|
|
641
|
+
} = useContextMenuActions();
|
|
642
|
+
const pathname = usePathname();
|
|
643
|
+
let t0;
|
|
644
|
+
let t1;
|
|
645
|
+
if ($[0] !== dockCard || $[1] !== menus || $[2] !== openMenu || $[3] !== pathname) {
|
|
646
|
+
t0 = () => {
|
|
647
|
+
const handleContextMenu = (event) => {
|
|
648
|
+
const match = resolveContextMenu(menus, pathname || void 0, event);
|
|
649
|
+
if (!match) {
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
event.preventDefault();
|
|
653
|
+
event.stopPropagation();
|
|
654
|
+
const page = resolveContextMenuPageMeta(dockCard, pathname || "");
|
|
655
|
+
const prepared = prepareMenu(match.config, page ? {
|
|
656
|
+
...match.context,
|
|
657
|
+
page
|
|
658
|
+
} : match.context, event);
|
|
659
|
+
if (!prepared) {
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
openMenu({
|
|
663
|
+
config: match.config,
|
|
664
|
+
context: prepared.context,
|
|
665
|
+
items: prepared.items,
|
|
666
|
+
position: {
|
|
667
|
+
x: event.clientX,
|
|
668
|
+
y: event.clientY
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
};
|
|
672
|
+
document.addEventListener("contextmenu", handleContextMenu, true);
|
|
673
|
+
return () => document.removeEventListener("contextmenu", handleContextMenu, true);
|
|
674
|
+
};
|
|
675
|
+
t1 = [dockCard, menus, openMenu, pathname];
|
|
676
|
+
$[0] = dockCard;
|
|
677
|
+
$[1] = menus;
|
|
678
|
+
$[2] = openMenu;
|
|
679
|
+
$[3] = pathname;
|
|
680
|
+
$[4] = t0;
|
|
681
|
+
$[5] = t1;
|
|
682
|
+
} else {
|
|
683
|
+
t0 = $[4];
|
|
684
|
+
t1 = $[5];
|
|
685
|
+
}
|
|
686
|
+
useEffect(t0, t1);
|
|
687
|
+
}
|
|
688
|
+
function useMenuDismissal(menuRef, onClose) {
|
|
689
|
+
const $ = c(4);
|
|
690
|
+
let t0;
|
|
691
|
+
let t1;
|
|
692
|
+
if ($[0] !== menuRef || $[1] !== onClose) {
|
|
693
|
+
t0 = () => {
|
|
694
|
+
const preventScroll = _temp;
|
|
695
|
+
const listenerOptions = {
|
|
696
|
+
capture: true,
|
|
697
|
+
passive: false
|
|
698
|
+
};
|
|
699
|
+
const handleInteraction = (event_0) => {
|
|
700
|
+
const isInside = menuRef.current?.contains(event_0.target);
|
|
701
|
+
if (event_0.type === "keydown") {
|
|
702
|
+
if (event_0.key === "Escape") {
|
|
703
|
+
onClose();
|
|
704
|
+
}
|
|
705
|
+
if (!isInside && isScrollLockKey(event_0)) {
|
|
706
|
+
event_0.preventDefault();
|
|
707
|
+
}
|
|
708
|
+
} else {
|
|
709
|
+
if (!isInside) {
|
|
710
|
+
onClose();
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
document.addEventListener("mousedown", handleInteraction, true);
|
|
715
|
+
document.addEventListener("keydown", handleInteraction, true);
|
|
716
|
+
window.addEventListener("wheel", preventScroll, listenerOptions);
|
|
717
|
+
window.addEventListener("touchmove", preventScroll, listenerOptions);
|
|
718
|
+
return () => {
|
|
719
|
+
document.removeEventListener("mousedown", handleInteraction, true);
|
|
720
|
+
document.removeEventListener("keydown", handleInteraction, true);
|
|
721
|
+
window.removeEventListener("wheel", preventScroll, true);
|
|
722
|
+
window.removeEventListener("touchmove", preventScroll, true);
|
|
723
|
+
};
|
|
724
|
+
};
|
|
725
|
+
t1 = [menuRef, onClose];
|
|
726
|
+
$[0] = menuRef;
|
|
727
|
+
$[1] = onClose;
|
|
728
|
+
$[2] = t0;
|
|
729
|
+
$[3] = t1;
|
|
730
|
+
} else {
|
|
731
|
+
t0 = $[2];
|
|
732
|
+
t1 = $[3];
|
|
733
|
+
}
|
|
734
|
+
useEffect(t0, t1);
|
|
735
|
+
}
|
|
736
|
+
function _temp(event) {
|
|
737
|
+
return event.preventDefault();
|
|
738
|
+
}
|
|
739
|
+
function useContextMenuContentModel(t0) {
|
|
740
|
+
const $ = c(31);
|
|
741
|
+
const {
|
|
742
|
+
config,
|
|
743
|
+
items,
|
|
744
|
+
menuContext,
|
|
745
|
+
onClose,
|
|
746
|
+
position
|
|
747
|
+
} = t0;
|
|
748
|
+
const menuRef = useRef(null);
|
|
749
|
+
let t1;
|
|
750
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
751
|
+
t1 = [];
|
|
752
|
+
$[0] = t1;
|
|
753
|
+
} else {
|
|
754
|
+
t1 = $[0];
|
|
755
|
+
}
|
|
756
|
+
const itemRefs = useRef(t1);
|
|
757
|
+
const theme = useTheme(contextMenuTheme);
|
|
758
|
+
let t2;
|
|
759
|
+
if ($[1] !== config.classNames || $[2] !== theme.slots) {
|
|
760
|
+
t2 = mergeSlotClasses(theme.slots, config.classNames);
|
|
761
|
+
$[1] = config.classNames;
|
|
762
|
+
$[2] = theme.slots;
|
|
763
|
+
$[3] = t2;
|
|
764
|
+
} else {
|
|
765
|
+
t2 = $[3];
|
|
766
|
+
}
|
|
767
|
+
const classes = t2;
|
|
768
|
+
let t3;
|
|
769
|
+
if ($[4] !== config || $[5] !== menuContext) {
|
|
770
|
+
t3 = resolveMenuHeader(config, menuContext);
|
|
771
|
+
$[4] = config;
|
|
772
|
+
$[5] = menuContext;
|
|
773
|
+
$[6] = t3;
|
|
774
|
+
} else {
|
|
775
|
+
t3 = $[6];
|
|
776
|
+
}
|
|
777
|
+
const header = t3;
|
|
778
|
+
const [activeIndex, setActiveIndex] = useState(-1);
|
|
779
|
+
const [prevItems, setPrevItems] = useState(items);
|
|
780
|
+
if (items !== prevItems) {
|
|
781
|
+
setPrevItems(items);
|
|
782
|
+
setActiveIndex(-1);
|
|
783
|
+
}
|
|
784
|
+
let t4;
|
|
785
|
+
if ($[7] !== position) {
|
|
786
|
+
t4 = () => {
|
|
787
|
+
itemRefs.current = [];
|
|
788
|
+
positionMenu(menuRef.current, position);
|
|
789
|
+
};
|
|
790
|
+
$[7] = position;
|
|
791
|
+
$[8] = t4;
|
|
792
|
+
} else {
|
|
793
|
+
t4 = $[8];
|
|
794
|
+
}
|
|
795
|
+
let t5;
|
|
796
|
+
if ($[9] !== header || $[10] !== items || $[11] !== position) {
|
|
797
|
+
t5 = [header, items, position];
|
|
798
|
+
$[9] = header;
|
|
799
|
+
$[10] = items;
|
|
800
|
+
$[11] = position;
|
|
801
|
+
$[12] = t5;
|
|
802
|
+
} else {
|
|
803
|
+
t5 = $[12];
|
|
804
|
+
}
|
|
805
|
+
useLayoutEffect(t4, t5);
|
|
806
|
+
let t6;
|
|
807
|
+
let t7;
|
|
808
|
+
if ($[13] !== activeIndex) {
|
|
809
|
+
t6 = () => {
|
|
810
|
+
const target = activeIndex < 0 ? menuRef.current : itemRefs.current[activeIndex];
|
|
811
|
+
target?.focus({
|
|
812
|
+
preventScroll: true
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
t7 = [activeIndex];
|
|
816
|
+
$[13] = activeIndex;
|
|
817
|
+
$[14] = t6;
|
|
818
|
+
$[15] = t7;
|
|
819
|
+
} else {
|
|
820
|
+
t6 = $[14];
|
|
821
|
+
t7 = $[15];
|
|
822
|
+
}
|
|
823
|
+
useEffect(t6, t7);
|
|
824
|
+
useMenuDismissal(menuRef, onClose);
|
|
825
|
+
let t8;
|
|
826
|
+
if ($[16] !== menuContext || $[17] !== onClose) {
|
|
827
|
+
t8 = (item, event) => {
|
|
828
|
+
event.preventDefault();
|
|
829
|
+
event.stopPropagation();
|
|
830
|
+
if (item.disabled) {
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
safeInvoke(item.onSelect || item.onClick, event, menuContext);
|
|
834
|
+
if (item.closeOnSelect !== false) {
|
|
835
|
+
onClose();
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
$[16] = menuContext;
|
|
839
|
+
$[17] = onClose;
|
|
840
|
+
$[18] = t8;
|
|
841
|
+
} else {
|
|
842
|
+
t8 = $[18];
|
|
843
|
+
}
|
|
844
|
+
const handleItemSelect = t8;
|
|
845
|
+
let t9;
|
|
846
|
+
if ($[19] !== activeIndex || $[20] !== handleItemSelect || $[21] !== items || $[22] !== onClose) {
|
|
847
|
+
t9 = (event_0) => {
|
|
848
|
+
if (event_0.key === "Escape") {
|
|
849
|
+
event_0.preventDefault();
|
|
850
|
+
onClose();
|
|
851
|
+
} else {
|
|
852
|
+
if (event_0.key === "ArrowDown" || event_0.key === "ArrowUp") {
|
|
853
|
+
event_0.preventDefault();
|
|
854
|
+
const direction = event_0.key === "ArrowDown" ? 1 : -1;
|
|
855
|
+
setActiveIndex((current) => getNextActiveIndex(items, current, direction));
|
|
856
|
+
} else {
|
|
857
|
+
if ((event_0.key === "Enter" || event_0.key === " ") && items[activeIndex]) {
|
|
858
|
+
event_0.preventDefault();
|
|
859
|
+
handleItemSelect(items[activeIndex], event_0);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
$[19] = activeIndex;
|
|
865
|
+
$[20] = handleItemSelect;
|
|
866
|
+
$[21] = items;
|
|
867
|
+
$[22] = onClose;
|
|
868
|
+
$[23] = t9;
|
|
869
|
+
} else {
|
|
870
|
+
t9 = $[23];
|
|
871
|
+
}
|
|
872
|
+
const handleMenuKeyDown = t9;
|
|
873
|
+
let t10;
|
|
874
|
+
if ($[24] !== activeIndex || $[25] !== classes || $[26] !== handleItemSelect || $[27] !== handleMenuKeyDown || $[28] !== header || $[29] !== theme.styles) {
|
|
875
|
+
t10 = {
|
|
876
|
+
menuRef,
|
|
877
|
+
itemRefs,
|
|
878
|
+
classes,
|
|
879
|
+
styles: theme.styles,
|
|
880
|
+
header,
|
|
881
|
+
activeIndex,
|
|
882
|
+
setActiveIndex,
|
|
883
|
+
handleItemSelect,
|
|
884
|
+
handleMenuKeyDown
|
|
885
|
+
};
|
|
886
|
+
$[24] = activeIndex;
|
|
887
|
+
$[25] = classes;
|
|
888
|
+
$[26] = handleItemSelect;
|
|
889
|
+
$[27] = handleMenuKeyDown;
|
|
890
|
+
$[28] = header;
|
|
891
|
+
$[29] = theme.styles;
|
|
892
|
+
$[30] = t10;
|
|
893
|
+
} else {
|
|
894
|
+
t10 = $[30];
|
|
895
|
+
}
|
|
896
|
+
return t10;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// src/modules/context-menu/motion.ts
|
|
900
|
+
function useContextMenuMotion() {
|
|
901
|
+
return useModuleMotion(contextMenuTheme);
|
|
902
|
+
}
|
|
903
|
+
function ContextMenuHeaderIcon(t0) {
|
|
904
|
+
const $ = c(10);
|
|
905
|
+
const {
|
|
906
|
+
classes,
|
|
907
|
+
icon
|
|
908
|
+
} = t0;
|
|
909
|
+
const iconClassName = classes.headerIcon;
|
|
910
|
+
if (typeof icon === "string" && isImageIconSource(icon)) {
|
|
911
|
+
const t12 = `url(${icon})`;
|
|
912
|
+
let t22;
|
|
913
|
+
if ($[0] !== t12) {
|
|
914
|
+
t22 = {
|
|
915
|
+
backgroundImage: t12
|
|
916
|
+
};
|
|
917
|
+
$[0] = t12;
|
|
918
|
+
$[1] = t22;
|
|
919
|
+
} else {
|
|
920
|
+
t22 = $[1];
|
|
921
|
+
}
|
|
922
|
+
let t3;
|
|
923
|
+
if ($[2] !== iconClassName || $[3] !== t22) {
|
|
924
|
+
t3 = /* @__PURE__ */ jsx("div", { className: iconClassName, style: t22 });
|
|
925
|
+
$[2] = iconClassName;
|
|
926
|
+
$[3] = t22;
|
|
927
|
+
$[4] = t3;
|
|
928
|
+
} else {
|
|
929
|
+
t3 = $[4];
|
|
930
|
+
}
|
|
931
|
+
return t3;
|
|
932
|
+
}
|
|
933
|
+
let t1;
|
|
934
|
+
if ($[5] !== icon) {
|
|
935
|
+
t1 = typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { icon, size: HEADER_ICON_SIZE }) : icon;
|
|
936
|
+
$[5] = icon;
|
|
937
|
+
$[6] = t1;
|
|
938
|
+
} else {
|
|
939
|
+
t1 = $[6];
|
|
940
|
+
}
|
|
941
|
+
let t2;
|
|
942
|
+
if ($[7] !== iconClassName || $[8] !== t1) {
|
|
943
|
+
t2 = /* @__PURE__ */ jsx("div", { className: iconClassName, children: t1 });
|
|
944
|
+
$[7] = iconClassName;
|
|
945
|
+
$[8] = t1;
|
|
946
|
+
$[9] = t2;
|
|
947
|
+
} else {
|
|
948
|
+
t2 = $[9];
|
|
949
|
+
}
|
|
950
|
+
return t2;
|
|
951
|
+
}
|
|
952
|
+
function ContextMenuHeader(t0) {
|
|
953
|
+
const $ = c(21);
|
|
954
|
+
const {
|
|
955
|
+
classes,
|
|
956
|
+
header
|
|
957
|
+
} = t0;
|
|
958
|
+
if (!header) {
|
|
959
|
+
return null;
|
|
960
|
+
}
|
|
961
|
+
let t1;
|
|
962
|
+
if ($[0] !== classes || $[1] !== header.icon) {
|
|
963
|
+
t1 = header.icon && /* @__PURE__ */ jsx(ContextMenuHeaderIcon, { classes, icon: header.icon });
|
|
964
|
+
$[0] = classes;
|
|
965
|
+
$[1] = header.icon;
|
|
966
|
+
$[2] = t1;
|
|
967
|
+
} else {
|
|
968
|
+
t1 = $[2];
|
|
969
|
+
}
|
|
970
|
+
let t2;
|
|
971
|
+
if ($[3] !== classes.headerEyebrow || $[4] !== header.eyebrow) {
|
|
972
|
+
t2 = header.eyebrow && /* @__PURE__ */ jsx("div", { className: classes.headerEyebrow, children: header.eyebrow });
|
|
973
|
+
$[3] = classes.headerEyebrow;
|
|
974
|
+
$[4] = header.eyebrow;
|
|
975
|
+
$[5] = t2;
|
|
976
|
+
} else {
|
|
977
|
+
t2 = $[5];
|
|
978
|
+
}
|
|
979
|
+
let t3;
|
|
980
|
+
if ($[6] !== classes.headerTitle || $[7] !== header.title) {
|
|
981
|
+
t3 = header.title && /* @__PURE__ */ jsx("div", { className: classes.headerTitle, children: header.title });
|
|
982
|
+
$[6] = classes.headerTitle;
|
|
983
|
+
$[7] = header.title;
|
|
984
|
+
$[8] = t3;
|
|
985
|
+
} else {
|
|
986
|
+
t3 = $[8];
|
|
987
|
+
}
|
|
988
|
+
let t4;
|
|
989
|
+
if ($[9] !== classes.headerDescription || $[10] !== header.description) {
|
|
990
|
+
t4 = header.description && /* @__PURE__ */ jsx("div", { className: classes.headerDescription, children: header.description });
|
|
991
|
+
$[9] = classes.headerDescription;
|
|
992
|
+
$[10] = header.description;
|
|
993
|
+
$[11] = t4;
|
|
994
|
+
} else {
|
|
995
|
+
t4 = $[11];
|
|
996
|
+
}
|
|
997
|
+
let t5;
|
|
998
|
+
if ($[12] !== classes.headerText || $[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
|
|
999
|
+
t5 = /* @__PURE__ */ jsxs("div", { className: classes.headerText, children: [
|
|
1000
|
+
t2,
|
|
1001
|
+
t3,
|
|
1002
|
+
t4
|
|
1003
|
+
] });
|
|
1004
|
+
$[12] = classes.headerText;
|
|
1005
|
+
$[13] = t2;
|
|
1006
|
+
$[14] = t3;
|
|
1007
|
+
$[15] = t4;
|
|
1008
|
+
$[16] = t5;
|
|
1009
|
+
} else {
|
|
1010
|
+
t5 = $[16];
|
|
1011
|
+
}
|
|
1012
|
+
let t6;
|
|
1013
|
+
if ($[17] !== classes.header || $[18] !== t1 || $[19] !== t5) {
|
|
1014
|
+
t6 = /* @__PURE__ */ jsxs("div", { className: classes.header, children: [
|
|
1015
|
+
t1,
|
|
1016
|
+
t5
|
|
1017
|
+
] });
|
|
1018
|
+
$[17] = classes.header;
|
|
1019
|
+
$[18] = t1;
|
|
1020
|
+
$[19] = t5;
|
|
1021
|
+
$[20] = t6;
|
|
1022
|
+
} else {
|
|
1023
|
+
t6 = $[20];
|
|
1024
|
+
}
|
|
1025
|
+
return t6;
|
|
1026
|
+
}
|
|
1027
|
+
function ContextMenuItem(t0) {
|
|
1028
|
+
const $ = c(32);
|
|
1029
|
+
const {
|
|
1030
|
+
classes,
|
|
1031
|
+
isActive,
|
|
1032
|
+
item,
|
|
1033
|
+
onHover,
|
|
1034
|
+
onSelect,
|
|
1035
|
+
setButtonRef
|
|
1036
|
+
} = t0;
|
|
1037
|
+
const menuMotion = useContextMenuMotion();
|
|
1038
|
+
if (item.type === "separator") {
|
|
1039
|
+
let t12;
|
|
1040
|
+
if ($[0] !== classes.separator) {
|
|
1041
|
+
t12 = /* @__PURE__ */ jsx("div", { className: classes.separator, role: "separator" });
|
|
1042
|
+
$[0] = classes.separator;
|
|
1043
|
+
$[1] = t12;
|
|
1044
|
+
} else {
|
|
1045
|
+
t12 = $[1];
|
|
1046
|
+
}
|
|
1047
|
+
return t12;
|
|
1048
|
+
}
|
|
1049
|
+
let t1;
|
|
1050
|
+
if ($[2] !== classes.item || $[3] !== item.className) {
|
|
1051
|
+
t1 = joinClassNames(classes.item, item.className);
|
|
1052
|
+
$[2] = classes.item;
|
|
1053
|
+
$[3] = item.className;
|
|
1054
|
+
$[4] = t1;
|
|
1055
|
+
} else {
|
|
1056
|
+
t1 = $[4];
|
|
1057
|
+
}
|
|
1058
|
+
const itemClassName = t1;
|
|
1059
|
+
let t2;
|
|
1060
|
+
if ($[5] !== classes.itemIcon || $[6] !== item.itemIconClassName) {
|
|
1061
|
+
t2 = joinClassNames(classes.itemIcon, item.itemIconClassName);
|
|
1062
|
+
$[5] = classes.itemIcon;
|
|
1063
|
+
$[6] = item.itemIconClassName;
|
|
1064
|
+
$[7] = t2;
|
|
1065
|
+
} else {
|
|
1066
|
+
t2 = $[7];
|
|
1067
|
+
}
|
|
1068
|
+
const itemIconClassName = t2;
|
|
1069
|
+
let t3;
|
|
1070
|
+
if ($[8] !== item.icon || $[9] !== itemIconClassName) {
|
|
1071
|
+
t3 = typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { icon: item.icon, className: itemIconClassName, size: ITEM_ICON_SIZE }) : item.icon;
|
|
1072
|
+
$[8] = item.icon;
|
|
1073
|
+
$[9] = itemIconClassName;
|
|
1074
|
+
$[10] = t3;
|
|
1075
|
+
} else {
|
|
1076
|
+
t3 = $[10];
|
|
1077
|
+
}
|
|
1078
|
+
const itemIcon = t3;
|
|
1079
|
+
const t4 = isActive ? "true" : void 0;
|
|
1080
|
+
let t5;
|
|
1081
|
+
if ($[11] !== item || $[12] !== onSelect) {
|
|
1082
|
+
t5 = (event) => onSelect(item, event);
|
|
1083
|
+
$[11] = item;
|
|
1084
|
+
$[12] = onSelect;
|
|
1085
|
+
$[13] = t5;
|
|
1086
|
+
} else {
|
|
1087
|
+
t5 = $[13];
|
|
1088
|
+
}
|
|
1089
|
+
const t6 = item.icon && itemIcon;
|
|
1090
|
+
let t7;
|
|
1091
|
+
if ($[14] !== classes.itemLabel || $[15] !== item.label) {
|
|
1092
|
+
t7 = /* @__PURE__ */ jsx("span", { className: classes.itemLabel, children: item.label });
|
|
1093
|
+
$[14] = classes.itemLabel;
|
|
1094
|
+
$[15] = item.label;
|
|
1095
|
+
$[16] = t7;
|
|
1096
|
+
} else {
|
|
1097
|
+
t7 = $[16];
|
|
1098
|
+
}
|
|
1099
|
+
let t8;
|
|
1100
|
+
if ($[17] !== classes.itemShortcut || $[18] !== item.shortcut) {
|
|
1101
|
+
t8 = item.shortcut && /* @__PURE__ */ jsx("span", { className: classes.itemShortcut, children: item.shortcut });
|
|
1102
|
+
$[17] = classes.itemShortcut;
|
|
1103
|
+
$[18] = item.shortcut;
|
|
1104
|
+
$[19] = t8;
|
|
1105
|
+
} else {
|
|
1106
|
+
t8 = $[19];
|
|
1107
|
+
}
|
|
1108
|
+
let t9;
|
|
1109
|
+
if ($[20] !== item.disabled || $[21] !== itemClassName || $[22] !== menuMotion.itemTap || $[23] !== menuMotion.itemTransition || $[24] !== onHover || $[25] !== setButtonRef || $[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7 || $[30] !== t8) {
|
|
1110
|
+
t9 = /* @__PURE__ */ jsxs(motion.button, { ref: setButtonRef, className: itemClassName, "data-active": t4, "aria-disabled": item.disabled, disabled: item.disabled, role: "menuitem", type: "button", whileTap: menuMotion.itemTap, transition: menuMotion.itemTransition, onMouseEnter: onHover, onClick: t5, children: [
|
|
1111
|
+
t6,
|
|
1112
|
+
t7,
|
|
1113
|
+
t8
|
|
1114
|
+
] });
|
|
1115
|
+
$[20] = item.disabled;
|
|
1116
|
+
$[21] = itemClassName;
|
|
1117
|
+
$[22] = menuMotion.itemTap;
|
|
1118
|
+
$[23] = menuMotion.itemTransition;
|
|
1119
|
+
$[24] = onHover;
|
|
1120
|
+
$[25] = setButtonRef;
|
|
1121
|
+
$[26] = t4;
|
|
1122
|
+
$[27] = t5;
|
|
1123
|
+
$[28] = t6;
|
|
1124
|
+
$[29] = t7;
|
|
1125
|
+
$[30] = t8;
|
|
1126
|
+
$[31] = t9;
|
|
1127
|
+
} else {
|
|
1128
|
+
t9 = $[31];
|
|
1129
|
+
}
|
|
1130
|
+
return t9;
|
|
1131
|
+
}
|
|
1132
|
+
var EMPTY_MENU_CONTEXT = Object.freeze({
|
|
1133
|
+
pathname: "",
|
|
1134
|
+
point: {
|
|
1135
|
+
x: 0,
|
|
1136
|
+
y: 0
|
|
1137
|
+
}
|
|
1138
|
+
});
|
|
1139
|
+
function ContextMenuContent(t0) {
|
|
1140
|
+
const $ = c(49);
|
|
1141
|
+
const {
|
|
1142
|
+
config,
|
|
1143
|
+
items,
|
|
1144
|
+
menuContext,
|
|
1145
|
+
onClose,
|
|
1146
|
+
position
|
|
1147
|
+
} = t0;
|
|
1148
|
+
let t1;
|
|
1149
|
+
if ($[0] !== config || $[1] !== items || $[2] !== menuContext || $[3] !== onClose || $[4] !== position) {
|
|
1150
|
+
t1 = {
|
|
1151
|
+
config,
|
|
1152
|
+
items,
|
|
1153
|
+
menuContext,
|
|
1154
|
+
onClose,
|
|
1155
|
+
position
|
|
1156
|
+
};
|
|
1157
|
+
$[0] = config;
|
|
1158
|
+
$[1] = items;
|
|
1159
|
+
$[2] = menuContext;
|
|
1160
|
+
$[3] = onClose;
|
|
1161
|
+
$[4] = position;
|
|
1162
|
+
$[5] = t1;
|
|
1163
|
+
} else {
|
|
1164
|
+
t1 = $[5];
|
|
1165
|
+
}
|
|
1166
|
+
const {
|
|
1167
|
+
menuRef,
|
|
1168
|
+
itemRefs,
|
|
1169
|
+
classes,
|
|
1170
|
+
styles,
|
|
1171
|
+
header,
|
|
1172
|
+
activeIndex,
|
|
1173
|
+
setActiveIndex,
|
|
1174
|
+
handleItemSelect,
|
|
1175
|
+
handleMenuKeyDown
|
|
1176
|
+
} = useContextMenuContentModel(t1);
|
|
1177
|
+
const menuMotion = useContextMenuMotion();
|
|
1178
|
+
let t2;
|
|
1179
|
+
if ($[6] !== classes.backdrop || $[7] !== onClose || $[8] !== styles.backdrop) {
|
|
1180
|
+
t2 = /* @__PURE__ */ jsx("div", { "data-context-menu-overlay": true, className: classes.backdrop, onMouseDown: onClose, style: styles.backdrop });
|
|
1181
|
+
$[6] = classes.backdrop;
|
|
1182
|
+
$[7] = onClose;
|
|
1183
|
+
$[8] = styles.backdrop;
|
|
1184
|
+
$[9] = t2;
|
|
1185
|
+
} else {
|
|
1186
|
+
t2 = $[9];
|
|
1187
|
+
}
|
|
1188
|
+
const t3 = menuMotion.pop;
|
|
1189
|
+
const t4 = classes.menu;
|
|
1190
|
+
const t5 = position.x || 0;
|
|
1191
|
+
const t6 = position.y || 0;
|
|
1192
|
+
let t7;
|
|
1193
|
+
if ($[10] !== styles.menu || $[11] !== t5 || $[12] !== t6) {
|
|
1194
|
+
t7 = {
|
|
1195
|
+
...styles.menu,
|
|
1196
|
+
left: t5,
|
|
1197
|
+
top: t6,
|
|
1198
|
+
position: "fixed"
|
|
1199
|
+
};
|
|
1200
|
+
$[10] = styles.menu;
|
|
1201
|
+
$[11] = t5;
|
|
1202
|
+
$[12] = t6;
|
|
1203
|
+
$[13] = t7;
|
|
1204
|
+
} else {
|
|
1205
|
+
t7 = $[13];
|
|
1206
|
+
}
|
|
1207
|
+
let t8;
|
|
1208
|
+
if ($[14] !== setActiveIndex) {
|
|
1209
|
+
t8 = () => setActiveIndex(-1);
|
|
1210
|
+
$[14] = setActiveIndex;
|
|
1211
|
+
$[15] = t8;
|
|
1212
|
+
} else {
|
|
1213
|
+
t8 = $[15];
|
|
1214
|
+
}
|
|
1215
|
+
let t9;
|
|
1216
|
+
if ($[16] !== classes || $[17] !== header) {
|
|
1217
|
+
t9 = /* @__PURE__ */ jsx(ContextMenuHeader, { classes, header });
|
|
1218
|
+
$[16] = classes;
|
|
1219
|
+
$[17] = header;
|
|
1220
|
+
$[18] = t9;
|
|
1221
|
+
} else {
|
|
1222
|
+
t9 = $[18];
|
|
1223
|
+
}
|
|
1224
|
+
let t10;
|
|
1225
|
+
if ($[19] !== menuMotion.content || $[20] !== t9) {
|
|
1226
|
+
t10 = /* @__PURE__ */ jsx(motion.div, { variants: menuMotion.content, initial: "hidden", animate: "visible", children: t9 });
|
|
1227
|
+
$[19] = menuMotion.content;
|
|
1228
|
+
$[20] = t9;
|
|
1229
|
+
$[21] = t10;
|
|
1230
|
+
} else {
|
|
1231
|
+
t10 = $[21];
|
|
1232
|
+
}
|
|
1233
|
+
let t11;
|
|
1234
|
+
if ($[22] !== activeIndex || $[23] !== classes || $[24] !== handleItemSelect || $[25] !== itemRefs || $[26] !== items || $[27] !== menuMotion.item || $[28] !== setActiveIndex) {
|
|
1235
|
+
let t122;
|
|
1236
|
+
if ($[30] !== activeIndex || $[31] !== classes || $[32] !== handleItemSelect || $[33] !== itemRefs || $[34] !== menuMotion.item || $[35] !== setActiveIndex) {
|
|
1237
|
+
t122 = (item, index) => /* @__PURE__ */ jsx(motion.div, { variants: menuMotion.item, custom: index, initial: "hidden", animate: "visible", children: /* @__PURE__ */ jsx(ContextMenuItem, { item, classes, isActive: index === activeIndex, onHover: () => {
|
|
1238
|
+
if (item.type === "action" && !item.disabled) {
|
|
1239
|
+
setActiveIndex(index);
|
|
1240
|
+
}
|
|
1241
|
+
}, setButtonRef: (node) => {
|
|
1242
|
+
itemRefs.current[index] = node;
|
|
1243
|
+
}, onSelect: handleItemSelect }) }, item.key || `menu-item-${index}`);
|
|
1244
|
+
$[30] = activeIndex;
|
|
1245
|
+
$[31] = classes;
|
|
1246
|
+
$[32] = handleItemSelect;
|
|
1247
|
+
$[33] = itemRefs;
|
|
1248
|
+
$[34] = menuMotion.item;
|
|
1249
|
+
$[35] = setActiveIndex;
|
|
1250
|
+
$[36] = t122;
|
|
1251
|
+
} else {
|
|
1252
|
+
t122 = $[36];
|
|
1253
|
+
}
|
|
1254
|
+
t11 = items.map(t122);
|
|
1255
|
+
$[22] = activeIndex;
|
|
1256
|
+
$[23] = classes;
|
|
1257
|
+
$[24] = handleItemSelect;
|
|
1258
|
+
$[25] = itemRefs;
|
|
1259
|
+
$[26] = items;
|
|
1260
|
+
$[27] = menuMotion.item;
|
|
1261
|
+
$[28] = setActiveIndex;
|
|
1262
|
+
$[29] = t11;
|
|
1263
|
+
} else {
|
|
1264
|
+
t11 = $[29];
|
|
1265
|
+
}
|
|
1266
|
+
let t12;
|
|
1267
|
+
if ($[37] !== classes.menu || $[38] !== handleMenuKeyDown || $[39] !== menuMotion.pop || $[40] !== menuRef || $[41] !== t10 || $[42] !== t11 || $[43] !== t7 || $[44] !== t8) {
|
|
1268
|
+
t12 = /* @__PURE__ */ jsxs(motion.div, { ref: menuRef, "data-context-menu-ignore": true, variants: t3, initial: "hidden", animate: "visible", exit: "exit", className: t4, role: "menu", tabIndex: -1, style: t7, onMouseLeave: t8, onKeyDown: handleMenuKeyDown, children: [
|
|
1269
|
+
t10,
|
|
1270
|
+
t11
|
|
1271
|
+
] });
|
|
1272
|
+
$[37] = classes.menu;
|
|
1273
|
+
$[38] = handleMenuKeyDown;
|
|
1274
|
+
$[39] = menuMotion.pop;
|
|
1275
|
+
$[40] = menuRef;
|
|
1276
|
+
$[41] = t10;
|
|
1277
|
+
$[42] = t11;
|
|
1278
|
+
$[43] = t7;
|
|
1279
|
+
$[44] = t8;
|
|
1280
|
+
$[45] = t12;
|
|
1281
|
+
} else {
|
|
1282
|
+
t12 = $[45];
|
|
1283
|
+
}
|
|
1284
|
+
let t13;
|
|
1285
|
+
if ($[46] !== t12 || $[47] !== t2) {
|
|
1286
|
+
t13 = /* @__PURE__ */ jsxs("div", { children: [
|
|
1287
|
+
t2,
|
|
1288
|
+
t12
|
|
1289
|
+
] });
|
|
1290
|
+
$[46] = t12;
|
|
1291
|
+
$[47] = t2;
|
|
1292
|
+
$[48] = t13;
|
|
1293
|
+
} else {
|
|
1294
|
+
t13 = $[48];
|
|
1295
|
+
}
|
|
1296
|
+
return t13;
|
|
1297
|
+
}
|
|
1298
|
+
var emptySubscribe = () => () => {
|
|
1299
|
+
};
|
|
1300
|
+
function ContextMenuRenderer() {
|
|
1301
|
+
const $ = c(13);
|
|
1302
|
+
const {
|
|
1303
|
+
closeMenu,
|
|
1304
|
+
config,
|
|
1305
|
+
context,
|
|
1306
|
+
isOpen,
|
|
1307
|
+
items,
|
|
1308
|
+
position
|
|
1309
|
+
} = useContextMenu();
|
|
1310
|
+
const isMounted = useSyncExternalStore(emptySubscribe, _temp3, _temp2);
|
|
1311
|
+
if (!isMounted) {
|
|
1312
|
+
return null;
|
|
1313
|
+
}
|
|
1314
|
+
const menuContext = context ?? EMPTY_MENU_CONTEXT;
|
|
1315
|
+
let t0;
|
|
1316
|
+
if ($[0] !== config || $[1] !== items || $[2] !== menuContext) {
|
|
1317
|
+
t0 = items.length ? items : resolveMenuItems(config, menuContext);
|
|
1318
|
+
$[0] = config;
|
|
1319
|
+
$[1] = items;
|
|
1320
|
+
$[2] = menuContext;
|
|
1321
|
+
$[3] = t0;
|
|
1322
|
+
} else {
|
|
1323
|
+
t0 = $[3];
|
|
1324
|
+
}
|
|
1325
|
+
const resolvedItems = t0;
|
|
1326
|
+
let t1;
|
|
1327
|
+
if ($[4] !== closeMenu || $[5] !== config || $[6] !== isOpen || $[7] !== menuContext || $[8] !== position || $[9] !== resolvedItems) {
|
|
1328
|
+
t1 = isOpen && config && resolvedItems.length > 0 && /* @__PURE__ */ jsx(ContextMenuContent, { config, items: resolvedItems, menuContext, position, onClose: closeMenu }, "context-menu-content");
|
|
1329
|
+
$[4] = closeMenu;
|
|
1330
|
+
$[5] = config;
|
|
1331
|
+
$[6] = isOpen;
|
|
1332
|
+
$[7] = menuContext;
|
|
1333
|
+
$[8] = position;
|
|
1334
|
+
$[9] = resolvedItems;
|
|
1335
|
+
$[10] = t1;
|
|
1336
|
+
} else {
|
|
1337
|
+
t1 = $[10];
|
|
1338
|
+
}
|
|
1339
|
+
let t2;
|
|
1340
|
+
if ($[11] !== t1) {
|
|
1341
|
+
t2 = createPortal(/* @__PURE__ */ jsx(AnimatePresence, { children: t1 }), document.body);
|
|
1342
|
+
$[11] = t1;
|
|
1343
|
+
$[12] = t2;
|
|
1344
|
+
} else {
|
|
1345
|
+
t2 = $[12];
|
|
1346
|
+
}
|
|
1347
|
+
return t2;
|
|
1348
|
+
}
|
|
1349
|
+
function _temp2() {
|
|
1350
|
+
return false;
|
|
1351
|
+
}
|
|
1352
|
+
function _temp3() {
|
|
1353
|
+
return true;
|
|
1354
|
+
}
|
|
1355
|
+
function ContextMenuGlobal() {
|
|
1356
|
+
const $ = c(1);
|
|
1357
|
+
useContextMenuListener();
|
|
1358
|
+
let t0;
|
|
1359
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
1360
|
+
t0 = /* @__PURE__ */ jsx(ContextMenuRenderer, {});
|
|
1361
|
+
$[0] = t0;
|
|
1362
|
+
} else {
|
|
1363
|
+
t0 = $[0];
|
|
1364
|
+
}
|
|
1365
|
+
return t0;
|
|
1366
|
+
}
|
|
1367
|
+
function selectPageContextMenu(config) {
|
|
1368
|
+
return config.contextMenu ?? null;
|
|
1369
|
+
}
|
|
1370
|
+
function useContextMenuPage(_slice, page) {
|
|
1371
|
+
const $ = c(5);
|
|
1372
|
+
const actions = useContextMenuActions();
|
|
1373
|
+
let t0;
|
|
1374
|
+
if ($[0] !== page) {
|
|
1375
|
+
t0 = (contextMenu) => page.set({
|
|
1376
|
+
contextMenu
|
|
1377
|
+
});
|
|
1378
|
+
$[0] = page;
|
|
1379
|
+
$[1] = t0;
|
|
1380
|
+
} else {
|
|
1381
|
+
t0 = $[1];
|
|
1382
|
+
}
|
|
1383
|
+
let t1;
|
|
1384
|
+
if ($[2] !== actions || $[3] !== t0) {
|
|
1385
|
+
t1 = {
|
|
1386
|
+
...actions,
|
|
1387
|
+
set: t0
|
|
1388
|
+
};
|
|
1389
|
+
$[2] = actions;
|
|
1390
|
+
$[3] = t0;
|
|
1391
|
+
$[4] = t1;
|
|
1392
|
+
} else {
|
|
1393
|
+
t1 = $[4];
|
|
1394
|
+
}
|
|
1395
|
+
return t1;
|
|
1396
|
+
}
|
|
1397
|
+
var contextMenuModule = defineModule({
|
|
1398
|
+
id: "contextMenu",
|
|
1399
|
+
context: ContextMenuContext,
|
|
1400
|
+
Provider: ContextMenuProvider,
|
|
1401
|
+
uses: ["dock"],
|
|
1402
|
+
Overlay: ContextMenuGlobal,
|
|
1403
|
+
registry: {
|
|
1404
|
+
cleanupDelayMs: REGISTRY_CLEANUP_DELAY_MS,
|
|
1405
|
+
keyPolicy: "route",
|
|
1406
|
+
lifecycle: "immediate",
|
|
1407
|
+
reservedKeys: [CURRENT_PAGE_KEY, GLOBAL_MENU_KEY]
|
|
1408
|
+
},
|
|
1409
|
+
page: {
|
|
1410
|
+
select: selectPageContextMenu,
|
|
1411
|
+
entries: (slice, {
|
|
1412
|
+
pathname
|
|
1413
|
+
}) => [{
|
|
1414
|
+
key: pathname || CURRENT_PAGE_KEY,
|
|
1415
|
+
value: slice
|
|
1416
|
+
}],
|
|
1417
|
+
use: useContextMenuPage
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
function defineContextMenu(definition = {}) {
|
|
1421
|
+
return Object.freeze({
|
|
1422
|
+
config: definition,
|
|
1423
|
+
id: definition.id ?? "context-menu",
|
|
1424
|
+
use: function useDefinedContextMenu(options = {}) {
|
|
1425
|
+
return useContextMenu({
|
|
1426
|
+
...definition,
|
|
1427
|
+
...options
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
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-26K6W4OQ.js.map
|
|
1435
|
+
//# sourceMappingURL=chunk-26K6W4OQ.js.map
|