@omerdlw/base-framework 3.4.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -72
- package/dist/ambient/index.js +9 -10
- package/dist/ambient/server/index.js +3 -3
- package/dist/ambient/server/index.js.map +1 -1
- package/dist/ambient/worker/index.js +7 -4
- package/dist/ambient/worker/index.js.map +1 -1
- package/dist/background/index.js +8 -9
- package/dist/{chunk-KOYTJW5E.js → chunk-3FSDBJ7V.js} +7 -7
- package/dist/chunk-3FSDBJ7V.js.map +1 -0
- package/dist/{chunk-CRKJAACG.js → chunk-4QQ3QVY7.js} +10 -10
- package/dist/{chunk-CRKJAACG.js.map → chunk-4QQ3QVY7.js.map} +1 -1
- package/dist/{chunk-UQLTP3XB.js → chunk-5TQSH6KE.js} +143 -144
- package/dist/chunk-5TQSH6KE.js.map +1 -0
- package/dist/{chunk-HFR6YROB.js → chunk-6P3F4JU3.js} +1160 -1172
- package/dist/chunk-6P3F4JU3.js.map +1 -0
- package/dist/chunk-AKPH5CEJ.js +357 -0
- package/dist/chunk-AKPH5CEJ.js.map +1 -0
- package/dist/{chunk-QGPRTUED.js → chunk-AWLK2I56.js} +35 -39
- package/dist/chunk-AWLK2I56.js.map +1 -0
- package/dist/{chunk-ZXRE2KZO.js → chunk-C3SEBNF5.js} +11 -15
- package/dist/chunk-C3SEBNF5.js.map +1 -0
- package/dist/{chunk-R4K6VAOK.js → chunk-C527JOJQ.js} +11 -18
- package/dist/chunk-C527JOJQ.js.map +1 -0
- package/dist/{chunk-VNSMNGWP.js → chunk-DMQKXBWO.js} +5 -5
- package/dist/{chunk-VNSMNGWP.js.map → chunk-DMQKXBWO.js.map} +1 -1
- package/dist/{chunk-IH3STE7W.js → chunk-ED32WLAD.js} +1168 -1215
- package/dist/chunk-ED32WLAD.js.map +1 -0
- package/dist/{chunk-67MOKJFZ.js → chunk-EXB7VFD3.js} +16 -16
- package/dist/chunk-EXB7VFD3.js.map +1 -0
- package/dist/chunk-FG2AKFXP.js +108 -0
- package/dist/chunk-FG2AKFXP.js.map +1 -0
- package/dist/chunk-GA5SZ6E2.js +17 -0
- package/dist/{chunk-AZ2ZDFNP.js.map → chunk-GA5SZ6E2.js.map} +1 -1
- package/dist/chunk-GG2ILNK2.js +44 -0
- package/dist/chunk-GG2ILNK2.js.map +1 -0
- package/dist/{chunk-6IP6YFQX.js → chunk-JA75E4BG.js} +21 -31
- package/dist/chunk-JA75E4BG.js.map +1 -0
- package/dist/{chunk-WQTMOUCA.js → chunk-JWUKAZ3A.js} +45 -67
- package/dist/chunk-JWUKAZ3A.js.map +1 -0
- package/dist/{chunk-LKYW4LH6.js → chunk-QZA5AIT6.js} +37 -47
- package/dist/chunk-QZA5AIT6.js.map +1 -0
- package/dist/{chunk-D222OCTV.js → chunk-S67HGKJ2.js} +49 -55
- package/dist/chunk-S67HGKJ2.js.map +1 -0
- package/dist/chunk-T53WFIZN.js +29 -0
- package/dist/chunk-T53WFIZN.js.map +1 -0
- package/dist/{chunk-RDYYP36I.js → chunk-TMKA5ZHO.js} +7 -6
- package/dist/chunk-TMKA5ZHO.js.map +1 -0
- package/dist/{chunk-XGAYTDSI.js → chunk-UWX7GCNX.js} +23 -26
- package/dist/chunk-UWX7GCNX.js.map +1 -0
- package/dist/{chunk-QRXDXAQI.js → chunk-WVED7PDH.js} +161 -165
- package/dist/chunk-WVED7PDH.js.map +1 -0
- package/dist/{chunk-FFJWJ4OB.js → chunk-XIFQMK2Z.js} +12317 -12355
- package/dist/chunk-XIFQMK2Z.js.map +1 -0
- package/dist/{chunk-BMFHS3GV.js → chunk-YHWA7FXX.js} +22 -12
- package/dist/chunk-YHWA7FXX.js.map +1 -0
- package/dist/{chunk-YZS2B6YE.js → chunk-YKHAFHB7.js} +9 -12
- package/dist/chunk-YKHAFHB7.js.map +1 -0
- package/dist/{chunk-GKAJ4EM2.js → chunk-ZQI4ZCVU.js} +83 -83
- package/dist/chunk-ZQI4ZCVU.js.map +1 -0
- package/dist/context-menu/index.js +13 -15
- package/dist/controls/index.js +7 -6
- package/dist/core/error/boundary.d.ts.map +1 -1
- package/dist/core/error/constants.d.ts +9 -0
- package/dist/core/error/constants.d.ts.map +1 -1
- package/dist/core/error/index.d.ts +2 -3
- package/dist/core/error/index.d.ts.map +1 -1
- package/dist/core/error/listener.d.ts.map +1 -1
- package/dist/core/error/reporter.d.ts +7 -6
- package/dist/core/error/reporter.d.ts.map +1 -1
- package/dist/core/error/utils.d.ts.map +1 -1
- package/dist/core/kernel/constants.d.ts +1 -1
- package/dist/core/kernel/constants.d.ts.map +1 -1
- package/dist/core/kernel/{compose.d.ts → host/compose.d.ts} +0 -4
- package/dist/core/kernel/host/compose.d.ts.map +1 -0
- package/dist/core/kernel/{installed.d.ts → host/installed.d.ts} +1 -1
- package/dist/core/kernel/host/installed.d.ts.map +1 -0
- package/dist/core/kernel/{module.d.ts → host/module.d.ts} +2 -5
- package/dist/core/kernel/host/module.d.ts.map +1 -0
- package/dist/core/kernel/{adapters.d.ts → host/registration.d.ts} +2 -2
- package/dist/core/kernel/host/registration.d.ts.map +1 -0
- package/dist/core/kernel/index.d.ts +12 -12
- package/dist/core/kernel/index.d.ts.map +1 -1
- package/dist/core/kernel/{page-controller.d.ts → page.d.ts} +2 -2
- package/dist/core/kernel/page.d.ts.map +1 -0
- package/dist/core/kernel/{handlers.d.ts → registry/apply.d.ts} +2 -2
- package/dist/core/kernel/registry/apply.d.ts.map +1 -0
- package/dist/core/kernel/{hooks.d.ts → registry/hooks.d.ts} +1 -1
- package/dist/core/kernel/registry/hooks.d.ts.map +1 -0
- package/dist/core/kernel/{operations.d.ts → registry/operations.d.ts} +2 -2
- package/dist/core/kernel/registry/operations.d.ts.map +1 -0
- package/dist/core/kernel/{provider.d.ts → registry/provider.d.ts} +2 -2
- package/dist/core/kernel/registry/provider.d.ts.map +1 -0
- package/dist/core/kernel/{operations-records.d.ts → registry/records.d.ts} +2 -2
- package/dist/core/kernel/registry/records.d.ts.map +1 -0
- package/dist/core/kernel/registry/registration.d.ts +13 -0
- package/dist/core/kernel/registry/registration.d.ts.map +1 -0
- package/dist/core/kernel/{schema.d.ts → registry/schema.d.ts} +1 -1
- package/dist/core/kernel/registry/schema.d.ts.map +1 -0
- package/dist/core/kernel/{store-snapshots.d.ts → registry/snapshots.d.ts} +3 -3
- package/dist/core/kernel/registry/snapshots.d.ts.map +1 -0
- package/dist/core/kernel/{stabilize.d.ts → registry/stabilize.d.ts} +1 -1
- package/dist/core/kernel/registry/stabilize.d.ts.map +1 -0
- package/dist/core/kernel/{store.d.ts → registry/store.d.ts} +2 -2
- package/dist/core/kernel/registry/store.d.ts.map +1 -0
- package/dist/core/kernel/{store-subscriptions.d.ts → registry/subscriptions.d.ts} +2 -6
- package/dist/core/kernel/registry/subscriptions.d.ts.map +1 -0
- package/dist/core/kernel/{runtime.d.ts → registry/transaction.d.ts} +2 -2
- package/dist/core/kernel/registry/transaction.d.ts.map +1 -0
- package/dist/core/kernel/{types-modules.d.ts → types/modules.d.ts} +4 -4
- package/dist/core/kernel/types/modules.d.ts.map +1 -0
- package/dist/core/kernel/{types-page.d.ts → types/page.d.ts} +3 -3
- package/dist/core/kernel/types/page.d.ts.map +1 -0
- package/dist/core/kernel/{types.d.ts → types/registry.d.ts} +4 -4
- package/dist/core/kernel/types/registry.d.ts.map +1 -0
- package/dist/core/kernel/{types-store.d.ts → types/store.d.ts} +3 -3
- package/dist/core/kernel/types/store.d.ts.map +1 -0
- package/dist/core/kernel/utils.d.ts +1 -1
- package/dist/core/kernel/utils.d.ts.map +1 -1
- package/dist/core/navigation/{navigator-holds.d.ts → holds.d.ts} +2 -1
- package/dist/core/navigation/holds.d.ts.map +1 -0
- package/dist/core/navigation/navigator.d.ts.map +1 -1
- package/dist/core/navigation/{navigator-patience.d.ts → patience.d.ts} +1 -1
- package/dist/core/navigation/patience.d.ts.map +1 -0
- package/dist/core/navigation/{navigator-payload.d.ts → payload.d.ts} +2 -1
- package/dist/core/navigation/payload.d.ts.map +1 -0
- package/dist/core/navigation/{navigator-prefetch.d.ts → prefetch.d.ts} +2 -1
- package/dist/core/navigation/prefetch.d.ts.map +1 -0
- package/dist/core/navigation/settings.d.ts.map +1 -1
- package/dist/core/navigation/state.d.ts.map +1 -1
- package/dist/core/navigation/utils.d.ts +3 -0
- package/dist/core/navigation/utils.d.ts.map +1 -1
- package/dist/core/provider/index.d.ts +4 -9
- package/dist/core/provider/index.d.ts.map +1 -1
- package/dist/dock/index.js +12 -14
- package/dist/error/index.js +4 -7
- package/dist/events/index.js +24 -20
- package/dist/events/index.js.map +1 -1
- package/dist/foundation/events/index.d.ts.map +1 -1
- package/dist/foundation/recipes/index.d.ts +0 -7
- package/dist/foundation/recipes/index.d.ts.map +1 -1
- package/dist/foundation/recipes/recipe.d.ts.map +1 -1
- package/dist/foundation/result/index.d.ts.map +1 -1
- package/dist/foundation/utils/collections.d.ts +11 -0
- package/dist/foundation/utils/collections.d.ts.map +1 -0
- package/dist/foundation/utils/dom.d.ts.map +1 -1
- package/dist/foundation/utils/report.d.ts.map +1 -1
- package/dist/foundation/utils/scheduler.d.ts.map +1 -1
- package/dist/foundation/utils/store.d.ts.map +1 -1
- package/dist/foundation/utils/string.d.ts.map +1 -1
- package/dist/foundation/utils/tempo.d.ts.map +1 -1
- package/dist/foundation/utils/timing.d.ts.map +1 -1
- package/dist/foundation/utils/user-message.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -3
- package/dist/index.js +22 -24
- package/dist/kernel/index.js +4 -4
- package/dist/loading/index.js +6 -8
- package/dist/media/index.js +5 -5
- package/dist/modal/index.js +153 -166
- package/dist/modal/index.js.map +1 -1
- package/dist/modules/ambient/{analyze.d.ts → analysis/analyze.d.ts} +3 -3
- package/dist/modules/ambient/analysis/analyze.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-bounds.d.ts → analysis/bounds.d.ts} +2 -2
- package/dist/modules/ambient/analysis/bounds.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-clusters.d.ts → analysis/clusters.d.ts} +3 -3
- package/dist/modules/ambient/analysis/clusters.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-ground.d.ts → analysis/ground.d.ts} +3 -3
- package/dist/modules/ambient/analysis/ground.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-measures.d.ts → analysis/measures.d.ts} +2 -2
- package/dist/modules/ambient/analysis/measures.d.ts.map +1 -0
- package/dist/modules/ambient/{oklab.d.ts → analysis/oklab.d.ts} +1 -3
- package/dist/modules/ambient/analysis/oklab.d.ts.map +1 -0
- package/dist/modules/ambient/analysis/quantize.d.ts.map +1 -0
- package/dist/modules/ambient/{analyze-swatches.d.ts → analysis/swatches.d.ts} +3 -3
- package/dist/modules/ambient/analysis/swatches.d.ts.map +1 -0
- package/dist/modules/ambient/hooks.d.ts +0 -1
- package/dist/modules/ambient/hooks.d.ts.map +1 -1
- package/dist/modules/ambient/index.d.ts +2 -2
- package/dist/modules/ambient/index.d.ts.map +1 -1
- package/dist/modules/ambient/module.d.ts +0 -3
- package/dist/modules/ambient/module.d.ts.map +1 -1
- package/dist/modules/ambient/pipeline.d.ts +6 -5
- package/dist/modules/ambient/pipeline.d.ts.map +1 -1
- package/dist/modules/ambient/server/index.d.ts +2 -2
- package/dist/modules/ambient/server/index.d.ts.map +1 -1
- package/dist/modules/ambient/settings.d.ts +0 -2
- package/dist/modules/ambient/settings.d.ts.map +1 -1
- package/dist/modules/ambient/worker/index.d.ts.map +1 -1
- package/dist/modules/background/constants.d.ts +3 -1
- package/dist/modules/background/constants.d.ts.map +1 -1
- package/dist/modules/background/context.d.ts +1 -1
- package/dist/modules/background/context.d.ts.map +1 -1
- package/dist/modules/background/hooks.d.ts +929 -0
- package/dist/modules/background/hooks.d.ts.map +1 -1
- package/dist/modules/background/index.d.ts +6 -6
- package/dist/modules/background/index.d.ts.map +1 -1
- package/dist/modules/background/module.d.ts +1 -1
- package/dist/modules/background/module.d.ts.map +1 -1
- package/dist/modules/background/{hooks/use-native-video-model.d.ts → native-video.d.ts} +4 -8
- package/dist/modules/background/native-video.d.ts.map +1 -0
- package/dist/modules/background/overlay.d.ts.map +1 -0
- package/dist/modules/background/playback.d.ts.map +1 -0
- package/dist/modules/background/{model/state.d.ts → state.d.ts} +11 -1
- package/dist/modules/background/state.d.ts.map +1 -0
- package/dist/modules/background/{model/visual.d.ts → visual.d.ts} +43 -6
- package/dist/modules/background/visual.d.ts.map +1 -0
- package/dist/modules/background/youtube/audio.d.ts.map +1 -0
- package/dist/modules/background/youtube/iframe.d.ts +92 -0
- package/dist/modules/background/youtube/iframe.d.ts.map +1 -0
- package/dist/modules/background/youtube/{lib/parse.d.ts → parse.d.ts} +1 -1
- package/dist/modules/background/youtube/parse.d.ts.map +1 -0
- package/dist/modules/background/youtube/{components/player.d.ts → player.d.ts} +1 -1
- package/dist/modules/background/youtube/player.d.ts.map +1 -0
- package/dist/modules/background/youtube/{lib/timing.d.ts → timing.d.ts} +0 -2
- package/dist/modules/background/youtube/timing.d.ts.map +1 -0
- package/dist/modules/background/youtube/use-iframe-player.d.ts +37 -0
- package/dist/modules/background/youtube/use-iframe-player.d.ts.map +1 -0
- package/dist/modules/background/youtube/{hooks/use-youtube-background-player-model.d.ts → use-player.d.ts} +2 -2
- package/dist/modules/background/youtube/use-player.d.ts.map +1 -0
- package/dist/modules/background/youtube/{hooks/use-youtube-video-sync.d.ts → use-video-sync.d.ts} +8 -4
- package/dist/modules/background/youtube/use-video-sync.d.ts.map +1 -0
- package/dist/modules/background/youtube/{lib/video-events.d.ts → video-events.d.ts} +8 -8
- package/dist/modules/background/youtube/video-events.d.ts.map +1 -0
- package/dist/modules/context-menu/dom.d.ts.map +1 -1
- package/dist/modules/context-menu/items.d.ts.map +1 -1
- package/dist/modules/context-menu/overlay.d.ts +3 -10
- package/dist/modules/context-menu/overlay.d.ts.map +1 -1
- package/dist/modules/context-menu/resolver.d.ts.map +1 -1
- package/dist/modules/controls/overlay.d.ts +0 -10
- package/dist/modules/controls/overlay.d.ts.map +1 -1
- package/dist/modules/dock/{lib → card}/banner.d.ts +3 -16
- package/dist/modules/dock/card/banner.d.ts.map +1 -0
- package/dist/modules/dock/{components/card-item.d.ts → card/card.d.ts} +5 -2
- package/dist/modules/dock/card/card.d.ts.map +1 -0
- package/dist/modules/dock/card/compact.d.ts.map +1 -0
- package/dist/modules/dock/{components/item-content.d.ts → card/content.d.ts} +1 -1
- package/dist/modules/dock/card/content.d.ts.map +1 -0
- package/dist/modules/dock/card/header.d.ts +8 -0
- package/dist/modules/dock/card/header.d.ts.map +1 -0
- package/dist/modules/dock/{components → card}/icon.d.ts +1 -1
- package/dist/modules/dock/card/icon.d.ts.map +1 -0
- package/dist/modules/dock/{lib/card-item.d.ts → card/model.d.ts} +20 -2
- package/dist/modules/dock/card/model.d.ts.map +1 -0
- package/dist/modules/dock/{hooks/use-card-item-model.d.ts → card/use-card.d.ts} +44 -43
- package/dist/modules/dock/{hooks/use-card-item-model.d.ts.map → card/use-card.d.ts.map} +1 -1
- package/dist/modules/dock/commands/command-bar.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/commands.d.ts → commands/registry.d.ts} +1 -1
- package/dist/modules/dock/commands/registry.d.ts.map +1 -0
- package/dist/modules/dock/constants.d.ts +4 -7
- package/dist/modules/dock/constants.d.ts.map +1 -1
- package/dist/modules/dock/context.d.ts +1 -1
- package/dist/modules/dock/context.d.ts.map +1 -1
- package/dist/modules/dock/hooks.d.ts +47 -0
- package/dist/modules/dock/hooks.d.ts.map +1 -0
- package/dist/modules/dock/{hud.d.ts → hud/hud.d.ts} +14 -7
- package/dist/modules/dock/hud/hud.d.ts.map +1 -0
- package/dist/modules/dock/{model/hud-definition.d.ts → hud/model.d.ts} +7 -1
- package/dist/modules/dock/hud/model.d.ts.map +1 -0
- package/dist/modules/dock/{components/hud-view.d.ts → hud/view.d.ts} +1 -1
- package/dist/modules/dock/hud/view.d.ts.map +1 -0
- package/dist/modules/dock/index.d.ts +22 -22
- package/dist/modules/dock/index.d.ts.map +1 -1
- package/dist/modules/dock/items/attention.d.ts +43 -0
- package/dist/modules/dock/items/attention.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/model/items.d.ts → items/build.d.ts} +2 -2
- package/dist/modules/dock/items/build.d.ts.map +1 -0
- package/dist/modules/dock/{runtime → items}/display.d.ts +2 -5
- package/dist/modules/dock/items/display.d.ts.map +1 -0
- package/dist/modules/dock/items/operations.d.ts +22 -0
- package/dist/modules/dock/items/operations.d.ts.map +1 -0
- package/dist/modules/dock/{runtime → items}/pipeline.d.ts +1 -1
- package/dist/modules/dock/items/pipeline.d.ts.map +1 -0
- package/dist/modules/dock/{components/media-action.d.ts → media/controls.d.ts} +5 -2
- package/dist/modules/dock/media/controls.d.ts.map +1 -0
- package/dist/modules/dock/{lib/media.d.ts → media/model.d.ts} +1 -3
- package/dist/modules/dock/media/model.d.ts.map +1 -0
- package/dist/modules/dock/{components/media-scrubber.d.ts → media/scrubber.d.ts} +1 -1
- package/dist/modules/dock/media/scrubber.d.ts.map +1 -0
- package/dist/modules/dock/{hooks/use-media-controls-model.d.ts → media/use-controls.d.ts} +8 -8
- package/dist/modules/dock/media/use-controls.d.ts.map +1 -0
- package/dist/modules/dock/module.d.ts.map +1 -1
- package/dist/modules/dock/motion.d.ts +27 -28
- package/dist/modules/dock/motion.d.ts.map +1 -1
- package/dist/modules/dock/provider.d.ts.map +1 -1
- package/dist/modules/dock/routing/breadcrumbs-card.d.ts.map +1 -0
- package/dist/modules/dock/routing/{model/continuity.d.ts → continuity-state.d.ts} +2 -2
- package/dist/modules/dock/routing/continuity-state.d.ts.map +1 -0
- package/dist/modules/dock/routing/continuity.d.ts +8 -8
- package/dist/modules/dock/routing/continuity.d.ts.map +1 -1
- package/dist/modules/dock/routing/navigation.d.ts +0 -10
- package/dist/modules/dock/routing/navigation.d.ts.map +1 -1
- package/dist/modules/dock/routing/paths.d.ts.map +1 -0
- package/dist/modules/dock/routing/{model/policy.d.ts → policy.d.ts} +1 -1
- package/dist/modules/dock/routing/policy.d.ts.map +1 -0
- package/dist/modules/dock/routing/{hooks/use-route-prefetch.d.ts → prefetch.d.ts} +3 -3
- package/dist/modules/dock/routing/prefetch.d.ts.map +1 -0
- package/dist/modules/dock/routing/route-bridge.d.ts +8 -0
- package/dist/modules/dock/routing/route-bridge.d.ts.map +1 -0
- package/dist/modules/dock/routing/{model/topology.d.ts → topology.d.ts} +1 -1
- package/dist/modules/dock/routing/topology.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/model → stack}/cards.d.ts +8 -5
- package/dist/modules/dock/stack/cards.d.ts.map +1 -0
- package/dist/modules/dock/stack/dock.d.ts.map +1 -0
- package/dist/modules/dock/stack/focus.d.ts +22 -0
- package/dist/modules/dock/stack/focus.d.ts.map +1 -0
- package/dist/modules/dock/{model → stack}/layout.d.ts +8 -2
- package/dist/modules/dock/stack/layout.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/dock.d.ts → stack/use-dock-model.d.ts} +2 -1
- package/dist/modules/dock/stack/use-dock-model.d.ts.map +1 -0
- package/dist/modules/dock/{runtime/hooks → stack}/use-dock.d.ts +9 -9
- package/dist/modules/dock/stack/use-dock.d.ts.map +1 -0
- package/dist/modules/dock/stack/use-height.d.ts +12 -0
- package/dist/modules/dock/stack/use-height.d.ts.map +1 -0
- package/dist/modules/dock/{components/status-actions.d.ts → status/actions.d.ts} +1 -1
- package/dist/modules/dock/status/actions.d.ts.map +1 -0
- package/dist/modules/dock/status/events.d.ts +4 -4
- package/dist/modules/dock/status/events.d.ts.map +1 -1
- package/dist/modules/dock/status/hooks.d.ts.map +1 -1
- package/dist/modules/dock/status/model.d.ts +34 -4
- package/dist/modules/dock/status/model.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model/builder.d.ts → builder.d.ts} +13 -7
- package/dist/modules/dock/surface/builder.d.ts.map +1 -0
- package/dist/modules/dock/{components/surface/item-content.d.ts → surface/content.d.ts} +2 -2
- package/dist/modules/dock/surface/content.d.ts.map +1 -0
- package/dist/modules/dock/surface/context.d.ts +12 -3
- package/dist/modules/dock/surface/context.d.ts.map +1 -1
- package/dist/modules/dock/surface/controls.d.ts +26 -0
- package/dist/modules/dock/surface/controls.d.ts.map +1 -0
- package/dist/modules/dock/surface/definition.d.ts.map +1 -1
- package/dist/modules/dock/{components/surface → surface}/extensions-bar.d.ts +1 -1
- package/dist/modules/dock/surface/extensions-bar.d.ts.map +1 -0
- package/dist/modules/dock/{components/surface/action.d.ts → surface/extensions.d.ts} +4 -2
- package/dist/modules/dock/surface/extensions.d.ts.map +1 -0
- package/dist/modules/dock/{components/surface → surface}/header-button.d.ts +3 -3
- package/dist/modules/dock/surface/header-button.d.ts.map +1 -0
- package/dist/modules/dock/surface/helpers.d.ts +13 -1
- package/dist/modules/dock/surface/helpers.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model/normalize.d.ts → normalize.d.ts} +1 -1
- package/dist/modules/dock/surface/normalize.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/choreography.d.ts +28 -2
- package/dist/modules/dock/surface/runtime/choreography.d.ts.map +1 -1
- package/dist/modules/dock/surface/runtime/flows.d.ts +1 -1
- package/dist/modules/dock/surface/runtime/flows.d.ts.map +1 -1
- package/dist/modules/dock/surface/{machine.d.ts → runtime/machine.d.ts} +1 -1
- package/dist/modules/dock/surface/runtime/machine.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/open.d.ts +1 -2
- package/dist/modules/dock/surface/runtime/open.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model → runtime}/records.d.ts +1 -1
- package/dist/modules/dock/surface/runtime/records.d.ts.map +1 -0
- package/dist/modules/dock/surface/{stack.d.ts → runtime/stack.d.ts} +10 -10
- package/dist/modules/dock/surface/runtime/stack.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/steps.d.ts +1 -1
- package/dist/modules/dock/surface/runtime/steps.d.ts.map +1 -1
- package/dist/modules/dock/surface/{model/transition-state.d.ts → runtime/transition.d.ts} +1 -1
- package/dist/modules/dock/surface/runtime/transition.d.ts.map +1 -0
- package/dist/modules/dock/surface/runtime/url.d.ts.map +1 -0
- package/dist/modules/dock/surface/{hooks/use-surface-shell-model.d.ts → shell.d.ts} +9 -3
- package/dist/modules/dock/surface/shell.d.ts.map +1 -0
- package/dist/modules/dock/surface/{hooks/use-surface-flow.d.ts → use-flow.d.ts} +2 -2
- package/dist/modules/dock/surface/use-flow.d.ts.map +1 -0
- package/dist/modules/dock/surface/view-model.d.ts.map +1 -1
- package/dist/modules/dock/{lib/styles.d.ts → theme.d.ts} +22 -18
- package/dist/modules/dock/theme.d.ts.map +1 -0
- package/dist/modules/dock/types/card.d.ts +12 -3
- package/dist/modules/dock/types/card.d.ts.map +1 -1
- package/dist/modules/dock/types/index.d.ts +1 -1
- package/dist/modules/dock/types/index.d.ts.map +1 -1
- package/dist/modules/dock/types/surface.d.ts +2 -2
- package/dist/modules/dock/types/surface.d.ts.map +1 -1
- package/dist/modules/dock/{lib/helpers.d.ts → utils.d.ts} +10 -3
- package/dist/modules/dock/utils.d.ts.map +1 -0
- package/dist/modules/index.js +20 -22
- package/dist/modules/loading/hooks.d.ts +2 -1
- package/dist/modules/loading/hooks.d.ts.map +1 -1
- package/dist/modules/loading/state.d.ts.map +1 -1
- package/dist/modules/media/hooks.d.ts.map +1 -1
- package/dist/modules/media/playback.d.ts.map +1 -1
- package/dist/modules/modal/constants.d.ts +3 -1
- package/dist/modules/modal/constants.d.ts.map +1 -1
- package/dist/modules/modal/{components/modal-container.d.ts → container.d.ts} +2 -2
- package/dist/modules/modal/container.d.ts.map +1 -0
- package/dist/modules/modal/context.d.ts +5 -1
- package/dist/modules/modal/context.d.ts.map +1 -1
- package/dist/modules/modal/dom.d.ts.map +1 -0
- package/dist/modules/modal/hooks.d.ts +3 -2
- package/dist/modules/modal/hooks.d.ts.map +1 -1
- package/dist/modules/modal/index.d.ts +7 -7
- package/dist/modules/modal/index.d.ts.map +1 -1
- package/dist/modules/modal/{model/layout.d.ts → layout.d.ts} +1 -1
- package/dist/modules/modal/layout.d.ts.map +1 -0
- package/dist/modules/modal/module.d.ts +1 -1
- package/dist/modules/modal/module.d.ts.map +1 -1
- package/dist/modules/modal/overlay.d.ts.map +1 -0
- package/dist/modules/modal/state.d.ts +52 -0
- package/dist/modules/modal/state.d.ts.map +1 -0
- package/dist/modules/navigation/hooks.d.ts.map +1 -1
- package/dist/modules/notification/hooks.d.ts.map +1 -1
- package/dist/modules/notification/overlay.d.ts +0 -1
- package/dist/modules/notification/overlay.d.ts.map +1 -1
- package/dist/navigation/index.js +33 -41
- package/dist/navigation/index.js.map +1 -1
- package/dist/notification/index.js +8 -7
- package/dist/overlay-ZCMQVNYT.js +12 -0
- package/dist/{overlay-7QLGWHCH.js.map → overlay-ZCMQVNYT.js.map} +1 -1
- package/dist/provider/index.js +7 -11
- package/dist/react/hooks/index.d.ts +3 -1
- package/dist/react/hooks/index.d.ts.map +1 -1
- package/dist/react/hooks/use-client-value.d.ts +15 -0
- package/dist/react/hooks/use-client-value.d.ts.map +1 -0
- package/dist/react/hooks/use-controllable-state.d.ts +8 -1
- package/dist/react/hooks/use-controllable-state.d.ts.map +1 -1
- package/dist/react/hooks/use-fullscreen-state.d.ts +0 -2
- package/dist/react/hooks/use-fullscreen-state.d.ts.map +1 -1
- package/dist/react/hooks/use-global-event.d.ts +7 -1
- package/dist/react/hooks/use-global-event.d.ts.map +1 -1
- package/dist/react/hooks/use-hotkey.d.ts +9 -1
- package/dist/react/hooks/use-hotkey.d.ts.map +1 -1
- package/dist/react/hooks/use-scroll-lock.d.ts.map +1 -1
- package/dist/react/hooks/use-store.d.ts +3 -0
- package/dist/react/hooks/use-store.d.ts.map +1 -1
- package/dist/react/theme/index.d.ts +7 -2
- package/dist/react/theme/index.d.ts.map +1 -1
- package/dist/react/theme/parts.d.ts +89 -0
- package/dist/react/theme/parts.d.ts.map +1 -0
- package/dist/recipes/index.js +6 -121
- package/dist/recipes/index.js.map +1 -1
- package/dist/result/index.js +12 -15
- package/dist/result/index.js.map +1 -1
- package/dist/theme/index.js +2 -2
- package/dist/utils/index.js +31 -34
- package/dist/utils/index.js.map +1 -1
- package/docs/README.md +11 -12
- package/docs/architecture-and-rules.md +43 -32
- package/docs/core-engine.md +11 -13
- package/docs/custom-modules.md +1 -1
- package/docs/design.md +60 -153
- package/docs/getting-started.md +3 -5
- package/docs/modules/README.md +16 -16
- package/docs/modules/ambient.md +23 -23
- package/docs/modules/background.md +24 -19
- package/docs/modules/context-menu.md +1 -1
- package/docs/modules/dock.md +47 -43
- package/docs/modules/error-boundary.md +2 -3
- package/docs/modules/kernel.md +28 -30
- package/docs/modules/loading.md +1 -1
- package/docs/modules/modal.md +17 -16
- package/docs/modules/navigation.md +14 -14
- package/docs/testing.md +1 -1
- package/package.json +1 -8
- package/templates/AGENTS.md +4 -3
- package/MIGRATION.md +0 -99
- package/dist/chunk-67MOKJFZ.js.map +0 -1
- package/dist/chunk-6IP6YFQX.js.map +0 -1
- package/dist/chunk-7VU2OAJB.js +0 -464
- package/dist/chunk-7VU2OAJB.js.map +0 -1
- package/dist/chunk-AZ2ZDFNP.js +0 -17
- package/dist/chunk-BMFHS3GV.js.map +0 -1
- package/dist/chunk-D222OCTV.js.map +0 -1
- package/dist/chunk-ESD5EQ5H.js +0 -178
- package/dist/chunk-ESD5EQ5H.js.map +0 -1
- package/dist/chunk-FFJWJ4OB.js.map +0 -1
- package/dist/chunk-GKAJ4EM2.js.map +0 -1
- package/dist/chunk-HFR6YROB.js.map +0 -1
- package/dist/chunk-IH3STE7W.js.map +0 -1
- package/dist/chunk-KOYTJW5E.js.map +0 -1
- package/dist/chunk-LKYW4LH6.js.map +0 -1
- package/dist/chunk-QGPRTUED.js.map +0 -1
- package/dist/chunk-QRXDXAQI.js.map +0 -1
- package/dist/chunk-R4K6VAOK.js.map +0 -1
- package/dist/chunk-RDYYP36I.js.map +0 -1
- package/dist/chunk-RGC2VFQO.js +0 -139
- package/dist/chunk-RGC2VFQO.js.map +0 -1
- package/dist/chunk-TAWTGCWJ.js +0 -113
- package/dist/chunk-TAWTGCWJ.js.map +0 -1
- package/dist/chunk-UDJ7ARCH.js +0 -140
- package/dist/chunk-UDJ7ARCH.js.map +0 -1
- package/dist/chunk-UQLTP3XB.js.map +0 -1
- package/dist/chunk-WQTMOUCA.js.map +0 -1
- package/dist/chunk-WZ5T2NXH.js +0 -702
- package/dist/chunk-WZ5T2NXH.js.map +0 -1
- package/dist/chunk-XGAYTDSI.js.map +0 -1
- package/dist/chunk-YZS2B6YE.js.map +0 -1
- package/dist/chunk-ZXRE2KZO.js.map +0 -1
- package/dist/core/error/theme.d.ts +0 -10
- package/dist/core/error/theme.d.ts.map +0 -1
- package/dist/core/kernel/adapters.d.ts.map +0 -1
- package/dist/core/kernel/compose.d.ts.map +0 -1
- package/dist/core/kernel/handlers.d.ts.map +0 -1
- package/dist/core/kernel/hooks.d.ts.map +0 -1
- package/dist/core/kernel/installed.d.ts.map +0 -1
- package/dist/core/kernel/module.d.ts.map +0 -1
- package/dist/core/kernel/operations-records.d.ts.map +0 -1
- package/dist/core/kernel/operations-resolve.d.ts +0 -5
- package/dist/core/kernel/operations-resolve.d.ts.map +0 -1
- package/dist/core/kernel/operations.d.ts.map +0 -1
- package/dist/core/kernel/page-controller.d.ts.map +0 -1
- package/dist/core/kernel/provider.d.ts.map +0 -1
- package/dist/core/kernel/runtime.d.ts.map +0 -1
- package/dist/core/kernel/schema.d.ts.map +0 -1
- package/dist/core/kernel/stabilize.d.ts.map +0 -1
- package/dist/core/kernel/store-batch.d.ts +0 -17
- package/dist/core/kernel/store-batch.d.ts.map +0 -1
- package/dist/core/kernel/store-entries.d.ts +0 -6
- package/dist/core/kernel/store-entries.d.ts.map +0 -1
- package/dist/core/kernel/store-handles.d.ts +0 -4
- package/dist/core/kernel/store-handles.d.ts.map +0 -1
- package/dist/core/kernel/store-registration.d.ts +0 -14
- package/dist/core/kernel/store-registration.d.ts.map +0 -1
- package/dist/core/kernel/store-snapshots.d.ts.map +0 -1
- package/dist/core/kernel/store-subscriptions.d.ts.map +0 -1
- package/dist/core/kernel/store.d.ts.map +0 -1
- package/dist/core/kernel/types-modules.d.ts.map +0 -1
- package/dist/core/kernel/types-page.d.ts.map +0 -1
- package/dist/core/kernel/types-store.d.ts.map +0 -1
- package/dist/core/kernel/types.d.ts.map +0 -1
- package/dist/core/navigation/navigator-defaults.d.ts +0 -4
- package/dist/core/navigation/navigator-defaults.d.ts.map +0 -1
- package/dist/core/navigation/navigator-holds.d.ts.map +0 -1
- package/dist/core/navigation/navigator-patience.d.ts.map +0 -1
- package/dist/core/navigation/navigator-payload.d.ts.map +0 -1
- package/dist/core/navigation/navigator-prefetch.d.ts.map +0 -1
- package/dist/foundation/recipes/anatomy.d.ts +0 -139
- package/dist/foundation/recipes/anatomy.d.ts.map +0 -1
- package/dist/foundation/recipes/define.d.ts +0 -133
- package/dist/foundation/recipes/define.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-bounds.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-clusters.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-ground.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-measures.d.ts.map +0 -1
- package/dist/modules/ambient/analyze-swatches.d.ts.map +0 -1
- package/dist/modules/ambient/analyze.d.ts.map +0 -1
- package/dist/modules/ambient/oklab.d.ts.map +0 -1
- package/dist/modules/ambient/quantize.d.ts.map +0 -1
- package/dist/modules/background/components/background-gradients.d.ts +0 -8
- package/dist/modules/background/components/background-gradients.d.ts.map +0 -1
- package/dist/modules/background/components/edge-gradient.d.ts +0 -9
- package/dist/modules/background/components/edge-gradient.d.ts.map +0 -1
- package/dist/modules/background/components/native-video.d.ts +0 -4
- package/dist/modules/background/components/native-video.d.ts.map +0 -1
- package/dist/modules/background/components/noise-overlay.d.ts +0 -11
- package/dist/modules/background/components/noise-overlay.d.ts.map +0 -1
- package/dist/modules/background/components/overlay.d.ts.map +0 -1
- package/dist/modules/background/components/solid-overlay.d.ts +0 -10
- package/dist/modules/background/components/solid-overlay.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-background-media-source.d.ts +0 -4
- package/dist/modules/background/hooks/use-background-media-source.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-background-motion-model.d.ts +0 -15
- package/dist/modules/background/hooks/use-background-motion-model.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts +0 -929
- package/dist/modules/background/hooks/use-background-overlay-model.d.ts.map +0 -1
- package/dist/modules/background/hooks/use-native-video-model.d.ts.map +0 -1
- package/dist/modules/background/lib/theme.d.ts +0 -4
- package/dist/modules/background/lib/theme.d.ts.map +0 -1
- package/dist/modules/background/model/override.d.ts +0 -14
- package/dist/modules/background/model/override.d.ts.map +0 -1
- package/dist/modules/background/model/playback.d.ts.map +0 -1
- package/dist/modules/background/model/state.d.ts.map +0 -1
- package/dist/modules/background/model/video-frame.d.ts +0 -31
- package/dist/modules/background/model/video-frame.d.ts.map +0 -1
- package/dist/modules/background/model/visual.d.ts.map +0 -1
- package/dist/modules/background/youtube/components/player.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-background-player-model.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts +0 -20
- package/dist/modules/background/youtube/hooks/use-youtube-iframe-player.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts +0 -8
- package/dist/modules/background/youtube/hooks/use-youtube-stream-sources.d.ts.map +0 -1
- package/dist/modules/background/youtube/hooks/use-youtube-video-sync.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/audio.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts +0 -29
- package/dist/modules/background/youtube/lib/iframe-engine.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts +0 -47
- package/dist/modules/background/youtube/lib/iframe-proxy.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/iframe.d.ts +0 -47
- package/dist/modules/background/youtube/lib/iframe.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/parse.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/timing.d.ts.map +0 -1
- package/dist/modules/background/youtube/lib/video-events.d.ts.map +0 -1
- package/dist/modules/dock/components/badge.d.ts +0 -5
- package/dist/modules/dock/components/badge.d.ts.map +0 -1
- package/dist/modules/dock/components/breadcrumbs-card.d.ts.map +0 -1
- package/dist/modules/dock/components/card-banner.d.ts +0 -4
- package/dist/modules/dock/components/card-banner.d.ts.map +0 -1
- package/dist/modules/dock/components/card-header.d.ts +0 -4
- package/dist/modules/dock/components/card-header.d.ts.map +0 -1
- package/dist/modules/dock/components/card-item.d.ts.map +0 -1
- package/dist/modules/dock/components/command-bar.d.ts.map +0 -1
- package/dist/modules/dock/components/compact.d.ts.map +0 -1
- package/dist/modules/dock/components/description.d.ts +0 -4
- package/dist/modules/dock/components/description.d.ts.map +0 -1
- package/dist/modules/dock/components/dock.d.ts.map +0 -1
- package/dist/modules/dock/components/hud-view.d.ts.map +0 -1
- package/dist/modules/dock/components/icon.d.ts.map +0 -1
- package/dist/modules/dock/components/item-content.d.ts.map +0 -1
- package/dist/modules/dock/components/media-action.d.ts.map +0 -1
- package/dist/modules/dock/components/media-controls.d.ts +0 -4
- package/dist/modules/dock/components/media-controls.d.ts.map +0 -1
- package/dist/modules/dock/components/media-scrubber.d.ts.map +0 -1
- package/dist/modules/dock/components/status-actions.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/action.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/controls.d.ts +0 -12
- package/dist/modules/dock/components/surface/controls.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/extensions-bar.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/header-button.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/item-content.d.ts.map +0 -1
- package/dist/modules/dock/components/surface/shell.d.ts +0 -3
- package/dist/modules/dock/components/surface/shell.d.ts.map +0 -1
- package/dist/modules/dock/components/title.d.ts +0 -4
- package/dist/modules/dock/components/title.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-action-slot.d.ts +0 -6
- package/dist/modules/dock/hooks/use-action-slot.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-badge.d.ts +0 -4
- package/dist/modules/dock/hooks/use-badge.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts +0 -18
- package/dist/modules/dock/hooks/use-card-banner-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-card-header-model.d.ts +0 -7
- package/dist/modules/dock/hooks/use-card-header-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts +0 -12
- package/dist/modules/dock/hooks/use-command-bar-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-banner.d.ts +0 -11
- package/dist/modules/dock/hooks/use-dock-banner.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-config.d.ts +0 -19
- package/dist/modules/dock/hooks/use-dock-config.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts +0 -7
- package/dist/modules/dock/hooks/use-dock-dimensions.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts +0 -7
- package/dist/modules/dock/hooks/use-dock-focus-trap.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts +0 -6
- package/dist/modules/dock/hooks/use-dock-height-controller.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts +0 -11
- package/dist/modules/dock/hooks/use-dock-keyboard.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-registration.d.ts +0 -8
- package/dist/modules/dock/hooks/use-dock-registration.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts +0 -2
- package/dist/modules/dock/hooks/use-dock-route-reset.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-theme.d.ts +0 -6
- package/dist/modules/dock/hooks/use-dock-theme.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts +0 -6
- package/dist/modules/dock/hooks/use-dock-viewport.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-element-height.d.ts +0 -3
- package/dist/modules/dock/hooks/use-element-height.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-hud-registry.d.ts +0 -16
- package/dist/modules/dock/hooks/use-hud-registry.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts +0 -9
- package/dist/modules/dock/hooks/use-hud-view-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-media-controls-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts +0 -27
- package/dist/modules/dock/hooks/use-media-scrubber-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-pending-skeleton.d.ts +0 -7
- package/dist/modules/dock/hooks/use-pending-skeleton.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts +0 -12
- package/dist/modules/dock/hooks/use-standard-item-content-model.d.ts.map +0 -1
- package/dist/modules/dock/hooks/use-surface-return.d.ts +0 -8
- package/dist/modules/dock/hooks/use-surface-return.d.ts.map +0 -1
- package/dist/modules/dock/hud.d.ts.map +0 -1
- package/dist/modules/dock/lib/banner.d.ts.map +0 -1
- package/dist/modules/dock/lib/card-item.d.ts.map +0 -1
- package/dist/modules/dock/lib/card.d.ts +0 -20
- package/dist/modules/dock/lib/card.d.ts.map +0 -1
- package/dist/modules/dock/lib/command-bar.d.ts +0 -8
- package/dist/modules/dock/lib/command-bar.d.ts.map +0 -1
- package/dist/modules/dock/lib/dom.d.ts +0 -7
- package/dist/modules/dock/lib/dom.d.ts.map +0 -1
- package/dist/modules/dock/lib/element-helpers.d.ts +0 -8
- package/dist/modules/dock/lib/element-helpers.d.ts.map +0 -1
- package/dist/modules/dock/lib/helpers.d.ts.map +0 -1
- package/dist/modules/dock/lib/media.d.ts.map +0 -1
- package/dist/modules/dock/lib/styles.d.ts.map +0 -1
- package/dist/modules/dock/model/hud-definition.d.ts.map +0 -1
- package/dist/modules/dock/model/hud.d.ts +0 -10
- package/dist/modules/dock/model/hud.d.ts.map +0 -1
- package/dist/modules/dock/model/layout.d.ts.map +0 -1
- package/dist/modules/dock/model/page-entry.d.ts +0 -11
- package/dist/modules/dock/model/page-entry.d.ts.map +0 -1
- package/dist/modules/dock/model/page-surface.d.ts +0 -4
- package/dist/modules/dock/model/page-surface.d.ts.map +0 -1
- package/dist/modules/dock/model/paths.d.ts.map +0 -1
- package/dist/modules/dock/model/state.d.ts +0 -28
- package/dist/modules/dock/model/state.d.ts.map +0 -1
- package/dist/modules/dock/model/surface-return.d.ts +0 -14
- package/dist/modules/dock/model/surface-return.d.ts.map +0 -1
- package/dist/modules/dock/routing/hooks/use-route-prefetch.d.ts.map +0 -1
- package/dist/modules/dock/routing/lib/restore.d.ts +0 -7
- package/dist/modules/dock/routing/lib/restore.d.ts.map +0 -1
- package/dist/modules/dock/routing/model/continuity.d.ts.map +0 -1
- package/dist/modules/dock/routing/model/policy.d.ts.map +0 -1
- package/dist/modules/dock/routing/model/topology.d.ts.map +0 -1
- package/dist/modules/dock/runtime/commands.d.ts.map +0 -1
- package/dist/modules/dock/runtime/display.d.ts.map +0 -1
- package/dist/modules/dock/runtime/dock.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts +0 -10
- package/dist/modules/dock/runtime/hooks/use-dock-expansion.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts +0 -10
- package/dist/modules/dock/runtime/hooks/use-dock-layout.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts +0 -14
- package/dist/modules/dock/runtime/hooks/use-dock-operation-state.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts +0 -7
- package/dist/modules/dock/runtime/hooks/use-dock-route-bridge.d.ts.map +0 -1
- package/dist/modules/dock/runtime/hooks/use-dock.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/attention.d.ts +0 -25
- package/dist/modules/dock/runtime/model/attention.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/cards.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/items.d.ts.map +0 -1
- package/dist/modules/dock/runtime/model/layout.d.ts +0 -10
- package/dist/modules/dock/runtime/model/layout.d.ts.map +0 -1
- package/dist/modules/dock/runtime/pipeline.d.ts.map +0 -1
- package/dist/modules/dock/runtime/provider-actions.d.ts +0 -38
- package/dist/modules/dock/runtime/provider-actions.d.ts.map +0 -1
- package/dist/modules/dock/status/action-options.d.ts +0 -35
- package/dist/modules/dock/status/action-options.d.ts.map +0 -1
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts +0 -5
- package/dist/modules/dock/surface/components/surface-extensions-provider.d.ts.map +0 -1
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts +0 -7
- package/dist/modules/dock/surface/components/surface-flow-provider.d.ts.map +0 -1
- package/dist/modules/dock/surface/constants.d.ts +0 -5
- package/dist/modules/dock/surface/constants.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts +0 -15
- package/dist/modules/dock/surface/hooks/use-surface-controls-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts +0 -7
- package/dist/modules/dock/surface/hooks/use-surface-extensions-bar-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts +0 -14
- package/dist/modules/dock/surface/hooks/use-surface-extensions.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-flow.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts +0 -13
- package/dist/modules/dock/surface/hooks/use-surface-header-button-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/hooks/use-surface-shell-model.d.ts.map +0 -1
- package/dist/modules/dock/surface/lib/drag.d.ts +0 -9
- package/dist/modules/dock/surface/lib/drag.d.ts.map +0 -1
- package/dist/modules/dock/surface/lib/target.d.ts +0 -8
- package/dist/modules/dock/surface/lib/target.d.ts.map +0 -1
- package/dist/modules/dock/surface/machine.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/builder.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/normalize.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/open.d.ts +0 -26
- package/dist/modules/dock/surface/model/open.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/records.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/steps.d.ts +0 -9
- package/dist/modules/dock/surface/model/steps.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/transition-state.d.ts.map +0 -1
- package/dist/modules/dock/surface/model/url.d.ts.map +0 -1
- package/dist/modules/dock/surface/runtime/context.d.ts +0 -29
- package/dist/modules/dock/surface/runtime/context.d.ts.map +0 -1
- package/dist/modules/dock/surface/runtime/release.d.ts +0 -9
- package/dist/modules/dock/surface/runtime/release.d.ts.map +0 -1
- package/dist/modules/dock/surface/stack.d.ts.map +0 -1
- package/dist/modules/dock/types/compact.d.ts +0 -13
- package/dist/modules/dock/types/compact.d.ts.map +0 -1
- package/dist/modules/modal/components/close-button.d.ts +0 -6
- package/dist/modules/modal/components/close-button.d.ts.map +0 -1
- package/dist/modules/modal/components/modal-container.d.ts.map +0 -1
- package/dist/modules/modal/components/modal-layer-switcher.d.ts +0 -9
- package/dist/modules/modal/components/modal-layer-switcher.d.ts.map +0 -1
- package/dist/modules/modal/components/modal-layer.d.ts +0 -17
- package/dist/modules/modal/components/modal-layer.d.ts.map +0 -1
- package/dist/modules/modal/components/overlay.d.ts.map +0 -1
- package/dist/modules/modal/components/resolve-header.d.ts +0 -10
- package/dist/modules/modal/components/resolve-header.d.ts.map +0 -1
- package/dist/modules/modal/components/slot-row.d.ts +0 -12
- package/dist/modules/modal/components/slot-row.d.ts.map +0 -1
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts +0 -3
- package/dist/modules/modal/hooks/use-mobile-viewport.d.ts.map +0 -1
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts +0 -12
- package/dist/modules/modal/hooks/use-modal-focus-trap.d.ts.map +0 -1
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts +0 -3
- package/dist/modules/modal/hooks/use-modal-scroll-lock.d.ts.map +0 -1
- package/dist/modules/modal/lib/dom.d.ts.map +0 -1
- package/dist/modules/modal/lib/theme.d.ts +0 -4
- package/dist/modules/modal/lib/theme.d.ts.map +0 -1
- package/dist/modules/modal/model/entry.d.ts +0 -18
- package/dist/modules/modal/model/entry.d.ts.map +0 -1
- package/dist/modules/modal/model/header.d.ts +0 -16
- package/dist/modules/modal/model/header.d.ts.map +0 -1
- package/dist/modules/modal/model/identity.d.ts +0 -13
- package/dist/modules/modal/model/identity.d.ts.map +0 -1
- package/dist/modules/modal/model/layout.d.ts.map +0 -1
- package/dist/modules/modal/model/state.d.ts +0 -10
- package/dist/modules/modal/model/state.d.ts.map +0 -1
- package/dist/overlay-7QLGWHCH.js +0 -13
- package/dist/react/hooks/types.d.ts +0 -25
- package/dist/react/hooks/types.d.ts.map +0 -1
- package/dist/react/ui/components/avatar.d.ts +0 -6
- package/dist/react/ui/components/avatar.d.ts.map +0 -1
- package/dist/react/ui/components/button.d.ts +0 -6
- package/dist/react/ui/components/button.d.ts.map +0 -1
- package/dist/react/ui/components/carousel.d.ts +0 -6
- package/dist/react/ui/components/carousel.d.ts.map +0 -1
- package/dist/react/ui/components/checkbox.d.ts +0 -10
- package/dist/react/ui/components/checkbox.d.ts.map +0 -1
- package/dist/react/ui/components/icon.d.ts +0 -6
- package/dist/react/ui/components/icon.d.ts.map +0 -1
- package/dist/react/ui/components/image.d.ts +0 -6
- package/dist/react/ui/components/image.d.ts.map +0 -1
- package/dist/react/ui/components/indicator.d.ts +0 -45
- package/dist/react/ui/components/indicator.d.ts.map +0 -1
- package/dist/react/ui/components/input.d.ts +0 -10
- package/dist/react/ui/components/input.d.ts.map +0 -1
- package/dist/react/ui/components/loader.d.ts +0 -10
- package/dist/react/ui/components/loader.d.ts.map +0 -1
- package/dist/react/ui/components/segmented.d.ts +0 -6
- package/dist/react/ui/components/segmented.d.ts.map +0 -1
- package/dist/react/ui/components/select-parts.d.ts +0 -22
- package/dist/react/ui/components/select-parts.d.ts.map +0 -1
- package/dist/react/ui/components/select.d.ts +0 -6
- package/dist/react/ui/components/select.d.ts.map +0 -1
- package/dist/react/ui/components/skeleton.d.ts +0 -10
- package/dist/react/ui/components/skeleton.d.ts.map +0 -1
- package/dist/react/ui/components/switch.d.ts +0 -6
- package/dist/react/ui/components/switch.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip-group.d.ts +0 -34
- package/dist/react/ui/components/tooltip-group.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip-placement.d.ts +0 -43
- package/dist/react/ui/components/tooltip-placement.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip-slot.d.ts +0 -23
- package/dist/react/ui/components/tooltip-slot.d.ts.map +0 -1
- package/dist/react/ui/components/tooltip.d.ts +0 -13
- package/dist/react/ui/components/tooltip.d.ts.map +0 -1
- package/dist/react/ui/index.d.ts +0 -19
- package/dist/react/ui/index.d.ts.map +0 -1
- package/dist/react/ui/provider.d.ts +0 -22
- package/dist/react/ui/provider.d.ts.map +0 -1
- package/dist/react/ui/types-controls.d.ts +0 -133
- package/dist/react/ui/types-controls.d.ts.map +0 -1
- package/dist/react/ui/types.d.ts +0 -213
- package/dist/react/ui/types.d.ts.map +0 -1
- package/dist/react/ui/utils.d.ts +0 -65
- package/dist/react/ui/utils.d.ts.map +0 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.js +0 -2268
- package/dist/ui/index.js.map +0 -1
- package/docs/proposals/navigation.md +0 -210
- /package/dist/modules/ambient/{quantize.d.ts → analysis/quantize.d.ts} +0 -0
- /package/dist/modules/background/{components/overlay.d.ts → overlay.d.ts} +0 -0
- /package/dist/modules/background/{model/playback.d.ts → playback.d.ts} +0 -0
- /package/dist/modules/background/youtube/{lib/audio.d.ts → audio.d.ts} +0 -0
- /package/dist/modules/dock/{components → card}/compact.d.ts +0 -0
- /package/dist/modules/dock/{components → commands}/command-bar.d.ts +0 -0
- /package/dist/modules/dock/{components → routing}/breadcrumbs-card.d.ts +0 -0
- /package/dist/modules/dock/{model → routing}/paths.d.ts +0 -0
- /package/dist/modules/dock/{components → stack}/dock.d.ts +0 -0
- /package/dist/modules/dock/surface/{model → runtime}/url.d.ts +0 -0
- /package/dist/modules/modal/{lib/dom.d.ts → dom.d.ts} +0 -0
- /package/dist/modules/modal/{components/overlay.d.ts → overlay.d.ts} +0 -0
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
The source is split into four layers. A file's layer is its first folder under `src/`:
|
|
10
10
|
|
|
11
|
-
| Layer | Folder | Contents
|
|
12
|
-
| :---- | :--------------- |
|
|
13
|
-
| 0 | `src/foundation` | No React, server and edge safe: `result`, `events`, `utils`, `recipes`
|
|
14
|
-
| 1 | `src/react` | React primitives: `context`, `hooks`, `theme
|
|
15
|
-
| 2 | `src/core` | Orchestration: `kernel`, `error`, `provider`, `navigation` (the navigator machine)
|
|
16
|
-
| 3 | `src/modules` | The UI modules and `modules/index.ts` (`defaultModules`)
|
|
11
|
+
| Layer | Folder | Contents | Public subpaths |
|
|
12
|
+
| :---- | :--------------- | :------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------- |
|
|
13
|
+
| 0 | `src/foundation` | No React, server and edge safe: `result`, `events`, `utils`, `recipes` | `/result`, `/events`, `/utils`, `/recipes` |
|
|
14
|
+
| 1 | `src/react` | React primitives: `context`, `hooks`, `theme` (themes, the app's components and icons) | `/hooks`, `/theme` |
|
|
15
|
+
| 2 | `src/core` | Orchestration: `kernel`, `error`, `provider`, `navigation` (the navigator machine) | `/kernel`, `/error`, `/provider` |
|
|
16
|
+
| 3 | `src/modules` | The UI modules and `modules/index.ts` (`defaultModules`) | `/modules`, `/<module>` (`/dock`, `/modal`, …), `/ambient/server`, `/ambient/worker` |
|
|
17
17
|
|
|
18
18
|
`src/index.ts` and `src/modules/index.ts` are barrels and may import from any layer.
|
|
19
19
|
|
|
@@ -24,15 +24,17 @@ The source is split into four layers. A file's layer is its first folder under `
|
|
|
24
24
|
3. **Module isolation:** a module imports another module only through that module's public barrel (`@/modules/<name>`), and only when `<name>` is in its `uses`. Deep imports into another module's files are errors (Rule 1).
|
|
25
25
|
4. **No deep imports for consumers:** apps import only the subpaths in `package.json#exports` (`@omerdlw/base-framework/kernel`, `@omerdlw/base-framework/dock`). File paths such as `@omerdlw/base-framework/dist/kernel/page.js` are not part of the API.
|
|
26
26
|
5. **Zero cycles:** the import graph has no cycles, verified by `npm run check:architecture`.
|
|
27
|
-
6. **Inside a layer:** imports point straight at the file (`@/core/kernel/hooks`). A folder's `index.ts` is a public entry only; internal code does not import through it.
|
|
27
|
+
6. **Inside a layer:** imports point straight at the file (`@/core/kernel/registry/hooks`). A folder's `index.ts` is a public entry only; internal code does not import through it.
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
31
|
## 2. Canonical Module File Pattern
|
|
32
32
|
|
|
33
|
+
Code is grouped by what it does, not by what kind of file it is. A reader looking for the dock's breadcrumbs opens `dock/routing/`, not `components/`, `hooks/` and `model/` in turn. Two layouts follow from that rule.
|
|
34
|
+
|
|
33
35
|
### 2.1 Flat layout (default)
|
|
34
36
|
|
|
35
|
-
Used by `ambient`, `context-menu`, `controls`, `loading`, `media`, `navigation` and `notification`.
|
|
37
|
+
Used by `ambient`, `background`, `context-menu`, `controls`, `loading`, `media`, `modal`, `navigation` and `notification`.
|
|
36
38
|
|
|
37
39
|
| File | Responsibility | Required? |
|
|
38
40
|
| :------------- | :------------------------------------------------------------------------------------------ | :-------: |
|
|
@@ -42,30 +44,37 @@ Used by `ambient`, `context-menu`, `controls`, `loading`, `media`, `navigation`
|
|
|
42
44
|
| `constants.ts` | Module id, `defineThemeSpec`, constants. | ✅ |
|
|
43
45
|
| `context.tsx` | Context and provider; at most one context per module. | Optional |
|
|
44
46
|
| `state.ts` | Initial state and pure reducers. | Optional |
|
|
45
|
-
| `hooks.ts` |
|
|
47
|
+
| `hooks.ts` | Public hooks and view-model hooks (`use<Component>Model`). | Optional |
|
|
46
48
|
| `overlay.tsx` | Visual JSX that consumes the view-models; no state, effects or refs. | Optional |
|
|
47
49
|
| `motion.ts` | The module's `use*Motion()` hook. Motion values live in the app's theme, not in the module. | Optional |
|
|
48
50
|
| `utils.ts` | Pure helpers. | Optional |
|
|
49
51
|
|
|
50
|
-
A module
|
|
52
|
+
A module adds topic files for a cohesive concern (`context-menu/resolver.ts`, `media/session.ts`, `modal/layout.ts`) and a folder for a self-contained part (`ambient/analysis/`, `background/youtube/`). Ambient's `server/` and `worker/` sub-entries stay in place.
|
|
51
53
|
|
|
52
|
-
### 2.2
|
|
54
|
+
### 2.2 Feature layout
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
A module too large for one flat folder splits by feature. Today that is `dock`:
|
|
55
57
|
|
|
56
58
|
```
|
|
57
|
-
modules
|
|
58
|
-
├── index.ts module.tsx constants.ts context.
|
|
59
|
-
├──
|
|
60
|
-
├──
|
|
61
|
-
├──
|
|
62
|
-
├──
|
|
63
|
-
|
|
59
|
+
modules/dock/
|
|
60
|
+
├── index.ts module.tsx constants.ts context.ts provider.tsx
|
|
61
|
+
├── hooks.ts theme.ts motion.ts utils.ts
|
|
62
|
+
├── types/ contracts split by area, plus index.ts
|
|
63
|
+
├── stack/ the dock root, layout, height and focus
|
|
64
|
+
├── card/ a card and its parts
|
|
65
|
+
├── commands/ …one folder per feature
|
|
66
|
+
└── surface/ with surface/runtime/ for the surface stack
|
|
64
67
|
```
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
Inside a feature folder, a component and the view-model hook only it uses share a file when together they stay readable (`surface/shell.tsx`); otherwise they sit side by side (`card/card.tsx` and `card/use-card.ts`). Files are named for what they hold, without repeating the folder (`card/header.tsx`, not `card/card-header.tsx`).
|
|
70
|
+
|
|
71
|
+
### 2.3 Size and naming
|
|
67
72
|
|
|
68
|
-
|
|
73
|
+
- File and folder names are kebab-case; hook files start with `use-`.
|
|
74
|
+
- A name prefix shared by several files (`store-*.ts`) means they belong in a folder (`registry/`).
|
|
75
|
+
- A file under about 40 lines joins its only user or its closest sibling instead of standing alone.
|
|
76
|
+
- No file under `src/` exceeds 500 lines; `npm run check:architecture` enforces it.
|
|
77
|
+
- Inside a file: imports, then constants, then code in reading order. A file with several concerns separates them with `// ---- Section ----` headers.
|
|
69
78
|
|
|
70
79
|
---
|
|
71
80
|
|
|
@@ -116,6 +125,8 @@ Asynchronous workflows, Server Actions, and data mutations must never throw unha
|
|
|
116
125
|
- ❌ `if (!id) throw new Error("Invalid ID");`
|
|
117
126
|
- ✅ `if (!id) return err("Invalid ID"); return ok({ success: true });`
|
|
118
127
|
|
|
128
|
+
Errors that the framework catches, such as a user callback that throws, go through `report(scope, error)` before any fallback. An empty `catch` is only for browser APIs that may throw harmlessly, and it carries a comment that says why.
|
|
129
|
+
|
|
119
130
|
### Rule 7: Declarative Chrome (`usePage`)
|
|
120
131
|
|
|
121
132
|
Consumer applications must never handcraft ad-hoc fixed headers, floating toolbars, or sticky navigation bars in individual page views. All route chrome is declared through `usePage()`:
|
|
@@ -156,8 +167,8 @@ It runs `format:check`, `lint`, `type-check`, `check:architecture`, `test`, `bui
|
|
|
156
167
|
| **Prettier** | `npm run format:check` | One formatting for source, tests and docs. |
|
|
157
168
|
| **ESLint** | `npm run lint` | Type-aware rules, import order, public subpaths only, the React Compiler rules (`react-hooks/*` as errors). |
|
|
158
169
|
| **TypeScript** | `npm run type-check` | Strict types for `src`, `templates` and `tests/types`. |
|
|
159
|
-
| **Architecture script** | `npm run check:architecture` | Four rules: no import cycles; layers only import downwards and foundation stays framework-free; modules meet only at declared public barrels (`uses`); files stay within
|
|
160
|
-
| **Node test runner** | `npm test` |
|
|
170
|
+
| **Architecture script** | `npm run check:architecture` | Four rules: no import cycles; layers only import downwards and foundation stays framework-free; modules meet only at declared public barrels (`uses`); files stay within 500 lines. |
|
|
171
|
+
| **Node test runner** | `npm test` | The test suite over foundation, react, core and modules, run on the uncompiled source. |
|
|
161
172
|
| **tsup + smoke tests** | `npm run build`, `test:dist` | ESM bundles with the React Compiler, `.d.ts` output, and 13 smoke tests against `dist`. |
|
|
162
173
|
|
|
163
174
|
---
|
|
@@ -168,10 +179,10 @@ It runs `format:check`, `lint`, `type-check`, `check:architecture`, `test`, `bui
|
|
|
168
179
|
What are you adding?
|
|
169
180
|
├─ Pure helper, store or scheduler (clamp, createStore) -> src/foundation/utils/
|
|
170
181
|
├─ Result type or event bus addition -> src/foundation/result/, src/foundation/events/
|
|
171
|
-
├─ Recipe
|
|
182
|
+
├─ Recipe or class helper (defineRecipe, cn) -> src/foundation/recipes/
|
|
172
183
|
├─ Universal React hook (useStore, useClickOutside) -> src/react/hooks/
|
|
173
184
|
├─ Theme or motion plumbing (defineTheme, useModuleMotion) -> src/react/theme/
|
|
174
|
-
├─
|
|
185
|
+
├─ A piece a module draws (button, icon, spinner, tooltip) -> a slot in src/react/theme/parts.tsx; the app supplies it
|
|
175
186
|
├─ Orchestration (registry, page controller, provider) -> src/core/kernel/, src/core/provider/
|
|
176
187
|
├─ Error handling and reporting (boundary, listener) -> src/core/error/
|
|
177
188
|
├─ Navigation machine shared by modules -> src/core/navigation/
|
|
@@ -193,12 +204,12 @@ Memos that only feed render output or DOM event handlers are dropped.
|
|
|
193
204
|
|
|
194
205
|
These functions are skipped by the compiler on purpose. Their memos stay hand-written and are marked `// kept: <fn> is a compiler exception`.
|
|
195
206
|
|
|
196
|
-
| File
|
|
197
|
-
|
|
|
198
|
-
| `src/core/kernel/hooks.ts`
|
|
199
|
-
| `src/core/kernel/page
|
|
200
|
-
| `src/modules/ambient/hooks.ts`
|
|
201
|
-
| `src/modules/background/youtube/
|
|
202
|
-
| `src/modules/dock/
|
|
207
|
+
| File | Function | Reason |
|
|
208
|
+
| :--------------------------------------------- | :-------------------------------- | :---------------------------------------------------------------------------------------------------------------------- |
|
|
209
|
+
| `src/core/kernel/registry/hooks.ts` | `useShallowStable` | Reads and writes a ref during render to keep a shallow-equal value stable; a state-based version costs an extra render. |
|
|
210
|
+
| `src/core/kernel/page.tsx` | `useModuleControllers` | Calls each module's `page.use` hook in a loop; compiled, the loop is memoized and the hooks are skipped on re-render. |
|
|
211
|
+
| `src/modules/ambient/hooks.ts` | `useStableObject` | Same ref-during-render pattern as `useShallowStable`. |
|
|
212
|
+
| `src/modules/background/youtube/use-player.ts` | `useYouTubeBackgroundPlayerModel` | Writes the latest props into `live.current` during render for imperative player callbacks. |
|
|
213
|
+
| `src/modules/dock/items/operations.ts` | `useDockOperationState` | Reads the operations ref during render. |
|
|
203
214
|
|
|
204
215
|
Refactoring any of these is optional work; when one compiles, re-check its memos against the rule above.
|
package/docs/core-engine.md
CHANGED
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
| :--------------------------------- | :-------------------- | :----------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
11
|
| `@omerdlw/base-framework/utils` | `foundation/utils/` | ✅ | Scheduling, stores, string/number/object helpers, motion retiming (`defineMotion`, `retime`), `report`, `toUserMessage`. Foundation layer: imports nothing from other layers. |
|
|
12
12
|
| `@omerdlw/base-framework/result` | `foundation/result/` | ✅ | `Result<T, E>`, `createSafeAction`. → [result.md](./modules/result.md) |
|
|
13
|
-
| `@omerdlw/base-framework/recipes` | `foundation/recipes/` | ✅ | Server-safe `
|
|
13
|
+
| `@omerdlw/base-framework/recipes` | `foundation/recipes/` | ✅ | Server-safe `defineRecipe`, `splitVariants`, `cn`, `createCn`. → [design.md](./design.md) |
|
|
14
14
|
| `@omerdlw/base-framework/events` | `foundation/events/` | ✅ | `globalEvents` bus, `EVENT_TYPES`, `FrameworkEventMap`. |
|
|
15
15
|
| `@omerdlw/base-framework/hooks` | `react/hooks/` | client | Universal React hooks. |
|
|
16
|
-
| `@omerdlw/base-framework/theme` | `react/theme/` | client | Theme specs and provider (shared by core and modules).
|
|
17
|
-
| `@omerdlw/base-framework/ui` | `react/ui/` | client | Styled components (`Button`, `Icon`, `Loader`, `Tooltip`, …) the modules render with too. → [design.md](./design.md) |
|
|
16
|
+
| `@omerdlw/base-framework/theme` | `react/theme/` | client | Theme specs and provider (shared by core and modules); the app's `components` and `icons` the modules draw with. → [design.md](./design.md) |
|
|
18
17
|
| `@omerdlw/base-framework/kernel` | `core/kernel/` | client | Module host, registry, `usePage`. → [kernel.md](./modules/kernel.md) |
|
|
19
18
|
| `@omerdlw/base-framework/error` | `core/error/` | client | Boundaries, reporter. → [error-boundary.md](./modules/error-boundary.md) |
|
|
20
19
|
| `@omerdlw/base-framework/provider` | `core/provider/` | client | `CoreProvider`: the one component that assembles everything. |
|
|
@@ -40,16 +39,15 @@ Server-safe entries (`utils`, `recipes`, `result`, `events`) must not import Rea
|
|
|
40
39
|
</Compose>
|
|
41
40
|
```
|
|
42
41
|
|
|
43
|
-
| Prop | Type
|
|
44
|
-
| :---------------- |
|
|
45
|
-
| `modules` | `readonly AnyCoreModule[]`
|
|
46
|
-
| `registryEntries` | `readonly AppRegistryEntry[]`
|
|
47
|
-
| `providers` | `readonly ProviderEntry[]`
|
|
48
|
-
| `overlays` | `ReactNode`
|
|
49
|
-
| `slots` | `{ beforeContent?, afterContent?, overlays? }`
|
|
50
|
-
| `tooltip` | `boolean \| { delayDuration?, skipDelayDuration? }` | The framework's `TooltipProvider` (default on: 300 / 150 ms). `false` removes it (then `Tooltip` components need their own provider). |
|
|
42
|
+
| Prop | Type | Meaning |
|
|
43
|
+
| :---------------- | :--------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `modules` | `readonly AnyCoreModule[]` | **Required.** Which modules to install (order does not matter; `uses` sorts them). Listing only some (`[dockModule, notificationModule]`) ships only those. Read **once** at mount. |
|
|
45
|
+
| `registryEntries` | `readonly AppRegistryEntry[]` | Initial (static) registry entries: dock cards, global context menus… `{ type, items: { key: value } }`. |
|
|
46
|
+
| `providers` | `readonly ProviderEntry[]` | Extra providers nested **inside** the module host (so they can use modules). A provider is a component or `[Component, props]`. |
|
|
47
|
+
| `overlays` | `ReactNode` | Rendered after `children`, inside the pipeline. |
|
|
48
|
+
| `slots` | `{ beforeContent?, afterContent?, overlays? }` | Positional content around `children`. |
|
|
51
49
|
|
|
52
|
-
Resulting tree: `GlobalError` → `
|
|
50
|
+
Resulting tree: `GlobalError` → `ModuleHost` (registry, page controller stack, module providers, backdrops, **children**, overlays; each module UI inside `ModuleError`) → your `providers` → `beforeContent`, `children`, `afterContent`, `overlays`, `slots.overlays`, `GlobalErrorListener`.
|
|
53
51
|
|
|
54
52
|
`Compose` (from `@omerdlw/base-framework/kernel`) is the helper that nests provider lists; use it for your own pipelines.
|
|
55
53
|
|
|
@@ -170,7 +168,7 @@ The only numbers left in module code are relative stacking inside a module's own
|
|
|
170
168
|
|
|
171
169
|
## 9. Gotchas
|
|
172
170
|
|
|
173
|
-
- Importing `@omerdlw/base-framework/hooks` or `@omerdlw/base-framework/
|
|
171
|
+
- Importing `@omerdlw/base-framework/hooks` or `@omerdlw/base-framework/theme` from a server-safe entry breaks the lint boundary and the Edge bundle.
|
|
174
172
|
- `createStore` snapshots are frozen in development: mutate through `publish`/`setState`, never in place.
|
|
175
173
|
- `useStore` without a selector re-renders on every change; select a slice.
|
|
176
174
|
- A theme file that is not listed in `src/config/index.ts` crashes the first component that uses it (by design, with a clear message).
|
package/docs/custom-modules.md
CHANGED
|
@@ -146,7 +146,7 @@ Create `src/modules/tour/overlay.tsx`:
|
|
|
146
146
|
|
|
147
147
|
import React from "react";
|
|
148
148
|
import { useTheme } from "@omerdlw/base-framework/theme";
|
|
149
|
-
import { Button } from "@omerdlw/base-framework/
|
|
149
|
+
import { ThemeButton as Button } from "@omerdlw/base-framework/theme";
|
|
150
150
|
import { useTour } from "./context";
|
|
151
151
|
import { tourTheme } from "./constants";
|
|
152
152
|
|
package/docs/design.md
CHANGED
|
@@ -1,185 +1,92 @@
|
|
|
1
|
-
# Design
|
|
1
|
+
# Design: the app's components, the framework's modules
|
|
2
2
|
|
|
3
|
-
> **Read this first if you need to:**
|
|
3
|
+
> **Read this first if you need to:** understand why the framework ships no UI, give the modules (dock, modal, error screen, loading, media bar…) your own button, icon, spinner and tooltip, or name the icons they show.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## 1. The idea
|
|
8
8
|
|
|
9
|
-
The framework holds **no design**.
|
|
9
|
+
The framework holds **no design and no UI components**. There is no CSS file, no colour or size token, no motion value, no icon set and no `Button`. The modules own their mechanics and take every class and every timing from the app's theme ([theming.md](./theming.md)).
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- The app gives the parts their look in **one file** with `defineUi(...)`: a base, named variants, compound variants and defaults for each part (`cva`-shaped). It also gives the motion and the icons.
|
|
13
|
-
- The result is a plain, **server-safe object**. A Server Component calls a part (`ui.parts.button.root({ intent: "primary" })`); `<UiProvider ui={ui}>` hands it to the components.
|
|
14
|
-
- A one-line **module augmentation** types the components from the app's recipes: a variant the app wrote type-checks; one nobody wrote does not.
|
|
11
|
+
A module does still need a few pieces to draw: a button, an icon, a spinner and a tooltip. It never imports them. It renders the component the app hands to `ThemeProvider`:
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
| Slot | What a module passes it | Without it |
|
|
14
|
+
| :-------- | :----------------------------------------------------------------------------------------- | :------------------------------- |
|
|
15
|
+
| `Button` | `ThemeButtonProps`: button attributes, `data-*`, `ref`; the look is the theme slot's class | a plain `<button type="button">` |
|
|
16
|
+
| `Icon` | `ThemeIconProps`: `icon` (a name), `size` in px, `className`, `color`, `style`, `onClick` | nothing |
|
|
17
|
+
| `Spinner` | `ThemeSpinnerProps`: `className`, `size` | nothing |
|
|
18
|
+
| `Tooltip` | `ThemeTooltipProps`: the trigger as `children`, `text`, `className`, `sideOffset` | the trigger alone |
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
@omerdlw/base-framework/recipes defineUi, recipes, createCn, ANATOMY (server-safe)
|
|
20
|
-
@omerdlw/base-framework/ui UiProvider + components ("use client")
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
`design` sits beside `hooks` in the layer hierarchy: it imports `hooks`, `theme`, `kernel` and `utils`, and never imports a module. The modules render with its `Button`, `Icon`, `Loader` and `Tooltip`, so those pick up the app's look too.
|
|
20
|
+
The component library belongs to the app. A new app copies it from the template's `src/design/components` as source and changes it freely.
|
|
24
21
|
|
|
25
22
|
---
|
|
26
23
|
|
|
27
24
|
## 2. Setup
|
|
28
25
|
|
|
29
|
-
### 2.1 The ui
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
// src/design/ui.ts — no "use client": Server Components import it too
|
|
33
|
-
import { defineUi } from "@omerdlw/base-framework/recipes";
|
|
34
|
-
|
|
35
|
-
export const ui = defineUi({
|
|
36
|
-
parts: {
|
|
37
|
-
button: {
|
|
38
|
-
root: {
|
|
39
|
-
base: "inline-flex items-center justify-center gap-2 font-medium",
|
|
40
|
-
variants: {
|
|
41
|
-
intent: {
|
|
42
|
-
primary: "bg-primary text-on-primary",
|
|
43
|
-
ghost: "bg-transparent",
|
|
44
|
-
},
|
|
45
|
-
size: { sm: "h-8 px-3 text-sm", md: "h-10 px-4" },
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: { size: "md" },
|
|
48
|
-
},
|
|
49
|
-
busyLabel: { base: "invisible col-start-1 row-start-1" },
|
|
50
|
-
busySpinner: { base: "col-start-1 row-start-1 grid place-items-center" },
|
|
51
|
-
},
|
|
52
|
-
// …every part you use
|
|
53
|
-
},
|
|
54
|
-
icons: {
|
|
55
|
-
check: "lucide:check",
|
|
56
|
-
chevron: "lucide:chevron-down",
|
|
57
|
-
spinner: "lucide:loader",
|
|
58
|
-
},
|
|
59
|
-
motion: { follow: { type: "spring", stiffness: 500, damping: 40 } },
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
declare module "@omerdlw/base-framework/recipes" {
|
|
63
|
-
interface UiRegister {
|
|
64
|
-
ui: typeof ui;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
A part takes a recipe (`{ base, variants, compoundVariants, defaultVariants }`); `reset: true` drops what the anatomy declared. Your CSS (colours, type scale, utilities) lives in your app; the framework neither ships nor reads it.
|
|
70
|
-
|
|
71
|
-
### 2.2 The provider
|
|
72
|
-
|
|
73
26
|
```tsx
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
import {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
27
|
+
"use client";
|
|
28
|
+
|
|
29
|
+
import {
|
|
30
|
+
ThemeProvider,
|
|
31
|
+
type ThemeComponents,
|
|
32
|
+
} from "@omerdlw/base-framework/theme";
|
|
33
|
+
import { Button } from "@/design/components/button";
|
|
34
|
+
import { Icon } from "@/design/components/icon";
|
|
35
|
+
import { Spinner } from "@/design/components/loader";
|
|
36
|
+
import { Tooltip } from "@/design/components/tooltip";
|
|
37
|
+
|
|
38
|
+
const COMPONENTS: Partial<ThemeComponents> = { Button, Icon, Spinner, Tooltip };
|
|
39
|
+
|
|
40
|
+
const ICONS = {
|
|
41
|
+
back: "solar:alt-arrow-left-bold",
|
|
42
|
+
close: "solar:close-bold",
|
|
43
|
+
error: "solar:danger-circle-bold",
|
|
44
|
+
// …
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export function DesignProvider({ children }: { children: React.ReactNode }) {
|
|
48
|
+
return (
|
|
49
|
+
<ThemeProvider components={COMPONENTS} icons={ICONS} themes={themes}>
|
|
50
|
+
{children}
|
|
51
|
+
</ThemeProvider>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
81
54
|
```
|
|
82
55
|
|
|
83
|
-
A nested `
|
|
56
|
+
A nested `ThemeProvider` merges its `components` and `icons` over its parent's, so a subtree can swap one slot. Tooltip timing (open delay, skip window) belongs to the app's own tooltip provider.
|
|
84
57
|
|
|
85
58
|
---
|
|
86
59
|
|
|
87
|
-
## 3.
|
|
88
|
-
|
|
89
|
-
### 3.1 Parts
|
|
90
|
-
|
|
91
|
-
| Level | Where | Reach |
|
|
92
|
-
| :----------- | :------------------------------------------------ | :------------------- |
|
|
93
|
-
| **Recipes** | `defineUi({ parts })` | one part, everywhere |
|
|
94
|
-
| **Subtree** | a nested `<UiProvider ui={otherUi}>` | one part, below it |
|
|
95
|
-
| **Instance** | `className` (root) and `classNames={{ part: … }}` | one element |
|
|
96
|
-
|
|
97
|
-
A variant you add arrives as a prop the component never named; it styles the part and never reaches the DOM. A component of your own can live in the same system: `defineUi({ parts: { badge: { root: { … } } } })` and call `ui.parts.badge.root(…)`.
|
|
98
|
-
|
|
99
|
-
### 3.2 Motion
|
|
100
|
-
|
|
101
|
-
```ts
|
|
102
|
-
defineUi({
|
|
103
|
-
motion: {
|
|
104
|
-
follow: { type: "spring", stiffness: 500, damping: 40 }, // segmented pill, highlight
|
|
105
|
-
menu: {
|
|
106
|
-
// select menu; custom = 1 or -1 (opens down / up)
|
|
107
|
-
initial: (rise) => ({ opacity: 0, y: rise * -8 }),
|
|
108
|
-
animate: { opacity: 1, y: 0, transition: { duration: 0.3 } },
|
|
109
|
-
exit: (rise) => ({
|
|
110
|
-
opacity: 0,
|
|
111
|
-
y: rise * -6,
|
|
112
|
-
transition: { duration: 0.15 },
|
|
113
|
-
}),
|
|
114
|
-
},
|
|
115
|
-
option: {
|
|
116
|
-
// each option; custom = its index
|
|
117
|
-
initial: { opacity: 0 },
|
|
118
|
-
animate: (index) => ({ opacity: 1, transition: { delay: 0.02 * index } }),
|
|
119
|
-
},
|
|
120
|
-
glide: { duration: 0.8, ease: [0.5, 0, 0.1, 1] }, // carousel arrows
|
|
121
|
-
},
|
|
122
|
-
});
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
`menu` and `option` are `motion/react` variants (`initial`, `animate`, `exit`). Leave a key out and that part does not animate: the pill and the highlight jump, the menu appears, the carousel scrolls in one step. Every value is retimed by `ThemeProvider motion`'s tempo and replaced by its `still` transition for reduced motion.
|
|
126
|
-
|
|
127
|
-
### 3.3 Icons and labels
|
|
60
|
+
## 3. Icons
|
|
128
61
|
|
|
129
|
-
|
|
62
|
+
When an app gives a module an icon (a dock card's `icon`, an action's `icon`), the module passes the string straight to the app's `Icon`.
|
|
130
63
|
|
|
131
|
-
|
|
64
|
+
The framework's own icons are named by **key** (`FrameworkIcon`). The app's `icons` map turns each key into a name its `Icon` understands. A key the map does not name is passed through unchanged.
|
|
132
65
|
|
|
133
|
-
|
|
66
|
+
| Key | Where it shows |
|
|
67
|
+
| :----------------------------------------- | :------------------------------ |
|
|
68
|
+
| `close` | modal close, dock surface close |
|
|
69
|
+
| `back`, `next` | dock controls, breadcrumbs |
|
|
70
|
+
| `error` | error boundary fallback |
|
|
71
|
+
| `danger`, `forbidden` | route guard status cards |
|
|
72
|
+
| `wifi`, `wifiOff` | online / offline status |
|
|
73
|
+
| `play`, `pause` | dock header and media bar |
|
|
74
|
+
| `rewind`, `forward`, `pip`, `repeat` | media bar |
|
|
75
|
+
| `volumeMuted`, `volumeSmall`, `volumeLoud` | media bar volume |
|
|
134
76
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
```ts
|
|
138
|
-
defineUi({
|
|
139
|
-
merge: {
|
|
140
|
-
theme: { radius: ["card", "tile"], spacing: ["control-md"] },
|
|
141
|
-
classGroups: {
|
|
142
|
-
"font-size": ["type-body", "type-meta"],
|
|
143
|
-
duration: ["duration-move"],
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
});
|
|
147
|
-
ui.cn("type-body", "type-meta"); // "type-meta"
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
`theme` extends Tailwind's scales; `classGroups` lists whole class names per group.
|
|
77
|
+
In a module of your own, draw with `ThemeButton`, `ThemeIcon`, `ThemeSpinner` and `ThemeTooltip` from `@omerdlw/base-framework/theme`. They read the same slots.
|
|
151
78
|
|
|
152
79
|
---
|
|
153
80
|
|
|
154
|
-
## 4.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
| Component | Parts (`classNames` keys) | States | Notes |
|
|
159
|
-
| :------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
160
|
-
| `Button` | `root`, `bare`, `busy`, `busyLabel`, `busySpinner` | — | With an `intent` prop it draws `root`, without one `bare`. `loading` stacks `busyLabel` and `busySpinner` inside `busy`. Pass `href` to render a `next/link` with the same classes. |
|
|
161
|
-
| `Input`, `Textarea` | `field`, `area` | — | `Textarea` draws `field` plus `area`. |
|
|
162
|
-
| `Switch` | `track`, `thumb` | — | `data-state="checked"/"unchecked"` on both; `role="switch"`, `onCheckedChange`. |
|
|
163
|
-
| `Checkbox`, `CheckboxIndicator` | `root`, `box`, `glyph` | `checked` (box, glyph) | `pending` plays the loader. |
|
|
164
|
-
| `SegmentedControl` | `root`, `segment`, `pill`, `chosen`, `icon`, `count` | `active` (segment) | Tabs with a sliding pill; `chosen` paints the active tab until the pill is measured. |
|
|
165
|
-
| `Select` | `root`, `trigger`, `value`, `label`, `placeholder`, `chevron`, `menu`, `option`, `highlight`, `optionBody`, `text`, `description`, `icon`, `check`, `empty` | — | Listbox: arrows, Enter/Space, Escape; flips up; anchor positioning where supported; scroll lock while open. `offset` and `collisionPadding` (px, default 0); the room left in the viewport is `--select-available-height` on the menu. `floatingProps` for the portal. |
|
|
166
|
-
| `Carousel` | `root`, `track`, `slide`, `arrow`, `icon` | `side`, `visible` (arrow) | Touch, wheel, mouse drag; arrow glide; `onNearEnd`. `trackProps` for data hooks; inject `glide`, `renderSlide`, `ready`, `frameSelector` to drive it from your own engine. |
|
|
167
|
-
| `Tooltip`, `TooltipProvider` | `content`, `label` | — | Built-in placement (flip, `align`, shift); `sideOffset`/`collisionPadding` default to 0. Content gets `data-state` (`delayed-open`, `instant-open`, `closed`), `data-side`, `data-align` and `--tooltip-*` vars; stays mounted for its exit animation. `contentProps`, `triggerRef`. The content's `z-index` is copied to the `[data-tooltip-wrapper]` portal. |
|
|
168
|
-
| `Image` | `frame`, `picture`, `fallback` | `layout` (frame, picture), `loading` (frame) | `loading` is true until the picture decodes (paused off screen); CORS retry; fallback. |
|
|
169
|
-
| `Avatar` | `root`, `image`, `initials` | — | `size` sets width and height inline; without it the root's classes size it. |
|
|
170
|
-
| `Loader`, `Spinner` | `root`, `label`, `overlay`, `dots`, `dot`, `spinner`, `icon` | `over` (root) | Three `dot`s inside `dots`; `size` sets `--loader-size` on `dots`. Over content, `label` keeps the width and `overlay` holds the dots. |
|
|
171
|
-
| `SkeletonBlock`, `SkeletonLines` | `block`, `lines`, `line`, `bar` | — | `SkeletonLines` draws one `bar` per width inside a `line`. |
|
|
172
|
-
| `SlidingPill`, `useSlidingPill`, `SlidingHighlight`, `HighlightGroup`, `useHighlight` | `highlight.fill` | — | Positioned inline (absolute, no pointer events); the `follow` motion moves them. |
|
|
173
|
-
| `Icon` | — | — | Iconify. `size` in px, or let its class size it (`1em`). |
|
|
174
|
-
|
|
175
|
-
Pure helpers for your own racks: `glideTarget`, `rackClip`, `readScroll`, `useDragScroll`.
|
|
81
|
+
## 4. Recipes
|
|
82
|
+
|
|
83
|
+
`@omerdlw/base-framework/recipes` remains, and is server-safe: `defineRecipe`, `extendRecipe`, `compileRecipe`, `splitVariants`, `cn` and `createCn`. They are tools for writing the app's own component recipes; the framework defines none of its own.
|
|
176
84
|
|
|
177
85
|
---
|
|
178
86
|
|
|
179
87
|
## 5. Rules
|
|
180
88
|
|
|
181
|
-
1. **No design in the framework.** A class, a colour, a duration or an icon name in `src/` is a bug; it belongs in the app
|
|
182
|
-
2. **
|
|
183
|
-
3. **
|
|
184
|
-
4. **
|
|
185
|
-
5. **Server Components call parts, client components render components.** `ui.parts.*` is safe anywhere; components are `"use client"`.
|
|
89
|
+
1. **No design in the framework.** A class, a colour, a duration, a component or an icon name in `src/` is a bug; it belongs in the app.
|
|
90
|
+
2. **Modules draw through the slots.** Never import an app component into a module; use `ThemeButton`, `ThemeIcon`, `ThemeSpinner` and `ThemeTooltip`.
|
|
91
|
+
3. **Name framework icons by key.** A new icon that a module shows needs a new `FrameworkIcon` key and a row in section 3.
|
|
92
|
+
4. **Write classes literally.** Tailwind reads source files; a class built at runtime is never generated.
|
package/docs/getting-started.md
CHANGED
|
@@ -20,7 +20,7 @@ Before installing `@omerdlw/base-framework`, verify your environment:
|
|
|
20
20
|
Install `@omerdlw/base-framework` alongside its required peer dependencies:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
npm install @omerdlw/base-framework motion
|
|
23
|
+
npm install @omerdlw/base-framework motion tailwind-merge
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### Peer Dependencies Breakdown
|
|
@@ -28,14 +28,13 @@ npm install @omerdlw/base-framework motion @iconify-icon/react tailwind-merge
|
|
|
28
28
|
| Package | Purpose in Base Framework |
|
|
29
29
|
| :-------------------- | :-------------------------------------------------------------------------------- |
|
|
30
30
|
| `motion` (`>=12.0.0`) | Hardware GPU-accelerated motion presets (`translate3d`, `scale`, spring physics). |
|
|
31
|
-
| `@iconify-icon/react` | Unified SVG-free icon rendering via `<Icon icon="solar:..." />`. |
|
|
32
31
|
| `tailwind-merge` | Conflict resolution behind `cn()` class merging. |
|
|
33
32
|
|
|
34
33
|
---
|
|
35
34
|
|
|
36
35
|
## 3. Styling
|
|
37
36
|
|
|
38
|
-
The framework ships no CSS and no class names: Tailwind has nothing to scan in the package. Every class lives in your app, in your module themes ([theming.md](./theming.md)) and your
|
|
37
|
+
The framework ships no CSS and no class names: Tailwind has nothing to scan in the package. Every class lives in your app, in your module themes ([theming.md](./theming.md)) and in your own components ([design.md](./design.md)), so Tailwind finds it in your own sources. Your stylesheet is entirely yours:
|
|
39
38
|
|
|
40
39
|
```css
|
|
41
40
|
/* src/app/globals.css */
|
|
@@ -125,7 +124,7 @@ Create `src/app/page.tsx`:
|
|
|
125
124
|
"use client";
|
|
126
125
|
|
|
127
126
|
import { usePage } from "@omerdlw/base-framework/kernel";
|
|
128
|
-
import { Button, Icon } from "
|
|
127
|
+
import { Button, Icon } from "@/design/components"; // your own components
|
|
129
128
|
|
|
130
129
|
export default function HomePage() {
|
|
131
130
|
const page = usePage({
|
|
@@ -180,7 +179,6 @@ export default function HomePage() {
|
|
|
180
179
|
| `@omerdlw/base-framework/result` | Functional error handling | `Result<T, E>`, `ok()`, `err()`, `isResult()`, `createSafeAction()` |
|
|
181
180
|
| `@omerdlw/base-framework/events` | Cross-cutting event bus | `globalEvents`, `EVENT_TYPES`, `FrameworkEventMap` |
|
|
182
181
|
| `@omerdlw/base-framework/theme` | Declarative theme engine (slots and motion) | `defineThemeSpec()`, `defineTheme()`, `ThemeProvider`, `useTheme()`, `useModuleMotion()`, `useMotionTokens()` |
|
|
183
|
-
| `@omerdlw/base-framework/ui` | Unstyled components your `defineUi` styles | `Button`, `Icon`, `Select`, `Carousel`, `UiProvider`, … |
|
|
184
182
|
| `@omerdlw/base-framework/hooks` | Universal React hooks | `useStore()`, `useClickOutside()`, `useGlobalEvent()`, `useRequiredContext()` |
|
|
185
183
|
| `@omerdlw/base-framework/utils` | Pure runtime utilities | `clamp()`, `debounce()`, `throttle()`, `createStore()`, `createScheduler()`, `report()`, `defineMotion()`, `gpuTransform()` |
|
|
186
184
|
| `@omerdlw/base-framework/error` | Isolated error boundaries | `GlobalError`, `ModuleError`, `UserError`, `toUserMessage()` |
|
package/docs/modules/README.md
CHANGED
|
@@ -64,11 +64,11 @@ Every `definePeer`/`useModuleState`/`useModule` call needs the **peer id as a st
|
|
|
64
64
|
|
|
65
65
|
## 4. Canonical module template
|
|
66
66
|
|
|
67
|
-
Modules use one of two layouts. Both are described in full in [architecture-and-rules §2](../architecture-and-rules.md#2-canonical-module-file-pattern). A slot that does not apply is omitted, never created empty. `npm run check:architecture` enforces the layers, module isolation and the
|
|
67
|
+
Modules use one of two layouts. Both are described in full in [architecture-and-rules §2](../architecture-and-rules.md#2-canonical-module-file-pattern). A slot that does not apply is omitted, never created empty. `npm run check:architecture` enforces the layers, module isolation and the 500-line file limit.
|
|
68
68
|
|
|
69
|
-
**Flat layout** (default): `index.ts`, `module.tsx`, `types.ts` and `constants.ts` are required; `context.tsx` (one context), `state.ts`, `hooks.ts`, `overlay.tsx`, `motion.ts` and `utils.ts` are optional, plus topic files for a cohesive concern.
|
|
69
|
+
**Flat layout** (default): `index.ts`, `module.tsx`, `types.ts` and `constants.ts` are required; `context.tsx` (one context), `state.ts`, `hooks.ts`, `overlay.tsx`, `motion.ts` and `utils.ts` are optional, plus topic files and folders for a cohesive concern.
|
|
70
70
|
|
|
71
|
-
**
|
|
71
|
+
**Feature layout** (`dock`): one folder per feature (`stack/`, `card/`, `commands/`, `media/`, `hud/`, `items/`, `routing/`, `status/`, `surface/`), each holding that feature's components, view-model hooks and logic, next to `index.ts`, `module.tsx`, `constants.ts`, `context.ts`, `provider.tsx` and `motion.ts`.
|
|
72
72
|
|
|
73
73
|
Rules of thumb:
|
|
74
74
|
|
|
@@ -78,18 +78,18 @@ Rules of thumb:
|
|
|
78
78
|
|
|
79
79
|
### 4.1 File matrix (current)
|
|
80
80
|
|
|
81
|
-
| Module | Layout
|
|
82
|
-
| :----------- |
|
|
83
|
-
| ambient | flat
|
|
84
|
-
| background |
|
|
85
|
-
| context-menu | flat
|
|
86
|
-
| controls | flat
|
|
87
|
-
| dock |
|
|
88
|
-
| loading | flat
|
|
89
|
-
| media | flat
|
|
90
|
-
| modal |
|
|
91
|
-
| navigation | flat
|
|
92
|
-
| notification | flat
|
|
81
|
+
| Module | Layout | `context` | `hooks` | `state` | `overlay` | `motion` | Extras |
|
|
82
|
+
| :----------- | :-----: | :----------: | :-----: | :-----: | :-------: | :------: | :------------------------------------------------------------------------------ |
|
|
83
|
+
| ambient | flat | ✅ | ✅ | — | — | — | `analysis/`, `extractor.ts`, `pipeline.ts`, `settings.ts`, `server/`, `worker/` |
|
|
84
|
+
| background | flat | ✅ | ✅ | ✅ | ✅ | ✅ | `visual.ts`, `playback.ts`, `native-video.tsx`, `youtube/` |
|
|
85
|
+
| context-menu | flat | ✅ | ✅ | ✅ | ✅ | ✅ | `resolver.ts`, `items.ts`, `dom.ts` |
|
|
86
|
+
| controls | flat | — | ✅ | — | ✅ | — | `entries.ts`, `layout.ts` |
|
|
87
|
+
| dock | feature | `context.ts` | ✅ | — | — | ✅ | `provider.tsx`, `theme.ts`, feature folders |
|
|
88
|
+
| loading | flat | ✅ | ✅ | ✅ | ✅ | — | |
|
|
89
|
+
| media | flat | ✅ | ✅ | — | ✅ | — | `playback.ts`, `session.ts` |
|
|
90
|
+
| modal | flat | ✅ | ✅ | ✅ | ✅ | ✅ | `container.tsx`, `layout.ts`, `dom.ts` |
|
|
91
|
+
| navigation | flat | ✅ | ✅ | — | — | — | `listeners.ts`; the navigator machine lives in `src/core/navigation/` |
|
|
92
|
+
| notification | flat | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
|
93
93
|
|
|
94
94
|
### 4.2 Why some optional slots are absent
|
|
95
95
|
|
|
@@ -163,7 +163,7 @@ Every page follows this skeleton (omit sections that do not apply). Keep it **ve
|
|
|
163
163
|
src/app ─┐
|
|
164
164
|
src/features ─┼─▶ @omerdlw/base-framework/<module> ──▶ @omerdlw/base-framework/kernel ──▶ @omerdlw/base-framework/{utils,hooks,events,result}
|
|
165
165
|
src/core/provider.tsx ┘ │
|
|
166
|
-
└──▶ @omerdlw/base-framework/
|
|
166
|
+
└──▶ @omerdlw/base-framework/theme
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
Modules are installed by `CoreProvider` from the list the app passes; orchestration drives modules through their `defineModule` definitions and never imports them.
|